Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Stefan Achatz and committed by
Jiri Kosina
9e78eb8f 8e74a2d3

+3 -4
+1 -2
Documentation/ABI/testing/sysfs-driver-hid-roccat-savu
··· 40 40 Date: Mai 2012 41 41 Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 42 42 Description: When read, this file returns general data like firmware version. 43 + When written, the device can be reset. 43 44 The data is 8 bytes long. 44 - This file is readonly. 45 45 Users: http://roccat.sourceforge.net 46 46 47 47 What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/savu/roccatsavu<minor>/macro ··· 74 74 This file allows reading and writing of the mouse sensors registers. 75 75 The data has to be 4 bytes long. 76 76 Users: http://roccat.sourceforge.net 77 -
+2 -2
drivers/hid/hid-roccat-savu.c
··· 120 120 SAVU_SYSFS_RW(general, GENERAL) 121 121 SAVU_SYSFS_RW(buttons, BUTTONS) 122 122 SAVU_SYSFS_RW(macro, MACRO) 123 - SAVU_SYSFS_R(info, INFO) 123 + SAVU_SYSFS_RW(info, INFO) 124 124 SAVU_SYSFS_RW(sensor, SENSOR) 125 125 126 126 static struct bin_attribute savu_bin_attributes[] = { ··· 129 129 SAVU_BIN_ATTRIBUTE_RW(general, GENERAL), 130 130 SAVU_BIN_ATTRIBUTE_RW(buttons, BUTTONS), 131 131 SAVU_BIN_ATTRIBUTE_RW(macro, MACRO), 132 - SAVU_BIN_ATTRIBUTE_R(info, INFO), 132 + SAVU_BIN_ATTRIBUTE_RW(info, INFO), 133 133 SAVU_BIN_ATTRIBUTE_RW(sensor, SENSOR), 134 134 __ATTR_NULL 135 135 };