diff options
Diffstat (limited to 'include/linux/hid.h')
-rw-r--r-- | include/linux/hid.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h index d491027a7c22..091a81cf330f 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -281,6 +281,7 @@ struct hid_item { | |||
281 | 281 | ||
282 | #define HID_DG_DEVICECONFIG 0x000d000e | 282 | #define HID_DG_DEVICECONFIG 0x000d000e |
283 | #define HID_DG_DEVICESETTINGS 0x000d0023 | 283 | #define HID_DG_DEVICESETTINGS 0x000d0023 |
284 | #define HID_DG_AZIMUTH 0x000d003f | ||
284 | #define HID_DG_CONFIDENCE 0x000d0047 | 285 | #define HID_DG_CONFIDENCE 0x000d0047 |
285 | #define HID_DG_WIDTH 0x000d0048 | 286 | #define HID_DG_WIDTH 0x000d0048 |
286 | #define HID_DG_HEIGHT 0x000d0049 | 287 | #define HID_DG_HEIGHT 0x000d0049 |
@@ -342,6 +343,7 @@ struct hid_item { | |||
342 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000 | 343 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000 |
343 | #define HID_QUIRK_SKIP_OUTPUT_REPORT_ID 0x00020000 | 344 | #define HID_QUIRK_SKIP_OUTPUT_REPORT_ID 0x00020000 |
344 | #define HID_QUIRK_NO_OUTPUT_REPORTS_ON_INTR_EP 0x00040000 | 345 | #define HID_QUIRK_NO_OUTPUT_REPORTS_ON_INTR_EP 0x00040000 |
346 | #define HID_QUIRK_HAVE_SPECIAL_DRIVER 0x00080000 | ||
345 | #define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000 | 347 | #define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000 |
346 | #define HID_QUIRK_NO_INIT_REPORTS 0x20000000 | 348 | #define HID_QUIRK_NO_INIT_REPORTS 0x20000000 |
347 | #define HID_QUIRK_NO_IGNORE 0x40000000 | 349 | #define HID_QUIRK_NO_IGNORE 0x40000000 |
@@ -671,6 +673,7 @@ struct hid_usage_id { | |||
671 | * to be called) | 673 | * to be called) |
672 | * @dyn_list: list of dynamically added device ids | 674 | * @dyn_list: list of dynamically added device ids |
673 | * @dyn_lock: lock protecting @dyn_list | 675 | * @dyn_lock: lock protecting @dyn_list |
676 | * @match: check if the given device is handled by this driver | ||
674 | * @probe: new device inserted | 677 | * @probe: new device inserted |
675 | * @remove: device removed (NULL if not a hot-plug capable driver) | 678 | * @remove: device removed (NULL if not a hot-plug capable driver) |
676 | * @report_table: on which reports to call raw_event (NULL means all) | 679 | * @report_table: on which reports to call raw_event (NULL means all) |
@@ -683,6 +686,8 @@ struct hid_usage_id { | |||
683 | * @input_mapped: invoked on input registering after mapping an usage | 686 | * @input_mapped: invoked on input registering after mapping an usage |
684 | * @input_configured: invoked just before the device is registered | 687 | * @input_configured: invoked just before the device is registered |
685 | * @feature_mapping: invoked on feature registering | 688 | * @feature_mapping: invoked on feature registering |
689 | * @bus_add_driver: invoked when a HID driver is about to be added | ||
690 | * @bus_removed_driver: invoked when a HID driver has been removed | ||
686 | * @suspend: invoked on suspend (NULL means nop) | 691 | * @suspend: invoked on suspend (NULL means nop) |
687 | * @resume: invoked on resume if device was not reset (NULL means nop) | 692 | * @resume: invoked on resume if device was not reset (NULL means nop) |
688 | * @reset_resume: invoked on resume if device was reset (NULL means nop) | 693 | * @reset_resume: invoked on resume if device was reset (NULL means nop) |
@@ -711,6 +716,7 @@ struct hid_driver { | |||
711 | struct list_head dyn_list; | 716 | struct list_head dyn_list; |
712 | spinlock_t dyn_lock; | 717 | spinlock_t dyn_lock; |
713 | 718 | ||
719 | bool (*match)(struct hid_device *dev, bool ignore_special_driver); | ||
714 | int (*probe)(struct hid_device *dev, const struct hid_device_id *id); | 720 | int (*probe)(struct hid_device *dev, const struct hid_device_id *id); |
715 | void (*remove)(struct hid_device *dev); | 721 | void (*remove)(struct hid_device *dev); |
716 | 722 | ||
@@ -736,6 +742,8 @@ struct hid_driver { | |||
736 | void (*feature_mapping)(struct hid_device *hdev, | 742 | void (*feature_mapping)(struct hid_device *hdev, |
737 | struct hid_field *field, | 743 | struct hid_field *field, |
738 | struct hid_usage *usage); | 744 | struct hid_usage *usage); |
745 | void (*bus_add_driver)(struct hid_driver *driver); | ||
746 | void (*bus_removed_driver)(struct hid_driver *driver); | ||
739 | #ifdef CONFIG_PM | 747 | #ifdef CONFIG_PM |
740 | int (*suspend)(struct hid_device *hdev, pm_message_t message); | 748 | int (*suspend)(struct hid_device *hdev, pm_message_t message); |
741 | int (*resume)(struct hid_device *hdev); | 749 | int (*resume)(struct hid_device *hdev); |
@@ -814,6 +822,8 @@ extern bool hid_ignore(struct hid_device *); | |||
814 | extern int hid_add_device(struct hid_device *); | 822 | extern int hid_add_device(struct hid_device *); |
815 | extern void hid_destroy_device(struct hid_device *); | 823 | extern void hid_destroy_device(struct hid_device *); |
816 | 824 | ||
825 | extern struct bus_type hid_bus_type; | ||
826 | |||
817 | extern int __must_check __hid_register_driver(struct hid_driver *, | 827 | extern int __must_check __hid_register_driver(struct hid_driver *, |
818 | struct module *, const char *mod_name); | 828 | struct module *, const char *mod_name); |
819 | 829 | ||
@@ -860,8 +870,12 @@ int hid_open_report(struct hid_device *device); | |||
860 | int hid_check_keys_pressed(struct hid_device *hid); | 870 | int hid_check_keys_pressed(struct hid_device *hid); |
861 | int hid_connect(struct hid_device *hid, unsigned int connect_mask); | 871 | int hid_connect(struct hid_device *hid, unsigned int connect_mask); |
862 | void hid_disconnect(struct hid_device *hid); | 872 | void hid_disconnect(struct hid_device *hid); |
863 | const struct hid_device_id *hid_match_id(struct hid_device *hdev, | 873 | bool hid_match_one_id(const struct hid_device *hdev, |
874 | const struct hid_device_id *id); | ||
875 | const struct hid_device_id *hid_match_id(const struct hid_device *hdev, | ||
864 | const struct hid_device_id *id); | 876 | const struct hid_device_id *id); |
877 | const struct hid_device_id *hid_match_device(struct hid_device *hdev, | ||
878 | struct hid_driver *hdrv); | ||
865 | s32 hid_snto32(__u32 value, unsigned n); | 879 | s32 hid_snto32(__u32 value, unsigned n); |
866 | __u32 hid_field_extract(const struct hid_device *hid, __u8 *report, | 880 | __u32 hid_field_extract(const struct hid_device *hid, __u8 *report, |
867 | unsigned offset, unsigned n); | 881 | unsigned offset, unsigned n); |
@@ -1098,9 +1112,9 @@ int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size, | |||
1098 | int interrupt); | 1112 | int interrupt); |
1099 | 1113 | ||
1100 | /* HID quirks API */ | 1114 | /* HID quirks API */ |
1101 | u32 usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct); | 1115 | unsigned long hid_lookup_quirk(const struct hid_device *hdev); |
1102 | int usbhid_quirks_init(char **quirks_param); | 1116 | int hid_quirks_init(char **quirks_param, __u16 bus, int count); |
1103 | void usbhid_quirks_exit(void); | 1117 | void hid_quirks_exit(__u16 bus); |
1104 | 1118 | ||
1105 | #ifdef CONFIG_HID_PID | 1119 | #ifdef CONFIG_HID_PID |
1106 | int hid_pidff_init(struct hid_device *hid); | 1120 | int hid_pidff_init(struct hid_device *hid); |