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 #include <mach/h1940.h> 47 #include <mach/h1940-latch.h> 48 #include <mach/fb.h> 49 #include <plat/udc.h> 50 #include <plat/iic.h> 51 ··· 141 .vbus_pin_inverted = 1, 142 }; 143 144 145 /** 146 * Set lcd on or off ··· 271 }; 272 273 static struct platform_device *h1940_devices[] __initdata = { 274 &s3c_device_usb, 275 &s3c_device_lcd, 276 &s3c_device_wdt, ··· 312 313 s3c24xx_fb_set_platdata(&h1940_fb_info); 314 s3c24xx_udc_set_platdata(&h1940_udc_cfg); 315 s3c_i2c0_set_platdata(NULL); 316 317 s3c_device_sdi.dev.platform_data = &h1940_mmc_cfg;
··· 46 #include <mach/h1940.h> 47 #include <mach/h1940-latch.h> 48 #include <mach/fb.h> 49 + #include <mach/ts.h> 50 #include <plat/udc.h> 51 #include <plat/iic.h> 52 ··· 140 .vbus_pin_inverted = 1, 141 }; 142 143 + static struct s3c2410_ts_mach_info h1940_ts_cfg __initdata = { 144 + .delay = 10000, 145 + .presc = 49, 146 + .oversampling_shift = 2, 147 + }; 148 149 /** 150 * Set lcd on or off ··· 265 }; 266 267 static struct platform_device *h1940_devices[] __initdata = { 268 + &s3c_device_ts, 269 &s3c_device_usb, 270 &s3c_device_lcd, 271 &s3c_device_wdt, ··· 305 306 s3c24xx_fb_set_platdata(&h1940_fb_info); 307 s3c24xx_udc_set_platdata(&h1940_udc_cfg); 308 + s3c24xx_ts_set_platdata(&h1940_ts_cfg); 309 s3c_i2c0_set_platdata(NULL); 310 311 s3c_device_sdi.dev.platform_data = &h1940_mmc_cfg;
+1
arch/arm/plat-s3c/include/plat/devs.h
··· 31 extern struct platform_device s3c64xx_device_pcm0; 32 extern struct platform_device s3c64xx_device_pcm1; 33 34 extern struct platform_device s3c_device_fb; 35 extern struct platform_device s3c_device_usb; 36 extern struct platform_device s3c_device_lcd;
··· 31 extern struct platform_device s3c64xx_device_pcm0; 32 extern struct platform_device s3c64xx_device_pcm1; 33 34 + extern struct platform_device s3c_device_ts; 35 extern struct platform_device s3c_device_fb; 36 extern struct platform_device s3c_device_usb; 37 extern struct platform_device s3c_device_lcd;
+18
arch/arm/plat-s3c24xx/devs.c
··· 37 #include <plat/cpu.h> 38 #include <plat/regs-spi.h> 39 40 /* Serial port registrations */ 41 42 static struct resource s3c2410_uart0_resource[] = { ··· 183 printk(KERN_ERR "no memory for LCD platform data\n"); 184 } 185 } 186 187 /* USB Device (Gadget)*/ 188
··· 37 #include <plat/cpu.h> 38 #include <plat/regs-spi.h> 39 40 + #include <mach/ts.h> 41 + 42 /* Serial port registrations */ 43 44 static struct resource s3c2410_uart0_resource[] = { ··· 181 printk(KERN_ERR "no memory for LCD platform data\n"); 182 } 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); 200 201 /* USB Device (Gadget)*/ 202
+1
arch/arm/plat-s3c24xx/s3c244x.c
··· 70 s3c_device_sdi.name = "s3c2440-sdi"; 71 s3c_device_i2c0.name = "s3c2440-i2c"; 72 s3c_device_nand.name = "s3c2440-nand"; 73 s3c_device_usbgadget.name = "s3c2440-usbgadget"; 74 } 75
··· 70 s3c_device_sdi.name = "s3c2440-sdi"; 71 s3c_device_i2c0.name = "s3c2440-i2c"; 72 s3c_device_nand.name = "s3c2440-nand"; 73 + s3c_device_ts.name = "s3c2440-ts"; 74 s3c_device_usbgadget.name = "s3c2440-usbgadget"; 75 } 76