aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hid.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/hid.h')
-rw-r--r--include/linux/hid.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 6e35b92b1d2c..3902690647b0 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -267,10 +267,10 @@ struct hid_item {
267#define HID_QUIRK_2WHEEL_MOUSE_HACK_5 0x00000100 267#define HID_QUIRK_2WHEEL_MOUSE_HACK_5 0x00000100
268#define HID_QUIRK_2WHEEL_MOUSE_HACK_ON 0x00000200 268#define HID_QUIRK_2WHEEL_MOUSE_HACK_ON 0x00000200
269#define HID_QUIRK_MIGHTYMOUSE 0x00000400 269#define HID_QUIRK_MIGHTYMOUSE 0x00000400
270#define HID_QUIRK_POWERBOOK_HAS_FN 0x00000800 270#define HID_QUIRK_APPLE_HAS_FN 0x00000800
271#define HID_QUIRK_POWERBOOK_FN_ON 0x00001000 271#define HID_QUIRK_APPLE_FN_ON 0x00001000
272#define HID_QUIRK_INVERT_HWHEEL 0x00002000 272#define HID_QUIRK_INVERT_HWHEEL 0x00002000
273#define HID_QUIRK_POWERBOOK_ISO_KEYBOARD 0x00004000 273#define HID_QUIRK_APPLE_ISO_KEYBOARD 0x00004000
274#define HID_QUIRK_BAD_RELATIVE_KEYS 0x00008000 274#define HID_QUIRK_BAD_RELATIVE_KEYS 0x00008000
275#define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000 275#define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000
276#define HID_QUIRK_IGNORE_MOUSE 0x00020000 276#define HID_QUIRK_IGNORE_MOUSE 0x00020000
@@ -281,6 +281,9 @@ struct hid_item {
281#define HID_QUIRK_LOGITECH_IGNORE_DOUBLED_WHEEL 0x00400000 281#define HID_QUIRK_LOGITECH_IGNORE_DOUBLED_WHEEL 0x00400000
282#define HID_QUIRK_LOGITECH_EXPANDED_KEYMAP 0x00800000 282#define HID_QUIRK_LOGITECH_EXPANDED_KEYMAP 0x00800000
283#define HID_QUIRK_IGNORE_HIDINPUT 0x01000000 283#define HID_QUIRK_IGNORE_HIDINPUT 0x01000000
284#define HID_QUIRK_2WHEEL_MOUSE_HACK_B8 0x02000000
285#define HID_QUIRK_HWHEEL_WHEEL_INVERT 0x04000000
286#define HID_QUIRK_MICROSOFT_KEYS 0x08000000
284 287
285/* 288/*
286 * Separate quirks for runtime report descriptor fixup 289 * Separate quirks for runtime report descriptor fixup
@@ -291,6 +294,8 @@ struct hid_item {
291#define HID_QUIRK_RDESC_SWAPPED_MIN_MAX 0x00000004 294#define HID_QUIRK_RDESC_SWAPPED_MIN_MAX 0x00000004
292#define HID_QUIRK_RDESC_PETALYNX 0x00000008 295#define HID_QUIRK_RDESC_PETALYNX 0x00000008
293#define HID_QUIRK_RDESC_MACBOOK_JIS 0x00000010 296#define HID_QUIRK_RDESC_MACBOOK_JIS 0x00000010
297#define HID_QUIRK_RDESC_BUTTON_CONSUMER 0x00000020
298#define HID_QUIRK_RDESC_SAMSUNG_REMOTE 0x00000040
294 299
295/* 300/*
296 * This is the global environment of the parser. This information is 301 * This is the global environment of the parser. This information is
@@ -456,6 +461,8 @@ struct hid_device { /* device report descriptor */
456 461
457 void *driver_data; 462 void *driver_data;
458 463
464 __s32 delayed_value; /* For A4 Tech mice hwheel quirk */
465
459 /* device-specific function pointers */ 466 /* device-specific function pointers */
460 int (*hidinput_input_event) (struct input_dev *, unsigned int, unsigned int, int); 467 int (*hidinput_input_event) (struct input_dev *, unsigned int, unsigned int, int);
461 int (*hid_open) (struct hid_device *); 468 int (*hid_open) (struct hid_device *);
@@ -469,7 +476,7 @@ struct hid_device { /* device report descriptor */
469 /* handler for raw output data, used by hidraw */ 476 /* handler for raw output data, used by hidraw */
470 int (*hid_output_raw_report) (struct hid_device *, __u8 *, size_t); 477 int (*hid_output_raw_report) (struct hid_device *, __u8 *, size_t);
471#ifdef CONFIG_USB_HIDINPUT_POWERBOOK 478#ifdef CONFIG_USB_HIDINPUT_POWERBOOK
472 unsigned long pb_pressed_fn[BITS_TO_LONGS(KEY_CNT)]; 479 unsigned long apple_pressed_fn[BITS_TO_LONGS(KEY_CNT)];
473 unsigned long pb_pressed_numlock[BITS_TO_LONGS(KEY_CNT)]; 480 unsigned long pb_pressed_numlock[BITS_TO_LONGS(KEY_CNT)];
474#endif 481#endif
475}; 482};
@@ -520,6 +527,9 @@ extern void hidinput_disconnect(struct hid_device *);
520int hid_set_field(struct hid_field *, unsigned, __s32); 527int hid_set_field(struct hid_field *, unsigned, __s32);
521int hid_input_report(struct hid_device *, int type, u8 *, int, int); 528int hid_input_report(struct hid_device *, int type, u8 *, int, int);
522int hidinput_find_field(struct hid_device *hid, unsigned int type, unsigned int code, struct hid_field **field); 529int hidinput_find_field(struct hid_device *hid, unsigned int type, unsigned int code, struct hid_field **field);
530int hidinput_mapping_quirks(struct hid_usage *, struct input_dev *, unsigned long **, int *);
531void hidinput_event_quirks(struct hid_device *, struct hid_field *, struct hid_usage *, __s32);
532int hidinput_apple_event(struct hid_device *, struct input_dev *, struct hid_usage *, __s32);
523void hid_input_field(struct hid_device *hid, struct hid_field *field, __u8 *data, int interrupt); 533void hid_input_field(struct hid_device *hid, struct hid_field *field, __u8 *data, int interrupt);
524void hid_output_report(struct hid_report *report, __u8 *data); 534void hid_output_report(struct hid_report *report, __u8 *data);
525void hid_free_device(struct hid_device *device); 535void hid_free_device(struct hid_device *device);