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))
104 __u8 data[HID_MAX_BUFFER_SIZE]; member
137 /* calibration/cache data */
273 extern int wiimote_cmd_write(struct wiimote_data *wdata, __u32 offset,
275 extern ssize_t wiimote_cmd_read(struct wiimote_data *wdata, __u32 offset,
278 #define wiiproto_req_rreg(wdata, os, sz) \ argument
279 wiiproto_req_rmem((wdata), false, (os), (sz))
280 #define wiiproto_req_reeprom(wdata, os, sz) \ argument
281 wiiproto_req_rmem((wdata), true, (os), (sz))
283 __u32 offset, __u16 size);
301 return wdata->state.cmd == cmd && wdata->state.opt == opt; in wiimote_cmd_pending()
307 wdata->state.cmd = WIIPROTO_REQ_NULL; in wiimote_cmd_complete()
308 complete(&wdata->state.ready); in wiimote_cmd_complete()
317 wdata->state.cmd = WIIPROTO_REQ_MAX; in wiimote_cmd_abort()
318 complete(&wdata->state.ready); in wiimote_cmd_abort()
323 return mutex_lock_interruptible(&wdata->state.sync) ? -ERESTARTSYS : 0; in wiimote_cmd_acquire()
328 mutex_lock(&wdata->state.sync); in wiimote_cmd_acquire_noint()
335 reinit_completion(&wdata->state.ready); in wiimote_cmd_set()
336 wdata->state.cmd = cmd; in wiimote_cmd_set()
337 wdata->state.opt = opt; in wiimote_cmd_set()
342 mutex_unlock(&wdata->state.sync); in wiimote_cmd_release()
353 ret = wait_for_completion_interruptible_timeout(&wdata->state.ready, HZ); in wiimote_cmd_wait()
355 return -ERESTARTSYS; in wiimote_cmd_wait()
357 return -EIO; in wiimote_cmd_wait()
358 else if (wdata->state.cmd != WIIPROTO_REQ_NULL) in wiimote_cmd_wait()
359 return -EIO; in wiimote_cmd_wait()
369 ret = wait_for_completion_timeout(&wdata->state.ready, HZ); in wiimote_cmd_wait_noint()
371 return -EIO; in wiimote_cmd_wait_noint()
372 else if (wdata->state.cmd != WIIPROTO_REQ_NULL) in wiimote_cmd_wait_noint()
373 return -EIO; in wiimote_cmd_wait_noint()