lkml.org 
[lkml]   [2012]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 20/20] HID: hid-multitouch: Add missing contact count detection
From
On Sat, Sep 1, 2012 at 9:47 PM, Henrik Rydberg <rydberg@euromail.se> wrote:
> Some devices report the number of contacts via the CONTACTCOUNT usage,
> rather than using the CONTACTMAX feature. Without this patch, such
> devices will be capped to ten fingers, the default maximum. Fixes a
> long-standing regression on 3M and similar panels.
>
> Cc: Benjamin Tissoires <benjamin.tissoires@enac.fr>
> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
> ---
> Since this patch looks like it could be backported as-is: In 3.6,
> maxcontacts may be modified after the slots have been initialized,
> leaving the patch harmless but ineffective.
>
> drivers/hid/hid-multitouch.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
> index eee19c9..2fc5335 100644
> --- a/drivers/hid/hid-multitouch.c
> +++ b/drivers/hid/hid-multitouch.c
> @@ -388,6 +388,8 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
> td->last_field_index = field->index;
> return 1;
> case HID_DG_CONTACTCOUNT:
> + if (td->maxcontacts < field->logical_maximum + 1)
> + td->maxcontacts = field->logical_maximum + 1;

Hi Henrik,

Unfortunately, this is not working. We have bad devices that present either:
- a null logical_maximum (some Stantum do) -> the value 1 is assigned
to maxcontacts, and the device is turned into a mono touch....
- an obviously wrong value (with respect to the current state of the
devices) -> Quanta devices report 255 there.... and they support only
2 touches....

And of course, 3M decided to stop sending 60 touches on their recent
devices: we have here a 0x506 device that present a contact_count of
max 60, a maximum contact feature of max 60, but whatever I'm doing,
it does not want to send more than 10 touches....

Cheers,
Benjamin

> td->last_field_index = field->index;
> return 1;
> case HID_DG_CONTACTMAX:
> --
> 1.7.12
>


\
 
 \ /
  Last update: 2012-09-03 15:42    [W:0.172 / U:7.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site