diff options
Diffstat (limited to 'meta-moblin/packages/linux/linux-moblin-2.6.29.1/linux-2.6.29-touchkit.patch')
-rw-r--r-- | meta-moblin/packages/linux/linux-moblin-2.6.29.1/linux-2.6.29-touchkit.patch | 130 |
1 files changed, 0 insertions, 130 deletions
diff --git a/meta-moblin/packages/linux/linux-moblin-2.6.29.1/linux-2.6.29-touchkit.patch b/meta-moblin/packages/linux/linux-moblin-2.6.29.1/linux-2.6.29-touchkit.patch deleted file mode 100644 index 92e71fa31b..0000000000 --- a/meta-moblin/packages/linux/linux-moblin-2.6.29.1/linux-2.6.29-touchkit.patch +++ /dev/null | |||
@@ -1,130 +0,0 @@ | |||
1 | diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c | ||
2 | index f8f86de..5d4cea2 100644 | ||
3 | --- a/drivers/input/mouse/psmouse-base.c | ||
4 | +++ b/drivers/input/mouse/psmouse-base.c | ||
5 | @@ -676,6 +676,9 @@ static int psmouse_extensions(struct psmouse *psmouse, | ||
6 | |||
7 | if (touchkit_ps2_detect(psmouse, set_properties) == 0) | ||
8 | return PSMOUSE_TOUCHKIT_PS2; | ||
9 | + | ||
10 | + if (elftouch_ps2_detect(psmouse, set_properties) == 0) | ||
11 | + return PSMOUSE_ELFTOUCH_PS2; | ||
12 | } | ||
13 | |||
14 | /* | ||
15 | @@ -786,6 +789,12 @@ static const struct psmouse_protocol psmouse_protocols[] = { | ||
16 | .alias = "trackpoint", | ||
17 | .detect = trackpoint_detect, | ||
18 | }, | ||
19 | + { | ||
20 | + .type = PSMOUSE_ELFTOUCH_PS2, | ||
21 | + .name = "elftouchPS2", | ||
22 | + .alias = "elftouch", | ||
23 | + .detect = elftouch_ps2_detect, | ||
24 | + }, | ||
25 | #endif | ||
26 | #ifdef CONFIG_MOUSE_PS2_TOUCHKIT | ||
27 | { | ||
28 | diff --git a/drivers/input/mouse/psmouse.h b/drivers/input/mouse/psmouse.h | ||
29 | index 54ed267..8d1ba79 100644 | ||
30 | --- a/drivers/input/mouse/psmouse.h | ||
31 | +++ b/drivers/input/mouse/psmouse.h | ||
32 | @@ -89,6 +89,7 @@ enum psmouse_type { | ||
33 | PSMOUSE_TRACKPOINT, | ||
34 | PSMOUSE_TOUCHKIT_PS2, | ||
35 | PSMOUSE_CORTRON, | ||
36 | + PSMOUSE_ELFTOUCH_PS2, | ||
37 | PSMOUSE_HGPK, | ||
38 | PSMOUSE_ELANTECH, | ||
39 | PSMOUSE_AUTO /* This one should always be last */ | ||
40 | diff --git a/drivers/input/mouse/touchkit_ps2.c b/drivers/input/mouse/touchkit_ps2.c | ||
41 | index 3fadb2a..e9c27f1 100644 | ||
42 | --- a/drivers/input/mouse/touchkit_ps2.c | ||
43 | +++ b/drivers/input/mouse/touchkit_ps2.c | ||
44 | @@ -51,6 +51,11 @@ | ||
45 | #define TOUCHKIT_GET_X(packet) (((packet)[1] << 7) | (packet)[2]) | ||
46 | #define TOUCHKIT_GET_Y(packet) (((packet)[3] << 7) | (packet)[4]) | ||
47 | |||
48 | +#define ELFTOUCH_MAX_XC 0x0fff | ||
49 | +#define ELFTOUCH_MAX_YC 0x0fff | ||
50 | +#define ELFTOUCH_GET_X(packet) (((packet)[3] << 7) | (packet)[4]) | ||
51 | +#define ELFTOUCH_GET_Y(packet) (((packet)[1] << 7) | (packet)[2]) | ||
52 | + | ||
53 | static psmouse_ret_t touchkit_ps2_process_byte(struct psmouse *psmouse) | ||
54 | { | ||
55 | unsigned char *packet = psmouse->packet; | ||
56 | @@ -59,9 +64,15 @@ static psmouse_ret_t touchkit_ps2_process_byte(struct psmouse *psmouse) | ||
57 | if (psmouse->pktcnt != 5) | ||
58 | return PSMOUSE_GOOD_DATA; | ||
59 | |||
60 | - input_report_abs(dev, ABS_X, TOUCHKIT_GET_X(packet)); | ||
61 | - input_report_abs(dev, ABS_Y, TOUCHKIT_GET_Y(packet)); | ||
62 | + if(psmouse->type==PSMOUSE_ELFTOUCH_PS2) { | ||
63 | + input_report_abs(dev, ABS_X, ELFTOUCH_GET_X(packet)); | ||
64 | + input_report_abs(dev, ABS_Y, ELFTOUCH_GET_Y(packet)); | ||
65 | + } else { | ||
66 | + input_report_abs(dev, ABS_X, TOUCHKIT_GET_X(packet)); | ||
67 | + input_report_abs(dev, ABS_Y, TOUCHKIT_GET_Y(packet)); | ||
68 | + } | ||
69 | input_report_key(dev, BTN_TOUCH, TOUCHKIT_GET_TOUCHED(packet)); | ||
70 | + | ||
71 | input_sync(dev); | ||
72 | |||
73 | return PSMOUSE_FULL_PACKET; | ||
74 | @@ -98,3 +109,33 @@ int touchkit_ps2_detect(struct psmouse *psmouse, int set_properties) | ||
75 | |||
76 | return 0; | ||
77 | } | ||
78 | + | ||
79 | +int elftouch_ps2_detect(struct psmouse *psmouse, int set_properties) | ||
80 | +{ | ||
81 | + struct input_dev *dev = psmouse->dev; | ||
82 | + unsigned char param[16]; | ||
83 | + int command, res; | ||
84 | + | ||
85 | + param[0]=0x0f4; | ||
86 | + command = TOUCHKIT_SEND_PARMS(1, 0, TOUCHKIT_CMD); | ||
87 | + res=ps2_command(&psmouse->ps2dev, param, command); | ||
88 | + if(res) { return -ENODEV; } | ||
89 | + | ||
90 | + param[0]=0x0b0; | ||
91 | + command = TOUCHKIT_SEND_PARMS(1, 1, TOUCHKIT_CMD); | ||
92 | + res=ps2_command(&psmouse->ps2dev, param, command); | ||
93 | + if(res) { return -ENODEV; } | ||
94 | + | ||
95 | + if (set_properties) { | ||
96 | + dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); | ||
97 | + set_bit(BTN_TOUCH, dev->keybit); | ||
98 | + input_set_abs_params(dev, ABS_X, 0, ELFTOUCH_MAX_XC, 0, 0); | ||
99 | + input_set_abs_params(dev, ABS_Y, 0, ELFTOUCH_MAX_YC, 0, 0); | ||
100 | + | ||
101 | + psmouse->vendor = "ElfTouch"; | ||
102 | + psmouse->name = "Touchscreen"; | ||
103 | + psmouse->protocol_handler = touchkit_ps2_process_byte; | ||
104 | + psmouse->pktsize = 5; | ||
105 | + } | ||
106 | + return 0; | ||
107 | +} | ||
108 | diff --git a/drivers/input/mouse/touchkit_ps2.h b/drivers/input/mouse/touchkit_ps2.h | ||
109 | index 8a0dd35..f32ef4c 100644 | ||
110 | --- a/drivers/input/mouse/touchkit_ps2.h | ||
111 | +++ b/drivers/input/mouse/touchkit_ps2.h | ||
112 | @@ -14,12 +14,18 @@ | ||
113 | |||
114 | #ifdef CONFIG_MOUSE_PS2_TOUCHKIT | ||
115 | int touchkit_ps2_detect(struct psmouse *psmouse, int set_properties); | ||
116 | +int elftouch_ps2_detect(struct psmouse *psmouse, int set_properties); | ||
117 | #else | ||
118 | static inline int touchkit_ps2_detect(struct psmouse *psmouse, | ||
119 | int set_properties) | ||
120 | { | ||
121 | return -ENOSYS; | ||
122 | } | ||
123 | +static inline int elftouch_ps2_detect(struct psmouse *psmouse, | ||
124 | + int set_properties) | ||
125 | +{ | ||
126 | + return -ENOSYS; | ||
127 | +} | ||
128 | #endif /* CONFIG_MOUSE_PS2_TOUCHKIT */ | ||
129 | |||
130 | #endif | ||