lkml.org 
[lkml]   [2009]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] input: mt: Augment the event semantics documentation
Dmitry Torokhov wrote:
> On Wednesday 20 May 2009 01:16:16 Henrik Rydberg wrote:
>> Dmitry Torokhov wrote:
>>> Hi Henrik,
>>>
>>> On Sun, May 17, 2009 at 10:51:19PM +0200, Henrik Rydberg wrote:
>>>> Through the collaboration to adapt the N-trig and Stantum HID
>>>> drivers to the MT protocol, some semantic clarifications to the
>>>> protocol have been made. This patch adds them to the MT documentation.
>>>>
>>>> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
>>>> Tested-by: Stéphane Chatty <chatty@enac.fr>
>>> I was wondering if the following changes would not make the text a bit
>>> better:
>> They do, thanks. I got more comments on the text, perhaps it is easiest
>> if I send an additional patch on top of this one, with your changes
>> included? It seems folding a patch is easier than to find out what
>> changes were made to the changes.
>>
>
> Sure, send it along.
>

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>

diff --git a/Documentation/input/multi-touch-protocol.txt b/Documentation/input/multi-touch-protocol.txt
index dd755c2..a12ea3b 100644
--- a/Documentation/input/multi-touch-protocol.txt
+++ b/Documentation/input/multi-touch-protocol.txt
@@ -21,9 +21,9 @@ packet. The end of a packet is marked by calling the input_mt_sync()
function, which generates a SYN_MT_REPORT event. This instructs the
receiver to accept the data for the current finger and prepare to receive
another. The end of a multi-touch transfer is marked by calling the usual
-input_sync() function. This instructs the receiver to perform actions based
-on the received packets, and prepare to receive a new set of finger
-packets.
+input_sync() function. This instructs the receiver to act upon events
+accumulated since last EV_SYN/SYN_REPORT and prepare to receive a new
+set of events/packets.

A set of ABS_MT events with the desired properties is defined. The events
are divided into categories, to allow for partial implementation. The
@@ -39,6 +39,19 @@ shapes grouped together by an ABS_MT_BLOB_ID. Finally, for the few devices
that currently support it, the ABS_MT_TRACKING_ID event may be used to
report finger tracking from hardware [5].

+Here is what a minimal event sequence for a two-finger touch would look
+like:
+
+ ABS_MT_TOUCH_MAJOR
+ ABS_MT_POSITION_X
+ ABS_MT_POSITION_Y
+ SYN_MT_REPORT
+ ABS_MT_TOUCH_MAJOR
+ ABS_MT_POSITION_X
+ ABS_MT_POSITION_Y
+ SYN_MT_REPORT
+ SYN_REPORT
+

Event Semantics
---------------
@@ -79,8 +92,8 @@ ABS_MT_ORIENTATION
The orientation of the ellipse. The value should describe a signed quarter
of a revolution clockwise around the touch center. The signed value range
is arbitrary, but zero should be returned for a finger aligned along the Y
-axis of the surface, something negative when twisted to the left, and
-something positive when twisted to the right. When completely aligned with
+axis of the surface, a negative value when finger is turned to the left, and
+a positive value when finger turned to the right. When completely aligned with
the X axis, the range max should be returned. Orientation can be omitted
if the touching object is circular, or if the information is not available
in the kernel driver. Partial orientation support is possible if the device
@@ -107,7 +120,7 @@ ABS_MT_BLOB_ID

The BLOB_ID groups several packets together into one arbitrarily shaped
contact. This is a low-level anonymous grouping, and should not be confused
-with the high-level trackingID [5]. Most kernel drivers will not have this
+with the high-level trackingID [5]. Most kernel drivers will not have blob
capability, and can safely omit the event.

ABS_MT_TRACKING_ID
@@ -153,9 +166,9 @@ problem of assigning a set of anonymous fingers to a set of identified
fingers is a euclidian bipartite matching problem at each event update, and
relies on a sufficiently rapid update rate.

-There are a few devices that support trackingID in hardware. The X driver
-can make use of these native identifiers to reduce evdev bandwidth and cpu
-usage.
+There are a few devices that support trackingID in hardware. User space can
+make use of these native identifiers to reduce bandwidth and cpu usage.
+

Notes
-----
@@ -176,7 +189,7 @@ could be used to derive tilt.
time of writing (April 2009), the MT protocol is not yet merged, and the
prototype implements finger matching, basic mouse support and two-finger
scrolling. The project aims at improving the quality of current multi-touch
-functionality available in the synaptics X driver, and in addition
+functionality available in the Synaptics X driver, and in addition
implement more advanced gestures.
[4] See the section on event computation.
[5] See the section on finger tracking.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2009-05-20 11:01    [W:0.037 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site