Lines Matching refs:gadget
11 * This driver should work well with most "gadget" drivers, including
12 * the File Storage, Serial, and Ethernet/RNDIS gadget drivers
65 #include <linux/usb/gadget.h>
98 * Some gadget drivers work better with the dma support here than others.
163 if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)
200 && dev->gadget.speed == USB_SPEED_HIGH
206 if ((dev->gadget.speed == USB_SPEED_HIGH
208 || (dev->gadget.speed == USB_SPEED_FULL
525 && ep->dev->gadget.speed == USB_SPEED_FULL) {
554 && ep->dev->gadget.speed == USB_SPEED_FULL) {
843 if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)
985 * your gadget driver. That helps avoids errata 0121,
1208 if (!ep->dev->driver || ep->dev->gadget.speed == USB_SPEED_UNKNOWN)
1265 if (!ep->dev->driver || ep->dev->gadget.speed == USB_SPEED_UNKNOWN)
1284 if (!ep->dev->driver || ep->dev->gadget.speed == USB_SPEED_UNKNOWN)
1317 dev = container_of (_gadget, struct net2280, gadget);
1332 dev = container_of (_gadget, struct net2280, gadget);
1352 dev = container_of (_gadget, struct net2280, gadget);
1374 dev = container_of (_gadget, struct net2280, gadget);
1439 "devinit %03x fifoctl %08x gadget '%s'\n"
1462 else if (dev->gadget.speed == USB_SPEED_UNKNOWN)
1690 INIT_LIST_HEAD (&dev->gadget.ep_list);
1691 list_add_tail (&dev->ep [1].ep.ep_list, &dev->gadget.ep_list);
1692 list_add_tail (&dev->ep [2].ep.ep_list, &dev->gadget.ep_list);
1695 list_add_tail (&dev->ep [3].ep.ep_list, &dev->gadget.ep_list);
1696 list_add_tail (&dev->ep [4].ep.ep_list, &dev->gadget.ep_list);
1703 list_add_tail (&dev->ep [3].ep.ep_list, &dev->gadget.ep_list);
1709 list_add_tail (&dev->ep [5].ep.ep_list, &dev->gadget.ep_list);
1710 list_add_tail (&dev->ep [6].ep.ep_list, &dev->gadget.ep_list);
1714 extern int net2280_set_fifo_mode (struct usb_gadget *gadget, int mode);
1718 * @gadget: access to the net2280 device that will be updated
1724 * the contents of gadget->ep_list may have changed.
1732 int net2280_set_fifo_mode (struct usb_gadget *gadget, int mode)
1739 if (!gadget)
1741 dev = container_of (gadget, struct net2280, gadget);
1774 * be to associate this gadget driver (yes?) with all of them, or
1784 dev->gadget.speed = USB_SPEED_UNKNOWN;
1845 dev->gadget.ep0 = &dev->ep [0].ep;
1847 INIT_LIST_HEAD (&dev->gadget.ep0->ep_list);
1932 dev->gadget.dev.driver = &driver->driver;
1933 retval = driver->bind (&dev->gadget);
1938 dev->gadget.dev.driver = NULL;
1964 driver->unbind (&dev->gadget);
1965 dev->gadget.dev.driver = NULL;
1977 if (dev->gadget.speed == USB_SPEED_UNKNOWN)
1990 driver->disconnect (&dev->gadget);
2011 net2280_pullup (&dev->gadget, 0);
2013 driver->unbind (&dev->gadget);
2014 dev->gadget.dev.driver = NULL;
2166 && ep->dev->gadget.speed
2214 /* NOTE: net2280 could let gadget driver start the
2250 list_for_each_entry (ep, &dev->gadget.ep_list, ep.ep_list) {
2284 if (dev->gadget.speed == USB_SPEED_UNKNOWN) {
2286 dev->gadget.speed = USB_SPEED_HIGH;
2288 dev->gadget.speed = USB_SPEED_FULL;
2289 net2280_led_speed (dev, dev->gadget.speed);
2291 (dev->gadget.speed == USB_SPEED_HIGH)
2357 * everything else goes uplevel to the gadget code.
2437 tmp = dev->driver->setup (&dev->gadget, &u.r);
2511 ) && ( dev->gadget.speed != USB_SPEED_UNKNOWN)) {
2535 dev->driver->suspend (&dev->gadget);
2540 dev->driver->resume (&dev->gadget);
2721 device_unregister (&dev->gadget.dev);
2731 * don't respond over USB until a gadget driver binds to us.
2759 dev->gadget.ops = &net2280_ops;
2760 dev->gadget.is_dualspeed = 1;
2762 /* the "gadget" abstracts/virtualizes the controller */
2763 dev_set_name(&dev->gadget.dev, "gadget");
2764 dev->gadget.dev.parent = &pdev->dev;
2765 dev->gadget.dev.dma_mask = pdev->dev.dma_mask;
2766 dev->gadget.dev.release = gadget_release;
2767 dev->gadget.name = driver_name;
2874 retval = device_register (&dev->gadget.dev);