diff options
author | Stefan Achatz <stefan_achatz@web.de> | 2012-11-11 00:21:02 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-11-12 09:30:27 -0500 |
commit | 6e5920ddbbc114d9f7864b14a8db42e714a8b99f (patch) | |
tree | 7595868c9cf3b33ce5267c3c7c580c128d092a23 /drivers/hid/hid-roccat-isku.h | |
parent | be34380ef818c182860c06f048cbea821203f9b7 (diff) |
HID: roccat: clean up isku driver
Removed unneeded structures from header.
Using enums instead of sizeof(struct) to unify drivers.
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-isku.h')
-rw-r--r-- | drivers/hid/hid-roccat-isku.h | 76 |
1 files changed, 16 insertions, 60 deletions
diff --git a/drivers/hid/hid-roccat-isku.h b/drivers/hid/hid-roccat-isku.h index 605b3ce2163..0062ab50861 100644 --- a/drivers/hid/hid-roccat-isku.h +++ b/drivers/hid/hid-roccat-isku.h | |||
@@ -15,76 +15,32 @@ | |||
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | 16 | ||
17 | enum { | 17 | enum { |
18 | ISKU_SIZE_CONTROL = 0x03, | ||
19 | ISKU_SIZE_INFO = 0x06, | ||
20 | ISKU_SIZE_KEY_MASK = 0x06, | ||
21 | ISKU_SIZE_KEYS_FUNCTION = 0x29, | ||
22 | ISKU_SIZE_KEYS_EASYZONE = 0x41, | ||
23 | ISKU_SIZE_KEYS_MEDIA = 0x1d, | ||
24 | ISKU_SIZE_KEYS_THUMBSTER = 0x17, | ||
25 | ISKU_SIZE_KEYS_MACRO = 0x23, | ||
26 | ISKU_SIZE_KEYS_CAPSLOCK = 0x06, | ||
27 | ISKU_SIZE_LAST_SET = 0x14, | ||
28 | ISKU_SIZE_LIGHT = 0x0a, | ||
29 | ISKU_SIZE_MACRO = 0x823, | ||
30 | ISKU_SIZE_TALK = 0x10, | ||
31 | }; | ||
32 | |||
33 | enum { | ||
18 | ISKU_PROFILE_NUM = 5, | 34 | ISKU_PROFILE_NUM = 5, |
19 | ISKU_USB_INTERFACE_PROTOCOL = 0, | 35 | ISKU_USB_INTERFACE_PROTOCOL = 0, |
20 | }; | 36 | }; |
21 | 37 | ||
22 | struct isku_control { | ||
23 | uint8_t command; /* ISKU_COMMAND_CONTROL */ | ||
24 | uint8_t value; | ||
25 | uint8_t request; | ||
26 | } __packed; | ||
27 | |||
28 | struct isku_actual_profile { | 38 | struct isku_actual_profile { |
29 | uint8_t command; /* ISKU_COMMAND_ACTUAL_PROFILE */ | 39 | uint8_t command; /* ISKU_COMMAND_ACTUAL_PROFILE */ |
30 | uint8_t size; /* always 3 */ | 40 | uint8_t size; /* always 3 */ |
31 | uint8_t actual_profile; | 41 | uint8_t actual_profile; |
32 | } __packed; | 42 | } __packed; |
33 | 43 | ||
34 | struct isku_key_mask { | ||
35 | uint8_t command; /* ISKU_COMMAND_KEY_MASK */ | ||
36 | uint8_t size; /* 6 */ | ||
37 | uint8_t profile_number; /* 0-4 */ | ||
38 | uint8_t mask; | ||
39 | uint16_t checksum; | ||
40 | } __packed; | ||
41 | |||
42 | struct isku_keys_function { | ||
43 | uint8_t data[0x29]; | ||
44 | } __packed; | ||
45 | |||
46 | struct isku_keys_easyzone { | ||
47 | uint8_t data[0x41]; | ||
48 | } __packed; | ||
49 | |||
50 | struct isku_keys_media { | ||
51 | uint8_t data[0x1d]; | ||
52 | } __packed; | ||
53 | |||
54 | struct isku_keys_thumbster { | ||
55 | uint8_t data[0x17]; | ||
56 | } __packed; | ||
57 | |||
58 | struct isku_keys_macro { | ||
59 | uint8_t data[0x23]; | ||
60 | } __packed; | ||
61 | |||
62 | struct isku_keys_capslock { | ||
63 | uint8_t data[0x6]; | ||
64 | } __packed; | ||
65 | |||
66 | struct isku_macro { | ||
67 | uint8_t data[0x823]; | ||
68 | } __packed; | ||
69 | |||
70 | struct isku_light { | ||
71 | uint8_t data[0xa]; | ||
72 | } __packed; | ||
73 | |||
74 | struct isku_info { | ||
75 | uint8_t data[2]; | ||
76 | uint8_t firmware_version; | ||
77 | uint8_t unknown[3]; | ||
78 | } __packed; | ||
79 | |||
80 | struct isku_talk { | ||
81 | uint8_t data[0x10]; | ||
82 | } __packed; | ||
83 | |||
84 | struct isku_last_set { | ||
85 | uint8_t data[0x14]; | ||
86 | } __packed; | ||
87 | |||
88 | enum isku_commands { | 44 | enum isku_commands { |
89 | ISKU_COMMAND_CONTROL = 0x4, | 45 | ISKU_COMMAND_CONTROL = 0x4, |
90 | ISKU_COMMAND_ACTUAL_PROFILE = 0x5, | 46 | ISKU_COMMAND_ACTUAL_PROFILE = 0x5, |