Skip to contentSkip to conversation

staging: iio: adc: Enable driver support for ad7887 AD converter

PATCH New [email protected] 1 participant 1 message Nov 22, 2010

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH v2 1/1 staging: iio: adc: Enable driver support for ad7887 AD converter

From: Michael Hennerich <[email protected]>

Enable support for AD7887: SPI Micropower, 2-Channel, 125 kSPS, 12-Bit ADC

staging: iio: adc: Fix according to review feedback

Review feedback by Jonathan Cameron:
Combine statements.
Document struct members.
Remove redundant variable initialization. Simplify multichannel scan from ring logic. Fix coding style.

[v2]
staging: iio: adc: ad7887: Fix typos

---
 drivers/staging/iio/adc/Kconfig       |   14 ++
 drivers/staging/iio/adc/Makefile      |    4 +
 drivers/staging/iio/adc/ad7887.h      |  105 +++++++++++
 drivers/staging/iio/adc/ad7887_core.c |  305 +++++++++++++++++++++++++++++++++
 drivers/staging/iio/adc/ad7887_ring.c |  266 ++++++++++++++++++++++++++++
 5 files changed, 694 insertions(+), 0 deletions(-)
 create mode 100644 drivers/staging/iio/adc/ad7887.h
 create mode 100644 drivers/staging/iio/adc/ad7887_core.c
 create mode 100644 drivers/staging/iio/adc/ad7887_ring.c
drivers/staging/iio/adc/Kconfig +14 -0
index 9ca6565..86869cd 100644
@@ -97,6 +97,20 @@ config AD7476
 	  To compile this driver as a module, choose M here: the
 	  module will be called ad7476.
 
+config AD7887
+	tristate "Analog Devices AD7887 ADC driver"
+	depends on SPI
+	select IIO_RING_BUFFER
+	select IIO_SW_RING
+	select IIO_TRIGGER
+	help
+	  Say yes here to build support for Analog Devices
+	  AD7887 SPI analog to digital convertor (ADC).
+	  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 ad7887.
+
 config AD7745
 	tristate "Analog Devices AD7745, AD7746 AD7747 capacitive sensor driver"
 	depends on I2C
drivers/staging/iio/adc/Makefile +4 -0
index a7dce6b..6f231a2 100644
@@ -15,6 +15,10 @@ ad7476-y := ad7476_core.o
 ad7476-$(CONFIG_IIO_RING_BUFFER) += ad7476_ring.o
 obj-$(CONFIG_AD7476) += ad7476.o
 
+ad7887-y := ad7887_core.o
+ad7887-$(CONFIG_IIO_RING_BUFFER) += ad7887_ring.o
+obj-$(CONFIG_AD7887) += ad7887.o
+
 obj-$(CONFIG_AD7150) += ad7150.o
 obj-$(CONFIG_AD7152) += ad7152.o
 obj-$(CONFIG_AD7291) += ad7291.o
drivers/staging/iio/adc/ad7887.h new file +105 -0

105 lines not on this page · raw message

drivers/staging/iio/adc/ad7887_core.c new file +305 -0

305 lines not on this page · raw message

drivers/staging/iio/adc/ad7887_ring.c new file +266 -0

266 lines not on this page · raw message

--
1.6.0.2