Lines Matching refs:wdata

193 		      struct wiimote_data *wdata);
195 struct wiimote_data *wdata);
197 void (*in_keys) (struct wiimote_data *wdata, const __u8 *keys);
198 void (*in_accel) (struct wiimote_data *wdata, const __u8 *accel);
199 void (*in_ir) (struct wiimote_data *wdata, const __u8 *ir, bool packed,
201 void (*in_mp) (struct wiimote_data *wdata, const __u8 *mp);
202 void (*in_ext) (struct wiimote_data *wdata, const __u8 *ext);
263 void __wiimote_schedule(struct wiimote_data *wdata);
265 extern void wiiproto_req_drm(struct wiimote_data *wdata, __u8 drm);
266 extern void wiiproto_req_rumble(struct wiimote_data *wdata, __u8 rumble);
267 extern void wiiproto_req_leds(struct wiimote_data *wdata, int leds);
268 extern void wiiproto_req_status(struct wiimote_data *wdata);
269 extern void wiiproto_req_accel(struct wiimote_data *wdata, __u8 accel);
270 extern void wiiproto_req_ir1(struct wiimote_data *wdata, __u8 flags);
271 extern void wiiproto_req_ir2(struct wiimote_data *wdata, __u8 flags);
272 extern int wiimote_cmd_write(struct wiimote_data *wdata, __u32 offset,
274 extern ssize_t wiimote_cmd_read(struct wiimote_data *wdata, __u32 offset,
277 #define wiiproto_req_rreg(wdata, os, sz) \
278 wiiproto_req_rmem((wdata), false, (os), (sz))
279 #define wiiproto_req_reeprom(wdata, os, sz) \
280 wiiproto_req_rmem((wdata), true, (os), (sz))
281 extern void wiiproto_req_rmem(struct wiimote_data *wdata, bool eeprom,
286 extern int wiidebug_init(struct wiimote_data *wdata);
287 extern void wiidebug_deinit(struct wiimote_data *wdata);
297 static inline bool wiimote_cmd_pending(struct wiimote_data *wdata, int cmd,
300 return wdata->state.cmd == cmd && wdata->state.opt == opt;
304 static inline void wiimote_cmd_complete(struct wiimote_data *wdata)
306 wdata->state.cmd = WIIPROTO_REQ_NULL;
307 complete(&wdata->state.ready);
311 static inline void wiimote_cmd_abort(struct wiimote_data *wdata)
316 wdata->state.cmd = WIIPROTO_REQ_MAX;
317 complete(&wdata->state.ready);
320 static inline int wiimote_cmd_acquire(struct wiimote_data *wdata)
322 return mutex_lock_interruptible(&wdata->state.sync) ? -ERESTARTSYS : 0;
325 static inline void wiimote_cmd_acquire_noint(struct wiimote_data *wdata)
327 mutex_lock(&wdata->state.sync);
331 static inline void wiimote_cmd_set(struct wiimote_data *wdata, int cmd,
334 reinit_completion(&wdata->state.ready);
335 wdata->state.cmd = cmd;
336 wdata->state.opt = opt;
339 static inline void wiimote_cmd_release(struct wiimote_data *wdata)
341 mutex_unlock(&wdata->state.sync);
344 static inline int wiimote_cmd_wait(struct wiimote_data *wdata)
352 ret = wait_for_completion_interruptible_timeout(&wdata->state.ready, HZ);
357 else if (wdata->state.cmd != WIIPROTO_REQ_NULL)
363 static inline int wiimote_cmd_wait_noint(struct wiimote_data *wdata)
368 ret = wait_for_completion_timeout(&wdata->state.ready, HZ);
371 else if (wdata->state.cmd != WIIPROTO_REQ_NULL)