wdata 102 arch/m68k/include/asm/mac_iop.h __u8 wdata; /* write a data byte */ wdata 155 drivers/acpi/ec.c const u8 *wdata; wdata 662 drivers/acpi/ec.c acpi_ec_write_data(ec, t->wdata[t->wi++]); wdata 825 drivers/acpi/ec.c if (!ec || (!t) || (t->wlen && !t->wdata) || (t->rlen && !t->rdata)) wdata 852 drivers/acpi/ec.c .wdata = NULL, .rdata = &d, wdata 861 drivers/acpi/ec.c .wdata = NULL, .rdata = NULL, wdata 873 drivers/acpi/ec.c .wdata = &address, .rdata = &d, wdata 883 drivers/acpi/ec.c u8 wdata[2] = { address, data }; wdata 885 drivers/acpi/ec.c .wdata = wdata, .rdata = NULL, wdata 923 drivers/acpi/ec.c const u8 *wdata, unsigned wdata_len, wdata 927 drivers/acpi/ec.c .wdata = wdata, .rdata = rdata, wdata 85 drivers/hid/hid-lg4ff.c struct lg4ff_wheel_data wdata; wdata 311 drivers/hid/hid-lg4ff.c switch (entry->wdata.product_id) { wdata 315 drivers/hid/hid-lg4ff.c new_value = lg4ff_adjust_dfp_x_axis(value, entry->wdata.range); wdata 336 drivers/hid/hid-lg4ff.c if (entry->wdata.combine) { wdata 337 drivers/hid/hid-lg4ff.c switch (entry->wdata.product_id) { wdata 377 drivers/hid/hid-lg4ff.c static void lg4ff_init_wheel_data(struct lg4ff_wheel_data * const wdata, const struct lg4ff_wheel *wheel, wdata 402 drivers/hid/hid-lg4ff.c memcpy(wdata, &t_wdata, sizeof(t_wdata)); wdata 515 drivers/hid/hid-lg4ff.c switch (entry->wdata.product_id) { wdata 818 drivers/hid/hid-lg4ff.c if (!entry->wdata.real_name) { wdata 824 drivers/hid/hid-lg4ff.c if (entry->wdata.alternate_modes & BIT(i)) { wdata 828 drivers/hid/hid-lg4ff.c !lg4ff_alternate_modes[i].product_id ? entry->wdata.real_name : lg4ff_alternate_modes[i].name); wdata 833 drivers/hid/hid-lg4ff.c if (lg4ff_alternate_modes[i].product_id == entry->wdata.product_id || wdata 834 drivers/hid/hid-lg4ff.c (lg4ff_alternate_modes[i].product_id == 0 && entry->wdata.product_id == entry->wdata.real_product_id)) wdata 887 drivers/hid/hid-lg4ff.c if (entry->wdata.alternate_modes & BIT(i)) { wdata 890 drivers/hid/hid-lg4ff.c target_product_id = entry->wdata.real_product_id; wdata 905 drivers/hid/hid-lg4ff.c if (target_product_id == entry->wdata.product_id) /* Nothing to do */ wdata 911 drivers/hid/hid-lg4ff.c entry->wdata.real_name); wdata 916 drivers/hid/hid-lg4ff.c if ((entry->wdata.real_product_id == USB_DEVICE_ID_LOGITECH_DFP_WHEEL || entry->wdata.real_product_id == USB_DEVICE_ID_LOGITECH_G25_WHEEL) && wdata 917 drivers/hid/hid-lg4ff.c entry->wdata.product_id > target_product_id) { wdata 918 drivers/hid/hid-lg4ff.c hid_info(hid, "\"%s\" cannot be switched back into \"%s\" mode\n", entry->wdata.real_name, lg4ff_alternate_modes[i].name); wdata 922 drivers/hid/hid-lg4ff.c s = lg4ff_get_mode_switch_command(entry->wdata.real_product_id, target_product_id); wdata 953 drivers/hid/hid-lg4ff.c count = scnprintf(buf, PAGE_SIZE, "%u\n", entry->wdata.combine); wdata 980 drivers/hid/hid-lg4ff.c entry->wdata.combine = combine; wdata 1006 drivers/hid/hid-lg4ff.c count = scnprintf(buf, PAGE_SIZE, "%u\n", entry->wdata.range); wdata 1033 drivers/hid/hid-lg4ff.c range = entry->wdata.max_range; wdata 1037 drivers/hid/hid-lg4ff.c if (entry->wdata.set_range && range >= entry->wdata.min_range && range <= entry->wdata.max_range) { wdata 1038 drivers/hid/hid-lg4ff.c entry->wdata.set_range(hid, range); wdata 1039 drivers/hid/hid-lg4ff.c entry->wdata.range = range; wdata 1065 drivers/hid/hid-lg4ff.c if (!entry->wdata.real_tag || !entry->wdata.real_name) { wdata 1070 drivers/hid/hid-lg4ff.c count = scnprintf(buf, PAGE_SIZE, "%s: %s\n", entry->wdata.real_tag, entry->wdata.real_name); wdata 1136 drivers/hid/hid-lg4ff.c if (led_cdev != entry->wdata.led[i]) wdata 1138 drivers/hid/hid-lg4ff.c state = (entry->wdata.led_state >> i) & 1; wdata 1140 drivers/hid/hid-lg4ff.c entry->wdata.led_state &= ~(1 << i); wdata 1141 drivers/hid/hid-lg4ff.c lg4ff_set_leds(hid, entry->wdata.led_state); wdata 1143 drivers/hid/hid-lg4ff.c entry->wdata.led_state |= 1 << i; wdata 1144 drivers/hid/hid-lg4ff.c lg4ff_set_leds(hid, entry->wdata.led_state); wdata 1171 drivers/hid/hid-lg4ff.c if (led_cdev == entry->wdata.led[i]) { wdata 1172 drivers/hid/hid-lg4ff.c value = (entry->wdata.led_state >> i) & 1; wdata 1350 drivers/hid/hid-lg4ff.c lg4ff_init_wheel_data(&entry->wdata, &lg4ff_devices[i], mmode_wheel, real_product_id); wdata 1383 drivers/hid/hid-lg4ff.c entry->wdata.range = entry->wdata.max_range; wdata 1384 drivers/hid/hid-lg4ff.c if (entry->wdata.set_range) wdata 1385 drivers/hid/hid-lg4ff.c entry->wdata.set_range(hid, entry->wdata.range); wdata 1389 drivers/hid/hid-lg4ff.c entry->wdata.led_state = 0; wdata 1391 drivers/hid/hid-lg4ff.c entry->wdata.led[j] = NULL; wdata 1418 drivers/hid/hid-lg4ff.c entry->wdata.led[j] = led; wdata 1426 drivers/hid/hid-lg4ff.c led = entry->wdata.led[j]; wdata 1427 drivers/hid/hid-lg4ff.c entry->wdata.led[j] = NULL; wdata 1463 drivers/hid/hid-lg4ff.c if (entry->wdata.alternate_modes) { wdata 1478 drivers/hid/hid-lg4ff.c led = entry->wdata.led[j]; wdata 1479 drivers/hid/hid-lg4ff.c entry->wdata.led[j] = NULL; wdata 45 drivers/hid/hid-wiimote-core.c struct wiimote_data *wdata = container_of(queue, struct wiimote_data, wdata 50 drivers/hid/hid-wiimote-core.c spin_lock_irqsave(&wdata->queue.lock, flags); wdata 52 drivers/hid/hid-wiimote-core.c while (wdata->queue.head != wdata->queue.tail) { wdata 53 drivers/hid/hid-wiimote-core.c spin_unlock_irqrestore(&wdata->queue.lock, flags); wdata 54 drivers/hid/hid-wiimote-core.c ret = wiimote_hid_send(wdata->hdev, wdata 55 drivers/hid/hid-wiimote-core.c wdata->queue.outq[wdata->queue.tail].data, wdata 56 drivers/hid/hid-wiimote-core.c wdata->queue.outq[wdata->queue.tail].size); wdata 58 drivers/hid/hid-wiimote-core.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 59 drivers/hid/hid-wiimote-core.c wiimote_cmd_abort(wdata); wdata 60 drivers/hid/hid-wiimote-core.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 62 drivers/hid/hid-wiimote-core.c spin_lock_irqsave(&wdata->queue.lock, flags); wdata 64 drivers/hid/hid-wiimote-core.c wdata->queue.tail = (wdata->queue.tail + 1) % WIIMOTE_BUFSIZE; wdata 67 drivers/hid/hid-wiimote-core.c spin_unlock_irqrestore(&wdata->queue.lock, flags); wdata 70 drivers/hid/hid-wiimote-core.c static void wiimote_queue(struct wiimote_data *wdata, const __u8 *buffer, wdata 77 drivers/hid/hid-wiimote-core.c hid_warn(wdata->hdev, "Sending too large output report\n"); wdata 79 drivers/hid/hid-wiimote-core.c spin_lock_irqsave(&wdata->queue.lock, flags); wdata 93 drivers/hid/hid-wiimote-core.c spin_lock_irqsave(&wdata->queue.lock, flags); wdata 95 drivers/hid/hid-wiimote-core.c memcpy(wdata->queue.outq[wdata->queue.head].data, buffer, count); wdata 96 drivers/hid/hid-wiimote-core.c wdata->queue.outq[wdata->queue.head].size = count; wdata 97 drivers/hid/hid-wiimote-core.c newhead = (wdata->queue.head + 1) % WIIMOTE_BUFSIZE; wdata 99 drivers/hid/hid-wiimote-core.c if (wdata->queue.head == wdata->queue.tail) { wdata 100 drivers/hid/hid-wiimote-core.c wdata->queue.head = newhead; wdata 101 drivers/hid/hid-wiimote-core.c schedule_work(&wdata->queue.worker); wdata 102 drivers/hid/hid-wiimote-core.c } else if (newhead != wdata->queue.tail) { wdata 103 drivers/hid/hid-wiimote-core.c wdata->queue.head = newhead; wdata 105 drivers/hid/hid-wiimote-core.c hid_warn(wdata->hdev, "Output queue is full"); wdata 112 drivers/hid/hid-wiimote-core.c wiimote_cmd_abort(wdata); wdata 114 drivers/hid/hid-wiimote-core.c spin_unlock_irqrestore(&wdata->queue.lock, flags); wdata 124 drivers/hid/hid-wiimote-core.c static inline void wiiproto_keep_rumble(struct wiimote_data *wdata, __u8 *cmd1) wdata 126 drivers/hid/hid-wiimote-core.c if (wdata->state.flags & WIIPROTO_FLAG_RUMBLE) wdata 130 drivers/hid/hid-wiimote-core.c void wiiproto_req_rumble(struct wiimote_data *wdata, __u8 rumble) wdata 135 drivers/hid/hid-wiimote-core.c if (rumble == !!(wdata->state.flags & WIIPROTO_FLAG_RUMBLE)) wdata 139 drivers/hid/hid-wiimote-core.c wdata->state.flags |= WIIPROTO_FLAG_RUMBLE; wdata 141 drivers/hid/hid-wiimote-core.c wdata->state.flags &= ~WIIPROTO_FLAG_RUMBLE; wdata 146 drivers/hid/hid-wiimote-core.c wiiproto_keep_rumble(wdata, &cmd[1]); wdata 147 drivers/hid/hid-wiimote-core.c wiimote_queue(wdata, cmd, sizeof(cmd)); wdata 150 drivers/hid/hid-wiimote-core.c void wiiproto_req_leds(struct wiimote_data *wdata, int leds) wdata 155 drivers/hid/hid-wiimote-core.c if ((wdata->state.flags & WIIPROTO_FLAGS_LEDS) == leds) wdata 157 drivers/hid/hid-wiimote-core.c wdata->state.flags = (wdata->state.flags & ~WIIPROTO_FLAGS_LEDS) | leds; wdata 171 drivers/hid/hid-wiimote-core.c wiiproto_keep_rumble(wdata, &cmd[1]); wdata 172 drivers/hid/hid-wiimote-core.c wiimote_queue(wdata, cmd, sizeof(cmd)); wdata 194 drivers/hid/hid-wiimote-core.c static __u8 select_drm(struct wiimote_data *wdata) wdata 196 drivers/hid/hid-wiimote-core.c __u8 ir = wdata->state.flags & WIIPROTO_FLAGS_IR; wdata 199 drivers/hid/hid-wiimote-core.c ext = (wdata->state.flags & WIIPROTO_FLAG_EXT_USED) || wdata 200 drivers/hid/hid-wiimote-core.c (wdata->state.flags & WIIPROTO_FLAG_MP_USED); wdata 203 drivers/hid/hid-wiimote-core.c if (wdata->state.devtype == WIIMOTE_DEV_BALANCE_BOARD) { wdata 211 drivers/hid/hid-wiimote-core.c if (wdata->state.flags & WIIPROTO_FLAG_ACCEL) { wdata 226 drivers/hid/hid-wiimote-core.c if (wdata->state.flags & WIIPROTO_FLAG_ACCEL) { wdata 240 drivers/hid/hid-wiimote-core.c void wiiproto_req_drm(struct wiimote_data *wdata, __u8 drm) wdata 244 drivers/hid/hid-wiimote-core.c if (wdata->state.flags & WIIPROTO_FLAG_DRM_LOCKED) wdata 245 drivers/hid/hid-wiimote-core.c drm = wdata->state.drm; wdata 247 drivers/hid/hid-wiimote-core.c drm = select_drm(wdata); wdata 253 drivers/hid/hid-wiimote-core.c wdata->state.drm = drm; wdata 254 drivers/hid/hid-wiimote-core.c wiiproto_keep_rumble(wdata, &cmd[1]); wdata 255 drivers/hid/hid-wiimote-core.c wiimote_queue(wdata, cmd, sizeof(cmd)); wdata 258 drivers/hid/hid-wiimote-core.c void wiiproto_req_status(struct wiimote_data *wdata) wdata 265 drivers/hid/hid-wiimote-core.c wiiproto_keep_rumble(wdata, &cmd[1]); wdata 266 drivers/hid/hid-wiimote-core.c wiimote_queue(wdata, cmd, sizeof(cmd)); wdata 269 drivers/hid/hid-wiimote-core.c void wiiproto_req_accel(struct wiimote_data *wdata, __u8 accel) wdata 272 drivers/hid/hid-wiimote-core.c if (accel == !!(wdata->state.flags & WIIPROTO_FLAG_ACCEL)) wdata 276 drivers/hid/hid-wiimote-core.c wdata->state.flags |= WIIPROTO_FLAG_ACCEL; wdata 278 drivers/hid/hid-wiimote-core.c wdata->state.flags &= ~WIIPROTO_FLAG_ACCEL; wdata 280 drivers/hid/hid-wiimote-core.c wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); wdata 283 drivers/hid/hid-wiimote-core.c void wiiproto_req_ir1(struct wiimote_data *wdata, __u8 flags) wdata 290 drivers/hid/hid-wiimote-core.c wiiproto_keep_rumble(wdata, &cmd[1]); wdata 291 drivers/hid/hid-wiimote-core.c wiimote_queue(wdata, cmd, sizeof(cmd)); wdata 294 drivers/hid/hid-wiimote-core.c void wiiproto_req_ir2(struct wiimote_data *wdata, __u8 flags) wdata 301 drivers/hid/hid-wiimote-core.c wiiproto_keep_rumble(wdata, &cmd[1]); wdata 302 drivers/hid/hid-wiimote-core.c wiimote_queue(wdata, cmd, sizeof(cmd)); wdata 305 drivers/hid/hid-wiimote-core.c #define wiiproto_req_wreg(wdata, os, buf, sz) \ wdata 306 drivers/hid/hid-wiimote-core.c wiiproto_req_wmem((wdata), false, (os), (buf), (sz)) wdata 308 drivers/hid/hid-wiimote-core.c #define wiiproto_req_weeprom(wdata, os, buf, sz) \ wdata 309 drivers/hid/hid-wiimote-core.c wiiproto_req_wmem((wdata), true, (os), (buf), (sz)) wdata 311 drivers/hid/hid-wiimote-core.c static void wiiproto_req_wmem(struct wiimote_data *wdata, bool eeprom, wdata 317 drivers/hid/hid-wiimote-core.c hid_warn(wdata->hdev, "Invalid length %d wmem request\n", size); wdata 332 drivers/hid/hid-wiimote-core.c wiiproto_keep_rumble(wdata, &cmd[1]); wdata 333 drivers/hid/hid-wiimote-core.c wiimote_queue(wdata, cmd, sizeof(cmd)); wdata 336 drivers/hid/hid-wiimote-core.c void wiiproto_req_rmem(struct wiimote_data *wdata, bool eeprom, __u32 offset, wdata 342 drivers/hid/hid-wiimote-core.c hid_warn(wdata->hdev, "Invalid length %d rmem request\n", size); wdata 357 drivers/hid/hid-wiimote-core.c wiiproto_keep_rumble(wdata, &cmd[1]); wdata 358 drivers/hid/hid-wiimote-core.c wiimote_queue(wdata, cmd, sizeof(cmd)); wdata 362 drivers/hid/hid-wiimote-core.c int wiimote_cmd_write(struct wiimote_data *wdata, __u32 offset, wdata 368 drivers/hid/hid-wiimote-core.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 369 drivers/hid/hid-wiimote-core.c wiimote_cmd_set(wdata, WIIPROTO_REQ_WMEM, 0); wdata 370 drivers/hid/hid-wiimote-core.c wiiproto_req_wreg(wdata, offset, wmem, size); wdata 371 drivers/hid/hid-wiimote-core.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 373 drivers/hid/hid-wiimote-core.c ret = wiimote_cmd_wait(wdata); wdata 374 drivers/hid/hid-wiimote-core.c if (!ret && wdata->state.cmd_err) wdata 381 drivers/hid/hid-wiimote-core.c ssize_t wiimote_cmd_read(struct wiimote_data *wdata, __u32 offset, __u8 *rmem, wdata 387 drivers/hid/hid-wiimote-core.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 388 drivers/hid/hid-wiimote-core.c wdata->state.cmd_read_size = size; wdata 389 drivers/hid/hid-wiimote-core.c wdata->state.cmd_read_buf = rmem; wdata 390 drivers/hid/hid-wiimote-core.c wiimote_cmd_set(wdata, WIIPROTO_REQ_RMEM, offset & 0xffff); wdata 391 drivers/hid/hid-wiimote-core.c wiiproto_req_rreg(wdata, offset, size); wdata 392 drivers/hid/hid-wiimote-core.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 394 drivers/hid/hid-wiimote-core.c ret = wiimote_cmd_wait(wdata); wdata 396 drivers/hid/hid-wiimote-core.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 397 drivers/hid/hid-wiimote-core.c wdata->state.cmd_read_buf = NULL; wdata 398 drivers/hid/hid-wiimote-core.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 401 drivers/hid/hid-wiimote-core.c if (wdata->state.cmd_read_size == 0) wdata 404 drivers/hid/hid-wiimote-core.c ret = wdata->state.cmd_read_size; wdata 411 drivers/hid/hid-wiimote-core.c static int wiimote_cmd_init_ext(struct wiimote_data *wdata) wdata 418 drivers/hid/hid-wiimote-core.c ret = wiimote_cmd_write(wdata, 0xa400f0, &wmem, sizeof(wmem)); wdata 424 drivers/hid/hid-wiimote-core.c ret = wiimote_cmd_write(wdata, 0xa400fb, &wmem, sizeof(wmem)); wdata 432 drivers/hid/hid-wiimote-core.c static __u8 wiimote_cmd_read_ext(struct wiimote_data *wdata, __u8 *rmem) wdata 437 drivers/hid/hid-wiimote-core.c ret = wiimote_cmd_read(wdata, 0xa400fa, rmem, 6); wdata 441 drivers/hid/hid-wiimote-core.c hid_dbg(wdata->hdev, "extension ID: %6phC\n", rmem); wdata 466 drivers/hid/hid-wiimote-core.c static int wiimote_cmd_init_mp(struct wiimote_data *wdata) wdata 473 drivers/hid/hid-wiimote-core.c ret = wiimote_cmd_write(wdata, 0xa600f0, &wmem, sizeof(wmem)); wdata 479 drivers/hid/hid-wiimote-core.c ret = wiimote_cmd_write(wdata, 0xa600fb, &wmem, sizeof(wmem)); wdata 487 drivers/hid/hid-wiimote-core.c static bool wiimote_cmd_map_mp(struct wiimote_data *wdata, __u8 exttype) wdata 506 drivers/hid/hid-wiimote-core.c return wiimote_cmd_write(wdata, 0xa600fe, &wmem, sizeof(wmem)); wdata 510 drivers/hid/hid-wiimote-core.c static bool wiimote_cmd_read_mp(struct wiimote_data *wdata, __u8 *rmem) wdata 515 drivers/hid/hid-wiimote-core.c ret = wiimote_cmd_read(wdata, 0xa600fa, rmem, 6); wdata 519 drivers/hid/hid-wiimote-core.c hid_dbg(wdata->hdev, "motion plus ID: %6phC\n", rmem); wdata 524 drivers/hid/hid-wiimote-core.c hid_info(wdata->hdev, "unknown motion plus ID: %6phC\n", rmem); wdata 530 drivers/hid/hid-wiimote-core.c static __u8 wiimote_cmd_read_mp_mapped(struct wiimote_data *wdata) wdata 536 drivers/hid/hid-wiimote-core.c ret = wiimote_cmd_read(wdata, 0xa400fa, rmem, 6); wdata 540 drivers/hid/hid-wiimote-core.c hid_dbg(wdata->hdev, "mapped motion plus ID: %6phC\n", rmem); wdata 620 drivers/hid/hid-wiimote-core.c static void wiimote_modules_load(struct wiimote_data *wdata, wdata 638 drivers/hid/hid-wiimote-core.c wdata->input = input_allocate_device(); wdata 639 drivers/hid/hid-wiimote-core.c if (!wdata->input) wdata 642 drivers/hid/hid-wiimote-core.c input_set_drvdata(wdata->input, wdata); wdata 643 drivers/hid/hid-wiimote-core.c wdata->input->dev.parent = &wdata->hdev->dev; wdata 644 drivers/hid/hid-wiimote-core.c wdata->input->id.bustype = wdata->hdev->bus; wdata 645 drivers/hid/hid-wiimote-core.c wdata->input->id.vendor = wdata->hdev->vendor; wdata 646 drivers/hid/hid-wiimote-core.c wdata->input->id.product = wdata->hdev->product; wdata 647 drivers/hid/hid-wiimote-core.c wdata->input->id.version = wdata->hdev->version; wdata 648 drivers/hid/hid-wiimote-core.c wdata->input->name = WIIMOTE_NAME; wdata 656 drivers/hid/hid-wiimote-core.c ret = ops->probe(ops, wdata); wdata 661 drivers/hid/hid-wiimote-core.c if (wdata->input) { wdata 662 drivers/hid/hid-wiimote-core.c ret = input_register_device(wdata->input); wdata 667 drivers/hid/hid-wiimote-core.c spin_lock_irq(&wdata->state.lock); wdata 668 drivers/hid/hid-wiimote-core.c wdata->state.devtype = devtype; wdata 669 drivers/hid/hid-wiimote-core.c spin_unlock_irq(&wdata->state.lock); wdata 676 drivers/hid/hid-wiimote-core.c ops->remove(ops, wdata); wdata 679 drivers/hid/hid-wiimote-core.c if (wdata->input) { wdata 680 drivers/hid/hid-wiimote-core.c input_free_device(wdata->input); wdata 681 drivers/hid/hid-wiimote-core.c wdata->input = NULL; wdata 685 drivers/hid/hid-wiimote-core.c static void wiimote_modules_unload(struct wiimote_data *wdata) wdata 691 drivers/hid/hid-wiimote-core.c mods = wiimote_devtype_mods[wdata->state.devtype]; wdata 693 drivers/hid/hid-wiimote-core.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 694 drivers/hid/hid-wiimote-core.c wdata->state.devtype = WIIMOTE_DEV_UNKNOWN; wdata 695 drivers/hid/hid-wiimote-core.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 701 drivers/hid/hid-wiimote-core.c if (wdata->input) { wdata 702 drivers/hid/hid-wiimote-core.c input_get_device(wdata->input); wdata 703 drivers/hid/hid-wiimote-core.c input_unregister_device(wdata->input); wdata 709 drivers/hid/hid-wiimote-core.c ops->remove(ops, wdata); wdata 712 drivers/hid/hid-wiimote-core.c if (wdata->input) { wdata 713 drivers/hid/hid-wiimote-core.c input_put_device(wdata->input); wdata 714 drivers/hid/hid-wiimote-core.c wdata->input = NULL; wdata 720 drivers/hid/hid-wiimote-core.c static void wiimote_ext_load(struct wiimote_data *wdata, unsigned int ext) wdata 729 drivers/hid/hid-wiimote-core.c ret = ops->probe(ops, wdata); wdata 734 drivers/hid/hid-wiimote-core.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 735 drivers/hid/hid-wiimote-core.c wdata->state.exttype = ext; wdata 736 drivers/hid/hid-wiimote-core.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 739 drivers/hid/hid-wiimote-core.c static void wiimote_ext_unload(struct wiimote_data *wdata) wdata 744 drivers/hid/hid-wiimote-core.c ops = wiimod_ext_table[wdata->state.exttype]; wdata 746 drivers/hid/hid-wiimote-core.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 747 drivers/hid/hid-wiimote-core.c wdata->state.exttype = WIIMOTE_EXT_UNKNOWN; wdata 748 drivers/hid/hid-wiimote-core.c wdata->state.flags &= ~WIIPROTO_FLAG_EXT_USED; wdata 749 drivers/hid/hid-wiimote-core.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 752 drivers/hid/hid-wiimote-core.c ops->remove(ops, wdata); wdata 755 drivers/hid/hid-wiimote-core.c static void wiimote_mp_load(struct wiimote_data *wdata) wdata 764 drivers/hid/hid-wiimote-core.c ret = ops->probe(ops, wdata); wdata 769 drivers/hid/hid-wiimote-core.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 770 drivers/hid/hid-wiimote-core.c wdata->state.mp = mode; wdata 771 drivers/hid/hid-wiimote-core.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 774 drivers/hid/hid-wiimote-core.c static void wiimote_mp_unload(struct wiimote_data *wdata) wdata 779 drivers/hid/hid-wiimote-core.c if (wdata->state.mp < 2) wdata 784 drivers/hid/hid-wiimote-core.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 785 drivers/hid/hid-wiimote-core.c wdata->state.mp = 0; wdata 786 drivers/hid/hid-wiimote-core.c wdata->state.flags &= ~WIIPROTO_FLAG_MP_USED; wdata 787 drivers/hid/hid-wiimote-core.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 790 drivers/hid/hid-wiimote-core.c ops->remove(ops, wdata); wdata 809 drivers/hid/hid-wiimote-core.c static void wiimote_init_set_type(struct wiimote_data *wdata, wdata 816 drivers/hid/hid-wiimote-core.c vendor = wdata->hdev->vendor; wdata 817 drivers/hid/hid-wiimote-core.c product = wdata->hdev->product; wdata 818 drivers/hid/hid-wiimote-core.c name = wdata->hdev->name; wdata 854 drivers/hid/hid-wiimote-core.c hid_info(wdata->hdev, "cannot detect device; NAME: %s VID: %04x PID: %04x EXT: %04x\n", wdata 857 drivers/hid/hid-wiimote-core.c hid_info(wdata->hdev, "detected device: %s\n", wdata 860 drivers/hid/hid-wiimote-core.c wiimote_modules_load(wdata, devtype); wdata 863 drivers/hid/hid-wiimote-core.c static void wiimote_init_detect(struct wiimote_data *wdata) wdata 869 drivers/hid/hid-wiimote-core.c wiimote_cmd_acquire_noint(wdata); wdata 871 drivers/hid/hid-wiimote-core.c spin_lock_irq(&wdata->state.lock); wdata 872 drivers/hid/hid-wiimote-core.c wdata->state.devtype = WIIMOTE_DEV_UNKNOWN; wdata 873 drivers/hid/hid-wiimote-core.c wiimote_cmd_set(wdata, WIIPROTO_REQ_SREQ, 0); wdata 874 drivers/hid/hid-wiimote-core.c wiiproto_req_status(wdata); wdata 875 drivers/hid/hid-wiimote-core.c spin_unlock_irq(&wdata->state.lock); wdata 877 drivers/hid/hid-wiimote-core.c ret = wiimote_cmd_wait_noint(wdata); wdata 881 drivers/hid/hid-wiimote-core.c spin_lock_irq(&wdata->state.lock); wdata 882 drivers/hid/hid-wiimote-core.c ext = wdata->state.flags & WIIPROTO_FLAG_EXT_PLUGGED; wdata 883 drivers/hid/hid-wiimote-core.c spin_unlock_irq(&wdata->state.lock); wdata 888 drivers/hid/hid-wiimote-core.c wiimote_cmd_init_ext(wdata); wdata 889 drivers/hid/hid-wiimote-core.c exttype = wiimote_cmd_read_ext(wdata, extdata); wdata 892 drivers/hid/hid-wiimote-core.c wiimote_cmd_release(wdata); wdata 893 drivers/hid/hid-wiimote-core.c wiimote_init_set_type(wdata, exttype); wdata 896 drivers/hid/hid-wiimote-core.c spin_lock_irq(&wdata->state.lock); wdata 897 drivers/hid/hid-wiimote-core.c if (!(wdata->state.flags & WIIPROTO_FLAG_BUILTIN_MP) && wdata 898 drivers/hid/hid-wiimote-core.c !(wdata->state.flags & WIIPROTO_FLAG_NO_MP)) wdata 899 drivers/hid/hid-wiimote-core.c mod_timer(&wdata->timer, jiffies + HZ * 4); wdata 900 drivers/hid/hid-wiimote-core.c spin_unlock_irq(&wdata->state.lock); wdata 909 drivers/hid/hid-wiimote-core.c static void wiimote_init_poll_mp(struct wiimote_data *wdata) wdata 914 drivers/hid/hid-wiimote-core.c wiimote_cmd_acquire_noint(wdata); wdata 915 drivers/hid/hid-wiimote-core.c wiimote_cmd_init_mp(wdata); wdata 916 drivers/hid/hid-wiimote-core.c mp = wiimote_cmd_read_mp(wdata, mpdata); wdata 917 drivers/hid/hid-wiimote-core.c wiimote_cmd_release(wdata); wdata 921 drivers/hid/hid-wiimote-core.c if (!wdata->state.mp) { wdata 922 drivers/hid/hid-wiimote-core.c hid_info(wdata->hdev, "detected extension: Nintendo Wii Motion Plus\n"); wdata 923 drivers/hid/hid-wiimote-core.c wiimote_mp_load(wdata); wdata 925 drivers/hid/hid-wiimote-core.c } else if (wdata->state.mp) { wdata 926 drivers/hid/hid-wiimote-core.c wiimote_mp_unload(wdata); wdata 929 drivers/hid/hid-wiimote-core.c mod_timer(&wdata->timer, jiffies + HZ * 4); wdata 942 drivers/hid/hid-wiimote-core.c static bool wiimote_init_check(struct wiimote_data *wdata) wdata 948 drivers/hid/hid-wiimote-core.c spin_lock_irq(&wdata->state.lock); wdata 949 drivers/hid/hid-wiimote-core.c flags = wdata->state.flags; wdata 950 drivers/hid/hid-wiimote-core.c spin_unlock_irq(&wdata->state.lock); wdata 952 drivers/hid/hid-wiimote-core.c wiimote_cmd_acquire_noint(wdata); wdata 961 drivers/hid/hid-wiimote-core.c if (wdata->state.exttype == WIIMOTE_EXT_NONE && wdata 962 drivers/hid/hid-wiimote-core.c wdata->state.mp > 0 && (flags & WIIPROTO_FLAG_MP_USED)) { wdata 963 drivers/hid/hid-wiimote-core.c type = wiimote_cmd_read_mp_mapped(wdata); wdata 966 drivers/hid/hid-wiimote-core.c spin_lock_irq(&wdata->state.lock); wdata 967 drivers/hid/hid-wiimote-core.c ret = ret && !(wdata->state.flags & WIIPROTO_FLAG_EXT_ACTIVE); wdata 968 drivers/hid/hid-wiimote-core.c ret = ret && !(wdata->state.flags & WIIPROTO_FLAG_MP_PLUGGED); wdata 969 drivers/hid/hid-wiimote-core.c ret = ret && (wdata->state.flags & WIIPROTO_FLAG_MP_ACTIVE); wdata 970 drivers/hid/hid-wiimote-core.c spin_unlock_irq(&wdata->state.lock); wdata 973 drivers/hid/hid-wiimote-core.c hid_dbg(wdata->hdev, "state left: !EXT && MP\n"); wdata 987 drivers/hid/hid-wiimote-core.c wdata->state.exttype != WIIMOTE_EXT_NONE) { wdata 988 drivers/hid/hid-wiimote-core.c type = wiimote_cmd_read_ext(wdata, data); wdata 989 drivers/hid/hid-wiimote-core.c ret = type == wdata->state.exttype; wdata 991 drivers/hid/hid-wiimote-core.c spin_lock_irq(&wdata->state.lock); wdata 992 drivers/hid/hid-wiimote-core.c ret = ret && !(wdata->state.flags & WIIPROTO_FLAG_MP_ACTIVE); wdata 993 drivers/hid/hid-wiimote-core.c ret = ret && (wdata->state.flags & WIIPROTO_FLAG_EXT_ACTIVE); wdata 994 drivers/hid/hid-wiimote-core.c spin_unlock_irq(&wdata->state.lock); wdata 997 drivers/hid/hid-wiimote-core.c hid_dbg(wdata->hdev, "state left: EXT && !MP\n"); wdata 1013 drivers/hid/hid-wiimote-core.c wdata->state.exttype == WIIMOTE_EXT_NONE) { wdata 1014 drivers/hid/hid-wiimote-core.c type = wiimote_cmd_read_ext(wdata, data); wdata 1015 drivers/hid/hid-wiimote-core.c ret = type == wdata->state.exttype; wdata 1017 drivers/hid/hid-wiimote-core.c spin_lock_irq(&wdata->state.lock); wdata 1018 drivers/hid/hid-wiimote-core.c ret = ret && !(wdata->state.flags & WIIPROTO_FLAG_EXT_ACTIVE); wdata 1019 drivers/hid/hid-wiimote-core.c ret = ret && !(wdata->state.flags & WIIPROTO_FLAG_MP_ACTIVE); wdata 1020 drivers/hid/hid-wiimote-core.c ret = ret && !(wdata->state.flags & WIIPROTO_FLAG_EXT_PLUGGED); wdata 1021 drivers/hid/hid-wiimote-core.c spin_unlock_irq(&wdata->state.lock); wdata 1024 drivers/hid/hid-wiimote-core.c hid_dbg(wdata->hdev, "state left: !EXT && !MP\n"); wdata 1040 drivers/hid/hid-wiimote-core.c if (wdata->state.exttype != WIIMOTE_EXT_NONE && wdata 1041 drivers/hid/hid-wiimote-core.c wdata->state.mp > 0 && (flags & WIIPROTO_FLAG_MP_USED)) { wdata 1042 drivers/hid/hid-wiimote-core.c type = wiimote_cmd_read_mp_mapped(wdata); wdata 1047 drivers/hid/hid-wiimote-core.c spin_lock_irq(&wdata->state.lock); wdata 1048 drivers/hid/hid-wiimote-core.c ret = ret && (wdata->state.flags & WIIPROTO_FLAG_EXT_PLUGGED); wdata 1049 drivers/hid/hid-wiimote-core.c ret = ret && (wdata->state.flags & WIIPROTO_FLAG_EXT_ACTIVE); wdata 1050 drivers/hid/hid-wiimote-core.c ret = ret && (wdata->state.flags & WIIPROTO_FLAG_MP_ACTIVE); wdata 1051 drivers/hid/hid-wiimote-core.c spin_unlock_irq(&wdata->state.lock); wdata 1054 drivers/hid/hid-wiimote-core.c hid_dbg(wdata->hdev, "state left: EXT && MP\n"); wdata 1066 drivers/hid/hid-wiimote-core.c wiimote_cmd_release(wdata); wdata 1071 drivers/hid/hid-wiimote-core.c wiimote_init_poll_mp(wdata); wdata 1095 drivers/hid/hid-wiimote-core.c static void wiimote_init_hotplug(struct wiimote_data *wdata) wdata 1101 drivers/hid/hid-wiimote-core.c hid_dbg(wdata->hdev, "detect extensions..\n"); wdata 1103 drivers/hid/hid-wiimote-core.c wiimote_cmd_acquire_noint(wdata); wdata 1105 drivers/hid/hid-wiimote-core.c spin_lock_irq(&wdata->state.lock); wdata 1108 drivers/hid/hid-wiimote-core.c flags = wdata->state.flags; wdata 1111 drivers/hid/hid-wiimote-core.c wdata->state.flags &= ~WIIPROTO_FLAG_EXT_ACTIVE; wdata 1112 drivers/hid/hid-wiimote-core.c wdata->state.flags &= ~WIIPROTO_FLAG_MP_ACTIVE; wdata 1114 drivers/hid/hid-wiimote-core.c spin_unlock_irq(&wdata->state.lock); wdata 1117 drivers/hid/hid-wiimote-core.c wiimote_cmd_init_ext(wdata); wdata 1121 drivers/hid/hid-wiimote-core.c wiimote_cmd_init_mp(wdata); wdata 1122 drivers/hid/hid-wiimote-core.c mp = wiimote_cmd_read_mp(wdata, mpdata); wdata 1124 drivers/hid/hid-wiimote-core.c exttype = wiimote_cmd_read_ext(wdata, extdata); wdata 1126 drivers/hid/hid-wiimote-core.c wiimote_cmd_release(wdata); wdata 1129 drivers/hid/hid-wiimote-core.c if (exttype != wdata->state.exttype) { wdata 1131 drivers/hid/hid-wiimote-core.c wiimote_ext_unload(wdata); wdata 1134 drivers/hid/hid-wiimote-core.c hid_info(wdata->hdev, "cannot detect extension; %6phC\n", wdata 1137 drivers/hid/hid-wiimote-core.c spin_lock_irq(&wdata->state.lock); wdata 1138 drivers/hid/hid-wiimote-core.c wdata->state.exttype = WIIMOTE_EXT_NONE; wdata 1139 drivers/hid/hid-wiimote-core.c spin_unlock_irq(&wdata->state.lock); wdata 1141 drivers/hid/hid-wiimote-core.c hid_info(wdata->hdev, "detected extension: %s\n", wdata 1144 drivers/hid/hid-wiimote-core.c wiimote_ext_load(wdata, exttype); wdata 1150 drivers/hid/hid-wiimote-core.c if (!wdata->state.mp) { wdata 1151 drivers/hid/hid-wiimote-core.c hid_info(wdata->hdev, "detected extension: Nintendo Wii Motion Plus\n"); wdata 1152 drivers/hid/hid-wiimote-core.c wiimote_mp_load(wdata); wdata 1154 drivers/hid/hid-wiimote-core.c } else if (wdata->state.mp) { wdata 1155 drivers/hid/hid-wiimote-core.c wiimote_mp_unload(wdata); wdata 1164 drivers/hid/hid-wiimote-core.c wiimote_cmd_acquire_noint(wdata); wdata 1165 drivers/hid/hid-wiimote-core.c wiimote_cmd_map_mp(wdata, exttype); wdata 1166 drivers/hid/hid-wiimote-core.c wiimote_cmd_release(wdata); wdata 1169 drivers/hid/hid-wiimote-core.c del_timer_sync(&wdata->timer); wdata 1174 drivers/hid/hid-wiimote-core.c mod_timer(&wdata->timer, jiffies + HZ * 4); wdata 1177 drivers/hid/hid-wiimote-core.c spin_lock_irq(&wdata->state.lock); wdata 1181 drivers/hid/hid-wiimote-core.c wdata->state.flags |= WIIPROTO_FLAG_MP_ACTIVE; wdata 1182 drivers/hid/hid-wiimote-core.c if (wdata->state.exttype == WIIMOTE_EXT_NONE) { wdata 1183 drivers/hid/hid-wiimote-core.c wdata->state.flags &= ~WIIPROTO_FLAG_EXT_PLUGGED; wdata 1184 drivers/hid/hid-wiimote-core.c wdata->state.flags &= ~WIIPROTO_FLAG_MP_PLUGGED; wdata 1186 drivers/hid/hid-wiimote-core.c wdata->state.flags &= ~WIIPROTO_FLAG_EXT_PLUGGED; wdata 1187 drivers/hid/hid-wiimote-core.c wdata->state.flags |= WIIPROTO_FLAG_MP_PLUGGED; wdata 1188 drivers/hid/hid-wiimote-core.c wdata->state.flags |= WIIPROTO_FLAG_EXT_ACTIVE; wdata 1190 drivers/hid/hid-wiimote-core.c } else if (wdata->state.exttype != WIIMOTE_EXT_NONE) { wdata 1191 drivers/hid/hid-wiimote-core.c wdata->state.flags |= WIIPROTO_FLAG_EXT_ACTIVE; wdata 1195 drivers/hid/hid-wiimote-core.c wiiproto_req_status(wdata); wdata 1197 drivers/hid/hid-wiimote-core.c spin_unlock_irq(&wdata->state.lock); wdata 1199 drivers/hid/hid-wiimote-core.c hid_dbg(wdata->hdev, "detected extensions: MP: %d EXT: %d\n", wdata 1200 drivers/hid/hid-wiimote-core.c wdata->state.mp, wdata->state.exttype); wdata 1205 drivers/hid/hid-wiimote-core.c struct wiimote_data *wdata = container_of(work, struct wiimote_data, wdata 1209 drivers/hid/hid-wiimote-core.c if (wdata->state.devtype == WIIMOTE_DEV_PENDING) { wdata 1210 drivers/hid/hid-wiimote-core.c wiimote_init_detect(wdata); wdata 1214 drivers/hid/hid-wiimote-core.c if (changed || !wiimote_init_check(wdata)) wdata 1215 drivers/hid/hid-wiimote-core.c wiimote_init_hotplug(wdata); wdata 1218 drivers/hid/hid-wiimote-core.c kobject_uevent(&wdata->hdev->dev.kobj, KOBJ_CHANGE); wdata 1221 drivers/hid/hid-wiimote-core.c void __wiimote_schedule(struct wiimote_data *wdata) wdata 1223 drivers/hid/hid-wiimote-core.c if (!(wdata->state.flags & WIIPROTO_FLAG_EXITING)) wdata 1224 drivers/hid/hid-wiimote-core.c schedule_work(&wdata->init_worker); wdata 1227 drivers/hid/hid-wiimote-core.c static void wiimote_schedule(struct wiimote_data *wdata) wdata 1231 drivers/hid/hid-wiimote-core.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 1232 drivers/hid/hid-wiimote-core.c __wiimote_schedule(wdata); wdata 1233 drivers/hid/hid-wiimote-core.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 1238 drivers/hid/hid-wiimote-core.c struct wiimote_data *wdata = from_timer(wdata, t, timer); wdata 1240 drivers/hid/hid-wiimote-core.c wiimote_schedule(wdata); wdata 1245 drivers/hid/hid-wiimote-core.c static void handler_keys(struct wiimote_data *wdata, const __u8 *payload) wdata 1250 drivers/hid/hid-wiimote-core.c ops = wiimod_ext_table[wdata->state.exttype]; wdata 1252 drivers/hid/hid-wiimote-core.c ops->in_keys(wdata, payload); wdata 1256 drivers/hid/hid-wiimote-core.c mods = wiimote_devtype_mods[wdata->state.devtype]; wdata 1260 drivers/hid/hid-wiimote-core.c ops->in_keys(wdata, payload); wdata 1266 drivers/hid/hid-wiimote-core.c static void handler_accel(struct wiimote_data *wdata, const __u8 *payload) wdata 1271 drivers/hid/hid-wiimote-core.c ops = wiimod_ext_table[wdata->state.exttype]; wdata 1273 drivers/hid/hid-wiimote-core.c ops->in_accel(wdata, payload); wdata 1277 drivers/hid/hid-wiimote-core.c mods = wiimote_devtype_mods[wdata->state.devtype]; wdata 1281 drivers/hid/hid-wiimote-core.c ops->in_accel(wdata, payload); wdata 1299 drivers/hid/hid-wiimote-core.c static void handler_ext(struct wiimote_data *wdata, const __u8 *payload, wdata 1318 drivers/hid/hid-wiimote-core.c if (wdata->state.flags & WIIPROTO_FLAG_MP_ACTIVE) { wdata 1324 drivers/hid/hid-wiimote-core.c if (!(wdata->state.flags & WIIPROTO_FLAG_MP_PLUGGED)) { wdata 1325 drivers/hid/hid-wiimote-core.c hid_dbg(wdata->hdev, "MP hotplug: 1\n"); wdata 1326 drivers/hid/hid-wiimote-core.c wdata->state.flags |= WIIPROTO_FLAG_MP_PLUGGED; wdata 1327 drivers/hid/hid-wiimote-core.c __wiimote_schedule(wdata); wdata 1330 drivers/hid/hid-wiimote-core.c if (wdata->state.flags & WIIPROTO_FLAG_MP_PLUGGED) { wdata 1331 drivers/hid/hid-wiimote-core.c hid_dbg(wdata->hdev, "MP hotplug: 0\n"); wdata 1332 drivers/hid/hid-wiimote-core.c wdata->state.flags &= ~WIIPROTO_FLAG_MP_PLUGGED; wdata 1333 drivers/hid/hid-wiimote-core.c wdata->state.flags &= ~WIIPROTO_FLAG_EXT_ACTIVE; wdata 1334 drivers/hid/hid-wiimote-core.c __wiimote_schedule(wdata); wdata 1345 drivers/hid/hid-wiimote-core.c if (!(wdata->state.flags & WIIPROTO_FLAG_EXT_ACTIVE) && !is_mp) wdata 1349 drivers/hid/hid-wiimote-core.c ops = wiimod_ext_table[wdata->state.exttype]; wdata 1351 drivers/hid/hid-wiimote-core.c ops->in_mp(wdata, payload); wdata 1354 drivers/hid/hid-wiimote-core.c ops->in_ext(wdata, payload); wdata 1361 drivers/hid/hid-wiimote-core.c ops->in_mp(wdata, payload); wdata 1364 drivers/hid/hid-wiimote-core.c ops->in_ext(wdata, payload); wdata 1369 drivers/hid/hid-wiimote-core.c mods = wiimote_devtype_mods[wdata->state.devtype]; wdata 1373 drivers/hid/hid-wiimote-core.c ops->in_mp(wdata, payload); wdata 1376 drivers/hid/hid-wiimote-core.c ops->in_ext(wdata, payload); wdata 1382 drivers/hid/hid-wiimote-core.c #define ir_to_input0(wdata, ir, packed) handler_ir((wdata), (ir), (packed), 0) wdata 1383 drivers/hid/hid-wiimote-core.c #define ir_to_input1(wdata, ir, packed) handler_ir((wdata), (ir), (packed), 1) wdata 1384 drivers/hid/hid-wiimote-core.c #define ir_to_input2(wdata, ir, packed) handler_ir((wdata), (ir), (packed), 2) wdata 1385 drivers/hid/hid-wiimote-core.c #define ir_to_input3(wdata, ir, packed) handler_ir((wdata), (ir), (packed), 3) wdata 1387 drivers/hid/hid-wiimote-core.c static void handler_ir(struct wiimote_data *wdata, const __u8 *payload, wdata 1393 drivers/hid/hid-wiimote-core.c ops = wiimod_ext_table[wdata->state.exttype]; wdata 1395 drivers/hid/hid-wiimote-core.c ops->in_ir(wdata, payload, packed, id); wdata 1399 drivers/hid/hid-wiimote-core.c mods = wiimote_devtype_mods[wdata->state.devtype]; wdata 1403 drivers/hid/hid-wiimote-core.c ops->in_ir(wdata, payload, packed, id); wdata 1410 drivers/hid/hid-wiimote-core.c static void handler_status_K(struct wiimote_data *wdata, wdata 1413 drivers/hid/hid-wiimote-core.c handler_keys(wdata, payload); wdata 1416 drivers/hid/hid-wiimote-core.c wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); wdata 1420 drivers/hid/hid-wiimote-core.c static void handler_status(struct wiimote_data *wdata, const __u8 *payload) wdata 1422 drivers/hid/hid-wiimote-core.c handler_status_K(wdata, payload); wdata 1426 drivers/hid/hid-wiimote-core.c if (!(wdata->state.flags & WIIPROTO_FLAG_EXT_PLUGGED)) { wdata 1427 drivers/hid/hid-wiimote-core.c hid_dbg(wdata->hdev, "EXT hotplug: 1\n"); wdata 1428 drivers/hid/hid-wiimote-core.c wdata->state.flags |= WIIPROTO_FLAG_EXT_PLUGGED; wdata 1429 drivers/hid/hid-wiimote-core.c __wiimote_schedule(wdata); wdata 1432 drivers/hid/hid-wiimote-core.c if (wdata->state.flags & WIIPROTO_FLAG_EXT_PLUGGED) { wdata 1433 drivers/hid/hid-wiimote-core.c hid_dbg(wdata->hdev, "EXT hotplug: 0\n"); wdata 1434 drivers/hid/hid-wiimote-core.c wdata->state.flags &= ~WIIPROTO_FLAG_EXT_PLUGGED; wdata 1435 drivers/hid/hid-wiimote-core.c wdata->state.flags &= ~WIIPROTO_FLAG_MP_PLUGGED; wdata 1436 drivers/hid/hid-wiimote-core.c wdata->state.flags &= ~WIIPROTO_FLAG_EXT_ACTIVE; wdata 1437 drivers/hid/hid-wiimote-core.c wdata->state.flags &= ~WIIPROTO_FLAG_MP_ACTIVE; wdata 1438 drivers/hid/hid-wiimote-core.c __wiimote_schedule(wdata); wdata 1442 drivers/hid/hid-wiimote-core.c wdata->state.cmd_battery = payload[5]; wdata 1443 drivers/hid/hid-wiimote-core.c if (wiimote_cmd_pending(wdata, WIIPROTO_REQ_SREQ, 0)) wdata 1444 drivers/hid/hid-wiimote-core.c wiimote_cmd_complete(wdata); wdata 1448 drivers/hid/hid-wiimote-core.c static void handler_generic_K(struct wiimote_data *wdata, const __u8 *payload) wdata 1450 drivers/hid/hid-wiimote-core.c handler_keys(wdata, payload); wdata 1453 drivers/hid/hid-wiimote-core.c static void handler_data(struct wiimote_data *wdata, const __u8 *payload) wdata 1459 drivers/hid/hid-wiimote-core.c handler_keys(wdata, payload); wdata 1461 drivers/hid/hid-wiimote-core.c if (wiimote_cmd_pending(wdata, WIIPROTO_REQ_RMEM, offset)) { wdata 1464 drivers/hid/hid-wiimote-core.c else if (size > wdata->state.cmd_read_size) wdata 1465 drivers/hid/hid-wiimote-core.c size = wdata->state.cmd_read_size; wdata 1467 drivers/hid/hid-wiimote-core.c wdata->state.cmd_read_size = size; wdata 1468 drivers/hid/hid-wiimote-core.c if (wdata->state.cmd_read_buf) wdata 1469 drivers/hid/hid-wiimote-core.c memcpy(wdata->state.cmd_read_buf, &payload[5], size); wdata 1470 drivers/hid/hid-wiimote-core.c wiimote_cmd_complete(wdata); wdata 1474 drivers/hid/hid-wiimote-core.c static void handler_return(struct wiimote_data *wdata, const __u8 *payload) wdata 1479 drivers/hid/hid-wiimote-core.c handler_keys(wdata, payload); wdata 1481 drivers/hid/hid-wiimote-core.c if (wiimote_cmd_pending(wdata, cmd, 0)) { wdata 1482 drivers/hid/hid-wiimote-core.c wdata->state.cmd_err = err; wdata 1483 drivers/hid/hid-wiimote-core.c wiimote_cmd_complete(wdata); wdata 1485 drivers/hid/hid-wiimote-core.c hid_warn(wdata->hdev, "Remote error %hhu on req %hhu\n", err, wdata 1490 drivers/hid/hid-wiimote-core.c static void handler_drm_KA(struct wiimote_data *wdata, const __u8 *payload) wdata 1492 drivers/hid/hid-wiimote-core.c handler_keys(wdata, payload); wdata 1493 drivers/hid/hid-wiimote-core.c handler_accel(wdata, payload); wdata 1496 drivers/hid/hid-wiimote-core.c static void handler_drm_KE(struct wiimote_data *wdata, const __u8 *payload) wdata 1498 drivers/hid/hid-wiimote-core.c handler_keys(wdata, payload); wdata 1499 drivers/hid/hid-wiimote-core.c handler_ext(wdata, &payload[2], 8); wdata 1502 drivers/hid/hid-wiimote-core.c static void handler_drm_KAI(struct wiimote_data *wdata, const __u8 *payload) wdata 1504 drivers/hid/hid-wiimote-core.c handler_keys(wdata, payload); wdata 1505 drivers/hid/hid-wiimote-core.c handler_accel(wdata, payload); wdata 1506 drivers/hid/hid-wiimote-core.c ir_to_input0(wdata, &payload[5], false); wdata 1507 drivers/hid/hid-wiimote-core.c ir_to_input1(wdata, &payload[8], false); wdata 1508 drivers/hid/hid-wiimote-core.c ir_to_input2(wdata, &payload[11], false); wdata 1509 drivers/hid/hid-wiimote-core.c ir_to_input3(wdata, &payload[14], false); wdata 1512 drivers/hid/hid-wiimote-core.c static void handler_drm_KEE(struct wiimote_data *wdata, const __u8 *payload) wdata 1514 drivers/hid/hid-wiimote-core.c handler_keys(wdata, payload); wdata 1515 drivers/hid/hid-wiimote-core.c handler_ext(wdata, &payload[2], 19); wdata 1518 drivers/hid/hid-wiimote-core.c static void handler_drm_KIE(struct wiimote_data *wdata, const __u8 *payload) wdata 1520 drivers/hid/hid-wiimote-core.c handler_keys(wdata, payload); wdata 1521 drivers/hid/hid-wiimote-core.c ir_to_input0(wdata, &payload[2], false); wdata 1522 drivers/hid/hid-wiimote-core.c ir_to_input1(wdata, &payload[4], true); wdata 1523 drivers/hid/hid-wiimote-core.c ir_to_input2(wdata, &payload[7], false); wdata 1524 drivers/hid/hid-wiimote-core.c ir_to_input3(wdata, &payload[9], true); wdata 1525 drivers/hid/hid-wiimote-core.c handler_ext(wdata, &payload[12], 9); wdata 1528 drivers/hid/hid-wiimote-core.c static void handler_drm_KAE(struct wiimote_data *wdata, const __u8 *payload) wdata 1530 drivers/hid/hid-wiimote-core.c handler_keys(wdata, payload); wdata 1531 drivers/hid/hid-wiimote-core.c handler_accel(wdata, payload); wdata 1532 drivers/hid/hid-wiimote-core.c handler_ext(wdata, &payload[5], 16); wdata 1535 drivers/hid/hid-wiimote-core.c static void handler_drm_KAIE(struct wiimote_data *wdata, const __u8 *payload) wdata 1537 drivers/hid/hid-wiimote-core.c handler_keys(wdata, payload); wdata 1538 drivers/hid/hid-wiimote-core.c handler_accel(wdata, payload); wdata 1539 drivers/hid/hid-wiimote-core.c ir_to_input0(wdata, &payload[5], false); wdata 1540 drivers/hid/hid-wiimote-core.c ir_to_input1(wdata, &payload[7], true); wdata 1541 drivers/hid/hid-wiimote-core.c ir_to_input2(wdata, &payload[10], false); wdata 1542 drivers/hid/hid-wiimote-core.c ir_to_input3(wdata, &payload[12], true); wdata 1543 drivers/hid/hid-wiimote-core.c handler_ext(wdata, &payload[15], 6); wdata 1546 drivers/hid/hid-wiimote-core.c static void handler_drm_E(struct wiimote_data *wdata, const __u8 *payload) wdata 1548 drivers/hid/hid-wiimote-core.c handler_ext(wdata, payload, 21); wdata 1551 drivers/hid/hid-wiimote-core.c static void handler_drm_SKAI1(struct wiimote_data *wdata, const __u8 *payload) wdata 1553 drivers/hid/hid-wiimote-core.c handler_keys(wdata, payload); wdata 1555 drivers/hid/hid-wiimote-core.c wdata->state.accel_split[0] = payload[2]; wdata 1556 drivers/hid/hid-wiimote-core.c wdata->state.accel_split[1] = (payload[0] >> 1) & (0x10 | 0x20); wdata 1557 drivers/hid/hid-wiimote-core.c wdata->state.accel_split[1] |= (payload[1] << 1) & (0x40 | 0x80); wdata 1559 drivers/hid/hid-wiimote-core.c ir_to_input0(wdata, &payload[3], false); wdata 1560 drivers/hid/hid-wiimote-core.c ir_to_input1(wdata, &payload[12], false); wdata 1563 drivers/hid/hid-wiimote-core.c static void handler_drm_SKAI2(struct wiimote_data *wdata, const __u8 *payload) wdata 1567 drivers/hid/hid-wiimote-core.c handler_keys(wdata, payload); wdata 1569 drivers/hid/hid-wiimote-core.c wdata->state.accel_split[1] |= (payload[0] >> 5) & (0x01 | 0x02); wdata 1570 drivers/hid/hid-wiimote-core.c wdata->state.accel_split[1] |= (payload[1] >> 3) & (0x04 | 0x08); wdata 1574 drivers/hid/hid-wiimote-core.c buf[2] = wdata->state.accel_split[0]; wdata 1576 drivers/hid/hid-wiimote-core.c buf[4] = wdata->state.accel_split[1]; wdata 1577 drivers/hid/hid-wiimote-core.c handler_accel(wdata, buf); wdata 1579 drivers/hid/hid-wiimote-core.c ir_to_input2(wdata, &payload[3], false); wdata 1580 drivers/hid/hid-wiimote-core.c ir_to_input3(wdata, &payload[12], false); wdata 1586 drivers/hid/hid-wiimote-core.c void (*func)(struct wiimote_data *wdata, const __u8 *payload); wdata 1620 drivers/hid/hid-wiimote-core.c struct wiimote_data *wdata = hid_get_drvdata(hdev); wdata 1628 drivers/hid/hid-wiimote-core.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 1633 drivers/hid/hid-wiimote-core.c h->func(wdata, &raw_data[1]); wdata 1642 drivers/hid/hid-wiimote-core.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 1651 drivers/hid/hid-wiimote-core.c struct wiimote_data *wdata = dev_to_wii(dev); wdata 1655 drivers/hid/hid-wiimote-core.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 1656 drivers/hid/hid-wiimote-core.c type = wdata->state.exttype; wdata 1657 drivers/hid/hid-wiimote-core.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 1685 drivers/hid/hid-wiimote-core.c struct wiimote_data *wdata = dev_to_wii(dev); wdata 1688 drivers/hid/hid-wiimote-core.c wiimote_schedule(wdata); wdata 1703 drivers/hid/hid-wiimote-core.c struct wiimote_data *wdata = dev_to_wii(dev); wdata 1707 drivers/hid/hid-wiimote-core.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 1708 drivers/hid/hid-wiimote-core.c type = wdata->state.devtype; wdata 1709 drivers/hid/hid-wiimote-core.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 1735 drivers/hid/hid-wiimote-core.c struct wiimote_data *wdata; wdata 1737 drivers/hid/hid-wiimote-core.c wdata = kzalloc(sizeof(*wdata), GFP_KERNEL); wdata 1738 drivers/hid/hid-wiimote-core.c if (!wdata) wdata 1741 drivers/hid/hid-wiimote-core.c wdata->hdev = hdev; wdata 1742 drivers/hid/hid-wiimote-core.c hid_set_drvdata(hdev, wdata); wdata 1744 drivers/hid/hid-wiimote-core.c spin_lock_init(&wdata->queue.lock); wdata 1745 drivers/hid/hid-wiimote-core.c INIT_WORK(&wdata->queue.worker, wiimote_queue_worker); wdata 1747 drivers/hid/hid-wiimote-core.c spin_lock_init(&wdata->state.lock); wdata 1748 drivers/hid/hid-wiimote-core.c init_completion(&wdata->state.ready); wdata 1749 drivers/hid/hid-wiimote-core.c mutex_init(&wdata->state.sync); wdata 1750 drivers/hid/hid-wiimote-core.c wdata->state.drm = WIIPROTO_REQ_DRM_K; wdata 1751 drivers/hid/hid-wiimote-core.c wdata->state.cmd_battery = 0xff; wdata 1753 drivers/hid/hid-wiimote-core.c INIT_WORK(&wdata->init_worker, wiimote_init_worker); wdata 1754 drivers/hid/hid-wiimote-core.c timer_setup(&wdata->timer, wiimote_init_timeout, 0); wdata 1756 drivers/hid/hid-wiimote-core.c return wdata; wdata 1759 drivers/hid/hid-wiimote-core.c static void wiimote_destroy(struct wiimote_data *wdata) wdata 1763 drivers/hid/hid-wiimote-core.c wiidebug_deinit(wdata); wdata 1766 drivers/hid/hid-wiimote-core.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 1767 drivers/hid/hid-wiimote-core.c wdata->state.flags |= WIIPROTO_FLAG_EXITING; wdata 1768 drivers/hid/hid-wiimote-core.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 1770 drivers/hid/hid-wiimote-core.c cancel_work_sync(&wdata->init_worker); wdata 1771 drivers/hid/hid-wiimote-core.c del_timer_sync(&wdata->timer); wdata 1773 drivers/hid/hid-wiimote-core.c device_remove_file(&wdata->hdev->dev, &dev_attr_devtype); wdata 1774 drivers/hid/hid-wiimote-core.c device_remove_file(&wdata->hdev->dev, &dev_attr_extension); wdata 1776 drivers/hid/hid-wiimote-core.c wiimote_mp_unload(wdata); wdata 1777 drivers/hid/hid-wiimote-core.c wiimote_ext_unload(wdata); wdata 1778 drivers/hid/hid-wiimote-core.c wiimote_modules_unload(wdata); wdata 1779 drivers/hid/hid-wiimote-core.c cancel_work_sync(&wdata->queue.worker); wdata 1780 drivers/hid/hid-wiimote-core.c hid_hw_close(wdata->hdev); wdata 1781 drivers/hid/hid-wiimote-core.c hid_hw_stop(wdata->hdev); wdata 1783 drivers/hid/hid-wiimote-core.c kfree(wdata); wdata 1789 drivers/hid/hid-wiimote-core.c struct wiimote_data *wdata; wdata 1794 drivers/hid/hid-wiimote-core.c wdata = wiimote_create(hdev); wdata 1795 drivers/hid/hid-wiimote-core.c if (!wdata) { wdata 1830 drivers/hid/hid-wiimote-core.c ret = wiidebug_init(wdata); wdata 1837 drivers/hid/hid-wiimote-core.c wiimote_schedule(wdata); wdata 1842 drivers/hid/hid-wiimote-core.c wiimote_destroy(wdata); wdata 1846 drivers/hid/hid-wiimote-core.c device_remove_file(&wdata->hdev->dev, &dev_attr_extension); wdata 1852 drivers/hid/hid-wiimote-core.c input_free_device(wdata->ir); wdata 1853 drivers/hid/hid-wiimote-core.c input_free_device(wdata->accel); wdata 1854 drivers/hid/hid-wiimote-core.c kfree(wdata); wdata 1860 drivers/hid/hid-wiimote-core.c struct wiimote_data *wdata = hid_get_drvdata(hdev); wdata 1863 drivers/hid/hid-wiimote-core.c wiimote_destroy(wdata); wdata 18 drivers/hid/hid-wiimote-debug.c struct wiimote_data *wdata; wdata 27 drivers/hid/hid-wiimote-debug.c struct wiimote_data *wdata = dbg->wdata; wdata 40 drivers/hid/hid-wiimote-debug.c ret = wiimote_cmd_acquire(wdata); wdata 44 drivers/hid/hid-wiimote-debug.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 45 drivers/hid/hid-wiimote-debug.c wdata->state.cmd_read_size = s; wdata 46 drivers/hid/hid-wiimote-debug.c wdata->state.cmd_read_buf = buf; wdata 47 drivers/hid/hid-wiimote-debug.c wiimote_cmd_set(wdata, WIIPROTO_REQ_RMEM, *off & 0xffff); wdata 48 drivers/hid/hid-wiimote-debug.c wiiproto_req_reeprom(wdata, *off, s); wdata 49 drivers/hid/hid-wiimote-debug.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 51 drivers/hid/hid-wiimote-debug.c ret = wiimote_cmd_wait(wdata); wdata 53 drivers/hid/hid-wiimote-debug.c size = wdata->state.cmd_read_size; wdata 55 drivers/hid/hid-wiimote-debug.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 56 drivers/hid/hid-wiimote-debug.c wdata->state.cmd_read_buf = NULL; wdata 57 drivers/hid/hid-wiimote-debug.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 59 drivers/hid/hid-wiimote-debug.c wiimote_cmd_release(wdata); wdata 105 drivers/hid/hid-wiimote-debug.c spin_lock_irqsave(&dbg->wdata->state.lock, flags); wdata 106 drivers/hid/hid-wiimote-debug.c drm = dbg->wdata->state.drm; wdata 107 drivers/hid/hid-wiimote-debug.c spin_unlock_irqrestore(&dbg->wdata->state.lock, flags); wdata 153 drivers/hid/hid-wiimote-debug.c spin_lock_irqsave(&dbg->wdata->state.lock, flags); wdata 154 drivers/hid/hid-wiimote-debug.c dbg->wdata->state.flags &= ~WIIPROTO_FLAG_DRM_LOCKED; wdata 155 drivers/hid/hid-wiimote-debug.c wiiproto_req_drm(dbg->wdata, (__u8) i); wdata 157 drivers/hid/hid-wiimote-debug.c dbg->wdata->state.flags |= WIIPROTO_FLAG_DRM_LOCKED; wdata 158 drivers/hid/hid-wiimote-debug.c spin_unlock_irqrestore(&dbg->wdata->state.lock, flags); wdata 172 drivers/hid/hid-wiimote-debug.c int wiidebug_init(struct wiimote_data *wdata) wdata 182 drivers/hid/hid-wiimote-debug.c dbg->wdata = wdata; wdata 185 drivers/hid/hid-wiimote-debug.c dbg->wdata->hdev->debug_dir, dbg, &wiidebug_eeprom_fops); wdata 190 drivers/hid/hid-wiimote-debug.c dbg->wdata->hdev->debug_dir, dbg, &wiidebug_drm_fops); wdata 194 drivers/hid/hid-wiimote-debug.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 195 drivers/hid/hid-wiimote-debug.c wdata->debug = dbg; wdata 196 drivers/hid/hid-wiimote-debug.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 207 drivers/hid/hid-wiimote-debug.c void wiidebug_deinit(struct wiimote_data *wdata) wdata 209 drivers/hid/hid-wiimote-debug.c struct wiimote_debug *dbg = wdata->debug; wdata 215 drivers/hid/hid-wiimote-debug.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 216 drivers/hid/hid-wiimote-debug.c wdata->debug = NULL; wdata 217 drivers/hid/hid-wiimote-debug.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 62 drivers/hid/hid-wiimote-modules.c static void wiimod_keys_in_keys(struct wiimote_data *wdata, const __u8 *keys) wdata 64 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->input, wiimod_keys_map[WIIPROTO_KEY_LEFT], wdata 66 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->input, wiimod_keys_map[WIIPROTO_KEY_RIGHT], wdata 68 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->input, wiimod_keys_map[WIIPROTO_KEY_DOWN], wdata 70 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->input, wiimod_keys_map[WIIPROTO_KEY_UP], wdata 72 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->input, wiimod_keys_map[WIIPROTO_KEY_PLUS], wdata 74 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->input, wiimod_keys_map[WIIPROTO_KEY_TWO], wdata 76 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->input, wiimod_keys_map[WIIPROTO_KEY_ONE], wdata 78 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->input, wiimod_keys_map[WIIPROTO_KEY_B], wdata 80 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->input, wiimod_keys_map[WIIPROTO_KEY_A], wdata 82 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->input, wiimod_keys_map[WIIPROTO_KEY_MINUS], wdata 84 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->input, wiimod_keys_map[WIIPROTO_KEY_HOME], wdata 86 drivers/hid/hid-wiimote-modules.c input_sync(wdata->input); wdata 90 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 94 drivers/hid/hid-wiimote-modules.c set_bit(EV_KEY, wdata->input->evbit); wdata 96 drivers/hid/hid-wiimote-modules.c set_bit(wiimod_keys_map[i], wdata->input->keybit); wdata 122 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = container_of(work, struct wiimote_data, wdata 125 drivers/hid/hid-wiimote-modules.c spin_lock_irq(&wdata->state.lock); wdata 126 drivers/hid/hid-wiimote-modules.c wiiproto_req_rumble(wdata, wdata->state.cache_rumble); wdata 127 drivers/hid/hid-wiimote-modules.c spin_unlock_irq(&wdata->state.lock); wdata 133 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = input_get_drvdata(dev); wdata 149 drivers/hid/hid-wiimote-modules.c wdata->state.cache_rumble = value; wdata 150 drivers/hid/hid-wiimote-modules.c schedule_work(&wdata->rumble_worker); wdata 156 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 158 drivers/hid/hid-wiimote-modules.c INIT_WORK(&wdata->rumble_worker, wiimod_rumble_worker); wdata 160 drivers/hid/hid-wiimote-modules.c set_bit(FF_RUMBLE, wdata->input->ffbit); wdata 161 drivers/hid/hid-wiimote-modules.c if (input_ff_create_memless(wdata->input, NULL, wiimod_rumble_play)) wdata 168 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 172 drivers/hid/hid-wiimote-modules.c cancel_work_sync(&wdata->rumble_worker); wdata 174 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 175 drivers/hid/hid-wiimote-modules.c wiiproto_req_rumble(wdata, 0); wdata 176 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 203 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = power_supply_get_drvdata(psy); wdata 214 drivers/hid/hid-wiimote-modules.c ret = wiimote_cmd_acquire(wdata); wdata 218 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 219 drivers/hid/hid-wiimote-modules.c wiimote_cmd_set(wdata, WIIPROTO_REQ_SREQ, 0); wdata 220 drivers/hid/hid-wiimote-modules.c wiiproto_req_status(wdata); wdata 221 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 223 drivers/hid/hid-wiimote-modules.c wiimote_cmd_wait(wdata); wdata 224 drivers/hid/hid-wiimote-modules.c wiimote_cmd_release(wdata); wdata 226 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 227 drivers/hid/hid-wiimote-modules.c state = wdata->state.cmd_battery; wdata 228 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 235 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 237 drivers/hid/hid-wiimote-modules.c struct power_supply_config psy_cfg = { .drv_data = wdata, }; wdata 240 drivers/hid/hid-wiimote-modules.c wdata->battery_desc.properties = wiimod_battery_props; wdata 241 drivers/hid/hid-wiimote-modules.c wdata->battery_desc.num_properties = ARRAY_SIZE(wiimod_battery_props); wdata 242 drivers/hid/hid-wiimote-modules.c wdata->battery_desc.get_property = wiimod_battery_get_property; wdata 243 drivers/hid/hid-wiimote-modules.c wdata->battery_desc.type = POWER_SUPPLY_TYPE_BATTERY; wdata 244 drivers/hid/hid-wiimote-modules.c wdata->battery_desc.use_for_apm = 0; wdata 245 drivers/hid/hid-wiimote-modules.c wdata->battery_desc.name = kasprintf(GFP_KERNEL, "wiimote_battery_%s", wdata 246 drivers/hid/hid-wiimote-modules.c wdata->hdev->uniq); wdata 247 drivers/hid/hid-wiimote-modules.c if (!wdata->battery_desc.name) wdata 250 drivers/hid/hid-wiimote-modules.c wdata->battery = power_supply_register(&wdata->hdev->dev, wdata 251 drivers/hid/hid-wiimote-modules.c &wdata->battery_desc, wdata 253 drivers/hid/hid-wiimote-modules.c if (IS_ERR(wdata->battery)) { wdata 254 drivers/hid/hid-wiimote-modules.c hid_err(wdata->hdev, "cannot register battery device\n"); wdata 255 drivers/hid/hid-wiimote-modules.c ret = PTR_ERR(wdata->battery); wdata 259 drivers/hid/hid-wiimote-modules.c power_supply_powers(wdata->battery, &wdata->hdev->dev); wdata 263 drivers/hid/hid-wiimote-modules.c kfree(wdata->battery_desc.name); wdata 264 drivers/hid/hid-wiimote-modules.c wdata->battery_desc.name = NULL; wdata 269 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 271 drivers/hid/hid-wiimote-modules.c if (!wdata->battery_desc.name) wdata 274 drivers/hid/hid-wiimote-modules.c power_supply_unregister(wdata->battery); wdata 275 drivers/hid/hid-wiimote-modules.c kfree(wdata->battery_desc.name); wdata 276 drivers/hid/hid-wiimote-modules.c wdata->battery_desc.name = NULL; wdata 297 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = dev_to_wii(dev); wdata 303 drivers/hid/hid-wiimote-modules.c if (wdata->leds[i] == led_dev) { wdata 304 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 305 drivers/hid/hid-wiimote-modules.c value = wdata->state.flags & WIIPROTO_FLAG_LED(i + 1); wdata 306 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 318 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = dev_to_wii(dev); wdata 324 drivers/hid/hid-wiimote-modules.c if (wdata->leds[i] == led_dev) { wdata 326 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 327 drivers/hid/hid-wiimote-modules.c state = wdata->state.flags; wdata 329 drivers/hid/hid-wiimote-modules.c wiiproto_req_leds(wdata, state & ~flag); wdata 331 drivers/hid/hid-wiimote-modules.c wiiproto_req_leds(wdata, state | flag); wdata 332 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 339 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 341 drivers/hid/hid-wiimote-modules.c struct device *dev = &wdata->hdev->dev; wdata 360 drivers/hid/hid-wiimote-modules.c wdata->leds[ops->arg] = led; wdata 367 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 368 drivers/hid/hid-wiimote-modules.c wiiproto_req_leds(wdata, WIIPROTO_FLAG_LED1); wdata 369 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 375 drivers/hid/hid-wiimote-modules.c wdata->leds[ops->arg] = NULL; wdata 381 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 383 drivers/hid/hid-wiimote-modules.c if (!wdata->leds[ops->arg]) wdata 386 drivers/hid/hid-wiimote-modules.c led_classdev_unregister(wdata->leds[ops->arg]); wdata 387 drivers/hid/hid-wiimote-modules.c kfree(wdata->leds[ops->arg]); wdata 388 drivers/hid/hid-wiimote-modules.c wdata->leds[ops->arg] = NULL; wdata 425 drivers/hid/hid-wiimote-modules.c static void wiimod_accel_in_accel(struct wiimote_data *wdata, wdata 430 drivers/hid/hid-wiimote-modules.c if (!(wdata->state.flags & WIIPROTO_FLAG_ACCEL)) wdata 453 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->accel, ABS_RX, x - 0x200); wdata 454 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->accel, ABS_RY, y - 0x200); wdata 455 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->accel, ABS_RZ, z - 0x200); wdata 456 drivers/hid/hid-wiimote-modules.c input_sync(wdata->accel); wdata 461 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = input_get_drvdata(dev); wdata 464 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 465 drivers/hid/hid-wiimote-modules.c wiiproto_req_accel(wdata, true); wdata 466 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 473 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = input_get_drvdata(dev); wdata 476 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 477 drivers/hid/hid-wiimote-modules.c wiiproto_req_accel(wdata, false); wdata 478 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 482 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 486 drivers/hid/hid-wiimote-modules.c wdata->accel = input_allocate_device(); wdata 487 drivers/hid/hid-wiimote-modules.c if (!wdata->accel) wdata 490 drivers/hid/hid-wiimote-modules.c input_set_drvdata(wdata->accel, wdata); wdata 491 drivers/hid/hid-wiimote-modules.c wdata->accel->open = wiimod_accel_open; wdata 492 drivers/hid/hid-wiimote-modules.c wdata->accel->close = wiimod_accel_close; wdata 493 drivers/hid/hid-wiimote-modules.c wdata->accel->dev.parent = &wdata->hdev->dev; wdata 494 drivers/hid/hid-wiimote-modules.c wdata->accel->id.bustype = wdata->hdev->bus; wdata 495 drivers/hid/hid-wiimote-modules.c wdata->accel->id.vendor = wdata->hdev->vendor; wdata 496 drivers/hid/hid-wiimote-modules.c wdata->accel->id.product = wdata->hdev->product; wdata 497 drivers/hid/hid-wiimote-modules.c wdata->accel->id.version = wdata->hdev->version; wdata 498 drivers/hid/hid-wiimote-modules.c wdata->accel->name = WIIMOTE_NAME " Accelerometer"; wdata 500 drivers/hid/hid-wiimote-modules.c set_bit(EV_ABS, wdata->accel->evbit); wdata 501 drivers/hid/hid-wiimote-modules.c set_bit(ABS_RX, wdata->accel->absbit); wdata 502 drivers/hid/hid-wiimote-modules.c set_bit(ABS_RY, wdata->accel->absbit); wdata 503 drivers/hid/hid-wiimote-modules.c set_bit(ABS_RZ, wdata->accel->absbit); wdata 504 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->accel, ABS_RX, -500, 500, 2, 4); wdata 505 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->accel, ABS_RY, -500, 500, 2, 4); wdata 506 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->accel, ABS_RZ, -500, 500, 2, 4); wdata 508 drivers/hid/hid-wiimote-modules.c ret = input_register_device(wdata->accel); wdata 510 drivers/hid/hid-wiimote-modules.c hid_err(wdata->hdev, "cannot register input device\n"); wdata 517 drivers/hid/hid-wiimote-modules.c input_free_device(wdata->accel); wdata 518 drivers/hid/hid-wiimote-modules.c wdata->accel = NULL; wdata 523 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 525 drivers/hid/hid-wiimote-modules.c if (!wdata->accel) wdata 528 drivers/hid/hid-wiimote-modules.c input_unregister_device(wdata->accel); wdata 529 drivers/hid/hid-wiimote-modules.c wdata->accel = NULL; wdata 550 drivers/hid/hid-wiimote-modules.c static void wiimod_ir_in_ir(struct wiimote_data *wdata, const __u8 *ir, wdata 557 drivers/hid/hid-wiimote-modules.c if (!(wdata->state.flags & WIIPROTO_FLAGS_IR)) wdata 600 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->ir, xid, x); wdata 601 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->ir, yid, y); wdata 604 drivers/hid/hid-wiimote-modules.c input_sync(wdata->ir); wdata 607 drivers/hid/hid-wiimote-modules.c static int wiimod_ir_change(struct wiimote_data *wdata, __u16 mode) wdata 618 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 620 drivers/hid/hid-wiimote-modules.c if (mode == (wdata->state.flags & WIIPROTO_FLAGS_IR)) { wdata 621 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 626 drivers/hid/hid-wiimote-modules.c wdata->state.flags &= ~WIIPROTO_FLAGS_IR; wdata 627 drivers/hid/hid-wiimote-modules.c wiiproto_req_ir1(wdata, 0); wdata 628 drivers/hid/hid-wiimote-modules.c wiiproto_req_ir2(wdata, 0); wdata 629 drivers/hid/hid-wiimote-modules.c wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); wdata 630 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 634 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 636 drivers/hid/hid-wiimote-modules.c ret = wiimote_cmd_acquire(wdata); wdata 641 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 642 drivers/hid/hid-wiimote-modules.c wiimote_cmd_set(wdata, WIIPROTO_REQ_IR1, 0); wdata 643 drivers/hid/hid-wiimote-modules.c wiiproto_req_ir1(wdata, 0x06); wdata 644 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 646 drivers/hid/hid-wiimote-modules.c ret = wiimote_cmd_wait(wdata); wdata 649 drivers/hid/hid-wiimote-modules.c if (wdata->state.cmd_err) { wdata 655 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 656 drivers/hid/hid-wiimote-modules.c wiimote_cmd_set(wdata, WIIPROTO_REQ_IR2, 0); wdata 657 drivers/hid/hid-wiimote-modules.c wiiproto_req_ir2(wdata, 0x06); wdata 658 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 660 drivers/hid/hid-wiimote-modules.c ret = wiimote_cmd_wait(wdata); wdata 663 drivers/hid/hid-wiimote-modules.c if (wdata->state.cmd_err) { wdata 669 drivers/hid/hid-wiimote-modules.c ret = wiimote_cmd_write(wdata, 0xb00030, data_enable, wdata 675 drivers/hid/hid-wiimote-modules.c ret = wiimote_cmd_write(wdata, 0xb00000, data_sens1, wdata 681 drivers/hid/hid-wiimote-modules.c ret = wiimote_cmd_write(wdata, 0xb0001a, data_sens2, wdata 698 drivers/hid/hid-wiimote-modules.c ret = wiimote_cmd_write(wdata, 0xb00033, &format, sizeof(format)); wdata 703 drivers/hid/hid-wiimote-modules.c ret = wiimote_cmd_write(wdata, 0xb00030, data_fin, sizeof(data_fin)); wdata 708 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 709 drivers/hid/hid-wiimote-modules.c wdata->state.flags &= ~WIIPROTO_FLAGS_IR; wdata 710 drivers/hid/hid-wiimote-modules.c wdata->state.flags |= mode & WIIPROTO_FLAGS_IR; wdata 711 drivers/hid/hid-wiimote-modules.c wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); wdata 712 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 715 drivers/hid/hid-wiimote-modules.c wiimote_cmd_release(wdata); wdata 721 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = input_get_drvdata(dev); wdata 723 drivers/hid/hid-wiimote-modules.c return wiimod_ir_change(wdata, WIIPROTO_FLAG_IR_BASIC); wdata 728 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = input_get_drvdata(dev); wdata 730 drivers/hid/hid-wiimote-modules.c wiimod_ir_change(wdata, 0); wdata 734 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 738 drivers/hid/hid-wiimote-modules.c wdata->ir = input_allocate_device(); wdata 739 drivers/hid/hid-wiimote-modules.c if (!wdata->ir) wdata 742 drivers/hid/hid-wiimote-modules.c input_set_drvdata(wdata->ir, wdata); wdata 743 drivers/hid/hid-wiimote-modules.c wdata->ir->open = wiimod_ir_open; wdata 744 drivers/hid/hid-wiimote-modules.c wdata->ir->close = wiimod_ir_close; wdata 745 drivers/hid/hid-wiimote-modules.c wdata->ir->dev.parent = &wdata->hdev->dev; wdata 746 drivers/hid/hid-wiimote-modules.c wdata->ir->id.bustype = wdata->hdev->bus; wdata 747 drivers/hid/hid-wiimote-modules.c wdata->ir->id.vendor = wdata->hdev->vendor; wdata 748 drivers/hid/hid-wiimote-modules.c wdata->ir->id.product = wdata->hdev->product; wdata 749 drivers/hid/hid-wiimote-modules.c wdata->ir->id.version = wdata->hdev->version; wdata 750 drivers/hid/hid-wiimote-modules.c wdata->ir->name = WIIMOTE_NAME " IR"; wdata 752 drivers/hid/hid-wiimote-modules.c set_bit(EV_ABS, wdata->ir->evbit); wdata 753 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT0X, wdata->ir->absbit); wdata 754 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT0Y, wdata->ir->absbit); wdata 755 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT1X, wdata->ir->absbit); wdata 756 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT1Y, wdata->ir->absbit); wdata 757 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT2X, wdata->ir->absbit); wdata 758 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT2Y, wdata->ir->absbit); wdata 759 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT3X, wdata->ir->absbit); wdata 760 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT3Y, wdata->ir->absbit); wdata 761 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->ir, ABS_HAT0X, 0, 1023, 2, 4); wdata 762 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->ir, ABS_HAT0Y, 0, 767, 2, 4); wdata 763 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->ir, ABS_HAT1X, 0, 1023, 2, 4); wdata 764 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->ir, ABS_HAT1Y, 0, 767, 2, 4); wdata 765 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->ir, ABS_HAT2X, 0, 1023, 2, 4); wdata 766 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->ir, ABS_HAT2Y, 0, 767, 2, 4); wdata 767 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->ir, ABS_HAT3X, 0, 1023, 2, 4); wdata 768 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->ir, ABS_HAT3Y, 0, 767, 2, 4); wdata 770 drivers/hid/hid-wiimote-modules.c ret = input_register_device(wdata->ir); wdata 772 drivers/hid/hid-wiimote-modules.c hid_err(wdata->hdev, "cannot register input device\n"); wdata 779 drivers/hid/hid-wiimote-modules.c input_free_device(wdata->ir); wdata 780 drivers/hid/hid-wiimote-modules.c wdata->ir = NULL; wdata 785 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 787 drivers/hid/hid-wiimote-modules.c if (!wdata->ir) wdata 790 drivers/hid/hid-wiimote-modules.c input_unregister_device(wdata->ir); wdata 791 drivers/hid/hid-wiimote-modules.c wdata->ir = NULL; wdata 820 drivers/hid/hid-wiimote-modules.c static void wiimod_nunchuk_in_ext(struct wiimote_data *wdata, const __u8 *ext) wdata 863 drivers/hid/hid-wiimote-modules.c if (wdata->state.flags & WIIPROTO_FLAG_MP_ACTIVE) { wdata 878 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, ABS_HAT0X, bx); wdata 879 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, ABS_HAT0Y, by); wdata 881 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, ABS_RX, x); wdata 882 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, ABS_RY, y); wdata 883 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, ABS_RZ, z); wdata 885 drivers/hid/hid-wiimote-modules.c if (wdata->state.flags & WIIPROTO_FLAG_MP_ACTIVE) { wdata 886 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 889 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 893 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 896 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 901 drivers/hid/hid-wiimote-modules.c input_sync(wdata->extension.input); wdata 906 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = input_get_drvdata(dev); wdata 909 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 910 drivers/hid/hid-wiimote-modules.c wdata->state.flags |= WIIPROTO_FLAG_EXT_USED; wdata 911 drivers/hid/hid-wiimote-modules.c wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); wdata 912 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 919 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = input_get_drvdata(dev); wdata 922 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 923 drivers/hid/hid-wiimote-modules.c wdata->state.flags &= ~WIIPROTO_FLAG_EXT_USED; wdata 924 drivers/hid/hid-wiimote-modules.c wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); wdata 925 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 929 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 933 drivers/hid/hid-wiimote-modules.c wdata->extension.input = input_allocate_device(); wdata 934 drivers/hid/hid-wiimote-modules.c if (!wdata->extension.input) wdata 937 drivers/hid/hid-wiimote-modules.c input_set_drvdata(wdata->extension.input, wdata); wdata 938 drivers/hid/hid-wiimote-modules.c wdata->extension.input->open = wiimod_nunchuk_open; wdata 939 drivers/hid/hid-wiimote-modules.c wdata->extension.input->close = wiimod_nunchuk_close; wdata 940 drivers/hid/hid-wiimote-modules.c wdata->extension.input->dev.parent = &wdata->hdev->dev; wdata 941 drivers/hid/hid-wiimote-modules.c wdata->extension.input->id.bustype = wdata->hdev->bus; wdata 942 drivers/hid/hid-wiimote-modules.c wdata->extension.input->id.vendor = wdata->hdev->vendor; wdata 943 drivers/hid/hid-wiimote-modules.c wdata->extension.input->id.product = wdata->hdev->product; wdata 944 drivers/hid/hid-wiimote-modules.c wdata->extension.input->id.version = wdata->hdev->version; wdata 945 drivers/hid/hid-wiimote-modules.c wdata->extension.input->name = WIIMOTE_NAME " Nunchuk"; wdata 947 drivers/hid/hid-wiimote-modules.c set_bit(EV_KEY, wdata->extension.input->evbit); wdata 950 drivers/hid/hid-wiimote-modules.c wdata->extension.input->keybit); wdata 952 drivers/hid/hid-wiimote-modules.c set_bit(EV_ABS, wdata->extension.input->evbit); wdata 953 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT0X, wdata->extension.input->absbit); wdata 954 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT0Y, wdata->extension.input->absbit); wdata 955 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 957 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 959 drivers/hid/hid-wiimote-modules.c set_bit(ABS_RX, wdata->extension.input->absbit); wdata 960 drivers/hid/hid-wiimote-modules.c set_bit(ABS_RY, wdata->extension.input->absbit); wdata 961 drivers/hid/hid-wiimote-modules.c set_bit(ABS_RZ, wdata->extension.input->absbit); wdata 962 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 964 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 966 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 969 drivers/hid/hid-wiimote-modules.c ret = input_register_device(wdata->extension.input); wdata 976 drivers/hid/hid-wiimote-modules.c input_free_device(wdata->extension.input); wdata 977 drivers/hid/hid-wiimote-modules.c wdata->extension.input = NULL; wdata 982 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 984 drivers/hid/hid-wiimote-modules.c if (!wdata->extension.input) wdata 987 drivers/hid/hid-wiimote-modules.c input_unregister_device(wdata->extension.input); wdata 988 drivers/hid/hid-wiimote-modules.c wdata->extension.input = NULL; wdata 1044 drivers/hid/hid-wiimote-modules.c static void wiimod_classic_in_ext(struct wiimote_data *wdata, const __u8 *ext) wdata 1091 drivers/hid/hid-wiimote-modules.c if (wdata->state.flags & WIIPROTO_FLAG_MP_ACTIVE) { wdata 1113 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, ABS_HAT1X, lx - 0x20); wdata 1114 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, ABS_HAT1Y, ly - 0x20); wdata 1115 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, ABS_HAT2X, rx - 0x20); wdata 1116 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, ABS_HAT2Y, ry - 0x20); wdata 1117 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, ABS_HAT3X, rt); wdata 1118 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, ABS_HAT3Y, lt); wdata 1120 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1123 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1126 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1129 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1132 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1135 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1138 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1141 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1144 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1147 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1150 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1153 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1156 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1160 drivers/hid/hid-wiimote-modules.c if (wdata->state.flags & WIIPROTO_FLAG_MP_ACTIVE) { wdata 1161 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1164 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1168 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1171 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1176 drivers/hid/hid-wiimote-modules.c input_sync(wdata->extension.input); wdata 1181 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = input_get_drvdata(dev); wdata 1184 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 1185 drivers/hid/hid-wiimote-modules.c wdata->state.flags |= WIIPROTO_FLAG_EXT_USED; wdata 1186 drivers/hid/hid-wiimote-modules.c wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); wdata 1187 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 1194 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = input_get_drvdata(dev); wdata 1197 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 1198 drivers/hid/hid-wiimote-modules.c wdata->state.flags &= ~WIIPROTO_FLAG_EXT_USED; wdata 1199 drivers/hid/hid-wiimote-modules.c wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); wdata 1200 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 1204 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 1208 drivers/hid/hid-wiimote-modules.c wdata->extension.input = input_allocate_device(); wdata 1209 drivers/hid/hid-wiimote-modules.c if (!wdata->extension.input) wdata 1212 drivers/hid/hid-wiimote-modules.c input_set_drvdata(wdata->extension.input, wdata); wdata 1213 drivers/hid/hid-wiimote-modules.c wdata->extension.input->open = wiimod_classic_open; wdata 1214 drivers/hid/hid-wiimote-modules.c wdata->extension.input->close = wiimod_classic_close; wdata 1215 drivers/hid/hid-wiimote-modules.c wdata->extension.input->dev.parent = &wdata->hdev->dev; wdata 1216 drivers/hid/hid-wiimote-modules.c wdata->extension.input->id.bustype = wdata->hdev->bus; wdata 1217 drivers/hid/hid-wiimote-modules.c wdata->extension.input->id.vendor = wdata->hdev->vendor; wdata 1218 drivers/hid/hid-wiimote-modules.c wdata->extension.input->id.product = wdata->hdev->product; wdata 1219 drivers/hid/hid-wiimote-modules.c wdata->extension.input->id.version = wdata->hdev->version; wdata 1220 drivers/hid/hid-wiimote-modules.c wdata->extension.input->name = WIIMOTE_NAME " Classic Controller"; wdata 1222 drivers/hid/hid-wiimote-modules.c set_bit(EV_KEY, wdata->extension.input->evbit); wdata 1225 drivers/hid/hid-wiimote-modules.c wdata->extension.input->keybit); wdata 1227 drivers/hid/hid-wiimote-modules.c set_bit(EV_ABS, wdata->extension.input->evbit); wdata 1228 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT1X, wdata->extension.input->absbit); wdata 1229 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT1Y, wdata->extension.input->absbit); wdata 1230 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT2X, wdata->extension.input->absbit); wdata 1231 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT2Y, wdata->extension.input->absbit); wdata 1232 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT3X, wdata->extension.input->absbit); wdata 1233 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT3Y, wdata->extension.input->absbit); wdata 1234 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 1236 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 1238 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 1240 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 1242 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 1244 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 1247 drivers/hid/hid-wiimote-modules.c ret = input_register_device(wdata->extension.input); wdata 1254 drivers/hid/hid-wiimote-modules.c input_free_device(wdata->extension.input); wdata 1255 drivers/hid/hid-wiimote-modules.c wdata->extension.input = NULL; wdata 1260 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 1262 drivers/hid/hid-wiimote-modules.c if (!wdata->extension.input) wdata 1265 drivers/hid/hid-wiimote-modules.c input_unregister_device(wdata->extension.input); wdata 1266 drivers/hid/hid-wiimote-modules.c wdata->extension.input = NULL; wdata 1290 drivers/hid/hid-wiimote-modules.c static void wiimod_bboard_in_keys(struct wiimote_data *wdata, const __u8 *keys) wdata 1292 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, BTN_A, wdata 1294 drivers/hid/hid-wiimote-modules.c input_sync(wdata->extension.input); wdata 1297 drivers/hid/hid-wiimote-modules.c static void wiimod_bboard_in_ext(struct wiimote_data *wdata, wdata 1302 drivers/hid/hid-wiimote-modules.c struct wiimote_state *s = &wdata->state; wdata 1363 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, ABS_HAT0X, val[0]); wdata 1364 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, ABS_HAT0Y, val[1]); wdata 1365 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, ABS_HAT1X, val[2]); wdata 1366 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, ABS_HAT1Y, val[3]); wdata 1367 drivers/hid/hid-wiimote-modules.c input_sync(wdata->extension.input); wdata 1372 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = input_get_drvdata(dev); wdata 1375 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 1376 drivers/hid/hid-wiimote-modules.c wdata->state.flags |= WIIPROTO_FLAG_EXT_USED; wdata 1377 drivers/hid/hid-wiimote-modules.c wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); wdata 1378 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 1385 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = input_get_drvdata(dev); wdata 1388 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 1389 drivers/hid/hid-wiimote-modules.c wdata->state.flags &= ~WIIPROTO_FLAG_EXT_USED; wdata 1390 drivers/hid/hid-wiimote-modules.c wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); wdata 1391 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 1398 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = dev_to_wii(dev); wdata 1403 drivers/hid/hid-wiimote-modules.c ret = wiimote_cmd_acquire(wdata); wdata 1407 drivers/hid/hid-wiimote-modules.c ret = wiimote_cmd_read(wdata, 0xa40024, buf, 12); wdata 1409 drivers/hid/hid-wiimote-modules.c wiimote_cmd_release(wdata); wdata 1412 drivers/hid/hid-wiimote-modules.c ret = wiimote_cmd_read(wdata, 0xa40024 + 12, buf + 12, 12); wdata 1414 drivers/hid/hid-wiimote-modules.c wiimote_cmd_release(wdata); wdata 1418 drivers/hid/hid-wiimote-modules.c wiimote_cmd_release(wdata); wdata 1420 drivers/hid/hid-wiimote-modules.c spin_lock_irq(&wdata->state.lock); wdata 1424 drivers/hid/hid-wiimote-modules.c wdata->state.calib_bboard[j][i] = buf[offs]; wdata 1425 drivers/hid/hid-wiimote-modules.c wdata->state.calib_bboard[j][i] <<= 8; wdata 1426 drivers/hid/hid-wiimote-modules.c wdata->state.calib_bboard[j][i] |= buf[offs + 1]; wdata 1430 drivers/hid/hid-wiimote-modules.c spin_unlock_irq(&wdata->state.lock); wdata 1435 drivers/hid/hid-wiimote-modules.c val = wdata->state.calib_bboard[j][i]; wdata 1449 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 1454 drivers/hid/hid-wiimote-modules.c wiimote_cmd_acquire_noint(wdata); wdata 1456 drivers/hid/hid-wiimote-modules.c ret = wiimote_cmd_read(wdata, 0xa40024, buf, 12); wdata 1458 drivers/hid/hid-wiimote-modules.c wiimote_cmd_release(wdata); wdata 1461 drivers/hid/hid-wiimote-modules.c ret = wiimote_cmd_read(wdata, 0xa40024 + 12, buf + 12, 12); wdata 1463 drivers/hid/hid-wiimote-modules.c wiimote_cmd_release(wdata); wdata 1467 drivers/hid/hid-wiimote-modules.c wiimote_cmd_release(wdata); wdata 1472 drivers/hid/hid-wiimote-modules.c wdata->state.calib_bboard[j][i] = buf[offs]; wdata 1473 drivers/hid/hid-wiimote-modules.c wdata->state.calib_bboard[j][i] <<= 8; wdata 1474 drivers/hid/hid-wiimote-modules.c wdata->state.calib_bboard[j][i] |= buf[offs + 1]; wdata 1479 drivers/hid/hid-wiimote-modules.c wdata->extension.input = input_allocate_device(); wdata 1480 drivers/hid/hid-wiimote-modules.c if (!wdata->extension.input) wdata 1483 drivers/hid/hid-wiimote-modules.c ret = device_create_file(&wdata->hdev->dev, wdata 1486 drivers/hid/hid-wiimote-modules.c hid_err(wdata->hdev, "cannot create sysfs attribute\n"); wdata 1490 drivers/hid/hid-wiimote-modules.c input_set_drvdata(wdata->extension.input, wdata); wdata 1491 drivers/hid/hid-wiimote-modules.c wdata->extension.input->open = wiimod_bboard_open; wdata 1492 drivers/hid/hid-wiimote-modules.c wdata->extension.input->close = wiimod_bboard_close; wdata 1493 drivers/hid/hid-wiimote-modules.c wdata->extension.input->dev.parent = &wdata->hdev->dev; wdata 1494 drivers/hid/hid-wiimote-modules.c wdata->extension.input->id.bustype = wdata->hdev->bus; wdata 1495 drivers/hid/hid-wiimote-modules.c wdata->extension.input->id.vendor = wdata->hdev->vendor; wdata 1496 drivers/hid/hid-wiimote-modules.c wdata->extension.input->id.product = wdata->hdev->product; wdata 1497 drivers/hid/hid-wiimote-modules.c wdata->extension.input->id.version = wdata->hdev->version; wdata 1498 drivers/hid/hid-wiimote-modules.c wdata->extension.input->name = WIIMOTE_NAME " Balance Board"; wdata 1500 drivers/hid/hid-wiimote-modules.c set_bit(EV_KEY, wdata->extension.input->evbit); wdata 1501 drivers/hid/hid-wiimote-modules.c set_bit(BTN_A, wdata->extension.input->keybit); wdata 1503 drivers/hid/hid-wiimote-modules.c set_bit(EV_ABS, wdata->extension.input->evbit); wdata 1504 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT0X, wdata->extension.input->absbit); wdata 1505 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT0Y, wdata->extension.input->absbit); wdata 1506 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT1X, wdata->extension.input->absbit); wdata 1507 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT1Y, wdata->extension.input->absbit); wdata 1508 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 1510 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 1512 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 1514 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 1517 drivers/hid/hid-wiimote-modules.c ret = input_register_device(wdata->extension.input); wdata 1524 drivers/hid/hid-wiimote-modules.c device_remove_file(&wdata->hdev->dev, wdata 1527 drivers/hid/hid-wiimote-modules.c input_free_device(wdata->extension.input); wdata 1528 drivers/hid/hid-wiimote-modules.c wdata->extension.input = NULL; wdata 1533 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 1535 drivers/hid/hid-wiimote-modules.c if (!wdata->extension.input) wdata 1538 drivers/hid/hid-wiimote-modules.c input_unregister_device(wdata->extension.input); wdata 1539 drivers/hid/hid-wiimote-modules.c wdata->extension.input = NULL; wdata 1540 drivers/hid/hid-wiimote-modules.c device_remove_file(&wdata->hdev->dev, wdata 1604 drivers/hid/hid-wiimote-modules.c static void wiimod_pro_in_ext(struct wiimote_data *wdata, const __u8 *ext) wdata 1665 drivers/hid/hid-wiimote-modules.c if (!(wdata->state.flags & WIIPROTO_FLAG_PRO_CALIB_DONE)) { wdata 1666 drivers/hid/hid-wiimote-modules.c wdata->state.flags |= WIIPROTO_FLAG_PRO_CALIB_DONE; wdata 1668 drivers/hid/hid-wiimote-modules.c wdata->state.calib_pro_sticks[0] = -lx; wdata 1670 drivers/hid/hid-wiimote-modules.c wdata->state.calib_pro_sticks[1] = -ly; wdata 1672 drivers/hid/hid-wiimote-modules.c wdata->state.calib_pro_sticks[2] = -rx; wdata 1674 drivers/hid/hid-wiimote-modules.c wdata->state.calib_pro_sticks[3] = -ry; wdata 1678 drivers/hid/hid-wiimote-modules.c lx += wdata->state.calib_pro_sticks[0]; wdata 1679 drivers/hid/hid-wiimote-modules.c ly += wdata->state.calib_pro_sticks[1]; wdata 1680 drivers/hid/hid-wiimote-modules.c rx += wdata->state.calib_pro_sticks[2]; wdata 1681 drivers/hid/hid-wiimote-modules.c ry += wdata->state.calib_pro_sticks[3]; wdata 1683 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, ABS_X, lx); wdata 1684 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, ABS_Y, ly); wdata 1685 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, ABS_RX, rx); wdata 1686 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, ABS_RY, ry); wdata 1688 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1691 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1694 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1697 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1700 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1703 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1706 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1710 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1713 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1716 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1719 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1722 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1725 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1728 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1731 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1735 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1738 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 1742 drivers/hid/hid-wiimote-modules.c input_sync(wdata->extension.input); wdata 1747 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = input_get_drvdata(dev); wdata 1750 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 1751 drivers/hid/hid-wiimote-modules.c wdata->state.flags |= WIIPROTO_FLAG_EXT_USED; wdata 1752 drivers/hid/hid-wiimote-modules.c wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); wdata 1753 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 1760 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = input_get_drvdata(dev); wdata 1763 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 1764 drivers/hid/hid-wiimote-modules.c wdata->state.flags &= ~WIIPROTO_FLAG_EXT_USED; wdata 1765 drivers/hid/hid-wiimote-modules.c wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); wdata 1766 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 1772 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = input_get_drvdata(dev); wdata 1788 drivers/hid/hid-wiimote-modules.c wdata->state.cache_rumble = value; wdata 1789 drivers/hid/hid-wiimote-modules.c schedule_work(&wdata->rumble_worker); wdata 1798 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = dev_to_wii(dev); wdata 1802 drivers/hid/hid-wiimote-modules.c r += sprintf(&out[r], "%+06hd:", wdata->state.calib_pro_sticks[0]); wdata 1803 drivers/hid/hid-wiimote-modules.c r += sprintf(&out[r], "%+06hd ", wdata->state.calib_pro_sticks[1]); wdata 1804 drivers/hid/hid-wiimote-modules.c r += sprintf(&out[r], "%+06hd:", wdata->state.calib_pro_sticks[2]); wdata 1805 drivers/hid/hid-wiimote-modules.c r += sprintf(&out[r], "%+06hd\n", wdata->state.calib_pro_sticks[3]); wdata 1814 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = dev_to_wii(dev); wdata 1819 drivers/hid/hid-wiimote-modules.c spin_lock_irq(&wdata->state.lock); wdata 1820 drivers/hid/hid-wiimote-modules.c wdata->state.flags &= ~WIIPROTO_FLAG_PRO_CALIB_DONE; wdata 1821 drivers/hid/hid-wiimote-modules.c spin_unlock_irq(&wdata->state.lock); wdata 1827 drivers/hid/hid-wiimote-modules.c spin_lock_irq(&wdata->state.lock); wdata 1828 drivers/hid/hid-wiimote-modules.c wdata->state.flags |= WIIPROTO_FLAG_PRO_CALIB_DONE; wdata 1829 drivers/hid/hid-wiimote-modules.c spin_unlock_irq(&wdata->state.lock); wdata 1831 drivers/hid/hid-wiimote-modules.c wdata->state.calib_pro_sticks[0] = x1; wdata 1832 drivers/hid/hid-wiimote-modules.c wdata->state.calib_pro_sticks[1] = y1; wdata 1833 drivers/hid/hid-wiimote-modules.c wdata->state.calib_pro_sticks[2] = x2; wdata 1834 drivers/hid/hid-wiimote-modules.c wdata->state.calib_pro_sticks[3] = y2; wdata 1844 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 1849 drivers/hid/hid-wiimote-modules.c INIT_WORK(&wdata->rumble_worker, wiimod_rumble_worker); wdata 1850 drivers/hid/hid-wiimote-modules.c wdata->state.calib_pro_sticks[0] = 0; wdata 1851 drivers/hid/hid-wiimote-modules.c wdata->state.calib_pro_sticks[1] = 0; wdata 1852 drivers/hid/hid-wiimote-modules.c wdata->state.calib_pro_sticks[2] = 0; wdata 1853 drivers/hid/hid-wiimote-modules.c wdata->state.calib_pro_sticks[3] = 0; wdata 1855 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 1856 drivers/hid/hid-wiimote-modules.c wdata->state.flags &= ~WIIPROTO_FLAG_PRO_CALIB_DONE; wdata 1857 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 1859 drivers/hid/hid-wiimote-modules.c wdata->extension.input = input_allocate_device(); wdata 1860 drivers/hid/hid-wiimote-modules.c if (!wdata->extension.input) wdata 1863 drivers/hid/hid-wiimote-modules.c set_bit(FF_RUMBLE, wdata->extension.input->ffbit); wdata 1864 drivers/hid/hid-wiimote-modules.c input_set_drvdata(wdata->extension.input, wdata); wdata 1866 drivers/hid/hid-wiimote-modules.c if (input_ff_create_memless(wdata->extension.input, NULL, wdata 1872 drivers/hid/hid-wiimote-modules.c ret = device_create_file(&wdata->hdev->dev, wdata 1875 drivers/hid/hid-wiimote-modules.c hid_err(wdata->hdev, "cannot create sysfs attribute\n"); wdata 1879 drivers/hid/hid-wiimote-modules.c wdata->extension.input->open = wiimod_pro_open; wdata 1880 drivers/hid/hid-wiimote-modules.c wdata->extension.input->close = wiimod_pro_close; wdata 1881 drivers/hid/hid-wiimote-modules.c wdata->extension.input->dev.parent = &wdata->hdev->dev; wdata 1882 drivers/hid/hid-wiimote-modules.c wdata->extension.input->id.bustype = wdata->hdev->bus; wdata 1883 drivers/hid/hid-wiimote-modules.c wdata->extension.input->id.vendor = wdata->hdev->vendor; wdata 1884 drivers/hid/hid-wiimote-modules.c wdata->extension.input->id.product = wdata->hdev->product; wdata 1885 drivers/hid/hid-wiimote-modules.c wdata->extension.input->id.version = wdata->hdev->version; wdata 1886 drivers/hid/hid-wiimote-modules.c wdata->extension.input->name = WIIMOTE_NAME " Pro Controller"; wdata 1888 drivers/hid/hid-wiimote-modules.c set_bit(EV_KEY, wdata->extension.input->evbit); wdata 1891 drivers/hid/hid-wiimote-modules.c wdata->extension.input->keybit); wdata 1893 drivers/hid/hid-wiimote-modules.c set_bit(EV_ABS, wdata->extension.input->evbit); wdata 1894 drivers/hid/hid-wiimote-modules.c set_bit(ABS_X, wdata->extension.input->absbit); wdata 1895 drivers/hid/hid-wiimote-modules.c set_bit(ABS_Y, wdata->extension.input->absbit); wdata 1896 drivers/hid/hid-wiimote-modules.c set_bit(ABS_RX, wdata->extension.input->absbit); wdata 1897 drivers/hid/hid-wiimote-modules.c set_bit(ABS_RY, wdata->extension.input->absbit); wdata 1898 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 1900 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 1902 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 1904 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 1907 drivers/hid/hid-wiimote-modules.c ret = input_register_device(wdata->extension.input); wdata 1914 drivers/hid/hid-wiimote-modules.c device_remove_file(&wdata->hdev->dev, wdata 1917 drivers/hid/hid-wiimote-modules.c input_free_device(wdata->extension.input); wdata 1918 drivers/hid/hid-wiimote-modules.c wdata->extension.input = NULL; wdata 1923 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 1927 drivers/hid/hid-wiimote-modules.c if (!wdata->extension.input) wdata 1930 drivers/hid/hid-wiimote-modules.c input_unregister_device(wdata->extension.input); wdata 1931 drivers/hid/hid-wiimote-modules.c wdata->extension.input = NULL; wdata 1932 drivers/hid/hid-wiimote-modules.c cancel_work_sync(&wdata->rumble_worker); wdata 1933 drivers/hid/hid-wiimote-modules.c device_remove_file(&wdata->hdev->dev, wdata 1936 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 1937 drivers/hid/hid-wiimote-modules.c wiiproto_req_rumble(wdata, 0); wdata 1938 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 1958 drivers/hid/hid-wiimote-modules.c static inline void wiimod_drums_report_pressure(struct wiimote_data *wdata, wdata 1968 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, code, *store); wdata 1971 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, code, *store); wdata 1975 drivers/hid/hid-wiimote-modules.c static void wiimod_drums_in_ext(struct wiimote_data *wdata, const __u8 *ext) wdata 2026 drivers/hid/hid-wiimote-modules.c if (wdata->state.flags & WIIPROTO_FLAG_MP_ACTIVE) { wdata 2031 drivers/hid/hid-wiimote-modules.c wiimod_drums_report_pressure(wdata, none, which, pressure, wdata 2032 drivers/hid/hid-wiimote-modules.c o, &wdata->state.pressure_drums[0], wdata 2034 drivers/hid/hid-wiimote-modules.c wiimod_drums_report_pressure(wdata, none, which, pressure, wdata 2035 drivers/hid/hid-wiimote-modules.c r, &wdata->state.pressure_drums[1], wdata 2037 drivers/hid/hid-wiimote-modules.c wiimod_drums_report_pressure(wdata, none, which, pressure, wdata 2038 drivers/hid/hid-wiimote-modules.c y, &wdata->state.pressure_drums[2], wdata 2040 drivers/hid/hid-wiimote-modules.c wiimod_drums_report_pressure(wdata, none, which, pressure, wdata 2041 drivers/hid/hid-wiimote-modules.c g, &wdata->state.pressure_drums[3], wdata 2043 drivers/hid/hid-wiimote-modules.c wiimod_drums_report_pressure(wdata, none, which, pressure, wdata 2044 drivers/hid/hid-wiimote-modules.c b, &wdata->state.pressure_drums[4], wdata 2048 drivers/hid/hid-wiimote-modules.c wiimod_drums_report_pressure(wdata, none, hhp ? 0xff : which, pressure, wdata 2049 drivers/hid/hid-wiimote-modules.c bass, &wdata->state.pressure_drums[5], wdata 2052 drivers/hid/hid-wiimote-modules.c wiimod_drums_report_pressure(wdata, none, hhp ? which : 0xff, pressure, wdata 2053 drivers/hid/hid-wiimote-modules.c 0, &wdata->state.pressure_drums[6], wdata 2056 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, ABS_X, sx - 0x20); wdata 2057 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, ABS_Y, sy - 0x20); wdata 2059 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, BTN_START, bp); wdata 2060 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, BTN_SELECT, bm); wdata 2062 drivers/hid/hid-wiimote-modules.c input_sync(wdata->extension.input); wdata 2067 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = input_get_drvdata(dev); wdata 2070 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 2071 drivers/hid/hid-wiimote-modules.c wdata->state.flags |= WIIPROTO_FLAG_EXT_USED; wdata 2072 drivers/hid/hid-wiimote-modules.c wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); wdata 2073 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 2080 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = input_get_drvdata(dev); wdata 2083 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 2084 drivers/hid/hid-wiimote-modules.c wdata->state.flags &= ~WIIPROTO_FLAG_EXT_USED; wdata 2085 drivers/hid/hid-wiimote-modules.c wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); wdata 2086 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 2090 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 2094 drivers/hid/hid-wiimote-modules.c wdata->extension.input = input_allocate_device(); wdata 2095 drivers/hid/hid-wiimote-modules.c if (!wdata->extension.input) wdata 2098 drivers/hid/hid-wiimote-modules.c input_set_drvdata(wdata->extension.input, wdata); wdata 2099 drivers/hid/hid-wiimote-modules.c wdata->extension.input->open = wiimod_drums_open; wdata 2100 drivers/hid/hid-wiimote-modules.c wdata->extension.input->close = wiimod_drums_close; wdata 2101 drivers/hid/hid-wiimote-modules.c wdata->extension.input->dev.parent = &wdata->hdev->dev; wdata 2102 drivers/hid/hid-wiimote-modules.c wdata->extension.input->id.bustype = wdata->hdev->bus; wdata 2103 drivers/hid/hid-wiimote-modules.c wdata->extension.input->id.vendor = wdata->hdev->vendor; wdata 2104 drivers/hid/hid-wiimote-modules.c wdata->extension.input->id.product = wdata->hdev->product; wdata 2105 drivers/hid/hid-wiimote-modules.c wdata->extension.input->id.version = wdata->hdev->version; wdata 2106 drivers/hid/hid-wiimote-modules.c wdata->extension.input->name = WIIMOTE_NAME " Drums"; wdata 2108 drivers/hid/hid-wiimote-modules.c set_bit(EV_KEY, wdata->extension.input->evbit); wdata 2109 drivers/hid/hid-wiimote-modules.c set_bit(BTN_START, wdata->extension.input->keybit); wdata 2110 drivers/hid/hid-wiimote-modules.c set_bit(BTN_SELECT, wdata->extension.input->keybit); wdata 2112 drivers/hid/hid-wiimote-modules.c set_bit(EV_ABS, wdata->extension.input->evbit); wdata 2113 drivers/hid/hid-wiimote-modules.c set_bit(ABS_X, wdata->extension.input->absbit); wdata 2114 drivers/hid/hid-wiimote-modules.c set_bit(ABS_Y, wdata->extension.input->absbit); wdata 2115 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT0X, wdata->extension.input->absbit); wdata 2116 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT0Y, wdata->extension.input->absbit); wdata 2117 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT1X, wdata->extension.input->absbit); wdata 2118 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT2X, wdata->extension.input->absbit); wdata 2119 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT2Y, wdata->extension.input->absbit); wdata 2120 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT3X, wdata->extension.input->absbit); wdata 2121 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT3Y, wdata->extension.input->absbit); wdata 2122 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 2124 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 2126 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 2128 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 2130 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 2132 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 2134 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 2136 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 2138 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 2141 drivers/hid/hid-wiimote-modules.c ret = input_register_device(wdata->extension.input); wdata 2148 drivers/hid/hid-wiimote-modules.c input_free_device(wdata->extension.input); wdata 2149 drivers/hid/hid-wiimote-modules.c wdata->extension.input = NULL; wdata 2154 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 2156 drivers/hid/hid-wiimote-modules.c if (!wdata->extension.input) wdata 2159 drivers/hid/hid-wiimote-modules.c input_unregister_device(wdata->extension.input); wdata 2160 drivers/hid/hid-wiimote-modules.c wdata->extension.input = NULL; wdata 2204 drivers/hid/hid-wiimote-modules.c static void wiimod_guitar_in_ext(struct wiimote_data *wdata, const __u8 *ext) wdata 2253 drivers/hid/hid-wiimote-modules.c if (wdata->state.flags & WIIPROTO_FLAG_MP_ACTIVE) { wdata 2259 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, ABS_X, sx - 0x20); wdata 2260 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, ABS_Y, sy - 0x20); wdata 2261 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, ABS_HAT0X, tb); wdata 2262 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->extension.input, ABS_HAT1X, wb - 0x10); wdata 2264 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 2267 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 2270 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 2273 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 2276 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 2279 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 2282 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 2285 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 2288 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, wdata 2292 drivers/hid/hid-wiimote-modules.c input_sync(wdata->extension.input); wdata 2297 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = input_get_drvdata(dev); wdata 2300 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 2301 drivers/hid/hid-wiimote-modules.c wdata->state.flags |= WIIPROTO_FLAG_EXT_USED; wdata 2302 drivers/hid/hid-wiimote-modules.c wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); wdata 2303 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 2310 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = input_get_drvdata(dev); wdata 2313 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 2314 drivers/hid/hid-wiimote-modules.c wdata->state.flags &= ~WIIPROTO_FLAG_EXT_USED; wdata 2315 drivers/hid/hid-wiimote-modules.c wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); wdata 2316 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 2320 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 2324 drivers/hid/hid-wiimote-modules.c wdata->extension.input = input_allocate_device(); wdata 2325 drivers/hid/hid-wiimote-modules.c if (!wdata->extension.input) wdata 2328 drivers/hid/hid-wiimote-modules.c input_set_drvdata(wdata->extension.input, wdata); wdata 2329 drivers/hid/hid-wiimote-modules.c wdata->extension.input->open = wiimod_guitar_open; wdata 2330 drivers/hid/hid-wiimote-modules.c wdata->extension.input->close = wiimod_guitar_close; wdata 2331 drivers/hid/hid-wiimote-modules.c wdata->extension.input->dev.parent = &wdata->hdev->dev; wdata 2332 drivers/hid/hid-wiimote-modules.c wdata->extension.input->id.bustype = wdata->hdev->bus; wdata 2333 drivers/hid/hid-wiimote-modules.c wdata->extension.input->id.vendor = wdata->hdev->vendor; wdata 2334 drivers/hid/hid-wiimote-modules.c wdata->extension.input->id.product = wdata->hdev->product; wdata 2335 drivers/hid/hid-wiimote-modules.c wdata->extension.input->id.version = wdata->hdev->version; wdata 2336 drivers/hid/hid-wiimote-modules.c wdata->extension.input->name = WIIMOTE_NAME " Guitar"; wdata 2338 drivers/hid/hid-wiimote-modules.c set_bit(EV_KEY, wdata->extension.input->evbit); wdata 2341 drivers/hid/hid-wiimote-modules.c wdata->extension.input->keybit); wdata 2343 drivers/hid/hid-wiimote-modules.c set_bit(EV_ABS, wdata->extension.input->evbit); wdata 2344 drivers/hid/hid-wiimote-modules.c set_bit(ABS_X, wdata->extension.input->absbit); wdata 2345 drivers/hid/hid-wiimote-modules.c set_bit(ABS_Y, wdata->extension.input->absbit); wdata 2346 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT0X, wdata->extension.input->absbit); wdata 2347 drivers/hid/hid-wiimote-modules.c set_bit(ABS_HAT1X, wdata->extension.input->absbit); wdata 2348 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 2350 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 2352 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 2354 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->extension.input, wdata 2357 drivers/hid/hid-wiimote-modules.c ret = input_register_device(wdata->extension.input); wdata 2364 drivers/hid/hid-wiimote-modules.c input_free_device(wdata->extension.input); wdata 2365 drivers/hid/hid-wiimote-modules.c wdata->extension.input = NULL; wdata 2370 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 2372 drivers/hid/hid-wiimote-modules.c if (!wdata->extension.input) wdata 2375 drivers/hid/hid-wiimote-modules.c input_unregister_device(wdata->extension.input); wdata 2376 drivers/hid/hid-wiimote-modules.c wdata->extension.input = NULL; wdata 2395 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 2399 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 2400 drivers/hid/hid-wiimote-modules.c wdata->state.flags |= WIIPROTO_FLAG_BUILTIN_MP; wdata 2401 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 2407 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 2411 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 2412 drivers/hid/hid-wiimote-modules.c wdata->state.flags |= WIIPROTO_FLAG_BUILTIN_MP; wdata 2413 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 2431 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 2435 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 2436 drivers/hid/hid-wiimote-modules.c wdata->state.flags |= WIIPROTO_FLAG_NO_MP; wdata 2437 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 2443 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 2447 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 2448 drivers/hid/hid-wiimote-modules.c wdata->state.flags |= WIIPROTO_FLAG_NO_MP; wdata 2449 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 2469 drivers/hid/hid-wiimote-modules.c static void wiimod_mp_in_mp(struct wiimote_data *wdata, const __u8 *ext) wdata 2522 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->mp, ABS_RX, x); wdata 2523 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->mp, ABS_RY, y); wdata 2524 drivers/hid/hid-wiimote-modules.c input_report_abs(wdata->mp, ABS_RZ, z); wdata 2525 drivers/hid/hid-wiimote-modules.c input_sync(wdata->mp); wdata 2530 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = input_get_drvdata(dev); wdata 2533 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 2534 drivers/hid/hid-wiimote-modules.c wdata->state.flags |= WIIPROTO_FLAG_MP_USED; wdata 2535 drivers/hid/hid-wiimote-modules.c wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); wdata 2536 drivers/hid/hid-wiimote-modules.c __wiimote_schedule(wdata); wdata 2537 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 2544 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata = input_get_drvdata(dev); wdata 2547 drivers/hid/hid-wiimote-modules.c spin_lock_irqsave(&wdata->state.lock, flags); wdata 2548 drivers/hid/hid-wiimote-modules.c wdata->state.flags &= ~WIIPROTO_FLAG_MP_USED; wdata 2549 drivers/hid/hid-wiimote-modules.c wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); wdata 2550 drivers/hid/hid-wiimote-modules.c __wiimote_schedule(wdata); wdata 2551 drivers/hid/hid-wiimote-modules.c spin_unlock_irqrestore(&wdata->state.lock, flags); wdata 2555 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 2559 drivers/hid/hid-wiimote-modules.c wdata->mp = input_allocate_device(); wdata 2560 drivers/hid/hid-wiimote-modules.c if (!wdata->mp) wdata 2563 drivers/hid/hid-wiimote-modules.c input_set_drvdata(wdata->mp, wdata); wdata 2564 drivers/hid/hid-wiimote-modules.c wdata->mp->open = wiimod_mp_open; wdata 2565 drivers/hid/hid-wiimote-modules.c wdata->mp->close = wiimod_mp_close; wdata 2566 drivers/hid/hid-wiimote-modules.c wdata->mp->dev.parent = &wdata->hdev->dev; wdata 2567 drivers/hid/hid-wiimote-modules.c wdata->mp->id.bustype = wdata->hdev->bus; wdata 2568 drivers/hid/hid-wiimote-modules.c wdata->mp->id.vendor = wdata->hdev->vendor; wdata 2569 drivers/hid/hid-wiimote-modules.c wdata->mp->id.product = wdata->hdev->product; wdata 2570 drivers/hid/hid-wiimote-modules.c wdata->mp->id.version = wdata->hdev->version; wdata 2571 drivers/hid/hid-wiimote-modules.c wdata->mp->name = WIIMOTE_NAME " Motion Plus"; wdata 2573 drivers/hid/hid-wiimote-modules.c set_bit(EV_ABS, wdata->mp->evbit); wdata 2574 drivers/hid/hid-wiimote-modules.c set_bit(ABS_RX, wdata->mp->absbit); wdata 2575 drivers/hid/hid-wiimote-modules.c set_bit(ABS_RY, wdata->mp->absbit); wdata 2576 drivers/hid/hid-wiimote-modules.c set_bit(ABS_RZ, wdata->mp->absbit); wdata 2577 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->mp, wdata 2579 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->mp, wdata 2581 drivers/hid/hid-wiimote-modules.c input_set_abs_params(wdata->mp, wdata 2584 drivers/hid/hid-wiimote-modules.c ret = input_register_device(wdata->mp); wdata 2591 drivers/hid/hid-wiimote-modules.c input_free_device(wdata->mp); wdata 2592 drivers/hid/hid-wiimote-modules.c wdata->mp = NULL; wdata 2597 drivers/hid/hid-wiimote-modules.c struct wiimote_data *wdata) wdata 2599 drivers/hid/hid-wiimote-modules.c if (!wdata->mp) wdata 2602 drivers/hid/hid-wiimote-modules.c input_unregister_device(wdata->mp); wdata 2603 drivers/hid/hid-wiimote-modules.c wdata->mp = NULL; wdata 191 drivers/hid/hid-wiimote.h struct wiimote_data *wdata); wdata 193 drivers/hid/hid-wiimote.h struct wiimote_data *wdata); wdata 195 drivers/hid/hid-wiimote.h void (*in_keys) (struct wiimote_data *wdata, const __u8 *keys); wdata 196 drivers/hid/hid-wiimote.h void (*in_accel) (struct wiimote_data *wdata, const __u8 *accel); wdata 197 drivers/hid/hid-wiimote.h void (*in_ir) (struct wiimote_data *wdata, const __u8 *ir, bool packed, wdata 199 drivers/hid/hid-wiimote.h void (*in_mp) (struct wiimote_data *wdata, const __u8 *mp); wdata 200 drivers/hid/hid-wiimote.h void (*in_ext) (struct wiimote_data *wdata, const __u8 *ext); wdata 261 drivers/hid/hid-wiimote.h void __wiimote_schedule(struct wiimote_data *wdata); wdata 263 drivers/hid/hid-wiimote.h extern void wiiproto_req_drm(struct wiimote_data *wdata, __u8 drm); wdata 264 drivers/hid/hid-wiimote.h extern void wiiproto_req_rumble(struct wiimote_data *wdata, __u8 rumble); wdata 265 drivers/hid/hid-wiimote.h extern void wiiproto_req_leds(struct wiimote_data *wdata, int leds); wdata 266 drivers/hid/hid-wiimote.h extern void wiiproto_req_status(struct wiimote_data *wdata); wdata 267 drivers/hid/hid-wiimote.h extern void wiiproto_req_accel(struct wiimote_data *wdata, __u8 accel); wdata 268 drivers/hid/hid-wiimote.h extern void wiiproto_req_ir1(struct wiimote_data *wdata, __u8 flags); wdata 269 drivers/hid/hid-wiimote.h extern void wiiproto_req_ir2(struct wiimote_data *wdata, __u8 flags); wdata 270 drivers/hid/hid-wiimote.h extern int wiimote_cmd_write(struct wiimote_data *wdata, __u32 offset, wdata 272 drivers/hid/hid-wiimote.h extern ssize_t wiimote_cmd_read(struct wiimote_data *wdata, __u32 offset, wdata 275 drivers/hid/hid-wiimote.h #define wiiproto_req_rreg(wdata, os, sz) \ wdata 276 drivers/hid/hid-wiimote.h wiiproto_req_rmem((wdata), false, (os), (sz)) wdata 277 drivers/hid/hid-wiimote.h #define wiiproto_req_reeprom(wdata, os, sz) \ wdata 278 drivers/hid/hid-wiimote.h wiiproto_req_rmem((wdata), true, (os), (sz)) wdata 279 drivers/hid/hid-wiimote.h extern void wiiproto_req_rmem(struct wiimote_data *wdata, bool eeprom, wdata 284 drivers/hid/hid-wiimote.h extern int wiidebug_init(struct wiimote_data *wdata); wdata 285 drivers/hid/hid-wiimote.h extern void wiidebug_deinit(struct wiimote_data *wdata); wdata 295 drivers/hid/hid-wiimote.h static inline bool wiimote_cmd_pending(struct wiimote_data *wdata, int cmd, wdata 298 drivers/hid/hid-wiimote.h return wdata->state.cmd == cmd && wdata->state.opt == opt; wdata 302 drivers/hid/hid-wiimote.h static inline void wiimote_cmd_complete(struct wiimote_data *wdata) wdata 304 drivers/hid/hid-wiimote.h wdata->state.cmd = WIIPROTO_REQ_NULL; wdata 305 drivers/hid/hid-wiimote.h complete(&wdata->state.ready); wdata 309 drivers/hid/hid-wiimote.h static inline void wiimote_cmd_abort(struct wiimote_data *wdata) wdata 314 drivers/hid/hid-wiimote.h wdata->state.cmd = WIIPROTO_REQ_MAX; wdata 315 drivers/hid/hid-wiimote.h complete(&wdata->state.ready); wdata 318 drivers/hid/hid-wiimote.h static inline int wiimote_cmd_acquire(struct wiimote_data *wdata) wdata 320 drivers/hid/hid-wiimote.h return mutex_lock_interruptible(&wdata->state.sync) ? -ERESTARTSYS : 0; wdata 323 drivers/hid/hid-wiimote.h static inline void wiimote_cmd_acquire_noint(struct wiimote_data *wdata) wdata 325 drivers/hid/hid-wiimote.h mutex_lock(&wdata->state.sync); wdata 329 drivers/hid/hid-wiimote.h static inline void wiimote_cmd_set(struct wiimote_data *wdata, int cmd, wdata 332 drivers/hid/hid-wiimote.h reinit_completion(&wdata->state.ready); wdata 333 drivers/hid/hid-wiimote.h wdata->state.cmd = cmd; wdata 334 drivers/hid/hid-wiimote.h wdata->state.opt = opt; wdata 337 drivers/hid/hid-wiimote.h static inline void wiimote_cmd_release(struct wiimote_data *wdata) wdata 339 drivers/hid/hid-wiimote.h mutex_unlock(&wdata->state.sync); wdata 342 drivers/hid/hid-wiimote.h static inline int wiimote_cmd_wait(struct wiimote_data *wdata) wdata 350 drivers/hid/hid-wiimote.h ret = wait_for_completion_interruptible_timeout(&wdata->state.ready, HZ); wdata 355 drivers/hid/hid-wiimote.h else if (wdata->state.cmd != WIIPROTO_REQ_NULL) wdata 361 drivers/hid/hid-wiimote.h static inline int wiimote_cmd_wait_noint(struct wiimote_data *wdata) wdata 366 drivers/hid/hid-wiimote.h ret = wait_for_completion_timeout(&wdata->state.ready, HZ); wdata 369 drivers/hid/hid-wiimote.h else if (wdata->state.cmd != WIIPROTO_REQ_NULL) wdata 27 drivers/i2c/i2c-core-acpi.c u16 wdata; wdata 653 drivers/i2c/i2c-core-acpi.c gsb->wdata = status; wdata 658 drivers/i2c/i2c-core-acpi.c gsb->wdata); wdata 238 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c __le16 wdata; wdata 272 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c wdata = cpu_to_le16(fifo_watermark); wdata 275 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c &wdata, sizeof(wdata)); wdata 1744 drivers/media/dvb-frontends/drx39xyj/drx_driver.h u8 wdata, /* data to write */ wdata 1763 drivers/media/dvb-frontends/drx39xyj/drx_driver.h u16 wdata, /* data to write */ wdata 1782 drivers/media/dvb-frontends/drx39xyj/drx_driver.h u32 wdata, /* data to write */ wdata 542 drivers/media/dvb-frontends/drx39xyj/drxj.c u16 wdata, u16 *rdata); wdata 1765 drivers/media/dvb-frontends/drx39xyj/drxj.c u16 wdata, u16 *rdata) wdata 1773 drivers/media/dvb-frontends/drx39xyj/drxj.c rc = drxdap_fasi_write_reg16(dev_addr, waddr, wdata, DRXDAP_FASI_RMW); wdata 1838 drivers/media/dvb-frontends/drx39xyj/drxj.c u16 wdata, u16 *rdata) wdata 1852 drivers/media/dvb-frontends/drx39xyj/drxj.c rc = drxdap_fasi_write_reg16(dev_addr, waddr, wdata, wdata 1876 drivers/media/dvb-frontends/drx39xyj/drxj.c u16 wdata, u16 *rdata) wdata 1884 drivers/media/dvb-frontends/drx39xyj/drxj.c raddr, wdata, rdata); wdata 1886 drivers/media/dvb-frontends/drx39xyj/drxj.c return drxj_dap_rm_write_reg16short(dev_addr, waddr, raddr, wdata, rdata); wdata 72 drivers/media/pci/cx23885/cx23885-i2c.c u32 wdata, addr, ctrl; wdata 97 drivers/media/pci/cx23885/cx23885-i2c.c wdata = msg->buf[0]; wdata 106 drivers/media/pci/cx23885/cx23885-i2c.c cx_write(bus->reg_wdata, wdata); wdata 119 drivers/media/pci/cx23885/cx23885-i2c.c wdata = msg->buf[cnt]; wdata 128 drivers/media/pci/cx23885/cx23885-i2c.c cx_write(bus->reg_wdata, wdata); wdata 71 drivers/media/pci/cx25821/cx25821-i2c.c u32 wdata, addr, ctrl; wdata 97 drivers/media/pci/cx25821/cx25821-i2c.c wdata = msg->buf[0]; wdata 107 drivers/media/pci/cx25821/cx25821-i2c.c cx_write(bus->reg_wdata, wdata); wdata 124 drivers/media/pci/cx25821/cx25821-i2c.c wdata = msg->buf[cnt]; wdata 133 drivers/media/pci/cx25821/cx25821-i2c.c cx_write(bus->reg_wdata, wdata); wdata 308 drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c u8 index, u8 *wdata) wdata 310 drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c int ret = mxl111sf_ctrl_msg(state, wdata[0], wdata 311 drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c &wdata[1], 25, NULL, 0); wdata 318 drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c u8 index, u8 *wdata, u8 *rdata) wdata 320 drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c int ret = mxl111sf_ctrl_msg(state, wdata[0], wdata 321 drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c &wdata[1], 25, rdata, 24); wdata 51 drivers/media/usb/hdpvr/hdpvr-i2c.c unsigned char addr, char *wdata, int wlen, wdata 60 drivers/media/usb/hdpvr/hdpvr-i2c.c memcpy(dev->i2c_buf, wdata, wlen); wdata 164 drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c u8 *wdata, wdata 170 drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c if (!wdata) wlen = 0; wdata 172 drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c return pvr2_i2c_read(hdw,i2c_addr,wdata,wlen,rdata,rlen); wdata 174 drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c return pvr2_i2c_write(hdw,i2c_addr,wdata,wlen); wdata 186 drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c u8 i2c_addr,u8 *wdata,u16 wlen,u8 *rdata,u16 rlen) wdata 256 drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c u8 i2c_addr,u8 *wdata,u16 wlen,u8 *rdata,u16 rlen) wdata 262 drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c return pvr2_i2c_basic_op(hdw,i2c_addr,wdata,wlen,rdata,rlen); wdata 269 drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c u8 i2c_addr,u8 *wdata,u16 wlen,u8 *rdata,u16 rlen) wdata 282 drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c u8 i2c_addr,u8 *wdata,u16 wlen,u8 *rdata,u16 rlen) wdata 297 drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c return pvr2_i2c_basic_op(hdw,i2c_addr,wdata,wlen,rdata,rlen); wdata 315 drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c subaddr = (wdata[0] << 8) | wdata[1]; wdata 461 drivers/misc/xilinx_sdfec.c u32 wdata; wdata 476 drivers/misc/xilinx_sdfec.c wdata = k | n; wdata 488 drivers/misc/xilinx_sdfec.c wdata); wdata 495 drivers/misc/xilinx_sdfec.c u32 wdata; wdata 511 drivers/misc/xilinx_sdfec.c wdata = nm | no_packing | psize; wdata 522 drivers/misc/xilinx_sdfec.c wdata); wdata 530 drivers/misc/xilinx_sdfec.c u32 wdata; wdata 562 drivers/misc/xilinx_sdfec.c wdata = (max_schedule | no_final_parity | special_qc | norm_type | wdata 575 drivers/misc/xilinx_sdfec.c wdata); wdata 582 drivers/misc/xilinx_sdfec.c u32 wdata; wdata 584 drivers/misc/xilinx_sdfec.c wdata = ((qc_off << XSDFEC_REG3_QC_OFF_LSB) | wdata 596 drivers/misc/xilinx_sdfec.c wdata); wdata 50 drivers/net/usb/cx82310_eth.c u8 *wdata, int wlen, u8 *rdata, int rlen) wdata 61 drivers/net/usb/cx82310_eth.c if (wdata) wdata 62 drivers/net/usb/cx82310_eth.c memcpy(buf + 4, wdata, min_t(int, wlen, CMD_PACKET_SIZE - 4)); wdata 43 drivers/pinctrl/spear/pinctrl-plgpio.c u32 wdata; /* write data register */ wdata 149 drivers/pinctrl/spear/pinctrl-plgpio.c plgpio->regs.wdata); wdata 152 drivers/pinctrl/spear/pinctrl-plgpio.c plgpio->regs.wdata); wdata 192 drivers/pinctrl/spear/pinctrl-plgpio.c plgpio_reg_set(plgpio->base, offset, plgpio->regs.wdata); wdata 194 drivers/pinctrl/spear/pinctrl-plgpio.c plgpio_reg_reset(plgpio->base, offset, plgpio->regs.wdata); wdata 471 drivers/pinctrl/spear/pinctrl-plgpio.c plgpio->regs.wdata = val; wdata 629 drivers/pinctrl/spear/pinctrl-plgpio.c plgpio->csave_regs[i].wdata = readl_relaxed(plgpio->regs.wdata + wdata 673 drivers/pinctrl/spear/pinctrl-plgpio.c plgpio_prepare_reg(wdata, off, mask, tmp); wdata 678 drivers/pinctrl/spear/pinctrl-plgpio.c writel_relaxed(plgpio->csave_regs[i].wdata, plgpio->regs.wdata + wdata 160 drivers/platform/x86/msi-laptop.c u8 wdata = 0, rdata; wdata 163 drivers/platform/x86/msi-laptop.c result = ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, &wdata, 1, wdata 173 drivers/platform/x86/msi-laptop.c u8 wdata = 4, rdata; wdata 176 drivers/platform/x86/msi-laptop.c result = ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, &wdata, 1, wdata 186 drivers/platform/x86/msi-laptop.c u8 wdata[2], rdata; wdata 189 drivers/platform/x86/msi-laptop.c wdata[0] = 4; wdata 191 drivers/platform/x86/msi-laptop.c result = ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, wdata, 1, wdata 196 drivers/platform/x86/msi-laptop.c wdata[0] = 0x84; wdata 197 drivers/platform/x86/msi-laptop.c wdata[1] = (rdata & 0xF7) | (enable ? 8 : 0); wdata 199 drivers/platform/x86/msi-laptop.c return ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, wdata, 2, wdata 206 drivers/platform/x86/msi-laptop.c u8 wdata = 0, rdata; wdata 223 drivers/platform/x86/msi-laptop.c wdata = rdata & ~mask; wdata 225 drivers/platform/x86/msi-laptop.c wdata = rdata | mask; wdata 227 drivers/platform/x86/msi-laptop.c result = ec_write(MSI_STANDARD_EC_COMMAND_ADDRESS, wdata); wdata 237 drivers/platform/x86/msi-laptop.c u8 wdata = 0, rdata; wdata 240 drivers/platform/x86/msi-laptop.c result = ec_transaction(MSI_EC_COMMAND_WIRELESS, &wdata, 1, &rdata, 1); wdata 139 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_task_work(struct work_struct *wdata); wdata 3315 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_task_work(struct work_struct *wdata) wdata 3328 drivers/scsi/qla4xxx/ql4_os.c task_data = container_of(wdata, struct ql4_task_data, task_work); wdata 969 drivers/soc/mediatek/mtk-pmic-wrap.c int (*pwrap_write)(struct pmic_wrapper *wrp, u32 adr, u32 wdata); wdata 1122 drivers/soc/mediatek/mtk-pmic-wrap.c static int pwrap_write16(struct pmic_wrapper *wrp, u32 adr, u32 wdata) wdata 1132 drivers/soc/mediatek/mtk-pmic-wrap.c pwrap_writel(wrp, (1 << 31) | ((adr >> 1) << 16) | wdata, wdata 1138 drivers/soc/mediatek/mtk-pmic-wrap.c static int pwrap_write32(struct pmic_wrapper *wrp, u32 adr, u32 wdata) wdata 1150 drivers/soc/mediatek/mtk-pmic-wrap.c ((wdata >> (msb * 16)) & 0xffff), wdata 1167 drivers/soc/mediatek/mtk-pmic-wrap.c static int pwrap_write(struct pmic_wrapper *wrp, u32 adr, u32 wdata) wdata 1169 drivers/soc/mediatek/mtk-pmic-wrap.c return wrp->slave->pwrap_write(wrp, adr, wdata); wdata 1177 drivers/soc/mediatek/mtk-pmic-wrap.c static int pwrap_regmap_write(void *context, u32 adr, u32 wdata) wdata 1179 drivers/soc/mediatek/mtk-pmic-wrap.c return pwrap_write(context, adr, wdata); wdata 194 drivers/staging/comedi/drivers/s626.c u16 wdata) wdata 198 drivers/staging/comedi/drivers/s626.c writel(wdata, dev->mmio + S626_P_DEBIAD); wdata 210 drivers/staging/comedi/drivers/s626.c unsigned int mask, unsigned int wdata) wdata 221 drivers/staging/comedi/drivers/s626.c val |= wdata; wdata 4463 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c union iwreq_data *wdata, char *extra) wdata 4471 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c union iwreq_data *wdata, char *extra) wdata 4916 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c union iwreq_data wdata; wdata 4919 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c memcpy(&wdata, wrq_data, sizeof(wdata)); wdata 4925 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c if (copy_from_user(input, wdata.data.pointer, input_len)) { wdata 5009 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c wdata.data.length = count; wdata 5010 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c if (wdata.data.length > (priv_args[k].set_args & IW_PRIV_SIZE_MASK)) wdata 5011 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c wdata.data.length = priv_args[k].set_args & IW_PRIV_SIZE_MASK; wdata 5027 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c wdata.data.length = count; wdata 5028 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c if (wdata.data.length > (priv_args[k].set_args & IW_PRIV_SIZE_MASK)) wdata 5029 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c wdata.data.length = priv_args[k].set_args & IW_PRIV_SIZE_MASK; wdata 5036 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c wdata.data.length = len; wdata 5037 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c if (wdata.data.length > (priv_args[k].set_args & IW_PRIV_SIZE_MASK)) wdata 5038 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c wdata.data.length = priv_args[k].set_args & IW_PRIV_SIZE_MASK; wdata 5041 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c memcpy(buffer, ptr, wdata.data.length); wdata 5043 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c wdata.data.length = 1; wdata 5046 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c buffer_len = wdata.data.length; wdata 5056 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c (wdata.data.length != (priv_args[k].set_args & IW_PRIV_SIZE_MASK))) { wdata 5063 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c wdata.data.length = 0L; wdata 5072 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c wdata.mode = subcmd; wdata 5073 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c memcpy(wdata.name + offset, buffer, IFNAMSIZ - offset); wdata 5080 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c wdata.mode = subcmd; wdata 5083 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c if (copy_to_user(wdata.data.pointer, buffer, buffer_len)) { wdata 5087 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c wdata.data.flags = subcmd; wdata 5114 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c extra = (u8 *)&wdata; wdata 5121 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c err = handler(dev, NULL, &wdata, extra); wdata 5135 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c n = wdata.data.length; wdata 194 drivers/usb/atm/cxacru.c u8 *wdata, int wsize, u8 *rdata, int rsize); wdata 610 drivers/usb/atm/cxacru.c u8 *wdata, int wsize, u8 *rdata, int rsize) wdata 645 drivers/usb/atm/cxacru.c memcpy(wbuf + offb + 4, wdata + offd, min_t(int, stride, wsize - offd)); wdata 556 fs/cifs/cifsproto.h int cifs_async_writev(struct cifs_writedata *wdata, wdata 2047 fs/cifs/cifssmb.c struct cifs_writedata *wdata = container_of(refcount, wdata 2050 fs/cifs/cifssmb.c if (wdata->mr) { wdata 2051 fs/cifs/cifssmb.c smbd_deregister_mr(wdata->mr); wdata 2052 fs/cifs/cifssmb.c wdata->mr = NULL; wdata 2056 fs/cifs/cifssmb.c if (wdata->cfile) wdata 2057 fs/cifs/cifssmb.c cifsFileInfo_put(wdata->cfile); wdata 2059 fs/cifs/cifssmb.c kvfree(wdata->pages); wdata 2060 fs/cifs/cifssmb.c kfree(wdata); wdata 2068 fs/cifs/cifssmb.c cifs_writev_requeue(struct cifs_writedata *wdata) wdata 2071 fs/cifs/cifssmb.c struct inode *inode = d_inode(wdata->cfile->dentry); wdata 2075 fs/cifs/cifssmb.c server = tlink_tcon(wdata->cfile->tlink)->ses->server; wdata 2077 fs/cifs/cifssmb.c rest_len = wdata->bytes; wdata 2104 fs/cifs/cifssmb.c wdata2->pages[j] = wdata->pages[i + j]; wdata 2109 fs/cifs/cifssmb.c wdata2->sync_mode = wdata->sync_mode; wdata 2148 fs/cifs/cifssmb.c } while (i < wdata->nr_pages); wdata 2151 fs/cifs/cifssmb.c for (; i < wdata->nr_pages; i++) { wdata 2152 fs/cifs/cifssmb.c SetPageError(wdata->pages[i]); wdata 2153 fs/cifs/cifssmb.c end_page_writeback(wdata->pages[i]); wdata 2154 fs/cifs/cifssmb.c put_page(wdata->pages[i]); wdata 2159 fs/cifs/cifssmb.c kref_put(&wdata->refcount, cifs_writedata_release); wdata 2165 fs/cifs/cifssmb.c struct cifs_writedata *wdata = container_of(work, wdata 2167 fs/cifs/cifssmb.c struct inode *inode = d_inode(wdata->cfile->dentry); wdata 2170 fs/cifs/cifssmb.c if (wdata->result == 0) { wdata 2172 fs/cifs/cifssmb.c cifs_update_eof(CIFS_I(inode), wdata->offset, wdata->bytes); wdata 2174 fs/cifs/cifssmb.c cifs_stats_bytes_written(tlink_tcon(wdata->cfile->tlink), wdata 2175 fs/cifs/cifssmb.c wdata->bytes); wdata 2176 fs/cifs/cifssmb.c } else if (wdata->sync_mode == WB_SYNC_ALL && wdata->result == -EAGAIN) wdata 2177 fs/cifs/cifssmb.c return cifs_writev_requeue(wdata); wdata 2179 fs/cifs/cifssmb.c for (i = 0; i < wdata->nr_pages; i++) { wdata 2180 fs/cifs/cifssmb.c struct page *page = wdata->pages[i]; wdata 2181 fs/cifs/cifssmb.c if (wdata->result == -EAGAIN) wdata 2183 fs/cifs/cifssmb.c else if (wdata->result < 0) wdata 2188 fs/cifs/cifssmb.c if (wdata->result != -EAGAIN) wdata 2189 fs/cifs/cifssmb.c mapping_set_error(inode->i_mapping, wdata->result); wdata 2190 fs/cifs/cifssmb.c kref_put(&wdata->refcount, cifs_writedata_release); wdata 2207 fs/cifs/cifssmb.c struct cifs_writedata *wdata; wdata 2209 fs/cifs/cifssmb.c wdata = kzalloc(sizeof(*wdata), GFP_NOFS); wdata 2210 fs/cifs/cifssmb.c if (wdata != NULL) { wdata 2211 fs/cifs/cifssmb.c wdata->pages = pages; wdata 2212 fs/cifs/cifssmb.c kref_init(&wdata->refcount); wdata 2213 fs/cifs/cifssmb.c INIT_LIST_HEAD(&wdata->list); wdata 2214 fs/cifs/cifssmb.c init_completion(&wdata->done); wdata 2215 fs/cifs/cifssmb.c INIT_WORK(&wdata->work, complete); wdata 2217 fs/cifs/cifssmb.c return wdata; wdata 2227 fs/cifs/cifssmb.c struct cifs_writedata *wdata = mid->callback_data; wdata 2228 fs/cifs/cifssmb.c struct cifs_tcon *tcon = tlink_tcon(wdata->cfile->tlink); wdata 2235 fs/cifs/cifssmb.c wdata->result = cifs_check_receive(mid, tcon->ses->server, 0); wdata 2236 fs/cifs/cifssmb.c if (wdata->result != 0) wdata 2248 fs/cifs/cifssmb.c if (written > wdata->bytes) wdata 2251 fs/cifs/cifssmb.c if (written < wdata->bytes) wdata 2252 fs/cifs/cifssmb.c wdata->result = -ENOSPC; wdata 2254 fs/cifs/cifssmb.c wdata->bytes = written; wdata 2258 fs/cifs/cifssmb.c wdata->result = -EAGAIN; wdata 2261 fs/cifs/cifssmb.c wdata->result = -EIO; wdata 2265 fs/cifs/cifssmb.c queue_work(cifsiod_wq, &wdata->work); wdata 2272 fs/cifs/cifssmb.c cifs_async_writev(struct cifs_writedata *wdata, wdata 2278 fs/cifs/cifssmb.c struct cifs_tcon *tcon = tlink_tcon(wdata->cfile->tlink); wdata 2286 fs/cifs/cifssmb.c if (wdata->offset >> 32 > 0) { wdata 2296 fs/cifs/cifssmb.c smb->hdr.Pid = cpu_to_le16((__u16)wdata->pid); wdata 2297 fs/cifs/cifssmb.c smb->hdr.PidHigh = cpu_to_le16((__u16)(wdata->pid >> 16)); wdata 2300 fs/cifs/cifssmb.c smb->Fid = wdata->cfile->fid.netfid; wdata 2301 fs/cifs/cifssmb.c smb->OffsetLow = cpu_to_le32(wdata->offset & 0xFFFFFFFF); wdata 2303 fs/cifs/cifssmb.c smb->OffsetHigh = cpu_to_le32(wdata->offset >> 32); wdata 2319 fs/cifs/cifssmb.c rqst.rq_pages = wdata->pages; wdata 2320 fs/cifs/cifssmb.c rqst.rq_offset = wdata->page_offset; wdata 2321 fs/cifs/cifssmb.c rqst.rq_npages = wdata->nr_pages; wdata 2322 fs/cifs/cifssmb.c rqst.rq_pagesz = wdata->pagesz; wdata 2323 fs/cifs/cifssmb.c rqst.rq_tailsz = wdata->tailsz; wdata 2326 fs/cifs/cifssmb.c wdata->offset, wdata->bytes); wdata 2328 fs/cifs/cifssmb.c smb->DataLengthLow = cpu_to_le16(wdata->bytes & 0xFFFF); wdata 2329 fs/cifs/cifssmb.c smb->DataLengthHigh = cpu_to_le16(wdata->bytes >> 16); wdata 2332 fs/cifs/cifssmb.c inc_rfc1001_len(&smb->hdr, wdata->bytes + 1); wdata 2333 fs/cifs/cifssmb.c put_bcc(wdata->bytes + 1, &smb->hdr); wdata 2338 fs/cifs/cifssmb.c inc_rfc1001_len(&smbw->hdr, wdata->bytes + 5); wdata 2339 fs/cifs/cifssmb.c put_bcc(wdata->bytes + 5, &smbw->hdr); wdata 2343 fs/cifs/cifssmb.c kref_get(&wdata->refcount); wdata 2345 fs/cifs/cifssmb.c cifs_writev_callback, NULL, wdata, 0, NULL); wdata 2350 fs/cifs/cifssmb.c kref_put(&wdata->refcount, release); wdata 2157 fs/cifs/file.c struct cifs_writedata *wdata; wdata 2159 fs/cifs/file.c wdata = cifs_writedata_alloc((unsigned int)tofind, wdata 2161 fs/cifs/file.c if (!wdata) wdata 2165 fs/cifs/file.c PAGECACHE_TAG_DIRTY, tofind, wdata->pages); wdata 2166 fs/cifs/file.c return wdata; wdata 2170 fs/cifs/file.c wdata_prepare_pages(struct cifs_writedata *wdata, unsigned int found_pages, wdata 2179 fs/cifs/file.c page = wdata->pages[i]; wdata 2230 fs/cifs/file.c wdata->pages[i] = page; wdata 2237 fs/cifs/file.c *index = wdata->pages[0]->index + 1; wdata 2241 fs/cifs/file.c put_page(wdata->pages[i]); wdata 2242 fs/cifs/file.c wdata->pages[i] = NULL; wdata 2249 fs/cifs/file.c wdata_send_pages(struct cifs_writedata *wdata, unsigned int nr_pages, wdata 2254 fs/cifs/file.c tlink_tcon(wdata->cfile->tlink)->ses->server; wdata 2256 fs/cifs/file.c wdata->sync_mode = wbc->sync_mode; wdata 2257 fs/cifs/file.c wdata->nr_pages = nr_pages; wdata 2258 fs/cifs/file.c wdata->offset = page_offset(wdata->pages[0]); wdata 2259 fs/cifs/file.c wdata->pagesz = PAGE_SIZE; wdata 2260 fs/cifs/file.c wdata->tailsz = min(i_size_read(mapping->host) - wdata 2261 fs/cifs/file.c page_offset(wdata->pages[nr_pages - 1]), wdata 2263 fs/cifs/file.c wdata->bytes = ((nr_pages - 1) * PAGE_SIZE) + wdata->tailsz; wdata 2264 fs/cifs/file.c wdata->pid = wdata->cfile->pid; wdata 2266 fs/cifs/file.c rc = adjust_credits(server, &wdata->credits, wdata->bytes); wdata 2270 fs/cifs/file.c if (wdata->cfile->invalidHandle) wdata 2273 fs/cifs/file.c rc = server->ops->async_writev(wdata, cifs_writedata_release); wdata 2286 fs/cifs/file.c struct cifs_writedata *wdata; wdata 2337 fs/cifs/file.c wdata = wdata_alloc_and_fillpages(tofind, mapping, end, &index, wdata 2339 fs/cifs/file.c if (!wdata) { wdata 2347 fs/cifs/file.c kref_put(&wdata->refcount, cifs_writedata_release); wdata 2352 fs/cifs/file.c nr_pages = wdata_prepare_pages(wdata, found_pages, mapping, wbc, wdata 2357 fs/cifs/file.c kref_put(&wdata->refcount, cifs_writedata_release); wdata 2362 fs/cifs/file.c wdata->credits = credits_on_stack; wdata 2363 fs/cifs/file.c wdata->cfile = cfile; wdata 2366 fs/cifs/file.c if (!wdata->cfile) { wdata 2374 fs/cifs/file.c rc = wdata_send_pages(wdata, nr_pages, mapping, wbc); wdata 2377 fs/cifs/file.c unlock_page(wdata->pages[i]); wdata 2381 fs/cifs/file.c add_credits_and_wake_if(server, &wdata->credits, 0); wdata 2385 fs/cifs/file.c wdata->pages[i]); wdata 2387 fs/cifs/file.c SetPageError(wdata->pages[i]); wdata 2388 fs/cifs/file.c end_page_writeback(wdata->pages[i]); wdata 2389 fs/cifs/file.c put_page(wdata->pages[i]); wdata 2394 fs/cifs/file.c kref_put(&wdata->refcount, cifs_writedata_release); wdata 2682 fs/cifs/file.c struct cifs_writedata *wdata = container_of(refcount, wdata 2685 fs/cifs/file.c kref_put(&wdata->ctx->refcount, cifs_aio_ctx_release); wdata 2686 fs/cifs/file.c for (i = 0; i < wdata->nr_pages; i++) wdata 2687 fs/cifs/file.c put_page(wdata->pages[i]); wdata 2696 fs/cifs/file.c struct cifs_writedata *wdata = container_of(work, wdata 2698 fs/cifs/file.c struct inode *inode = d_inode(wdata->cfile->dentry); wdata 2702 fs/cifs/file.c cifs_update_eof(cifsi, wdata->offset, wdata->bytes); wdata 2707 fs/cifs/file.c complete(&wdata->done); wdata 2708 fs/cifs/file.c collect_uncached_write_data(wdata->ctx); wdata 2710 fs/cifs/file.c kref_put(&wdata->refcount, cifs_uncached_writedata_release); wdata 2714 fs/cifs/file.c wdata_fill_from_iovec(struct cifs_writedata *wdata, struct iov_iter *from, wdata 2723 fs/cifs/file.c copied = copy_page_from_iter(wdata->pages[i], 0, bytes, from); wdata 2756 fs/cifs/file.c cifs_resend_wdata(struct cifs_writedata *wdata, struct list_head *wdata_list, wdata 2763 fs/cifs/file.c tlink_tcon(wdata->cfile->tlink)->ses->server; wdata 2766 fs/cifs/file.c if (wdata->cfile->invalidHandle) { wdata 2767 fs/cifs/file.c rc = cifs_reopen_file(wdata->cfile, false); wdata 2781 fs/cifs/file.c rc = server->ops->wait_mtu_credits(server, wdata->bytes, wdata 2786 fs/cifs/file.c if (wsize < wdata->bytes) { wdata 2790 fs/cifs/file.c } while (wsize < wdata->bytes); wdata 2791 fs/cifs/file.c wdata->credits = credits; wdata 2793 fs/cifs/file.c rc = adjust_credits(server, &wdata->credits, wdata->bytes); wdata 2796 fs/cifs/file.c if (wdata->cfile->invalidHandle) wdata 2799 fs/cifs/file.c rc = server->ops->async_writev(wdata, wdata 2805 fs/cifs/file.c list_add_tail(&wdata->list, wdata_list); wdata 2810 fs/cifs/file.c add_credits_and_wake_if(server, &wdata->credits, 0); wdata 2814 fs/cifs/file.c kref_put(&wdata->refcount, cifs_uncached_writedata_release); wdata 2827 fs/cifs/file.c struct cifs_writedata *wdata; wdata 2888 fs/cifs/file.c wdata = cifs_writedata_direct_alloc(pagevec, wdata 2890 fs/cifs/file.c if (!wdata) { wdata 2897 fs/cifs/file.c wdata->page_offset = start; wdata 2898 fs/cifs/file.c wdata->tailsz = wdata 2905 fs/cifs/file.c wdata = cifs_writedata_alloc(nr_pages, wdata 2907 fs/cifs/file.c if (!wdata) { wdata 2913 fs/cifs/file.c rc = cifs_write_allocate_pages(wdata->pages, nr_pages); wdata 2915 fs/cifs/file.c kvfree(wdata->pages); wdata 2916 fs/cifs/file.c kfree(wdata); wdata 2923 fs/cifs/file.c wdata, from, &cur_len, &num_pages); wdata 2926 fs/cifs/file.c put_page(wdata->pages[i]); wdata 2927 fs/cifs/file.c kvfree(wdata->pages); wdata 2928 fs/cifs/file.c kfree(wdata); wdata 2938 fs/cifs/file.c put_page(wdata->pages[nr_pages - 1]); wdata 2940 fs/cifs/file.c wdata->tailsz = cur_len - ((nr_pages - 1) * PAGE_SIZE); wdata 2943 fs/cifs/file.c wdata->sync_mode = WB_SYNC_ALL; wdata 2944 fs/cifs/file.c wdata->nr_pages = nr_pages; wdata 2945 fs/cifs/file.c wdata->offset = (__u64)offset; wdata 2946 fs/cifs/file.c wdata->cfile = cifsFileInfo_get(open_file); wdata 2947 fs/cifs/file.c wdata->pid = pid; wdata 2948 fs/cifs/file.c wdata->bytes = cur_len; wdata 2949 fs/cifs/file.c wdata->pagesz = PAGE_SIZE; wdata 2950 fs/cifs/file.c wdata->credits = credits_on_stack; wdata 2951 fs/cifs/file.c wdata->ctx = ctx; wdata 2954 fs/cifs/file.c rc = adjust_credits(server, &wdata->credits, wdata->bytes); wdata 2957 fs/cifs/file.c if (wdata->cfile->invalidHandle) wdata 2960 fs/cifs/file.c rc = server->ops->async_writev(wdata, wdata 2965 fs/cifs/file.c add_credits_and_wake_if(server, &wdata->credits, 0); wdata 2966 fs/cifs/file.c kref_put(&wdata->refcount, wdata 2976 fs/cifs/file.c list_add_tail(&wdata->list, wdata_list); wdata 2987 fs/cifs/file.c struct cifs_writedata *wdata, *tmp; wdata 3010 fs/cifs/file.c list_for_each_entry_safe(wdata, tmp, &ctx->list, list) { wdata 3012 fs/cifs/file.c if (!try_wait_for_completion(&wdata->done)) { wdata 3017 fs/cifs/file.c if (wdata->result) wdata 3018 fs/cifs/file.c rc = wdata->result; wdata 3020 fs/cifs/file.c ctx->total_len += wdata->bytes; wdata 3028 fs/cifs/file.c list_del_init(&wdata->list); wdata 3032 fs/cifs/file.c wdata, &tmp_list, ctx); wdata 3035 fs/cifs/file.c wdata->offset - ctx->pos); wdata 3037 fs/cifs/file.c rc = cifs_write_from_iter(wdata->offset, wdata 3038 fs/cifs/file.c wdata->bytes, &tmp_from, wdata 3042 fs/cifs/file.c kref_put(&wdata->refcount, wdata 3050 fs/cifs/file.c list_del_init(&wdata->list); wdata 3051 fs/cifs/file.c kref_put(&wdata->refcount, cifs_uncached_writedata_release); wdata 3862 fs/cifs/smb2pdu.c struct cifs_writedata *wdata = mid->callback_data; wdata 3863 fs/cifs/smb2pdu.c struct cifs_tcon *tcon = tlink_tcon(wdata->cfile->tlink); wdata 3873 fs/cifs/smb2pdu.c wdata->result = smb2_check_receive(mid, server, 0); wdata 3874 fs/cifs/smb2pdu.c if (wdata->result != 0) wdata 3884 fs/cifs/smb2pdu.c if (written > wdata->bytes) wdata 3887 fs/cifs/smb2pdu.c if (written < wdata->bytes) wdata 3888 fs/cifs/smb2pdu.c wdata->result = -ENOSPC; wdata 3890 fs/cifs/smb2pdu.c wdata->bytes = written; wdata 3894 fs/cifs/smb2pdu.c wdata->result = -EAGAIN; wdata 3901 fs/cifs/smb2pdu.c wdata->result = -EIO; wdata 3912 fs/cifs/smb2pdu.c if (wdata->mr) { wdata 3913 fs/cifs/smb2pdu.c smbd_deregister_mr(wdata->mr); wdata 3914 fs/cifs/smb2pdu.c wdata->mr = NULL; wdata 3917 fs/cifs/smb2pdu.c if (wdata->result) { wdata 3920 fs/cifs/smb2pdu.c wdata->cfile->fid.persistent_fid, wdata 3921 fs/cifs/smb2pdu.c tcon->tid, tcon->ses->Suid, wdata->offset, wdata 3922 fs/cifs/smb2pdu.c wdata->bytes, wdata->result); wdata 3923 fs/cifs/smb2pdu.c if (wdata->result == -ENOSPC) wdata 3928 fs/cifs/smb2pdu.c wdata->cfile->fid.persistent_fid, wdata 3930 fs/cifs/smb2pdu.c wdata->offset, wdata->bytes); wdata 3932 fs/cifs/smb2pdu.c queue_work(cifsiod_wq, &wdata->work); wdata 3939 fs/cifs/smb2pdu.c smb2_async_writev(struct cifs_writedata *wdata, wdata 3945 fs/cifs/smb2pdu.c struct cifs_tcon *tcon = tlink_tcon(wdata->cfile->tlink); wdata 3959 fs/cifs/smb2pdu.c shdr->ProcessId = cpu_to_le32(wdata->cfile->pid); wdata 3961 fs/cifs/smb2pdu.c req->PersistentFileId = wdata->cfile->fid.persistent_fid; wdata 3962 fs/cifs/smb2pdu.c req->VolatileFileId = wdata->cfile->fid.volatile_fid; wdata 3966 fs/cifs/smb2pdu.c req->Offset = cpu_to_le64(wdata->offset); wdata 3971 fs/cifs/smb2pdu.c trace_smb3_write_enter(0 /* xid */, wdata->cfile->fid.persistent_fid, wdata 3972 fs/cifs/smb2pdu.c tcon->tid, tcon->ses->Suid, wdata->offset, wdata->bytes); wdata 3978 fs/cifs/smb2pdu.c if (server->rdma && !server->sign && wdata->bytes >= wdata 3984 fs/cifs/smb2pdu.c wdata->mr = smbd_register_mr( wdata 3985 fs/cifs/smb2pdu.c server->smbd_conn, wdata->pages, wdata 3986 fs/cifs/smb2pdu.c wdata->nr_pages, wdata->page_offset, wdata 3987 fs/cifs/smb2pdu.c wdata->tailsz, false, need_invalidate); wdata 3988 fs/cifs/smb2pdu.c if (!wdata->mr) { wdata 3994 fs/cifs/smb2pdu.c if (wdata->nr_pages > 1) wdata 3997 fs/cifs/smb2pdu.c (wdata->nr_pages - 1) * wdata->pagesz - wdata 3998 fs/cifs/smb2pdu.c wdata->page_offset + wdata->tailsz wdata 4001 fs/cifs/smb2pdu.c req->RemainingBytes = cpu_to_le32(wdata->tailsz); wdata 4010 fs/cifs/smb2pdu.c v1->offset = cpu_to_le64(wdata->mr->mr->iova); wdata 4011 fs/cifs/smb2pdu.c v1->token = cpu_to_le32(wdata->mr->mr->rkey); wdata 4012 fs/cifs/smb2pdu.c v1->length = cpu_to_le32(wdata->mr->mr->length); wdata 4020 fs/cifs/smb2pdu.c rqst.rq_pages = wdata->pages; wdata 4021 fs/cifs/smb2pdu.c rqst.rq_offset = wdata->page_offset; wdata 4022 fs/cifs/smb2pdu.c rqst.rq_npages = wdata->nr_pages; wdata 4023 fs/cifs/smb2pdu.c rqst.rq_pagesz = wdata->pagesz; wdata 4024 fs/cifs/smb2pdu.c rqst.rq_tailsz = wdata->tailsz; wdata 4026 fs/cifs/smb2pdu.c if (wdata->mr) { wdata 4032 fs/cifs/smb2pdu.c wdata->offset, wdata->bytes); wdata 4036 fs/cifs/smb2pdu.c if (!wdata->mr) wdata 4037 fs/cifs/smb2pdu.c req->Length = cpu_to_le32(wdata->bytes); wdata 4039 fs/cifs/smb2pdu.c req->Length = cpu_to_le32(wdata->bytes); wdata 4042 fs/cifs/smb2pdu.c if (wdata->credits.value > 0) { wdata 4043 fs/cifs/smb2pdu.c shdr->CreditCharge = cpu_to_le16(DIV_ROUND_UP(wdata->bytes, wdata 4048 fs/cifs/smb2pdu.c rc = adjust_credits(server, &wdata->credits, wdata->bytes); wdata 4055 fs/cifs/smb2pdu.c kref_get(&wdata->refcount); wdata 4057 fs/cifs/smb2pdu.c wdata, flags, &wdata->credits); wdata 4061 fs/cifs/smb2pdu.c tcon->tid, tcon->ses->Suid, wdata->offset, wdata 4062 fs/cifs/smb2pdu.c wdata->bytes, rc); wdata 4063 fs/cifs/smb2pdu.c kref_put(&wdata->refcount, release); wdata 188 fs/cifs/smb2proto.h extern int smb2_async_writev(struct cifs_writedata *wdata, wdata 412 fs/nfs/filelayout/filelayout.c struct nfs_commit_data *wdata = data; wdata 414 fs/nfs/filelayout/filelayout.c nfs4_setup_sequence(wdata->ds_clp, wdata 415 fs/nfs/filelayout/filelayout.c &wdata->args.seq_args, wdata 416 fs/nfs/filelayout/filelayout.c &wdata->res.seq_res, wdata 1703 fs/nfs/flexfilelayout/flexfilelayout.c struct nfs_commit_data *wdata = data; wdata 1705 fs/nfs/flexfilelayout/flexfilelayout.c if (nfs4_setup_sequence(wdata->ds_clp, wdata 1706 fs/nfs/flexfilelayout/flexfilelayout.c &wdata->args.seq_args, wdata 1707 fs/nfs/flexfilelayout/flexfilelayout.c &wdata->res.seq_res, wdata 44 fs/nfs/pnfs_nfs.c struct nfs_commit_data *wdata = data; wdata 47 fs/nfs/pnfs_nfs.c wdata->mds_ops->rpc_call_done(task, data); wdata 357 include/linux/acpi.h const u8 *wdata, unsigned wdata_len, wdata 169 sound/pci/trident/trident_main.c unsigned short wdata) wdata 176 sound/pci/trident/trident_main.c data = ((unsigned long) wdata) << 16; wdata 41 sound/ppc/daca.c unsigned short wdata = 0x00; wdata 48 sound/ppc/daca.c 2, (unsigned char*)&wdata); wdata 1760 sound/soc/sof/topology.c struct sof_widget_data *wdata, wdata 1777 sound/soc/sof/topology.c wdata[i].control = sm->dobj.private; wdata 1781 sound/soc/sof/topology.c wdata[i].control = sbe->dobj.private; wdata 1785 sound/soc/sof/topology.c wdata[i].control = se->dobj.private; wdata 1794 sound/soc/sof/topology.c if (!wdata[i].control) { wdata 1800 sound/soc/sof/topology.c wdata[i].pdata = wdata[i].control->control_data->data; wdata 1801 sound/soc/sof/topology.c if (!wdata[i].pdata) wdata 1805 sound/soc/sof/topology.c if (wdata[i].pdata->magic != SOF_ABI_MAGIC) wdata 1808 sound/soc/sof/topology.c *size += wdata[i].pdata->size; wdata 1811 sound/soc/sof/topology.c switch (wdata[i].control->cmd) { wdata 1815 sound/soc/sof/topology.c wdata[i].ipc_cmd = SOF_IPC_COMP_SET_VALUE; wdata 1816 sound/soc/sof/topology.c wdata[i].ctrl_type = SOF_CTRL_TYPE_VALUE_CHAN_SET; wdata 1819 sound/soc/sof/topology.c wdata[i].ipc_cmd = SOF_IPC_COMP_SET_DATA; wdata 1820 sound/soc/sof/topology.c wdata[i].ctrl_type = SOF_CTRL_TYPE_DATA_SET; wdata 1840 sound/soc/sof/topology.c struct sof_widget_data *wdata = NULL; wdata 1855 sound/soc/sof/topology.c wdata = kcalloc(widget->num_kcontrols, wdata 1856 sound/soc/sof/topology.c sizeof(*wdata), wdata 1859 sound/soc/sof/topology.c if (!wdata) wdata 1863 sound/soc/sof/topology.c ret = sof_get_control_data(sdev, widget, wdata, wdata 1913 sound/soc/sof/topology.c wdata[i].pdata->data, wdata 1914 sound/soc/sof/topology.c wdata[i].pdata->size); wdata 1915 sound/soc/sof/topology.c offset += wdata[i].pdata->size; wdata 1936 sound/soc/sof/topology.c wdata[i].control->readback_offset = 0; wdata 1937 sound/soc/sof/topology.c ret = snd_sof_ipc_set_get_comp_data(sdev->ipc, wdata[i].control, wdata 1938 sound/soc/sof/topology.c wdata[i].ipc_cmd, wdata 1939 sound/soc/sof/topology.c wdata[i].ctrl_type, wdata 1940 sound/soc/sof/topology.c wdata[i].control->cmd, wdata 1952 sound/soc/sof/topology.c kfree(wdata);