diff options
author | Stefan Achatz <erazor_de@users.sourceforge.net> | 2012-07-04 12:45:03 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-07-20 03:50:42 -0400 |
commit | 11a5c818ae2b7f8ffa7734fa096ca7e9d37b1216 (patch) | |
tree | 95eeebd6bae07a948da79e05e5a2f1d915f72f77 /drivers | |
parent | 7392d73be2b3c907d65126f072c313215e1907b3 (diff) |
HID: roccat: added sensor sysfs attribute for Savu
The sensor attr can be used to tweak the optical sensor of the Savu.
Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hid/hid-roccat-savu.c | 2 | ||||
-rw-r--r-- | drivers/hid/hid-roccat-savu.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/hid/hid-roccat-savu.c b/drivers/hid/hid-roccat-savu.c index 29e87d712de0..014afba407e0 100644 --- a/drivers/hid/hid-roccat-savu.c +++ b/drivers/hid/hid-roccat-savu.c | |||
@@ -121,6 +121,7 @@ SAVU_SYSFS_RW(general, GENERAL) | |||
121 | SAVU_SYSFS_RW(buttons, BUTTONS) | 121 | SAVU_SYSFS_RW(buttons, BUTTONS) |
122 | SAVU_SYSFS_RW(macro, MACRO) | 122 | SAVU_SYSFS_RW(macro, MACRO) |
123 | SAVU_SYSFS_R(info, INFO) | 123 | SAVU_SYSFS_R(info, INFO) |
124 | SAVU_SYSFS_RW(sensor, SENSOR) | ||
124 | 125 | ||
125 | static struct bin_attribute savu_bin_attributes[] = { | 126 | static struct bin_attribute savu_bin_attributes[] = { |
126 | SAVU_BIN_ATTRIBUTE_W(control, CONTROL), | 127 | SAVU_BIN_ATTRIBUTE_W(control, CONTROL), |
@@ -129,6 +130,7 @@ static struct bin_attribute savu_bin_attributes[] = { | |||
129 | SAVU_BIN_ATTRIBUTE_RW(buttons, BUTTONS), | 130 | SAVU_BIN_ATTRIBUTE_RW(buttons, BUTTONS), |
130 | SAVU_BIN_ATTRIBUTE_RW(macro, MACRO), | 131 | SAVU_BIN_ATTRIBUTE_RW(macro, MACRO), |
131 | SAVU_BIN_ATTRIBUTE_R(info, INFO), | 132 | SAVU_BIN_ATTRIBUTE_R(info, INFO), |
133 | SAVU_BIN_ATTRIBUTE_RW(sensor, SENSOR), | ||
132 | __ATTR_NULL | 134 | __ATTR_NULL |
133 | }; | 135 | }; |
134 | 136 | ||
diff --git a/drivers/hid/hid-roccat-savu.h b/drivers/hid/hid-roccat-savu.h index b15a1bbb66fb..9120ba72087f 100644 --- a/drivers/hid/hid-roccat-savu.h +++ b/drivers/hid/hid-roccat-savu.h | |||
@@ -21,6 +21,7 @@ enum { | |||
21 | SAVU_SIZE_BUTTONS = 0x2f, | 21 | SAVU_SIZE_BUTTONS = 0x2f, |
22 | SAVU_SIZE_MACRO = 0x0823, | 22 | SAVU_SIZE_MACRO = 0x0823, |
23 | SAVU_SIZE_INFO = 0x08, | 23 | SAVU_SIZE_INFO = 0x08, |
24 | SAVU_SIZE_SENSOR = 0x04, | ||
24 | }; | 25 | }; |
25 | 26 | ||
26 | enum savu_control_requests { | 27 | enum savu_control_requests { |
@@ -35,6 +36,7 @@ enum savu_commands { | |||
35 | SAVU_COMMAND_BUTTONS = 0x7, | 36 | SAVU_COMMAND_BUTTONS = 0x7, |
36 | SAVU_COMMAND_MACRO = 0x8, | 37 | SAVU_COMMAND_MACRO = 0x8, |
37 | SAVU_COMMAND_INFO = 0x9, | 38 | SAVU_COMMAND_INFO = 0x9, |
39 | SAVU_COMMAND_SENSOR = 0xc, | ||
38 | }; | 40 | }; |
39 | 41 | ||
40 | struct savu_mouse_report_special { | 42 | struct savu_mouse_report_special { |