summaryrefslogtreecommitdiff
path: root/arch/arm/mach-lpc32xx/common.c
diff options
context:
space:
mode:
authorRoland Stigge <stigge@antcom.de>2012-02-17 17:58:14 +0400
committerArnd Bergmann <arnd@arndb.de>2012-02-22 18:19:16 +0400
commit678a0222edc9da43a22145d68647500ee85e6c04 (patch)
tree6e0d859cd04ffc1ad723037e13513e2a269fb375 /arch/arm/mach-lpc32xx/common.c
parentb01543dfe67bb1d191998e90d20534dc354de059 (diff)
downloadlinux-678a0222edc9da43a22145d68647500ee85e6c04.tar.xz
ARM: LPC32xx: ADC support for mach-lpc32xx
This patch adds the mach specific support for the LPC32XX ADC driver (the latter being already in staging/iio) Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-lpc32xx/common.c')
-rw-r--r--arch/arm/mach-lpc32xx/common.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/mach-lpc32xx/common.c b/arch/arm/mach-lpc32xx/common.c
index 369b152896cd..6c76bb36559b 100644
--- a/arch/arm/mach-lpc32xx/common.c
+++ b/arch/arm/mach-lpc32xx/common.c
@@ -138,6 +138,28 @@ struct platform_device lpc32xx_rtc_device = {
};
/*
+ * ADC support
+ */
+static struct resource adc_resources[] = {
+ {
+ .start = LPC32XX_ADC_BASE,
+ .end = LPC32XX_ADC_BASE + SZ_4K - 1,
+ .flags = IORESOURCE_MEM,
+ }, {
+ .start = IRQ_LPC32XX_TS_IRQ,
+ .end = IRQ_LPC32XX_TS_IRQ,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+struct platform_device lpc32xx_adc_device = {
+ .name = "lpc32xx-adc",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(adc_resources),
+ .resource = adc_resources,
+};
+
+/*
* Returns the unique ID for the device
*/
void lpc32xx_get_uid(u32 devid[4])