Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b74816b authored by Peter Rosin's avatar Peter Rosin Committed by Jonathan Cameron
Browse files

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: default avatarPeter Rosin <peda@axentia.se>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 2e9a128f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -6905,6 +6905,7 @@ S: Maintained
F:	Documentation/devicetree/bindings/iio/afe/current-sense-amplifier.txt
F:	Documentation/devicetree/bindings/iio/afe/current-sense-shunt.txt
F:	Documentation/devicetree/bindings/iio/afe/voltage-divider.txt
F:	drivers/iio/afe/iio-rescale.c

IKANOS/ADI EAGLE ADSL USB DRIVER
M:	Matthieu Castet <castet.matthieu@free.fr>
+1 −0
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@ config IIO_TRIGGERED_EVENT

source "drivers/iio/accel/Kconfig"
source "drivers/iio/adc/Kconfig"
source "drivers/iio/afe/Kconfig"
source "drivers/iio/amplifiers/Kconfig"
source "drivers/iio/chemical/Kconfig"
source "drivers/iio/common/Kconfig"
+1 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@ obj-$(CONFIG_IIO_TRIGGERED_EVENT) += industrialio-triggered-event.o

obj-y += accel/
obj-y += adc/
obj-y += afe/
obj-y += amplifiers/
obj-y += buffer/
obj-y += chemical/
+19 −0
Original line number Diff line number Diff line
#
# Analog Front End drivers
#
# When adding new entries keep the list in alphabetical order

menu "Analog Front Ends"

config IIO_RESCALE
	tristate "IIO rescale"
	depends on OF || COMPILE_TEST
	help
	  Say yes here to build support for the IIO rescaling
	  that handles voltage dividers, current sense shunts and
	  current sense amplifiers.

	  To compile this driver as a module, choose M here: the
	  module will be called iio-rescale.

endmenu
+6 −0
Original line number Diff line number Diff line
#
# Makefile for industrial I/O Analog Front Ends (AFE)
#

# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_IIO_RESCALE) += iio-rescale.o
Loading