aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Achatz <erazor_de@users.sourceforge.net>2012-11-04 03:38:58 -0500
committerJiri Kosina <jkosina@suse.cz>2012-11-05 07:17:39 -0500
commit9e78eb8fbba5b00678d3d20e8e435cd0500716f3 (patch)
treecb870afadaa4b4f71d1e436e1a5845e76faa8d88
parent8e74a2d31b980c2b2dc43641e5bb232c7cc3df4c (diff)
HID: roccat: enable Savu device reset
Device can be reset to factory state by sending a command via info sysfs attr. Changed from ro to rw to enable this feature. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-savu3
-rw-r--r--drivers/hid/hid-roccat-savu.c4
2 files changed, 3 insertions, 4 deletions
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu b/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu
index b42922cf6b1f..f1e02a98bd9d 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu
+++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu
@@ -40,8 +40,8 @@ What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-
40Date: Mai 2012 40Date: Mai 2012
41Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 41Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
42Description: When read, this file returns general data like firmware version. 42Description: When read, this file returns general data like firmware version.
43 When written, the device can be reset.
43 The data is 8 bytes long. 44 The data is 8 bytes long.
44 This file is readonly.
45Users: http://roccat.sourceforge.net 45Users: http://roccat.sourceforge.net
46 46
47What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/savu/roccatsavu<minor>/macro 47What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/savu/roccatsavu<minor>/macro
@@ -74,4 +74,3 @@ Description: The mouse has a Avago ADNS-3090 sensor.
74 This file allows reading and writing of the mouse sensors registers. 74 This file allows reading and writing of the mouse sensors registers.
75 The data has to be 4 bytes long. 75 The data has to be 4 bytes long.
76Users: http://roccat.sourceforge.net 76Users: http://roccat.sourceforge.net
77
diff --git a/drivers/hid/hid-roccat-savu.c b/drivers/hid/hid-roccat-savu.c
index 014afba407e0..31747a29c093 100644
--- a/drivers/hid/hid-roccat-savu.c
+++ b/drivers/hid/hid-roccat-savu.c
@@ -120,7 +120,7 @@ SAVU_SYSFS_RW(profile, PROFILE)
120SAVU_SYSFS_RW(general, GENERAL) 120SAVU_SYSFS_RW(general, GENERAL)
121SAVU_SYSFS_RW(buttons, BUTTONS) 121SAVU_SYSFS_RW(buttons, BUTTONS)
122SAVU_SYSFS_RW(macro, MACRO) 122SAVU_SYSFS_RW(macro, MACRO)
123SAVU_SYSFS_R(info, INFO) 123SAVU_SYSFS_RW(info, INFO)
124SAVU_SYSFS_RW(sensor, SENSOR) 124SAVU_SYSFS_RW(sensor, SENSOR)
125 125
126static struct bin_attribute savu_bin_attributes[] = { 126static struct bin_attribute savu_bin_attributes[] = {
@@ -129,7 +129,7 @@ static struct bin_attribute savu_bin_attributes[] = {
129 SAVU_BIN_ATTRIBUTE_RW(general, GENERAL), 129 SAVU_BIN_ATTRIBUTE_RW(general, GENERAL),
130 SAVU_BIN_ATTRIBUTE_RW(buttons, BUTTONS), 130 SAVU_BIN_ATTRIBUTE_RW(buttons, BUTTONS),
131 SAVU_BIN_ATTRIBUTE_RW(macro, MACRO), 131 SAVU_BIN_ATTRIBUTE_RW(macro, MACRO),
132 SAVU_BIN_ATTRIBUTE_R(info, INFO), 132 SAVU_BIN_ATTRIBUTE_RW(info, INFO),
133 SAVU_BIN_ATTRIBUTE_RW(sensor, SENSOR), 133 SAVU_BIN_ATTRIBUTE_RW(sensor, SENSOR),
134 __ATTR_NULL 134 __ATTR_NULL
135}; 135};