]> git.karo-electronics.de Git - linux-beck.git/commitdiff
HID: wacom: generic: Add support for vendor-defined "Fingerwheel" usage
authorJason Gerecke <killertofu@gmail.com>
Thu, 20 Oct 2016 01:03:45 +0000 (18:03 -0700)
committerJiri Kosina <jkosina@suse.cz>
Thu, 20 Oct 2016 07:53:58 +0000 (09:53 +0200)
The airbrush fingerwheel does not have a usage that corresponds cleanly
with a standard HID usage, so we add explicit support for it via its
vendor-defined usage.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_wac.c
drivers/hid/wacom_wac.h

index f78ad77d9ed78392ed92ac8e5ea0eb1f9616c3c1..81467c982734e15e7577b1eb1bb99649927515e8 100644 (file)
@@ -1539,6 +1539,9 @@ static void wacom_wac_pen_usage_mapping(struct hid_device *hdev,
        case HID_DG_TOOLSERIALNUMBER:
                wacom_map_usage(input, usage, field, EV_MSC, MSC_SERIAL, 0);
                break;
+       case WACOM_HID_WD_FINGERWHEEL:
+               wacom_map_usage(input, usage, field, EV_ABS, ABS_WHEEL, 0);
+               break;
        }
 }
 
index 63a5a2586707df6e846008aade8679d2010a1282..544755929c2f9607ac7347b34492e50acb48512e 100644 (file)
@@ -89,6 +89,7 @@
 #define WACOM_HID_SP_DIGITIZERINFO      0x00100000
 #define WACOM_HID_WD_DIGITIZER          (WACOM_HID_UP_WACOMDIGITIZER | 0x01)
 #define WACOM_HID_WD_DISTANCE           (WACOM_HID_UP_WACOMDIGITIZER | 0x0132)
+#define WACOM_HID_WD_FINGERWHEEL        (WACOM_HID_UP_WACOMDIGITIZER | 0x0d03)
 #define WACOM_HID_WD_DATAMODE           (WACOM_HID_UP_WACOMDIGITIZER | 0x1002)
 #define WACOM_HID_UP_G9                 0xff090000
 #define WACOM_HID_G9_PEN                (WACOM_HID_UP_G9 | 0x02)