Commit c3b2fdd0 authored by Andreas Klinger's avatar Andreas Klinger Committed by Jonathan Cameron

iio: adc: hx711: Add IIO driver for AVIA HX711

This is the IIO driver for AVIA HX711 ADC which is mostly used in weighting
cells.

The protocol is quite simple and using GPIOs:
One GPIO is used as clock (SCK) while another GPIO is read (DOUT)

The raw value read from the chip is delivered.
To get a weight one needs to subtract the zero offset and scale it.
Signed-off-by: default avatarAndreas Klinger <ak@it-klinger.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent ff1293f6
...@@ -247,6 +247,25 @@ config HI8435 ...@@ -247,6 +247,25 @@ config HI8435
This driver can also be built as a module. If so, the module will be This driver can also be built as a module. If so, the module will be
called hi8435. called hi8435.
config HX711
tristate "AVIA HX711 ADC for weight cells"
depends on GPIOLIB
help
If you say yes here you get support for AVIA HX711 ADC which is used
for weigh cells
This driver uses two GPIOs, one acts as the clock and controls the
channel selection and gain, the other one is used for the measurement
data
Currently the raw value is read from the chip and delivered.
To get an actual weight one needs to subtract the
zero offset and multiply by a scale factor.
This should be done in userspace.
This driver can also be built as a module. If so, the module will be
called hx711.
config INA2XX_ADC config INA2XX_ADC
tristate "Texas Instruments INA2xx Power Monitors IIO driver" tristate "Texas Instruments INA2xx Power Monitors IIO driver"
depends on I2C && !SENSORS_INA2XX depends on I2C && !SENSORS_INA2XX
......
...@@ -25,6 +25,7 @@ obj-$(CONFIG_ENVELOPE_DETECTOR) += envelope-detector.o ...@@ -25,6 +25,7 @@ obj-$(CONFIG_ENVELOPE_DETECTOR) += envelope-detector.o
obj-$(CONFIG_EXYNOS_ADC) += exynos_adc.o obj-$(CONFIG_EXYNOS_ADC) += exynos_adc.o
obj-$(CONFIG_FSL_MX25_ADC) += fsl-imx25-gcq.o obj-$(CONFIG_FSL_MX25_ADC) += fsl-imx25-gcq.o
obj-$(CONFIG_HI8435) += hi8435.o obj-$(CONFIG_HI8435) += hi8435.o
obj-$(CONFIG_HX711) += hx711.o
obj-$(CONFIG_IMX7D_ADC) += imx7d_adc.o obj-$(CONFIG_IMX7D_ADC) += imx7d_adc.o
obj-$(CONFIG_INA2XX_ADC) += ina2xx-adc.o obj-$(CONFIG_INA2XX_ADC) += ina2xx-adc.o
obj-$(CONFIG_LP8788_ADC) += lp8788_adc.o obj-$(CONFIG_LP8788_ADC) += lp8788_adc.o
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment