ARM: AT91: IIO: Add AT91 ADC driver.

Add the ADC driver for Atmel's AT91SAM9G20-EK, AT91SAM9M10G45-EK
and AT91SAM9X5 family boards.

It has support for both software and hardware triggers.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Maxime Ripard
2012-05-11 15:35:33 +02:00
committed by Greg Kroah-Hartman
parent aaeb6dfff0
commit 0e589d5fb3
5 changed files with 695 additions and 0 deletions

View File

@@ -48,6 +48,7 @@ config IIO_CONSUMERS_PER_TRIGGER
This value controls the maximum number of consumers that a
given trigger may handle. Default is 2.
source "drivers/iio/adc/Kconfig"
source "drivers/iio/amplifiers/Kconfig"
endif # IIO

View File

@@ -9,4 +9,5 @@ industrialio-$(CONFIG_IIO_TRIGGER) += industrialio-trigger.o
obj-$(CONFIG_IIO_KFIFO_BUF) += kfifo_buf.o
obj-y += adc/
obj-y += amplifiers/

16
drivers/iio/adc/Kconfig Normal file
View File

@@ -0,0 +1,16 @@
#
# ADC drivers
#
menu "Analog to digital converters"
config AT91_ADC
tristate "Atmel AT91 ADC"
depends on ARCH_AT91
select IIO_BUFFER
select IIO_KFIFO_BUF
select IIO_TRIGGER
select SYSFS
help
Say yes here to build support for Atmel AT91 ADC.
endmenu

5
drivers/iio/adc/Makefile Normal file
View File

@@ -0,0 +1,5 @@
#
# Makefile for IIO ADC drivers
#
obj-$(CONFIG_AT91_ADC) += at91_adc.o

672
drivers/iio/adc/at91_adc.c Normal file

File diff suppressed because it is too large Load Diff