]> git.baikalelectronics.ru Git - kernel.git/commit
HID: wacom: Don't report anything prior to the tool entering range
authorJason Gerecke <jason.gerecke@wacom.com>
Wed, 24 Apr 2019 22:12:58 +0000 (15:12 -0700)
committerBenjamin Tissoires <benjamin.tissoires@redhat.com>
Fri, 17 May 2019 14:24:03 +0000 (16:24 +0200)
commitc7fd9bbd45f5c1bc6ba167247d85ed99f4c50e37
tree6b4bed976821d13a5f569e2605eaa068ac1e9687
parent1ffc8297236bd1e385092b4a79d4ff9850c18d4e
HID: wacom: Don't report anything prior to the tool entering range

If the tool spends some time in prox before entering range, a series of
events (e.g. ABS_DISTANCE, MSC_SERIAL) can be sent before we or userspace
have any clue about the pen whose data is being reported. We need to hold
off on reporting anything until the pen has entered range. Since we still
want to report events that occur "in prox" after the pen has *left* range
we use 'wacom-tool[0]' as the indicator that the pen did at one point
enter range and provide us/userspace with tool type and serial number
information.

Fixes: 23f68744cbe1 ("HID: wacom: Bluetooth IRQ for Intuos Pro should handle prox/range")
Cc: <stable@vger.kernel.org> # 4.11+
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Aaron Armstrong Skomra <aaron.skomra@wacom.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
drivers/hid/wacom_wac.c