diff options
| author | Vojtech Pavlik <vojtech@suse.cz> | 2002-07-15 03:18:42 -0700 |
|---|---|---|
| committer | Vojtech Pavlik <vojtech@suse.cz> | 2002-07-15 03:18:42 -0700 |
| commit | b24be862cc6543ef76e17c55cc11c69e2dd8bc62 (patch) | |
| tree | c8bff63819bb2fe833304d075aea553827c1cc96 /include/linux/hiddev.h | |
| parent | 182147c1e9cae403852ec2e1107fe62b390012be (diff) | |
[PATCH] Updates for hiddev by Paul Stewart
I've merged a patch Paul Stewart sent me some time ago, which should make life
easier for the guys writing UPS daemons.
Diffstat (limited to 'include/linux/hiddev.h')
| -rw-r--r-- | include/linux/hiddev.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/include/linux/hiddev.h b/include/linux/hiddev.h index eb948560836d..05db98ccfdbb 100644 --- a/include/linux/hiddev.h +++ b/include/linux/hiddev.h @@ -49,6 +49,13 @@ struct hiddev_devinfo { unsigned num_applications; }; +struct hiddev_collection_info { + unsigned index; + unsigned type; + unsigned usage; + unsigned level; +}; + #define HID_STRING_SIZE 256 struct hiddev_string_descriptor { int index; @@ -64,9 +71,9 @@ struct hiddev_report_info { /* To do a GUSAGE/SUSAGE, fill in at least usage_code, report_type and * report_id. Set report_id to REPORT_ID_UNKNOWN if the rest of the fields * are unknown. Otherwise use a usage_ref struct filled in from a previous - * successful GUSAGE/SUSAGE call to save time. To actually send a value - * to the device, perform a SUSAGE first, followed by a SREPORT. If an - * INITREPORT is done, a GREPORT isn't necessary before a GUSAGE. + * successful GUSAGE call to save time. To actually send a value to the + * device, perform a SUSAGE first, followed by a SREPORT. An INITREPORT or a + * GREPORT isn't necessary for a GUSAGE to return valid data. */ #define HID_REPORT_ID_UNKNOWN 0xffffffff #define HID_REPORT_ID_FIRST 0x00000100 @@ -129,7 +136,7 @@ struct hiddev_usage_ref { * Protocol version. */ -#define HID_VERSION 0x010003 +#define HID_VERSION 0x010004 /* * IOCTLs (0x00 - 0x7f) @@ -150,6 +157,8 @@ struct hiddev_usage_ref { #define HIDIOCGUCODE _IOWR('H', 0x0D, struct hiddev_usage_ref) #define HIDIOCGFLAG _IOR('H', 0x0E, int) #define HIDIOCSFLAG _IOW('H', 0x0F, int) +#define HIDIOCGCOLLECTIONINDEX _IOW('H', 0x10, struct hiddev_usage_ref) +#define HIDIOCGCOLLECTIONINFO _IOWR('H', 0x11, struct hiddev_collection_info) /* * Flags to be used in HIDIOCSFLAG @@ -197,7 +206,7 @@ void hiddev_hid_event(struct hid_device *, struct hiddev_usage_ref *ref); int __init hiddev_init(void); void __exit hiddev_exit(void); #else -static inline void *hiddev_connect(struct hid_device *hid) { return NULL; } +static inline int hiddev_connect(struct hid_device *hid) { return -1; } static inline void hiddev_disconnect(struct hid_device *hid) { } static inline void hiddev_event(struct hid_device *hid, unsigned int usage, int value) { } static inline int hiddev_init(void) { return 0; } |
