Lines Matching refs:gadget
45 #include <linux/usb/gadget.h>
313 if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)
333 if ((dev->gadget.speed == USB_SPEED_HIGH
335 || (dev->gadget.speed == USB_SPEED_FULL
344 switch (dev->gadget.speed) {
362 switch (dev->gadget.speed) {
464 /* complete routine from gadget driver */
809 if (unlikely(!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN))
1018 if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)
1163 dev = container_of(_gadget, struct langwell_udc, gadget);
1173 /* tries to wake up the host connected to this gadget */
1183 dev = container_of(_gadget, struct langwell_udc, gadget);
1233 dev = container_of(_gadget, struct langwell_udc, gadget);
1265 dev = container_of(_gadget, struct langwell_udc, gadget);
1289 dev = container_of(_gadget, struct langwell_udc, gadget);
1318 /* tries to wake up the host connected to this gadget */
1445 list_add_tail(&ep->ep.ep_list, &dev->gadget.ep_list);
1519 list_for_each_entry(ep, &dev->gadget.ep_list, ep.ep_list) {
1526 driver->disconnect(&dev->gadget);
1758 /* other gadget->eplist ep */
1759 list_for_each_entry(ep, &dev->gadget.ep_list, ep.ep_list) {
1823 dev->gadget.dev.driver = &driver->driver;
1827 retval = driver->bind(&dev->gadget);
1832 dev->gadget.dev.driver = NULL;
1858 driver->unbind(&dev->gadget);
1859 dev->gadget.dev.driver = NULL;
1868 /* unregister gadget driver */
1896 dev->gadget.speed = USB_SPEED_UNKNOWN;
1900 /* unbind gadget driver */
1901 driver->unbind(&dev->gadget);
1902 dev->gadget.dev.driver = NULL;
2056 list_for_each_entry(ep, &dev->gadget.ep_list, ep.ep_list) {
2179 /* RNDIS gadget delegate */
2244 if (!gadget_is_otg(&dev->gadget))
2247 dev->gadget.b_hnp_enable = 1;
2253 dev->gadget.a_hnp_support = 1;
2256 dev->gadget.a_alt_hnp_support = 1;
2299 /* delegate USB standard requests to the gadget driver */
2302 /* USB requests handled by gadget */
2304 /* DATA phase from gadget, STATUS phase from udc */
2310 if (dev->driver->setup(&dev->gadget,
2317 /* no DATA phase, IN STATUS phase from gadget */
2322 if (dev->driver->setup(&dev->gadget,
2564 dev->gadget.speed = USB_SPEED_HIGH;
2567 dev->gadget.speed = USB_SPEED_FULL;
2570 dev->gadget.speed = USB_SPEED_LOW;
2573 dev->gadget.speed = USB_SPEED_UNKNOWN;
2576 VDBG(dev, "speed = %d, dev->gadget.speed = %d\n",
2577 speed, dev->gadget.speed);
2632 dev->gadget.b_hnp_enable = 0;
2633 dev->gadget.a_hnp_support = 0;
2634 dev->gadget.a_alt_hnp_support = 0;
2728 dev->driver->suspend(&dev->gadget);
2767 dev->driver->resume(&dev->gadget);
2947 device_unregister(&dev->gadget.dev);
2963 * don't respond over USB until a gadget driver binds to us.
3131 /* initialize gadget structure */
3132 dev->gadget.ops = &langwell_ops; /* usb_gadget_ops */
3133 dev->gadget.ep0 = &dev->ep[0].ep; /* gadget ep0 */
3134 INIT_LIST_HEAD(&dev->gadget.ep_list); /* ep_list */
3135 dev->gadget.speed = USB_SPEED_UNKNOWN; /* speed */
3136 dev->gadget.is_dualspeed = 1; /* support dual speed */
3138 dev->gadget.is_otg = 1; /* support otg mode */
3141 /* the "gadget" abstracts/virtualizes the controller */
3142 dev_set_name(&dev->gadget.dev, "gadget");
3143 dev->gadget.dev.parent = &pdev->dev;
3144 dev->gadget.dev.dma_mask = pdev->dev.dma_mask;
3145 dev->gadget.dev.release = gadget_release;
3146 dev->gadget.name = driver_name; /* gadget name */
3184 retval = device_register(&dev->gadget.dev);
3275 /* start device if gadget is loaded */