diff options
author | Stefan Achatz <stefan_achatz@web.de> | 2012-11-11 00:21:19 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-11-12 09:30:29 -0500 |
commit | 172e2abc19b51feef5b7980055725f0b242e988e (patch) | |
tree | d16cf15bc518cfc6c70271a5aed3d1312c138d04 | |
parent | bb060d65c3bf1d0211262e8229097d9a1beab20d (diff) |
HID: roccat: deprecate some Kovaplus attributes
Introduced attribute "control" and made profile_settings and profile_buttons
readable, which makes profile[1-5]_settings and profile[1-5]_buttons obsolete.
Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r-- | Documentation/ABI/obsolete/sysfs-driver-hid-roccat-kovaplus | 25 | ||||
-rw-r--r-- | Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus | 29 | ||||
-rw-r--r-- | drivers/hid/hid-roccat-kovaplus.c | 10 | ||||
-rw-r--r-- | drivers/hid/hid-roccat-kovaplus.h | 2 |
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". |
41 | Users: http://roccat.sourceforge.net | 41 | Users: http://roccat.sourceforge.net |
42 | |||
43 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_buttons | ||
44 | Date: January 2011 | ||
45 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
46 | Description: 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. | ||
53 | Users: http://roccat.sourceforge.net | ||
54 | |||
55 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_settings | ||
56 | Date: January 2011 | ||
57 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
58 | Description: 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. | ||
66 | Users: 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 |
32 | Users: http://roccat.sourceforge.net | 32 | which profile to read. |
33 | |||
34 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_buttons | ||
35 | Date: January 2011 | ||
36 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
37 | Description: 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. | ||
43 | Users: http://roccat.sourceforge.net | 33 | Users: http://roccat.sourceforge.net |
44 | 34 | ||
45 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile_settings | 35 | What: /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 |
58 | Users: http://roccat.sourceforge.net | 48 | which profile to read. |
59 | |||
60 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_settings | ||
61 | Date: January 2011 | ||
62 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
63 | Description: 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. | ||
70 | Users: http://roccat.sourceforge.net | 49 | Users: 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 | ||
221 | KOVAPLUS_SYSFS_W(control, CONTROL) | ||
221 | KOVAPLUS_SYSFS_RW(info, INFO) | 222 | KOVAPLUS_SYSFS_RW(info, INFO) |
222 | KOVAPLUS_SYSFS_W(profile_settings, PROFILE_SETTINGS) | 223 | KOVAPLUS_SYSFS_RW(profile_settings, PROFILE_SETTINGS) |
223 | KOVAPLUS_SYSFS_W(profile_buttons, PROFILE_BUTTONS) | 224 | KOVAPLUS_SYSFS_RW(profile_buttons, PROFILE_BUTTONS) |
224 | 225 | ||
225 | static ssize_t kovaplus_sysfs_read_profilex_settings(struct file *fp, | 226 | static 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 | ||
371 | static struct bin_attribute kovaplus_bin_attributes[] = { | 372 | static 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 | ||
17 | enum { | 17 | enum { |
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 | ||
62 | enum kovaplus_commands { | 63 | enum 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, |