Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1840621ybl; Sun, 18 Aug 2019 11:41:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxpE5BN7D4RnqOHUW3teQIstYZevil5lviNwhqbZc2zILyjMZEZCY5vU/d7zTgOg3JvSBE X-Received: by 2002:a17:90a:2c9:: with SMTP id d9mr17346152pjd.134.1566153710965; Sun, 18 Aug 2019 11:41:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566153710; cv=none; d=google.com; s=arc-20160816; b=Dcq/hYSnQSnfFxorxewFBUYr4stTc6QYdX4ZDgAcDFAHDWKYCHe4+HKy8f9BklZa4+ LQrBIWNf2ASNTRpLQJVB6r9bnXJiTK7oiW5wlt+55HjaTLC3a8LFPGIfiCLpFVxucEh5 mRr3libIDTHQBCPzdsECiVHoAN0AvgwrpHKf2VGsviXl+gtjww7vU7xoqqRl3lX94lIm CBq2SozMMN1CKDcALdg4o3on+LSsMvuSEoI6ohCxfDeav63xG0r8Tevx8yunIdjGDSQu uKPGtXywVf+Gf/8eB+EqZRyP9kCcpmGLI0neIxe51TIXrCwdHoD7a2A124SDI7h24Ffh ZaeQ== 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=kcXmEVEZx/SzqBBXZ62Xm5JF9g2aTM6Irx3PVgLBljg=; b=MKmHRdRAfM0l4NjVit2PbWLVxLUq/pX/pyugMlVM2nvARnwOrIHrzR7nM0WJj/7B5J YKF/OifZoeJKzLtzYPpSII1IERqFDShIJwN2HeiV378WARafTYauVOGs4Wppk4YoA+07 XV6Pv/GXafgjxVux1ky7zFBWiRMe3V161+MgCCg3clktFouw73X79ugFMopoYXcEqdbm hOopbXzmDBQeQQdjsfWKv4S4TzCRzMjVPScwtupIxrPNxIzMTlejTZhC1bIItWiYr91e v+C3nzHfOPHo3Um5QjcpjM0AWOk1P7X/7FvJNNaIA7rPkOWY93SlhXF1SCeqncfzIUy/ UbtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=17ysbt1D; 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 bg1si7739463plb.210.2019.08.18.11.41.36; Sun, 18 Aug 2019 11:41:50 -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=17ysbt1D; 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 S1727065AbfHRSks (ORCPT + 99 others); Sun, 18 Aug 2019 14:40:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:48904 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726247AbfHRSks (ORCPT ); Sun, 18 Aug 2019 14:40:48 -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 2521820B7C; Sun, 18 Aug 2019 18:40:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566153647; bh=xbKF9nBPTFlOUppqVQ15SfctyUzM/6FbCjJp8GNqP88=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=17ysbt1Dw9AT6Oetc8OwNZg1hrRKA7iM3Q77HVTxCjdrBxd1OJwxIlDuYFiwGm0Jv P5ejNdCz422xRe/tpmoHTB0jdUP4TdhXapVd0/JCz9suOkYOMFmOWr73iXwwWk0XLm V49td6Run7Iehm3PYZU6HTHT05Ahf/afnMFb6GNk= Date: Sun, 18 Aug 2019 19:35:33 +0100 From: Jonathan Cameron To: Mircea Caprioru Cc: , , , , , , , Subject: Re: [PATCH V3 2/4] iio: adc: ad_sigma_delta: Export ad_sd_calibrate Message-ID: <20190818193533.172fd2ef@archlinux> In-Reply-To: <20190814073150.4602-2-mircea.caprioru@analog.com> References: <20190814073150.4602-1-mircea.caprioru@analog.com> <20190814073150.4602-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 Wed, 14 Aug 2019 10:31:48 +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, Jonathan > --- > Changelog V2: > - no changes here > > Changelog V3: > - 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,