diff options
author | Stefan Achatz <erazor_de@users.sourceforge.net> | 2012-05-20 22:44:59 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-06-28 10:34:01 +0200 |
commit | 4728f2dc9f8e32ce898223fb863316ed7fa2d224 (patch) | |
tree | c8f2df1b448db340d556bf1be42b35cb96d4f0ab /drivers/hid/hid-roccat-common.h | |
parent | 6a2a6390cf098b899a30146ef5c1fb85c9fefb3c (diff) |
HID: roccat: move functionality to roccat-common
Reduced code duplication by moving functions from individual drivers
to roccat-common module.
Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-roccat-common.h')
-rw-r--r-- | drivers/hid/hid-roccat-common.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/hid/hid-roccat-common.h b/drivers/hid/hid-roccat-common.h index 9a5bc61f9699..86bce05da013 100644 --- a/drivers/hid/hid-roccat-common.h +++ b/drivers/hid/hid-roccat-common.h @@ -15,9 +15,21 @@ #include <linux/usb.h> #include <linux/types.h> +enum roccat_common_commands { + ROCCAT_COMMON_COMMAND_CONTROL = 0x4, +}; + +struct roccat_common_control { + uint8_t command; + uint8_t value; + uint8_t request; /* always 0 on requesting write check */ +} __packed; + int roccat_common_receive(struct usb_device *usb_dev, uint report_id, void *data, uint size); int roccat_common_send(struct usb_device *usb_dev, uint report_id, void const *data, uint size); +int roccat_common_send_with_status(struct usb_device *usb_dev, + uint command, void const *buf, uint size); #endif |