summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-roccat.h
diff options
context:
space:
mode:
authorStefan Achatz <erazor_de@users.sourceforge.net>2010-05-19 18:55:16 +0200
committerJiri Kosina <jkosina@suse.cz>2010-05-25 09:57:03 +0200
commit206f5f2fcb5ff5bb0c60f9e9189937f3ca03e378 (patch)
tree9699132bf54da1b36560208892a4067bd889a992 /drivers/hid/hid-roccat.h
parentc2fd1a4ebf9127c280d227acb635eb1df213439c (diff)
HID: roccat: propagate special events of roccat hardware to userspace
Module roccat is a char device used to report special events of roccat hardware to userland. These events include requests for on-screen-display of profile or dpi settings or requests for execution of macro sequences that are not stored in device. The information in these events depends on hid device implementation and contains data that is not available in a single hid event or else hidraw could have been used. It is inspired by hidraw, but uses only one circular buffer for all readers. The device is as generic as possible so that the functionality is usable by all (kone and upcomming) roccat device drivers. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-roccat.h')
-rw-r--r--drivers/hid/hid-roccat.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/hid/hid-roccat.h b/drivers/hid/hid-roccat.h
new file mode 100644
index 00000000000..40cca5b918d
--- /dev/null
+++ b/drivers/hid/hid-roccat.h
@@ -0,0 +1,31 @@
+#ifndef __HID_ROCCAT_H
+#define __HID_ROCCAT_H
+
+/*
+ * Copyright (c) 2010 Stefan Achatz <erazor_de@users.sourceforge.net>
+ */
+
+/*
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ */
+
+#include <linux/hid.h>
+#include <linux/types.h>
+
+#ifdef CONFIG_HID_ROCCAT
+int roccat_connect(struct hid_device *hid);
+void roccat_disconnect(int minor);
+int roccat_report_event(int minor, u8 const *data, int len);
+#else
+static inline int roccat_connect(struct hid_device *hid) { return -1; }
+static inline void roccat_disconnect(int minor) {}
+static inline int roccat_report_event(int minor, u8 const *data, int len)
+{
+ return 0;
+}
+#endif
+
+#endif