summaryrefslogtreecommitdiffstats
path: root/0001-Input-wacom-make-sure-touch_max-is-set-for-touch-dev.patch
diff options
context:
space:
mode:
authorJosh Boyer <jwboyer@fedoraproject.org>2014-01-07 07:39:51 -0500
committerJosh Boyer <jwboyer@fedoraproject.org>2014-01-07 07:43:24 -0500
commit30d6f8092ed9d2d614f4b1b46401e43f934c767b (patch)
tree7c3484fb22f45717fa58b03e6898e7095c815d94 /0001-Input-wacom-make-sure-touch_max-is-set-for-touch-dev.patch
parent7a3be4ba910b95ab4d2044f66eb2fd92f1e9dff9 (diff)
downloadkernel-30d6f8092ed9d2d614f4b1b46401e43f934c767b.tar.gz
kernel-30d6f8092ed9d2d614f4b1b46401e43f934c767b.tar.xz
kernel-30d6f8092ed9d2d614f4b1b46401e43f934c767b.zip
Add support for Wacom Intuos 5 S devices (rhbz 1046238)
Diffstat (limited to '0001-Input-wacom-make-sure-touch_max-is-set-for-touch-dev.patch')
-rw-r--r--0001-Input-wacom-make-sure-touch_max-is-set-for-touch-dev.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/0001-Input-wacom-make-sure-touch_max-is-set-for-touch-dev.patch b/0001-Input-wacom-make-sure-touch_max-is-set-for-touch-dev.patch
new file mode 100644
index 000000000..f86cc1ff3
--- /dev/null
+++ b/0001-Input-wacom-make-sure-touch_max-is-set-for-touch-dev.patch
@@ -0,0 +1,56 @@
+Bugzilla: 1046238
+Upstream-status: Queued for 3.14
+
+From 1d0d6df02750b4a6f466768cbfbf860e24f4c8d4 Mon Sep 17 00:00:00 2001
+From: Ping Cheng <pinglinux@gmail.com>
+Date: Mon, 25 Nov 2013 18:43:45 -0800
+Subject: [PATCH] Input: wacom - make sure touch_max is set for touch devices
+
+Old single touch Tablet PCs do not have touch_max set at
+wacom_features. Since touch device at lease supports one
+finger, assign touch_max to 1 when touch usage is defined
+in its HID Descriptor and touch_max is not pre-defined.
+
+Tested-by: Jason Gerecke <killertofu@gmail.com>
+Signed-off-by: Ping Cheng <pingc@wacom.com>
+Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+---
+ drivers/input/tablet/wacom_sys.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
+index 8a90da1..3d71b60 100644
+--- a/drivers/input/tablet/wacom_sys.c
++++ b/drivers/input/tablet/wacom_sys.c
+@@ -304,7 +304,7 @@ static int wacom_parse_hid(struct usb_interface *intf,
+ struct usb_device *dev = interface_to_usbdev(intf);
+ char limit = 0;
+ /* result has to be defined as int for some devices */
+- int result = 0;
++ int result = 0, touch_max = 0;
+ int i = 0, usage = WCM_UNDEFINED, finger = 0, pen = 0;
+ unsigned char *report;
+
+@@ -351,7 +351,8 @@ static int wacom_parse_hid(struct usb_interface *intf,
+ if (usage == WCM_DESKTOP) {
+ if (finger) {
+ features->device_type = BTN_TOOL_FINGER;
+-
++ /* touch device at least supports one touch point */
++ touch_max = 1;
+ switch (features->type) {
+ case TABLETPC2FG:
+ features->pktlen = WACOM_PKGLEN_TPC2FG;
+@@ -504,6 +505,8 @@ static int wacom_parse_hid(struct usb_interface *intf,
+ }
+
+ out:
++ if (!features->touch_max && touch_max)
++ features->touch_max = touch_max;
+ result = 0;
+ kfree(report);
+ return result;
+--
+1.8.4.2
+