diff options
author | Alan Ott <alan@signal11.us> | 2011-01-18 03:04:39 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-02-11 09:05:49 -0500 |
commit | b4dbde9da8ece42bbe4c70c26bac3b28dd6a3ddb (patch) | |
tree | fde6ca709962906877c25e0910d67ca5c00beb74 /include/linux/hidraw.h | |
parent | 0825411ade21a39ac63b3e011d092b1f95b5f3f5 (diff) |
HID: Add Support for Setting and Getting Feature Reports from hidraw
Per the HID Specification, Feature reports must be sent and received on
the Configuration endpoint (EP 0) through the Set_Report/Get_Report
interfaces. This patch adds two ioctls to hidraw to set and get feature
reports to and from the device. Modifications were made to hidraw and
usbhid.
New hidraw ioctls:
HIDIOCSFEATURE - Perform a Set_Report transfer of a Feature report.
HIDIOCGFEATURE - Perform a Get_Report transfer of a Feature report.
Signed-off-by: Alan Ott <alan@signal11.us>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'include/linux/hidraw.h')
-rw-r--r-- | include/linux/hidraw.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/hidraw.h b/include/linux/hidraw.h index dd8d69269176..4b88e697c4e9 100644 --- a/include/linux/hidraw.h +++ b/include/linux/hidraw.h | |||
@@ -35,6 +35,9 @@ struct hidraw_devinfo { | |||
35 | #define HIDIOCGRAWINFO _IOR('H', 0x03, struct hidraw_devinfo) | 35 | #define HIDIOCGRAWINFO _IOR('H', 0x03, struct hidraw_devinfo) |
36 | #define HIDIOCGRAWNAME(len) _IOC(_IOC_READ, 'H', 0x04, len) | 36 | #define HIDIOCGRAWNAME(len) _IOC(_IOC_READ, 'H', 0x04, len) |
37 | #define HIDIOCGRAWPHYS(len) _IOC(_IOC_READ, 'H', 0x05, len) | 37 | #define HIDIOCGRAWPHYS(len) _IOC(_IOC_READ, 'H', 0x05, len) |
38 | /* The first byte of SFEATURE and GFEATURE is the report number */ | ||
39 | #define HIDIOCSFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x06, len) | ||
40 | #define HIDIOCGFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x07, len) | ||
38 | 41 | ||
39 | #define HIDRAW_FIRST_MINOR 0 | 42 | #define HIDRAW_FIRST_MINOR 0 |
40 | #define HIDRAW_MAX_DEVICES 64 | 43 | #define HIDRAW_MAX_DEVICES 64 |