Lines Matching refs:gadget
58 #include <linux/usb/gadget.h>
80 * Such controller drivers work with a gadget driver. The gadget driver
84 * usb hardware so that the gadget drivers will be more portable.
135 * used by gadget driver; and the inner talker-to-hardware core.
237 * for a single interface (with only the default altsetting) and for gadget
276 if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) {
323 /* for the pxa25x, these can just wrap kmalloc/kfree. gadget drivers
674 || dev->gadget.speed == USB_SPEED_UNKNOWN)) {
876 if (ep->dev->gadget.speed == USB_SPEED_UNKNOWN
964 if (udc->gadget.speed != USB_SPEED_UNKNOWN) {
985 udc = container_of(_gadget, struct pxa25x_udc, gadget);
997 udc = container_of(_gadget, struct pxa25x_udc, gadget);
1016 udc = container_of(_gadget, struct pxa25x_udc, gadget);
1152 dev->debugfs_udc = debugfs_create_file(dev->gadget.name, \
1186 dev->gadget.speed = USB_SPEED_UNKNOWN;
1198 INIT_LIST_HEAD (&dev->gadget.ep_list);
1199 INIT_LIST_HEAD (&dev->gadget.ep0->ep_list);
1207 list_add_tail (&ep->ep.ep_list, &dev->gadget.ep_list);
1229 dev->gadget.speed = USB_SPEED_UNKNOWN;
1244 * prevent gadget drivers from configuring correctly
1293 dev->gadget.dev.driver = &driver->driver;
1296 retval = device_add (&dev->gadget.dev);
1300 dev->gadget.dev.driver = NULL;
1303 retval = driver->bind(&dev->gadget);
1307 device_del (&dev->gadget.dev);
1314 DMSG("registered gadget driver '%s'\n", driver->driver.name);
1318 retval = otg_set_peripheral(dev->transceiver, &dev->gadget);
1322 driver->unbind(&dev->gadget);
1341 if (dev->gadget.speed == USB_SPEED_UNKNOWN)
1343 dev->gadget.speed = USB_SPEED_UNKNOWN;
1356 driver->disconnect(&dev->gadget);
1380 driver->unbind(&dev->gadget);
1381 dev->gadget.dev.driver = NULL;
1384 device_del (&dev->gadget.dev);
1386 DMSG("unregistered gadget driver '%s'\n", driver->driver.name);
1423 pxa25x_udc_vbus_session(&dev->gadget, vbus);
1433 pxa25x_udc_vbus_session(&dev->gadget, is_vbus_present());
1534 /* hardware restricts gadget drivers here! */
1538 * up to the gadget driver.
1577 i = dev->driver->setup(&dev->gadget, &u.r);
1765 else if (dev->gadget.speed != USB_SPEED_UNKNOWN
1768 dev->driver->suspend(&dev->gadget);
1778 if (dev->gadget.speed != USB_SPEED_UNKNOWN
1782 dev->driver->resume(&dev->gadget);
1800 dev->gadget.speed = USB_SPEED_FULL;
1859 .gadget = {
1864 .init_name = "gadget",
2221 device_initialize(&dev->gadget.dev);
2222 dev->gadget.dev.parent = &pdev->dev;
2223 dev->gadget.dev.dma_mask = pdev->dev.dma_mask;