e1000e: cleanup PARENTHESIS_ALIGNMENT checkpatch checks
[linux/fpc-iii.git] / drivers / hid / hid-roccat-isku.h
blobcf6896c838679d7ec5527a7cb94037e16c1fd78a
1 #ifndef __HID_ROCCAT_ISKU_H
2 #define __HID_ROCCAT_ISKU_H
4 /*
5 * Copyright (c) 2011 Stefan Achatz <erazor_de@users.sourceforge.net>
6 */
8 /*
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the Free
11 * Software Foundation; either version 2 of the License, or (at your option)
12 * any later version.
15 #include <linux/types.h>
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_RESET = 0x03,
31 ISKU_SIZE_TALK = 0x10,
34 enum {
35 ISKU_PROFILE_NUM = 5,
36 ISKU_USB_INTERFACE_PROTOCOL = 0,
39 struct isku_actual_profile {
40 uint8_t command; /* ISKU_COMMAND_ACTUAL_PROFILE */
41 uint8_t size; /* always 3 */
42 uint8_t actual_profile;
43 } __packed;
45 enum isku_commands {
46 ISKU_COMMAND_CONTROL = 0x4,
47 ISKU_COMMAND_ACTUAL_PROFILE = 0x5,
48 ISKU_COMMAND_KEY_MASK = 0x7,
49 ISKU_COMMAND_KEYS_FUNCTION = 0x8,
50 ISKU_COMMAND_KEYS_EASYZONE = 0x9,
51 ISKU_COMMAND_KEYS_MEDIA = 0xa,
52 ISKU_COMMAND_KEYS_THUMBSTER = 0xb,
53 ISKU_COMMAND_KEYS_MACRO = 0xd,
54 ISKU_COMMAND_MACRO = 0xe,
55 ISKU_COMMAND_INFO = 0xf,
56 ISKU_COMMAND_LIGHT = 0x10,
57 ISKU_COMMAND_RESET = 0x11,
58 ISKU_COMMAND_KEYS_CAPSLOCK = 0x13,
59 ISKU_COMMAND_LAST_SET = 0x14,
60 ISKU_COMMAND_15 = 0x15,
61 ISKU_COMMAND_TALK = 0x16,
62 ISKU_COMMAND_FIRMWARE_WRITE = 0x1b,
63 ISKU_COMMAND_FIRMWARE_WRITE_CONTROL = 0x1c,
66 struct isku_report_button {
67 uint8_t number; /* ISKU_REPORT_NUMBER_BUTTON */
68 uint8_t zero;
69 uint8_t event;
70 uint8_t data1;
71 uint8_t data2;
74 enum isku_report_numbers {
75 ISKU_REPORT_NUMBER_BUTTON = 3,
78 enum isku_report_button_events {
79 ISKU_REPORT_BUTTON_EVENT_PROFILE = 0x2,
82 struct isku_roccat_report {
83 uint8_t event;
84 uint8_t data1;
85 uint8_t data2;
86 uint8_t profile;
87 } __packed;
89 struct isku_device {
90 int roccat_claimed;
91 int chrdev_minor;
93 struct mutex isku_lock;
95 int actual_profile;
98 #endif