From 957b8dffa4e3d191f0f1571d006d0e520790dcb9 Mon Sep 17 00:00:00 2001 From: João Paulo Rechi Vita Date: Mon, 24 Jul 2017 14:22:25 -0700 Subject: HID: multitouch: Support Asus T304UA media keys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Asus T304UA convertible sports a magnetic detachable keyboard with touchpad, which is connected over USB. Most of the keyboard hotkeys are exposed through the same USB interface as the touchpad, defined in the report descriptor as follows: 0x06, 0x31, 0xFF, // Usage Page (Vendor Defined 0xFF31) 0x09, 0x76, // Usage (0x76) 0xA1, 0x01, // Collection (Application) 0x05, 0xFF, // Usage Page (Reserved 0xFF) 0x85, 0x5A, // Report ID (90) 0x19, 0x00, // Usage Minimum (0x00) 0x2A, 0xFF, 0x00, // Usage Maximum (0xFF) 0x15, 0x00, // Logical Minimum (0) 0x26, 0xFF, 0x00, // Logical Maximum (255) 0x75, 0x08, // Report Size (8) 0x95, 0x0F, // Report Count (15) 0xB1, 0x02, // Feature (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile) 0x05, 0xFF, // Usage Page (Reserved 0xFF) 0x85, 0x5A, // Report ID (90) 0x19, 0x00, // Usage Minimum (0x00) 0x2A, 0xFF, 0x00, // Usage Maximum (0xFF) 0x15, 0x00, // Logical Minimum (0) 0x26, 0xFF, 0x00, // Logical Maximum (255) 0x75, 0x08, // Report Size (8) 0x95, 0x02, // Report Count (2) 0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position) 0xC0, // End Collection This UsagePage is declared as a variable, but we need to treat it as an array to be able to map each Usage we care about to its corresponding input key. Signed-off-by: João Paulo Rechi Vita Signed-off-by: Jiri Kosina --- include/linux/hid.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux/hid.h') diff --git a/include/linux/hid.h b/include/linux/hid.h index 5006f9b5d837..a08e6b15d98d 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -173,6 +173,7 @@ struct hid_item { #define HID_UP_LOGIVENDOR3 0xff430000 #define HID_UP_LNVENDOR 0xffa00000 #define HID_UP_SENSOR 0x00200000 +#define HID_UP_ASUSVENDOR 0xff310000 #define HID_USAGE 0x0000ffff @@ -292,6 +293,7 @@ struct hid_item { #define HID_DG_BARRELSWITCH2 0x000d005a #define HID_DG_TOOLSERIALNUMBER 0x000d005b +#define HID_VD_ASUS_CUSTOM_MEDIA_KEYS 0xff310076 /* * HID report types --- Ouch! HID spec says 1 2 3! */ -- cgit v1.2.3-59-g8ed1b