Skip to content

Commit

Permalink
HID: roccat: add sysfs attr "reset" for Isku
Browse files Browse the repository at this point in the history
Isku needs an extra sysfs attr to support device reset.

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Stefan Achatz authored and Jiri Kosina committed Nov 12, 2012
1 parent 6e5920d commit f1da71e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Documentation/ABI/testing/sysfs-driver-hid-roccat-isku
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,14 @@ Description: When written, this file lets one store macros with max 500
which profile and key to read.
Users: http://roccat.sourceforge.net

What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/isku/roccatisku<minor>/reset
Date: November 2012
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: When written, this file lets one reset the device.
The data has to be 3 bytes long.
This file is writeonly.
Users: http://roccat.sourceforge.net

What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/isku/roccatisku<minor>/control
Date: June 2011
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Expand Down
2 changes: 2 additions & 0 deletions drivers/hid/hid-roccat-isku.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ ISKU_SYSFS_RW(last_set, LAST_SET)
ISKU_SYSFS_W(talk, TALK)
ISKU_SYSFS_R(info, INFO)
ISKU_SYSFS_W(control, CONTROL)
ISKU_SYSFS_W(reset, RESET)

static struct bin_attribute isku_bin_attributes[] = {
ISKU_BIN_ATTR_RW(macro, MACRO),
Expand All @@ -233,6 +234,7 @@ static struct bin_attribute isku_bin_attributes[] = {
ISKU_BIN_ATTR_W(talk, TALK),
ISKU_BIN_ATTR_R(info, INFO),
ISKU_BIN_ATTR_W(control, CONTROL),
ISKU_BIN_ATTR_W(reset, RESET),
__ATTR_NULL
};

Expand Down
2 changes: 2 additions & 0 deletions drivers/hid/hid-roccat-isku.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ enum {
ISKU_SIZE_LAST_SET = 0x14,
ISKU_SIZE_LIGHT = 0x0a,
ISKU_SIZE_MACRO = 0x823,
ISKU_SIZE_RESET = 0x03,
ISKU_SIZE_TALK = 0x10,
};

Expand All @@ -53,6 +54,7 @@ enum isku_commands {
ISKU_COMMAND_MACRO = 0xe,
ISKU_COMMAND_INFO = 0xf,
ISKU_COMMAND_LIGHT = 0x10,
ISKU_COMMAND_RESET = 0x11,
ISKU_COMMAND_KEYS_CAPSLOCK = 0x13,
ISKU_COMMAND_LAST_SET = 0x14,
ISKU_COMMAND_15 = 0x15,
Expand Down

0 comments on commit f1da71e

Please sign in to comment.