/drivers/usb/gadget/udc/ |
D | udc-core.c | 44 struct usb_gadget *gadget; member 57 int usb_gadget_map_request(struct usb_gadget *gadget, in usb_gadget_map_request() argument 66 mapped = dma_map_sg(&gadget->dev, req->sg, req->num_sgs, in usb_gadget_map_request() 69 dev_err(&gadget->dev, "failed to map SGs\n"); in usb_gadget_map_request() 75 req->dma = dma_map_single(&gadget->dev, req->buf, req->length, in usb_gadget_map_request() 78 if (dma_mapping_error(&gadget->dev, req->dma)) { in usb_gadget_map_request() 79 dev_err(&gadget->dev, "failed to map buffer\n"); in usb_gadget_map_request() 88 void usb_gadget_unmap_request(struct usb_gadget *gadget, in usb_gadget_unmap_request() argument 95 dma_unmap_sg(&gadget->dev, req->sg, req->num_mapped_sgs, in usb_gadget_unmap_request() 100 dma_unmap_single(&gadget->dev, req->dma, req->length, in usb_gadget_unmap_request() [all …]
|
D | s3c-hsudc.c | 144 struct usb_gadget gadget; member 176 static inline struct s3c_hsudc *to_hsudc(struct usb_gadget *gadget) in to_hsudc() argument 178 return container_of(gadget, struct s3c_hsudc, gadget); in to_hsudc() 294 hsudc->gadget.speed = USB_SPEED_UNKNOWN; in s3c_hsudc_stop_activity() 669 ret = hsudc->driver->setup(&hsudc->gadget, &ctrl); in s3c_hsudc_process_setup() 772 if (!hsudc->driver || hsudc->gadget.speed == USB_SPEED_UNKNOWN) in s3c_hsudc_ep_enable() 883 if (!hsudc->driver || hsudc->gadget.speed == USB_SPEED_UNKNOWN) in s3c_hsudc_queue() 997 list_add_tail(&hsep->ep.ep_list, &hsudc->gadget.ep_list); in s3c_hsudc_initep() 1023 INIT_LIST_HEAD(&hsudc->gadget.ep_list); in s3c_hsudc_setup_ep() 1081 hsudc->gadget.speed = (sys_status & S3C_SSR_HSP) ? in s3c_hsudc_irq() [all …]
|
D | dummy_hcd.c | 86 struct usb_gadget *gadget; member 194 struct usb_gadget gadget; member 226 return dum->gadget.dev.parent; in udc_dev() 231 return container_of(ep->gadget, struct dummy, gadget); in ep_to_dummy() 234 static inline struct dummy_hcd *gadget_to_dummy_hcd(struct usb_gadget *gadget) in gadget_to_dummy_hcd() argument 236 struct dummy *dum = container_of(gadget, struct dummy, gadget); in gadget_to_dummy_hcd() 237 if (dum->gadget.speed == USB_SPEED_SUPER) in gadget_to_dummy_hcd() 245 return container_of(dev, struct dummy, gadget.dev); in gadget_dev_to_dummy() 279 list_for_each_entry(ep, &dum->gadget.ep_list, ep.ep_list) in stop_activity() 361 dum->gadget.speed != USB_SPEED_SUPER) || in set_link_state() [all …]
|
D | bcm63xx_udc.c | 287 struct usb_gadget gadget; member 330 return container_of(g, struct bcm63xx_udc, gadget); in gadget_to_udc() 452 int is_hs = udc->gadget.speed == USB_SPEED_HIGH; in bcm63xx_fifo_setup() 549 int max_pkt = udc->gadget.speed == USB_SPEED_HIGH ? in bcm63xx_ep_setup() 942 INIT_LIST_HEAD(&udc->gadget.ep_list); in bcm63xx_init_udc_hw() 949 list_add_tail(&bep->ep.ep_list, &udc->gadget.ep_list); in bcm63xx_init_udc_hw() 957 udc->gadget.ep0 = &udc->bep[0].ep; in bcm63xx_init_udc_hw() 960 udc->gadget.speed = USB_SPEED_UNKNOWN; in bcm63xx_init_udc_hw() 986 if (udc->gadget.max_speed == USB_SPEED_HIGH) in bcm63xx_init_udc_hw() 1085 usb_gadget_unmap_request(&udc->gadget, &breq->req, in bcm63xx_ep_disable() [all …]
|
D | mv_udc_core.c | 241 usb_gadget_unmap_request(&udc->gadget, &req->req, ep_dir(ep)); in done() 462 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) in mv_ep_enable() 715 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) in mv_ep_queue() 721 retval = usb_gadget_map_request(&udc->gadget, _req, ep_dir(ep)); in mv_ep_queue() 757 usb_gadget_unmap_request(&udc->gadget, _req, ep_dir(ep)); in mv_ep_queue() 1120 static int mv_udc_get_frame(struct usb_gadget *gadget) in mv_udc_get_frame() argument 1125 if (!gadget) in mv_udc_get_frame() 1128 udc = container_of(gadget, struct mv_udc, gadget); in mv_udc_get_frame() 1136 static int mv_udc_wakeup(struct usb_gadget *gadget) in mv_udc_wakeup() argument 1138 struct mv_udc *udc = container_of(gadget, struct mv_udc, gadget); in mv_udc_wakeup() [all …]
|
D | fsl_udc_core.c | 190 usb_gadget_unmap_request(&ep->udc->gadget, &req->req, ep_is_in(ep)); in done() 390 if (udc->gadget.is_otg) { in dr_controller_stop() 565 if (!udc->driver || (udc->gadget.speed == USB_SPEED_UNKNOWN)) in fsl_ep_enable() 896 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) in fsl_ep_queue() 901 ret = usb_gadget_map_request(&ep->udc->gadget, &req->req, ep_is_in(ep)); in fsl_ep_queue() 1065 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) in fsl_ep_fifo_status() 1144 static int fsl_get_frame(struct usb_gadget *gadget) in fsl_get_frame() argument 1152 static int fsl_wakeup(struct usb_gadget *gadget) in fsl_wakeup() argument 1154 struct fsl_udc *udc = container_of(gadget, struct fsl_udc, gadget); in fsl_wakeup() 1178 static int fsl_vbus_session(struct usb_gadget *gadget, int is_active) in fsl_vbus_session() argument [all …]
|
D | gr_udc.c | 195 usb_state_string(dev->gadget.state)); in gr_seq_show() 318 usb_gadget_unmap_request(&dev->gadget, &req->req, ep->is_in); in gr_finish_request() 614 if (unlikely(!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)) { in gr_queue() 626 ret = usb_gadget_map_request(&dev->gadget, &req->req, ep->is_in); in gr_queue() 805 usb_gadget_set_state(&dev->gadget, USB_STATE_NOTATTACHED); in gr_stop_activity() 918 usb_gadget_set_state(&dev->gadget, USB_STATE_ADDRESS); in gr_device_request() 920 usb_gadget_set_state(&dev->gadget, USB_STATE_DEFAULT); in gr_device_request() 968 if (dev->gadget.state != USB_STATE_CONFIGURED) in gr_interface_request() 1011 if (dev->gadget.state != USB_STATE_CONFIGURED && epnum != 0) in gr_endpoint_request() 1149 status = dev->driver->setup(&dev->gadget, &u.ctrl); in gr_ep0_setup() [all …]
|
D | atmel_usba_udc.c | 262 root = debugfs_create_dir(udc->gadget.name, NULL); in usba_init_debugfs() 276 usba_ep_init_debugfs(udc, to_usba_ep(udc->gadget.ep0)); in usba_init_debugfs() 289 usba_ep_cleanup_debugfs(to_usba_ep(udc->gadget.ep0)); in usba_cleanup_debugfs() 491 usb_gadget_unmap_request(&udc->gadget, &req->req, ep->is_in); in request_complete() 643 if (udc->gadget.speed != USB_SPEED_UNKNOWN) in usba_ep_disable() 712 ret = usb_gadget_map_request(&udc->gadget, &req->req, ep->is_in); in queue_dma() 755 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN || in usba_ep_queue() 957 static int usba_udc_get_frame(struct usb_gadget *gadget) in usba_udc_get_frame() argument 959 struct usba_udc *udc = to_usba_udc(gadget); in usba_udc_get_frame() 964 static int usba_udc_wakeup(struct usb_gadget *gadget) in usba_udc_wakeup() argument [all …]
|
D | fsl_qe_udc.c | 98 dma_unmap_single(udc->gadget.dev.parent, in done() 106 dma_sync_single_for_cpu(udc->gadget.dev.parent, in done() 447 ep->rxbuf_d = dma_map_single(ep->udc->gadget.dev.parent, in qe_ep_rxbd_update() 453 dma_sync_single_for_device(ep->udc->gadget.dev.parent, in qe_ep_rxbd_update() 548 switch (udc->gadget.speed) { in qe_ep_init() 569 switch (udc->gadget.speed) { in qe_ep_init() 586 switch (udc->gadget.speed) { in qe_ep_init() 601 switch (udc->gadget.speed) { in qe_ep_init() 1601 if (!udc->driver || (udc->gadget.speed == USB_SPEED_UNKNOWN)) in qe_ep_enable() 1652 dma_unmap_single(udc->gadget.dev.parent, in qe_ep_disable() [all …]
|
D | omap_udc.c | 195 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) { in omap_ep_enable() 305 usb_gadget_unmap_request(&udc->gadget, &req->req, in done() 904 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) in omap_ep_queue() 908 usb_gadget_map_request(&udc->gadget, &req->req, in omap_ep_queue() 1132 static int omap_get_frame(struct usb_gadget *gadget) in omap_get_frame() argument 1138 static int omap_wakeup(struct usb_gadget *gadget) in omap_wakeup() argument 1144 udc = container_of(gadget, struct omap_udc, gadget); in omap_wakeup() 1168 omap_set_selfpowered(struct usb_gadget *gadget, int is_selfpowered) in omap_set_selfpowered() argument 1174 udc = container_of(gadget, struct omap_udc, gadget); in omap_set_selfpowered() 1199 if (!gadget_is_otg(&udc->gadget) && !cpu_is_omap15xx()) { in pullup_enable() [all …]
|
D | at91_udc.c | 213 list_for_each_entry (ep, &udc->gadget.ep_list, ep.ep_list) { in proc_udc_show() 486 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) { in at91_ep_enable() 625 if (!udc || !udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) { in at91_ep_queue() 785 static int at91_get_frame(struct usb_gadget *gadget) in at91_get_frame() argument 787 struct at91_udc *udc = to_udc(gadget); in at91_get_frame() 789 if (!to_udc(gadget)->clocked) in at91_get_frame() 794 static int at91_wakeup(struct usb_gadget *gadget) in at91_wakeup() argument 796 struct at91_udc *udc = to_udc(gadget); in at91_wakeup() 825 INIT_LIST_HEAD(&udc->gadget.ep_list); in udc_reinit() 826 INIT_LIST_HEAD(&udc->gadget.ep0->ep_list); in udc_reinit() [all …]
|
/drivers/usb/gadget/ |
D | epautoconf.c | 43 struct usb_gadget *gadget, in ep_matches() argument 84 if (gadget_is_pxa (gadget) in ep_matches() 118 if (ep_comp && gadget->max_speed >= USB_SPEED_SUPER) { in ep_matches() 141 if (!gadget_is_dualspeed(gadget) && max > 64) in ep_matches() 149 if (!gadget_is_dualspeed(gadget) && max > 1023) in ep_matches() 154 if (!gadget_is_dualspeed(gadget)) in ep_matches() 169 if (++gadget->in_epnum > 15) in ep_matches() 171 desc->bEndpointAddress = USB_DIR_IN | gadget->in_epnum; in ep_matches() 173 if (++gadget->out_epnum > 15) in ep_matches() 175 desc->bEndpointAddress |= gadget->out_epnum; in ep_matches() [all …]
|
D | composite.c | 285 status = usb_gadget_disconnect(cdev->gadget); in usb_function_deactivate() 317 status = usb_gadget_connect(cdev->gadget); in usb_function_activate() 444 struct usb_gadget *gadget = cdev->gadget; in config_desc() local 450 if (gadget->speed == USB_SPEED_SUPER) in config_desc() 451 speed = gadget->speed; in config_desc() 452 else if (gadget_is_dualspeed(gadget)) { in config_desc() 454 if (gadget->speed == USB_SPEED_HIGH) in config_desc() 503 struct usb_gadget *gadget = cdev->gadget; in count_configs() local 509 if (gadget_is_dualspeed(gadget)) { in count_configs() 510 if (gadget->speed == USB_SPEED_HIGH) in count_configs() [all …]
|
D | Kconfig | 4 # (b) the gadget driver using it. 35 peripheral/device side bus controller, and a "gadget driver" for 36 your peripheral protocol. (If you use modular gadget drivers, 42 For more information, see <http://www.linux-usb.org/gadget> and 51 Many controller and gadget drivers will print some debugging 65 Many controller and gadget drivers will print verbose debugging 79 Some of the drivers in the "gadget" framework can expose 90 Some of the drivers in the "gadget" framework can expose 111 This value will be used except for system-specific gadget 130 source "drivers/usb/gadget/udc/Kconfig" [all …]
|
/drivers/usb/gadget/legacy/ |
D | dbgp.c | 26 struct usb_gadget *gadget; member 82 if (ep && ep->driver_data == dbgp.gadget) { in __disable_ep() 126 dev_dbg(&dbgp.gadget->dev, in dbgp_complete() 164 dev_dbg(&dbgp.gadget->dev, in dbgp_enable_ep_req() 174 ep->driver_data = dbgp.gadget; in __enable_ep() 207 dev_dbg(&dbgp.gadget->dev, "enable ep: failure (%d:%d)\n", stp, err); in dbgp_enable_ep() 212 static void dbgp_disconnect(struct usb_gadget *gadget) in dbgp_disconnect() argument 221 static void dbgp_unbind(struct usb_gadget *gadget) in dbgp_unbind() argument 229 usb_ep_free_request(gadget->ep0, dbgp.req); in dbgp_unbind() 233 gadget->ep0->driver_data = NULL; in dbgp_unbind() [all …]
|
D | inode.c | 138 struct usb_gadget *gadget; member 849 switch (data->dev->gadget->speed) { in ep_config() 1015 (void) usb_ep_set_halt (dev->gadget->ep0); in ep0_read() 1020 struct usb_ep *ep = dev->gadget->ep0; in ep0_read() 1036 if (gadget_is_dualspeed(dev->gadget) in ep0_read() 1037 && (dev->gadget->speed in ep0_read() 1042 usb_gadget_vbus_draw(dev->gadget, 2 * power); in ep0_read() 1078 clean_req (dev->gadget->ep0, dev->req); in ep0_read() 1220 retval = setup_req (dev->gadget->ep0, dev->req, len); in ep0_write() 1231 dev->gadget->ep0, dev->req, in ep0_write() [all …]
|
D | ether.c | 231 if (gadget_is_otg(c->cdev->gadget)) { in rndis_do_config() 273 if (gadget_is_otg(c->cdev->gadget)) { in eth_do_config() 288 } else if (can_support_ecm(c->cdev->gadget)) { in eth_do_config() 323 struct usb_gadget *gadget = cdev->gadget; in eth_bind() local 344 } else if (can_support_ecm(gadget)) { in eth_bind() 384 gether_set_gadget(net, cdev->gadget); in eth_bind() 391 else if (can_support_ecm(gadget)) in eth_bind() 432 dev_info(&gadget->dev, "%s, version: " DRIVER_VERSION "\n", in eth_bind() 443 else if (can_support_ecm(gadget)) in eth_bind() 459 } else if (can_support_ecm(cdev->gadget)) { in eth_unbind()
|
D | cdc2.c | 111 if (gadget_is_otg(c->cdev->gadget)) { in cdc_do_config() 158 struct usb_gadget *gadget = cdev->gadget; in cdc_bind() local 162 if (!can_support_ecm(cdev->gadget)) { in cdc_bind() 163 dev_err(&gadget->dev, "controller '%s' not usable\n", in cdc_bind() 164 gadget->name); in cdc_bind() 202 dev_info(&gadget->dev, "%s, version: " DRIVER_VERSION "\n", in cdc_bind()
|
/drivers/usb/phy/ |
D | phy-gpio-vbus-usb.c | 107 if (!gpio_vbus->phy.otg->gadget) in gpio_vbus_work() 126 usb_gadget_vbus_connect(gpio_vbus->phy.otg->gadget); in gpio_vbus_work() 136 status, gpio_vbus->phy.otg->gadget); in gpio_vbus_work() 144 usb_gadget_vbus_disconnect(gpio_vbus->phy.otg->gadget); in gpio_vbus_work() 150 status, gpio_vbus->phy.otg->gadget); in gpio_vbus_work() 164 otg->gadget ? otg->gadget->name : "none"); in gpio_vbus_irq() 166 if (otg->gadget) in gpio_vbus_irq() 176 struct usb_gadget *gadget) in gpio_vbus_set_peripheral() argument 188 if (!gadget) { in gpio_vbus_set_peripheral() 190 otg->gadget->name); in gpio_vbus_set_peripheral() [all …]
|
D | phy-tahvo.c | 87 if (tu->phy.otg->gadget) in check_vbus_state() 88 usb_gadget_vbus_connect(tu->phy.otg->gadget); in check_vbus_state() 105 if (tu->phy.otg->gadget) in check_vbus_state() 106 usb_gadget_vbus_disconnect(tu->phy.otg->gadget); in check_vbus_state() 161 if (tu->phy.otg->gadget) in tahvo_usb_stop_peripheral() 162 usb_gadget_vbus_disconnect(tu->phy.otg->gadget); in tahvo_usb_stop_peripheral() 171 if (tu->phy.otg->gadget) in tahvo_usb_power_off() 172 usb_gadget_vbus_disconnect(tu->phy.otg->gadget); in tahvo_usb_power_off() 226 struct usb_gadget *gadget) in tahvo_usb_set_peripheral() argument 230 dev_dbg(&tu->pt_dev->dev, "%s %p\n", __func__, gadget); in tahvo_usb_set_peripheral() [all …]
|
/drivers/usb/chipidea/ |
D | udc.c | 429 ret = usb_gadget_map_request(&ci->gadget, &hwreq->req, hwep->dir); in _hardware_enqueue() 585 usb_gadget_unmap_request(&hwep->ci->gadget, &hwreq->req, hwep->dir); in _hardware_dequeue() 685 static int _gadget_stop_activity(struct usb_gadget *gadget) in _gadget_stop_activity() argument 688 struct ci_hdrc *ci = container_of(gadget, struct ci_hdrc, gadget); in _gadget_stop_activity() 692 ci->gadget.speed = USB_SPEED_UNKNOWN; in _gadget_stop_activity() 698 gadget_for_each_ep(ep, gadget) { in _gadget_stop_activity() 705 gadget_for_each_ep(ep, gadget) { in _gadget_stop_activity() 733 if (ci->gadget.speed != USB_SPEED_UNKNOWN) { in isr_reset_handler() 735 ci->driver->disconnect(&ci->gadget); in isr_reset_handler() 738 retval = _gadget_stop_activity(&ci->gadget); in isr_reset_handler() [all …]
|
/drivers/usb/renesas_usbhs/ |
D | mod_gadget.c | 46 struct usb_gadget gadget; member 91 container_of(g, struct usbhsg_gpriv, gadget) 110 #define usbhsg_is_not_connected(gp) ((gp)->gadget.speed == USB_SPEED_UNKNOWN) 205 ret = usb_gadget_map_request(&gpriv->gadget, req, dir); in usbhsg_dma_map_ctrl() 211 usb_gadget_unmap_request(&gpriv->gadget, req, dir); in usbhsg_dma_map_ctrl() 465 gpriv->gadget.speed = usbhs_bus_get_speed(priv); in usbhsg_irq_dev_state() 469 gpriv->gadget.speed); in usbhsg_irq_dev_state() 537 ret = gpriv->driver->setup(&gpriv->gadget, &ctrl); in usbhsg_irq_ctrl_stage() 849 gpriv->gadget.speed = USB_SPEED_UNKNOWN; in usbhsg_try_stop() 867 static int usbhsg_gadget_start(struct usb_gadget *gadget, in usbhsg_gadget_start() argument [all …]
|
/drivers/usb/gadget/function/ |
D | f_obex.c | 204 dev_dbg(&cdev->gadget->dev, in obex_set_alt() 212 dev_dbg(&cdev->gadget->dev, in obex_set_alt() 218 dev_dbg(&cdev->gadget->dev, in obex_set_alt() 220 if (config_ep_by_speed(cdev->gadget, f, in obex_set_alt() 222 config_ep_by_speed(cdev->gadget, f, in obex_set_alt() 231 dev_dbg(&cdev->gadget->dev, in obex_set_alt() 259 dev_dbg(&cdev->gadget->dev, "obex ttyGS%d disable\n", obex->port_num); in obex_disable() 276 dev_dbg(&cdev->gadget->dev, in obex_connect() 292 dev_dbg(&cdev->gadget->dev, in obex_disconnect() 307 if (!gadget_supports_altsettings(c->cdev->gadget)) in can_support_obex() [all …]
|
D | f_acm.c | 316 dev_dbg(&cdev->gadget->dev, "acm ttyGS%d completion, err %d\n", in acm_complete_set_line_coding() 323 dev_dbg(&cdev->gadget->dev, "acm ttyGS%d short resp, len %d\n", in acm_complete_set_line_coding() 368 cdev->gadget->ep0->driver_data = acm; in acm_setup() 400 dev_vdbg(&cdev->gadget->dev, in acm_setup() 408 dev_dbg(&cdev->gadget->dev, in acm_setup() 414 value = usb_ep_queue(cdev->gadget->ep0, req, GFP_ATOMIC); in acm_setup() 433 dev_vdbg(&cdev->gadget->dev, in acm_set_alt() 439 if (config_ep_by_speed(cdev->gadget, f, acm->notify)) in acm_set_alt() 447 dev_dbg(&cdev->gadget->dev, in acm_set_alt() 452 dev_dbg(&cdev->gadget->dev, in acm_set_alt() [all …]
|
D | f_serial.c | 158 dev_dbg(&cdev->gadget->dev, in gser_set_alt() 163 dev_dbg(&cdev->gadget->dev, in gser_set_alt() 165 if (config_ep_by_speed(cdev->gadget, f, gser->port.in) || in gser_set_alt() 166 config_ep_by_speed(cdev->gadget, f, gser->port.out)) { in gser_set_alt() 181 dev_dbg(&cdev->gadget->dev, in gser_disable() 219 ep = usb_ep_autoconfig(cdev->gadget, &gser_fs_in_desc); in gser_bind() 225 ep = usb_ep_autoconfig(cdev->gadget, &gser_fs_out_desc); in gser_bind() 245 dev_dbg(&cdev->gadget->dev, "generic ttyGS%d: %s speed IN/%s OUT/%s\n", in gser_bind() 247 gadget_is_superspeed(c->cdev->gadget) ? "super" : in gser_bind() 248 gadget_is_dualspeed(c->cdev->gadget) ? "dual" : "full", in gser_bind()
|