diff options
author | Henrik Rydberg <rydberg@euromail.se> | 2009-04-28 10:47:33 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-04-28 12:36:24 -0400 |
commit | 5e5ee686e3c0f8a3cbe9b75c2690326bf91af10d (patch) | |
tree | cfa1e26391f1252a8e47fe82cc2a76ef23e95502 /drivers/input | |
parent | 61994a61bcedf328cb1d6e96c393fc91ce64563d (diff) |
Input: add detailed multi-touch finger data report protocol
In order to utilize the full power of the new multi-touch devices, a
way to report detailed finger data to user space is needed. This patch
adds a multi-touch (MT) protocol which allows drivers to report details
for an arbitrary number of fingers.
The driver sends a SYN_MT_REPORT event via the input_mt_sync() function
when a complete finger has been reported.
In order to stay compatible with existing applications, the data
reported in a finger packet must not be recognized as single-touch
events. In addition, all finger data must bypass input filtering,
since subsequent events of the same type refer to different fingers.
A set of ABS_MT events with the desired properties are defined. The
events are divided into categories, to allow for partial implementation.
The minimum set consists of ABS_MT_TOUCH_MAJOR, ABS_MT_POSITION_X and
ABS_MT_POSITION_Y, which allows for multiple fingers to be tracked.
If the device supports it, the ABS_MT_WIDTH_MAJOR may be used to provide
the size of the approaching finger. Anisotropy and direction may be
specified with ABS_MT_TOUCH_MINOR, ABS_MT_WIDTH_MINOR and
ABS_MT_ORIENTATION. Devices with more granular information may specify
general shapes as blobs, i.e., as a sequence of rectangular shapes
grouped together by a ABS_MT_BLOB_ID. Finally, the ABS_MT_TOOL_TYPE
may be used to specify whether the touching tool is a finger or a pen.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/input.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c index 8ff92aa13a0a..e54e002665b0 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -33,6 +33,15 @@ MODULE_LICENSE("GPL"); | |||
33 | * EV_ABS events which should not be cached are listed here. | 33 | * EV_ABS events which should not be cached are listed here. |
34 | */ | 34 | */ |
35 | static unsigned int input_abs_bypass_init_data[] __initdata = { | 35 | static unsigned int input_abs_bypass_init_data[] __initdata = { |
36 | ABS_MT_TOUCH_MAJOR, | ||
37 | ABS_MT_TOUCH_MINOR, | ||
38 | ABS_MT_WIDTH_MAJOR, | ||
39 | ABS_MT_WIDTH_MINOR, | ||
40 | ABS_MT_ORIENTATION, | ||
41 | ABS_MT_POSITION_X, | ||
42 | ABS_MT_POSITION_Y, | ||
43 | ABS_MT_TOOL_TYPE, | ||
44 | ABS_MT_BLOB_ID, | ||
36 | 0 | 45 | 0 |
37 | }; | 46 | }; |
38 | static unsigned long input_abs_bypass[BITS_TO_LONGS(ABS_CNT)]; | 47 | static unsigned long input_abs_bypass[BITS_TO_LONGS(ABS_CNT)]; |
@@ -169,6 +178,10 @@ static void input_handle_event(struct input_dev *dev, | |||
169 | disposition = INPUT_PASS_TO_HANDLERS; | 178 | disposition = INPUT_PASS_TO_HANDLERS; |
170 | } | 179 | } |
171 | break; | 180 | break; |
181 | case SYN_MT_REPORT: | ||
182 | dev->sync = 0; | ||
183 | disposition = INPUT_PASS_TO_HANDLERS; | ||
184 | break; | ||
172 | } | 185 | } |
173 | break; | 186 | break; |
174 | 187 | ||