]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.14.129/hid-wacom-send-btn_touch-in-response-to-intuosp2_bt-eraser-contact.patch
Linux 4.14.129
[thirdparty/kernel/stable-queue.git] / releases / 4.14.129 / hid-wacom-send-btn_touch-in-response-to-intuosp2_bt-eraser-contact.patch
1 From fe7f8d73d1af19b678171170e4e5384deb57833d Mon Sep 17 00:00:00 2001
2 From: Jason Gerecke <jason.gerecke@wacom.com>
3 Date: Tue, 7 May 2019 11:53:20 -0700
4 Subject: HID: wacom: Send BTN_TOUCH in response to INTUOSP2_BT eraser contact
5
6 From: Jason Gerecke <jason.gerecke@wacom.com>
7
8 commit fe7f8d73d1af19b678171170e4e5384deb57833d upstream.
9
10 The Bluetooth reports from the 2nd-gen Intuos Pro have separate bits for
11 indicating if the tip or eraser is in contact with the tablet. At the
12 moment, only the tip contact bit controls the state of the BTN_TOUCH
13 event. This prevents the eraser from working as expected. This commit
14 changes the driver to send BTN_TOUCH whenever either the tip or eraser
15 contact bit is set.
16
17 Fixes: 4922cd26f03c ("HID: wacom: Support 2nd-gen Intuos Pro's Bluetooth classic interface")
18 Cc: <stable@vger.kernel.org> # 4.11+
19 Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
20 Reviewed-by: Aaron Skomra <aaron.skomra@wacom.com>
21 Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
22 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23
24 ---
25 drivers/hid/wacom_wac.c | 2 +-
26 1 file changed, 1 insertion(+), 1 deletion(-)
27
28 --- a/drivers/hid/wacom_wac.c
29 +++ b/drivers/hid/wacom_wac.c
30 @@ -1275,7 +1275,7 @@ static void wacom_intuos_pro2_bt_pen(str
31 input_report_abs(pen_input, ABS_PRESSURE, get_unaligned_le16(&frame[5]));
32 input_report_abs(pen_input, ABS_DISTANCE, range ? frame[13] : wacom->features.distance_max);
33
34 - input_report_key(pen_input, BTN_TOUCH, frame[0] & 0x01);
35 + input_report_key(pen_input, BTN_TOUCH, frame[0] & 0x09);
36 input_report_key(pen_input, BTN_STYLUS, frame[0] & 0x02);
37 input_report_key(pen_input, BTN_STYLUS2, frame[0] & 0x04);
38