HID: multitouch: handle palm for touchscreens
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 13 Jul 2018 14:13:54 +0000 (16:13 +0200)
committerJiri Kosina <jkosina@suse.cz>
Tue, 17 Jul 2018 13:33:48 +0000 (15:33 +0200)
commit28a042a3b7ab3e28039d6309f0764a8e4c1b261d
treeeaa27045e2bf0064ee29291459037511673b50c4
parentf9024374592560ab7fac327fbacbc66aab9d6c63
HID: multitouch: handle palm for touchscreens

Usually, there is no palm rejection for touchscreens. You don't rest
your palm on the touchscreen while interacting with it.
However, some wacom devices do so because you can rest your palm while
interacting with the stylus.

Unfortunately, the spec for touchscreens[1] is less precise than the one
for touchpads[2]. This leads to a situation where it's 'legitimate'
for a touchscreen to provide both tipswitch off and confidence off in the
same report.

Work around that by keeping the slot active for one frame where we report
MT_TOOL_PALM, and then synthesizing the release event in a separate frame.
frame

Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
[rebased and new commit message]
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-multitouch.c