diff options
author | Stefan Achatz <stefan_achatz@web.de> | 2012-11-11 00:20:58 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-11-12 09:30:27 -0500 |
commit | be34380ef818c182860c06f048cbea821203f9b7 (patch) | |
tree | cf9283ac8ebe6594103e7cf91dc80accdd0d45f1 /drivers/hid/hid-roccat-pyra.h | |
parent | 94a8fcf9a1a816199efc29546040172aa1383be0 (diff) |
HID: roccat: cleanup of pyra module
Partially removed unneeded informations and data caching.
Moved code nearer to format of newer drivers.
Added "info" sysfs attribute to support device reset and deprecate
"firmware_version" attribute.
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-pyra.h')
-rw-r--r-- | drivers/hid/hid-roccat-pyra.h | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/hid/hid-roccat-pyra.h b/drivers/hid/hid-roccat-pyra.h index eada7830fa99..93e494984976 100644 --- a/drivers/hid/hid-roccat-pyra.h +++ b/drivers/hid/hid-roccat-pyra.h | |||
@@ -14,11 +14,12 @@ | |||
14 | 14 | ||
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | 16 | ||
17 | struct pyra_b { | 17 | enum { |
18 | uint8_t command; /* PYRA_COMMAND_B */ | 18 | PYRA_SIZE_INFO = 0x06, |
19 | uint8_t size; /* always 3 */ | 19 | PYRA_SIZE_PROFILE_SETTINGS = 0x0d, |
20 | uint8_t unknown; /* 1 */ | 20 | PYRA_SIZE_PROFILE_BUTTONS = 0x13, |
21 | } __attribute__ ((__packed__)); | 21 | PYRA_SIZE_SETTINGS = 0x03, |
22 | }; | ||
22 | 23 | ||
23 | enum pyra_control_requests { | 24 | enum pyra_control_requests { |
24 | PYRA_CONTROL_REQUEST_PROFILE_SETTINGS = 0x10, | 25 | PYRA_CONTROL_REQUEST_PROFILE_SETTINGS = 0x10, |
@@ -46,14 +47,6 @@ struct pyra_profile_settings { | |||
46 | uint16_t checksum; /* byte sum */ | 47 | uint16_t checksum; /* byte sum */ |
47 | } __attribute__ ((__packed__)); | 48 | } __attribute__ ((__packed__)); |
48 | 49 | ||
49 | struct pyra_profile_buttons { | ||
50 | uint8_t command; /* PYRA_COMMAND_PROFILE_BUTTONS */ | ||
51 | uint8_t size; /* always 0x13 */ | ||
52 | uint8_t number; /* Range 0-4 */ | ||
53 | uint8_t buttons[14]; | ||
54 | uint16_t checksum; /* byte sum */ | ||
55 | } __attribute__ ((__packed__)); | ||
56 | |||
57 | struct pyra_info { | 50 | struct pyra_info { |
58 | uint8_t command; /* PYRA_COMMAND_INFO */ | 51 | uint8_t command; /* PYRA_COMMAND_INFO */ |
59 | uint8_t size; /* always 6 */ | 52 | uint8_t size; /* always 6 */ |
@@ -148,13 +141,10 @@ struct pyra_roccat_report { | |||
148 | struct pyra_device { | 141 | struct pyra_device { |
149 | int actual_profile; | 142 | int actual_profile; |
150 | int actual_cpi; | 143 | int actual_cpi; |
151 | int firmware_version; | ||
152 | int roccat_claimed; | 144 | int roccat_claimed; |
153 | int chrdev_minor; | 145 | int chrdev_minor; |
154 | struct mutex pyra_lock; | 146 | struct mutex pyra_lock; |
155 | struct pyra_settings settings; | ||
156 | struct pyra_profile_settings profile_settings[5]; | 147 | struct pyra_profile_settings profile_settings[5]; |
157 | struct pyra_profile_buttons profile_buttons[5]; | ||
158 | }; | 148 | }; |
159 | 149 | ||
160 | #endif | 150 | #endif |