diff options
Diffstat (limited to 'include/linux/hid.h')
-rw-r--r-- | include/linux/hid.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h index c235e4e8767c..3a95da60fd3e 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -72,6 +72,7 @@ | |||
72 | #include <linux/workqueue.h> | 72 | #include <linux/workqueue.h> |
73 | #include <linux/input.h> | 73 | #include <linux/input.h> |
74 | #include <linux/semaphore.h> | 74 | #include <linux/semaphore.h> |
75 | #include <linux/power_supply.h> | ||
75 | 76 | ||
76 | /* | 77 | /* |
77 | * We parse each description item into this structure. Short items data | 78 | * We parse each description item into this structure. Short items data |
@@ -190,6 +191,7 @@ struct hid_item { | |||
190 | #define HID_UP_UNDEFINED 0x00000000 | 191 | #define HID_UP_UNDEFINED 0x00000000 |
191 | #define HID_UP_GENDESK 0x00010000 | 192 | #define HID_UP_GENDESK 0x00010000 |
192 | #define HID_UP_SIMULATION 0x00020000 | 193 | #define HID_UP_SIMULATION 0x00020000 |
194 | #define HID_UP_GENDEVCTRLS 0x00060000 | ||
193 | #define HID_UP_KEYBOARD 0x00070000 | 195 | #define HID_UP_KEYBOARD 0x00070000 |
194 | #define HID_UP_LED 0x00080000 | 196 | #define HID_UP_LED 0x00080000 |
195 | #define HID_UP_BUTTON 0x00090000 | 197 | #define HID_UP_BUTTON 0x00090000 |
@@ -239,6 +241,8 @@ struct hid_item { | |||
239 | #define HID_GD_RIGHT 0x00010092 | 241 | #define HID_GD_RIGHT 0x00010092 |
240 | #define HID_GD_LEFT 0x00010093 | 242 | #define HID_GD_LEFT 0x00010093 |
241 | 243 | ||
244 | #define HID_DC_BATTERYSTRENGTH 0x00060020 | ||
245 | |||
242 | #define HID_DG_DIGITIZER 0x000d0001 | 246 | #define HID_DG_DIGITIZER 0x000d0001 |
243 | #define HID_DG_PEN 0x000d0002 | 247 | #define HID_DG_PEN 0x000d0002 |
244 | #define HID_DG_LIGHTPEN 0x000d0003 | 248 | #define HID_DG_LIGHTPEN 0x000d0003 |
@@ -482,6 +486,19 @@ struct hid_device { /* device report descriptor */ | |||
482 | struct hid_driver *driver; | 486 | struct hid_driver *driver; |
483 | struct hid_ll_driver *ll_driver; | 487 | struct hid_ll_driver *ll_driver; |
484 | 488 | ||
489 | #ifdef CONFIG_HID_BATTERY_STRENGTH | ||
490 | /* | ||
491 | * Power supply information for HID devices which report | ||
492 | * battery strength. power_supply is registered iff | ||
493 | * battery.name is non-NULL. | ||
494 | */ | ||
495 | struct power_supply battery; | ||
496 | __s32 battery_min; | ||
497 | __s32 battery_max; | ||
498 | __s32 battery_report_type; | ||
499 | __s32 battery_report_id; | ||
500 | #endif | ||
501 | |||
485 | unsigned int status; /* see STAT flags above */ | 502 | unsigned int status; /* see STAT flags above */ |
486 | unsigned claimed; /* Claimed by hidinput, hiddev? */ | 503 | unsigned claimed; /* Claimed by hidinput, hiddev? */ |
487 | unsigned quirks; /* Various quirks the device can pull on us */ | 504 | unsigned quirks; /* Various quirks the device can pull on us */ |
@@ -712,6 +729,8 @@ extern void hidinput_disconnect(struct hid_device *); | |||
712 | int hid_set_field(struct hid_field *, unsigned, __s32); | 729 | int hid_set_field(struct hid_field *, unsigned, __s32); |
713 | int hid_input_report(struct hid_device *, int type, u8 *, int, int); | 730 | int hid_input_report(struct hid_device *, int type, u8 *, int, int); |
714 | int hidinput_find_field(struct hid_device *hid, unsigned int type, unsigned int code, struct hid_field **field); | 731 | int hidinput_find_field(struct hid_device *hid, unsigned int type, unsigned int code, struct hid_field **field); |
732 | struct hid_field *hidinput_get_led_field(struct hid_device *hid); | ||
733 | unsigned int hidinput_count_leds(struct hid_device *hid); | ||
715 | void hid_output_report(struct hid_report *report, __u8 *data); | 734 | void hid_output_report(struct hid_report *report, __u8 *data); |
716 | struct hid_device *hid_allocate_device(void); | 735 | struct hid_device *hid_allocate_device(void); |
717 | struct hid_report *hid_register_report(struct hid_device *device, unsigned type, unsigned id); | 736 | struct hid_report *hid_register_report(struct hid_device *device, unsigned type, unsigned id); |
@@ -719,6 +738,8 @@ int hid_parse_report(struct hid_device *hid, __u8 *start, unsigned size); | |||
719 | int hid_check_keys_pressed(struct hid_device *hid); | 738 | int hid_check_keys_pressed(struct hid_device *hid); |
720 | int hid_connect(struct hid_device *hid, unsigned int connect_mask); | 739 | int hid_connect(struct hid_device *hid, unsigned int connect_mask); |
721 | void hid_disconnect(struct hid_device *hid); | 740 | void hid_disconnect(struct hid_device *hid); |
741 | const struct hid_device_id *hid_match_id(struct hid_device *hdev, | ||
742 | const struct hid_device_id *id); | ||
722 | 743 | ||
723 | /** | 744 | /** |
724 | * hid_map_usage - map usage input bits | 745 | * hid_map_usage - map usage input bits |