ARM: S5P6440: Add Touchscreen support for S5P6440
authorNaveen Krishna Ch <ch.naveen@samsung.com>
Thu, 20 May 2010 02:39:53 +0000 (11:39 +0900)
committerBen Dooks <ben-linux@fluff.org>
Thu, 20 May 2010 05:15:21 +0000 (14:15 +0900)
This patch adds touchscreen support for S5P6440.

Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
[ben-linux@fluff.org: minor header fix]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
arch/arm/mach-s5p6440/Kconfig
arch/arm/mach-s5p6440/cpu.c
arch/arm/mach-s5p6440/include/mach/map.h
arch/arm/mach-s5p6440/mach-smdk6440.c

index 77aeffd17330614e439524fd73d59fbfd7820996..ef00cb716cba8aa73afd02406bf5e5737d19296d 100644 (file)
@@ -16,6 +16,8 @@ config CPU_S5P6440
 config MACH_SMDK6440
        bool "SMDK6440"
        select CPU_S5P6440
+       select SAMSUNG_DEV_TS
+       select SAMSUNG_DEV_ADC
        help
          Machine support for the Samsung SMDK6440
 
index ca3b3206e6f86d999d789fc05947a44bd38be314..b2fe6a58155a66915dc745402f8221ebf3b7fd0f 100644 (file)
@@ -61,6 +61,7 @@ static void s5p6440_idle(void)
 void __init s5p6440_map_io(void)
 {
        /* initialize any device information early */
+       s3c_device_adc.name     = "s3c64xx-adc";
 }
 
 void __init s5p6440_init_clocks(int xtal)
index 72aedadd412cd405747725993054c554dff03fe8..13c1ee718d30de205b8cab7fd4b735eb0b2a8004 100644 (file)
 /* PCM */
 #define S5P6440_PA_PCM         0xF2100000
 
+#define S5P6440_PA_ADC         (0xF3000000)
+
 /* compatibiltiy defines. */
 #define S3C_PA_UART            S5P6440_PA_UART
 #define S3C_PA_IIC             S5P6440_PA_IIC0
+#define SAMSUNG_PA_ADC         S5P6440_PA_ADC
 
 #endif /* __ASM_ARCH_MAP_H */
index d7fede971ca6cc5c65abd2951020571803284730..f9948174ba4eaf54712240e93f45c619ebe8da72 100644 (file)
@@ -38,6 +38,8 @@
 #include <plat/devs.h>
 #include <plat/cpu.h>
 #include <plat/pll.h>
+#include <plat/adc.h>
+#include <plat/ts.h>
 
 #define S5P6440_UCON_DEFAULT    (S3C2410_UCON_TXILEVEL |       \
                                S3C2410_UCON_RXILEVEL |         \
@@ -85,6 +87,14 @@ static struct s3c2410_uartcfg smdk6440_uartcfgs[] __initdata = {
 
 static struct platform_device *smdk6440_devices[] __initdata = {
        &s5p6440_device_iis,
+       &s3c_device_adc,
+       &s3c_device_ts,
+};
+
+static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
+       .delay                  = 10000,
+       .presc                  = 49,
+       .oversampling_shift     = 2,
 };
 
 static void __init smdk6440_map_io(void)
@@ -96,6 +106,8 @@ static void __init smdk6440_map_io(void)
 
 static void __init smdk6440_machine_init(void)
 {
+       s3c24xx_ts_set_platdata(&s3c_ts_platform);
+
        platform_add_devices(smdk6440_devices, ARRAY_SIZE(smdk6440_devices));
 }