diff options
author | Henrik Rydberg <rydberg@euromail.se> | 2010-12-20 09:09:27 -0500 |
---|---|---|
committer | Henrik Rydberg <rydberg@euromail.se> | 2010-12-20 09:09:27 -0500 |
commit | 22f075a8d8bb5a8d203392df809739c1817e578f (patch) | |
tree | 4b1b61f5ca7c4cfa9bd2f522b7534012b5139988 /Documentation/input | |
parent | fcd3027abbbcc26248714eddae40af3fb3c8a82e (diff) |
input: mt: Document interface updates
This patch documents the recent input-mt interface changes.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'Documentation/input')
-rw-r--r-- | Documentation/input/multi-touch-protocol.txt | 44 |
1 files changed, 26 insertions, 18 deletions
diff --git a/Documentation/input/multi-touch-protocol.txt b/Documentation/input/multi-touch-protocol.txt index 07215fa0c588..71536e78406f 100644 --- a/Documentation/input/multi-touch-protocol.txt +++ b/Documentation/input/multi-touch-protocol.txt | |||
@@ -1,6 +1,6 @@ | |||
1 | Multi-touch (MT) Protocol | 1 | Multi-touch (MT) Protocol |
2 | ------------------------- | 2 | ------------------------- |
3 | Copyright (C) 2009 Henrik Rydberg <rydberg@euromail.se> | 3 | Copyright (C) 2009-2010 Henrik Rydberg <rydberg@euromail.se> |
4 | 4 | ||
5 | 5 | ||
6 | Introduction | 6 | Introduction |
@@ -169,12 +169,16 @@ described by adding the MINOR parameters, such that MAJOR and MINOR are the | |||
169 | major and minor axis of an ellipse. Finally, the orientation of the oval | 169 | major and minor axis of an ellipse. Finally, the orientation of the oval |
170 | shape can be describe with the ORIENTATION parameter. | 170 | shape can be describe with the ORIENTATION parameter. |
171 | 171 | ||
172 | For type A devices, further specification of the touch shape is possible | ||
173 | via ABS_MT_BLOB_ID. | ||
174 | |||
172 | The ABS_MT_TOOL_TYPE may be used to specify whether the touching tool is a | 175 | The ABS_MT_TOOL_TYPE may be used to specify whether the touching tool is a |
173 | contact or a pen or something else. Devices with more granular information | 176 | finger or a pen or something else. Finally, the ABS_MT_TRACKING_ID event |
174 | may specify general shapes as blobs, i.e., as a sequence of rectangular | 177 | may be used to track identified contacts over time [5]. |
175 | shapes grouped together by an ABS_MT_BLOB_ID. Finally, for the few devices | 178 | |
176 | that currently support it, the ABS_MT_TRACKING_ID event may be used to | 179 | In the type B protocol, ABS_MT_TOOL_TYPE and ABS_MT_TRACKING_ID are |
177 | report contact tracking from hardware [5]. | 180 | implicitly handled by input core; drivers should instead call |
181 | input_mt_report_slot_state(). | ||
178 | 182 | ||
179 | 183 | ||
180 | Event Semantics | 184 | Event Semantics |
@@ -247,21 +251,24 @@ ABS_MT_TOOL_TYPE | |||
247 | The type of approaching tool. A lot of kernel drivers cannot distinguish | 251 | The type of approaching tool. A lot of kernel drivers cannot distinguish |
248 | between different tool types, such as a finger or a pen. In such cases, the | 252 | between different tool types, such as a finger or a pen. In such cases, the |
249 | event should be omitted. The protocol currently supports MT_TOOL_FINGER and | 253 | event should be omitted. The protocol currently supports MT_TOOL_FINGER and |
250 | MT_TOOL_PEN [2]. | 254 | MT_TOOL_PEN [2]. For type B devices, this event is handled by input core; |
255 | drivers should instead use input_mt_report_slot_state(). | ||
251 | 256 | ||
252 | ABS_MT_BLOB_ID | 257 | ABS_MT_BLOB_ID |
253 | 258 | ||
254 | The BLOB_ID groups several packets together into one arbitrarily shaped | 259 | The BLOB_ID groups several packets together into one arbitrarily shaped |
255 | contact. This is a low-level anonymous grouping for type A devices, and | 260 | contact. The sequence of points forms a polygon which defines the shape of |
261 | the contact. This is a low-level anonymous grouping for type A devices, and | ||
256 | should not be confused with the high-level trackingID [5]. Most type A | 262 | should not be confused with the high-level trackingID [5]. Most type A |
257 | devices do not have blob capability, so drivers can safely omit this event. | 263 | devices do not have blob capability, so drivers can safely omit this event. |
258 | 264 | ||
259 | ABS_MT_TRACKING_ID | 265 | ABS_MT_TRACKING_ID |
260 | 266 | ||
261 | The TRACKING_ID identifies an initiated contact throughout its life cycle | 267 | The TRACKING_ID identifies an initiated contact throughout its life cycle |
262 | [5]. This event is mandatory for type B devices. The value range of the | 268 | [5]. The value range of the TRACKING_ID should be large enough to ensure |
263 | TRACKING_ID should be large enough to ensure unique identification of a | 269 | unique identification of a contact maintained over an extended period of |
264 | contact maintained over an extended period of time. | 270 | time. For type B devices, this event is handled by input core; drivers |
271 | should instead use input_mt_report_slot_state(). | ||
265 | 272 | ||
266 | 273 | ||
267 | Event Computation | 274 | Event Computation |
@@ -308,18 +315,19 @@ and with ORIENTATION, one can detect twisting of fingers. | |||
308 | Notes | 315 | Notes |
309 | ----- | 316 | ----- |
310 | 317 | ||
311 | In order to stay compatible with existing applications, the data | 318 | In order to stay compatible with existing applications, the data reported |
312 | reported in a finger packet must not be recognized as single-touch | 319 | in a finger packet must not be recognized as single-touch events. |
313 | events. In addition, all finger data must bypass input filtering, | 320 | |
314 | since subsequent events of the same type refer to different fingers. | 321 | For type A devices, all finger data bypasses input filtering, since |
322 | subsequent events of the same type refer to different fingers. | ||
315 | 323 | ||
316 | The first kernel driver to utilize the MT protocol is the bcm5974 driver, | 324 | For example usage of the type A protocol, see the bcm5974 driver. For |
317 | where examples can be found. | 325 | example usage of the type B protocol, see the hid-egalax driver. |
318 | 326 | ||
319 | [1] With the extension ABS_MT_APPROACH_X and ABS_MT_APPROACH_Y, the | 327 | [1] With the extension ABS_MT_APPROACH_X and ABS_MT_APPROACH_Y, the |
320 | difference between the contact position and the approaching tool position | 328 | difference between the contact position and the approaching tool position |
321 | could be used to derive tilt. | 329 | could be used to derive tilt. |
322 | [2] The list can of course be extended. | 330 | [2] The list can of course be extended. |
323 | [3] Multitouch X driver project: http://bitmath.org/code/multitouch/. | 331 | [3] The mtdev project: http://bitmath.org/code/mtdev/. |
324 | [4] See the section on event computation. | 332 | [4] See the section on event computation. |
325 | [5] See the section on finger tracking. | 333 | [5] See the section on finger tracking. |