summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-asus.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-07-10 09:22:48 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-10 09:22:48 -0700
commita91ab911df51ac364e594d5950ed508d91091498 (patch)
tree035d64bd871f752b74f9e8128244311e702d95d4 /drivers/hid/hid-asus.c
parentaf3c8d98508d37541d4bf57f13a984a7f73a328c (diff)
parent837c194a4dfedd69ddbd5a586401380190776f48 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID updates from Jiri Kosina: - open/close tracking improvements from Dmitry Torokhov - battery support improvements in Wacom driver from Jason Gerecke - Win8 support fixes from Benjamin Tissories and Hans de Geode - misc fixes to Intel-ISH driver from Arnd Bergmann - support for quite a few new devices and small assorted fixes here and there * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (35 commits) HID: intel-ish-hid: Enable Gemini Lake ish driver HID: intel-ish-hid: Enable Cannon Lake ish driver HID: wacom: fix mistake in printk HID: multitouch: optimize the sticky fingers timer HID: multitouch: fix rare Win 8 cases when the touch up event gets missing HID: multitouch: use BIT macro HID: Add driver for Retrode2 joypad adapter HID: multitouch: Add support for Google Rose Touchpad HID: multitouch: Support PTP Stick and Touchpad device HID: core: don't use negative operands when shift HID: apple: Use country code to detect ISO keyboards HID: remove no longer used hid->open field greybus: hid: remove custom locking from gb_hid_open/close HID: usbhid: remove custom locking from usbhid_open/close HID: i2c-hid: remove custom locking from i2c_hid_open/close HID: serialize hid_hw_open and hid_hw_close HID: usbhid: do not rely on hid->open when deciding to do IO HID: hiddev: use hid_hw_power instead of usbhid_get/put_power HID: hiddev: use hid_hw_open/close instead of usbhid_open/close HID: asus: Add support for Zen AiO MD-5110 keyboard ...
Diffstat (limited to 'drivers/hid/hid-asus.c')
-rw-r--r--drivers/hid/hid-asus.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
index a6268f2f7408..a4a3c38bc145 100644
--- a/drivers/hid/hid-asus.c
+++ b/drivers/hid/hid-asus.c
@@ -422,6 +422,33 @@ static int asus_input_mapping(struct hid_device *hdev,
return 1;
}
+ if ((usage->hid & HID_USAGE_PAGE) == HID_UP_MSVENDOR) {
+ set_bit(EV_REP, hi->input->evbit);
+ switch (usage->hid & HID_USAGE) {
+ case 0xff01: asus_map_key_clear(BTN_1); break;
+ case 0xff02: asus_map_key_clear(BTN_2); break;
+ case 0xff03: asus_map_key_clear(BTN_3); break;
+ case 0xff04: asus_map_key_clear(BTN_4); break;
+ case 0xff05: asus_map_key_clear(BTN_5); break;
+ case 0xff06: asus_map_key_clear(BTN_6); break;
+ case 0xff07: asus_map_key_clear(BTN_7); break;
+ case 0xff08: asus_map_key_clear(BTN_8); break;
+ case 0xff09: asus_map_key_clear(BTN_9); break;
+ case 0xff0a: asus_map_key_clear(BTN_A); break;
+ case 0xff0b: asus_map_key_clear(BTN_B); break;
+ case 0x00f1: asus_map_key_clear(KEY_WLAN); break;
+ case 0x00f2: asus_map_key_clear(KEY_BRIGHTNESSDOWN); break;
+ case 0x00f3: asus_map_key_clear(KEY_BRIGHTNESSUP); break;
+ case 0x00f4: asus_map_key_clear(KEY_DISPLAY_OFF); break;
+ case 0x00f7: asus_map_key_clear(KEY_CAMERA); break;
+ case 0x00f8: asus_map_key_clear(KEY_PROG1); break;
+ default:
+ return 0;
+ }
+
+ return 1;
+ }
+
if (drvdata->quirks & QUIRK_NO_CONSUMER_USAGES &&
(usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER) {
switch (usage->hid & HID_USAGE) {
@@ -572,6 +599,9 @@ static const struct hid_device_id asus_devices[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
USB_DEVICE_ID_ASUSTEK_T100_KEYBOARD),
QUIRK_T100_KEYBOARD | QUIRK_NO_CONSUMER_USAGES },
+ { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_ASUS_AK1D) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_ASUS_MD_5110) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_JESS, USB_DEVICE_ID_ASUS_MD_5112) },
{ }
};
MODULE_DEVICE_TABLE(hid, asus_devices);