aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/ABI/obsolete/sysfs-driver-hid-roccat-kovaplus25
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus29
-rw-r--r--drivers/hid/hid-roccat-kovaplus.c10
-rw-r--r--drivers/hid/hid-roccat-kovaplus.h2
4 files changed, 37 insertions, 29 deletions
diff --git a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-kovaplus b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-kovaplus
index 4d9fb26292a2..4a98e02b6c6a 100644
--- a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-kovaplus
+++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-kovaplus
@@ -39,3 +39,28 @@ Description: When read, this file returns the raw integer version number of the
39 This file is readonly. 39 This file is readonly.
40 Obsoleted by binary sysfs attribute "info". 40 Obsoleted by binary sysfs attribute "info".
41Users: http://roccat.sourceforge.net 41Users: http://roccat.sourceforge.net
42
43What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_buttons
44Date: January 2011
45Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
46Description: The mouse can store 5 profiles which can be switched by the
47 press of a button. A profile is split in settings and buttons.
48 profile_buttons holds information about button layout.
49 When read, these files return the respective profile buttons.
50 The returned data is 23 bytes in size.
51 This file is readonly.
52 Write control to select profile and read profile_buttons instead.
53Users: http://roccat.sourceforge.net
54
55What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_settings
56Date: January 2011
57Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
58Description: The mouse can store 5 profiles which can be switched by the
59 press of a button. A profile is split in settings and buttons.
60 profile_settings holds information like resolution, sensitivity
61 and light effects.
62 When read, these files return the respective profile settings.
63 The returned data is 16 bytes in size.
64 This file is readonly.
65 Write control to select profile and read profile_settings instead.
66Users: http://roccat.sourceforge.net
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus
index 507f2c7321d5..a10404f15a54 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus
+++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus
@@ -28,18 +28,8 @@ Description: The mouse can store 5 profiles which can be switched by the
28 The mouse will reject invalid data. 28 The mouse will reject invalid data.
29 Which profile to write is determined by the profile number 29 Which profile to write is determined by the profile number
30 contained in the data. 30 contained in the data.
31 This file is writeonly. 31 Before reading this file, control has to be written to select
32Users: http://roccat.sourceforge.net 32 which profile to read.
33
34What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_buttons
35Date: January 2011
36Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
37Description: The mouse can store 5 profiles which can be switched by the
38 press of a button. A profile is split in settings and buttons.
39 profile_buttons holds information about button layout.
40 When read, these files return the respective profile buttons.
41 The returned data is 23 bytes in size.
42 This file is readonly.
43Users: http://roccat.sourceforge.net 33Users: http://roccat.sourceforge.net
44 34
45What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile_settings 35What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile_settings
@@ -54,17 +44,6 @@ Description: The mouse can store 5 profiles which can be switched by the
54 The mouse will reject invalid data. 44 The mouse will reject invalid data.
55 Which profile to write is determined by the profile number 45 Which profile to write is determined by the profile number
56 contained in the data. 46 contained in the data.
57 This file is writeonly. 47 Before reading this file, control has to be written to select
58Users: http://roccat.sourceforge.net 48 which profile to read.
59
60What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_settings
61Date: January 2011
62Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
63Description: The mouse can store 5 profiles which can be switched by the
64 press of a button. A profile is split in settings and buttons.
65 profile_settings holds information like resolution, sensitivity
66 and light effects.
67 When read, these files return the respective profile settings.
68 The returned data is 16 bytes in size.
69 This file is readonly.
70Users: http://roccat.sourceforge.net 49Users: http://roccat.sourceforge.net
diff --git a/drivers/hid/hid-roccat-kovaplus.c b/drivers/hid/hid-roccat-kovaplus.c
index 1589fd3bcf0f..b8b37789b864 100644
--- a/drivers/hid/hid-roccat-kovaplus.c
+++ b/drivers/hid/hid-roccat-kovaplus.c
@@ -218,9 +218,10 @@ KOVAPLUS_SYSFS_R(thingy, THINGY)
218 .write = kovaplus_sysfs_write_ ## thingy \ 218 .write = kovaplus_sysfs_write_ ## thingy \
219} 219}
220 220
221KOVAPLUS_SYSFS_W(control, CONTROL)
221KOVAPLUS_SYSFS_RW(info, INFO) 222KOVAPLUS_SYSFS_RW(info, INFO)
222KOVAPLUS_SYSFS_W(profile_settings, PROFILE_SETTINGS) 223KOVAPLUS_SYSFS_RW(profile_settings, PROFILE_SETTINGS)
223KOVAPLUS_SYSFS_W(profile_buttons, PROFILE_BUTTONS) 224KOVAPLUS_SYSFS_RW(profile_buttons, PROFILE_BUTTONS)
224 225
225static ssize_t kovaplus_sysfs_read_profilex_settings(struct file *fp, 226static ssize_t kovaplus_sysfs_read_profilex_settings(struct file *fp,
226 struct kobject *kobj, struct bin_attribute *attr, char *buf, 227 struct kobject *kobj, struct bin_attribute *attr, char *buf,
@@ -369,9 +370,10 @@ static struct device_attribute kovaplus_attributes[] = {
369}; 370};
370 371
371static struct bin_attribute kovaplus_bin_attributes[] = { 372static struct bin_attribute kovaplus_bin_attributes[] = {
373 KOVAPLUS_BIN_ATTRIBUTE_W(control, CONTROL),
372 KOVAPLUS_BIN_ATTRIBUTE_RW(info, INFO), 374 KOVAPLUS_BIN_ATTRIBUTE_RW(info, INFO),
373 KOVAPLUS_BIN_ATTRIBUTE_W(profile_settings, PROFILE_SETTINGS), 375 KOVAPLUS_BIN_ATTRIBUTE_RW(profile_settings, PROFILE_SETTINGS),
374 KOVAPLUS_BIN_ATTRIBUTE_W(profile_buttons, PROFILE_BUTTONS), 376 KOVAPLUS_BIN_ATTRIBUTE_RW(profile_buttons, PROFILE_BUTTONS),
375 { 377 {
376 .attr = { .name = "profile1_settings", .mode = 0440 }, 378 .attr = { .name = "profile1_settings", .mode = 0440 },
377 .size = KOVAPLUS_SIZE_PROFILE_SETTINGS, 379 .size = KOVAPLUS_SIZE_PROFILE_SETTINGS,
diff --git a/drivers/hid/hid-roccat-kovaplus.h b/drivers/hid/hid-roccat-kovaplus.h
index 1189573daee2..fbb7a16a7e54 100644
--- a/drivers/hid/hid-roccat-kovaplus.h
+++ b/drivers/hid/hid-roccat-kovaplus.h
@@ -15,6 +15,7 @@
15#include <linux/types.h> 15#include <linux/types.h>
16 16
17enum { 17enum {
18 KOVAPLUS_SIZE_CONTROL = 0x03,
18 KOVAPLUS_SIZE_INFO = 0x06, 19 KOVAPLUS_SIZE_INFO = 0x06,
19 KOVAPLUS_SIZE_PROFILE_SETTINGS = 0x10, 20 KOVAPLUS_SIZE_PROFILE_SETTINGS = 0x10,
20 KOVAPLUS_SIZE_PROFILE_BUTTONS = 0x17, 21 KOVAPLUS_SIZE_PROFILE_BUTTONS = 0x17,
@@ -61,6 +62,7 @@ struct kovaplus_info {
61 62
62enum kovaplus_commands { 63enum kovaplus_commands {
63 KOVAPLUS_COMMAND_ACTUAL_PROFILE = 0x5, 64 KOVAPLUS_COMMAND_ACTUAL_PROFILE = 0x5,
65 KOVAPLUS_COMMAND_CONTROL = 0x4,
64 KOVAPLUS_COMMAND_PROFILE_SETTINGS = 0x6, 66 KOVAPLUS_COMMAND_PROFILE_SETTINGS = 0x6,
65 KOVAPLUS_COMMAND_PROFILE_BUTTONS = 0x7, 67 KOVAPLUS_COMMAND_PROFILE_BUTTONS = 0x7,
66 KOVAPLUS_COMMAND_INFO = 0x9, 68 KOVAPLUS_COMMAND_INFO = 0x9,