diff options
-rw-r--r-- | drivers/hid/Kconfig | 6 | ||||
-rw-r--r-- | drivers/hid/Makefile | 1 | ||||
-rw-r--r-- | drivers/hid/hid-asus.c | 48 | ||||
-rw-r--r-- | drivers/hid/hid-core.c | 1 | ||||
-rw-r--r-- | drivers/hid/hid-ids.h | 1 |
5 files changed, 57 insertions, 0 deletions
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index 411722570035..513c93e2c650 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig | |||
@@ -134,6 +134,12 @@ config HID_APPLEIR | |||
134 | 134 | ||
135 | Say Y here if you want support for Apple infrared remote control. | 135 | Say Y here if you want support for Apple infrared remote control. |
136 | 136 | ||
137 | config HID_ASUS | ||
138 | tristate "Asus" | ||
139 | depends on I2C_HID | ||
140 | ---help--- | ||
141 | Support for Asus X205TA built-in keyboard via i2c. | ||
142 | |||
137 | config HID_AUREAL | 143 | config HID_AUREAL |
138 | tristate "Aureal" | 144 | tristate "Aureal" |
139 | depends on HID | 145 | depends on HID |
diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile index be56ab6f75a8..a2fb562de748 100644 --- a/drivers/hid/Makefile +++ b/drivers/hid/Makefile | |||
@@ -24,6 +24,7 @@ obj-$(CONFIG_HID_A4TECH) += hid-a4tech.o | |||
24 | obj-$(CONFIG_HID_ACRUX) += hid-axff.o | 24 | obj-$(CONFIG_HID_ACRUX) += hid-axff.o |
25 | obj-$(CONFIG_HID_APPLE) += hid-apple.o | 25 | obj-$(CONFIG_HID_APPLE) += hid-apple.o |
26 | obj-$(CONFIG_HID_APPLEIR) += hid-appleir.o | 26 | obj-$(CONFIG_HID_APPLEIR) += hid-appleir.o |
27 | obj-$(CONFIG_HID_ASUS) += hid-asus.o | ||
27 | obj-$(CONFIG_HID_AUREAL) += hid-aureal.o | 28 | obj-$(CONFIG_HID_AUREAL) += hid-aureal.o |
28 | obj-$(CONFIG_HID_BELKIN) += hid-belkin.o | 29 | obj-$(CONFIG_HID_BELKIN) += hid-belkin.o |
29 | obj-$(CONFIG_HID_BETOP_FF) += hid-betopff.o | 30 | obj-$(CONFIG_HID_BETOP_FF) += hid-betopff.o |
diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c new file mode 100644 index 000000000000..1734e11298ed --- /dev/null +++ b/drivers/hid/hid-asus.c | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | * HID driver for Asus X205TA built-in keyboard. | ||
3 | * Fixes small logical maximum to match usage maximum. | ||
4 | * | ||
5 | * Copyright (c) 2016 Yusuke Fujimaki <usk.fujimaki@gmail.com> | ||
6 | * | ||
7 | * This module based on hid-ortek by | ||
8 | * Copyright (c) 2010 Johnathon Harris <jmharris@gmail.com> | ||
9 | * Copyright (c) 2011 Jiri Kosina | ||
10 | */ | ||
11 | |||
12 | /* | ||
13 | * This program is free software; you can redistribute it and/or modify it | ||
14 | * under the terms of the GNU General Public License as published by the Free | ||
15 | * Software Foundation; either version 2 of the License, or (at your option) | ||
16 | * any later version. | ||
17 | */ | ||
18 | |||
19 | #include <linux/device.h> | ||
20 | #include <linux/hid.h> | ||
21 | #include <linux/module.h> | ||
22 | |||
23 | #include "hid-ids.h" | ||
24 | |||
25 | static __u8 *asus_report_fixup(struct hid_device *hdev, __u8 *rdesc, | ||
26 | unsigned int *rsize) | ||
27 | { | ||
28 | if (*rsize >= 180 && rdesc[54] == 0x25 && rdesc[55] == 0x65) { | ||
29 | hid_info(hdev, "Fixing up Asus X205TA report descriptor\n"); | ||
30 | rdesc[55] = 0xdd; | ||
31 | } | ||
32 | return rdesc; | ||
33 | } | ||
34 | |||
35 | static const struct hid_device_id asus_devices[] = { | ||
36 | { HID_I2C_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_X205TA_KEYBOARD) }, | ||
37 | { } | ||
38 | }; | ||
39 | MODULE_DEVICE_TABLE(hid, asus_devices); | ||
40 | |||
41 | static struct hid_driver asus_driver = { | ||
42 | .name = "asus", | ||
43 | .id_table = asus_devices, | ||
44 | .report_fixup = asus_report_fixup | ||
45 | }; | ||
46 | module_hid_driver(asus_driver); | ||
47 | |||
48 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index bdb8cc89cacc..7426b5aabf27 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -1856,6 +1856,7 @@ static const struct hid_device_id hid_have_special_driver[] = { | |||
1856 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_JIS) }, | 1856 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_JIS) }, |
1857 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) }, | 1857 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) }, |
1858 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) }, | 1858 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) }, |
1859 | { HID_I2C_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_X205TA_KEYBOARD) }, | ||
1859 | { HID_USB_DEVICE(USB_VENDOR_ID_AUREAL, USB_DEVICE_ID_AUREAL_W01RN) }, | 1860 | { HID_USB_DEVICE(USB_VENDOR_ID_AUREAL, USB_DEVICE_ID_AUREAL_W01RN) }, |
1860 | { HID_USB_DEVICE(USB_VENDOR_ID_BELKIN, USB_DEVICE_ID_FLIP_KVM) }, | 1861 | { HID_USB_DEVICE(USB_VENDOR_ID_BELKIN, USB_DEVICE_ID_FLIP_KVM) }, |
1861 | { HID_USB_DEVICE(USB_VENDOR_ID_BETOP_2185BFM, 0x2208) }, | 1862 | { HID_USB_DEVICE(USB_VENDOR_ID_BETOP_2185BFM, 0x2208) }, |
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 5c0e43ed5c53..f83e7fd0626b 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h | |||
@@ -163,6 +163,7 @@ | |||
163 | #define USB_VENDOR_ID_ASUSTEK 0x0b05 | 163 | #define USB_VENDOR_ID_ASUSTEK 0x0b05 |
164 | #define USB_DEVICE_ID_ASUSTEK_LCM 0x1726 | 164 | #define USB_DEVICE_ID_ASUSTEK_LCM 0x1726 |
165 | #define USB_DEVICE_ID_ASUSTEK_LCM2 0x175b | 165 | #define USB_DEVICE_ID_ASUSTEK_LCM2 0x175b |
166 | #define USB_DEVICE_ID_ASUSTEK_X205TA_KEYBOARD 0x8585 | ||
166 | 167 | ||
167 | #define USB_VENDOR_ID_ATEN 0x0557 | 168 | #define USB_VENDOR_ID_ATEN 0x0557 |
168 | #define USB_DEVICE_ID_ATEN_UC100KM 0x2004 | 169 | #define USB_DEVICE_ID_ATEN_UC100KM 0x2004 |