diff options
author | Stefan Achatz <stefan_achatz@web.de> | 2012-11-11 00:21:10 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-11-12 09:30:28 -0500 |
commit | ecbfe7aa55a3583238c0126bbc64f9043d390b50 (patch) | |
tree | 31fa20a4c86f624123e860f25c149bd5536a404b | |
parent | f1da71e1f658c3f1e5d08291258ac87c35e049a4 (diff) |
HID: roccat: deprecated some Pyra 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-pyra | 27 | ||||
-rw-r--r-- | Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra | 37 | ||||
-rw-r--r-- | drivers/hid/hid-roccat-pyra.c | 10 | ||||
-rw-r--r-- | drivers/hid/hid-roccat-pyra.h | 2 |
4 files changed, 46 insertions, 30 deletions
diff --git a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-pyra b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-pyra index 0a661b39e701..87ac87e9556d 100644 --- a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-pyra +++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-pyra | |||
@@ -37,6 +37,31 @@ Description: When read, this file returns the raw integer version number of the | |||
37 | Please use binary attribute "info" which provides this information. | 37 | Please use binary attribute "info" which provides this information. |
38 | Users: http://roccat.sourceforge.net | 38 | Users: http://roccat.sourceforge.net |
39 | 39 | ||
40 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile[1-5]_buttons | ||
41 | Date: August 2010 | ||
42 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
43 | Description: The mouse can store 5 profiles which can be switched by the | ||
44 | press of a button. A profile is split in settings and buttons. | ||
45 | profile_buttons holds information about button layout. | ||
46 | When read, these files return the respective profile buttons. | ||
47 | The returned data is 19 bytes in size. | ||
48 | This file is readonly. | ||
49 | Write control to select profile and read profile_buttons instead. | ||
50 | Users: http://roccat.sourceforge.net | ||
51 | |||
52 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile[1-5]_settings | ||
53 | Date: August 2010 | ||
54 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
55 | Description: The mouse can store 5 profiles which can be switched by the | ||
56 | press of a button. A profile is split in settings and buttons. | ||
57 | profile_settings holds information like resolution, sensitivity | ||
58 | and light effects. | ||
59 | When read, these files return the respective profile settings. | ||
60 | The returned data is 13 bytes in size. | ||
61 | This file is readonly. | ||
62 | Write control to select profile and read profile_settings instead. | ||
63 | Users: http://roccat.sourceforge.net | ||
64 | |||
40 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/startup_profile | 65 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/startup_profile |
41 | Date: August 2010 | 66 | Date: August 2010 |
42 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 67 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
@@ -45,4 +70,4 @@ Description: The integer value of this attribute ranges from 0-4. | |||
45 | that's active when the mouse is powered on. | 70 | that's active when the mouse is powered on. |
46 | This file is readonly. | 71 | This file is readonly. |
47 | Please use binary attribute "settings" which provides this information. | 72 | Please use binary attribute "settings" which provides this information. |
48 | Users: http://roccat.sourceforge.net \ No newline at end of file | 73 | Users: http://roccat.sourceforge.net |
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra b/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra index b0fab8bcf247..9fa9de30d14b 100644 --- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra +++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra | |||
@@ -1,3 +1,11 @@ | |||
1 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/info | ||
2 | Date: November 2012 | ||
3 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
4 | Description: When read, this file returns general data like firmware version. | ||
5 | When written, the device can be reset. | ||
6 | The data is 6 bytes long. | ||
7 | Users: http://roccat.sourceforge.net | ||
8 | |||
1 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_settings | 9 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_settings |
2 | Date: August 2010 | 10 | Date: August 2010 |
3 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 11 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
@@ -10,19 +18,8 @@ Description: The mouse can store 5 profiles which can be switched by the | |||
10 | The mouse will reject invalid data. | 18 | The mouse will reject invalid data. |
11 | Which profile to write is determined by the profile number | 19 | Which profile to write is determined by the profile number |
12 | contained in the data. | 20 | contained in the data. |
13 | This file is writeonly. | 21 | Before reading this file, control has to be written to select |
14 | Users: http://roccat.sourceforge.net | 22 | which profile to read. |
15 | |||
16 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile[1-5]_settings | ||
17 | Date: August 2010 | ||
18 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
19 | Description: The mouse can store 5 profiles which can be switched by the | ||
20 | press of a button. A profile is split in settings and buttons. | ||
21 | profile_settings holds information like resolution, sensitivity | ||
22 | and light effects. | ||
23 | When read, these files return the respective profile settings. | ||
24 | The returned data is 13 bytes in size. | ||
25 | This file is readonly. | ||
26 | Users: http://roccat.sourceforge.net | 23 | Users: http://roccat.sourceforge.net |
27 | 24 | ||
28 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_buttons | 25 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_buttons |
@@ -36,18 +33,8 @@ Description: The mouse can store 5 profiles which can be switched by the | |||
36 | The mouse will reject invalid data. | 33 | The mouse will reject invalid data. |
37 | Which profile to write is determined by the profile number | 34 | Which profile to write is determined by the profile number |
38 | contained in the data. | 35 | contained in the data. |
39 | This file is writeonly. | 36 | Before reading this file, control has to be written to select |
40 | Users: http://roccat.sourceforge.net | 37 | which profile to read. |
41 | |||
42 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile[1-5]_buttons | ||
43 | Date: August 2010 | ||
44 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
45 | Description: The mouse can store 5 profiles which can be switched by the | ||
46 | press of a button. A profile is split in settings and buttons. | ||
47 | profile_buttons holds information about button layout. | ||
48 | When read, these files return the respective profile buttons. | ||
49 | The returned data is 19 bytes in size. | ||
50 | This file is readonly. | ||
51 | Users: http://roccat.sourceforge.net | 38 | Users: http://roccat.sourceforge.net |
52 | 39 | ||
53 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/settings | 40 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/settings |
diff --git a/drivers/hid/hid-roccat-pyra.c b/drivers/hid/hid-roccat-pyra.c index 76199fa727ed..d4f1e3bee590 100644 --- a/drivers/hid/hid-roccat-pyra.c +++ b/drivers/hid/hid-roccat-pyra.c | |||
@@ -177,9 +177,10 @@ PYRA_SYSFS_R(thingy, THINGY) | |||
177 | .write = pyra_sysfs_write_ ## thingy \ | 177 | .write = pyra_sysfs_write_ ## thingy \ |
178 | } | 178 | } |
179 | 179 | ||
180 | PYRA_SYSFS_W(control, CONTROL) | ||
180 | PYRA_SYSFS_RW(info, INFO) | 181 | PYRA_SYSFS_RW(info, INFO) |
181 | PYRA_SYSFS_W(profile_settings, PROFILE_SETTINGS) | 182 | PYRA_SYSFS_RW(profile_settings, PROFILE_SETTINGS) |
182 | PYRA_SYSFS_W(profile_buttons, PROFILE_BUTTONS) | 183 | PYRA_SYSFS_RW(profile_buttons, PROFILE_BUTTONS) |
183 | PYRA_SYSFS_R(settings, SETTINGS) | 184 | PYRA_SYSFS_R(settings, SETTINGS) |
184 | 185 | ||
185 | static ssize_t pyra_sysfs_read_profilex_settings(struct file *fp, | 186 | static ssize_t pyra_sysfs_read_profilex_settings(struct file *fp, |
@@ -312,9 +313,10 @@ static struct device_attribute pyra_attributes[] = { | |||
312 | }; | 313 | }; |
313 | 314 | ||
314 | static struct bin_attribute pyra_bin_attributes[] = { | 315 | static struct bin_attribute pyra_bin_attributes[] = { |
316 | PYRA_BIN_ATTRIBUTE_W(control, CONTROL), | ||
315 | PYRA_BIN_ATTRIBUTE_RW(info, INFO), | 317 | PYRA_BIN_ATTRIBUTE_RW(info, INFO), |
316 | PYRA_BIN_ATTRIBUTE_W(profile_settings, PROFILE_SETTINGS), | 318 | PYRA_BIN_ATTRIBUTE_RW(profile_settings, PROFILE_SETTINGS), |
317 | PYRA_BIN_ATTRIBUTE_W(profile_buttons, PROFILE_BUTTONS), | 319 | PYRA_BIN_ATTRIBUTE_RW(profile_buttons, PROFILE_BUTTONS), |
318 | PYRA_BIN_ATTRIBUTE_RW(settings, SETTINGS), | 320 | PYRA_BIN_ATTRIBUTE_RW(settings, SETTINGS), |
319 | { | 321 | { |
320 | .attr = { .name = "profile1_settings", .mode = 0440 }, | 322 | .attr = { .name = "profile1_settings", .mode = 0440 }, |
diff --git a/drivers/hid/hid-roccat-pyra.h b/drivers/hid/hid-roccat-pyra.h index 93e494984976..beedcf001ceb 100644 --- a/drivers/hid/hid-roccat-pyra.h +++ b/drivers/hid/hid-roccat-pyra.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | 16 | ||
17 | enum { | 17 | enum { |
18 | PYRA_SIZE_CONTROL = 0x03, | ||
18 | PYRA_SIZE_INFO = 0x06, | 19 | PYRA_SIZE_INFO = 0x06, |
19 | PYRA_SIZE_PROFILE_SETTINGS = 0x0d, | 20 | PYRA_SIZE_PROFILE_SETTINGS = 0x0d, |
20 | PYRA_SIZE_PROFILE_BUTTONS = 0x13, | 21 | PYRA_SIZE_PROFILE_BUTTONS = 0x13, |
@@ -57,6 +58,7 @@ struct pyra_info { | |||
57 | } __attribute__ ((__packed__)); | 58 | } __attribute__ ((__packed__)); |
58 | 59 | ||
59 | enum pyra_commands { | 60 | enum pyra_commands { |
61 | PYRA_COMMAND_CONTROL = 0x4, | ||
60 | PYRA_COMMAND_SETTINGS = 0x5, | 62 | PYRA_COMMAND_SETTINGS = 0x5, |
61 | PYRA_COMMAND_PROFILE_SETTINGS = 0x6, | 63 | PYRA_COMMAND_PROFILE_SETTINGS = 0x6, |
62 | PYRA_COMMAND_PROFILE_BUTTONS = 0x7, | 64 | PYRA_COMMAND_PROFILE_BUTTONS = 0x7, |