aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorStefan Achatz <stefan_achatz@web.de>2012-11-11 00:21:10 -0500
committerJiri Kosina <jkosina@suse.cz>2012-11-12 09:30:28 -0500
commitecbfe7aa55a3583238c0126bbc64f9043d390b50 (patch)
tree31fa20a4c86f624123e860f25c149bd5536a404b /drivers/hid
parentf1da71e1f658c3f1e5d08291258ac87c35e049a4 (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>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-roccat-pyra.c10
-rw-r--r--drivers/hid/hid-roccat-pyra.h2
2 files changed, 8 insertions, 4 deletions
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
180PYRA_SYSFS_W(control, CONTROL)
180PYRA_SYSFS_RW(info, INFO) 181PYRA_SYSFS_RW(info, INFO)
181PYRA_SYSFS_W(profile_settings, PROFILE_SETTINGS) 182PYRA_SYSFS_RW(profile_settings, PROFILE_SETTINGS)
182PYRA_SYSFS_W(profile_buttons, PROFILE_BUTTONS) 183PYRA_SYSFS_RW(profile_buttons, PROFILE_BUTTONS)
183PYRA_SYSFS_R(settings, SETTINGS) 184PYRA_SYSFS_R(settings, SETTINGS)
184 185
185static ssize_t pyra_sysfs_read_profilex_settings(struct file *fp, 186static ssize_t pyra_sysfs_read_profilex_settings(struct file *fp,
@@ -312,9 +313,10 @@ static struct device_attribute pyra_attributes[] = {
312}; 313};
313 314
314static struct bin_attribute pyra_bin_attributes[] = { 315static 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
17enum { 17enum {
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
59enum pyra_commands { 60enum 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,