Commit b3201b56 authored by Stefan Roese's avatar Stefan Roese Committed by Greg Kroah-Hartman

staging:iio:adc: Add SPEAr ADC driver

This patch implements the basic single data conversion support for
the SPEAr600 SoC ADC. The register layout of SPEAr600 differs a bit
from other SPEAr SoC variants (e.g. SPEAr3xx). These differences are
handled via DT compatible testing. Resulting in a multi-arch binary.

This driver is currently tested only on SPEAr600. Future patches may add
support for other SoC variants (SPEAr3xx) and features like software
buffer or DMA.
Signed-off-by: default avatarStefan Roese <sr@denx.de>
Acked-by: default avatarJonathan Cameron <jic23@kernel.org>
Acked-by: default avatarViresh Kumar <viresh.kumar@st.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6d59ba2f
* ST SPEAr ADC device driver
Required properties:
- compatible: Should be "st,spear600-adc"
- reg: Address and length of the register set for the device
- interrupt-parent: Should be the phandle for the interrupt controller
that services interrupts for this device
- interrupts: Should contain the ADC interrupt
- sampling-frequency: Default sampling frequency
Optional properties:
- vref-external: External voltage reference in milli-volts. If omitted
the internal voltage reference will be used.
- average-samples: Number of samples to generate an average value. If
omitted, single data conversion will be used.
Examples:
adc: adc@d8200000 {
compatible = "st,spear600-adc";
reg = <0xd8200000 0x1000>;
interrupt-parent = <&vic1>;
interrupts = <6>;
sampling-frequency = <5000000>;
vref-external = <2500>; /* 2.5V VRef */
};
...@@ -202,4 +202,11 @@ config LPC32XX_ADC ...@@ -202,4 +202,11 @@ config LPC32XX_ADC
touchscreen driver, so you can only select one of the two drivers touchscreen driver, so you can only select one of the two drivers
(lpc32xx_adc or lpc32xx_ts). Provides direct access via sysfs. (lpc32xx_adc or lpc32xx_ts). Provides direct access via sysfs.
config SPEAR_ADC
tristate "ST SPEAr ADC"
depends on PLAT_SPEAR
help
Say yes here to build support for the integrated ADC inside the
ST SPEAr SoC. Provides direct access via sysfs.
endmenu endmenu
...@@ -38,3 +38,4 @@ obj-$(CONFIG_ADT7310) += adt7310.o ...@@ -38,3 +38,4 @@ obj-$(CONFIG_ADT7310) += adt7310.o
obj-$(CONFIG_ADT7410) += adt7410.o obj-$(CONFIG_ADT7410) += adt7410.o
obj-$(CONFIG_AD7280) += ad7280a.o obj-$(CONFIG_AD7280) += ad7280a.o
obj-$(CONFIG_LPC32XX_ADC) += lpc32xx_adc.o obj-$(CONFIG_LPC32XX_ADC) += lpc32xx_adc.o
obj-$(CONFIG_SPEAR_ADC) += spear_adc.o
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment