Home Home > GIT Browse > SLE12-SP5-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Neukum <oneukum@suse.com>2019-08-21 12:44:33 +0200
committerOliver Neukum <oneukum@suse.com>2019-08-21 12:44:33 +0200
commit938b6bc80d2ee3262fdc6dc1f677239f1dbb29c2 (patch)
tree105dc2750c36cbc45039562eb1ccee2d64067bd2
parent58b47126e37ac424acce5efb04e61148f9abab82 (diff)
HID: wacom: Correct distance scale for 2nd-gen Intuos devices
(bsc#1142635).
-rw-r--r--patches.fixes/0001-HID-wacom-Correct-distance-scale-for-2nd-gen-Intuos-.patch39
-rw-r--r--series.conf1
2 files changed, 40 insertions, 0 deletions
diff --git a/patches.fixes/0001-HID-wacom-Correct-distance-scale-for-2nd-gen-Intuos-.patch b/patches.fixes/0001-HID-wacom-Correct-distance-scale-for-2nd-gen-Intuos-.patch
new file mode 100644
index 0000000000..fe3f106b4c
--- /dev/null
+++ b/patches.fixes/0001-HID-wacom-Correct-distance-scale-for-2nd-gen-Intuos-.patch
@@ -0,0 +1,39 @@
+From b72fb1dcd2ea9d29417711cb302cef3006fa8d5a Mon Sep 17 00:00:00 2001
+From: Jason Gerecke <jason.gerecke@wacom.com>
+Date: Wed, 7 Aug 2019 14:11:55 -0700
+Subject: [PATCH] HID: wacom: Correct distance scale for 2nd-gen Intuos devices
+Git-commit: b72fb1dcd2ea9d29417711cb302cef3006fa8d5a
+Patch-mainline: v5.3-rc5
+References: bsc#1142635
+
+Distance values reported by 2nd-gen Intuos tablets are on an inverted
+scale (0 == far, 63 == near). We need to change them over to a normal
+scale before reporting to userspace or else userspace drivers and
+applications can get confused.
+
+Ref: https://github.com/linuxwacom/input-wacom/issues/98
+Fixes: eda01dab53 ("HID: wacom: Add four new Intuos devices")
+Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
+Cc: <stable@vger.kernel.org> # v4.4+
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Oliver Neukum <oneukum@suse.com>
+---
+ drivers/hid/wacom_wac.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
+index 50074485b88b..7a9e229e6253 100644
+--- a/drivers/hid/wacom_wac.c
++++ b/drivers/hid/wacom_wac.c
+@@ -846,6 +846,8 @@ static int wacom_intuos_general(struct wacom_wac *wacom)
+ y >>= 1;
+ distance >>= 1;
+ }
++ if (features->type == INTUOSHT2)
++ distance = features->distance_max - distance;
+ input_report_abs(input, ABS_X, x);
+ input_report_abs(input, ABS_Y, y);
+ input_report_abs(input, ABS_DISTANCE, distance);
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index 2517773daa..c82b373870 100644
--- a/series.conf
+++ b/series.conf
@@ -23416,6 +23416,7 @@
patches.fixes/0001-usb-cdc-acm-make-sure-a-refcount-is-taken-early-enou.patch
patches.fixes/0001-USB-CDC-fix-sanity-checks-in-CDC-union-parser.patch
patches.drivers/ibmvnic-Unmap-DMA-address-of-TX-descriptor-buffers-a.patch
+ patches.fixes/0001-HID-wacom-Correct-distance-scale-for-2nd-gen-Intuos-.patch
# dhowells/linux-fs keys-uefi
patches.suse/0001-KEYS-Allow-unrestricted-boot-time-addition-of-keys-t.patch