Lines Matching refs:gadget
40 #include <linux/usb/gadget.h>
182 seq_printf(s, "vbus %s, pullup %s, %s powered%s, gadget %s\n\n",
221 list_for_each_entry (ep, &udc->gadget.ep_list, ep.ep_list) {
435 * gadget driver IN bytecounts can be wrong in fault cases. That's
439 * So all gadget drivers must accept that potential error. Some
494 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) {
634 if (!udc || !udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) {
666 * defer changing CONFG until after the gadget driver
794 static int at91_get_frame(struct usb_gadget *gadget)
796 struct at91_udc *udc = to_udc(gadget);
798 if (!to_udc(gadget)->clocked)
803 static int at91_wakeup(struct usb_gadget *gadget)
805 struct at91_udc *udc = to_udc(gadget);
834 INIT_LIST_HEAD(&udc->gadget.ep_list);
835 INIT_LIST_HEAD(&udc->gadget.ep0->ep_list);
841 list_add_tail(&ep->ep.ep_list, &udc->gadget.ep_list);
857 if (udc->gadget.speed == USB_SPEED_UNKNOWN)
859 udc->gadget.speed = USB_SPEED_UNKNOWN;
869 driver->disconnect(&udc->gadget);
890 udc->gadget.speed = USB_SPEED_UNKNOWN;
948 static int at91_vbus_session(struct usb_gadget *gadget, int is_active)
950 struct at91_udc *udc = to_udc(gadget);
964 static int at91_pullup(struct usb_gadget *gadget, int is_on)
966 struct at91_udc *udc = to_udc(gadget);
976 static int at91_set_selfpowered(struct usb_gadget *gadget, int is_on)
978 struct at91_udc *udc = to_udc(gadget);
1116 /* CONFG is toggled later, if gadget driver succeeds */
1168 * Hosts may clear bulk/intr endpoint halt after the gadget
1244 /* pass request up to the gadget driver */
1247 status = udc->driver->setup(&udc->gadget, &pkt.r);
1367 * fifo until the gadget driver is ready.
1376 * that gadget drivers not use this mode.
1431 udc->gadget.speed = USB_SPEED_FULL;
1454 * gadget driver should switch into slow clock mode
1460 udc->driver->suspend(&udc->gadget);
1475 * NOTE: for a VBUS-powered device, the gadget driver
1481 udc->driver->resume(&udc->gadget);
1518 .gadget = {
1523 .init_name = "gadget",
1593 at91_vbus_session(&udc->gadget, value);
1646 DBG("UDC already has a gadget driver\n");
1651 udc->gadget.dev.driver = &driver->driver;
1652 dev_set_drvdata(&udc->gadget.dev, &driver->driver);
1656 retval = driver->bind(&udc->gadget);
1660 udc->gadget.dev.driver = NULL;
1661 dev_set_drvdata(&udc->gadget.dev, NULL);
1690 driver->unbind(&udc->gadget);
1691 udc->gadget.dev.driver = NULL;
1692 dev_set_drvdata(&udc->gadget.dev, NULL);
1747 udc->gadget.dev.parent = dev;
1800 retval = device_register(&udc->gadget.dev);
1804 /* don't do anything until we have both gadget driver and VBUS */
1867 device_unregister(&udc->gadget.dev);
1901 device_unregister(&udc->gadget.dev);