aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-roccat-koneplus.h
diff options
context:
space:
mode:
authorStefan Achatz <erazor_de@users.sourceforge.net>2012-05-20 16:44:59 -0400
committerJiri Kosina <jkosina@suse.cz>2012-06-28 04:34:01 -0400
commit4728f2dc9f8e32ce898223fb863316ed7fa2d224 (patch)
treec8f2df1b448db340d556bf1be42b35cb96d4f0ab /drivers/hid/hid-roccat-koneplus.h
parent6a2a6390cf098b899a30146ef5c1fb85c9fefb3c (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-koneplus.h')
-rw-r--r--drivers/hid/hid-roccat-koneplus.h22
1 files changed, 0 insertions, 22 deletions
diff --git a/drivers/hid/hid-roccat-koneplus.h b/drivers/hid/hid-roccat-koneplus.h
index c03332a4fa9a..7074b2a4b94b 100644
--- a/drivers/hid/hid-roccat-koneplus.h
+++ b/drivers/hid/hid-roccat-koneplus.h
@@ -20,32 +20,11 @@ struct koneplus_talk {
20 uint8_t data[14]; 20 uint8_t data[14];
21} __packed; 21} __packed;
22 22
23/*
24 * case 1: writes request 80 and reads value 1
25 *
26 */
27struct koneplus_control {
28 uint8_t command; /* KONEPLUS_COMMAND_CONTROL */
29 /*
30 * value is profile number in range 0-4 for requesting settings and buttons
31 * 1 if status ok for requesting status
32 */
33 uint8_t value;
34 uint8_t request;
35} __attribute__ ((__packed__));
36
37enum koneplus_control_requests { 23enum koneplus_control_requests {
38 KONEPLUS_CONTROL_REQUEST_STATUS = 0x00,
39 KONEPLUS_CONTROL_REQUEST_PROFILE_SETTINGS = 0x80, 24 KONEPLUS_CONTROL_REQUEST_PROFILE_SETTINGS = 0x80,
40 KONEPLUS_CONTROL_REQUEST_PROFILE_BUTTONS = 0x90, 25 KONEPLUS_CONTROL_REQUEST_PROFILE_BUTTONS = 0x90,
41}; 26};
42 27
43enum koneplus_control_values {
44 KONEPLUS_CONTROL_REQUEST_STATUS_OVERLOAD = 0,
45 KONEPLUS_CONTROL_REQUEST_STATUS_OK = 1,
46 KONEPLUS_CONTROL_REQUEST_STATUS_WAIT = 3,
47};
48
49struct koneplus_actual_profile { 28struct koneplus_actual_profile {
50 uint8_t command; /* KONEPLUS_COMMAND_ACTUAL_PROFILE */ 29 uint8_t command; /* KONEPLUS_COMMAND_ACTUAL_PROFILE */
51 uint8_t size; /* always 3 */ 30 uint8_t size; /* always 3 */
@@ -137,7 +116,6 @@ struct koneplus_tcu_image {
137} __attribute__ ((__packed__)); 116} __attribute__ ((__packed__));
138 117
139enum koneplus_commands { 118enum koneplus_commands {
140 KONEPLUS_COMMAND_CONTROL = 0x4,
141 KONEPLUS_COMMAND_ACTUAL_PROFILE = 0x5, 119 KONEPLUS_COMMAND_ACTUAL_PROFILE = 0x5,
142 KONEPLUS_COMMAND_PROFILE_SETTINGS = 0x6, 120 KONEPLUS_COMMAND_PROFILE_SETTINGS = 0x6,
143 KONEPLUS_COMMAND_PROFILE_BUTTONS = 0x7, 121 KONEPLUS_COMMAND_PROFILE_BUTTONS = 0x7,