Lines Matching refs:gadget
1 /* linux/drivers/usb/gadget/s3c-hsotg.c
29 #include <linux/usb/gadget.h>
65 * @ep: The gadget layer representation of the endpoint.
130 * @driver: USB gadget driver
143 * @eps: The endpoints being supplied to the gadget framework
166 struct usb_gadget gadget;
172 * @req: The USB gadget request
195 static inline struct s3c_hsotg *to_hsotg(struct usb_gadget *gadget)
197 return container_of(gadget, struct s3c_hsotg, gadget);
1093 * gadget driver).
1146 ret = hsotg->driver->setup(&hsotg->gadget, ctrl);
1896 hsotg->gadget.speed = USB_SPEED_FULL;
1905 hsotg->gadget.speed = USB_SPEED_HIGH;
1912 hsotg->gadget.speed = USB_SPEED_LOW;
1975 if ((_hs)->gadget.speed != USB_SPEED_UNKNOWN && \
1977 (_hs)->driver->_entry(&(_hs)->gadget);
1985 * and signal the gadget driver that this has happened.
2225 * This is called from the USB gadget code's usb_ep_enable().
2555 hsotg->gadget.dev.driver = &driver->driver;
2556 hsotg->gadget.dev.dma_mask = hsotg->dev->dma_mask;
2557 hsotg->gadget.speed = USB_SPEED_UNKNOWN;
2559 ret = device_add(&hsotg->gadget.dev);
2561 dev_err(hsotg->dev, "failed to register gadget device\n");
2565 ret = driver->bind(&hsotg->gadget);
2569 hsotg->gadget.dev.driver = NULL;
2687 hsotg->gadget.dev.driver = NULL;
2709 driver->unbind(&hsotg->gadget);
2711 hsotg->gadget.speed = USB_SPEED_UNKNOWN;
2713 device_del(&hsotg->gadget.dev);
2715 dev_info(hsotg->dev, "unregistered gadget driver '%s'\n",
2722 static int s3c_hsotg_gadget_getframe(struct usb_gadget *gadget)
2724 return s3c_hsotg_read_frameno(to_hsotg(gadget));
2738 * creation) to give to the gadget driver. Setup the endpoint name, any
2766 /* add to the list of endpoints known by the gadget driver */
2768 list_add_tail(&hs_ep->ep.ep_list, &hsotg->gadget.ep_list);
2855 /* Be in disconnected state until gadget is registered */
3307 device_initialize(&hsotg->gadget.dev);
3309 dev_set_name(&hsotg->gadget.dev, "gadget");
3311 hsotg->gadget.is_dualspeed = 1;
3312 hsotg->gadget.ops = &s3c_hsotg_gadget_ops;
3313 hsotg->gadget.name = dev_name(dev);
3315 hsotg->gadget.dev.parent = dev;
3316 hsotg->gadget.dev.dma_mask = dev->dma_mask;
3320 INIT_LIST_HEAD(&hsotg->gadget.ep_list);
3321 hsotg->gadget.ep0 = &hsotg->eps[0].ep;