aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/Kconfig7
-rw-r--r--drivers/hid/Makefile1
-rw-r--r--drivers/hid/hid-core.c1
-rw-r--r--drivers/hid/hid-dummy.c3
-rw-r--r--drivers/hid/hid-ids.h2
-rw-r--r--drivers/hid/hid-kye.c71
6 files changed, 85 insertions, 0 deletions
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index c16fc4fb13bf..88e16ef93247 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -143,6 +143,13 @@ config HID_EZKEY
143 ---help--- 143 ---help---
144 Support for Ezkey BTC 8193 keyboard. 144 Support for Ezkey BTC 8193 keyboard.
145 145
146config HID_KYE
147 tristate "Kye" if EMBEDDED
148 depends on USB_HID
149 default !EMBEDDED
150 ---help---
151 Support for Kye/Genius Ergo Mouse.
152
146config HID_GYRATION 153config HID_GYRATION
147 tristate "Gyration" if EMBEDDED 154 tristate "Gyration" if EMBEDDED
148 depends on USB_HID 155 depends on USB_HID
diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile
index 53e133146b58..e6b72ed0d70a 100644
--- a/drivers/hid/Makefile
+++ b/drivers/hid/Makefile
@@ -30,6 +30,7 @@ obj-$(CONFIG_DRAGONRISE_FF) += hid-drff.o
30obj-$(CONFIG_HID_EZKEY) += hid-ezkey.o 30obj-$(CONFIG_HID_EZKEY) += hid-ezkey.o
31obj-$(CONFIG_HID_GYRATION) += hid-gyration.o 31obj-$(CONFIG_HID_GYRATION) += hid-gyration.o
32obj-$(CONFIG_HID_KENSINGTON) += hid-kensington.o 32obj-$(CONFIG_HID_KENSINGTON) += hid-kensington.o
33obj-$(CONFIG_HID_KYE) += hid-kye.o
33obj-$(CONFIG_HID_LOGITECH) += hid-logitech.o 34obj-$(CONFIG_HID_LOGITECH) += hid-logitech.o
34obj-$(CONFIG_HID_MICROSOFT) += hid-microsoft.o 35obj-$(CONFIG_HID_MICROSOFT) += hid-microsoft.o
35obj-$(CONFIG_HID_MONTEREY) += hid-monterey.o 36obj-$(CONFIG_HID_MONTEREY) += hid-monterey.o
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 74bec03ef881..b96fbd5dab55 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1274,6 +1274,7 @@ static const struct hid_device_id hid_blacklist[] = {
1274 { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE) }, 1274 { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE) },
1275 { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_2) }, 1275 { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_2) },
1276 { HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) }, 1276 { HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) },
1277 { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_ERGO_525V) },
1277 { HID_USB_DEVICE(USB_VENDOR_ID_LABTEC, USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD) }, 1278 { HID_USB_DEVICE(USB_VENDOR_ID_LABTEC, USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD) },
1278 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_MX3000_RECEIVER) }, 1279 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_MX3000_RECEIVER) },
1279 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_RECEIVER) }, 1280 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_RECEIVER) },
diff --git a/drivers/hid/hid-dummy.c b/drivers/hid/hid-dummy.c
index 28815fd6c285..74d765f38624 100644
--- a/drivers/hid/hid-dummy.c
+++ b/drivers/hid/hid-dummy.c
@@ -34,6 +34,9 @@ static int __init hid_dummy_init(void)
34#ifdef CONFIG_HID_EZKEY_MODULE 34#ifdef CONFIG_HID_EZKEY_MODULE
35 HID_COMPAT_CALL_DRIVER(ezkey); 35 HID_COMPAT_CALL_DRIVER(ezkey);
36#endif 36#endif
37#ifdef CONFIG_HID_KYE_MODULE
38 HID_COMPAT_CALL_DRIVER(kye);
39#endif
37#ifdef CONFIG_HID_GYRATION_MODULE 40#ifdef CONFIG_HID_GYRATION_MODULE
38 HID_COMPAT_CALL_DRIVER(gyration); 41 HID_COMPAT_CALL_DRIVER(gyration);
39#endif 42#endif
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 65b790fd6bfa..bdeda4c7cc13 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -426,6 +426,8 @@
426#define USB_VENDOR_ID_ZEROPLUS 0x0c12 426#define USB_VENDOR_ID_ZEROPLUS 0x0c12
427 427
428#define USB_VENDOR_ID_KYE 0x0458 428#define USB_VENDOR_ID_KYE 0x0458
429#define USB_DEVICE_ID_KYE_ERGO_525V 0x0087
429#define USB_DEVICE_ID_KYE_GPEN_560 0x5003 430#define USB_DEVICE_ID_KYE_GPEN_560 0x5003
430 431
432
431#endif 433#endif
diff --git a/drivers/hid/hid-kye.c b/drivers/hid/hid-kye.c
new file mode 100644
index 000000000000..ea7f412e31a9
--- /dev/null
+++ b/drivers/hid/hid-kye.c
@@ -0,0 +1,71 @@
1/*
2 * HID driver for Kye/Genius devices not fully compliant with HID standard
3 *
4 * Copyright (c) 2009 Jiri Kosina
5 * Copyright (c) 2009 Tomas Hanak
6 */
7
8/*
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the Free
11 * Software Foundation; either version 2 of the License, or (at your option)
12 * any later version.
13 */
14
15#include <linux/device.h>
16#include <linux/hid.h>
17#include <linux/module.h>
18
19#include "hid-ids.h"
20
21/* the fixups that need to be done:
22 * - change led usage page to button for extra buttons
23 * - report size 8 count 1 must be size 1 count 8 for button bitfield
24 * - change the button usage range to 4-7 for the extra buttons
25 */
26static void kye_report_fixup(struct hid_device *hdev, __u8 *rdesc,
27 unsigned int rsize)
28{
29 if (rsize >= 74 &&
30 rdesc[61] == 0x05 && rdesc[62] == 0x08 &&
31 rdesc[63] == 0x19 && rdesc[64] == 0x08 &&
32 rdesc[65] == 0x29 && rdesc[66] == 0x0f &&
33 rdesc[71] == 0x75 && rdesc[72] == 0x08 &&
34 rdesc[73] == 0x95 && rdesc[74] == 0x01) {
35 dev_info(&hdev->dev, "fixing up Kye/Genius Ergo Mouse report "
36 "descriptor\n");
37 rdesc[62] = 0x09;
38 rdesc[64] = 0x04;
39 rdesc[66] = 0x07;
40 rdesc[72] = 0x01;
41 rdesc[74] = 0x08;
42 }
43}
44
45static const struct hid_device_id kye_devices[] = {
46 { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_ERGO_525V) },
47 { }
48};
49MODULE_DEVICE_TABLE(hid, kye_devices);
50
51static struct hid_driver kye_driver = {
52 .name = "kye",
53 .id_table = kye_devices,
54 .report_fixup = kye_report_fixup,
55};
56
57static int kye_init(void)
58{
59 return hid_register_driver(&kye_driver);
60}
61
62static void kye_exit(void)
63{
64 hid_unregister_driver(&kye_driver);
65}
66
67module_init(kye_init);
68module_exit(kye_exit);
69MODULE_LICENSE("GPL");
70
71HID_COMPAT_LOAD_DRIVER(kye);