[PATCH 0/4] iio: afe/rescale improvements

From: Paul Cercueil
Date: Thu Jul 21 2022 - 15:16:29 EST


Hi Jonathan,

This patchset adds support for converting the "scale avail" list that
may be provided by the source drivers. It also implements the
.write_raw() callback.

These two features will later be used by the
(drivers/power/supply/ingenic-battery.c) driver, which will pick the
best scale possible for the battery's max voltage (it's already
implemented in there, but doesn't yet support iio-rescale being in the
middle).

As you suggested after my RFC I added support for a new
IIO_AVAIL_LIST_WITH_TYPE and it's been a perfect solution, so thank you
for that.

Cheers,
-Paul

Paul Cercueil (4):
iio: inkern: Remove useless argument to iio_channel_read_max()
iio: core: Add support for IIO_AVAIL_LIST_WITH_TYPE
iio: afe/rescale: Add support for converting scale avail table
iio: afe/rescale: Implement write_raw

drivers/iio/afe/iio-rescale.c | 107 ++++++++++++++++++++++++++++++++
drivers/iio/industrialio-core.c | 25 ++++++++
drivers/iio/inkern.c | 35 +++++++++--
include/linux/iio/afe/rescale.h | 2 +
include/linux/iio/consumer.h | 6 +-
include/linux/iio/types.h | 1 +
6 files changed, 168 insertions(+), 8 deletions(-)

--
2.35.1