Message ID | 20230606165357.42417-1-gnstark@sberdevices.ru |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3562348vqr; Tue, 6 Jun 2023 10:35:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ68PuJ34VEejNkH8nTK+jwBfMsMWUhI57aI+X17dqDFqwRzlwyY2nGbKsmu6czNZQb7rJbb X-Received: by 2002:a17:902:a710:b0:1b0:1d7b:ed33 with SMTP id w16-20020a170902a71000b001b01d7bed33mr2066494plq.69.1686072919879; Tue, 06 Jun 2023 10:35:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686072919; cv=none; d=google.com; s=arc-20160816; b=PrMIrKxrpm6oPtXOpKK8u/ac3Vzys4L2JP3fzcT0cqBB7iQZRywEJfi0XjEVcsnKi3 EitAK5r9zY4n0ou+JzrR1R5HGh7awGk2JKVKdBB2PTyZ8dURSiJy2fPK7KmWwVxmQnMf jVHJDqifv3pZ9jwymsJmMPWMlrgmpit/KQNe9P8J9Lu6RZNw8l9ndaYcoDZlQ037oUE7 +1sk7jgzt8vnkYrT/Z29NZ5nUuTQfa6KEaYeRQ8+WOdrxGjdfh/u45L+VkB8ceQVOQf0 SxKQBHT5lsx1l9ZJJk6qmykaLLpzkvGYbDPAWfVvFkjewD/dUAVx4PWiA7X+mjFekxb6 H3gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Z3E+qqaUAGaWeT5IbR6dVGiBQMvs+bk43lDEXzhVAAM=; b=KnQeCqUpHAze4zEWYyfdWXKz4iGsYWuYPOr1IzJVpdwCA1Npp3rzF7O1MkHey0zP21 CFLqXHAPBs3HiNe+ad/jYsWcb2xBo4GioAPp4i5nAG0bhHVobNZYV6aYcOL35OUvXylX +QBSdP52ybNidPzOVPjqF/W2iD32zKahXSXN4r8HcpWopJOWqTV/HJSdjahXEfqy3uYd mq1zW/lzWUW6irDAd21x8EuH9tQVRXN0isnn4rdulicZboNTxAprFEwpVUmZt/UNUOjI IV/5hcD9iZbRhJ6kYXXruohmgQ/tRKhG57s09OSKiXe9xXk95qyfaqgW3Ugc2e6590kv QCIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=fgwjx5hW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e21-20020a170902d39500b001a9baadecc0si7271371pld.160.2023.06.06.10.35.07; Tue, 06 Jun 2023 10:35:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=fgwjx5hW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238253AbjFFQzH (ORCPT <rfc822;xxoosimple@gmail.com> + 99 others); Tue, 6 Jun 2023 12:55:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238386AbjFFQyu (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 6 Jun 2023 12:54:50 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 900E610F7; Tue, 6 Jun 2023 09:54:46 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 896615FD54; Tue, 6 Jun 2023 19:54:44 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1686070484; bh=Z3E+qqaUAGaWeT5IbR6dVGiBQMvs+bk43lDEXzhVAAM=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=fgwjx5hWc0N6KD5F2kmUMsEI66q9ktsm4bEQsZ+iks1z7gfXBQG2tNEnz1Pq8KI78 1Pn2/Q9VxsdRutm+UetCUiAHpBYdE8xOT2DdqzQncNCn+oIHBOvT+zPxuyMOMgrFKP 5yEyxKWOLB3uC6ADDK8eW+atxanhPzx96iMfStYjJd5U64zQ7gADzrfEZSjNmiRhfm 181PB9c3UsYX1wiIXYJ/E8iYowHM66h9QxyfpPpYK9zQaS/VBVumepUU9/nJrj5vGi zPtKSyUSHf3PvOKDfgGMHOVjivk67q1cWKg+ANHSbdMzdFvpfeVgYQQp4ueFKaM7Wr B/ZODUZrKU07g== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Tue, 6 Jun 2023 19:54:42 +0300 (MSK) From: George Stark <gnstark@sberdevices.ru> To: <jic23@kernel.org>, <lars@metafoo.de>, <neil.armstrong@linaro.org>, <khilman@baylibre.com>, <jbrunet@baylibre.com>, <martin.blumenstingl@googlemail.com>, <andriy.shevchenko@linux.intel.com>, <nuno.sa@analog.com>, <gnstark@sberdevices.ru> CC: <linux-iio@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <linux-amlogic@lists.infradead.org>, <kernel@sberdevices.ru>, George Stark <GNStark@sberdevices.ru> Subject: [PATCH v3] meson saradc: fix clock divider mask length Date: Tue, 6 Jun 2023 19:53:57 +0300 Message-ID: <20230606165357.42417-1-gnstark@sberdevices.ru> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH01.sberdevices.ru (172.16.1.4) To S-MS-EXCH01.sberdevices.ru (172.16.1.4) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/06/06 14:43:00 #21444531 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767975597812063620?= X-GMAIL-MSGID: =?utf-8?q?1767975597812063620?= |
Series |
[v3] meson saradc: fix clock divider mask length
|
|
Commit Message
George Stark
June 6, 2023, 4:53 p.m. UTC
According to datasheets of supported meson SOCs length of ADC_CLK_DIV
field is 6 bits long. Although all supported SOCs have the register
with that field documented later SOCs use external clock rather than
ADC internal clock so this patch affects only meson8 family (S8* SOCs)
Fixes: 3adbf3427330 ("iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs")
Signed-off-by: George Stark <GNStark@sberdevices.ru>
---
Changelog:
v1 -> v2:
* Update commit message
v2 -> v3:
* Update commit message
---
drivers/iio/adc/meson_saradc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Thank you George! On Tue, Jun 6, 2023 at 6:54 PM George Stark <gnstark@sberdevices.ru> wrote: > > According to datasheets of supported meson SOCs length of ADC_CLK_DIV > field is 6 bits long. Although all supported SOCs have the register > with that field documented later SOCs use external clock rather than > ADC internal clock so this patch affects only meson8 family (S8* SOCs) > > Fixes: 3adbf3427330 ("iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs") > Signed-off-by: George Stark <GNStark@sberdevices.ru> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Tue, Jun 06, 2023 at 07:53:57PM +0300, George Stark kirjoitti: > According to datasheets of supported meson SOCs length of ADC_CLK_DIV the datasheets > field is 6 bits long. Although all supported SOCs have the register 6-bit > with that field documented later SOCs use external clock rather than > ADC internal clock so this patch affects only meson8 family (S8* SOCs) s/SOC/SoC/g, and mind the grammar period at the end. I believe Jonathan can fix when applying this, no need to resend unless he asks for it. FWIW, Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> > Fixes: 3adbf3427330 ("iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs") > Signed-off-by: George Stark <GNStark@sberdevices.ru> > --- > Changelog: > > v1 -> v2: > * Update commit message > v2 -> v3: > * Update commit message > --- > drivers/iio/adc/meson_saradc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c > index 85b6826cc10c..b93ff42b8c19 100644 > --- a/drivers/iio/adc/meson_saradc.c > +++ b/drivers/iio/adc/meson_saradc.c > @@ -72,7 +72,7 @@ > #define MESON_SAR_ADC_REG3_PANEL_DETECT_COUNT_MASK GENMASK(20, 18) > #define MESON_SAR_ADC_REG3_PANEL_DETECT_FILTER_TB_MASK GENMASK(17, 16) > #define MESON_SAR_ADC_REG3_ADC_CLK_DIV_SHIFT 10 > - #define MESON_SAR_ADC_REG3_ADC_CLK_DIV_WIDTH 5 > + #define MESON_SAR_ADC_REG3_ADC_CLK_DIV_WIDTH 6 > #define MESON_SAR_ADC_REG3_BLOCK_DLY_SEL_MASK GENMASK(9, 8) > #define MESON_SAR_ADC_REG3_BLOCK_DLY_MASK GENMASK(7, 0) > > -- > 2.38.4 >
On Wed, 7 Jun 2023 01:52:26 +0300 andy.shevchenko@gmail.com wrote: > Tue, Jun 06, 2023 at 07:53:57PM +0300, George Stark kirjoitti: > > According to datasheets of supported meson SOCs length of ADC_CLK_DIV > > the datasheets > > > field is 6 bits long. Although all supported SOCs have the register > > 6-bit > > > with that field documented later SOCs use external clock rather than > > ADC internal clock so this patch affects only meson8 family (S8* SOCs) > > s/SOC/SoC/g, and mind the grammar period at the end. > > I believe Jonathan can fix when applying this, no need to resend unless > he asks for it. > Indeed - done and applied to the fixes-togreg branch of iio.git + marked it for stable inclusion. Thanks, Jonathan > FWIW, > Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> > > > Fixes: 3adbf3427330 ("iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs") > > Signed-off-by: George Stark <GNStark@sberdevices.ru> > > --- > > Changelog: > > > > v1 -> v2: > > * Update commit message > > v2 -> v3: > > * Update commit message > > --- > > drivers/iio/adc/meson_saradc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c > > index 85b6826cc10c..b93ff42b8c19 100644 > > --- a/drivers/iio/adc/meson_saradc.c > > +++ b/drivers/iio/adc/meson_saradc.c > > @@ -72,7 +72,7 @@ > > #define MESON_SAR_ADC_REG3_PANEL_DETECT_COUNT_MASK GENMASK(20, 18) > > #define MESON_SAR_ADC_REG3_PANEL_DETECT_FILTER_TB_MASK GENMASK(17, 16) > > #define MESON_SAR_ADC_REG3_ADC_CLK_DIV_SHIFT 10 > > - #define MESON_SAR_ADC_REG3_ADC_CLK_DIV_WIDTH 5 > > + #define MESON_SAR_ADC_REG3_ADC_CLK_DIV_WIDTH 6 > > #define MESON_SAR_ADC_REG3_BLOCK_DLY_SEL_MASK GENMASK(9, 8) > > #define MESON_SAR_ADC_REG3_BLOCK_DLY_MASK GENMASK(7, 0) > > > > -- > > 2.38.4 > > >
diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c index 85b6826cc10c..b93ff42b8c19 100644 --- a/drivers/iio/adc/meson_saradc.c +++ b/drivers/iio/adc/meson_saradc.c @@ -72,7 +72,7 @@ #define MESON_SAR_ADC_REG3_PANEL_DETECT_COUNT_MASK GENMASK(20, 18) #define MESON_SAR_ADC_REG3_PANEL_DETECT_FILTER_TB_MASK GENMASK(17, 16) #define MESON_SAR_ADC_REG3_ADC_CLK_DIV_SHIFT 10 - #define MESON_SAR_ADC_REG3_ADC_CLK_DIV_WIDTH 5 + #define MESON_SAR_ADC_REG3_ADC_CLK_DIV_WIDTH 6 #define MESON_SAR_ADC_REG3_BLOCK_DLY_SEL_MASK GENMASK(9, 8) #define MESON_SAR_ADC_REG3_BLOCK_DLY_MASK GENMASK(7, 0)