[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250801121231.0000298d@huawei.com>
Date: Fri, 1 Aug 2025 12:12:31 +0100
From: Jonathan Cameron <Jonathan.Cameron@...wei.com>
To: Matti Vaittinen <mazziesaccount@...il.com>
CC: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>, Lars-Peter Clausen
<lars@...afoo.de>, Michael Hennerich <Michael.Hennerich@...log.com>, Jonathan
Cameron <jic23@...nel.org>, David Lechner <dlechner@...libre.com>, Nuno
Sá <nuno.sa@...log.com>, Andy Shevchenko
<andy@...nel.org>, Liam Girdwood <lgirdwood@...il.com>, Mark Brown
<broonie@...nel.org>, <linux-iio@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH 2/2] iio: adc: ad7476: Simplify scale handling
On Fri, 1 Aug 2025 13:07:39 +0300
Matti Vaittinen <mazziesaccount@...il.com> wrote:
> The ad7476 driver supports variants with different amount of supply
> regulators. On some variants there is only VCC, which is used as a
> reference voltage. Others have separate VREF regulator, and some rely on
> internal VREF. Some have both internal VREF and option to connect
> external one.
>
> The ad7476 driver reads the regulator voltage only when the user asks to
> get the scale. This means the driver needs to do some dancing while
> picking the correct reference regulator (or internal reference), and
> store it for the later use.
>
> According to the discussion:
> https://lore.kernel.org/linux-iio/20250331122247.05c6b09d@jic23-huawei/
> variable voltage references are rare, making it hard to justify the
> added complexity for supporting those.
>
> Drop the support for the variable voltage references and simplify things
> by using the managed regulator get and enable interfaces.
>
> Signed-off-by: Matti Vaittinen <mazziesaccount@...il.com>
So there is risk of regression in doing this to an existing driver.
I'm not that worried about it because as you note, we almost never
see variable reference voltages. So this is the whole, if no one notices
it's not a regression exception to Linus' rules on regressions.
Looks good to me.
Jonathan
Powered by blists - more mailing lists