ARM: S3C24XX: touchscreen device definition

Add definition for the touchscreen driver platform data and initial
support for the H1940 machine.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>

authored by Arnaud Patard and committed by Ben Dooks ce8877b5 d3ef7ee4

+49
+21
arch/arm/mach-s3c2410/include/mach/ts.h
··· 1 + /* linux/include/asm/arch-s3c2410/ts.h 2 + * 3 + * Copyright (c) 2005 Arnaud Patard <arnaud.patard@rtp-net.org> 4 + * 5 + * This program is free software; you can redistribute it and/or modify 6 + * it under the terms of the GNU General Public License version 2 as 7 + * published by the Free Software Foundation. 8 + */ 9 + 10 + #ifndef __ASM_ARM_TS_H 11 + #define __ASM_ARM_TS_H 12 + 13 + struct s3c2410_ts_mach_info { 14 + int delay; 15 + int presc; 16 + int oversampling_shift; 17 + }; 18 + 19 + extern void s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *); 20 + 21 + #endif /* __ASM_ARM_TS_H */
+8
arch/arm/mach-s3c2410/mach-h1940.c
··· 46 46 #include <mach/h1940.h> 47 47 #include <mach/h1940-latch.h> 48 48 #include <mach/fb.h> 49 + #include <mach/ts.h> 49 50 #include <plat/udc.h> 50 51 #include <plat/iic.h> 51 52 ··· 141 140 .vbus_pin_inverted = 1, 142 141 }; 143 142 143 + static struct s3c2410_ts_mach_info h1940_ts_cfg __initdata = { 144 + .delay = 10000, 145 + .presc = 49, 146 + .oversampling_shift = 2, 147 + }; 144 148 145 149 /** 146 150 * Set lcd on or off ··· 271 265 }; 272 266 273 267 static struct platform_device *h1940_devices[] __initdata = { 268 + &s3c_device_ts, 274 269 &s3c_device_usb, 275 270 &s3c_device_lcd, 276 271 &s3c_device_wdt, ··· 312 305 313 306 s3c24xx_fb_set_platdata(&h1940_fb_info); 314 307 s3c24xx_udc_set_platdata(&h1940_udc_cfg); 308 + s3c24xx_ts_set_platdata(&h1940_ts_cfg); 315 309 s3c_i2c0_set_platdata(NULL); 316 310 317 311 s3c_device_sdi.dev.platform_data = &h1940_mmc_cfg;
+1
arch/arm/plat-s3c/include/plat/devs.h
··· 31 31 extern struct platform_device s3c64xx_device_pcm0; 32 32 extern struct platform_device s3c64xx_device_pcm1; 33 33 34 + extern struct platform_device s3c_device_ts; 34 35 extern struct platform_device s3c_device_fb; 35 36 extern struct platform_device s3c_device_usb; 36 37 extern struct platform_device s3c_device_lcd;
+18
arch/arm/plat-s3c24xx/devs.c
··· 37 37 #include <plat/cpu.h> 38 38 #include <plat/regs-spi.h> 39 39 40 + #include <mach/ts.h> 41 + 40 42 /* Serial port registrations */ 41 43 42 44 static struct resource s3c2410_uart0_resource[] = { ··· 183 181 printk(KERN_ERR "no memory for LCD platform data\n"); 184 182 } 185 183 } 184 + 185 + /* Touchscreen */ 186 + struct platform_device s3c_device_ts = { 187 + .name = "s3c2410-ts", 188 + .id = -1, 189 + }; 190 + EXPORT_SYMBOL(s3c_device_ts); 191 + 192 + static struct s3c2410_ts_mach_info s3c2410ts_info; 193 + 194 + void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *hard_s3c2410ts_info) 195 + { 196 + memcpy(&s3c2410ts_info, hard_s3c2410ts_info, sizeof(struct s3c2410_ts_mach_info)); 197 + s3c_device_ts.dev.platform_data = &s3c2410ts_info; 198 + } 199 + EXPORT_SYMBOL(s3c24xx_ts_set_platdata); 186 200 187 201 /* USB Device (Gadget)*/ 188 202
+1
arch/arm/plat-s3c24xx/s3c244x.c
··· 70 70 s3c_device_sdi.name = "s3c2440-sdi"; 71 71 s3c_device_i2c0.name = "s3c2440-i2c"; 72 72 s3c_device_nand.name = "s3c2440-nand"; 73 + s3c_device_ts.name = "s3c2440-ts"; 73 74 s3c_device_usbgadget.name = "s3c2440-usbgadget"; 74 75 } 75 76