• Home
  • Raw
  • Download

Lines Matching +full:os +full:- +full:data +full:- +full:offset

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
7 * Copyright (c) 2011-2013 David Herrmann <dh.herrmann@gmail.com>
54 #define WIIPROTO_FLAG_LED(num) (WIIPROTO_FLAG_LED1 << (num - 1))
103 __u8 data[HID_MAX_BUFFER_SIZE]; member
136 /* calibration/cache data */
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) \ argument
278 wiiproto_req_rmem((wdata), false, (os), (sz))
279 #define wiiproto_req_reeprom(wdata, os, sz) \ argument
280 wiiproto_req_rmem((wdata), true, (os), (sz))
282 __u32 offset, __u16 size);
300 return wdata->state.cmd == cmd && wdata->state.opt == opt; in wiimote_cmd_pending()
306 wdata->state.cmd = WIIPROTO_REQ_NULL; in wiimote_cmd_complete()
307 complete(&wdata->state.ready); in wiimote_cmd_complete()
316 wdata->state.cmd = WIIPROTO_REQ_MAX; in wiimote_cmd_abort()
317 complete(&wdata->state.ready); in wiimote_cmd_abort()
322 return mutex_lock_interruptible(&wdata->state.sync) ? -ERESTARTSYS : 0; in wiimote_cmd_acquire()
327 mutex_lock(&wdata->state.sync); in wiimote_cmd_acquire_noint()
334 reinit_completion(&wdata->state.ready); in wiimote_cmd_set()
335 wdata->state.cmd = cmd; in wiimote_cmd_set()
336 wdata->state.opt = opt; in wiimote_cmd_set()
341 mutex_unlock(&wdata->state.sync); in wiimote_cmd_release()
352 ret = wait_for_completion_interruptible_timeout(&wdata->state.ready, HZ); in wiimote_cmd_wait()
354 return -ERESTARTSYS; in wiimote_cmd_wait()
356 return -EIO; in wiimote_cmd_wait()
357 else if (wdata->state.cmd != WIIPROTO_REQ_NULL) in wiimote_cmd_wait()
358 return -EIO; in wiimote_cmd_wait()
368 ret = wait_for_completion_timeout(&wdata->state.ready, HZ); in wiimote_cmd_wait_noint()
370 return -EIO; in wiimote_cmd_wait_noint()
371 else if (wdata->state.cmd != WIIPROTO_REQ_NULL) in wiimote_cmd_wait_noint()
372 return -EIO; in wiimote_cmd_wait_noint()