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