mbox series

[0/4] iio: afe/rescale improvements

Message ID 20220721191526.374152-1-paul@crapouillou.net (mailing list archive)
Headers show
Series iio: afe/rescale improvements | expand

Message

Paul Cercueil July 21, 2022, 7:15 p.m. UTC
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(-)