Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4002305ybe; Mon, 9 Sep 2019 02:35:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqzDupxf0s0TKhzo275Dk0/7yALHh7KKUj2VXSaVn7xNyeKaFEgz2bn72pdKKO8RQpL2B2jY X-Received: by 2002:aa7:c355:: with SMTP id j21mr22848711edr.210.1568021754232; Mon, 09 Sep 2019 02:35:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568021754; cv=none; d=google.com; s=arc-20160816; b=MWB9zxmc5HVRkE3A8fsMbsjDhchJ28eDCzqj42G3WLHjLRf2jchjGqHUy/H96nA7Fz TrP1krxMdD3j1YgLpQ6AB8bTOdpLIwoMrux1zDou7QTZYfc0IkG0pPNw1yr19bcjC8mm V71LA47le1xrIqhued8r5jLQQ+/z2xeRZOWb2a2gObHjiLoEfOkqXlJrg2xjtiHuXU1k YA33ba9fdxNVOK9/NdFeABO+rnr6RRE7pSmKzUbVcmWfnkdm63pDlbBlFlyWaRKBD31w UdioNBboCWPTUb1vmQgp7AVmn/HLu2Tla4V3AWHvzdxRrGd5e0DPLOVmFPO5iT4t8XJD rGDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=1EKVDkIn3Cqt9IKoeVcgmna/VXJyh9zPM+Auz+HPCog=; b=I56bMPYZsZNYnrWnJPhBjNeqVFTuw8HJF+gWCxfWaEL/24D7ABvJKEOtHSAKsTWxDp MVjhXrSXdj8mq2e7FFwuAYryw8RZHj2waXwjaCVhmbPmSybRA/gjmrCsjadK6YuriAZr 4IWf+ISoSflzHwUlwTYtrB5+21RybNfIdgWeCweSP9MRnp6Y4mVkon6wpXo+O3nHKaMO k4EiqJ/Vo9WFdYijDwaODrshJVqZHag/rVd1M35wxwqff3JtQX6GaNCHCNOx69th760P rlrD2eVDyATWiXUTB0nNvSDkFJo79z+lIaz+ougkIVMoEarzMzpk4lizbpsyvTIO/Id5 ZqEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fEVGTYk6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g15si7663873edu.137.2019.09.09.02.35.28; Mon, 09 Sep 2019 02:35:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fEVGTYk6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728545AbfIHKkx (ORCPT + 99 others); Sun, 8 Sep 2019 06:40:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:45702 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726263AbfIHKkx (ORCPT ); Sun, 8 Sep 2019 06:40:53 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9361520854; Sun, 8 Sep 2019 10:40:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567939252; bh=Xg4HAGBZs32JUSG1Ob95Zi5NWz8k344jm7bFO/mamM8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=fEVGTYk6h4JcGSou+mYr2a7AuTNlqX1CPgNBmI6/Hti1r5oTna1CKqD2DbhOXU9mg VyvZbWyV/Q0A8YezNXCFA0QADpr3fh3puG10i2NnSuK9k/7SVYPO5Ro4iFwP5NwclC ZzDLlM14eLjjCXbX+s6/opKWzpXUHNX0VW1BgaL4= Date: Sun, 8 Sep 2019 10:35:44 +0100 From: Jonathan Cameron To: Mircea Caprioru Cc: , , , , , , , Subject: Re: [PATCH V4 2/4] iio: adc: ad_sigma_delta: Export ad_sd_calibrate Message-ID: <20190908103544.18568d02@archlinux> In-Reply-To: <20190902130831.23057-2-mircea.caprioru@analog.com> References: <20190902130831.23057-1-mircea.caprioru@analog.com> <20190902130831.23057-2-mircea.caprioru@analog.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2 Sep 2019 16:08:29 +0300 Mircea Caprioru wrote: > This patch exports the ad_sd_calibrate function in order to be able to > call it from outside ad_sigma_delta. > > There are cases where the option to calibrate one channel at a time is > necessary (ex. system calibration for zero scale and full scale). > > Signed-off-by: Mircea Caprioru Applied, Thanks, > --- > Changelog V2: > - no changes here > > Changelog V3: > - no changes here > > Changelog V4: > - no changes here > > drivers/iio/adc/ad_sigma_delta.c | 3 ++- > include/linux/iio/adc/ad_sigma_delta.h | 2 ++ > 2 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c > index 2640b75fb774..8ba90486c787 100644 > --- a/drivers/iio/adc/ad_sigma_delta.c > +++ b/drivers/iio/adc/ad_sigma_delta.c > @@ -205,7 +205,7 @@ int ad_sd_reset(struct ad_sigma_delta *sigma_delta, > } > EXPORT_SYMBOL_GPL(ad_sd_reset); > > -static int ad_sd_calibrate(struct ad_sigma_delta *sigma_delta, > +int ad_sd_calibrate(struct ad_sigma_delta *sigma_delta, > unsigned int mode, unsigned int channel) > { > int ret; > @@ -242,6 +242,7 @@ static int ad_sd_calibrate(struct ad_sigma_delta *sigma_delta, > > return ret; > } > +EXPORT_SYMBOL_GPL(ad_sd_calibrate); > > /** > * ad_sd_calibrate_all() - Performs channel calibration > diff --git a/include/linux/iio/adc/ad_sigma_delta.h b/include/linux/iio/adc/ad_sigma_delta.h > index 7716fa0c9fce..8a4e25a7080c 100644 > --- a/include/linux/iio/adc/ad_sigma_delta.h > +++ b/include/linux/iio/adc/ad_sigma_delta.h > @@ -119,6 +119,8 @@ int ad_sd_reset(struct ad_sigma_delta *sigma_delta, > > int ad_sigma_delta_single_conversion(struct iio_dev *indio_dev, > const struct iio_chan_spec *chan, int *val); > +int ad_sd_calibrate(struct ad_sigma_delta *sigma_delta, > + unsigned int mode, unsigned int channel); > int ad_sd_calibrate_all(struct ad_sigma_delta *sigma_delta, > const struct ad_sd_calib_data *cd, unsigned int n); > int ad_sd_init(struct ad_sigma_delta *sigma_delta, struct iio_dev *indio_dev,