diff options
author | Stefan Achatz <erazor_de@users.sourceforge.net> | 2010-05-19 12:55:16 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-05-25 03:57:03 -0400 |
commit | 206f5f2fcb5ff5bb0c60f9e9189937f3ca03e378 (patch) | |
tree | 9699132bf54da1b36560208892a4067bd889a992 /drivers/hid/hid-roccat.h | |
parent | c2fd1a4ebf9127c280d227acb635eb1df213439c (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.h | 31 |
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 000000000000..40cca5b918dc --- /dev/null +++ b/drivers/hid/hid-roccat.h | |||
@@ -0,0 +1,31 @@ | |||
1 | #ifndef __HID_ROCCAT_H | ||
2 | #define __HID_ROCCAT_H | ||
3 | |||
4 | /* | ||
5 | * Copyright (c) 2010 Stefan Achatz <erazor_de@users.sourceforge.net> | ||
6 | */ | ||
7 | |||
8 | /* | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License as published by the Free | ||
11 | * Software Foundation; either version 2 of the License, or (at your option) | ||
12 | * any later version. | ||
13 | */ | ||
14 | |||
15 | #include <linux/hid.h> | ||
16 | #include <linux/types.h> | ||
17 | |||
18 | #ifdef CONFIG_HID_ROCCAT | ||
19 | int roccat_connect(struct hid_device *hid); | ||
20 | void roccat_disconnect(int minor); | ||
21 | int roccat_report_event(int minor, u8 const *data, int len); | ||
22 | #else | ||
23 | static inline int roccat_connect(struct hid_device *hid) { return -1; } | ||
24 | static inline void roccat_disconnect(int minor) {} | ||
25 | static inline int roccat_report_event(int minor, u8 const *data, int len) | ||
26 | { | ||
27 | return 0; | ||
28 | } | ||
29 | #endif | ||
30 | |||
31 | #endif | ||