Skip to content

Commit

Permalink
iio: adc: ad4130: add AD4130 driver
Browse files Browse the repository at this point in the history
AD4130-8 is an ultra-low power, high precision, measurement solution for
low bandwidth battery operated applications.

The fully integrated AFE (Analog Front-End) includes a multiplexer for up
to 16 single-ended or 8 differential inputs, PGA (Programmable Gain
Amplifier), 24-bit Sigma-Delta ADC, on-chip reference and oscillator,
selectable filter options, smart sequencer, sensor biasing and excitation
options, diagnostics, and a FIFO buffer.

Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
  • Loading branch information
Demon000 authored and intel-lab-lkp committed Oct 6, 2022
1 parent e93efd2 commit 4b905b5
Show file tree
Hide file tree
Showing 5 changed files with 2,141 additions and 0 deletions.
36 changes: 36 additions & 0 deletions Documentation/ABI/testing/sysfs-bus-iio-adc-ad4130
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
What: /sys/bus/iio/devices/iio:deviceX/in_voltage-voltage_filter_mode_available
KernelVersion: 6.0
Contact: linux-iio@vger.kernel.org
Description:
Reading returns a list with the possible filter modes.
"sinc4" - Sinc 4. Excellent noise performance. Long 1st
conversion time. No natural 50/60Hz rejection.
"sinc4+sinc1" - Sinc4 + averaging by 8. Low 1st conversion time.
"sinc3" - Sinc3. Moderate 1st conversion time. Good noise
performance.
"sinc3+rej60" - Sinc3 + 60Hz rejection. At a sampling frequency
of 50Hz, achieves simultaneous 50Hz and 60Hz
rejection.
"sinc3+sinc1" - Sinc3 + averaging by 8. Low 1st conversion time.
Best used with a sampling frequency of at least
216.19Hz.
"sinc3+pf1" - Sinc3 + Post Filter 1.
53dB rejection @ 50Hz, 58dB rejection @ 60Hz.
"sinc3+pf2" - Sinc3 + Post Filter 2.
70dB rejection @ 50Hz, 70dB rejection @ 60Hz.
"sinc3+pf3" - Sinc3 + Post Filter 3.
99dB rejection @ 50Hz, 103dB rejection @ 60Hz.
"sinc3+pf4" - Sinc3 + Post Filter 4.
103dB rejection @ 50Hz, 109dB rejection @ 60Hz.

What: /sys/bus/iio/devices/iio:deviceX/in_voltageY-voltageZ_filter_mode
KernelVersion: 6.0
Contact: linux-iio@vger.kernel.org
Description:
Set the filter mode of the differential channel. When the filter
mode changes, the in_voltageY-voltageZ_sampling_frequency and
in_voltageY-voltageZ_sampling_frequency_available attributes
might also change to accommodate the new filter mode.
If the current sampling frequency is out of range for the new
filter mode, the sampling frequency will be changed to the
closest valid one.
8 changes: 8 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1091,6 +1091,14 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
F: drivers/net/amt.c

ANALOG DEVICES INC AD4130 DRIVER
M: Cosmin Tanislav <cosmin.tanislav@analog.com>
L: linux-iio@vger.kernel.org
S: Supported
W: http://ez.analog.com/community/linux-device-drivers
F: Documentation/devicetree/bindings/iio/adc/adi,ad4130.yaml
F: drivers/iio/adc/ad4130.c

ANALOG DEVICES INC AD7192 DRIVER
M: Alexandru Tachici <alexandru.tachici@analog.com>
L: linux-iio@vger.kernel.org
Expand Down
13 changes: 13 additions & 0 deletions drivers/iio/adc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ config AD_SIGMA_DELTA
select IIO_BUFFER
select IIO_TRIGGERED_BUFFER

config AD4130
tristate "Analog Device AD4130 ADC Driver"
depends on SPI
select IIO_BUFFER
select IIO_KFIFO_BUF
select REGMAP_SPI
help
Say yes here to build support for Analog Devices AD4130-8 SPI analog
to digital converters (ADC).

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

config AD7091R5
tristate "Analog Devices AD7091R5 ADC Driver"
depends on I2C
Expand Down
1 change: 1 addition & 0 deletions drivers/iio/adc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_AB8500_GPADC) += ab8500-gpadc.o
obj-$(CONFIG_AD_SIGMA_DELTA) += ad_sigma_delta.o
obj-$(CONFIG_AD4130) += ad4130.o
obj-$(CONFIG_AD7091R5) += ad7091r5.o ad7091r-base.o
obj-$(CONFIG_AD7124) += ad7124.o
obj-$(CONFIG_AD7192) += ad7192.o
Expand Down
Loading

0 comments on commit 4b905b5

Please sign in to comment.