From 85cbea3952135ecad4b47cb6cc57e25279129e2d Mon Sep 17 00:00:00 2001 From: Jiri Kosina Date: Thu, 5 Apr 2007 12:23:09 +0200 Subject: USB HID: Logitech MX3000 keyboard needs report descriptor quirk Logitech MX3000 contains report descriptor which doesn't cover usages above 0x28c, but emits such usages. Report descriptor needs fixing in the very same way as with receivers shipped with S510 keyboards. This patch also adds a few mappings for multimedia keys that S510 didn't emit. Signed-off-by: Jiri Kosina --- include/linux/hid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/hid.h b/include/linux/hid.h index 8c97d4d3fdb0..55184415fd6b 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -267,7 +267,7 @@ struct hid_item { #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00020000 #define HID_QUIRK_IGNORE_MOUSE 0x00040000 #define HID_QUIRK_SONY_PS3_CONTROLLER 0x00080000 -#define HID_QUIRK_LOGITECH_S510_DESCRIPTOR 0x00100000 +#define HID_QUIRK_LOGITECH_DESCRIPTOR 0x00100000 #define HID_QUIRK_DUPLICATE_USAGES 0x00200000 /* -- cgit v1.2.3 From 713c8aad6b7202671ce1ac6109f6b48d8223e938 Mon Sep 17 00:00:00 2001 From: Pete Zaitcev Date: Fri, 6 Apr 2007 14:33:18 +0200 Subject: USB HID: numlock quirk for dell W7658 keyboard On Dell W7658 keyboard, when BIOS sets NumLock LED on, it survives the takeover by kernel and thus confuses users. Eating of an increasibly scarce quirk bit is unfortunate. We do it for safety, given the history of nervous input devices which crash if anything unusual happens. Signed-off-by: Pete Zaitcev Signed-off-by: Jiri Kosina --- include/linux/hid.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/hid.h b/include/linux/hid.h index 55184415fd6b..d73b24b1e265 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -269,6 +269,7 @@ struct hid_item { #define HID_QUIRK_SONY_PS3_CONTROLLER 0x00080000 #define HID_QUIRK_LOGITECH_DESCRIPTOR 0x00100000 #define HID_QUIRK_DUPLICATE_USAGES 0x00200000 +#define HID_QUIRK_RESET_LEDS 0x00400000 /* * This is the global environment of the parser. This information is -- cgit v1.2.3 From 2eb5dc30eb87aa30f67e3dff39d5c9f3fb643260 Mon Sep 17 00:00:00 2001 From: Paul Walmsley Date: Thu, 19 Apr 2007 13:27:04 +0200 Subject: USB HID: encapsulate quirk handling into hid-quirks.c Move the USB_VENDOR* and USB_DEVICE* defines and the hid_blacklist[] array there from hid-core.c. Add hid-quirks.c:usbhid_lookup_any_quirks() to return quirk information to hid-core.c. Convert __u32, __u16 types to u32, u16. Signed-off-by: Paul Walmsley Signed-off-by: Jiri Kosina --- include/linux/hid.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/linux/hid.h b/include/linux/hid.h index d73b24b1e265..23e0dcf8ec41 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -495,6 +495,8 @@ void hid_output_report(struct hid_report *report, __u8 *data); void hid_free_device(struct hid_device *device); struct hid_device *hid_parse_report(__u8 *start, unsigned size); +u32 usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct); + #ifdef CONFIG_HID_FF int hid_ff_init(struct hid_device *hid); -- cgit v1.2.3 From 8cef908235bcac898a4f4ccc50c781e08022a579 Mon Sep 17 00:00:00 2001 From: Paul Walmsley Date: Thu, 19 Apr 2007 14:37:44 +0200 Subject: USB HID: add support for dynamically-created quirks Add internal support for dynamically-allocated HID quirks, "dquirks" (for "dynamic quirks"). Includes several functions to add/modify quirks from the list. This code is used by the next patch to implement quirk modification upon module load. Signed-off-by: Paul Walmsley Signed-off-by: Jiri Kosina --- include/linux/hid.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/hid.h b/include/linux/hid.h index 23e0dcf8ec41..4ba456d71f6b 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -496,6 +496,7 @@ void hid_free_device(struct hid_device *device); struct hid_device *hid_parse_report(__u8 *start, unsigned size); u32 usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct); +int usbhid_modify_dquirk(const u16 idVendor, const u16 idProduct, const u32 quirks); #ifdef CONFIG_HID_FF int hid_ff_init(struct hid_device *hid); -- cgit v1.2.3 From 876b9276b993723f7a74d55b3b49b9186f05d09d Mon Sep 17 00:00:00 2001 From: Paul Walmsley Date: Thu, 19 Apr 2007 14:56:12 +0200 Subject: USB HID: add 'quirks' module parameter Add a 'quirks' module parameter for the usbhid module, so users can add or modify quirks at module load time. Signed-off-by: Paul Walmsley Signed-off-by: Jiri Kosina --- include/linux/hid.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/linux/hid.h b/include/linux/hid.h index 4ba456d71f6b..37076b116ed0 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -247,6 +247,11 @@ struct hid_item { * HID device quirks. */ +/* + * Increase this if you need to configure more HID quirks at module load time + */ +#define MAX_USBHID_BOOT_QUIRKS 4 + #define HID_QUIRK_INVERT 0x00000001 #define HID_QUIRK_NOTOUCH 0x00000002 #define HID_QUIRK_IGNORE 0x00000004 @@ -495,8 +500,11 @@ void hid_output_report(struct hid_report *report, __u8 *data); void hid_free_device(struct hid_device *device); struct hid_device *hid_parse_report(__u8 *start, unsigned size); +/* HID quirks API */ u32 usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct); int usbhid_modify_dquirk(const u16 idVendor, const u16 idProduct, const u32 quirks); +int usbhid_quirks_init(char **quirks_param); +void usbhid_quirks_exit(void); #ifdef CONFIG_HID_FF int hid_ff_init(struct hid_device *hid); -- cgit v1.2.3