gpio: rcar: Fix runtime PM imbalance on error
[linux/fpc-iii.git] / drivers / hid / hid-roccat-isku.h
blob0779d72e4e2fbe6dff24d886713063a5bc43147a
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 #ifndef __HID_ROCCAT_ISKU_H
3 #define __HID_ROCCAT_ISKU_H
5 /*
6 * Copyright (c) 2011 Stefan Achatz <erazor_de@users.sourceforge.net>
7 */
9 /*
12 #include <linux/types.h>
14 enum {
15 ISKU_SIZE_CONTROL = 0x03,
16 ISKU_SIZE_INFO = 0x06,
17 ISKU_SIZE_KEY_MASK = 0x06,
18 ISKU_SIZE_KEYS_FUNCTION = 0x29,
19 ISKU_SIZE_KEYS_EASYZONE = 0x41,
20 ISKU_SIZE_KEYS_MEDIA = 0x1d,
21 ISKU_SIZE_KEYS_THUMBSTER = 0x17,
22 ISKU_SIZE_KEYS_MACRO = 0x23,
23 ISKU_SIZE_KEYS_CAPSLOCK = 0x06,
24 ISKU_SIZE_LAST_SET = 0x14,
25 ISKU_SIZE_LIGHT = 0x10,
26 ISKU_SIZE_MACRO = 0x823,
27 ISKU_SIZE_RESET = 0x03,
28 ISKU_SIZE_TALK = 0x10,
29 ISKU_SIZE_TALKFX = 0x10,
32 enum {
33 ISKU_PROFILE_NUM = 5,
34 ISKU_USB_INTERFACE_PROTOCOL = 0,
37 struct isku_actual_profile {
38 uint8_t command; /* ISKU_COMMAND_ACTUAL_PROFILE */
39 uint8_t size; /* always 3 */
40 uint8_t actual_profile;
41 } __packed;
43 enum isku_commands {
44 ISKU_COMMAND_CONTROL = 0x4,
45 ISKU_COMMAND_ACTUAL_PROFILE = 0x5,
46 ISKU_COMMAND_KEY_MASK = 0x7,
47 ISKU_COMMAND_KEYS_FUNCTION = 0x8,
48 ISKU_COMMAND_KEYS_EASYZONE = 0x9,
49 ISKU_COMMAND_KEYS_MEDIA = 0xa,
50 ISKU_COMMAND_KEYS_THUMBSTER = 0xb,
51 ISKU_COMMAND_KEYS_MACRO = 0xd,
52 ISKU_COMMAND_MACRO = 0xe,
53 ISKU_COMMAND_INFO = 0xf,
54 ISKU_COMMAND_LIGHT = 0x10,
55 ISKU_COMMAND_RESET = 0x11,
56 ISKU_COMMAND_KEYS_CAPSLOCK = 0x13,
57 ISKU_COMMAND_LAST_SET = 0x14,
58 ISKU_COMMAND_15 = 0x15,
59 ISKU_COMMAND_TALK = 0x16,
60 ISKU_COMMAND_TALKFX = 0x17,
61 ISKU_COMMAND_FIRMWARE_WRITE = 0x1b,
62 ISKU_COMMAND_FIRMWARE_WRITE_CONTROL = 0x1c,
65 struct isku_report_button {
66 uint8_t number; /* ISKU_REPORT_NUMBER_BUTTON */
67 uint8_t zero;
68 uint8_t event;
69 uint8_t data1;
70 uint8_t data2;
73 enum isku_report_numbers {
74 ISKU_REPORT_NUMBER_BUTTON = 3,
77 enum isku_report_button_events {
78 ISKU_REPORT_BUTTON_EVENT_PROFILE = 0x2,
81 struct isku_roccat_report {
82 uint8_t event;
83 uint8_t data1;
84 uint8_t data2;
85 uint8_t profile;
86 } __packed;
88 struct isku_device {
89 int roccat_claimed;
90 int chrdev_minor;
92 struct mutex isku_lock;
94 int actual_profile;
97 #endif