diff options
author | David Herrmann <dh.herrmann@googlemail.com> | 2011-11-17 08:12:06 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-11-22 17:09:34 -0500 |
commit | 0b6815d75d8bf214998455d94061a40f3b4a77f3 (patch) | |
tree | fd8e5bca1ed7a805546f204faad80e3b91fc72b6 /drivers/hid/hid-wiimote.h | |
parent | 479901ba1847902623cc348b1d09c7d8979a9683 (diff) |
HID: wiimote: Add extension handler stubs
All supported extensions report data as 6 byte block. All DRMs with extension
data provide at least 6 extension bytes. Hence a generic handler for all
extension bytes is sufficient and can be called on all DRMs.
The handler distinguishes the input and passes it to the right handler. Motion+
passes data interleaved so we can have Motion+ and a regular extension enabled
simultaneously.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-wiimote.h')
-rw-r--r-- | drivers/hid/hid-wiimote.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hid/hid-wiimote.h b/drivers/hid/hid-wiimote.h index abbfab8f60b7..1f3e53a3a148 100644 --- a/drivers/hid/hid-wiimote.h +++ b/drivers/hid/hid-wiimote.h | |||
@@ -125,6 +125,7 @@ extern int wiiext_init(struct wiimote_data *wdata); | |||
125 | extern void wiiext_deinit(struct wiimote_data *wdata); | 125 | extern void wiiext_deinit(struct wiimote_data *wdata); |
126 | extern void wiiext_event(struct wiimote_data *wdata, bool plugged); | 126 | extern void wiiext_event(struct wiimote_data *wdata, bool plugged); |
127 | extern bool wiiext_active(struct wiimote_data *wdata); | 127 | extern bool wiiext_active(struct wiimote_data *wdata); |
128 | extern void wiiext_handle(struct wiimote_data *wdata, const __u8 *payload); | ||
128 | 129 | ||
129 | #else | 130 | #else |
130 | 131 | ||
@@ -132,6 +133,7 @@ static inline int wiiext_init(void *u) { return 0; } | |||
132 | static inline void wiiext_deinit(void *u) { } | 133 | static inline void wiiext_deinit(void *u) { } |
133 | static inline void wiiext_event(void *u, bool p) { } | 134 | static inline void wiiext_event(void *u, bool p) { } |
134 | static inline bool wiiext_active(void *u) { return false; } | 135 | static inline bool wiiext_active(void *u) { return false; } |
136 | static inline void wiiext_handle(void *u, const __u8 *p) { } | ||
135 | 137 | ||
136 | #endif | 138 | #endif |
137 | 139 | ||