aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-wiimote.h
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2011-11-17 08:12:10 -0500
committerJiri Kosina <jkosina@suse.cz>2011-11-22 17:10:26 -0500
commit43e5e7c60ee7039f538ccfaaa4e99829719d9bea (patch)
treec97a33352738f583e8f0c563af733914e02b147a /drivers/hid/hid-wiimote.h
parent5906215bab9fccf7aa2c4305accf0716c4634d69 (diff)
HID: wiimote: Add debugfs support stubs
Add initializer and deinitializer for debugfs support. This will later allow raw eeprom access and direct DRM modifications to debug wiimote behaviour and further protocol reverse-engineerings. 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.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/hid/hid-wiimote.h b/drivers/hid/hid-wiimote.h
index 1f3e53a3a148..89b8851dbf1f 100644
--- a/drivers/hid/hid-wiimote.h
+++ b/drivers/hid/hid-wiimote.h
@@ -74,6 +74,7 @@ struct wiimote_data {
74 struct input_dev *ir; 74 struct input_dev *ir;
75 struct power_supply battery; 75 struct power_supply battery;
76 struct wiimote_ext *ext; 76 struct wiimote_ext *ext;
77 struct wiimote_debug *debug;
77 78
78 spinlock_t qlock; 79 spinlock_t qlock;
79 __u8 head; 80 __u8 head;
@@ -137,6 +138,18 @@ static inline void wiiext_handle(void *u, const __u8 *p) { }
137 138
138#endif 139#endif
139 140
141#ifdef CONFIG_DEBUG_FS
142
143extern int wiidebug_init(struct wiimote_data *wdata);
144extern void wiidebug_deinit(struct wiimote_data *wdata);
145
146#else
147
148static inline int wiidebug_init(void *u) { return 0; }
149static inline void wiidebug_deinit(void *u) { }
150
151#endif
152
140/* requires the state.lock spinlock to be held */ 153/* requires the state.lock spinlock to be held */
141static inline bool wiimote_cmd_pending(struct wiimote_data *wdata, int cmd, 154static inline bool wiimote_cmd_pending(struct wiimote_data *wdata, int cmd,
142 __u32 opt) 155 __u32 opt)