lkml.org 
[lkml]   [2010]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] input: mt: Document the MT event slot protocol (rev4)
Ping Cheng wrote:
> On Sun, May 23, 2010 at 3:27 PM, Henrik Rydberg <rydberg@euromail.se> wrote:
>> Randy Dunlap wrote:
>> [...]
>>>> +Protocol Usage
>>>> +--------------
>>>> +
>>>> +Contact details are sent sequentially as separate packets of ABS_MT
>>>> +events. Only the ABS_MT events are recognized as part of a contact
>>>> +packet. Since these events are ignored by current single-touch (ST)
>>>> +applications, the MT protocol can be implemented on top of the ST protocol
>>>> +in an existing driver.
>>>> +
>>>> +Drivers for type A devices mark the end of a packet by calling the
>>> end?
>
> Since Randy brought this question up, I feel the urge to say
> something. I know there are X drivers and clients using the type A
> format so I am not suggesting that we need to change this format.

It is tempting to try to make type B backwards compatible, but unfortunately,
that is not possible. A type A receiver will always expect all data, and a type
B device will never send all data.

>
> What I am thinking is that we only need one SYN_ call for both _MT_
> and regular data combined, which is a call to input_sync() at the end
> of the whole packet. The SYN_MT_ can be replaced by the following
> example, which I think is more "client-friendly". This solution is
> based on the fact that the major difference between type A and type B
> is whether we need to filter the data or not:
>
> ABS_MT_RANDOM 0
> ABS_MT_POSITION_X x[0]
> ABS_MT_POSITION_Y y[0]
> ABS_MT_ RANDOM 1
> ABS_MT_POSITION_X x[1]
> ABS_MT_POSITION_Y y[1]
> SYN_REPORT
>
> input_set_abs_params(input_dev, ABS_MT_RANDOM, 0, 2, 0, 0);
>
> would tell the clients that they can expect two random touches.

And if you do s/RANDOM/SLOT/, you end up with what? ;-)

Henrik



\
 
 \ /
  Last update: 2010-05-24 09:17    [W:0.046 / U:15.064 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site