diff options
-rw-r--r-- | drivers/hid/Kconfig | 8 | ||||
-rw-r--r-- | drivers/hid/Makefile | 1 | ||||
-rw-r--r-- | drivers/hid/hid-core.c | 1 | ||||
-rw-r--r-- | drivers/hid/hid-ids.h | 3 | ||||
-rw-r--r-- | drivers/hid/hid-keytouch.c | 66 |
5 files changed, 79 insertions, 0 deletions
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index 94e73db580d2..5fa0b952914c 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig | |||
@@ -180,6 +180,14 @@ config HID_EZKEY | |||
180 | ---help--- | 180 | ---help--- |
181 | Support for Ezkey BTC 8193 keyboard. | 181 | Support for Ezkey BTC 8193 keyboard. |
182 | 182 | ||
183 | config HID_KEYTOUCH | ||
184 | tristate "Keyoutch HID devices" | ||
185 | depends on USB_HID | ||
186 | ---help--- | ||
187 | Support for Keytouch HID devices not fully compliant with | ||
188 | the specification. Currently supported: | ||
189 | - Keytouch IEC 60945 | ||
190 | |||
183 | config HID_KYE | 191 | config HID_KYE |
184 | tristate "Kye/Genius Ergo Mouse" if EMBEDDED | 192 | tristate "Kye/Genius Ergo Mouse" if EMBEDDED |
185 | depends on USB_HID | 193 | depends on USB_HID |
diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile index 2e1b1e3326c9..569647763d1b 100644 --- a/drivers/hid/Makefile +++ b/drivers/hid/Makefile | |||
@@ -41,6 +41,7 @@ obj-$(CONFIG_HID_ELECOM) += hid-elecom.o | |||
41 | obj-$(CONFIG_HID_EZKEY) += hid-ezkey.o | 41 | obj-$(CONFIG_HID_EZKEY) += hid-ezkey.o |
42 | obj-$(CONFIG_HID_GYRATION) += hid-gyration.o | 42 | obj-$(CONFIG_HID_GYRATION) += hid-gyration.o |
43 | obj-$(CONFIG_HID_KENSINGTON) += hid-kensington.o | 43 | obj-$(CONFIG_HID_KENSINGTON) += hid-kensington.o |
44 | obj-$(CONFIG_HID_KEYTOUCH) += hid-keytouch.o | ||
44 | obj-$(CONFIG_HID_KYE) += hid-kye.o | 45 | obj-$(CONFIG_HID_KYE) += hid-kye.o |
45 | obj-$(CONFIG_HID_LCPOWER) += hid-lcpower.o | 46 | obj-$(CONFIG_HID_LCPOWER) += hid-lcpower.o |
46 | obj-$(CONFIG_HID_LOGITECH) += hid-logitech.o | 47 | obj-$(CONFIG_HID_LOGITECH) += hid-logitech.o |
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 5e0e4eea7065..570db37d574d 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -1379,6 +1379,7 @@ static const struct hid_device_id hid_have_special_driver[] = { | |||
1379 | { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_3) }, | 1379 | { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_3) }, |
1380 | { HID_USB_DEVICE(USB_VENDOR_ID_HANVON, USB_DEVICE_ID_HANVON_MULTITOUCH) }, | 1380 | { HID_USB_DEVICE(USB_VENDOR_ID_HANVON, USB_DEVICE_ID_HANVON_MULTITOUCH) }, |
1381 | { HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) }, | 1381 | { HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) }, |
1382 | { HID_USB_DEVICE(USB_VENDOR_ID_KEYTOUCH, USB_DEVICE_ID_KEYTOUCH_IEC) }, | ||
1382 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_ERGO_525V) }, | 1383 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_ERGO_525V) }, |
1383 | { HID_USB_DEVICE(USB_VENDOR_ID_LABTEC, USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD) }, | 1384 | { HID_USB_DEVICE(USB_VENDOR_ID_LABTEC, USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD) }, |
1384 | { HID_USB_DEVICE(USB_VENDOR_ID_LCPOWER, USB_DEVICE_ID_LCPOWER_LC1000 ) }, | 1385 | { HID_USB_DEVICE(USB_VENDOR_ID_LCPOWER, USB_DEVICE_ID_LCPOWER_LC1000 ) }, |
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 15aca15a0a7b..8fc82a7b2a82 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h | |||
@@ -345,6 +345,9 @@ | |||
345 | #define USB_VENDOR_ID_KWORLD 0x1b80 | 345 | #define USB_VENDOR_ID_KWORLD 0x1b80 |
346 | #define USB_DEVICE_ID_KWORLD_RADIO_FM700 0xd700 | 346 | #define USB_DEVICE_ID_KWORLD_RADIO_FM700 0xd700 |
347 | 347 | ||
348 | #define USB_VENDOR_ID_KEYTOUCH 0x0926 | ||
349 | #define USB_DEVICE_ID_KEYTOUCH_IEC 0x3333 | ||
350 | |||
348 | #define USB_VENDOR_ID_KYE 0x0458 | 351 | #define USB_VENDOR_ID_KYE 0x0458 |
349 | #define USB_DEVICE_ID_KYE_ERGO_525V 0x0087 | 352 | #define USB_DEVICE_ID_KYE_ERGO_525V 0x0087 |
350 | #define USB_DEVICE_ID_KYE_GPEN_560 0x5003 | 353 | #define USB_DEVICE_ID_KYE_GPEN_560 0x5003 |
diff --git a/drivers/hid/hid-keytouch.c b/drivers/hid/hid-keytouch.c new file mode 100644 index 000000000000..07cd825f6f01 --- /dev/null +++ b/drivers/hid/hid-keytouch.c | |||
@@ -0,0 +1,66 @@ | |||
1 | /* | ||
2 | * HID driver for Keytouch devices not fully compliant with HID standard | ||
3 | * | ||
4 | * Copyright (c) 2011 Jiri Kosina | ||
5 | */ | ||
6 | |||
7 | /* | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the Free | ||
10 | * Software Foundation; either version 2 of the License, or (at your option) | ||
11 | * any later version. | ||
12 | */ | ||
13 | |||
14 | #include <linux/device.h> | ||
15 | #include <linux/hid.h> | ||
16 | #include <linux/module.h> | ||
17 | |||
18 | #include "hid-ids.h" | ||
19 | |||
20 | /* Replace the broken report descriptor of this device with rather | ||
21 | * a default one */ | ||
22 | static __u8 keytouch_fixed_rdesc[] = { | ||
23 | 0x05, 0x01, 0x09, 0x06, 0xa1, 0x01, 0x05, 0x07, 0x19, 0xe0, 0x29, 0xe7, 0x15, | ||
24 | 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x08, 0x81, 0x02, 0x95, 0x01, 0x75, 0x08, | ||
25 | 0x81, 0x01, 0x95, 0x03, 0x75, 0x01, 0x05, 0x08, 0x19, 0x01, 0x29, 0x03, 0x91, | ||
26 | 0x02, 0x95, 0x05, 0x75, 0x01, 0x91, 0x01, 0x95, 0x06, 0x75, 0x08, 0x15, 0x00, | ||
27 | 0x26, 0xff, 0x00, 0x05, 0x07, 0x19, 0x00, 0x2a, 0xff, 0x00, 0x81, 0x00, 0xc0 | ||
28 | }; | ||
29 | |||
30 | static __u8 *keytouch_report_fixup(struct hid_device *hdev, __u8 *rdesc, | ||
31 | unsigned int *rsize) | ||
32 | { | ||
33 | hid_info(hdev, "fixing up Keytouch IEC report descriptor\n"); | ||
34 | |||
35 | rdesc = keytouch_fixed_rdesc; | ||
36 | *rsize = sizeof(keytouch_fixed_rdesc); | ||
37 | |||
38 | return rdesc; | ||
39 | } | ||
40 | |||
41 | static const struct hid_device_id keytouch_devices[] = { | ||
42 | { HID_USB_DEVICE(USB_VENDOR_ID_KEYTOUCH, USB_DEVICE_ID_KEYTOUCH_IEC) }, | ||
43 | { } | ||
44 | }; | ||
45 | MODULE_DEVICE_TABLE(hid, keytouch_devices); | ||
46 | |||
47 | static struct hid_driver keytouch_driver = { | ||
48 | .name = "keytouch", | ||
49 | .id_table = keytouch_devices, | ||
50 | .report_fixup = keytouch_report_fixup, | ||
51 | }; | ||
52 | |||
53 | static int __init keytouch_init(void) | ||
54 | { | ||
55 | return hid_register_driver(&keytouch_driver); | ||
56 | } | ||
57 | |||
58 | static void __exit keytouch_exit(void) | ||
59 | { | ||
60 | hid_unregister_driver(&keytouch_driver); | ||
61 | } | ||
62 | |||
63 | module_init(keytouch_init); | ||
64 | module_exit(keytouch_exit); | ||
65 | MODULE_LICENSE("GPL"); | ||
66 | MODULE_AUTHOR("Jiri Kosina"); | ||