iio: afe: rescale: new driver
authorPeter Rosin <peda@axentia.se>
Mon, 23 Apr 2018 21:08:09 +0000 (23:08 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 28 Apr 2018 17:03:22 +0000 (18:03 +0100)
commit8b74816b5a9adac4629f0f072c122d57b8f0eb78
tree2dc24a76aae89c9b1d543fb8c63917bb4b82704a
parent2e9a128f359c1baa8f0fbfdb95a1b40f84244801
iio: afe: rescale: new driver

If an ADC channel measures the midpoint of a voltage divider, the
interesting voltage is often the voltage over the full resistance.
E.g. if the full voltage is too big for the ADC to handle.
Likewise, if an ADC channel measures the voltage across a shunt
resistor, with or without amplification, the interesting value is
often the current through the resistor.

This driver solves these problems by allowing to linearly scale a channel
and/or by allowing changes to the type of the channel.

Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
MAINTAINERS
drivers/iio/Kconfig
drivers/iio/Makefile
drivers/iio/afe/Kconfig [new file with mode: 0644]
drivers/iio/afe/Makefile [new file with mode: 0644]
drivers/iio/afe/iio-rescale.c [new file with mode: 0644]