Skip to content

Commit 0e1f37d

Browse files
Aleix Roca Nonellbentiss
authored andcommitted
HID: asus: Add support for the ASUS T101HA keyboard dock
The ASUS T101HA keyboard dock generates HID events using the ASUS vendor specific UsagePage 0xff31. In consequence, some multimedia keys such as brightness up and down are not working with hid-generic. This commit adds the T101HA dock into the supported device list of the hid-asus driver. It also prevents the dock's integrated touchpad to be bound with hid-asus given that it is already working fine with hid-multitouch. Signed-off-by: Aleix Roca Nonell <kernelrocks@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
1 parent 2340bad commit 0e1f37d

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

drivers/hid/hid-asus.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ MODULE_DESCRIPTION("Asus HID Keyboard and TouchPad");
7070
#define QUIRK_T100_KEYBOARD BIT(6)
7171
#define QUIRK_T100CHI BIT(7)
7272
#define QUIRK_G752_KEYBOARD BIT(8)
73+
#define QUIRK_T101HA_DOCK BIT(9)
7374

7475
#define I2C_KEYBOARD_QUIRKS (QUIRK_FIX_NOTEBOOK_REPORT | \
7576
QUIRK_NO_INIT_REPORTS | \
@@ -699,6 +700,11 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id)
699700
return ret;
700701
}
701702

703+
/* use hid-multitouch for T101HA touchpad */
704+
if (id->driver_data & QUIRK_T101HA_DOCK &&
705+
hdev->collection->usage == HID_GD_MOUSE)
706+
return -ENODEV;
707+
702708
ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
703709
if (ret) {
704710
hid_err(hdev, "Asus hw start failed: %d\n", ret);
@@ -830,6 +836,8 @@ static const struct hid_device_id asus_devices[] = {
830836
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
831837
USB_DEVICE_ID_ASUSTEK_T100TAF_KEYBOARD),
832838
QUIRK_T100_KEYBOARD | QUIRK_NO_CONSUMER_USAGES },
839+
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
840+
USB_DEVICE_ID_ASUSTEK_T101HA_KEYBOARD), QUIRK_T101HA_DOCK },
833841
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_ASUS_AK1D) },
834842
{ HID_USB_DEVICE(USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_ASUS_MD_5110) },
835843
{ HID_USB_DEVICE(USB_VENDOR_ID_JESS, USB_DEVICE_ID_ASUS_MD_5112) },

drivers/hid/hid-ids.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@
184184
#define USB_DEVICE_ID_ASUSTEK_T100TA_KEYBOARD 0x17e0
185185
#define USB_DEVICE_ID_ASUSTEK_T100TAF_KEYBOARD 0x1807
186186
#define USB_DEVICE_ID_ASUSTEK_T100CHI_KEYBOARD 0x8502
187+
#define USB_DEVICE_ID_ASUSTEK_T101HA_KEYBOARD 0x183d
187188
#define USB_DEVICE_ID_ASUSTEK_T304_KEYBOARD 0x184a
188189
#define USB_DEVICE_ID_ASUSTEK_I2C_KEYBOARD 0x8585
189190
#define USB_DEVICE_ID_ASUSTEK_I2C_TOUCHPAD 0x0101

0 commit comments

Comments
 (0)