diff options
author | Jiri Kosina <jkosina@suse.cz> | 2007-02-21 13:27:49 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2007-03-01 03:52:45 -0500 |
commit | b55fd23ccdf32f969a7b4180c6e52d62d8e99972 (patch) | |
tree | 307897845c80f2bf61ec9d870dc95dc2c0224658 /include/linux/hid.h | |
parent | 776c0e96edecf77f827a62d2a1641cc2ca479043 (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 'include/linux/hid.h')
-rw-r--r-- | include/linux/hid.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h index d26b08f461f2..b08ad8a23699 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -6,7 +6,7 @@ | |||
6 | * | 6 | * |
7 | * Copyright (c) 1999 Andreas Gal | 7 | * Copyright (c) 1999 Andreas Gal |
8 | * Copyright (c) 2000-2001 Vojtech Pavlik | 8 | * Copyright (c) 2000-2001 Vojtech Pavlik |
9 | * Copyright (c) 2006 Jiri Kosina | 9 | * Copyright (c) 2006-2007 Jiri Kosina |
10 | */ | 10 | */ |
11 | 11 | ||
12 | /* | 12 | /* |
@@ -267,6 +267,7 @@ struct hid_item { | |||
267 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00020000 | 267 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00020000 |
268 | #define HID_QUIRK_IGNORE_MOUSE 0x00040000 | 268 | #define HID_QUIRK_IGNORE_MOUSE 0x00040000 |
269 | #define HID_QUIRK_SONY_PS3_CONTROLLER 0x00080000 | 269 | #define HID_QUIRK_SONY_PS3_CONTROLLER 0x00080000 |
270 | #define HID_QUIRK_LOGITECH_S510_DESCRIPTOR 0x00100000 | ||
270 | 271 | ||
271 | /* | 272 | /* |
272 | * This is the global environment of the parser. This information is | 273 | * This is the global environment of the parser. This information is |
@@ -292,7 +293,7 @@ struct hid_global { | |||
292 | */ | 293 | */ |
293 | 294 | ||
294 | #define HID_MAX_DESCRIPTOR_SIZE 4096 | 295 | #define HID_MAX_DESCRIPTOR_SIZE 4096 |
295 | #define HID_MAX_USAGES 1024 | 296 | #define HID_MAX_USAGES 8192 |
296 | #define HID_DEFAULT_NUM_COLLECTIONS 16 | 297 | #define HID_DEFAULT_NUM_COLLECTIONS 16 |
297 | 298 | ||
298 | struct hid_local { | 299 | struct hid_local { |