aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPekka Sarnila <sarnila@adit.fi>2008-03-06 07:23:14 -0500
committerJiri Kosina <jkosina@suse.cz>2008-04-22 05:34:56 -0400
commitf345c37c37641beceb0e52f61bb4cbc72904ee09 (patch)
treeedc6113daaef0218fd83c952b6b5a2146845dbc3 /include
parentcf2a299e48cbeb6c942e1f765b92ca6058355f68 (diff)
HID: fixup fullspeed interval on highspeed Afatech DVB-T IR kbd
Many vendors highspeed devices give erroneously fullspeed interval value in endpoint descriptor for interrupt endpoints. This quirk fixes up that by recalculating the right value for highspeed device. At the time of hid configuration this quirk calculates which highspeed interval value gives same interval delay as, or next smaller then, what it would be if the original value would be interpreted as fullspeed value. In subsequent urbs that new value is used instead. Forming the 'hid->name' in usb_hid_config() was moved up to accommodate more descriptive printk reporting the fixup. In this patch the quirk is set for one such device: Afatech DVB-T 2 infrared HID-keyboard. It reports value 16 which means 4,069s in highspeed while obviously 16ms was intended. In this case quirk calculates new value to be 8 which gives when interpreted as highspeed value 16ms as wanted. The behavior of the device was verified to be what expected both before and after the patch. Signed-off-by: Pekka Sarnila <sarnila@adit.fi> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'include')
-rw-r--r--include/linux/hid.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 74ff57596eb1..af1f7e57a12d 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -284,6 +284,7 @@ struct hid_item {
284#define HID_QUIRK_2WHEEL_MOUSE_HACK_B8 0x02000000 284#define HID_QUIRK_2WHEEL_MOUSE_HACK_B8 0x02000000
285#define HID_QUIRK_HWHEEL_WHEEL_INVERT 0x04000000 285#define HID_QUIRK_HWHEEL_WHEEL_INVERT 0x04000000
286#define HID_QUIRK_MICROSOFT_KEYS 0x08000000 286#define HID_QUIRK_MICROSOFT_KEYS 0x08000000
287#define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000
287 288
288/* 289/*
289 * Separate quirks for runtime report descriptor fixup 290 * Separate quirks for runtime report descriptor fixup