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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A1AAEC10F04 for ; Fri, 1 Dec 2023 18:08:57 +0000 (UTC) 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=4vC5u3HO7XGcPDoPoNxhGBSHrSBflWrTNFOOcMQcjWw=; b=mzsAlrwNvKd6JF iPCG51c/dVzzX6wEv4shaI5k31xogNSe2sKUwqTk33dGcACdVEuWjvtlOIpwulXwzNuABk5Qaq7va vOLvfz/OZH6n2tsI5Gc1Z2p4T7nCqQZZBU8dHOXIDk+50yp1Vl+I43JmsMi4OjMzKM2cPUd8wrxSz 3JbxhLHp2mnaF+pW6YW/jwiDcL2IrtEco0WKgxngv4c1ORrWNc1aFd5JQtaxGugxOzFwu8AmWeVTy Sa/PsYRphV/jJ8DJoZQtXu1i5Kho5oDwsZ9AQ5GdPArWtW3FLne8fAJo/jvdW00HBNpTijw1f9ntr oyo2Id00idxQ+AUtj5mg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r97wE-00EOep-1l; Fri, 01 Dec 2023 18:08:30 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r97wA-00EOdZ-2F; Fri, 01 Dec 2023 18:08:29 +0000 Received: from mail.maildlp.com (unknown [172.18.186.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4ShgyW1Yp3z6J9rV; Sat, 2 Dec 2023 02:07:47 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 168131401E0; Sat, 2 Dec 2023 02:08:13 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 1 Dec 2023 18:08:12 +0000 Date: Fri, 1 Dec 2023 18:08:11 +0000 From: Jonathan Cameron To: George Stark CC: Jonathan Cameron , , , , , , , , , , , , , Subject: Re: [PATCH v2 1/1] iio: adc: meson: add separate config for axg SoC family Message-ID: <20231201180811.00002783@Huawei.com> In-Reply-To: References: <20231122074741.154228-1-gnstark@salutedevices.com> <20231125172508.2a2242bf@jic23-huawei> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml100003.china.huawei.com (7.191.160.210) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231201_100827_039846_BD851E4A X-CRM114-Status: GOOD ( 22.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 27 Nov 2023 22:17:33 +0300 George Stark wrote: > Hello Jonathan > > Thanks for the review. > > On 11/25/23 20:25, Jonathan Cameron wrote: > > On Wed, 22 Nov 2023 10:47:41 +0300 > > George Stark wrote: > > > >> According to Amlogic custom kernels ADC of axg SoC family has > >> vref_select and requires this setting to work nominally and thus > >> needs a separate config. > >> > >> Signed-off-by: George Stark > >> Reviewed-by: Neil Armstrong > > > > Is this a fix? If so, please provide a fixes tag. > Actually yes, these changes could be done in the patch that introduced > new configuration parameters. > > > Or is it aligning with the vendor kernels and we don't know if > > it's strictly necessary or not? > I do know it's necessary if we want kernel driver to be independent from > ADC initialization in vendor u-boot code. I have Amlogic a113x device > (axg family) and can provide test results w and w/o this patch. Definitely best to not rely on firmware. So send a Fixes tag for this and I'll apply it as a fix (you get to figure out which patch it fixed :) Jonathan > > > > >> --- > >> drivers/iio/adc/meson_saradc.c | 16 +++++++++++++++- > >> 1 file changed, 15 insertions(+), 1 deletion(-) > >> > >> diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c > >> index db280da9edbf..34555a85f131 100644 > >> --- a/drivers/iio/adc/meson_saradc.c > >> +++ b/drivers/iio/adc/meson_saradc.c > >> @@ -1242,6 +1242,20 @@ static const struct meson_sar_adc_param meson_sar_adc_gxl_param = { > >> .cmv_select = 1, > >> }; > >> > >> +static const struct meson_sar_adc_param meson_sar_adc_axg_param = { > >> + .has_bl30_integration = true, > >> + .clock_rate = 1200000, > >> + .bandgap_reg = MESON_SAR_ADC_REG11, > >> + .regmap_config = &meson_sar_adc_regmap_config_gxbb, > >> + .resolution = 12, > >> + .disable_ring_counter = 1, > >> + .has_reg11 = true, > >> + .vref_volatge = 1, > >> + .has_vref_select = true, > >> + .vref_select = VREF_VDDA, > >> + .cmv_select = 1, > >> +}; > >> + > >> static const struct meson_sar_adc_param meson_sar_adc_g12a_param = { > >> .has_bl30_integration = false, > >> .clock_rate = 1200000, > >> @@ -1286,7 +1300,7 @@ static const struct meson_sar_adc_data meson_sar_adc_gxm_data = { > >> }; > >> > >> static const struct meson_sar_adc_data meson_sar_adc_axg_data = { > >> - .param = &meson_sar_adc_gxl_param, > >> + .param = &meson_sar_adc_axg_param, > >> .name = "meson-axg-saradc", > >> }; > >> > > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel