Lines Matching refs:gadget
31 * UDC DMA requires 32-bit aligned buffers so DMA with gadget ether does not
33 * can be used with gadget ether.
68 /* gadget stack */
70 #include <linux/usb/gadget.h>
320 /* Enables endpoint, is called by gadget driver */
342 if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)
491 /* Disables endpoint, is called by gadget driver */
515 /* Allocates request packet, called by gadget driver */
562 /* Frees request packet, called by gadget driver */
1076 /* Queues a request packet, called by gadget driver */
1102 if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)
1287 /* Dequeues a request packet, called by gadget driver */
1358 if (!ep->dev->driver || ep->dev->gadget.speed == USB_SPEED_UNKNOWN)
1404 /* gadget interface */
1422 static int udc_get_frame(struct usb_gadget *gadget)
1427 /* Remote wakeup gadget interface */
1428 static int udc_wakeup(struct usb_gadget *gadget)
1432 if (!gadget)
1434 dev = container_of(gadget, struct udc, gadget);
1440 /* gadget operations */
1449 /* make gadget ep lists */
1450 INIT_LIST_HEAD(&dev->gadget.ep_list);
1452 &dev->gadget.ep_list);
1454 &dev->gadget.ep_list);
1456 &dev->gadget.ep_list);
1460 if (dev->gadget.speed == USB_SPEED_FULL)
1462 else if (dev->gadget.speed == USB_SPEED_HIGH)
1502 dev->gadget.speed = USB_SPEED_UNKNOWN;
1547 dev->gadget.speed = USB_SPEED_HIGH;
1549 dev->gadget.speed = USB_SPEED_FULL;
1574 * not enabled by gadget driver
1601 if (dev->gadget.speed == USB_SPEED_FULL) {
1605 } else if (dev->gadget.speed == USB_SPEED_HIGH) {
1610 dev->gadget.ep0 = &dev->ep[UDC_EP0IN_IX].ep;
1612 INIT_LIST_HEAD(&dev->gadget.ep0->ep_list);
1636 * Calls gadget with disconnect event and resets the UDC and makes
1668 dev->driver->disconnect(&dev->gadget);
1756 * gadget layer then timer will forced to expire with
1846 if (dev->gadget.speed == USB_SPEED_FULL)
1849 else if (dev->gadget.speed == USB_SPEED_HIGH)
1856 if (dev->gadget.speed == USB_SPEED_FULL)
1859 else if (dev->gadget.speed == USB_SPEED_HIGH)
1866 if (dev->gadget.speed == USB_SPEED_FULL)
1869 else if (dev->gadget.speed == USB_SPEED_HIGH)
1876 if (dev->gadget.speed == USB_SPEED_FULL)
1879 else if (dev->gadget.speed == USB_SPEED_HIGH)
1941 /* Called by gadget driver to register itself */
1958 dev->gadget.dev.driver = &driver->driver;
1960 retval = driver->bind(&dev->gadget);
1962 /* Some gadget drivers use both ep0 directions.
1963 * NOTE: to gadget driver, ep0 is just one endpoint...
1972 dev->gadget.dev.driver = NULL;
1990 /* shutdown requests and disconnect from gadget */
1998 if (dev->gadget.speed != USB_SPEED_UNKNOWN) {
2000 driver->disconnect(&dev->gadget);
2012 /* Called by gadget driver to unregister itself */
2029 driver->unbind(&dev->gadget);
2030 dev->gadget.dev.driver = NULL;
2249 * called by gadget drivers completion
2547 dev->gadget.ep0 = &dev->ep[UDC_EP0IN_IX].ep;
2552 dev->gadget.ep0 = &dev->ep[UDC_EP0OUT_IX].ep;
2599 /* call gadget with setup data received */
2601 setup_supported = dev->driver->setup(&dev->gadget,
2822 /* make usb request for gadget driver */
2855 /* call gadget zero with setup data received */
2857 tmp = dev->driver->setup(&dev->gadget, &setup_data.request);
2870 /* make usb request for gadget driver */
2915 /* call gadget zero with setup data received */
2917 tmp = dev->driver->setup(&dev->gadget, &setup_data.request);
2934 /* call gadget to resume and reset configs etc. */
2937 dev->driver->resume(&dev->gadget);
2940 dev->driver->disconnect(&dev->gadget);
2983 dev->driver->suspend(&dev->gadget);
2998 if (dev->gadget.speed == USB_SPEED_HIGH) {
3001 } else if (dev->gadget.speed == USB_SPEED_FULL) {
3120 /* gadget driver must not be registered */
3151 device_unregister(&dev->gadget.dev);
3316 dev->gadget.dev.parent = &pdev->dev;
3317 dev->gadget.dev.dma_mask = pdev->dev.dma_mask;
3341 dev->gadget.ops = &udc_ops;
3343 dev_set_name(&dev->gadget.dev, "gadget");
3344 dev->gadget.dev.release = gadget_release;
3345 dev->gadget.name = name;
3346 dev->gadget.name = name;
3347 dev->gadget.is_dualspeed = 1;
3369 retval = device_register(&dev->gadget.dev);