Lines Matching refs:gadget
2 * driver/usb/gadget/fsl_qe_udc.c
39 #include <linux/usb/gadget.h>
56 /*ep name is important in gadget, it should obey the convention of ep_match()*/
101 dma_unmap_single(udc->gadget.dev.parent,
109 dma_sync_single_for_cpu(udc->gadget.dev.parent,
124 /* this complete() should a func implemented by gadget layer,
453 ep->rxbuf_d = dma_map_single(udc_controller->gadget.dev.parent,
459 dma_sync_single_for_device(udc_controller->gadget.dev.parent,
554 switch (udc->gadget.speed) {
575 switch (udc->gadget.speed) {
592 switch (udc->gadget.speed) {
607 switch (udc->gadget.speed) {
1256 /* a request complete in ep0, whether gadget request or udc request */
1591 if (!udc->driver || (udc->gadget.speed == USB_SPEED_UNKNOWN))
1642 dma_unmap_single(udc_controller->gadget.dev.parent,
1648 udc_controller->gadget.dev.parent,
1706 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN)
1713 req->req.dma = dma_map_single(ep->udc->gadget.dev.parent,
1721 dma_sync_single_for_device(ep->udc->gadget.dev.parent,
1733 dev_vdbg(udc->dev, "gadget have request in %s! %d\n",
1864 static int qe_get_frame(struct usb_gadget *gadget)
1877 /* Tries to wake up the host connected to this gadget
1882 static int qe_wakeup(struct usb_gadget *gadget)
1889 static int qe_vbus_session(struct usb_gadget *gadget, int is_active)
1895 * This call is used by gadget drivers during SET_CONFIGURATION calls,
1901 static int qe_vbus_draw(struct usb_gadget *gadget, unsigned mA)
1909 static int qe_pullup(struct usb_gadget *gadget, int is_on)
1945 udc->driver->disconnect(&udc->gadget);
2101 /* Data phase from gadget, status phase from udc */
2110 if (udc->driver->setup(&udc->gadget,
2115 /* No data phase, IN status from gadget */
2118 if (udc->driver->setup(&udc->gadget,
2136 udc->driver->suspend(&udc->gadget);
2146 udc->driver->resume(&udc->gadget);
2331 udc_controller->gadget.dev.driver = &driver->driver;
2332 udc_controller->gadget.speed = (enum usb_device_speed)(driver->speed);
2335 retval = driver->bind(&udc_controller->gadget);
2339 udc_controller->gadget.dev.driver = NULL;
2353 udc_controller->gadget.name, driver->driver.name);
2379 udc_controller->gadget.speed = USB_SPEED_UNKNOWN;
2381 list_for_each_entry(loop_ep, &udc_controller->gadget.ep_list,
2387 driver->disconnect(&udc_controller->gadget);
2389 /* unbind gadget and unhook driver. */
2390 driver->unbind(&udc_controller->gadget);
2391 udc_controller->gadget.dev.driver = NULL;
2394 dev_info(udc_controller->dev, "unregistered gadget driver '%s'\r\n",
2502 list_add_tail(&ep->ep.ep_list, &udc->gadget.ep_list);
2504 ep->gadget = &udc->gadget;
2557 udc_controller->gadget.ops = &qe_gadget_ops;
2559 /* gadget.ep0 is a pointer */
2560 udc_controller->gadget.ep0 = &udc_controller->eps[0].ep;
2562 INIT_LIST_HEAD(&udc_controller->gadget.ep_list);
2564 /* modify in register gadget process */
2565 udc_controller->gadget.speed = USB_SPEED_UNKNOWN;
2568 udc_controller->gadget.name = driver_name;
2570 device_initialize(&udc_controller->gadget.dev);
2572 dev_set_name(&udc_controller->gadget.dev, "gadget");
2574 udc_controller->gadget.dev.release = qe_udc_release;
2575 udc_controller->gadget.dev.parent = &ofdev->dev;
2583 * into gadget.ep_list */
2610 udc_controller->gadget.dev.parent,
2616 dma_sync_single_for_device(udc_controller->gadget.dev.parent,
2638 ret = device_add(&udc_controller->gadget.dev);
2653 dma_unmap_single(udc_controller->gadget.dev.parent,
2658 dma_sync_single_for_cpu(udc_controller->gadget.dev.parent,
2705 dma_unmap_single(udc_controller->gadget.dev.parent,
2710 dma_sync_single_for_cpu(udc_controller->gadget.dev.parent,
2723 dma_unmap_single(udc_controller->gadget.dev.parent,
2728 dma_sync_single_for_cpu(udc_controller->gadget.dev.parent,
2743 device_unregister(&udc_controller->gadget.dev);
2744 /* wait for release() of gadget.dev to free udc */