summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-cubox-i-3.0.35/0005-ENGR00271359-Add-Multi-touch-support.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-cubox-i-3.0.35/0005-ENGR00271359-Add-Multi-touch-support.patch')
-rw-r--r--recipes-kernel/linux/linux-cubox-i-3.0.35/0005-ENGR00271359-Add-Multi-touch-support.patch98
1 files changed, 98 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-cubox-i-3.0.35/0005-ENGR00271359-Add-Multi-touch-support.patch b/recipes-kernel/linux/linux-cubox-i-3.0.35/0005-ENGR00271359-Add-Multi-touch-support.patch
new file mode 100644
index 0000000..cb20198
--- /dev/null
+++ b/recipes-kernel/linux/linux-cubox-i-3.0.35/0005-ENGR00271359-Add-Multi-touch-support.patch
@@ -0,0 +1,98 @@
1From 538f4bb2f7a51f267395550a5be9f0ab2e426712 Mon Sep 17 00:00:00 2001
2From: Erik Boto <erik.boto@pelagicore.com>
3Date: Tue, 16 Jul 2013 12:06:05 -0500
4Subject: [PATCH] ENGR00271359 Add Multi-touch support
5Organization: O.S. Systems Software LTDA.
6
7The previous behavior of the driver did not work properly with Qt5
8QtQuick multi touch-point gestures, due to how touch-points are
9reported when removing a touch-point. My interpretation of the
10available documentation [1] was that the driver should report all
11touch-points between SYN_REPORTs, but it is not explicitly stated so.
12I've found another mail-thread [2] where the creator of the protocol
13states:
14
15"The protocol defines a generic way of sending a variable amount of
16contacts. The contact count is obtained by counting the number of
17non-empty finger packets between SYN_REPORT events."-Henrik Rydberg
18
19I think this verifies my assumption that all touch-points should be
20reported between SYN_REPORTs, otherwise it can not be used to obtain
21the count.
22
23[1] https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt
24[2] http://lists.x.org/archives/xorg-devel/2010-March/006466.html
25
26Upstream-Status: Pending
27
28Signed-off-by: Erik Boto <erik.boto@pelagicore.com>
29Signed-off-by: Mahesh Mahadevan <Mahesh.Mahadevan@freescale.com>
30(cherry picked from commit 7cba001c5a502680f6dbf902821726779a9c9287)
31---
32 drivers/input/touchscreen/egalax_ts.c | 36 +++++++++++++++++------------------
33 1 file changed, 18 insertions(+), 18 deletions(-)
34
35diff --git a/drivers/input/touchscreen/egalax_ts.c b/drivers/input/touchscreen/egalax_ts.c
36index 0b6cde7..271f820 100644
37--- a/drivers/input/touchscreen/egalax_ts.c
38+++ b/drivers/input/touchscreen/egalax_ts.c
39@@ -133,7 +133,6 @@ retry:
40 }
41
42 if (down) {
43- /* should also report old pointers */
44 events[id].valid = valid;
45 events[id].status = down;
46 events[id].x = x;
47@@ -144,23 +143,6 @@ retry:
48 input_report_abs(input_dev, ABS_Y, y);
49 input_event(data->input_dev, EV_KEY, BTN_TOUCH, 1);
50 input_report_abs(input_dev, ABS_PRESSURE, 1);
51-#else
52- for (i = 0; i < MAX_SUPPORT_POINTS; i++) {
53- if (!events[i].valid)
54- continue;
55- dev_dbg(&client->dev, "report id:%d valid:%d x:%d y:%d",
56- i, valid, x, y);
57-
58- input_report_abs(input_dev,
59- ABS_MT_TRACKING_ID, i);
60- input_report_abs(input_dev,
61- ABS_MT_TOUCH_MAJOR, 1);
62- input_report_abs(input_dev,
63- ABS_MT_POSITION_X, events[i].x);
64- input_report_abs(input_dev,
65- ABS_MT_POSITION_Y, events[i].y);
66- input_mt_sync(input_dev);
67- }
68 #endif
69 } else {
70 dev_dbg(&client->dev, "release id:%d\n", id);
71@@ -176,6 +158,24 @@ retry:
72 #endif
73 }
74
75+#ifndef CONFIG_TOUCHSCREEN_EGALAX_SINGLE_TOUCH
76+ /* report all pointers */
77+ for (i = 0; i < MAX_SUPPORT_POINTS; i++) {
78+ if (!events[i].valid)
79+ continue;
80+ dev_dbg(&client->dev, "report id:%d valid:%d x:%d y:%d",
81+ i, valid, x, y);
82+ input_report_abs(input_dev,
83+ ABS_MT_TRACKING_ID, i);
84+ input_report_abs(input_dev,
85+ ABS_MT_TOUCH_MAJOR, 1);
86+ input_report_abs(input_dev,
87+ ABS_MT_POSITION_X, events[i].x);
88+ input_report_abs(input_dev,
89+ ABS_MT_POSITION_Y, events[i].y);
90+ input_mt_sync(input_dev);
91+ }
92+#endif
93 input_sync(input_dev);
94 return IRQ_HANDLED;
95 }
96--
971.8.4.rc3
98