HID: wacom: Send BTN_TOUCH in response to INTUOSP2_BT eraser contact
authorJason Gerecke <jason.gerecke@wacom.com>
Tue, 7 May 2019 18:53:20 +0000 (11:53 -0700)
committerBenjamin Tissoires <benjamin.tissoires@redhat.com>
Fri, 17 May 2019 16:21:41 +0000 (18:21 +0200)
commitfe7f8d73d1af19b678171170e4e5384deb57833d
tree2db211752d75061da65934fc9a73e5a550d14a6c
parente92a7be7fe5b2510fa60965eaf25f9e3dc08b8cc
HID: wacom: Send BTN_TOUCH in response to INTUOSP2_BT eraser contact

The Bluetooth reports from the 2nd-gen Intuos Pro have separate bits for
indicating if the tip or eraser is in contact with the tablet. At the
moment, only the tip contact bit controls the state of the BTN_TOUCH
event. This prevents the eraser from working as expected. This commit
changes the driver to send BTN_TOUCH whenever either the tip or eraser
contact bit is set.

Fixes: 4922cd26f03c ("HID: wacom: Support 2nd-gen Intuos Pro's Bluetooth classic interface")
Cc: <stable@vger.kernel.org> # 4.11+
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Aaron Skomra <aaron.skomra@wacom.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
drivers/hid/wacom_wac.c