Re: [PATCH v3] iio: adc: ti-ads8688: use read_avail for available attributes
From: Jonathan Cameron
Date: Sun Apr 12 2026 - 15:14:47 EST
On Tue, 31 Mar 2026 10:56:11 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:
> On Mon, Mar 30, 2026 at 07:15:27PM +0100, grondon@xxxxxxxxx wrote:
>
> > Convert the in_voltage_scale_available and in_voltage_offset_available
> > attributes from legacy IIO_DEVICE_ATTR with custom show functions to the
> > IIO framework's read_avail callback. This uses the framework's built-in
> > support for _available attributes, removing the need for manual sysfs
> > formatting.
> >
> > Precompute the available scale values at probe time since they depend on
> > the reference voltage which does not change after initialization.
>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
>
> (Still BIT_Ux() may be used to avoid overflow warnings.)
>
I'm fine with it as is and I'll assume Andy isn't that fussed
given his tag. So applied to the testing branch of iio.git.
Thanks
Jonathan
>