iio: adc: hx711: Add IIO driver for AVIA HX711
Subsystems (2)
Andreas Klinger
maintainerPATCH v2 2/2 iio: adc: hx711: Add IIO driver for AVIA HX711
This is the IIO driver for AVIA HX711 ADC which ist mostly used in weighting cells.
The protocol is quite simple and using GPIO's:
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 Andreas Klinger <[email protected]>
--- drivers/iio/adc/Kconfig | 18 ++++ drivers/iio/adc/Makefile | 1 + drivers/iio/adc/hx711.c | 231 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 250 insertions(+) create mode 100644 drivers/iio/adc/hx711.c
drivers/iio/adc/Kconfig +18 -0
@@ -205,6 +205,24 @@ config HI8435 This driver can also be built as a module. If so, the module will be 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 weight cells + + This driver uses two GPIOs, one for setting the clock and the other + one for getting the data + + Currently the raw value is read from the chip and delivered. + For getting 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 tristate "Texas Instruments INA2xx Power Monitors IIO driver" depends on I2C && !SENSORS_INA2XX
drivers/iio/adc/Makefile +1 -0
@@ -21,6 +21,7 @@ obj-$(CONFIG_CC10001_ADC) += cc10001_adc.o obj-$(CONFIG_DA9150_GPADC) += da9150-gpadc.o obj-$(CONFIG_EXYNOS_ADC) += exynos_adc.o obj-$(CONFIG_HI8435) += hi8435.o +obj-$(CONFIG_HX711) += hx711.o obj-$(CONFIG_IMX7D_ADC) += imx7d_adc.o obj-$(CONFIG_INA2XX_ADC) += ina2xx-adc.o obj-$(CONFIG_LP8788_ADC) += lp8788_adc.o
drivers/iio/adc/hx711.c new file +231 -0
231 lines not on this page · raw message
Signature · 1 line
2.1.4