staging: iio: adc: ad7476 new SPI ADC driver
Subsystems (4)
[email protected]
maintainerPATCH 1/1 staging: iio: adc: ad7476 new SPI ADC driver
From: Michael Hennerich <[email protected]>
New driver handling:
AD7475, AD7476, AD7477, AD7478, AD7466, AD7467, AD7468, AD7495
SPI micropower and high speed 12-/10-/8-Bit ADCs
staging: iio: adc: ad7476 apply list review feedback by Jonathan Cameron
Changes since last RFC post V1:
Mainly list review feedback by Jonathan Cameron
-Remove scan_attrs from chip info structure.
-Remove name from chip info structure, use new spi_device_id instead.
-Allow transfer buffers to live in their own cache lines, to avoid DMA/cache coherency issues. -Move scan el code into the ring buffer file.
-Use helper function to alloc the pollfunc.
-Use regulator framework and get vref_mv from the regulator in case not specified by pdata. -Devices with buit-in reference use vref from the chip info structure
-Don't error on missing platform_data
-Make vref_mv type unsigned short
-Print in_scale "Vref / 2^(bits)" if fractional.
--- drivers/staging/iio/adc/Kconfig | 11 ++ drivers/staging/iio/adc/Makefile | 4 + drivers/staging/iio/adc/ad7476.h | 79 +++++++++ drivers/staging/iio/adc/ad7476_core.c | 298 +++++++++++++++++++++++++++++++++ drivers/staging/iio/adc/ad7476_ring.c | 207 +++++++++++++++++++++++ 5 files changed, 599 insertions(+), 0 deletions(-) create mode 100644 drivers/staging/iio/adc/ad7476.h create mode 100644 drivers/staging/iio/adc/ad7476_core.c create mode 100644 drivers/staging/iio/adc/ad7476_ring.c
drivers/staging/iio/adc/Kconfig +11 -0
@@ -46,3 +46,14 @@ config AD799X_RING_BUFFER help Say yes here to include ring buffer support in the AD799X ADC driver. + +config AD7476 + tristate "Analog Devices AD7475/6/7/8 AD7466/7/8 and AD7495 ADC driver" + depends on SPI + help + Say yes here to build support for Analog Devices AD7475/6/7/8, + AD7466/7/8 and AD7495 ADC driver. + If unsure, say N (but it's safe to say "Y"). + + To compile this driver as a module, choose M here: the + module will be called ad7476.
drivers/staging/iio/adc/Makefile +4 -0
@@ -10,3 +10,7 @@ obj-$(CONFIG_MAX1363) += max1363.o ad799x-y := ad799x_core.o ad799x-$(CONFIG_AD799X_RING_BUFFER) += ad799x_ring.o obj-$(CONFIG_AD799X) += ad799x.o + +ad7476-y := ad7476_core.o +ad7476-$(CONFIG_IIO_RING_BUFFER) += ad7476_ring.o +obj-$(CONFIG_AD7476) += ad7476.o
drivers/staging/iio/adc/ad7476.h new file +79 -0
79 lines not on this page · raw message
drivers/staging/iio/adc/ad7476_core.c new file +298 -0
298 lines not on this page · raw message
drivers/staging/iio/adc/ad7476_ring.c new file +207 -0
207 lines not on this page · raw message
Signature · 1 line
1.6.0.2