From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BA15C07E98 for ; Sat, 3 Jul 2021 16:57:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8098261930 for ; Sat, 3 Jul 2021 16:57:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229757AbhGCRAH (ORCPT ); Sat, 3 Jul 2021 13:00:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:48250 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229529AbhGCRAH (ORCPT ); Sat, 3 Jul 2021 13:00:07 -0400 Received: from jic23-huawei (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (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 B9A9561627; Sat, 3 Jul 2021 16:57:29 +0000 (UTC) Date: Sat, 3 Jul 2021 17:59:52 +0100 From: Jonathan Cameron To: Simon Xue Cc: linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, robh+dt@kernel.org, Johan Jonker , Heiko Stuebner , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org Subject: Re: [PATCH 2/2] iio: adc: rockchip_saradc: add support for rk3568 saradc Message-ID: <20210703175952.238e6218@jic23-huawei> In-Reply-To: <20210702021527.146343-1-xxm@rock-chips.com> References: <20210702021403.146293-1-xxm@rock-chips.com> <20210702021527.146343-1-xxm@rock-chips.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Fri, 2 Jul 2021 10:15:27 +0800 Simon Xue wrote: A small amount of info on the device is always useful in a commit like this. Here, perhaps you could call out that it is similar to some other device, but with 8 channels? Otherwise, looks good to me. DT patch is fine as well. I'll let them sit a little longer though to give others time to comment. The dtsi change requested by Johan goes via a different tree anyway so doesn't need to be part of this series. Jonathan > Signed-off-by: Simon Xue > --- > drivers/iio/adc/rockchip_saradc.c | 22 +++++++++++++++++++++- > 1 file changed, 21 insertions(+), 1 deletion(-) > > diff --git a/drivers/iio/adc/rockchip_saradc.c b/drivers/iio/adc/rockchip_saradc.c > index 12584f1631d8..f3eb8d2e50dc 100644 > --- a/drivers/iio/adc/rockchip_saradc.c > +++ b/drivers/iio/adc/rockchip_saradc.c > @@ -35,7 +35,7 @@ > #define SARADC_DLY_PU_SOC_MASK 0x3f > > #define SARADC_TIMEOUT msecs_to_jiffies(100) > -#define SARADC_MAX_CHANNELS 6 > +#define SARADC_MAX_CHANNELS 8 > > struct rockchip_saradc_data { > const struct iio_chan_spec *channels; > @@ -192,6 +192,23 @@ static const struct rockchip_saradc_data rk3399_saradc_data = { > .clk_rate = 1000000, > }; > > +static const struct iio_chan_spec rockchip_rk3568_saradc_iio_channels[] = { > + SARADC_CHANNEL(0, "adc0", 10), > + SARADC_CHANNEL(1, "adc1", 10), > + SARADC_CHANNEL(2, "adc2", 10), > + SARADC_CHANNEL(3, "adc3", 10), > + SARADC_CHANNEL(4, "adc4", 10), > + SARADC_CHANNEL(5, "adc5", 10), > + SARADC_CHANNEL(6, "adc6", 10), > + SARADC_CHANNEL(7, "adc7", 10), > +}; > + > +static const struct rockchip_saradc_data rk3568_saradc_data = { > + .channels = rockchip_rk3568_saradc_iio_channels, > + .num_channels = ARRAY_SIZE(rockchip_rk3568_saradc_iio_channels), > + .clk_rate = 1000000, > +}; > + > static const struct of_device_id rockchip_saradc_match[] = { > { > .compatible = "rockchip,saradc", > @@ -202,6 +219,9 @@ static const struct of_device_id rockchip_saradc_match[] = { > }, { > .compatible = "rockchip,rk3399-saradc", > .data = &rk3399_saradc_data, > + }, { > + .compatible = "rockchip,rk3568-saradc", > + .data = &rk3568_saradc_data, > }, > {}, > }; From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06568C07E97 for ; Sat, 3 Jul 2021 16:57:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BC8D861930 for ; Sat, 3 Jul 2021 16:57:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BC8D861930 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YhUpvmDZ/AVNF9Fnz5hgN/r+1i1oCvkLovYzVNiHPd0=; b=ZvKYt1RfMqgFj4 w1qaBD7CU1EZRDmi3Th/O0imSnwcKyndGFpVWdaq7y1C7zbrJkwjy/BANTc/GYywuKJIUH70F2EWX xX1T/b5qnLx/gVj0NfM8HtwNmL4Fq5Kg0+EGROV/sInQqnjiRxxnoVpIgJHpsRd1UG5Wj4q9cUiui YNL9BpVhR1hxttbb86/0HqVbBxdqSGadLmJqn29keUC4WL89+p6j6M07uinXAzNt5GgDtQhobk1EW xM2fdJ6s48fjg8OP20VQw/UyZSxZ8jWU6rNy1ufFDoqrqeTxfZPH9TPslRbIgO+evvdcSNoT18WCa r/Pf4bCZdT32UlMemA3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lzixU-005999-3P; Sat, 03 Jul 2021 16:57:36 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lzixR-00598m-P3 for linux-rockchip@lists.infradead.org; Sat, 03 Jul 2021 16:57:35 +0000 Received: from jic23-huawei (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (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 B9A9561627; Sat, 3 Jul 2021 16:57:29 +0000 (UTC) Date: Sat, 3 Jul 2021 17:59:52 +0100 From: Jonathan Cameron To: Simon Xue Cc: linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, robh+dt@kernel.org, Johan Jonker , Heiko Stuebner , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org Subject: Re: [PATCH 2/2] iio: adc: rockchip_saradc: add support for rk3568 saradc Message-ID: <20210703175952.238e6218@jic23-huawei> In-Reply-To: <20210702021527.146343-1-xxm@rock-chips.com> References: <20210702021403.146293-1-xxm@rock-chips.com> <20210702021527.146343-1-xxm@rock-chips.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210703_095733_887084_C4FBF03D X-CRM114-Status: GOOD ( 19.89 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org On Fri, 2 Jul 2021 10:15:27 +0800 Simon Xue wrote: A small amount of info on the device is always useful in a commit like this. Here, perhaps you could call out that it is similar to some other device, but with 8 channels? Otherwise, looks good to me. DT patch is fine as well. I'll let them sit a little longer though to give others time to comment. The dtsi change requested by Johan goes via a different tree anyway so doesn't need to be part of this series. Jonathan > Signed-off-by: Simon Xue > --- > drivers/iio/adc/rockchip_saradc.c | 22 +++++++++++++++++++++- > 1 file changed, 21 insertions(+), 1 deletion(-) > > diff --git a/drivers/iio/adc/rockchip_saradc.c b/drivers/iio/adc/rockchip_saradc.c > index 12584f1631d8..f3eb8d2e50dc 100644 > --- a/drivers/iio/adc/rockchip_saradc.c > +++ b/drivers/iio/adc/rockchip_saradc.c > @@ -35,7 +35,7 @@ > #define SARADC_DLY_PU_SOC_MASK 0x3f > > #define SARADC_TIMEOUT msecs_to_jiffies(100) > -#define SARADC_MAX_CHANNELS 6 > +#define SARADC_MAX_CHANNELS 8 > > struct rockchip_saradc_data { > const struct iio_chan_spec *channels; > @@ -192,6 +192,23 @@ static const struct rockchip_saradc_data rk3399_saradc_data = { > .clk_rate = 1000000, > }; > > +static const struct iio_chan_spec rockchip_rk3568_saradc_iio_channels[] = { > + SARADC_CHANNEL(0, "adc0", 10), > + SARADC_CHANNEL(1, "adc1", 10), > + SARADC_CHANNEL(2, "adc2", 10), > + SARADC_CHANNEL(3, "adc3", 10), > + SARADC_CHANNEL(4, "adc4", 10), > + SARADC_CHANNEL(5, "adc5", 10), > + SARADC_CHANNEL(6, "adc6", 10), > + SARADC_CHANNEL(7, "adc7", 10), > +}; > + > +static const struct rockchip_saradc_data rk3568_saradc_data = { > + .channels = rockchip_rk3568_saradc_iio_channels, > + .num_channels = ARRAY_SIZE(rockchip_rk3568_saradc_iio_channels), > + .clk_rate = 1000000, > +}; > + > static const struct of_device_id rockchip_saradc_match[] = { > { > .compatible = "rockchip,saradc", > @@ -202,6 +219,9 @@ static const struct of_device_id rockchip_saradc_match[] = { > }, { > .compatible = "rockchip,rk3399-saradc", > .data = &rk3399_saradc_data, > + }, { > + .compatible = "rockchip,rk3568-saradc", > + .data = &rk3568_saradc_data, > }, > {}, > }; _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip