diff options
author | Stefan Achatz <stefan_achatz@web.de> | 2012-11-11 06:21:02 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-11-12 15:30:27 +0100 |
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 605b3ce21638..0062ab50861e 100644 --- a/drivers/hid/hid-roccat-isku.h +++ b/drivers/hid/hid-roccat-isku.h @@ -15,76 +15,32 @@ #include <linux/types.h> enum { + ISKU_SIZE_CONTROL = 0x03, + ISKU_SIZE_INFO = 0x06, + ISKU_SIZE_KEY_MASK = 0x06, + ISKU_SIZE_KEYS_FUNCTION = 0x29, + ISKU_SIZE_KEYS_EASYZONE = 0x41, + ISKU_SIZE_KEYS_MEDIA = 0x1d, + ISKU_SIZE_KEYS_THUMBSTER = 0x17, + ISKU_SIZE_KEYS_MACRO = 0x23, + ISKU_SIZE_KEYS_CAPSLOCK = 0x06, + ISKU_SIZE_LAST_SET = 0x14, + ISKU_SIZE_LIGHT = 0x0a, + ISKU_SIZE_MACRO = 0x823, + ISKU_SIZE_TALK = 0x10, +}; + +enum { ISKU_PROFILE_NUM = 5, ISKU_USB_INTERFACE_PROTOCOL = 0, }; -struct isku_control { - uint8_t command; /* ISKU_COMMAND_CONTROL */ - uint8_t value; - uint8_t request; -} __packed; - struct isku_actual_profile { uint8_t command; /* ISKU_COMMAND_ACTUAL_PROFILE */ uint8_t size; /* always 3 */ uint8_t actual_profile; } __packed; -struct isku_key_mask { - uint8_t command; /* ISKU_COMMAND_KEY_MASK */ - uint8_t size; /* 6 */ - uint8_t profile_number; /* 0-4 */ - uint8_t mask; - uint16_t checksum; -} __packed; - -struct isku_keys_function { - uint8_t data[0x29]; -} __packed; - -struct isku_keys_easyzone { - uint8_t data[0x41]; -} __packed; - -struct isku_keys_media { - uint8_t data[0x1d]; -} __packed; - -struct isku_keys_thumbster { - uint8_t data[0x17]; -} __packed; - -struct isku_keys_macro { - uint8_t data[0x23]; -} __packed; - -struct isku_keys_capslock { - uint8_t data[0x6]; -} __packed; - -struct isku_macro { - uint8_t data[0x823]; -} __packed; - -struct isku_light { - uint8_t data[0xa]; -} __packed; - -struct isku_info { - uint8_t data[2]; - uint8_t firmware_version; - uint8_t unknown[3]; -} __packed; - -struct isku_talk { - uint8_t data[0x10]; -} __packed; - -struct isku_last_set { - uint8_t data[0x14]; -} __packed; - enum isku_commands { ISKU_COMMAND_CONTROL = 0x4, ISKU_COMMAND_ACTUAL_PROFILE = 0x5, |