Home Home > GIT Browse > SLE15
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-06-16 10:44:04 +0200
committerTakashi Iwai <tiwai@suse.de>2019-06-16 10:44:30 +0200
commit9c8c33cc842b5685d3e314e60e66afa7a8db70cb (patch)
tree0e640bbc05b2779d395721f04326cb9b136cbd12
parent0b7a4bded5d03dbca040a6c7c7a15a05bbfa8954 (diff)
HID: wacom: Work around HID descriptor bug in DTK-2451 and
DTH-2452 (bsc#1051510).
-rw-r--r--patches.drivers/HID-wacom-Work-around-HID-descriptor-bug-in-DTK-2451.patch70
-rw-r--r--series.conf1
2 files changed, 71 insertions, 0 deletions
diff --git a/patches.drivers/HID-wacom-Work-around-HID-descriptor-bug-in-DTK-2451.patch b/patches.drivers/HID-wacom-Work-around-HID-descriptor-bug-in-DTK-2451.patch
new file mode 100644
index 0000000000..bb67013b58
--- /dev/null
+++ b/patches.drivers/HID-wacom-Work-around-HID-descriptor-bug-in-DTK-2451.patch
@@ -0,0 +1,70 @@
+From 11db8173dbab7a94cf5ba5225fcedbfc0f3b7e54 Mon Sep 17 00:00:00 2001
+From: Jason Gerecke <killertofu@gmail.com>
+Date: Wed, 10 Oct 2018 13:40:26 -0700
+Subject: [PATCH] HID: wacom: Work around HID descriptor bug in DTK-2451 and DTH-2452
+Git-commit: 11db8173dbab7a94cf5ba5225fcedbfc0f3b7e54
+Patch-mainline: v4.20-rc1
+References: bsc#1051510
+
+The DTK-2451 and DTH-2452 have a buggy HID descriptor which incorrectly
+contains a Cintiq-like report, complete with pen tilt, rotation, twist, serial
+number, etc. The hardware doesn't actually support this data but our driver
+duitifully sets up the device as though it does. To ensure userspace has a
+correct view of devices without updated firmware, we clean up this incorrect
+data in wacom_setup_device_quirks.
+
+We're also careful to clear the WACOM_QUIRK_TOOLSERIAL flag since its presence
+causes the driver to wait for serial number information (via
+wacom_wac_pen_serial_enforce) that never comes, resulting in
+the pen being non-responsive.
+
+Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
+Fixes: 8341720642 ("HID: wacom: Queue events with missing type/serial data for later processing")
+Cc: stable@vger.kernel.org # v4.16+
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/hid/wacom_wac.c | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
+index e0a06be5ef5c..5dd3a8245f0f 100644
+--- a/drivers/hid/wacom_wac.c
++++ b/drivers/hid/wacom_wac.c
+@@ -3335,6 +3335,7 @@ static void wacom_setup_intuos(struct wacom_wac *wacom_wac)
+
+ void wacom_setup_device_quirks(struct wacom *wacom)
+ {
++ struct wacom_wac *wacom_wac = &wacom->wacom_wac;
+ struct wacom_features *features = &wacom->wacom_wac.features;
+
+ /* The pen and pad share the same interface on most devices */
+@@ -3464,6 +3465,24 @@ void wacom_setup_device_quirks(struct wacom *wacom)
+
+ if (features->type == REMOTE)
+ features->device_type |= WACOM_DEVICETYPE_WL_MONITOR;
++
++ /* HID descriptor for DTK-2451 / DTH-2452 claims to report lots
++ * of things it shouldn't. Lets fix up the damage...
++ */
++ if (wacom->hdev->product == 0x382 || wacom->hdev->product == 0x37d) {
++ features->quirks &= ~WACOM_QUIRK_TOOLSERIAL;
++ __clear_bit(BTN_TOOL_BRUSH, wacom_wac->pen_input->keybit);
++ __clear_bit(BTN_TOOL_PENCIL, wacom_wac->pen_input->keybit);
++ __clear_bit(BTN_TOOL_AIRBRUSH, wacom_wac->pen_input->keybit);
++ __clear_bit(ABS_Z, wacom_wac->pen_input->absbit);
++ __clear_bit(ABS_DISTANCE, wacom_wac->pen_input->absbit);
++ __clear_bit(ABS_TILT_X, wacom_wac->pen_input->absbit);
++ __clear_bit(ABS_TILT_Y, wacom_wac->pen_input->absbit);
++ __clear_bit(ABS_WHEEL, wacom_wac->pen_input->absbit);
++ __clear_bit(ABS_MISC, wacom_wac->pen_input->absbit);
++ __clear_bit(MSC_SERIAL, wacom_wac->pen_input->mscbit);
++ __clear_bit(EV_MSC, wacom_wac->pen_input->evbit);
++ }
+ }
+
+ int wacom_setup_pen_input_capabilities(struct input_dev *input_dev,
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index bbcc51ab65..043c4917b3 100644
--- a/series.conf
+++ b/series.conf
@@ -19700,6 +19700,7 @@
patches.fixes/Documentation-l1tf-Fix-small-spelling-typo.patch
patches.drivers/mfd-menelaus-Fix-possible-race-condition-and-leak.patch
patches.drivers/mfd-arizona-Correct-calling-of-runtime_put_sync.patch
+ patches.drivers/HID-wacom-Work-around-HID-descriptor-bug-in-DTK-2451.patch
patches.drivers/power-supply-max8998-charger-Fix-platform-data-retri.patch
patches.fixes/libnvdimm-hold-reference-on-parent-while-scheduling-async-init.patch
patches.fixes/libnvdimm-region-fail-badblocks-listing-for-inactive-regions.patch