iio: afe: iio-rescale: Support processed channels
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 18 May 2021 09:27:41 +0000 (11:27 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 3 Jun 2021 17:24:13 +0000 (18:24 +0100)
commit53ebee9499805add3eef630d998c40812e6a1c39
tree65d3fa5261e337f980c51a1953d9459606c99afc
parent842b17223fcd0574e8875599ad411c0b8ea895f5
iio: afe: iio-rescale: Support processed channels

It happens that an ADC will only provide raw or processed
voltage conversion channels. (adc/ab8500-gpadc.c).
On the Samsung GT-I9070 this is used for a light sensor
and current sense amplifier so we need to think of something.

The idea is to allow processed channels and scale them
with 1/1 and then the rescaler can modify the result
on top.

Link: https://lore.kernel.org/linux-iio/20201101232211.1194304-1-linus.walleij@linaro.org/
Cc: Peter Rosin <peda@axentia.se>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Peter Rosin <peda@axentia.se>
Link: https://lore.kernel.org/r/20210518092741.403080-1-linus.walleij@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/afe/iio-rescale.c