From: George Stark <gnstark@salutedevices.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: <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>,
<u.kleine-koenig@pengutronix.de>, <linux-iio@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
<linux-amlogic@lists.infradead.org>, <kernel@salutedevices.com>
Subject: Re: [PATCH v2 1/1] iio: adc: meson: add separate config for axg SoC family
Date: Mon, 27 Nov 2023 22:17:33 +0300 [thread overview]
Message-ID: <ca18c346-94f3-4c4c-a540-57509b879b04@salutedevices.com> (raw)
In-Reply-To: <20231125172508.2a2242bf@jic23-huawei>
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 <gnstark@salutedevices.com> 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 <gnstark@salutedevices.com>
>> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
>
> 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.
>
>> ---
>> 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",
>> };
>>
>
--
Best regards
George
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-11-27 19:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-22 7:47 [PATCH v2 1/1] iio: adc: meson: add separate config for axg SoC family George Stark
2023-11-25 17:25 ` Jonathan Cameron
2023-11-27 19:17 ` George Stark [this message]
2023-12-01 18:08 ` Jonathan Cameron
2023-12-02 0:05 ` George Stark
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ca18c346-94f3-4c4c-a540-57509b879b04@salutedevices.com \
--to=gnstark@salutedevices.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=jbrunet@baylibre.com \
--cc=jic23@kernel.org \
--cc=kernel@salutedevices.com \
--cc=khilman@baylibre.com \
--cc=lars@metafoo.de \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
--cc=nuno.sa@analog.com \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox