aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus27
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus29
-rw-r--r--drivers/hid/hid-roccat-koneplus.c10
-rw-r--r--drivers/hid/hid-roccat-koneplus.h2
4 files changed, 39 insertions, 29 deletions
diff --git a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus
index 22568b45973e..833fd59926a7 100644
--- a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus
+++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus
@@ -8,6 +8,7 @@ Description: The integer value of this attribute ranges from 0-4.
8 When written, this file sets the number of the startup profile 8 When written, this file sets the number of the startup profile
9 and the mouse activates this profile immediately. 9 and the mouse activates this profile immediately.
10 Please use actual_profile, it does the same thing. 10 Please use actual_profile, it does the same thing.
11Users: http://roccat.sourceforge.net
11 12
12What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/firmware_version 13What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/firmware_version
13Date: October 2010 14Date: October 2010
@@ -19,3 +20,29 @@ Description: When read, this file returns the raw integer version number of the
19 left. E.g. a returned value of 121 means 1.21 20 left. E.g. a returned value of 121 means 1.21
20 This file is readonly. 21 This file is readonly.
21 Please read binary attribute info which contains firmware version. 22 Please read binary attribute info which contains firmware version.
23Users: http://roccat.sourceforge.net
24
25What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile[1-5]_buttons
26Date: August 2010
27Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
28Description: The mouse can store 5 profiles which can be switched by the
29 press of a button. A profile is split in settings and buttons.
30 profile_buttons holds information about button layout.
31 When read, these files return the respective profile buttons.
32 The returned data is 77 bytes in size.
33 This file is readonly.
34 Write control to select profile and read profile_buttons instead.
35Users: http://roccat.sourceforge.net
36
37What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile[1-5]_settings
38Date: August 2010
39Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
40Description: The mouse can store 5 profiles which can be switched by the
41 press of a button. A profile is split in settings and buttons.
42 profile_settings holds information like resolution, sensitivity
43 and light effects.
44 When read, these files return the respective profile settings.
45 The returned data is 43 bytes in size.
46 This file is readonly.
47 Write control to select profile and read profile_settings instead.
48Users: http://roccat.sourceforge.net \ No newline at end of file
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus b/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus
index ed1213defb81..7bd776f9c3c7 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus
+++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus
@@ -39,18 +39,8 @@ Description: The mouse can store 5 profiles which can be switched by the
39 The mouse will reject invalid data. 39 The mouse will reject invalid data.
40 Which profile to write is determined by the profile number 40 Which profile to write is determined by the profile number
41 contained in the data. 41 contained in the data.
42 This file is writeonly. 42 Before reading this file, control has to be written to select
43Users: http://roccat.sourceforge.net 43 which profile to read.
44
45What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile[1-5]_buttons
46Date: August 2010
47Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
48Description: The mouse can store 5 profiles which can be switched by the
49 press of a button. A profile is split in settings and buttons.
50 profile_buttons holds information about button layout.
51 When read, these files return the respective profile buttons.
52 The returned data is 77 bytes in size.
53 This file is readonly.
54Users: http://roccat.sourceforge.net 44Users: http://roccat.sourceforge.net
55 45
56What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile_settings 46What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile_settings
@@ -65,19 +55,8 @@ Description: The mouse can store 5 profiles which can be switched by the
65 The mouse will reject invalid data. 55 The mouse will reject invalid data.
66 Which profile to write is determined by the profile number 56 Which profile to write is determined by the profile number
67 contained in the data. 57 contained in the data.
68 This file is writeonly. 58 Before reading this file, control has to be written to select
69Users: http://roccat.sourceforge.net 59 which profile to read.
70
71What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile[1-5]_settings
72Date: August 2010
73Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
74Description: The mouse can store 5 profiles which can be switched by the
75 press of a button. A profile is split in settings and buttons.
76 profile_settings holds information like resolution, sensitivity
77 and light effects.
78 When read, these files return the respective profile settings.
79 The returned data is 43 bytes in size.
80 This file is readonly.
81Users: http://roccat.sourceforge.net 60Users: http://roccat.sourceforge.net
82 61
83What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/sensor 62What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/sensor
diff --git a/drivers/hid/hid-roccat-koneplus.c b/drivers/hid/hid-roccat-koneplus.c
index 9fe445082308..6a48fa3c7da9 100644
--- a/drivers/hid/hid-roccat-koneplus.c
+++ b/drivers/hid/hid-roccat-koneplus.c
@@ -177,14 +177,15 @@ KONEPLUS_SYSFS_R(thingy, THINGY)
177 .write = koneplus_sysfs_write_ ## thingy \ 177 .write = koneplus_sysfs_write_ ## thingy \
178} 178}
179 179
180KONEPLUS_SYSFS_W(control, CONTROL)
180KONEPLUS_SYSFS_RW(info, INFO) 181KONEPLUS_SYSFS_RW(info, INFO)
181KONEPLUS_SYSFS_W(talk, TALK) 182KONEPLUS_SYSFS_W(talk, TALK)
182KONEPLUS_SYSFS_W(macro, MACRO) 183KONEPLUS_SYSFS_W(macro, MACRO)
183KONEPLUS_SYSFS_RW(sensor, SENSOR) 184KONEPLUS_SYSFS_RW(sensor, SENSOR)
184KONEPLUS_SYSFS_RW(tcu, TCU) 185KONEPLUS_SYSFS_RW(tcu, TCU)
185KONEPLUS_SYSFS_R(tcu_image, TCU_IMAGE) 186KONEPLUS_SYSFS_R(tcu_image, TCU_IMAGE)
186KONEPLUS_SYSFS_W(profile_settings, PROFILE_SETTINGS) 187KONEPLUS_SYSFS_RW(profile_settings, PROFILE_SETTINGS)
187KONEPLUS_SYSFS_W(profile_buttons, PROFILE_BUTTONS) 188KONEPLUS_SYSFS_RW(profile_buttons, PROFILE_BUTTONS)
188 189
189static ssize_t koneplus_sysfs_read_profilex_settings(struct file *fp, 190static ssize_t koneplus_sysfs_read_profilex_settings(struct file *fp,
190 struct kobject *kobj, struct bin_attribute *attr, char *buf, 191 struct kobject *kobj, struct bin_attribute *attr, char *buf,
@@ -306,14 +307,15 @@ static struct device_attribute koneplus_attributes[] = {
306}; 307};
307 308
308static struct bin_attribute koneplus_bin_attributes[] = { 309static struct bin_attribute koneplus_bin_attributes[] = {
310 KONEPLUS_BIN_ATTRIBUTE_W(control, CONTROL),
309 KONEPLUS_BIN_ATTRIBUTE_RW(info, INFO), 311 KONEPLUS_BIN_ATTRIBUTE_RW(info, INFO),
310 KONEPLUS_BIN_ATTRIBUTE_W(talk, TALK), 312 KONEPLUS_BIN_ATTRIBUTE_W(talk, TALK),
311 KONEPLUS_BIN_ATTRIBUTE_W(macro, MACRO), 313 KONEPLUS_BIN_ATTRIBUTE_W(macro, MACRO),
312 KONEPLUS_BIN_ATTRIBUTE_RW(sensor, SENSOR), 314 KONEPLUS_BIN_ATTRIBUTE_RW(sensor, SENSOR),
313 KONEPLUS_BIN_ATTRIBUTE_RW(tcu, TCU), 315 KONEPLUS_BIN_ATTRIBUTE_RW(tcu, TCU),
314 KONEPLUS_BIN_ATTRIBUTE_R(tcu_image, TCU_IMAGE), 316 KONEPLUS_BIN_ATTRIBUTE_R(tcu_image, TCU_IMAGE),
315 KONEPLUS_BIN_ATTRIBUTE_W(profile_settings, PROFILE_SETTINGS), 317 KONEPLUS_BIN_ATTRIBUTE_RW(profile_settings, PROFILE_SETTINGS),
316 KONEPLUS_BIN_ATTRIBUTE_W(profile_buttons, PROFILE_BUTTONS), 318 KONEPLUS_BIN_ATTRIBUTE_RW(profile_buttons, PROFILE_BUTTONS),
317 { 319 {
318 .attr = { .name = "profile1_settings", .mode = 0440 }, 320 .attr = { .name = "profile1_settings", .mode = 0440 },
319 .size = KONEPLUS_SIZE_PROFILE_SETTINGS, 321 .size = KONEPLUS_SIZE_PROFILE_SETTINGS,
diff --git a/drivers/hid/hid-roccat-koneplus.h b/drivers/hid/hid-roccat-koneplus.h
index 563b9d3fe5fb..d2b55f2c764d 100644
--- a/drivers/hid/hid-roccat-koneplus.h
+++ b/drivers/hid/hid-roccat-koneplus.h
@@ -16,6 +16,7 @@
16 16
17enum { 17enum {
18 KONEPLUS_SIZE_ACTUAL_PROFILE = 0x03, 18 KONEPLUS_SIZE_ACTUAL_PROFILE = 0x03,
19 KONEPLUS_SIZE_CONTROL = 0x03,
19 KONEPLUS_SIZE_FIRMWARE_WRITE = 0x0402, 20 KONEPLUS_SIZE_FIRMWARE_WRITE = 0x0402,
20 KONEPLUS_SIZE_INFO = 0x06, 21 KONEPLUS_SIZE_INFO = 0x06,
21 KONEPLUS_SIZE_MACRO = 0x0822, 22 KONEPLUS_SIZE_MACRO = 0x0822,
@@ -47,6 +48,7 @@ struct koneplus_info {
47 48
48enum koneplus_commands { 49enum koneplus_commands {
49 KONEPLUS_COMMAND_ACTUAL_PROFILE = 0x5, 50 KONEPLUS_COMMAND_ACTUAL_PROFILE = 0x5,
51 KONEPLUS_COMMAND_CONTROL = 0x4,
50 KONEPLUS_COMMAND_PROFILE_SETTINGS = 0x6, 52 KONEPLUS_COMMAND_PROFILE_SETTINGS = 0x6,
51 KONEPLUS_COMMAND_PROFILE_BUTTONS = 0x7, 53 KONEPLUS_COMMAND_PROFILE_BUTTONS = 0x7,
52 KONEPLUS_COMMAND_MACRO = 0x8, 54 KONEPLUS_COMMAND_MACRO = 0x8,