[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1341420303.3266.22.camel@neuromancer.tessier-ashpool>
Date: Wed, 04 Jul 2012 18:45:03 +0200
From: Stefan Achatz <erazor_de@...rs.sourceforge.net>
To: Rob Landley <rob@...dley.net>, Jiri Kosina <jkosina@...e.cz>,
Stefan Achatz <erazor_de@...rs.sourceforge.net>,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-input@...r.kernel.org
Subject: [PATCH] HID: roccat: Added sensor bin-sysfs-attr for Savu
The sensor attr can be used to tweak the optical sensor of the Savu.
Signed-off-by: Stefan Achatz <erazor_de@...rs.sourceforge.net>
---
.../ABI/testing/sysfs-driver-hid-roccat-savu | 9 +++++++++
drivers/hid/hid-roccat-savu.c | 2 ++
drivers/hid/hid-roccat-savu.h | 2 ++
3 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu b/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu
index e233490..b42922c 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu
+++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu
@@ -66,3 +66,12 @@ Description: The mouse can store 5 profiles which can be switched by the
The data has to be 3 bytes long.
The mouse will reject invalid data.
Users: http://roccat.sourceforge.net
+
+What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/savu/roccatsavu<minor>/sensor
+Date: July 2012
+Contact: Stefan Achatz <erazor_de@...rs.sourceforge.net>
+Description: The mouse has a Avago ADNS-3090 sensor.
+ This file allows reading and writing of the mouse sensors registers.
+ The data has to be 4 bytes long.
+Users: http://roccat.sourceforge.net
+
diff --git a/drivers/hid/hid-roccat-savu.c b/drivers/hid/hid-roccat-savu.c
index 29e87d7..014afba 100644
--- a/drivers/hid/hid-roccat-savu.c
+++ b/drivers/hid/hid-roccat-savu.c
@@ -121,6 +121,7 @@ SAVU_SYSFS_RW(general, GENERAL)
SAVU_SYSFS_RW(buttons, BUTTONS)
SAVU_SYSFS_RW(macro, MACRO)
SAVU_SYSFS_R(info, INFO)
+SAVU_SYSFS_RW(sensor, SENSOR)
static struct bin_attribute savu_bin_attributes[] = {
SAVU_BIN_ATTRIBUTE_W(control, CONTROL),
@@ -129,6 +130,7 @@ static struct bin_attribute savu_bin_attributes[] = {
SAVU_BIN_ATTRIBUTE_RW(buttons, BUTTONS),
SAVU_BIN_ATTRIBUTE_RW(macro, MACRO),
SAVU_BIN_ATTRIBUTE_R(info, INFO),
+ SAVU_BIN_ATTRIBUTE_RW(sensor, SENSOR),
__ATTR_NULL
};
diff --git a/drivers/hid/hid-roccat-savu.h b/drivers/hid/hid-roccat-savu.h
index b15a1bb..9120ba7 100644
--- a/drivers/hid/hid-roccat-savu.h
+++ b/drivers/hid/hid-roccat-savu.h
@@ -21,6 +21,7 @@ enum {
SAVU_SIZE_BUTTONS = 0x2f,
SAVU_SIZE_MACRO = 0x0823,
SAVU_SIZE_INFO = 0x08,
+ SAVU_SIZE_SENSOR = 0x04,
};
enum savu_control_requests {
@@ -35,6 +36,7 @@ enum savu_commands {
SAVU_COMMAND_BUTTONS = 0x7,
SAVU_COMMAND_MACRO = 0x8,
SAVU_COMMAND_INFO = 0x9,
+ SAVU_COMMAND_SENSOR = 0xc,
};
struct savu_mouse_report_special {
--
1.7.3.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists