Lines Matching refs:gadget
40 #include <linux/usb/gadget.h>
102 if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)
710 if (unlikely(!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN))
1219 INIT_LIST_HEAD (&dev->gadget.ep_list);
1220 dev->gadget.ep0 = &dev->ep [0].ep;
1221 dev->gadget.speed = USB_SPEED_UNKNOWN;
1235 list_add_tail (&ep->ep.ep_list, &dev->gadget.ep_list);
1295 dev->gadget.speed = USB_SPEED_FULL;
1345 dev->gadget.dev.driver = &driver->driver;
1346 retval = driver->bind(&dev->gadget);
1351 dev->gadget.dev.driver = NULL;
1360 DBG(dev, "registered gadget driver '%s'\n", driver->driver.name);
1372 if (dev->gadget.speed == USB_SPEED_UNKNOWN)
1375 /* disconnect gadget driver after quiesceing hw and the driver */
1381 driver->disconnect(&dev->gadget);
1404 driver->unbind(&dev->gadget);
1405 dev->gadget.dev.driver = NULL;
1482 default: /* pass to gadget driver */
1504 /* delegate everything to the gadget driver.
1508 tmp = dev->driver->setup(&dev->gadget, &ctrl);
1563 if (dev->gadget.speed == USB_SPEED_FULL)
1585 if (dev->gadget.speed != USB_SPEED_UNKNOWN
1589 dev->driver->suspend(&dev->gadget);
1600 if (dev->gadget.speed != USB_SPEED_UNKNOWN
1604 dev->driver->resume(&dev->gadget);
1612 INFO(dev, "USB reset done, gadget %s\n",
1726 device_unregister(&dev->gadget.dev);
1736 * don't respond over USB until a gadget driver binds to us.
1769 dev->gadget.ops = &goku_ops;
1771 /* the "gadget" abstracts/virtualizes the controller */
1772 dev_set_name(&dev->gadget.dev, "gadget");
1773 dev->gadget.dev.parent = &pdev->dev;
1774 dev->gadget.dev.dma_mask = pdev->dev.dma_mask;
1775 dev->gadget.dev.release = gadget_release;
1776 dev->gadget.name = driver_name;
1828 retval = device_register(&dev->gadget.dev);