diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-09 18:50:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-09 18:50:31 -0400 |
commit | 36b774102e5ede8d0384684bd394c8285dce5a53 (patch) | |
tree | 15e44ae97f635db6a5dbe84bd4e730cfe49a86d5 /include | |
parent | 71ba22fa739029bb158144813b9e82c00326497c (diff) | |
parent | feb485d4010e450183bd422d90c0d0f6be98f932 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: handle cases of volume knobs generating relative values
HID: Logitech keyboard 0xc311 needs reset leds quirk
HID: support for logitech cordless desktop LX500 special mapping
HID: fix autocentering of PID devices
HID: separate quirks for report descriptor fixup
HID: Add NOGET quirk for all NCR devices
HID: support for Petalynx Maxter remote control
HID: fix mismatch between hid-input HUT find/search mapping and the HUT
HID: support for Gameron dual psx adaptor
USB HID: avoid flush_scheduled_work()
HID: Use menuconfig objects
HID: force hid-input for Microsoft SideWinder GameVoice device
HID: input mapping for Chicony KU-0418 tactical pad
HID: make debugging output runtime-configurable
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/hid.h | 56 |
1 files changed, 38 insertions, 18 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h index 827ee748fd4c..898103b401f1 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -263,19 +263,28 @@ struct hid_item { | |||
263 | #define HID_QUIRK_2WHEEL_MOUSE_HACK_5 0x00000100 | 263 | #define HID_QUIRK_2WHEEL_MOUSE_HACK_5 0x00000100 |
264 | #define HID_QUIRK_2WHEEL_MOUSE_HACK_ON 0x00000200 | 264 | #define HID_QUIRK_2WHEEL_MOUSE_HACK_ON 0x00000200 |
265 | #define HID_QUIRK_MIGHTYMOUSE 0x00000400 | 265 | #define HID_QUIRK_MIGHTYMOUSE 0x00000400 |
266 | #define HID_QUIRK_CYMOTION 0x00000800 | 266 | #define HID_QUIRK_POWERBOOK_HAS_FN 0x00000800 |
267 | #define HID_QUIRK_POWERBOOK_HAS_FN 0x00001000 | 267 | #define HID_QUIRK_POWERBOOK_FN_ON 0x00001000 |
268 | #define HID_QUIRK_POWERBOOK_FN_ON 0x00002000 | 268 | #define HID_QUIRK_INVERT_HWHEEL 0x00002000 |
269 | #define HID_QUIRK_INVERT_HWHEEL 0x00004000 | 269 | #define HID_QUIRK_POWERBOOK_ISO_KEYBOARD 0x00004000 |
270 | #define HID_QUIRK_POWERBOOK_ISO_KEYBOARD 0x00008000 | 270 | #define HID_QUIRK_BAD_RELATIVE_KEYS 0x00008000 |
271 | #define HID_QUIRK_BAD_RELATIVE_KEYS 0x00010000 | 271 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000 |
272 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00020000 | 272 | #define HID_QUIRK_IGNORE_MOUSE 0x00020000 |
273 | #define HID_QUIRK_IGNORE_MOUSE 0x00040000 | 273 | #define HID_QUIRK_SONY_PS3_CONTROLLER 0x00040000 |
274 | #define HID_QUIRK_SONY_PS3_CONTROLLER 0x00080000 | 274 | #define HID_QUIRK_DUPLICATE_USAGES 0x00080000 |
275 | #define HID_QUIRK_LOGITECH_DESCRIPTOR 0x00100000 | 275 | #define HID_QUIRK_RESET_LEDS 0x00100000 |
276 | #define HID_QUIRK_DUPLICATE_USAGES 0x00200000 | 276 | #define HID_QUIRK_HIDINPUT 0x00200000 |
277 | #define HID_QUIRK_RESET_LEDS 0x00400000 | 277 | #define HID_QUIRK_LOGITECH_IGNORE_DOUBLED_WHEEL 0x00400000 |
278 | #define HID_QUIRK_SWAPPED_MIN_MAX 0x00800000 | 278 | #define HID_QUIRK_LOGITECH_EXPANDED_KEYMAP 0x00800000 |
279 | |||
280 | /* | ||
281 | * Separate quirks for runtime report descriptor fixup | ||
282 | */ | ||
283 | |||
284 | #define HID_QUIRK_RDESC_CYMOTION 0x00000001 | ||
285 | #define HID_QUIRK_RDESC_LOGITECH 0x00000002 | ||
286 | #define HID_QUIRK_RDESC_SWAPPED_MIN_MAX 0x00000004 | ||
287 | #define HID_QUIRK_RDESC_PETALYNX 0x00000008 | ||
279 | 288 | ||
280 | /* | 289 | /* |
281 | * This is the global environment of the parser. This information is | 290 | * This is the global environment of the parser. This information is |
@@ -488,6 +497,11 @@ struct hid_descriptor { | |||
488 | #define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001)) | 497 | #define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001)) |
489 | 498 | ||
490 | /* HID core API */ | 499 | /* HID core API */ |
500 | |||
501 | #ifdef CONFIG_HID_DEBUG | ||
502 | extern int hid_debug; | ||
503 | #endif | ||
504 | |||
491 | extern void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32); | 505 | extern void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32); |
492 | extern void hidinput_report_event(struct hid_device *hid, struct hid_report *report); | 506 | extern void hidinput_report_event(struct hid_device *hid, struct hid_report *report); |
493 | extern int hidinput_connect(struct hid_device *); | 507 | extern int hidinput_connect(struct hid_device *); |
@@ -506,6 +520,7 @@ u32 usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct); | |||
506 | int usbhid_modify_dquirk(const u16 idVendor, const u16 idProduct, const u32 quirks); | 520 | int usbhid_modify_dquirk(const u16 idVendor, const u16 idProduct, const u32 quirks); |
507 | int usbhid_quirks_init(char **quirks_param); | 521 | int usbhid_quirks_init(char **quirks_param); |
508 | void usbhid_quirks_exit(void); | 522 | void usbhid_quirks_exit(void); |
523 | void usbhid_fixup_report_descriptor(const u16, const u16, char *, unsigned, char **); | ||
509 | 524 | ||
510 | #ifdef CONFIG_HID_FF | 525 | #ifdef CONFIG_HID_FF |
511 | int hid_ff_init(struct hid_device *hid); | 526 | int hid_ff_init(struct hid_device *hid); |
@@ -523,14 +538,19 @@ static inline int hid_pidff_init(struct hid_device *hid) { return -ENODEV; } | |||
523 | #else | 538 | #else |
524 | static inline int hid_ff_init(struct hid_device *hid) { return -1; } | 539 | static inline int hid_ff_init(struct hid_device *hid) { return -1; } |
525 | #endif | 540 | #endif |
526 | #ifdef DEBUG | 541 | |
527 | #define dbg(format, arg...) printk(KERN_DEBUG "%s: " format "\n" , \ | 542 | #ifdef CONFIG_HID_DEBUG |
528 | __FILE__ , ## arg) | 543 | #define dbg_hid(format, arg...) if (hid_debug) \ |
544 | printk(KERN_DEBUG "%s: " format ,\ | ||
545 | __FILE__ , ## arg) | ||
546 | #define dbg_hid_line(format, arg...) if (hid_debug) \ | ||
547 | printk(format, ## arg) | ||
529 | #else | 548 | #else |
530 | #define dbg(format, arg...) do {} while (0) | 549 | #define dbg_hid(format, arg...) do {} while (0) |
550 | #define dbg_hid_line dbg_hid | ||
531 | #endif | 551 | #endif |
532 | 552 | ||
533 | #define err(format, arg...) printk(KERN_ERR "%s: " format "\n" , \ | 553 | #define err_hid(format, arg...) printk(KERN_ERR "%s: " format "\n" , \ |
534 | __FILE__ , ## arg) | 554 | __FILE__ , ## arg) |
535 | #endif | 555 | #endif |
536 | 556 | ||