2 * HID driver for Asus notebook built-in keyboard.
3 * Fixes small logical maximum to match usage maximum.
5 * Currently supported devices are:
9 * Copyright (c) 2016 Yusuke Fujimaki <usk.fujimaki@gmail.com>
11 * This module based on hid-ortek by
12 * Copyright (c) 2010 Johnathon Harris <jmharris@gmail.com>
13 * Copyright (c) 2011 Jiri Kosina
15 * This module has been updated to add support for Asus i2c touchpad.
17 * Copyright (c) 2016 Brendan McGrath <redmcg@redmandi.dyndns.org>
18 * Copyright (c) 2016 Victor Vlasenko <victor.vlasenko@sysgears.com>
19 * Copyright (c) 2016 Frederik Wenigwieser <frederik.wenigwieser@gmail.com>
23 * This program is free software; you can redistribute it and/or modify it
24 * under the terms of the GNU General Public License as published by the Free
25 * Software Foundation; either version 2 of the License, or (at your option)
29 #include <linux/hid.h>
30 #include <linux/module.h>
31 #include <linux/input/mt.h>
32 #include <linux/usb.h> /* For to_usb_interface for T100 touchpad intf check */
36 MODULE_AUTHOR("Yusuke Fujimaki <usk.fujimaki@gmail.com>");
37 MODULE_AUTHOR("Brendan McGrath <redmcg@redmandi.dyndns.org>");
38 MODULE_AUTHOR("Victor Vlasenko <victor.vlasenko@sysgears.com>");
39 MODULE_AUTHOR("Frederik Wenigwieser <frederik.wenigwieser@gmail.com>");
40 MODULE_DESCRIPTION("Asus HID Keyboard and TouchPad");
42 #define T100_TPAD_INTF 2
44 #define T100CHI_MOUSE_REPORT_ID 0x06
45 #define FEATURE_REPORT_ID 0x0d
46 #define INPUT_REPORT_ID 0x5d
47 #define FEATURE_KBD_REPORT_ID 0x5a
48 #define FEATURE_KBD_REPORT_SIZE 16
50 #define SUPPORT_KBD_BACKLIGHT BIT(0)
52 #define MAX_TOUCH_MAJOR 8
53 #define MAX_PRESSURE 128
55 #define BTN_LEFT_MASK 0x01
56 #define CONTACT_TOOL_TYPE_MASK 0x80
57 #define CONTACT_X_MSB_MASK 0xf0
58 #define CONTACT_Y_MSB_MASK 0x0f
59 #define CONTACT_TOUCH_MAJOR_MASK 0x07
60 #define CONTACT_PRESSURE_MASK 0x7f
62 #define QUIRK_FIX_NOTEBOOK_REPORT BIT(0)
63 #define QUIRK_NO_INIT_REPORTS BIT(1)
64 #define QUIRK_SKIP_INPUT_MAPPING BIT(2)
65 #define QUIRK_IS_MULTITOUCH BIT(3)
66 #define QUIRK_NO_CONSUMER_USAGES BIT(4)
67 #define QUIRK_USE_KBD_BACKLIGHT BIT(5)
68 #define QUIRK_T100_KEYBOARD BIT(6)
69 #define QUIRK_T100CHI BIT(7)
71 #define I2C_KEYBOARD_QUIRKS (QUIRK_FIX_NOTEBOOK_REPORT | \
72 QUIRK_NO_INIT_REPORTS | \
73 QUIRK_NO_CONSUMER_USAGES)
74 #define I2C_TOUCHPAD_QUIRKS (QUIRK_NO_INIT_REPORTS | \
75 QUIRK_SKIP_INPUT_MAPPING | \
78 #define TRKID_SGN ((TRKID_MAX + 1) >> 1)
80 struct asus_kbd_leds {
81 struct led_classdev cdev;
82 struct hid_device *hdev;
83 struct work_struct work;
84 unsigned int brightness;
88 struct asus_touchpad_info {
99 struct input_dev *input;
100 struct asus_kbd_leds *kbd_backlight;
101 const struct asus_touchpad_info *tp;
102 bool enable_backlight;
105 static const struct asus_touchpad_info asus_i2c_tp = {
112 static const struct asus_touchpad_info asus_t100ta_tp = {
115 .res_x = 30, /* units/mm */
116 .res_y = 27, /* units/mm */
121 static const struct asus_touchpad_info asus_t100chi_tp = {
124 .res_x = 31, /* units/mm */
125 .res_y = 29, /* units/mm */
130 static void asus_report_contact_down(struct asus_drvdata *drvdat,
131 int toolType, u8 *data)
133 struct input_dev *input = drvdat->input;
134 int touch_major, pressure, x, y;
136 x = (data[0] & CONTACT_X_MSB_MASK) << 4 | data[1];
137 y = drvdat->tp->max_y - ((data[0] & CONTACT_Y_MSB_MASK) << 8 | data[2]);
139 input_report_abs(input, ABS_MT_POSITION_X, x);
140 input_report_abs(input, ABS_MT_POSITION_Y, y);
142 if (drvdat->tp->contact_size < 5)
145 if (toolType == MT_TOOL_PALM) {
146 touch_major = MAX_TOUCH_MAJOR;
147 pressure = MAX_PRESSURE;
149 touch_major = (data[3] >> 4) & CONTACT_TOUCH_MAJOR_MASK;
150 pressure = data[4] & CONTACT_PRESSURE_MASK;
153 input_report_abs(input, ABS_MT_TOUCH_MAJOR, touch_major);
154 input_report_abs(input, ABS_MT_PRESSURE, pressure);
157 /* Required for Synaptics Palm Detection */
158 static void asus_report_tool_width(struct asus_drvdata *drvdat)
160 struct input_mt *mt = drvdat->input->mt;
161 struct input_mt_slot *oldest;
164 if (drvdat->tp->contact_size < 5)
171 for (i = 0; i < mt->num_slots; ++i) {
172 struct input_mt_slot *ps = &mt->slots[i];
173 int id = input_mt_get_value(ps, ABS_MT_TRACKING_ID);
177 if ((id - oldid) & TRKID_SGN) {
185 input_report_abs(drvdat->input, ABS_TOOL_WIDTH,
186 input_mt_get_value(oldest, ABS_MT_TOUCH_MAJOR));
190 static int asus_report_input(struct asus_drvdata *drvdat, u8 *data, int size)
192 int i, toolType = MT_TOOL_FINGER;
193 u8 *contactData = data + 2;
195 if (size != 3 + drvdat->tp->contact_size * drvdat->tp->max_contacts)
198 for (i = 0; i < drvdat->tp->max_contacts; i++) {
199 bool down = !!(data[1] & BIT(i+3));
201 if (drvdat->tp->contact_size >= 5)
202 toolType = contactData[3] & CONTACT_TOOL_TYPE_MASK ?
203 MT_TOOL_PALM : MT_TOOL_FINGER;
205 input_mt_slot(drvdat->input, i);
206 input_mt_report_slot_state(drvdat->input, toolType, down);
209 asus_report_contact_down(drvdat, toolType, contactData);
210 contactData += drvdat->tp->contact_size;
214 input_report_key(drvdat->input, BTN_LEFT, data[1] & BTN_LEFT_MASK);
215 asus_report_tool_width(drvdat);
217 input_mt_sync_frame(drvdat->input);
218 input_sync(drvdat->input);
223 static int asus_raw_event(struct hid_device *hdev,
224 struct hid_report *report, u8 *data, int size)
226 struct asus_drvdata *drvdata = hid_get_drvdata(hdev);
228 if (drvdata->tp && data[0] == INPUT_REPORT_ID)
229 return asus_report_input(drvdata, data, size);
234 static int asus_kbd_set_report(struct hid_device *hdev, u8 *buf, size_t buf_size)
236 unsigned char *dmabuf;
239 dmabuf = kmemdup(buf, buf_size, GFP_KERNEL);
243 ret = hid_hw_raw_request(hdev, FEATURE_KBD_REPORT_ID, dmabuf,
244 buf_size, HID_FEATURE_REPORT,
251 static int asus_kbd_init(struct hid_device *hdev)
253 u8 buf[] = { FEATURE_KBD_REPORT_ID, 0x41, 0x53, 0x55, 0x53, 0x20, 0x54,
254 0x65, 0x63, 0x68, 0x2e, 0x49, 0x6e, 0x63, 0x2e, 0x00 };
257 ret = asus_kbd_set_report(hdev, buf, sizeof(buf));
259 hid_err(hdev, "Asus failed to send init command: %d\n", ret);
264 static int asus_kbd_get_functions(struct hid_device *hdev,
265 unsigned char *kbd_func)
267 u8 buf[] = { FEATURE_KBD_REPORT_ID, 0x05, 0x20, 0x31, 0x00, 0x08 };
271 ret = asus_kbd_set_report(hdev, buf, sizeof(buf));
273 hid_err(hdev, "Asus failed to send configuration command: %d\n", ret);
277 readbuf = kzalloc(FEATURE_KBD_REPORT_SIZE, GFP_KERNEL);
281 ret = hid_hw_raw_request(hdev, FEATURE_KBD_REPORT_ID, readbuf,
282 FEATURE_KBD_REPORT_SIZE, HID_FEATURE_REPORT,
285 hid_err(hdev, "Asus failed to request functions: %d\n", ret);
290 *kbd_func = readbuf[6];
296 static void asus_kbd_backlight_set(struct led_classdev *led_cdev,
297 enum led_brightness brightness)
299 struct asus_kbd_leds *led = container_of(led_cdev, struct asus_kbd_leds,
301 if (led->brightness == brightness)
304 led->brightness = brightness;
305 schedule_work(&led->work);
308 static enum led_brightness asus_kbd_backlight_get(struct led_classdev *led_cdev)
310 struct asus_kbd_leds *led = container_of(led_cdev, struct asus_kbd_leds,
313 return led->brightness;
316 static void asus_kbd_backlight_work(struct work_struct *work)
318 struct asus_kbd_leds *led = container_of(work, struct asus_kbd_leds, work);
319 u8 buf[] = { FEATURE_KBD_REPORT_ID, 0xba, 0xc5, 0xc4, 0x00 };
325 buf[4] = led->brightness;
327 ret = asus_kbd_set_report(led->hdev, buf, sizeof(buf));
329 hid_err(led->hdev, "Asus failed to set keyboard backlight: %d\n", ret);
332 static int asus_kbd_register_leds(struct hid_device *hdev)
334 struct asus_drvdata *drvdata = hid_get_drvdata(hdev);
335 unsigned char kbd_func;
338 /* Initialize keyboard */
339 ret = asus_kbd_init(hdev);
343 /* Get keyboard functions */
344 ret = asus_kbd_get_functions(hdev, &kbd_func);
348 /* Check for backlight support */
349 if (!(kbd_func & SUPPORT_KBD_BACKLIGHT))
352 drvdata->kbd_backlight = devm_kzalloc(&hdev->dev,
353 sizeof(struct asus_kbd_leds),
355 if (!drvdata->kbd_backlight)
358 drvdata->kbd_backlight->removed = false;
359 drvdata->kbd_backlight->brightness = 0;
360 drvdata->kbd_backlight->hdev = hdev;
361 drvdata->kbd_backlight->cdev.name = "asus::kbd_backlight";
362 drvdata->kbd_backlight->cdev.max_brightness = 3;
363 drvdata->kbd_backlight->cdev.brightness_set = asus_kbd_backlight_set;
364 drvdata->kbd_backlight->cdev.brightness_get = asus_kbd_backlight_get;
365 INIT_WORK(&drvdata->kbd_backlight->work, asus_kbd_backlight_work);
367 ret = devm_led_classdev_register(&hdev->dev, &drvdata->kbd_backlight->cdev);
369 /* No need to have this still around */
370 devm_kfree(&hdev->dev, drvdata->kbd_backlight);
376 static int asus_input_configured(struct hid_device *hdev, struct hid_input *hi)
378 struct input_dev *input = hi->input;
379 struct asus_drvdata *drvdata = hid_get_drvdata(hdev);
381 /* T100CHI uses MULTI_INPUT, bind the touchpad to the mouse hid_input */
382 if (drvdata->quirks & QUIRK_T100CHI &&
383 hi->report->id != T100CHI_MOUSE_REPORT_ID)
389 input_set_abs_params(input, ABS_MT_POSITION_X, 0,
390 drvdata->tp->max_x, 0, 0);
391 input_set_abs_params(input, ABS_MT_POSITION_Y, 0,
392 drvdata->tp->max_y, 0, 0);
393 input_abs_set_res(input, ABS_MT_POSITION_X, drvdata->tp->res_x);
394 input_abs_set_res(input, ABS_MT_POSITION_Y, drvdata->tp->res_y);
396 if (drvdata->tp->contact_size >= 5) {
397 input_set_abs_params(input, ABS_TOOL_WIDTH, 0,
398 MAX_TOUCH_MAJOR, 0, 0);
399 input_set_abs_params(input, ABS_MT_TOUCH_MAJOR, 0,
400 MAX_TOUCH_MAJOR, 0, 0);
401 input_set_abs_params(input, ABS_MT_PRESSURE, 0,
405 __set_bit(BTN_LEFT, input->keybit);
406 __set_bit(INPUT_PROP_BUTTONPAD, input->propbit);
408 ret = input_mt_init_slots(input, drvdata->tp->max_contacts,
412 hid_err(hdev, "Asus input mt init slots failed: %d\n", ret);
417 drvdata->input = input;
419 if (drvdata->enable_backlight && asus_kbd_register_leds(hdev))
420 hid_warn(hdev, "Failed to initialize backlight.\n");
425 #define asus_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, \
427 static int asus_input_mapping(struct hid_device *hdev,
428 struct hid_input *hi, struct hid_field *field,
429 struct hid_usage *usage, unsigned long **bit,
432 struct asus_drvdata *drvdata = hid_get_drvdata(hdev);
434 if (drvdata->quirks & QUIRK_SKIP_INPUT_MAPPING) {
435 /* Don't map anything from the HID report.
436 * We do it all manually in asus_input_configured
442 * Ignore a bunch of bogus collections in the T100CHI descriptor.
443 * This avoids a bunch of non-functional hid_input devices getting
444 * created because of the T100CHI using HID_QUIRK_MULTI_INPUT.
446 if (drvdata->quirks & QUIRK_T100CHI) {
447 if (field->application == (HID_UP_GENDESK | 0x0080) ||
448 usage->hid == (HID_UP_GENDEVCTRLS | 0x0024) ||
449 usage->hid == (HID_UP_GENDEVCTRLS | 0x0025) ||
450 usage->hid == (HID_UP_GENDEVCTRLS | 0x0026))
453 * We use the hid_input for the mouse report for the touchpad,
454 * keep the left button, to avoid the core removing it.
456 if (field->application == HID_GD_MOUSE &&
457 usage->hid != (HID_UP_BUTTON | 1))
461 /* ASUS-specific keyboard hotkeys */
462 if ((usage->hid & HID_USAGE_PAGE) == 0xff310000) {
463 set_bit(EV_REP, hi->input->evbit);
464 switch (usage->hid & HID_USAGE) {
465 case 0x10: asus_map_key_clear(KEY_BRIGHTNESSDOWN); break;
466 case 0x20: asus_map_key_clear(KEY_BRIGHTNESSUP); break;
467 case 0x35: asus_map_key_clear(KEY_DISPLAY_OFF); break;
468 case 0x6c: asus_map_key_clear(KEY_SLEEP); break;
469 case 0x82: asus_map_key_clear(KEY_CAMERA); break;
470 case 0x88: asus_map_key_clear(KEY_RFKILL); break;
471 case 0xb5: asus_map_key_clear(KEY_CALC); break;
472 case 0xc4: asus_map_key_clear(KEY_KBDILLUMUP); break;
473 case 0xc5: asus_map_key_clear(KEY_KBDILLUMDOWN); break;
475 /* ASUS touchpad toggle */
476 case 0x6b: asus_map_key_clear(KEY_F21); break;
479 case 0x38: asus_map_key_clear(KEY_PROG1); break;
481 /* Fn+C ASUS Splendid */
482 case 0xba: asus_map_key_clear(KEY_PROG2); break;
484 /* Fn+Space Power4Gear Hybrid */
485 case 0x5c: asus_map_key_clear(KEY_PROG3); break;
488 /* ASUS lazily declares 256 usages, ignore the rest,
489 * as some make the keyboard appear as a pointer device. */
494 * Check and enable backlight only on devices with UsagePage ==
495 * 0xff31 to avoid initializing the keyboard firmware multiple
496 * times on devices with multiple HID descriptors but same
499 if (drvdata->quirks & QUIRK_USE_KBD_BACKLIGHT)
500 drvdata->enable_backlight = true;
505 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_MSVENDOR) {
506 set_bit(EV_REP, hi->input->evbit);
507 switch (usage->hid & HID_USAGE) {
508 case 0xff01: asus_map_key_clear(BTN_1); break;
509 case 0xff02: asus_map_key_clear(BTN_2); break;
510 case 0xff03: asus_map_key_clear(BTN_3); break;
511 case 0xff04: asus_map_key_clear(BTN_4); break;
512 case 0xff05: asus_map_key_clear(BTN_5); break;
513 case 0xff06: asus_map_key_clear(BTN_6); break;
514 case 0xff07: asus_map_key_clear(BTN_7); break;
515 case 0xff08: asus_map_key_clear(BTN_8); break;
516 case 0xff09: asus_map_key_clear(BTN_9); break;
517 case 0xff0a: asus_map_key_clear(BTN_A); break;
518 case 0xff0b: asus_map_key_clear(BTN_B); break;
519 case 0x00f1: asus_map_key_clear(KEY_WLAN); break;
520 case 0x00f2: asus_map_key_clear(KEY_BRIGHTNESSDOWN); break;
521 case 0x00f3: asus_map_key_clear(KEY_BRIGHTNESSUP); break;
522 case 0x00f4: asus_map_key_clear(KEY_DISPLAY_OFF); break;
523 case 0x00f7: asus_map_key_clear(KEY_CAMERA); break;
524 case 0x00f8: asus_map_key_clear(KEY_PROG1); break;
532 if (drvdata->quirks & QUIRK_NO_CONSUMER_USAGES &&
533 (usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER) {
534 switch (usage->hid & HID_USAGE) {
535 case 0xe2: /* Mute */
536 case 0xe9: /* Volume up */
537 case 0xea: /* Volume down */
540 /* Ignore dummy Consumer usages which make the
541 * keyboard incorrectly appear as a pointer device.
550 static int asus_start_multitouch(struct hid_device *hdev)
553 const unsigned char buf[] = { FEATURE_REPORT_ID, 0x00, 0x03, 0x01, 0x00 };
554 unsigned char *dmabuf = kmemdup(buf, sizeof(buf), GFP_KERNEL);
558 hid_err(hdev, "Asus failed to alloc dma buf: %d\n", ret);
562 ret = hid_hw_raw_request(hdev, dmabuf[0], dmabuf, sizeof(buf),
563 HID_FEATURE_REPORT, HID_REQ_SET_REPORT);
567 if (ret != sizeof(buf)) {
568 hid_err(hdev, "Asus failed to start multitouch: %d\n", ret);
575 static int __maybe_unused asus_reset_resume(struct hid_device *hdev)
577 struct asus_drvdata *drvdata = hid_get_drvdata(hdev);
580 return asus_start_multitouch(hdev);
585 static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id)
588 struct asus_drvdata *drvdata;
590 drvdata = devm_kzalloc(&hdev->dev, sizeof(*drvdata), GFP_KERNEL);
591 if (drvdata == NULL) {
592 hid_err(hdev, "Can't alloc Asus descriptor\n");
596 hid_set_drvdata(hdev, drvdata);
598 drvdata->quirks = id->driver_data;
600 if (drvdata->quirks & QUIRK_IS_MULTITOUCH)
601 drvdata->tp = &asus_i2c_tp;
603 if (drvdata->quirks & QUIRK_T100_KEYBOARD) {
604 struct usb_interface *intf = to_usb_interface(hdev->dev.parent);
606 if (intf->altsetting->desc.bInterfaceNumber == T100_TPAD_INTF) {
607 drvdata->quirks = QUIRK_SKIP_INPUT_MAPPING;
608 drvdata->tp = &asus_t100ta_tp;
612 if (drvdata->quirks & QUIRK_T100CHI) {
614 * All functionality is on a single HID interface and for
615 * userspace the touchpad must be a separate input_dev.
617 hdev->quirks |= HID_QUIRK_MULTI_INPUT |
618 HID_QUIRK_NO_EMPTY_INPUT;
619 drvdata->tp = &asus_t100chi_tp;
622 if (drvdata->quirks & QUIRK_NO_INIT_REPORTS)
623 hdev->quirks |= HID_QUIRK_NO_INIT_REPORTS;
625 ret = hid_parse(hdev);
627 hid_err(hdev, "Asus hid parse failed: %d\n", ret);
631 ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
633 hid_err(hdev, "Asus hw start failed: %d\n", ret);
637 if (!drvdata->input) {
638 hid_err(hdev, "Asus input not registered\n");
644 drvdata->input->name = "Asus TouchPad";
646 drvdata->input->name = "Asus Keyboard";
650 ret = asus_start_multitouch(hdev);
661 static void asus_remove(struct hid_device *hdev)
663 struct asus_drvdata *drvdata = hid_get_drvdata(hdev);
665 if (drvdata->kbd_backlight) {
666 drvdata->kbd_backlight->removed = true;
667 cancel_work_sync(&drvdata->kbd_backlight->work);
673 static __u8 *asus_report_fixup(struct hid_device *hdev, __u8 *rdesc,
676 struct asus_drvdata *drvdata = hid_get_drvdata(hdev);
678 if (drvdata->quirks & QUIRK_FIX_NOTEBOOK_REPORT &&
679 *rsize >= 56 && rdesc[54] == 0x25 && rdesc[55] == 0x65) {
680 hid_info(hdev, "Fixing up Asus notebook report descriptor\n");
683 /* For the T100TA keyboard dock */
684 if (drvdata->quirks & QUIRK_T100_KEYBOARD &&
685 *rsize == 76 && rdesc[73] == 0x81 && rdesc[74] == 0x01) {
686 hid_info(hdev, "Fixing up Asus T100 keyb report descriptor\n");
687 rdesc[74] &= ~HID_MAIN_ITEM_CONSTANT;
689 /* For the T100CHI keyboard dock */
690 if (drvdata->quirks & QUIRK_T100CHI &&
691 *rsize == 403 && rdesc[388] == 0x09 && rdesc[389] == 0x76) {
693 * Change Usage (76h) to Usage Minimum (00h), Usage Maximum
694 * (FFh) and clear the flags in the Input() byte.
695 * Note the descriptor has a bogus 0 byte at the end so we
696 * only need 1 extra byte.
699 rdesc = kmemdup(rdesc, *rsize, GFP_KERNEL);
703 hid_info(hdev, "Fixing up T100CHI keyb report descriptor\n");
704 memmove(rdesc + 392, rdesc + 390, 12);
715 static const struct hid_device_id asus_devices[] = {
716 { HID_I2C_DEVICE(USB_VENDOR_ID_ASUSTEK,
717 USB_DEVICE_ID_ASUSTEK_I2C_KEYBOARD), I2C_KEYBOARD_QUIRKS},
718 { HID_I2C_DEVICE(USB_VENDOR_ID_ASUSTEK,
719 USB_DEVICE_ID_ASUSTEK_I2C_TOUCHPAD), I2C_TOUCHPAD_QUIRKS },
720 { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
721 USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD1) },
722 { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
723 USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD2), QUIRK_USE_KBD_BACKLIGHT },
724 { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
725 USB_DEVICE_ID_ASUSTEK_T100_KEYBOARD),
726 QUIRK_T100_KEYBOARD | QUIRK_NO_CONSUMER_USAGES },
727 { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_ASUS_AK1D) },
728 { HID_USB_DEVICE(USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_ASUS_MD_5110) },
729 { HID_USB_DEVICE(USB_VENDOR_ID_JESS, USB_DEVICE_ID_ASUS_MD_5112) },
730 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ASUSTEK,
731 USB_DEVICE_ID_ASUSTEK_T100CHI_KEYBOARD), QUIRK_T100CHI },
735 MODULE_DEVICE_TABLE(hid, asus_devices);
737 static struct hid_driver asus_driver = {
739 .id_table = asus_devices,
740 .report_fixup = asus_report_fixup,
742 .remove = asus_remove,
743 .input_mapping = asus_input_mapping,
744 .input_configured = asus_input_configured,
746 .reset_resume = asus_reset_resume,
748 .raw_event = asus_raw_event
750 module_hid_driver(asus_driver);
752 MODULE_LICENSE("GPL");