[s3c24xx] Add 2.6.31 patches
[openwrt.git] / target / linux / s3c24xx / patches-2.6.31 / 050-s3c2442-touchscreen.patch
1 From 0bd4d22c621eef0178be7d518a92a7fe42a37b3c Mon Sep 17 00:00:00 2001
2 From: Lars-Peter Clausen <lars@metafoo.de>
3 Date: Tue, 21 Jul 2009 12:43:48 +0200
4 Subject: [PATCH] 050-s3c2442-touchscreen.patch
5
6 ---
7 arch/arm/mach-s3c2410/include/mach/ts.h | 35 +++++++++++++++++++++++++++++++
8 arch/arm/plat-s3c/include/plat/devs.h | 3 +-
9 arch/arm/plat-s3c24xx/devs.c | 20 +++++++++++++++++
10 arch/arm/plat-s3c24xx/s3c244x.c | 3 ++
11 drivers/input/touchscreen/Kconfig | 18 ++++++++++++++++
12 drivers/input/touchscreen/Makefile | 1 +
13 6 files changed, 79 insertions(+), 1 deletions(-)
14 create mode 100644 arch/arm/mach-s3c2410/include/mach/ts.h
15
16 diff --git a/arch/arm/mach-s3c2410/include/mach/ts.h b/arch/arm/mach-s3c2410/include/mach/ts.h
17 new file mode 100644
18 index 0000000..f84324d
19 --- /dev/null
20 +++ b/arch/arm/mach-s3c2410/include/mach/ts.h
21 @@ -0,0 +1,35 @@
22 +/* arch/arm/mach-s3c2410/include/mach/ts.h
23 + *
24 + * Copyright (c) 2005 Arnaud Patard <arnaud.patard@rtp-net.org>
25 + *
26 + *
27 + * This program is free software; you can redistribute it and/or modify
28 + * it under the terms of the GNU General Public License version 2 as
29 + * published by the Free Software Foundation.
30 + *
31 + *
32 + * Changelog:
33 + * 24-Mar-2005 RTP Created file
34 + * 03-Aug-2005 RTP Renamed to ts.h
35 + */
36 +
37 +#ifndef __ASM_ARM_TS_H
38 +#define __ASM_ARM_TS_H
39 +
40 +#include <linux/touchscreen/ts_filter.h>
41 +
42 +struct s3c2410_ts_mach_info {
43 + /* Touchscreen delay. */
44 + int delay;
45 + /* Prescaler value. */
46 + int presc;
47 + /*
48 + * Null-terminated array of pointers to filter APIs and configurations
49 + * we want to use. In the same order they will be applied.
50 + */
51 + const struct ts_filter_chain_configuration *filter_config;
52 +};
53 +
54 +void set_s3c2410ts_info(const struct s3c2410_ts_mach_info *hard_s3c2410ts_info);
55 +
56 +#endif /* __ASM_ARM_TS_H */
57 diff --git a/arch/arm/plat-s3c/include/plat/devs.h b/arch/arm/plat-s3c/include/plat/devs.h
58 index 49504b3..105ad09 100644
59 --- a/arch/arm/plat-s3c/include/plat/devs.h
60 +++ b/arch/arm/plat-s3c/include/plat/devs.h
61 @@ -55,10 +55,11 @@ extern struct platform_device s3c_device_nand;
62 extern struct platform_device s3c_device_usbgadget;
63 extern struct platform_device s3c_device_usb_hsotg;
64
65 +extern struct platform_device s3c_device_ts;
66 +
67 /* s3c2440 specific devices */
68
69 #ifdef CONFIG_CPU_S3C2440
70
71 extern struct platform_device s3c_device_camif;
72 -
73 #endif
74 diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c
75 index 4eb378c..0fdaa54 100644
76 --- a/arch/arm/plat-s3c24xx/devs.c
77 +++ b/arch/arm/plat-s3c24xx/devs.c
78 @@ -26,6 +26,8 @@
79 #include <asm/mach/irq.h>
80 #include <mach/fb.h>
81 #include <mach/hardware.h>
82 +#include <mach/ts.h>
83 +#include <asm/io.h>
84 #include <asm/irq.h>
85
86 #include <plat/regs-serial.h>
87 @@ -199,6 +201,24 @@ struct platform_device s3c_device_nand = {
88
89 EXPORT_SYMBOL(s3c_device_nand);
90
91 +/* Touchscreen */
92 +struct platform_device s3c_device_ts = {
93 + .name = "s3c2410-ts",
94 + .id = -1,
95 +};
96 +
97 +EXPORT_SYMBOL(s3c_device_ts);
98 +
99 +static struct s3c2410_ts_mach_info s3c2410ts_info;
100 +
101 +void set_s3c2410ts_info(const struct s3c2410_ts_mach_info *hard_s3c2410ts_info)
102 +{
103 + memcpy(&s3c2410ts_info, hard_s3c2410ts_info,
104 + sizeof(struct s3c2410_ts_mach_info));
105 + s3c_device_ts.dev.platform_data = &s3c2410ts_info;
106 +}
107 +EXPORT_SYMBOL(set_s3c2410ts_info);
108 +
109 /* USB Device (Gadget)*/
110
111 static struct resource s3c_usbgadget_resource[] = {
112 diff --git a/arch/arm/plat-s3c24xx/s3c244x.c b/arch/arm/plat-s3c24xx/s3c244x.c
113 index 1364317..0731b23 100644
114 --- a/arch/arm/plat-s3c24xx/s3c244x.c
115 +++ b/arch/arm/plat-s3c24xx/s3c244x.c
116 @@ -59,6 +59,8 @@ void __init s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no)
117 s3c24xx_init_uartdevs("s3c2440-uart", s3c2410_uart_resources, cfg, no);
118 }
119
120 +extern struct platform_device s3c_device_ts;
121 +
122 void __init s3c244x_map_io(void)
123 {
124 /* register our io-tables */
125 @@ -70,6 +72,7 @@ void __init s3c244x_map_io(void)
126 s3c_device_sdi.name = "s3c2440-sdi";
127 s3c_device_i2c0.name = "s3c2440-i2c";
128 s3c_device_nand.name = "s3c2440-nand";
129 + s3c_device_ts.name = "s3c2440-ts";
130 s3c_device_usbgadget.name = "s3c2440-usbgadget";
131 }
132
133 diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
134 index 72e2712..2bb711f 100644
135 --- a/drivers/input/touchscreen/Kconfig
136 +++ b/drivers/input/touchscreen/Kconfig
137 @@ -133,6 +133,24 @@ config TOUCHSCREEN_FUJITSU
138 To compile this driver as a module, choose M here: the
139 module will be called fujitsu-ts.
140
141 +config TOUCHSCREEN_S3C2410
142 + tristate "Samsung S3C2410 touchscreen input driver"
143 + depends on ARCH_S3C2410 && INPUT && INPUT_TOUCHSCREEN
144 + select SERIO
145 + help
146 + Say Y here if you have the s3c2410 touchscreen.
147 +
148 + If unsure, say N.
149 +
150 + To compile this driver as a module, choose M here: the
151 + module will be called s3c2410_ts.
152 +
153 +config TOUCHSCREEN_S3C2410_DEBUG
154 + boolean "Samsung S3C2410 touchscreen debug messages"
155 + depends on TOUCHSCREEN_S3C2410
156 + help
157 + Select this if you want debug messages
158 +
159 config TOUCHSCREEN_GUNZE
160 tristate "Gunze AHL-51S touchscreen"
161 select SERIO
162 diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile
163 index 3e1c5e0..269814c 100644
164 --- a/drivers/input/touchscreen/Makefile
165 +++ b/drivers/input/touchscreen/Makefile
166 @@ -40,3 +40,4 @@ obj-$(CONFIG_TOUCHSCREEN_WM97XX_ATMEL) += atmel-wm97xx.o
167 obj-$(CONFIG_TOUCHSCREEN_WM97XX_MAINSTONE) += mainstone-wm97xx.o
168 obj-$(CONFIG_TOUCHSCREEN_WM97XX_ZYLONITE) += zylonite-wm97xx.o
169 obj-$(CONFIG_TOUCHSCREEN_W90X900) += w90p910_ts.o
170 +obj-$(CONFIG_TOUCHSCREEN_S3C2410) += s3c2410_ts.o
171 --
172 1.5.6.5
173
This page took 0.057553 seconds and 5 git commands to generate.