aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/hid/Kconfig11
-rw-r--r--drivers/hid/hid-core.c1
-rw-r--r--drivers/hid/hid-ids.h3
-rw-r--r--drivers/hid/hid-ortek.c16
4 files changed, 26 insertions, 5 deletions
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index b7ec4057841d..111da3c6965b 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -340,10 +340,17 @@ config HID_NTRIG
340 Support for N-Trig touch screen. 340 Support for N-Trig touch screen.
341 341
342config HID_ORTEK 342config HID_ORTEK
343 tristate "Ortek PKB-1700/WKB-2000 wireless keyboard and mouse trackpad" 343 tristate "Ortek PKB-1700/WKB-2000/Skycable wireless keyboard and mouse trackpad"
344 depends on USB_HID 344 depends on USB_HID
345 ---help--- 345 ---help---
346 Support for Ortek PKB-1700/WKB-2000 wireless keyboard + mouse trackpad. 346 There are certain devices which have LogicalMaximum wrong in the keyboard
347 usage page of their report descriptor. The most prevailing ones so far
348 are manufactured by Ortek, thus the name of the driver. Currently
349 supported devices by this driver are
350
351 - Ortek PKB-1700
352 - Ortek WKB-2000
353 - Skycable wireless presenter
347 354
348config HID_PANTHERLORD 355config HID_PANTHERLORD
349 tristate "Pantherlord/GreenAsia game controller" 356 tristate "Pantherlord/GreenAsia game controller"
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index c3d66269ed7d..9809b58e3c7d 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1448,6 +1448,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
1448 { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_PYRA_WIRED) }, 1448 { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_PYRA_WIRED) },
1449 { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) }, 1449 { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) },
1450 { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) }, 1450 { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) },
1451 { HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },
1451 { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) }, 1452 { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
1452 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) }, 1453 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
1453 { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE) }, 1454 { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE) },
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index d485894ff4db..56e8e4ab65d0 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -521,6 +521,9 @@
521#define USB_DEVICE_ID_SAMSUNG_IR_REMOTE 0x0001 521#define USB_DEVICE_ID_SAMSUNG_IR_REMOTE 0x0001
522#define USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE 0x0600 522#define USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE 0x0600
523 523
524#define USB_VENDOR_ID_SKYCABLE 0x1223
525#define USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER 0x3F07
526
524#define USB_VENDOR_ID_SONY 0x054c 527#define USB_VENDOR_ID_SONY 0x054c
525#define USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE 0x024b 528#define USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE 0x024b
526#define USB_DEVICE_ID_SONY_PS3_CONTROLLER 0x0268 529#define USB_DEVICE_ID_SONY_PS3_CONTROLLER 0x0268
diff --git a/drivers/hid/hid-ortek.c b/drivers/hid/hid-ortek.c
index f9b7dd4f607f..0ffa1d2d64f0 100644
--- a/drivers/hid/hid-ortek.c
+++ b/drivers/hid/hid-ortek.c
@@ -1,8 +1,14 @@
1/* 1/*
2 * HID driver for Ortek PKB-1700/WKB-2000 (wireless keyboard + mouse trackpad). 2 * HID driver for various devices which are apparently based on the same chipset
3 * Fixes LogicalMaximum error in HID report description. 3 * from certain vendor which produces chips that contain wrong LogicalMaximum
4 * value in their HID report descriptor. Currently supported devices are:
5 *
6 * Ortek PKB-1700
7 * Ortek WKB-2000
8 * Skycable wireless presenter
4 * 9 *
5 * Copyright (c) 2010 Johnathon Harris <jmharris@gmail.com> 10 * Copyright (c) 2010 Johnathon Harris <jmharris@gmail.com>
11 * Copyright (c) 2011 Jiri Kosina
6 */ 12 */
7 13
8/* 14/*
@@ -22,8 +28,11 @@ static __u8 *ortek_report_fixup(struct hid_device *hdev, __u8 *rdesc,
22 unsigned int *rsize) 28 unsigned int *rsize)
23{ 29{
24 if (*rsize >= 56 && rdesc[54] == 0x25 && rdesc[55] == 0x01) { 30 if (*rsize >= 56 && rdesc[54] == 0x25 && rdesc[55] == 0x01) {
25 hid_info(hdev, "Fixing up Ortek WKB-2000 report descriptor\n"); 31 hid_info(hdev, "Fixing up logical minimum in report descriptor (Ortek)\n");
26 rdesc[55] = 0x92; 32 rdesc[55] = 0x92;
33 } else if (*rsize >= 54 && rdesc[52] == 0x25 && rdesc[53] == 0x01) {
34 hid_info(hdev, "Fixing up logical minimum in report descriptor (Skycable)\n");
35 rdesc[53] = 0x65;
27 } 36 }
28 return rdesc; 37 return rdesc;
29} 38}
@@ -31,6 +40,7 @@ static __u8 *ortek_report_fixup(struct hid_device *hdev, __u8 *rdesc,
31static const struct hid_device_id ortek_devices[] = { 40static const struct hid_device_id ortek_devices[] = {
32 { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_PKB1700) }, 41 { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_PKB1700) },
33 { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) }, 42 { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) },
43 { HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },
34 { } 44 { }
35}; 45};
36MODULE_DEVICE_TABLE(hid, ortek_devices); 46MODULE_DEVICE_TABLE(hid, ortek_devices);