Received: by 10.223.176.5 with SMTP id f5csp1728890wra; Wed, 31 Jan 2018 10:36:39 -0800 (PST) X-Google-Smtp-Source: AH8x226znHypk0InrdJzroI+SiEXILRjFSCG2kPOEArzu9fUmFH02yK7ogpZtBlPHk5GlWg1Asq1 X-Received: by 2002:a17:902:768b:: with SMTP id m11-v6mr28570509pll.50.1517423799643; Wed, 31 Jan 2018 10:36:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517423799; cv=none; d=google.com; s=arc-20160816; b=MC9RNYP6Gnce1aS5LQ8wk0DggT8XZjMYyk4FITVaug0eSdr8wvrva4Ta01bUbEMpAV Ycphvo2McpIOA2tnonSZUpPhjkzeYlc47ZGzUEBESQuVvq0B34egk5qjuYoERfSfSMTa QlppON2rmcbZpe4xKridPyz60RvTOvQSYE90vrLLpKh0B36bHU8B3WshfOAhRC5eb3Sm nVdBob/b8u42ve0U5OSQb3YKUnqBIWOlPCLO0ccgIkjMLa1RbSbAyZVPVVUTE6Q5veX/ d5JiybLW9OeHEuJctpTY6sfzYE/EcNpFFCrFMfUYSCMrVvGGxmbN16hwLlRv1K6H9Op2 vnog== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=yux86oioKKrNvvbIGpX2+NP2IG2ITtYxNkD/AbrD6QM=; b=xAWrjqZXN0YLUW5NwBGJeNby/RtxKONpAmg6jLikqWmOsATTvBTj1N4dMSOjSqNMMA iLVdB1Ip4pWPOn4G2qh4keaiLBddvKAFuRMw5NEYv2tFsMPU83hcZFWsfQHq/kJwitq6 dRvPU7lvOeL01UHWiSUZnM61V08fzzag9MO64nHL1WZQMWFX1cpvlB7V/6qN6vs2OdJ3 Agvg5VDXnVu6np53O1vdvm3fsFtJpjF8Ee7n1Z4msbCX5yGfS5M61lf21t62/5WTQLvL 3m+Hxec8jTioFK5Iu83gzQKtyNnhRH1a48cEwBZ42P8lPE/PcUg1UowJZvySWBloLnMG 10aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=U9qib7+o; 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=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 15-v6si14946870pla.23.2018.01.31.10.36.24; Wed, 31 Jan 2018 10:36:39 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=U9qib7+o; 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=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751586AbeAaSgC (ORCPT + 99 others); Wed, 31 Jan 2018 13:36:02 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:51726 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751163AbeAaSf7 (ORCPT ); Wed, 31 Jan 2018 13:35:59 -0500 Received: by mail-wm0-f65.google.com with SMTP id r71so1030369wmd.1; Wed, 31 Jan 2018 10:35:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=yux86oioKKrNvvbIGpX2+NP2IG2ITtYxNkD/AbrD6QM=; b=U9qib7+oBSi/GNdX2Jf3mSZupFeITErpmVpfF4irPn7Th5fz2p8Gi7FGwcWudh8jhX d+5TIo+Dq95POxuu7usN6l0LUjN4KTIfxQmul42UYR1TWrMsmMgHq3+QeTztDxLrqTqm Z7Byae5drG197oTsyBWfYTeOJDx6ARo/x/wMfk7IaUVc+9gtg9NtYMmgv16wR845qiXq 540yW7MyFaoIau9sd8r8hBbzT2oXe6Yke2Pme6yI908rma9G1GjMVupZ8xufH7nK1Hie iZrh9AypO90oig0T3EWCKxgf1zCxHfUTEEP6HGcjtWfJB5Ky/kDY9V1is8+6AcCFekIi fNsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=yux86oioKKrNvvbIGpX2+NP2IG2ITtYxNkD/AbrD6QM=; b=bN0GMOotUXz4GNlKwxQVFSOBFwKYg9BnWbKIkv7dzm9ROn85UUPrLHoqSUqsg7MZvx NXit9e0+sW8qV3ABlL8h5RuClEWDy0Vt5KyKMaCuaU3qJhMfg4BEpMot7FlhKwy8MKH8 pStpsn8BPW6fF/HsXpYOaWlXgubUBtLVfDbtWqu1T0Iqkpf9hdi0XCJeYjZRYnB74TkL lLCAPlXpCRFrN7EbzCgpn51C5gUONbbvHQLoEpnH+h02y997i7vFRpS6rjaQMHNBXwOe 2vloE/aFEu3HU6Uhm944O8gr1Dpr/gGC81srBbo46nSiCAOdvZWcHg044gDggOzNrGHw kNLg== X-Gm-Message-State: AKwxytcCyE3sKwB+sn9a9Hnh3OA+vjjyuee8kQqZVxRHe6b3GyBc8TFX EcuGPJOmfIvF/75xAqKpgeV5OrV8 X-Received: by 10.28.183.8 with SMTP id h8mr25392814wmf.72.1517423758293; Wed, 31 Jan 2018 10:35:58 -0800 (PST) Received: from [192.168.2.62] (p578F04D2.dip0.t-ipconnect.de. [87.143.4.210]) by smtp.gmail.com with ESMTPSA id r188sm392603wmb.40.2018.01.31.10.35.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Jan 2018 10:35:57 -0800 (PST) Subject: Re: [PATCH v2 04/16] iio: adc: sun4i-gpadc-iio: rework: sampling start/end code readout reg To: Quentin Schulz 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 References: <20180128232919.12639-1-embed3d@gmail.com> <20180128232919.12639-5-embed3d@gmail.com> <20180131175106.agrvwioaruioavqk@qschulz> From: Philipp Rossak Message-ID: <025fc383-8a54-cc22-bdf3-0919b8ca2507@gmail.com> Date: Wed, 31 Jan 2018 19:35:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180131175106.agrvwioaruioavqk@qschulz> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31.01.2018 18:51, Quentin Schulz wrote: > 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. >> >> 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. >> >> 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(-) >> >> diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-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 int chan) >> return SUN6I_GPADC_CTRL1_ADC_CHAN_SELECT(chan); >> } >> >> +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 > Ok I will split this. Thanks, Philipp