Skip to content

Commit 8b20be8

Browse files
alexandrebellonijic23
authored andcommitted
iio: Add Nuvoton NAU7802 ADC driver
The Nuvoton NAU7802 ADC is a 24-bit 2-channels I2C ADC, with adjustable gain and sampling rates. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
1 parent f7883d1 commit 8b20be8

File tree

4 files changed

+612
-0
lines changed

4 files changed

+612
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
* Nuvoton NAU7802 Analog to Digital Converter (ADC)
2+
3+
Required properties:
4+
- compatible: Should be "nuvoton,nau7802"
5+
- reg: Should contain the ADC I2C address
6+
7+
Optional properties:
8+
- nuvoton,vldo: Internal reference voltage in millivolts to be
9+
configured valid values are between 2400 mV and 4500 mV.
10+
- interrupts: IRQ line for the ADC. If not used the driver will use
11+
polling.
12+
13+
Example:
14+
adc2: nau7802@2a {
15+
compatible = "nuvoton,nau7802";
16+
reg = <0x2a>;
17+
nuvoton,vldo = <3000>;
18+
};

drivers/iio/adc/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,15 @@ config MCP320X
143143
This driver can also be built as a module. If so, the module will be
144144
called mcp320x.
145145

146+
config NAU7802
147+
tristate "Nuvoton NAU7802 ADC driver"
148+
depends on I2C
149+
help
150+
Say yes here to build support for Nuvoton NAU7802 ADC.
151+
152+
To compile this driver as a module, choose M here: the
153+
module will be called nau7802.
154+
146155
config TI_ADC081C
147156
tristate "Texas Instruments ADC081C021/027"
148157
depends on I2C

drivers/iio/adc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ obj-$(CONFIG_EXYNOS_ADC) += exynos_adc.o
1515
obj-$(CONFIG_LP8788_ADC) += lp8788_adc.o
1616
obj-$(CONFIG_MAX1363) += max1363.o
1717
obj-$(CONFIG_MCP320X) += mcp320x.o
18+
obj-$(CONFIG_NAU7802) += nau7802.o
1819
obj-$(CONFIG_TI_ADC081C) += ti-adc081c.o
1920
obj-$(CONFIG_TI_AM335X_ADC) += ti_am335x_adc.o
2021
obj-$(CONFIG_VIPERBOARD_ADC) += viperboard_adc.o

0 commit comments

Comments
 (0)