diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hid/hid-input.c | 18 | ||||
-rw-r--r-- | drivers/hid/usbhid/hid-core.c | 24 |
2 files changed, 30 insertions, 12 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 220e5a8381c4..a19b65ed3119 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -540,10 +540,26 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
540 | case 0x302: map_key_clear(KEY_PROG2); break; | 540 | case 0x302: map_key_clear(KEY_PROG2); break; |
541 | case 0x303: map_key_clear(KEY_PROG3); break; | 541 | case 0x303: map_key_clear(KEY_PROG3); break; |
542 | 542 | ||
543 | /* Reported on Logitech S510 wireless keyboard */ | 543 | /* Reported on certain Logitech wireless keyboards */ |
544 | case 0x1001: map_key_clear(KEY_MESSENGER); break; | ||
545 | case 0x1003: map_key_clear(KEY_SOUND); break; | ||
546 | case 0x1004: map_key_clear(KEY_VIDEO); break; | ||
547 | case 0x1005: map_key_clear(KEY_AUDIO); break; | ||
548 | case 0x100a: map_key_clear(KEY_DOCUMENTS); break; | ||
549 | case 0x1011: map_key_clear(KEY_PREVIOUSSONG); break; | ||
550 | case 0x1012: map_key_clear(KEY_NEXTSONG); break; | ||
551 | case 0x1013: map_key_clear(KEY_CAMERA); break; | ||
552 | case 0x1014: map_key_clear(KEY_MESSENGER); break; | ||
553 | case 0x1015: map_key_clear(KEY_RECORD); break; | ||
554 | case 0x1016: map_key_clear(KEY_PLAYER); break; | ||
555 | case 0x1017: map_key_clear(KEY_EJECTCD); break; | ||
556 | case 0x1019: map_key_clear(KEY_PROG1); break; | ||
557 | case 0x101a: map_key_clear(KEY_PROG2); break; | ||
558 | case 0x101b: map_key_clear(KEY_PROG3); break; | ||
544 | case 0x101f: map_key_clear(KEY_ZOOMIN); break; | 559 | case 0x101f: map_key_clear(KEY_ZOOMIN); break; |
545 | case 0x1020: map_key_clear(KEY_ZOOMOUT); break; | 560 | case 0x1020: map_key_clear(KEY_ZOOMOUT); break; |
546 | case 0x1021: map_key_clear(KEY_ZOOMRESET); break; | 561 | case 0x1021: map_key_clear(KEY_ZOOMRESET); break; |
562 | case 0x1023: map_key_clear(KEY_CLOSE); break; | ||
547 | /* this one is marked as 'Rotate' */ | 563 | /* this one is marked as 'Rotate' */ |
548 | case 0x1028: map_key_clear(KEY_ANGLE); break; | 564 | case 0x1028: map_key_clear(KEY_ANGLE); break; |
549 | case 0x1029: map_key_clear(KEY_SHUFFLE); break; | 565 | case 0x1029: map_key_clear(KEY_SHUFFLE); break; |
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index c94516c05a4e..762cb35e769b 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c | |||
@@ -225,9 +225,10 @@ MODULE_PARM_DESC(mousepoll, "Polling interval of mice"); | |||
225 | #define USB_DEVICE_ID_LD_MACHINETEST 0x2040 | 225 | #define USB_DEVICE_ID_LD_MACHINETEST 0x2040 |
226 | 226 | ||
227 | #define USB_VENDOR_ID_LOGITECH 0x046d | 227 | #define USB_VENDOR_ID_LOGITECH 0x046d |
228 | #define USB_DEVICE_ID_LOGITECH_USB_RECEIVER 0xc101 | 228 | #define USB_DEVICE_ID_LOGITECH_RECEIVER 0xc101 |
229 | #define USB_DEVICE_ID_S510_USB_RECEIVER 0xc50c | 229 | #define USB_DEVICE_ID_S510_RECEIVER 0xc50c |
230 | #define USB_DEVICE_ID_S510_USB_RECEIVER_2 0xc517 | 230 | #define USB_DEVICE_ID_S510_RECEIVER_2 0xc517 |
231 | #define USB_DEVICE_ID_MX3000_RECEIVER 0xc513 | ||
231 | #define USB_DEVICE_ID_DINOVO_EDGE 0xc714 | 232 | #define USB_DEVICE_ID_DINOVO_EDGE 0xc714 |
232 | 233 | ||
233 | #define USB_VENDOR_ID_MCC 0x09db | 234 | #define USB_VENDOR_ID_MCC 0x09db |
@@ -297,7 +298,7 @@ static const struct hid_blacklist { | |||
297 | { USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK_7 }, | 298 | { USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK_7 }, |
298 | { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE, HID_QUIRK_2WHEEL_MOUSE_HACK_5 }, | 299 | { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE, HID_QUIRK_2WHEEL_MOUSE_HACK_5 }, |
299 | 300 | ||
300 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_USB_RECEIVER, HID_QUIRK_BAD_RELATIVE_KEYS }, | 301 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RECEIVER, HID_QUIRK_BAD_RELATIVE_KEYS }, |
301 | 302 | ||
302 | { USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_GAMEPAD, HID_QUIRK_BADPAD }, | 303 | { USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_GAMEPAD, HID_QUIRK_BADPAD }, |
303 | { USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_PREDATOR, HID_QUIRK_BADPAD }, | 304 | { USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_PREDATOR, HID_QUIRK_BADPAD }, |
@@ -434,8 +435,9 @@ static const struct hid_blacklist { | |||
434 | { USB_VENDOR_ID_ACECAD, USB_DEVICE_ID_ACECAD_FLAIR, HID_QUIRK_IGNORE }, | 435 | { USB_VENDOR_ID_ACECAD, USB_DEVICE_ID_ACECAD_FLAIR, HID_QUIRK_IGNORE }, |
435 | { USB_VENDOR_ID_ACECAD, USB_DEVICE_ID_ACECAD_302, HID_QUIRK_IGNORE }, | 436 | { USB_VENDOR_ID_ACECAD, USB_DEVICE_ID_ACECAD_302, HID_QUIRK_IGNORE }, |
436 | 437 | ||
437 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_USB_RECEIVER, HID_QUIRK_LOGITECH_S510_DESCRIPTOR }, | 438 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_MX3000_RECEIVER, HID_QUIRK_LOGITECH_DESCRIPTOR }, |
438 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_USB_RECEIVER_2, HID_QUIRK_LOGITECH_S510_DESCRIPTOR }, | 439 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_RECEIVER, HID_QUIRK_LOGITECH_DESCRIPTOR }, |
440 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_RECEIVER_2, HID_QUIRK_LOGITECH_DESCRIPTOR }, | ||
439 | 441 | ||
440 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE, HID_QUIRK_MIGHTYMOUSE | HID_QUIRK_INVERT_HWHEEL }, | 442 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE, HID_QUIRK_MIGHTYMOUSE | HID_QUIRK_INVERT_HWHEEL }, |
441 | 443 | ||
@@ -1049,16 +1051,16 @@ static void hid_fixup_sony_ps3_controller(struct usb_device *dev, int ifnum) | |||
1049 | } | 1051 | } |
1050 | 1052 | ||
1051 | /* | 1053 | /* |
1052 | * Logitech S510 keyboard sends in report #3 keys which are far | 1054 | * Certain Logitech keyboards send in report #3 keys which are far |
1053 | * above the logical maximum described in descriptor. This extends | 1055 | * above the logical maximum described in descriptor. This extends |
1054 | * the original value of 0x28c of logical maximum to 0x104d | 1056 | * the original value of 0x28c of logical maximum to 0x104d |
1055 | */ | 1057 | */ |
1056 | static void hid_fixup_s510_descriptor(unsigned char *rdesc, int rsize) | 1058 | static void hid_fixup_logitech_descriptor(unsigned char *rdesc, int rsize) |
1057 | { | 1059 | { |
1058 | if (rsize >= 90 && rdesc[83] == 0x26 | 1060 | if (rsize >= 90 && rdesc[83] == 0x26 |
1059 | && rdesc[84] == 0x8c | 1061 | && rdesc[84] == 0x8c |
1060 | && rdesc[85] == 0x02) { | 1062 | && rdesc[85] == 0x02) { |
1061 | info("Fixing up Logitech S510 report descriptor"); | 1063 | info("Fixing up Logitech keyboard report descriptor"); |
1062 | rdesc[84] = rdesc[89] = 0x4d; | 1064 | rdesc[84] = rdesc[89] = 0x4d; |
1063 | rdesc[85] = rdesc[90] = 0x10; | 1065 | rdesc[85] = rdesc[90] = 0x10; |
1064 | } | 1066 | } |
@@ -1138,8 +1140,8 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf) | |||
1138 | if ((quirks & HID_QUIRK_CYMOTION)) | 1140 | if ((quirks & HID_QUIRK_CYMOTION)) |
1139 | hid_fixup_cymotion_descriptor(rdesc, rsize); | 1141 | hid_fixup_cymotion_descriptor(rdesc, rsize); |
1140 | 1142 | ||
1141 | if (quirks & HID_QUIRK_LOGITECH_S510_DESCRIPTOR) | 1143 | if (quirks & HID_QUIRK_LOGITECH_DESCRIPTOR) |
1142 | hid_fixup_s510_descriptor(rdesc, rsize); | 1144 | hid_fixup_logitech_descriptor(rdesc, rsize); |
1143 | 1145 | ||
1144 | #ifdef CONFIG_HID_DEBUG | 1146 | #ifdef CONFIG_HID_DEBUG |
1145 | printk(KERN_DEBUG __FILE__ ": report descriptor (size %u, read %d) = ", rsize, n); | 1147 | printk(KERN_DEBUG __FILE__ ": report descriptor (size %u, read %d) = ", rsize, n); |