Lines Matching refs:xpad
594 static int xpad_init_input(struct usb_xpad *xpad);
595 static void xpad_deinit_input(struct usb_xpad *xpad);
596 static void xpadone_ack_mode_report(struct usb_xpad *xpad, u8 seq_num);
607 static void xpad_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char *data) in xpad_process_packet() argument
609 struct input_dev *dev = xpad->dev; in xpad_process_packet()
611 if (!(xpad->mapping & MAP_STICKS_TO_NULL)) { in xpad_process_packet()
626 if (xpad->mapping & MAP_TRIGGERS_TO_BUTTONS) { in xpad_process_packet()
635 if (xpad->mapping & MAP_DPAD_TO_BUTTONS) { in xpad_process_packet()
677 static void xpad360_process_packet(struct usb_xpad *xpad, struct input_dev *dev, in xpad360_process_packet() argument
685 if (xpad->mapping & MAP_DPAD_TO_BUTTONS) { in xpad360_process_packet()
699 if (!(xpad->mapping & MAP_DPAD_TO_BUTTONS) || in xpad360_process_packet()
700 xpad->xtype == XTYPE_XBOX360W) { in xpad360_process_packet()
724 if (!(xpad->mapping & MAP_STICKS_TO_NULL)) { in xpad360_process_packet()
739 if (xpad->mapping & MAP_TRIGGERS_TO_BUTTONS) { in xpad360_process_packet()
752 struct usb_xpad *xpad = container_of(work, struct usb_xpad, work); in xpad_presence_work() local
755 if (xpad->pad_present) { in xpad_presence_work()
756 error = xpad_init_input(xpad); in xpad_presence_work()
759 dev_err(&xpad->dev->dev, in xpad_presence_work()
762 rcu_assign_pointer(xpad->x360w_dev, xpad->dev); in xpad_presence_work()
765 RCU_INIT_POINTER(xpad->x360w_dev, NULL); in xpad_presence_work()
771 xpad_deinit_input(xpad); in xpad_presence_work()
789 static void xpad360w_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char *data) in xpad360w_process_packet() argument
798 if (xpad->pad_present != present) { in xpad360w_process_packet()
799 xpad->pad_present = present; in xpad360w_process_packet()
800 schedule_work(&xpad->work); in xpad360w_process_packet()
809 dev = rcu_dereference(xpad->x360w_dev); in xpad360w_process_packet()
811 xpad360_process_packet(xpad, dev, cmd, &data[4]); in xpad360w_process_packet()
824 static void xpadone_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char *data) in xpadone_process_packet() argument
826 struct input_dev *dev = xpad->dev; in xpadone_process_packet()
836 xpadone_ack_mode_report(xpad, data[2]); in xpadone_process_packet()
857 if (xpad->mapping & MAP_DPAD_TO_BUTTONS) { in xpadone_process_packet()
878 if (!(xpad->mapping & MAP_STICKS_TO_NULL)) { in xpadone_process_packet()
893 if (xpad->mapping & MAP_TRIGGERS_TO_BUTTONS) { in xpadone_process_packet()
910 struct usb_xpad *xpad = urb->context; in xpad_irq_in() local
911 struct device *dev = &xpad->intf->dev; in xpad_irq_in()
933 switch (xpad->xtype) { in xpad_irq_in()
935 xpad360_process_packet(xpad, xpad->dev, 0, xpad->idata); in xpad_irq_in()
938 xpad360w_process_packet(xpad, 0, xpad->idata); in xpad_irq_in()
941 xpadone_process_packet(xpad, 0, xpad->idata); in xpad_irq_in()
944 xpad_process_packet(xpad, 0, xpad->idata); in xpad_irq_in()
955 static bool xpad_prepare_next_init_packet(struct usb_xpad *xpad) in xpad_prepare_next_init_packet() argument
959 if (xpad->xtype != XTYPE_XBOXONE) in xpad_prepare_next_init_packet()
963 while (xpad->init_seq < ARRAY_SIZE(xboxone_init_packets)) { in xpad_prepare_next_init_packet()
964 init_packet = &xboxone_init_packets[xpad->init_seq++]; in xpad_prepare_next_init_packet()
967 init_packet->idVendor != xpad->dev->id.vendor) in xpad_prepare_next_init_packet()
971 init_packet->idProduct != xpad->dev->id.product) in xpad_prepare_next_init_packet()
975 memcpy(xpad->odata, init_packet->data, init_packet->len); in xpad_prepare_next_init_packet()
976 xpad->irq_out->transfer_buffer_length = init_packet->len; in xpad_prepare_next_init_packet()
979 xpad->odata[2] = xpad->odata_serial++; in xpad_prepare_next_init_packet()
987 static bool xpad_prepare_next_out_packet(struct usb_xpad *xpad) in xpad_prepare_next_out_packet() argument
993 if (xpad_prepare_next_init_packet(xpad)) in xpad_prepare_next_out_packet()
997 if (++xpad->last_out_packet >= XPAD_NUM_OUT_PACKETS) in xpad_prepare_next_out_packet()
998 xpad->last_out_packet = 0; in xpad_prepare_next_out_packet()
1000 pkt = &xpad->out_packets[xpad->last_out_packet]; in xpad_prepare_next_out_packet()
1002 dev_dbg(&xpad->intf->dev, in xpad_prepare_next_out_packet()
1004 __func__, xpad->last_out_packet); in xpad_prepare_next_out_packet()
1011 memcpy(xpad->odata, packet->data, packet->len); in xpad_prepare_next_out_packet()
1012 xpad->irq_out->transfer_buffer_length = packet->len; in xpad_prepare_next_out_packet()
1021 static int xpad_try_sending_next_out_packet(struct usb_xpad *xpad) in xpad_try_sending_next_out_packet() argument
1025 if (!xpad->irq_out_active && xpad_prepare_next_out_packet(xpad)) { in xpad_try_sending_next_out_packet()
1026 usb_anchor_urb(xpad->irq_out, &xpad->irq_out_anchor); in xpad_try_sending_next_out_packet()
1027 error = usb_submit_urb(xpad->irq_out, GFP_ATOMIC); in xpad_try_sending_next_out_packet()
1029 dev_err(&xpad->intf->dev, in xpad_try_sending_next_out_packet()
1032 usb_unanchor_urb(xpad->irq_out); in xpad_try_sending_next_out_packet()
1036 xpad->irq_out_active = true; in xpad_try_sending_next_out_packet()
1044 struct usb_xpad *xpad = urb->context; in xpad_irq_out() local
1045 struct device *dev = &xpad->intf->dev; in xpad_irq_out()
1050 spin_lock_irqsave(&xpad->odata_lock, flags); in xpad_irq_out()
1055 xpad->irq_out_active = xpad_prepare_next_out_packet(xpad); in xpad_irq_out()
1064 xpad->irq_out_active = false; in xpad_irq_out()
1073 if (xpad->irq_out_active) { in xpad_irq_out()
1074 usb_anchor_urb(urb, &xpad->irq_out_anchor); in xpad_irq_out()
1081 xpad->irq_out_active = false; in xpad_irq_out()
1085 spin_unlock_irqrestore(&xpad->odata_lock, flags); in xpad_irq_out()
1088 static int xpad_init_output(struct usb_interface *intf, struct usb_xpad *xpad, in xpad_init_output() argument
1093 if (xpad->xtype == XTYPE_UNKNOWN) in xpad_init_output()
1096 init_usb_anchor(&xpad->irq_out_anchor); in xpad_init_output()
1098 xpad->odata = usb_alloc_coherent(xpad->udev, XPAD_PKT_LEN, in xpad_init_output()
1099 GFP_KERNEL, &xpad->odata_dma); in xpad_init_output()
1100 if (!xpad->odata) in xpad_init_output()
1103 spin_lock_init(&xpad->odata_lock); in xpad_init_output()
1105 xpad->irq_out = usb_alloc_urb(0, GFP_KERNEL); in xpad_init_output()
1106 if (!xpad->irq_out) { in xpad_init_output()
1111 usb_fill_int_urb(xpad->irq_out, xpad->udev, in xpad_init_output()
1112 usb_sndintpipe(xpad->udev, ep_irq_out->bEndpointAddress), in xpad_init_output()
1113 xpad->odata, XPAD_PKT_LEN, in xpad_init_output()
1114 xpad_irq_out, xpad, ep_irq_out->bInterval); in xpad_init_output()
1115 xpad->irq_out->transfer_dma = xpad->odata_dma; in xpad_init_output()
1116 xpad->irq_out->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; in xpad_init_output()
1121 usb_free_coherent(xpad->udev, XPAD_PKT_LEN, xpad->odata, xpad->odata_dma); in xpad_init_output()
1125 static void xpad_stop_output(struct usb_xpad *xpad) in xpad_stop_output() argument
1127 if (xpad->xtype != XTYPE_UNKNOWN) { in xpad_stop_output()
1128 if (!usb_wait_anchor_empty_timeout(&xpad->irq_out_anchor, in xpad_stop_output()
1130 dev_warn(&xpad->intf->dev, in xpad_stop_output()
1132 usb_kill_anchored_urbs(&xpad->irq_out_anchor); in xpad_stop_output()
1137 static void xpad_deinit_output(struct usb_xpad *xpad) in xpad_deinit_output() argument
1139 if (xpad->xtype != XTYPE_UNKNOWN) { in xpad_deinit_output()
1140 usb_free_urb(xpad->irq_out); in xpad_deinit_output()
1141 usb_free_coherent(xpad->udev, XPAD_PKT_LEN, in xpad_deinit_output()
1142 xpad->odata, xpad->odata_dma); in xpad_deinit_output()
1146 static int xpad_inquiry_pad_presence(struct usb_xpad *xpad) in xpad_inquiry_pad_presence() argument
1149 &xpad->out_packets[XPAD_OUT_CMD_IDX]; in xpad_inquiry_pad_presence()
1153 spin_lock_irqsave(&xpad->odata_lock, flags); in xpad_inquiry_pad_presence()
1171 xpad->last_out_packet = -1; in xpad_inquiry_pad_presence()
1172 retval = xpad_try_sending_next_out_packet(xpad); in xpad_inquiry_pad_presence()
1174 spin_unlock_irqrestore(&xpad->odata_lock, flags); in xpad_inquiry_pad_presence()
1179 static int xpad_start_xbox_one(struct usb_xpad *xpad) in xpad_start_xbox_one() argument
1184 spin_lock_irqsave(&xpad->odata_lock, flags); in xpad_start_xbox_one()
1191 xpad->init_seq = 0; in xpad_start_xbox_one()
1192 retval = xpad_try_sending_next_out_packet(xpad); in xpad_start_xbox_one()
1194 spin_unlock_irqrestore(&xpad->odata_lock, flags); in xpad_start_xbox_one()
1199 static void xpadone_ack_mode_report(struct usb_xpad *xpad, u8 seq_num) in xpadone_ack_mode_report() argument
1203 &xpad->out_packets[XPAD_OUT_CMD_IDX]; in xpadone_ack_mode_report()
1209 spin_lock_irqsave(&xpad->odata_lock, flags); in xpadone_ack_mode_report()
1217 xpad->last_out_packet = -1; in xpadone_ack_mode_report()
1218 xpad_try_sending_next_out_packet(xpad); in xpadone_ack_mode_report()
1220 spin_unlock_irqrestore(&xpad->odata_lock, flags); in xpadone_ack_mode_report()
1226 struct usb_xpad *xpad = input_get_drvdata(dev); in xpad_play_effect() local
1227 struct xpad_output_packet *packet = &xpad->out_packets[XPAD_OUT_FF_IDX]; in xpad_play_effect()
1239 spin_lock_irqsave(&xpad->odata_lock, flags); in xpad_play_effect()
1241 switch (xpad->xtype) { in xpad_play_effect()
1286 packet->data[2] = xpad->odata_serial++; in xpad_play_effect()
1302 dev_dbg(&xpad->dev->dev, in xpad_play_effect()
1304 __func__, xpad->xtype); in xpad_play_effect()
1309 retval = xpad_try_sending_next_out_packet(xpad); in xpad_play_effect()
1312 spin_unlock_irqrestore(&xpad->odata_lock, flags); in xpad_play_effect()
1316 static int xpad_init_ff(struct usb_xpad *xpad) in xpad_init_ff() argument
1318 if (xpad->xtype == XTYPE_UNKNOWN) in xpad_init_ff()
1321 input_set_capability(xpad->dev, EV_FF, FF_RUMBLE); in xpad_init_ff()
1323 return input_ff_create_memless(xpad->dev, NULL, xpad_play_effect); in xpad_init_ff()
1327 static int xpad_init_ff(struct usb_xpad *xpad) { return 0; } in xpad_init_ff() argument
1339 struct usb_xpad *xpad; member
1362 static void xpad_send_led_command(struct usb_xpad *xpad, int command) in xpad_send_led_command() argument
1365 &xpad->out_packets[XPAD_OUT_LED_IDX]; in xpad_send_led_command()
1370 spin_lock_irqsave(&xpad->odata_lock, flags); in xpad_send_led_command()
1372 switch (xpad->xtype) { in xpad_send_led_command()
1399 xpad_try_sending_next_out_packet(xpad); in xpad_send_led_command()
1401 spin_unlock_irqrestore(&xpad->odata_lock, flags); in xpad_send_led_command()
1408 static void xpad_identify_controller(struct usb_xpad *xpad) in xpad_identify_controller() argument
1410 led_set_brightness(&xpad->led->led_cdev, (xpad->pad_nr % 4) + 2); in xpad_identify_controller()
1419 xpad_send_led_command(xpad_led->xpad, value); in xpad_led_set()
1422 static int xpad_led_probe(struct usb_xpad *xpad) in xpad_led_probe() argument
1428 if (xpad->xtype != XTYPE_XBOX360 && xpad->xtype != XTYPE_XBOX360W) in xpad_led_probe()
1431 xpad->led = led = kzalloc(sizeof(struct xpad_led), GFP_KERNEL); in xpad_led_probe()
1435 xpad->pad_nr = ida_simple_get(&xpad_pad_seq, 0, 0, GFP_KERNEL); in xpad_led_probe()
1436 if (xpad->pad_nr < 0) { in xpad_led_probe()
1437 error = xpad->pad_nr; in xpad_led_probe()
1441 snprintf(led->name, sizeof(led->name), "xpad%d", xpad->pad_nr); in xpad_led_probe()
1442 led->xpad = xpad; in xpad_led_probe()
1449 error = led_classdev_register(&xpad->udev->dev, led_cdev); in xpad_led_probe()
1453 xpad_identify_controller(xpad); in xpad_led_probe()
1458 ida_simple_remove(&xpad_pad_seq, xpad->pad_nr); in xpad_led_probe()
1461 xpad->led = NULL; in xpad_led_probe()
1465 static void xpad_led_disconnect(struct usb_xpad *xpad) in xpad_led_disconnect() argument
1467 struct xpad_led *xpad_led = xpad->led; in xpad_led_disconnect()
1471 ida_simple_remove(&xpad_pad_seq, xpad->pad_nr); in xpad_led_disconnect()
1476 static int xpad_led_probe(struct usb_xpad *xpad) { return 0; } in xpad_led_probe() argument
1477 static void xpad_led_disconnect(struct usb_xpad *xpad) { } in xpad_led_disconnect() argument
1480 static int xpad_start_input(struct usb_xpad *xpad) in xpad_start_input() argument
1484 if (usb_submit_urb(xpad->irq_in, GFP_KERNEL)) in xpad_start_input()
1487 if (xpad->xtype == XTYPE_XBOXONE) { in xpad_start_input()
1488 error = xpad_start_xbox_one(xpad); in xpad_start_input()
1490 usb_kill_urb(xpad->irq_in); in xpad_start_input()
1498 static void xpad_stop_input(struct usb_xpad *xpad) in xpad_stop_input() argument
1500 usb_kill_urb(xpad->irq_in); in xpad_stop_input()
1503 static void xpad360w_poweroff_controller(struct usb_xpad *xpad) in xpad360w_poweroff_controller() argument
1507 &xpad->out_packets[XPAD_OUT_CMD_IDX]; in xpad360w_poweroff_controller()
1509 spin_lock_irqsave(&xpad->odata_lock, flags); in xpad360w_poweroff_controller()
1527 xpad->last_out_packet = -1; in xpad360w_poweroff_controller()
1528 xpad_try_sending_next_out_packet(xpad); in xpad360w_poweroff_controller()
1530 spin_unlock_irqrestore(&xpad->odata_lock, flags); in xpad360w_poweroff_controller()
1533 static int xpad360w_start_input(struct usb_xpad *xpad) in xpad360w_start_input() argument
1537 error = usb_submit_urb(xpad->irq_in, GFP_KERNEL); in xpad360w_start_input()
1548 error = xpad_inquiry_pad_presence(xpad); in xpad360w_start_input()
1550 usb_kill_urb(xpad->irq_in); in xpad360w_start_input()
1557 static void xpad360w_stop_input(struct usb_xpad *xpad) in xpad360w_stop_input() argument
1559 usb_kill_urb(xpad->irq_in); in xpad360w_stop_input()
1562 flush_work(&xpad->work); in xpad360w_stop_input()
1567 struct usb_xpad *xpad = input_get_drvdata(dev); in xpad_open() local
1569 return xpad_start_input(xpad); in xpad_open()
1574 struct usb_xpad *xpad = input_get_drvdata(dev); in xpad_close() local
1576 xpad_stop_input(xpad); in xpad_close()
1581 struct usb_xpad *xpad = input_get_drvdata(input_dev); in xpad_set_up_abs() local
1592 if (xpad->xtype == XTYPE_XBOXONE) in xpad_set_up_abs()
1607 static void xpad_deinit_input(struct usb_xpad *xpad) in xpad_deinit_input() argument
1609 if (xpad->input_created) { in xpad_deinit_input()
1610 xpad->input_created = false; in xpad_deinit_input()
1611 xpad_led_disconnect(xpad); in xpad_deinit_input()
1612 input_unregister_device(xpad->dev); in xpad_deinit_input()
1616 static int xpad_init_input(struct usb_xpad *xpad) in xpad_init_input() argument
1625 xpad->dev = input_dev; in xpad_init_input()
1626 input_dev->name = xpad->name; in xpad_init_input()
1627 input_dev->phys = xpad->phys; in xpad_init_input()
1628 usb_to_input_id(xpad->udev, &input_dev->id); in xpad_init_input()
1630 if (xpad->xtype == XTYPE_XBOX360W) { in xpad_init_input()
1635 input_dev->dev.parent = &xpad->intf->dev; in xpad_init_input()
1637 input_set_drvdata(input_dev, xpad); in xpad_init_input()
1639 if (xpad->xtype != XTYPE_XBOX360W) { in xpad_init_input()
1644 if (!(xpad->mapping & MAP_STICKS_TO_NULL)) { in xpad_init_input()
1655 if (xpad->xtype == XTYPE_XBOX360 || xpad->xtype == XTYPE_XBOX360W || in xpad_init_input()
1656 xpad->xtype == XTYPE_XBOXONE) { in xpad_init_input()
1664 if (xpad->mapping & MAP_DPAD_TO_BUTTONS) { in xpad_init_input()
1676 if (!(xpad->mapping & MAP_DPAD_TO_BUTTONS) || in xpad_init_input()
1677 xpad->xtype == XTYPE_XBOX360W) { in xpad_init_input()
1682 if (xpad->mapping & MAP_TRIGGERS_TO_BUTTONS) { in xpad_init_input()
1691 error = xpad_init_ff(xpad); in xpad_init_input()
1695 error = xpad_led_probe(xpad); in xpad_init_input()
1699 error = input_register_device(xpad->dev); in xpad_init_input()
1703 xpad->input_created = true; in xpad_init_input()
1707 xpad_led_disconnect(xpad); in xpad_init_input()
1718 struct usb_xpad *xpad; in xpad_probe() local
1731 xpad = kzalloc(sizeof(struct usb_xpad), GFP_KERNEL); in xpad_probe()
1732 if (!xpad) in xpad_probe()
1735 usb_make_path(udev, xpad->phys, sizeof(xpad->phys)); in xpad_probe()
1736 strlcat(xpad->phys, "/input0", sizeof(xpad->phys)); in xpad_probe()
1738 xpad->idata = usb_alloc_coherent(udev, XPAD_PKT_LEN, in xpad_probe()
1739 GFP_KERNEL, &xpad->idata_dma); in xpad_probe()
1740 if (!xpad->idata) { in xpad_probe()
1745 xpad->irq_in = usb_alloc_urb(0, GFP_KERNEL); in xpad_probe()
1746 if (!xpad->irq_in) { in xpad_probe()
1751 xpad->udev = udev; in xpad_probe()
1752 xpad->intf = intf; in xpad_probe()
1753 xpad->mapping = xpad_device[i].mapping; in xpad_probe()
1754 xpad->xtype = xpad_device[i].xtype; in xpad_probe()
1755 xpad->name = xpad_device[i].name; in xpad_probe()
1756 INIT_WORK(&xpad->work, xpad_presence_work); in xpad_probe()
1758 if (xpad->xtype == XTYPE_UNKNOWN) { in xpad_probe()
1761 xpad->xtype = XTYPE_XBOX360W; in xpad_probe()
1763 xpad->xtype = XTYPE_XBOXONE; in xpad_probe()
1765 xpad->xtype = XTYPE_XBOX360; in xpad_probe()
1767 xpad->xtype = XTYPE_XBOX; in xpad_probe()
1771 xpad->mapping |= MAP_DPAD_TO_BUTTONS; in xpad_probe()
1773 xpad->mapping |= MAP_TRIGGERS_TO_BUTTONS; in xpad_probe()
1775 xpad->mapping |= MAP_STICKS_TO_NULL; in xpad_probe()
1778 if (xpad->xtype == XTYPE_XBOXONE && in xpad_probe()
1808 error = xpad_init_output(intf, xpad, ep_irq_out); in xpad_probe()
1812 usb_fill_int_urb(xpad->irq_in, udev, in xpad_probe()
1814 xpad->idata, XPAD_PKT_LEN, xpad_irq_in, in xpad_probe()
1815 xpad, ep_irq_in->bInterval); in xpad_probe()
1816 xpad->irq_in->transfer_dma = xpad->idata_dma; in xpad_probe()
1817 xpad->irq_in->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; in xpad_probe()
1819 usb_set_intfdata(intf, xpad); in xpad_probe()
1821 if (xpad->xtype == XTYPE_XBOX360W) { in xpad_probe()
1829 error = xpad360w_start_input(xpad); in xpad_probe()
1841 error = xpad_init_input(xpad); in xpad_probe()
1848 xpad_deinit_output(xpad); in xpad_probe()
1850 usb_free_urb(xpad->irq_in); in xpad_probe()
1852 usb_free_coherent(udev, XPAD_PKT_LEN, xpad->idata, xpad->idata_dma); in xpad_probe()
1854 kfree(xpad); in xpad_probe()
1860 struct usb_xpad *xpad = usb_get_intfdata(intf); in xpad_disconnect() local
1862 if (xpad->xtype == XTYPE_XBOX360W) in xpad_disconnect()
1863 xpad360w_stop_input(xpad); in xpad_disconnect()
1865 xpad_deinit_input(xpad); in xpad_disconnect()
1871 xpad_stop_output(xpad); in xpad_disconnect()
1873 xpad_deinit_output(xpad); in xpad_disconnect()
1875 usb_free_urb(xpad->irq_in); in xpad_disconnect()
1876 usb_free_coherent(xpad->udev, XPAD_PKT_LEN, in xpad_disconnect()
1877 xpad->idata, xpad->idata_dma); in xpad_disconnect()
1879 kfree(xpad); in xpad_disconnect()
1886 struct usb_xpad *xpad = usb_get_intfdata(intf); in xpad_suspend() local
1887 struct input_dev *input = xpad->dev; in xpad_suspend()
1889 if (xpad->xtype == XTYPE_XBOX360W) { in xpad_suspend()
1895 xpad360w_stop_input(xpad); in xpad_suspend()
1903 if (auto_poweroff && xpad->pad_present) in xpad_suspend()
1904 xpad360w_poweroff_controller(xpad); in xpad_suspend()
1908 xpad_stop_input(xpad); in xpad_suspend()
1912 xpad_stop_output(xpad); in xpad_suspend()
1919 struct usb_xpad *xpad = usb_get_intfdata(intf); in xpad_resume() local
1920 struct input_dev *input = xpad->dev; in xpad_resume()
1923 if (xpad->xtype == XTYPE_XBOX360W) { in xpad_resume()
1924 retval = xpad360w_start_input(xpad); in xpad_resume()
1928 retval = xpad_start_input(xpad); in xpad_resume()
1929 } else if (xpad->xtype == XTYPE_XBOXONE) { in xpad_resume()
1935 retval = xpad_start_xbox_one(xpad); in xpad_resume()