Lines Matching refs:gadget
2 * linux/drivers/usb/gadget/s3c2410_udc.c
44 #include <linux/usb/gadget.h>
741 /* deliver the request to the gadget driver */
742 ret = dev->driver->setup(&dev->gadget, crq);
948 dev->gadget.speed = USB_SPEED_UNKNOWN;
955 dev->gadget.speed = USB_SPEED_FULL;
974 if (dev->gadget.speed != USB_SPEED_UNKNOWN
977 dev->driver->resume(&dev->gadget);
988 if (dev->gadget.speed != USB_SPEED_UNKNOWN
991 dev->driver->suspend(&dev->gadget);
1036 static inline struct s3c2410_udc *to_s3c2410_udc(struct usb_gadget *gadget)
1038 return container_of(gadget, struct s3c2410_udc, gadget);
1067 if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)
1220 || dev->gadget.speed == USB_SPEED_UNKNOWN)) {
1326 udc = to_s3c2410_udc(ep->gadget);
1449 static int s3c2410_udc_set_selfpowered(struct usb_gadget *gadget, int value)
1451 struct s3c2410_udc *udc = to_s3c2410_udc(gadget);
1474 if (udc->gadget.speed != USB_SPEED_UNKNOWN) {
1476 udc->driver->disconnect(&udc->gadget);
1488 static int s3c2410_udc_vbus_session(struct usb_gadget *gadget, int is_active)
1490 struct s3c2410_udc *udc = to_s3c2410_udc(gadget);
1499 static int s3c2410_udc_pullup(struct usb_gadget *gadget, int is_on)
1501 struct s3c2410_udc *udc = to_s3c2410_udc(gadget);
1521 s3c2410_udc_vbus_session(&dev->gadget, value);
1547 /*------------------------- gadget driver handling---------------------------*/
1572 dev->gadget.speed = USB_SPEED_UNKNOWN;
1583 INIT_LIST_HEAD (&dev->gadget.ep_list);
1584 INIT_LIST_HEAD (&dev->gadget.ep0->ep_list);
1591 list_add_tail (&ep->ep.ep_list, &dev->gadget.ep_list);
1609 /* dev->gadget.speed = USB_SPEED_UNKNOWN; */
1610 dev->gadget.speed = USB_SPEED_FULL;
1667 udc->gadget.dev.driver = &driver->driver;
1670 if ((retval = device_add(&udc->gadget.dev)) != 0) {
1675 dprintk(DEBUG_NORMAL, "binding gadget driver '%s'\n",
1678 if ((retval = driver->bind (&udc->gadget)) != 0) {
1679 device_del(&udc->gadget.dev);
1690 udc->gadget.dev.driver = NULL;
1712 driver->disconnect(&udc->gadget);
1714 driver->unbind(&udc->gadget);
1716 device_del(&udc->gadget.dev);
1727 .gadget = {
1732 .init_name = "gadget",
1811 usb_bus_clock = clk_get(NULL, "usb-bus-gadget");
1854 device_initialize(&udc->gadget.dev);
1855 udc->gadget.dev.parent = &pdev->dev;
1856 udc->gadget.dev.dma_mask = pdev->dev.dma_mask;