aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-input.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2007-02-21 13:27:49 -0500
committerJiri Kosina <jkosina@suse.cz>2007-03-01 03:52:45 -0500
commitb55fd23ccdf32f969a7b4180c6e52d62d8e99972 (patch)
tree307897845c80f2bf61ec9d870dc95dc2c0224658 /drivers/hid/hid-input.c
parent776c0e96edecf77f827a62d2a1641cc2ca479043 (diff)
HID: fix broken Logitech S510 keyboard report descriptor; make extra keys work
This patch makes extra keys (F1-F12 in special mode, zooming, rotate, shuffle) on Logitech S510 keyboard work. Logitech S510 keyboard sends in report no. 3 keys which are far above the logical maximum described in descriptor for given report. This patch introduces a HID quirk for this wireless USB receiver/keyboard in order to fix the report descriptor before it's being parsed - the logical maximum and the number of usages is bumped up to 0x104d). The values are in the "Reserved" area of consumer HUT, so HID_MAX_USAGE had to be changed too. In addition to proper extracting of the values from report descriptor, proper HID-input mapping is introduced for them. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r--drivers/hid/hid-input.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 25d180a24fc4..eeba66513997 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -2,7 +2,7 @@
2 * $Id: hid-input.c,v 1.2 2002/04/23 00:59:25 rdamazio Exp $ 2 * $Id: hid-input.c,v 1.2 2002/04/23 00:59:25 rdamazio Exp $
3 * 3 *
4 * Copyright (c) 2000-2001 Vojtech Pavlik 4 * Copyright (c) 2000-2001 Vojtech Pavlik
5 * Copyright (c) 2006 Jiri Kosina 5 * Copyright (c) 2006-2007 Jiri Kosina
6 * 6 *
7 * HID to Linux Input mapping 7 * HID to Linux Input mapping
8 */ 8 */
@@ -532,6 +532,26 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
532 case 0x302: map_key_clear(KEY_PROG2); break; 532 case 0x302: map_key_clear(KEY_PROG2); break;
533 case 0x303: map_key_clear(KEY_PROG3); break; 533 case 0x303: map_key_clear(KEY_PROG3); break;
534 534
535 /* Reported on Logitech S510 wireless keyboard */
536 case 0x101f: map_key_clear(KEY_ZOOMIN); break;
537 case 0x1020: map_key_clear(KEY_ZOOMOUT); break;
538 case 0x1021: map_key_clear(KEY_ZOOMRESET); break;
539 /* this one is marked as 'Rotate' */
540 case 0x1028: map_key_clear(KEY_ANGLE); break;
541 case 0x1029: map_key_clear(KEY_SHUFFLE); break;
542 case 0x1041: map_key_clear(KEY_BATTERY); break;
543 case 0x1042: map_key_clear(KEY_WORDPROCESSOR); break;
544 case 0x1043: map_key_clear(KEY_SPREADSHEET); break;
545 case 0x1044: map_key_clear(KEY_PRESENTATION); break;
546 case 0x1045: map_key_clear(KEY_UNDO); break;
547 case 0x1046: map_key_clear(KEY_REDO); break;
548 case 0x1047: map_key_clear(KEY_PRINT); break;
549 case 0x1048: map_key_clear(KEY_SAVE); break;
550 case 0x1049: map_key_clear(KEY_PROG1); break;
551 case 0x104a: map_key_clear(KEY_PROG2); break;
552 case 0x104b: map_key_clear(KEY_PROG3); break;
553 case 0x104c: map_key_clear(KEY_PROG4); break;
554
535 default: goto ignore; 555 default: goto ignore;
536 } 556 }
537 break; 557 break;