OSDN Git Service

HID: multitouch: Only look at non touch fields in first packet of a frame
authorHans de Goede <hdegoede@redhat.com>
Wed, 22 Nov 2017 11:57:09 +0000 (12:57 +0100)
committerJiri Kosina <jkosina@suse.cz>
Wed, 22 Nov 2017 15:01:06 +0000 (16:01 +0100)
commit55746d28d66860bccaae20a67b55b9d5db7c14af
treec9c499699cebc5f8f4354651dee6ca78ec5a126a
parentaf8dc4d0949092c4fba17ebb9e54448697c3d4e0
HID: multitouch: Only look at non touch fields in first packet of a frame

Devices in "single finger hybrid mode" will send one report per finger,
on some devices only the first report of such a multi-packet frame will
contain a value for BTN_LEFT, in subsequent reports (if multiple fingers
are down) the value is always 0, causing hid-mt to report BTN_LEFT going
1 - 0 - 1 - 0 when pressing a clickpad and putting down a second finger.
This happens for example on USB 0603:0002 mt touchpads.

This commit fixes this by only reporting non touch fields for the first
packet of a (possibly) multi-packet frame.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-multitouch.c