Received: by 10.223.176.5 with SMTP id f5csp1690386wra; Wed, 31 Jan 2018 10:03:32 -0800 (PST) X-Google-Smtp-Source: AH8x227Dyj/+kZtdFl2W3KX6UEcRb62gs+3at3tiIRQyNLdNOz1XL8Ec5egMn9viDO/lX0DzVmZ9 X-Received: by 10.99.146.86 with SMTP id s22mr26746072pgn.209.1517421812803; Wed, 31 Jan 2018 10:03:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517421812; cv=none; d=google.com; s=arc-20160816; b=NdkuWsI10/ZPThYUsOQ2tfnAoOZMDAgIWQfGi2JbW1y3KN4uqAuOLZE5iwWOoHA4zq sumUujV7LJNV4sK4wugXTZCwQC6/C4+jK/gVfhhUsPFtGipd/DkVWgdTJMDzM4E0I/JM 9CcpOs37ByQeAWciNaALhHdobkKuEIOxPvpTgs2IT48DQL5Wa0uVodazkYzK0dEwLuR0 R7EhbklHJnReIldvdy8YWNsFsS2LAmdF6H2NvRi6hKb1wwi07VNhZAfuBC4SeO3r3uJo rFhSb32Oa6wxRpDNwl1ksI13yAbZTO5O7oeX4+afWGXN1h71R1b4NP6pjEvYl326OwNG MLNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=MqAg12nMtggK6xCJeBCct5zBJZdhUe/IxgT8KCUl/fE=; b=pJu7DdJsy4TSo3LW9O+100HP05FEnwKrvm7YasuepSOMvYaIG85r1KI937f6FV1x3O Ll9RtfBcWYlIGzP9zLS98ycVW+AmWs9q+CdrBz2YrRhEa+5KkecRHwNhiwqV8XZ5jcs4 5W0kDOPGA7EXAyBGzBd9ko8GtRnXPfWqSEKUBhZKrOL7nqxPip3wTWFmR0EGuGxAgmcX FtkF8O++0Vb4syuFZLtcJBwCz5Fj9lmU1Wb0Rqk+CUom1MrgwtN35rei7M78ga1QM3g3 t6VLoyCSSbM0cOnsPLS9jsTXOwVkCSeSPo/XwLIAKdUJcPNcsSwLXF4ltr9VTxoSnnDQ x8iQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u14si4626950pgo.695.2018.01.31.10.03.17; Wed, 31 Jan 2018 10:03:32 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932315AbeAaRvM (ORCPT + 99 others); Wed, 31 Jan 2018 12:51:12 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:53057 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753112AbeAaRvK (ORCPT ); Wed, 31 Jan 2018 12:51:10 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id 6AA8F21A4D; Wed, 31 Jan 2018 18:51:08 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from qschulz (LFbn-1-10566-52.w90-89.abo.wanadoo.fr [90.89.160.52]) by mail.free-electrons.com (Postfix) with ESMTPSA id C7F0221A4B; Wed, 31 Jan 2018 18:51:07 +0100 (CET) Date: Wed, 31 Jan 2018 18:51:06 +0100 From: Quentin Schulz To: Philipp Rossak Cc: lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, maxime.ripard@free-electrons.com, wens@csie.org, linux@armlinux.org.uk, jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, davem@davemloft.net, hans.verkuil@cisco.com, mchehab@kernel.org, rask@formelder.dk, clabbe.montjoie@gmail.com, sean@mess.org, krzk@kernel.org, icenowy@aosc.io, edu.molinas@gmail.com, singhalsimran0@gmail.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [PATCH v2 04/16] iio: adc: sun4i-gpadc-iio: rework: sampling start/end code readout reg Message-ID: <20180131175106.agrvwioaruioavqk@qschulz> References: <20180128232919.12639-1-embed3d@gmail.com> <20180128232919.12639-5-embed3d@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cjyxari4p6sh2f7e" Content-Disposition: inline In-Reply-To: <20180128232919.12639-5-embed3d@gmail.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --cjyxari4p6sh2f7e Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Philipp, On Mon, Jan 29, 2018 at 12:29:07AM +0100, Philipp Rossak wrote: > For adding newer sensor some basic rework of the code is necessary. >=20 > This commit reworks the code and allows the sampling start/end code and > the position of value readout register to be altered. Later the start/end > functions will be used to configure the ths and start/stop the > sampling. >=20 > Signed-off-by: Icenowy Zheng > Signed-off-by: Philipp Rossak > --- > drivers/iio/adc/sun4i-gpadc-iio.c | 44 +++++++++++++++++++++++++++++++++= +----- > 1 file changed, 39 insertions(+), 5 deletions(-) >=20 > diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gp= adc-iio.c > index 03804ff9c006..db57d9fffe48 100644 > --- a/drivers/iio/adc/sun4i-gpadc-iio.c > +++ b/drivers/iio/adc/sun4i-gpadc-iio.c > @@ -49,6 +49,15 @@ static unsigned int sun6i_gpadc_chan_select(unsigned i= nt chan) > return SUN6I_GPADC_CTRL1_ADC_CHAN_SELECT(chan); > } > =20 > +struct sun4i_gpadc_iio; > + > +/* > + * Prototypes for these functions, which enable these functions to be > + * referenced in gpadc_data structures. > + */ Comment not needed. > +static int sun4i_gpadc_sample_start(struct sun4i_gpadc_iio *info); > +static int sun4i_gpadc_sample_end(struct sun4i_gpadc_iio *info); > + > struct gpadc_data { > int temp_offset; > int temp_scale; > @@ -56,6 +65,9 @@ struct gpadc_data { > unsigned int tp_adc_select; > unsigned int (*adc_chan_select)(unsigned int chan); > unsigned int adc_chan_mask; > + unsigned int temp_data; Does not really have anything to do with sample_start/end. I would have made a different commit for it. Otherwise, Reviewed-by: Quentin Schulz Quentin --cjyxari4p6sh2f7e Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAABCAAGBQJacgIHAAoJEIS4mnU+4PGjPToQAImlXWgWDfZ7cayr5+jvTa8K TF6aHRbAeVrYWFeuougtp3Tn9+JjevEWjNPk5u7rh1RvHqS2ElyGhbWmU2pGOUU+ SL+off7E4dqyc+QkBbnEResZRlbqEa6LuP/3itxj73DANKhwM9sClh4lamFXh1BW COBuhVhRfchnytxrP+kbNeYaXk3sxs3mXAu2qjFTOhtT/c7lD35743oaa6wDOjI2 K60F7NTSgn1UfeGtGS1GxNHE74+IEa1HuBkKvpnsoXYZxs8XVe16p76G6o0flax1 e/shccmNP9c1Z8Uul5C70KGXOl6yTwdJcEbhwRuMyy/uUhedKc+2NXZewBvOVfmf eCG1Jt/o9wBeR2yDyInEwtAuee1629c3texMknhOZpGB/V7fBK0haUWvQll4hFgx /rWXtYYMwRilaP4nQ4UuQp8KdwV8qQmZp685CZVRWFhhIa5+d04G+SrM4lLpO9sy YdOCtc3EWZ3E1c/9omu+g06eH8lyO1AjgZsuYbmfDYTusPNnVT+Hwa1j82VRC60E pxx795vGyoyIDhjb16tNYsO4AqMrZleegTXirjM8imYihJmL/epscrIZPlOgGR8r JluW3NbTW+UyA/KUe8G8C9YpjMdSjczjJZdmH5Qoae7gSIppNOrm0qLGWDsOatex nlyBn9LhgFJCvoLT4jF8 =CT+v -----END PGP SIGNATURE----- --cjyxari4p6sh2f7e--