• Home
  • Raw
  • Download

Lines Matching refs:wdata

191 		      struct wiimote_data *wdata);
193 struct wiimote_data *wdata);
195 void (*in_keys) (struct wiimote_data *wdata, const __u8 *keys);
196 void (*in_accel) (struct wiimote_data *wdata, const __u8 *accel);
197 void (*in_ir) (struct wiimote_data *wdata, const __u8 *ir, bool packed,
199 void (*in_mp) (struct wiimote_data *wdata, const __u8 *mp);
200 void (*in_ext) (struct wiimote_data *wdata, const __u8 *ext);
262 void __wiimote_schedule(struct wiimote_data *wdata);
264 extern void wiiproto_req_drm(struct wiimote_data *wdata, __u8 drm);
265 extern void wiiproto_req_rumble(struct wiimote_data *wdata, __u8 rumble);
266 extern void wiiproto_req_leds(struct wiimote_data *wdata, int leds);
267 extern void wiiproto_req_status(struct wiimote_data *wdata);
268 extern void wiiproto_req_accel(struct wiimote_data *wdata, __u8 accel);
269 extern void wiiproto_req_ir1(struct wiimote_data *wdata, __u8 flags);
270 extern void wiiproto_req_ir2(struct wiimote_data *wdata, __u8 flags);
271 extern int wiimote_cmd_write(struct wiimote_data *wdata, __u32 offset,
273 extern ssize_t wiimote_cmd_read(struct wiimote_data *wdata, __u32 offset,
276 #define wiiproto_req_rreg(wdata, os, sz) \ argument
277 wiiproto_req_rmem((wdata), false, (os), (sz))
278 #define wiiproto_req_reeprom(wdata, os, sz) \ argument
279 wiiproto_req_rmem((wdata), true, (os), (sz))
280 extern void wiiproto_req_rmem(struct wiimote_data *wdata, bool eeprom,
285 extern int wiidebug_init(struct wiimote_data *wdata);
286 extern void wiidebug_deinit(struct wiimote_data *wdata);
296 static inline bool wiimote_cmd_pending(struct wiimote_data *wdata, int cmd, in wiimote_cmd_pending() argument
299 return wdata->state.cmd == cmd && wdata->state.opt == opt; in wiimote_cmd_pending()
303 static inline void wiimote_cmd_complete(struct wiimote_data *wdata) in wiimote_cmd_complete() argument
305 wdata->state.cmd = WIIPROTO_REQ_NULL; in wiimote_cmd_complete()
306 complete(&wdata->state.ready); in wiimote_cmd_complete()
310 static inline void wiimote_cmd_abort(struct wiimote_data *wdata) in wiimote_cmd_abort() argument
315 wdata->state.cmd = WIIPROTO_REQ_MAX; in wiimote_cmd_abort()
316 complete(&wdata->state.ready); in wiimote_cmd_abort()
319 static inline int wiimote_cmd_acquire(struct wiimote_data *wdata) in wiimote_cmd_acquire() argument
321 return mutex_lock_interruptible(&wdata->state.sync) ? -ERESTARTSYS : 0; in wiimote_cmd_acquire()
324 static inline void wiimote_cmd_acquire_noint(struct wiimote_data *wdata) in wiimote_cmd_acquire_noint() argument
326 mutex_lock(&wdata->state.sync); in wiimote_cmd_acquire_noint()
330 static inline void wiimote_cmd_set(struct wiimote_data *wdata, int cmd, in wiimote_cmd_set() argument
333 reinit_completion(&wdata->state.ready); in wiimote_cmd_set()
334 wdata->state.cmd = cmd; in wiimote_cmd_set()
335 wdata->state.opt = opt; in wiimote_cmd_set()
338 static inline void wiimote_cmd_release(struct wiimote_data *wdata) in wiimote_cmd_release() argument
340 mutex_unlock(&wdata->state.sync); in wiimote_cmd_release()
343 static inline int wiimote_cmd_wait(struct wiimote_data *wdata) in wiimote_cmd_wait() argument
351 ret = wait_for_completion_interruptible_timeout(&wdata->state.ready, HZ); in wiimote_cmd_wait()
356 else if (wdata->state.cmd != WIIPROTO_REQ_NULL) in wiimote_cmd_wait()
362 static inline int wiimote_cmd_wait_noint(struct wiimote_data *wdata) in wiimote_cmd_wait_noint() argument
367 ret = wait_for_completion_timeout(&wdata->state.ready, HZ); in wiimote_cmd_wait_noint()
370 else if (wdata->state.cmd != WIIPROTO_REQ_NULL) in wiimote_cmd_wait_noint()