aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/hid.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h
index c235e4e8767c..8ac51d6e81e0 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,18 @@ 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_val;
499#endif
500
485 unsigned int status; /* see STAT flags above */ 501 unsigned int status; /* see STAT flags above */
486 unsigned claimed; /* Claimed by hidinput, hiddev? */ 502 unsigned claimed; /* Claimed by hidinput, hiddev? */
487 unsigned quirks; /* Various quirks the device can pull on us */ 503 unsigned quirks; /* Various quirks the device can pull on us */
@@ -712,6 +728,8 @@ extern void hidinput_disconnect(struct hid_device *);
712int hid_set_field(struct hid_field *, unsigned, __s32); 728int hid_set_field(struct hid_field *, unsigned, __s32);
713int hid_input_report(struct hid_device *, int type, u8 *, int, int); 729int hid_input_report(struct hid_device *, int type, u8 *, int, int);
714int hidinput_find_field(struct hid_device *hid, unsigned int type, unsigned int code, struct hid_field **field); 730int hidinput_find_field(struct hid_device *hid, unsigned int type, unsigned int code, struct hid_field **field);
731struct hid_field *hidinput_get_led_field(struct hid_device *hid);
732unsigned int hidinput_count_leds(struct hid_device *hid);
715void hid_output_report(struct hid_report *report, __u8 *data); 733void hid_output_report(struct hid_report *report, __u8 *data);
716struct hid_device *hid_allocate_device(void); 734struct hid_device *hid_allocate_device(void);
717struct hid_report *hid_register_report(struct hid_device *device, unsigned type, unsigned id); 735struct hid_report *hid_register_report(struct hid_device *device, unsigned type, unsigned id);