[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ea4041b5e5569389a2c5301f41f37340ad25cf.camel@microchip.com>
Date: Wed, 17 Jul 2024 13:02:40 +0000
From: <Marius.Cristea@...rochip.com>
To: <kent@...oris.se>, <jic23@...nel.org>, <marcus.folkesson@...il.com>,
<dlechner@...libre.com>
CC: <lgirdwood@...il.com>, <broonie@...nel.org>,
<linux-kernel@...r.kernel.org>, <linux-iio@...r.kernel.org>
Subject: Re: [PATCH 5/6] iio: adc: mcp3564: use
devm_regulator_get_enable_read_voltage()
Hi David,
Thank you very much for cleaning up the code.
On Fri, 2024-07-12 at 11:03 -0500, David Lechner wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
>
> This makes use of the new devm_regulator_get_enable_read_voltage()
> helper function to reduce boilerplate code in the MCP3564 ADC driver.
>
> The error message is slightly changed since there are fewer error
> return paths.
>
> Setting adc->vref_mv is consolidated into a single place to make the
> logic easier to follow.
>
> A use_auto_zeroing_ref_attr local variable is added to make it more
> obvious what the difference between the two iio info structures is.
>
Can we use another name here, instead of "use_auto_zeroing_ref_attr" to
use something like "use_internal_vref_attr". It could be misleading
because the difference between the two part numbers is related to
having or not having the internal voltage reference. If the part has
voltage reference (with the R at the end) and the user want's to use
it, there is an attribute to enable/disable in hardware the
"auto_zeroing_ref".
> The return value of the "Unknown Vref" dev_err_probe() is hard-coded
> to
> -ENODEV instead of ret since it was getting a bit far from where ret
> was set and logically that is the only value it could have.
>
> Signed-off-by: David Lechner <dlechner@...libre.com>
> ---
Best regards,
Marius
Powered by blists - more mailing lists