diff options
Diffstat (limited to 'meta/recipes-kernel/linux/linux-netbook-2.6.33.2/linux-2.6.35-omap-rx-51-enable-tsc2005.patch')
-rw-r--r-- | meta/recipes-kernel/linux/linux-netbook-2.6.33.2/linux-2.6.35-omap-rx-51-enable-tsc2005.patch | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/meta/recipes-kernel/linux/linux-netbook-2.6.33.2/linux-2.6.35-omap-rx-51-enable-tsc2005.patch b/meta/recipes-kernel/linux/linux-netbook-2.6.33.2/linux-2.6.35-omap-rx-51-enable-tsc2005.patch new file mode 100644 index 0000000000..49374c9cf6 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-netbook-2.6.33.2/linux-2.6.35-omap-rx-51-enable-tsc2005.patch | |||
@@ -0,0 +1,122 @@ | |||
1 | From fa1d43818de208bdc2fd789777c538ab4aa7956a Mon Sep 17 00:00:00 2001 | ||
2 | From: Aaro Koskinen <Aaro.Koskinen@nokia.com> | ||
3 | Date: Fri, 12 Mar 2010 16:54:34 +0000 | ||
4 | Subject: [PATCH 8/10] omap: rx-51: enable tsc2005 | ||
5 | |||
6 | Patch-mainline: 2.6.35 | ||
7 | Discussions: http://www.mail-archive.com/linux-omap@vger.kernel.org/msg26749.html | ||
8 | |||
9 | Enable TSC2005 touchscreen driver on the RX-51 board. | ||
10 | |||
11 | Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> | ||
12 | --- | ||
13 | arch/arm/configs/rx51_defconfig | 1 | ||
14 | arch/arm/mach-omap2/board-rx51-peripherals.c | 46 +++++++++++++++++++++++++-- | ||
15 | 2 files changed, 45 insertions(+), 2 deletions(-) | ||
16 | |||
17 | Index: linux-2.6.33-master/arch/arm/configs/rx51_defconfig | ||
18 | =================================================================== | ||
19 | --- linux-2.6.33-master.orig/arch/arm/configs/rx51_defconfig 2010-04-19 17:28:20.000000000 +0300 | ||
20 | +++ linux-2.6.33-master/arch/arm/configs/rx51_defconfig 2010-04-19 17:28:28.000000000 +0300 | ||
21 | @@ -801,6 +801,7 @@ | ||
22 | # CONFIG_TOUCHSCREEN_TOUCHWIN is not set | ||
23 | # CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set | ||
24 | # CONFIG_TOUCHSCREEN_TOUCHIT213 is not set | ||
25 | +CONFIG_TOUCHSCREEN_TSC2005=m | ||
26 | # CONFIG_TOUCHSCREEN_TSC2007 is not set | ||
27 | CONFIG_INPUT_MISC=y | ||
28 | # CONFIG_INPUT_ATI_REMOTE is not set | ||
29 | Index: linux-2.6.33-master/arch/arm/mach-omap2/board-rx51-peripherals.c | ||
30 | =================================================================== | ||
31 | --- linux-2.6.33-master.orig/arch/arm/mach-omap2/board-rx51-peripherals.c 2010-04-19 17:28:20.000000000 +0300 | ||
32 | +++ linux-2.6.33-master/arch/arm/mach-omap2/board-rx51-peripherals.c 2010-04-19 17:28:28.000000000 +0300 | ||
33 | @@ -14,6 +14,7 @@ | ||
34 | #include <linux/input.h> | ||
35 | #include <linux/input/matrix_keypad.h> | ||
36 | #include <linux/spi/spi.h> | ||
37 | +#include <linux/spi/tsc2005.h> | ||
38 | #include <linux/spi/wl12xx.h> | ||
39 | #include <linux/i2c.h> | ||
40 | #include <linux/i2c/twl.h> | ||
41 | @@ -42,6 +43,9 @@ | ||
42 | #define RX51_WL1251_POWER_GPIO 87 | ||
43 | #define RX51_WL1251_IRQ_GPIO 42 | ||
44 | |||
45 | +#define RX51_TSC2005_RESET_GPIO 104 | ||
46 | +#define RX51_TSC2005_IRQ_GPIO 100 | ||
47 | + | ||
48 | /* list all spi devices here */ | ||
49 | enum { | ||
50 | RX51_SPI_WL1251, | ||
51 | @@ -50,6 +54,7 @@ | ||
52 | }; | ||
53 | |||
54 | static struct wl12xx_platform_data wl1251_pdata; | ||
55 | +static struct tsc2005_platform_data tsc2005_pdata; | ||
56 | |||
57 | static struct omap2_mcspi_device_config wl1251_mcspi_config = { | ||
58 | .turbo_mode = 0, | ||
59 | @@ -87,10 +92,10 @@ | ||
60 | .modalias = "tsc2005", | ||
61 | .bus_num = 1, | ||
62 | .chip_select = 0, | ||
63 | - /* .irq = OMAP_GPIO_IRQ(RX51_TSC2005_IRQ_GPIO),*/ | ||
64 | + .irq = OMAP_GPIO_IRQ(RX51_TSC2005_IRQ_GPIO), | ||
65 | .max_speed_hz = 6000000, | ||
66 | .controller_data = &tsc2005_mcspi_config, | ||
67 | - /* .platform_data = &tsc2005_config,*/ | ||
68 | + .platform_data = &tsc2005_pdata, | ||
69 | }, | ||
70 | }; | ||
71 | |||
72 | @@ -708,6 +713,42 @@ | ||
73 | |||
74 | #endif | ||
75 | |||
76 | +static struct tsc2005_platform_data tsc2005_pdata = { | ||
77 | + .ts_pressure_max = 2048, | ||
78 | + .ts_pressure_fudge = 2, | ||
79 | + .ts_x_max = 4096, | ||
80 | + .ts_x_fudge = 4, | ||
81 | + .ts_y_max = 4096, | ||
82 | + .ts_y_fudge = 7, | ||
83 | + .ts_x_plate_ohm = 280, | ||
84 | + .esd_timeout_ms = 8000, | ||
85 | +}; | ||
86 | + | ||
87 | +static void rx51_tsc2005_set_reset(bool enable) | ||
88 | +{ | ||
89 | + gpio_set_value(RX51_TSC2005_RESET_GPIO, enable); | ||
90 | +} | ||
91 | + | ||
92 | +static void __init rx51_init_tsc2005(void) | ||
93 | +{ | ||
94 | + int r; | ||
95 | + | ||
96 | + r = gpio_request(RX51_TSC2005_IRQ_GPIO, "tsc2005 IRQ"); | ||
97 | + if (r >= 0) | ||
98 | + gpio_direction_input(RX51_TSC2005_IRQ_GPIO); | ||
99 | + else | ||
100 | + printk(KERN_ERR "unable to get %s GPIO\n", "tsc2005 IRQ"); | ||
101 | + | ||
102 | + r = gpio_request(RX51_TSC2005_RESET_GPIO, "tsc2005 reset"); | ||
103 | + if (r >= 0) { | ||
104 | + gpio_direction_output(RX51_TSC2005_RESET_GPIO, 1); | ||
105 | + tsc2005_pdata.set_reset = rx51_tsc2005_set_reset; | ||
106 | + } else { | ||
107 | + printk(KERN_ERR "unable to get %s GPIO\n", "tsc2005 reset"); | ||
108 | + tsc2005_pdata.esd_timeout_ms = 0; | ||
109 | + } | ||
110 | +} | ||
111 | + | ||
112 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | ||
113 | |||
114 | static struct omap_smc91x_platform_data board_smc91x_data = { | ||
115 | @@ -792,6 +833,7 @@ | ||
116 | board_smc91x_init(); | ||
117 | rx51_add_gpio_keys(); | ||
118 | rx51_init_wl1251(); | ||
119 | + rx51_init_tsc2005(); | ||
120 | spi_register_board_info(rx51_peripherals_spi_board_info, | ||
121 | ARRAY_SIZE(rx51_peripherals_spi_board_info)); | ||
122 | } | ||