From patchwork Mon May 15 21:05:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Stark X-Patchwork-Id: 13242258 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66091C77B7D for ; Mon, 15 May 2023 21:06:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245466AbjEOVGp (ORCPT ); Mon, 15 May 2023 17:06:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245483AbjEOVGk (ORCPT ); Mon, 15 May 2023 17:06:40 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8CA812E88; Mon, 15 May 2023 14:06:11 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 624C75FD1F; Tue, 16 May 2023 00:06:08 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1684184768; bh=qNExD4cQVfgTPKIe0gFBsDPUw9gYWD9Zk/g1cOXZaFk=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=I5ov/cXhqYiL1J8zNnOI/6TNi2wc/Nd7IKNzZTfbBDZkVIFgBPwqWrGWeXQ0wpuI/ SoEpM3sYnGbE+oguu3pssXaN9y4J3JYwE8heN6pRLl6AmSJD48sHXugKvPk3AX7Uyx LvNsR0EXS8Ro9lMIlCi6CgJrA07AvNXMKm9d8DLzMTQdmm1PXsJLvc1Lx1C/h1MQSm vp3i/637DlXl5rvowVo0Oy2w5JK8g+2OvswRdJ0uPJOLwgunxySInidRMKzVzkhfg7 W9VaCIq4vLk7Ke+hTfrlnyRgjaO9MqCHWjid+w+fmpPWThOZv0T5XPXco+jjq1HWCX U1D8ATr8iTL9Q== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Tue, 16 May 2023 00:06:06 +0300 (MSK) From: George Stark To: , , , , , , , CC: , , , , , Subject: [PATCH v1] meson saradc: fix clock divider mask length Date: Tue, 16 May 2023 00:05:45 +0300 Message-ID: <20230515210545.2100161-1-gnstark@sberdevices.ru> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH02.sberdevices.ru (172.16.1.5) 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/05/15 16:03:00 #21311645 X-KSMG-AntiVirus-Status: Clean, skipped Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: George Stark According to datasheets of supported meson SOCs length of ADC_CLK_DIV field is 6 bits long Fixes: 3adbf3427330 ("iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs") Signed-off-by: George Stark Reviewed-by: Neil Armstrong Reviewed-by: Martin Blumenstingl --- 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)