]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: S5PC100: Add Touchscreen support.
authorNaveen Krishna Ch <ch.naveen@samsung.com>
Wed, 30 Jun 2010 12:50:24 +0000 (21:50 +0900)
committerKukjin Kim <kgene.kim@samsung.com>
Thu, 5 Aug 2010 09:30:50 +0000 (18:30 +0900)
This patch adds touchscreen support for S5PC100.

Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/mach-s5pc100/Kconfig
arch/arm/mach-s5pc100/cpu.c
arch/arm/mach-s5pc100/include/mach/map.h
arch/arm/mach-s5pc100/mach-smdkc100.c

index 34350ae59f952d5cd47d7fa20cf5e4973ffc5ec1..ef6b7c845b189e20161e86255c2d1fd36fb6ccee 100644 (file)
@@ -44,12 +44,14 @@ config S5PC100_SETUP_SDHCI_GPIO
 config MACH_SMDKC100
        bool "SMDKC100"
        select CPU_S5PC100
+       select SAMSUNG_DEV_ADC
        select S3C_DEV_FB
        select S3C_DEV_I2C1
        select SAMSUNG_DEV_IDE
        select S3C_DEV_HSMMC
        select S3C_DEV_HSMMC1
        select S3C_DEV_HSMMC2
+       select SAMSUNG_DEV_TS
        select S5PC100_SETUP_FB_24BPP
        select S5PC100_SETUP_I2C1
        select S5PC100_SETUP_IDE
index 5ce66de1a93d1b4fb6aa59d39ecfff20c14583e3..799d22f41fcd8fdcd864e35275c0a70a600404ec 100644 (file)
@@ -41,6 +41,7 @@
 #include <plat/ata-core.h>
 #include <plat/iic-core.h>
 #include <plat/sdhci.h>
+#include <plat/adc-core.h>
 #include <plat/onenand-core.h>
 
 #include <plat/s5pc100.h>
@@ -88,6 +89,8 @@ void __init s5pc100_map_io(void)
        s5pc100_default_sdhci1();
        s5pc100_default_sdhci2();
 
+       s3c_adc_setname("s3c64xx-adc");
+
        /* the i2c devices are directly compatible with s3c2440 */
        s3c_i2c0_setname("s3c2440-i2c");
        s3c_i2c1_setname("s3c2440-i2c");
index aa251908f3667b3d70f2f325e13b50b4960403b1..5a1096691006458f25376f48d442ad78abf3fb18 100644 (file)
 #define S5PC100_PA_PCM0                0xF2400000
 #define S5PC100_PA_PCM1                0xF2500000
 
+#define S5PC100_PA_TSADC       (0xF3000000)
+
 /* KEYPAD */
 #define S5PC100_PA_KEYPAD      (0xF3100000)
 
 #define S3C_PA_HSMMC1          S5PC100_PA_HSMMC(1)
 #define S3C_PA_HSMMC2          S5PC100_PA_HSMMC(2)
 #define S3C_PA_KEYPAD          S5PC100_PA_KEYPAD
-#define S3C_PA_TSADC           S5PC100_PA_TSADC
 #define S3C_PA_ONENAND         S5PC100_PA_ONENAND
 #define S3C_PA_ONENAND_BUF     S5PC100_PA_ONENAND_BUF
 #define S3C_SZ_ONENAND_BUF     S5PC100_SZ_ONENAND_BUF
 
+#define SAMSUNG_PA_ADC         S5PC100_PA_TSADC
 #define SAMSUNG_PA_CFCON       S5PC100_PA_CFCON
 
 #endif /* __ASM_ARCH_C100_MAP_H */
index b97830ab396ac7e5c0bedfee84b5d7407bf6c641..1c637c9ed1bd732c191ce8ed644e1435ae6325d3 100644 (file)
@@ -43,6 +43,8 @@
 #include <plat/fb.h>
 #include <plat/iic.h>
 #include <plat/ata.h>
+#include <plat/adc.h>
+#include <plat/ts.h>
 
 /* Following are default values for UCON, ULCON and UFCON UART registers */
 #define S5PC100_UCON_DEFAULT   (S3C2410_UCON_TXILEVEL |        \
@@ -155,18 +157,29 @@ static struct s3c_ide_platdata smdkc100_ide_pdata __initdata = {
 };
 
 static struct platform_device *smdkc100_devices[] __initdata = {
+<<<<<<< HEAD:arch/arm/mach-s5pc100/mach-smdkc100.c
        &s3c_device_cfcon,
+=======
+       &s3c_device_adc,
+>>>>>>> c1b6d71... ARM: S5PC100: Add Touchscreen support.:arch/arm/mach-s5pc100/mach-smdkc100.c
        &s3c_device_i2c0,
        &s3c_device_i2c1,
        &s3c_device_fb,
        &s3c_device_hsmmc0,
        &s3c_device_hsmmc1,
        &s3c_device_hsmmc2,
+       &s3c_device_ts,
        &smdkc100_lcd_powerdev,
        &s5pc100_device_iis0,
        &s5pc100_device_ac97,
 };
 
+static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
+       .delay                  = 10000,
+       .presc                  = 49,
+       .oversampling_shift     = 2,
+};
+
 static void __init smdkc100_map_io(void)
 {
        s5p_init_io(NULL, 0, S5P_VA_CHIPID);
@@ -176,6 +189,8 @@ static void __init smdkc100_map_io(void)
 
 static void __init smdkc100_machine_init(void)
 {
+       s3c24xx_ts_set_platdata(&s3c_ts_platform);
+
        /* I2C */
        s3c_i2c0_set_platdata(NULL);
        s3c_i2c1_set_platdata(NULL);