HID: roccat: deprecated some Pyra attributes
[deliverable/linux.git] / drivers / hid / hid-roccat-koneplus.h
CommitLineData
47dbdbff
SA
1#ifndef __HID_ROCCAT_KONEPLUS_H
2#define __HID_ROCCAT_KONEPLUS_H
3
4/*
5 * Copyright (c) 2010 Stefan Achatz <erazor_de@users.sourceforge.net>
6 */
7
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.
13 */
14
15#include <linux/types.h>
16
f114fec5
SA
17enum {
18 KONEPLUS_SIZE_ACTUAL_PROFILE = 0x03,
19 KONEPLUS_SIZE_FIRMWARE_WRITE = 0x0402,
20 KONEPLUS_SIZE_INFO = 0x06,
21 KONEPLUS_SIZE_MACRO = 0x0822,
22 KONEPLUS_SIZE_PROFILE_SETTINGS = 0x2b,
23 KONEPLUS_SIZE_PROFILE_BUTTONS = 0x4d,
24 KONEPLUS_SIZE_SENSOR = 0x06,
25 KONEPLUS_SIZE_TALK = 0x10,
26 KONEPLUS_SIZE_TCU = 0x03,
27 KONEPLUS_SIZE_TCU_IMAGE = 0x0404,
28};
6d1dec85 29
47dbdbff 30enum koneplus_control_requests {
47dbdbff
SA
31 KONEPLUS_CONTROL_REQUEST_PROFILE_SETTINGS = 0x80,
32 KONEPLUS_CONTROL_REQUEST_PROFILE_BUTTONS = 0x90,
33};
34
b50f315c
SA
35struct koneplus_actual_profile {
36 uint8_t command; /* KONEPLUS_COMMAND_ACTUAL_PROFILE */
47dbdbff 37 uint8_t size; /* always 3 */
b50f315c 38 uint8_t actual_profile; /* Range 0-4! */
4d043101 39} __attribute__ ((__packed__));
47dbdbff 40
47dbdbff
SA
41struct koneplus_info {
42 uint8_t command; /* KONEPLUS_COMMAND_INFO */
43 uint8_t size; /* always 6 */
44 uint8_t firmware_version;
45 uint8_t unknown[3];
4d043101 46} __attribute__ ((__packed__));
47dbdbff 47
47dbdbff 48enum koneplus_commands {
b50f315c 49 KONEPLUS_COMMAND_ACTUAL_PROFILE = 0x5,
47dbdbff
SA
50 KONEPLUS_COMMAND_PROFILE_SETTINGS = 0x6,
51 KONEPLUS_COMMAND_PROFILE_BUTTONS = 0x7,
52 KONEPLUS_COMMAND_MACRO = 0x8,
53 KONEPLUS_COMMAND_INFO = 0x9,
1edd5b42 54 KONEPLUS_COMMAND_TCU = 0xc,
f114fec5 55 KONEPLUS_COMMAND_TCU_IMAGE = 0xc,
47dbdbff
SA
56 KONEPLUS_COMMAND_E = 0xe,
57 KONEPLUS_COMMAND_SENSOR = 0xf,
6d1dec85 58 KONEPLUS_COMMAND_TALK = 0x10,
47dbdbff
SA
59 KONEPLUS_COMMAND_FIRMWARE_WRITE = 0x1b,
60 KONEPLUS_COMMAND_FIRMWARE_WRITE_CONTROL = 0x1c,
61};
62
47dbdbff
SA
63enum koneplus_mouse_report_numbers {
64 KONEPLUS_MOUSE_REPORT_NUMBER_HID = 1,
65 KONEPLUS_MOUSE_REPORT_NUMBER_AUDIO = 2,
66 KONEPLUS_MOUSE_REPORT_NUMBER_BUTTON = 3,
67};
68
69struct koneplus_mouse_report_button {
70 uint8_t report_number; /* always KONEPLUS_MOUSE_REPORT_NUMBER_BUTTON */
71 uint8_t zero1;
72 uint8_t type;
73 uint8_t data1;
74 uint8_t data2;
75 uint8_t zero2;
76 uint8_t unknown[2];
4d043101 77} __attribute__ ((__packed__));
47dbdbff
SA
78
79enum koneplus_mouse_report_button_types {
80 /* data1 = new profile range 1-5 */
81 KONEPLUS_MOUSE_REPORT_BUTTON_TYPE_PROFILE = 0x20,
82
83 /* data1 = button number range 1-24; data2 = action */
84 KONEPLUS_MOUSE_REPORT_BUTTON_TYPE_QUICKLAUNCH = 0x60,
85
86 /* data1 = button number range 1-24; data2 = action */
87 KONEPLUS_MOUSE_REPORT_BUTTON_TYPE_TIMER = 0x80,
88
89 /* data1 = setting number range 1-5 */
90 KONEPLUS_MOUSE_REPORT_BUTTON_TYPE_CPI = 0xb0,
91
92 /* data1 and data2 = range 0x1-0xb */
93 KONEPLUS_MOUSE_REPORT_BUTTON_TYPE_SENSITIVITY = 0xc0,
94
95 /* data1 = 22 = next track...
96 * data2 = action
97 */
98 KONEPLUS_MOUSE_REPORT_BUTTON_TYPE_MULTIMEDIA = 0xf0,
6d1dec85 99 KONEPLUS_MOUSE_REPORT_TALK = 0xff,
47dbdbff
SA
100};
101
102enum koneplus_mouse_report_button_action {
103 KONEPLUS_MOUSE_REPORT_BUTTON_ACTION_PRESS = 0,
104 KONEPLUS_MOUSE_REPORT_BUTTON_ACTION_RELEASE = 1,
105};
106
107struct koneplus_roccat_report {
108 uint8_t type;
109 uint8_t data1;
110 uint8_t data2;
111 uint8_t profile;
4d043101 112} __attribute__ ((__packed__));
47dbdbff
SA
113
114struct koneplus_device {
115 int actual_profile;
116
117 int roccat_claimed;
118 int chrdev_minor;
119
120 struct mutex koneplus_lock;
47dbdbff
SA
121};
122
123#endif
This page took 0.122687 seconds and 5 git commands to generate.