aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-roccat-pyra.h
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
commit8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch)
treea8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /drivers/hid/hid-roccat-pyra.h
parent406089d01562f1e2bf9f089fd7637009ebaad589 (diff)
Patched in Tegra support.
Diffstat (limited to 'drivers/hid/hid-roccat-pyra.h')
-rw-r--r--drivers/hid/hid-roccat-pyra.h34
1 files changed, 27 insertions, 7 deletions
diff --git a/drivers/hid/hid-roccat-pyra.h b/drivers/hid/hid-roccat-pyra.h
index beedcf001ce..0442d7fa2dc 100644
--- a/drivers/hid/hid-roccat-pyra.h
+++ b/drivers/hid/hid-roccat-pyra.h
@@ -14,15 +14,24 @@
14 14
15#include <linux/types.h> 15#include <linux/types.h>
16 16
17enum { 17struct pyra_b {
18 PYRA_SIZE_CONTROL = 0x03, 18 uint8_t command; /* PYRA_COMMAND_B */
19 PYRA_SIZE_INFO = 0x06, 19 uint8_t size; /* always 3 */
20 PYRA_SIZE_PROFILE_SETTINGS = 0x0d, 20 uint8_t unknown; /* 1 */
21 PYRA_SIZE_PROFILE_BUTTONS = 0x13, 21} __attribute__ ((__packed__));
22 PYRA_SIZE_SETTINGS = 0x03, 22
23}; 23struct pyra_control {
24 uint8_t command; /* PYRA_COMMAND_CONTROL */
25 /*
26 * value is profile number for request_settings and request_buttons
27 * 1 if status ok for request_status
28 */
29 uint8_t value; /* Range 0-4 */
30 uint8_t request;
31} __attribute__ ((__packed__));
24 32
25enum pyra_control_requests { 33enum pyra_control_requests {
34 PYRA_CONTROL_REQUEST_STATUS = 0x00,
26 PYRA_CONTROL_REQUEST_PROFILE_SETTINGS = 0x10, 35 PYRA_CONTROL_REQUEST_PROFILE_SETTINGS = 0x10,
27 PYRA_CONTROL_REQUEST_PROFILE_BUTTONS = 0x20 36 PYRA_CONTROL_REQUEST_PROFILE_BUTTONS = 0x20
28}; 37};
@@ -48,6 +57,14 @@ struct pyra_profile_settings {
48 uint16_t checksum; /* byte sum */ 57 uint16_t checksum; /* byte sum */
49} __attribute__ ((__packed__)); 58} __attribute__ ((__packed__));
50 59
60struct pyra_profile_buttons {
61 uint8_t command; /* PYRA_COMMAND_PROFILE_BUTTONS */
62 uint8_t size; /* always 0x13 */
63 uint8_t number; /* Range 0-4 */
64 uint8_t buttons[14];
65 uint16_t checksum; /* byte sum */
66} __attribute__ ((__packed__));
67
51struct pyra_info { 68struct pyra_info {
52 uint8_t command; /* PYRA_COMMAND_INFO */ 69 uint8_t command; /* PYRA_COMMAND_INFO */
53 uint8_t size; /* always 6 */ 70 uint8_t size; /* always 6 */
@@ -143,10 +160,13 @@ struct pyra_roccat_report {
143struct pyra_device { 160struct pyra_device {
144 int actual_profile; 161 int actual_profile;
145 int actual_cpi; 162 int actual_cpi;
163 int firmware_version;
146 int roccat_claimed; 164 int roccat_claimed;
147 int chrdev_minor; 165 int chrdev_minor;
148 struct mutex pyra_lock; 166 struct mutex pyra_lock;
167 struct pyra_settings settings;
149 struct pyra_profile_settings profile_settings[5]; 168 struct pyra_profile_settings profile_settings[5];
169 struct pyra_profile_buttons profile_buttons[5];
150}; 170};
151 171
152#endif 172#endif