make uclibc 0.9.30.1 the default
[openwrt.git] / target / linux / s3c24xx / patches-2.6.30 / 050-s3c2442-touchscreen.patch
1 Index: linux-2.6.30-rc6/arch/arm/plat-s3c24xx/devs.c
2 ===================================================================
3 --- linux-2.6.30-rc6.orig/arch/arm/plat-s3c24xx/devs.c  2009-05-18 19:08:30.000000000 +0200
4 +++ linux-2.6.30-rc6/arch/arm/plat-s3c24xx/devs.c       2009-05-18 19:08:31.000000000 +0200
5 @@ -26,6 +26,8 @@
6  #include <asm/mach/irq.h>
7  #include <mach/fb.h>
8  #include <mach/hardware.h>
9 +#include <mach/ts.h>
10 +#include <asm/io.h>
11  #include <asm/irq.h>
12  
13  #include <plat/regs-serial.h>
14 @@ -199,6 +201,24 @@
15  
16  EXPORT_SYMBOL(s3c_device_nand);
17  
18 +/* Touchscreen */
19 +struct platform_device s3c_device_ts = {
20 +       .name             = "s3c2410-ts",
21 +       .id               = -1,
22 +};
23 +
24 +EXPORT_SYMBOL(s3c_device_ts);
25 +
26 +static struct s3c2410_ts_mach_info s3c2410ts_info;
27 +
28 +void set_s3c2410ts_info(const struct s3c2410_ts_mach_info *hard_s3c2410ts_info)
29 +{
30 +       memcpy(&s3c2410ts_info, hard_s3c2410ts_info,
31 +              sizeof(struct s3c2410_ts_mach_info));
32 +       s3c_device_ts.dev.platform_data = &s3c2410ts_info;
33 +}
34 +EXPORT_SYMBOL(set_s3c2410ts_info);
35 +
36  /* USB Device (Gadget)*/
37  
38  static struct resource s3c_usbgadget_resource[] = {
39 Index: linux-2.6.30-rc6/arch/arm/plat-s3c24xx/s3c244x.c
40 ===================================================================
41 --- linux-2.6.30-rc6.orig/arch/arm/plat-s3c24xx/s3c244x.c       2009-05-16 06:12:57.000000000 +0200
42 +++ linux-2.6.30-rc6/arch/arm/plat-s3c24xx/s3c244x.c    2009-05-18 19:08:31.000000000 +0200
43 @@ -59,6 +59,8 @@
44         s3c24xx_init_uartdevs("s3c2440-uart", s3c2410_uart_resources, cfg, no);
45  }
46  
47 +extern struct platform_device s3c_device_ts;
48 +
49  void __init s3c244x_map_io(void)
50  {
51         /* register our io-tables */
52 @@ -70,6 +72,7 @@
53         s3c_device_sdi.name  = "s3c2440-sdi";
54         s3c_device_i2c0.name  = "s3c2440-i2c";
55         s3c_device_nand.name = "s3c2440-nand";
56 +       s3c_device_ts.name = "s3c2440-ts";
57         s3c_device_usbgadget.name = "s3c2440-usbgadget";
58  }
59  
60 Index: linux-2.6.30-rc6/drivers/input/touchscreen/Kconfig
61 ===================================================================
62 --- linux-2.6.30-rc6.orig/drivers/input/touchscreen/Kconfig     2009-05-16 06:12:57.000000000 +0200
63 +++ linux-2.6.30-rc6/drivers/input/touchscreen/Kconfig  2009-05-18 19:08:31.000000000 +0200
64 @@ -124,6 +124,24 @@
65           To compile this driver as a module, choose M here: the
66           module will be called fujitsu-ts.
67  
68 +config TOUCHSCREEN_S3C2410
69 +       tristate "Samsung S3C2410 touchscreen input driver"
70 +       depends on ARCH_S3C2410 && INPUT && INPUT_TOUCHSCREEN
71 +       select SERIO
72 +       help
73 +         Say Y here if you have the s3c2410 touchscreen.
74 +
75 +         If unsure, say N.
76 +
77 +         To compile this driver as a module, choose M here: the
78 +         module will be called s3c2410_ts.
79 +
80 +config TOUCHSCREEN_S3C2410_DEBUG
81 +       boolean "Samsung S3C2410 touchscreen debug messages"
82 +       depends on TOUCHSCREEN_S3C2410
83 +       help
84 +         Select this if you want debug messages
85 +
86  config TOUCHSCREEN_GUNZE
87         tristate "Gunze AHL-51S touchscreen"
88         select SERIO
89 Index: linux-2.6.30-rc6/drivers/input/touchscreen/Makefile
90 ===================================================================
91 --- linux-2.6.30-rc6.orig/drivers/input/touchscreen/Makefile    2009-05-16 06:12:57.000000000 +0200
92 +++ linux-2.6.30-rc6/drivers/input/touchscreen/Makefile 2009-05-18 19:08:31.000000000 +0200
93 @@ -37,3 +37,4 @@
94  wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9713) += wm9713.o
95  obj-$(CONFIG_TOUCHSCREEN_WM97XX_MAINSTONE)     += mainstone-wm97xx.o
96  obj-$(CONFIG_TOUCHSCREEN_WM97XX_ZYLONITE)      += zylonite-wm97xx.o
97 +obj-$(CONFIG_TOUCHSCREEN_S3C2410)      += s3c2410_ts.o
98 Index: linux-2.6.30-rc6/arch/arm/mach-s3c2410/include/mach/ts.h
99 ===================================================================
100 --- /dev/null   1970-01-01 00:00:00.000000000 +0000
101 +++ linux-2.6.30-rc6/arch/arm/mach-s3c2410/include/mach/ts.h    2009-05-18 19:08:31.000000000 +0200
102 @@ -0,0 +1,35 @@
103 +/* arch/arm/mach-s3c2410/include/mach/ts.h
104 + *
105 + * Copyright (c) 2005 Arnaud Patard <arnaud.patard@rtp-net.org>
106 + *
107 + *
108 + * This program is free software; you can redistribute it and/or modify
109 + * it under the terms of the GNU General Public License version 2 as
110 + * published by the Free Software Foundation.
111 + *
112 + *
113 + *  Changelog:
114 + *     24-Mar-2005     RTP     Created file
115 + *     03-Aug-2005     RTP     Renamed to ts.h
116 + */
117 +
118 +#ifndef __ASM_ARM_TS_H
119 +#define __ASM_ARM_TS_H
120 +
121 +#include <linux/touchscreen/ts_filter.h>
122 +
123 +struct s3c2410_ts_mach_info {
124 +       /* Touchscreen delay. */
125 +       int delay;
126 +       /* Prescaler value. */
127 +       int presc;
128 +       /*
129 +        * Null-terminated array of pointers to filter APIs and configurations
130 +        * we want to use. In the same order they will be applied.
131 +        */
132 +       const struct ts_filter_chain_configuration *filter_config;
133 +};
134 +
135 +void set_s3c2410ts_info(const struct s3c2410_ts_mach_info *hard_s3c2410ts_info);
136 +
137 +#endif /* __ASM_ARM_TS_H */
138 Index: linux-2.6.30-rc6/arch/arm/plat-s3c/include/plat/devs.h
139 ===================================================================
140 --- linux-2.6.30-rc6.orig/arch/arm/plat-s3c/include/plat/devs.h 2009-05-18 19:07:48.000000000 +0200
141 +++ linux-2.6.30-rc6/arch/arm/plat-s3c/include/plat/devs.h      2009-05-18 19:08:31.000000000 +0200
142 @@ -50,10 +50,11 @@
143  
144  extern struct platform_device s3c_device_usbgadget;
145  
146 +extern struct platform_device s3c_device_ts;
147 +
148  /* s3c2440 specific devices */
149  
150  #ifdef CONFIG_CPU_S3C2440
151  
152  extern struct platform_device s3c_device_camif;
153 -
154  #endif