/linux-4.1.27/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 | 282 status = usb_gadget_disconnect(cdev->gadget); in usb_function_deactivate() 314 status = usb_gadget_connect(cdev->gadget); in usb_function_activate() 441 struct usb_gadget *gadget = cdev->gadget; in config_desc() local 447 if (gadget->speed == USB_SPEED_SUPER) in config_desc() 448 speed = gadget->speed; in config_desc() 449 else if (gadget_is_dualspeed(gadget)) { in config_desc() 451 if (gadget->speed == USB_SPEED_HIGH) in config_desc() 500 struct usb_gadget *gadget = cdev->gadget; in count_configs() local 506 if (gadget_is_dualspeed(gadget)) { in count_configs() 507 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 …]
|
D | configfs.c | 1292 dev_err(&gi->cdev.gadget->dev, "unbind function" in purge_configs_funcs() 1305 static int configfs_composite_bind(struct usb_gadget *gadget, in configfs_composite_bind() argument 1318 cdev->gadget = gadget; in configfs_composite_bind() 1319 set_gadget_data(gadget, cdev); in configfs_composite_bind() 1412 usb_ep_autoconfig_reset(cdev->gadget); in configfs_composite_bind() 1415 ret = composite_os_desc_req_prepare(cdev, gadget->ep0); in configfs_composite_bind() 1420 usb_ep_autoconfig_reset(cdev->gadget); in configfs_composite_bind() 1430 static void configfs_composite_unbind(struct usb_gadget *gadget) in configfs_composite_unbind() argument 1437 cdev = get_gadget_data(gadget); in configfs_composite_unbind() 1442 usb_ep_autoconfig_reset(cdev->gadget); in configfs_composite_unbind() [all …]
|
D | Makefile | 6 ccflags-y += -I$(srctree)/drivers/usb/gadget/udc
|
D | config.c | 167 struct usb_gadget *g = f->config->cdev->gadget; in usb_assign_descriptors()
|
/linux-4.1.27/include/linux/usb/ |
D | gadget.h | 574 static inline void set_gadget_data(struct usb_gadget *gadget, void *data) in set_gadget_data() argument 575 { dev_set_drvdata(&gadget->dev, data); } in set_gadget_data() 576 static inline void *get_gadget_data(struct usb_gadget *gadget) in get_gadget_data() argument 577 { return dev_get_drvdata(&gadget->dev); } in get_gadget_data() 584 #define gadget_for_each_ep(tmp, gadget) \ argument 585 list_for_each_entry(tmp, &(gadget)->ep_list, ep_list) 646 static inline int usb_gadget_frame_number(struct usb_gadget *gadget) in usb_gadget_frame_number() argument 648 return gadget->ops->get_frame(gadget); in usb_gadget_frame_number() 664 static inline int usb_gadget_wakeup(struct usb_gadget *gadget) in usb_gadget_wakeup() argument 666 if (!gadget->ops->wakeup) in usb_gadget_wakeup() [all …]
|
D | composite.h | 462 struct usb_gadget *gadget; member 509 extern void composite_disconnect(struct usb_gadget *gadget); 510 extern int composite_setup(struct usb_gadget *gadget, 512 extern void composite_suspend(struct usb_gadget *gadget); 513 extern void composite_resume(struct usb_gadget *gadget); 617 dev_dbg(&(d)->gadget->dev , fmt , ## args) 619 dev_vdbg(&(d)->gadget->dev , fmt , ## args) 621 dev_err(&(d)->gadget->dev , fmt , ## args) 623 dev_warn(&(d)->gadget->dev , fmt , ## args) 625 dev_info(&(d)->gadget->dev , fmt , ## args)
|
D | otg.h | 22 struct usb_gadget *gadget; member 31 struct usb_gadget *gadget);
|
/linux-4.1.27/drivers/usb/gadget/udc/ |
D | udc-core.c | 46 struct usb_gadget *gadget; member 60 int usb_gadget_map_request(struct usb_gadget *gadget, in usb_gadget_map_request() argument 69 mapped = dma_map_sg(&gadget->dev, req->sg, req->num_sgs, in usb_gadget_map_request() 72 dev_err(&gadget->dev, "failed to map SGs\n"); in usb_gadget_map_request() 78 req->dma = dma_map_single(&gadget->dev, req->buf, req->length, in usb_gadget_map_request() 81 if (dma_mapping_error(&gadget->dev, req->dma)) { in usb_gadget_map_request() 82 dev_err(&gadget->dev, "failed to map buffer\n"); in usb_gadget_map_request() 91 void usb_gadget_unmap_request(struct usb_gadget *gadget, in usb_gadget_unmap_request() argument 98 dma_unmap_sg(&gadget->dev, req->sg, req->num_mapped_sgs, in usb_gadget_unmap_request() 103 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 | at91_udc.c | 180 udc->gadget.is_selfpowered ? "self" : "VBUS", in proc_udc_show() 214 list_for_each_entry (ep, &udc->gadget.ep_list, ep.ep_list) { in proc_udc_show() 487 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) { in at91_ep_enable() 626 if (!udc || !udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) { in at91_ep_queue() 786 static int at91_get_frame(struct usb_gadget *gadget) in at91_get_frame() argument 788 struct at91_udc *udc = to_udc(gadget); in at91_get_frame() 790 if (!to_udc(gadget)->clocked) in at91_get_frame() 795 static int at91_wakeup(struct usb_gadget *gadget) in at91_wakeup() argument 797 struct at91_udc *udc = to_udc(gadget); in at91_wakeup() 826 INIT_LIST_HEAD(&udc->gadget.ep_list); in udc_reinit() [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 | dummy_hcd.c | 86 struct usb_gadget *gadget; member 192 struct usb_gadget gadget; member 224 return dum->gadget.dev.parent; in udc_dev() 229 return container_of(ep->gadget, struct dummy, gadget); in ep_to_dummy() 232 static inline struct dummy_hcd *gadget_to_dummy_hcd(struct usb_gadget *gadget) in gadget_to_dummy_hcd() argument 234 struct dummy *dum = container_of(gadget, struct dummy, gadget); in gadget_to_dummy_hcd() 235 if (dum->gadget.speed == USB_SPEED_SUPER) in gadget_to_dummy_hcd() 243 return container_of(dev, struct dummy, gadget.dev); in gadget_dev_to_dummy() 277 list_for_each_entry(ep, &dum->gadget.ep_list, ep.ep_list) in stop_activity() 359 dum->gadget.speed != USB_SPEED_SUPER) || in set_link_state() [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 | 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 | 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 | gadget_chips.h | 41 static inline bool gadget_supports_altsettings(struct usb_gadget *gadget) in gadget_supports_altsettings() argument 44 if (gadget_is_pxa(gadget)) in gadget_supports_altsettings() 48 if (gadget_is_pxa27x(gadget)) in gadget_supports_altsettings()
|
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 gadget->is_selfpowered = (is_selfpowered != 0); in omap_set_selfpowered() 1175 udc = container_of(gadget, struct omap_udc, gadget); in omap_set_selfpowered() [all …]
|
D | atmel_usba_udc.c | 263 root = debugfs_create_dir(udc->gadget.name, NULL); in usba_init_debugfs() 280 usba_ep_init_debugfs(udc, to_usba_ep(udc->gadget.ep0)); in usba_init_debugfs() 293 usba_ep_cleanup_debugfs(to_usba_ep(udc->gadget.ep0)); in usba_cleanup_debugfs() 501 usb_gadget_unmap_request(&udc->gadget, &req->req, ep->is_in); in request_complete() 651 if (udc->gadget.speed != USB_SPEED_UNKNOWN) in usba_ep_disable() 719 ret = usb_gadget_map_request(&udc->gadget, &req->req, ep->is_in); in queue_dma() 762 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN || in usba_ep_queue() 964 static int usba_udc_get_frame(struct usb_gadget *gadget) in usba_udc_get_frame() argument 966 struct usba_udc *udc = to_usba_udc(gadget); in usba_udc_get_frame() 971 static int usba_udc_wakeup(struct usb_gadget *gadget) in usba_udc_wakeup() argument [all …]
|
D | pch_udc.c | 352 struct usb_gadget gadget; member 379 #define to_pch_udc(g) (container_of((g), struct pch_udc_dev, gadget)) 624 dev->driver->disconnect(&dev->gadget); in pch_udc_vbus_session() 1116 static int pch_udc_pcd_get_frame(struct usb_gadget *gadget) in pch_udc_pcd_get_frame() argument 1120 if (!gadget) in pch_udc_pcd_get_frame() 1122 dev = container_of(gadget, struct pch_udc_dev, gadget); in pch_udc_pcd_get_frame() 1134 static int pch_udc_pcd_wakeup(struct usb_gadget *gadget) in pch_udc_pcd_wakeup() argument 1139 if (!gadget) in pch_udc_pcd_wakeup() 1141 dev = container_of(gadget, struct pch_udc_dev, gadget); in pch_udc_pcd_wakeup() 1158 static int pch_udc_pcd_selfpowered(struct usb_gadget *gadget, int value) in pch_udc_pcd_selfpowered() argument [all …]
|
D | udc-xilinx.c | 110 #define to_udc(g) container_of((g), struct xusb_udc, gadget) 183 struct usb_gadget gadget; member 567 usb_gadget_unmap_request(&udc->gadget, &req->usb_req, in xudc_done() 909 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) { in xudc_ep_enable() 1011 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) { in __xudc_ep0_queue() 1095 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) { in xudc_ep_queue() 1106 ret = usb_gadget_map_request(&udc->gadget, &req->usb_req, in xudc_ep_queue() 1219 static int xudc_get_frame(struct usb_gadget *gadget) in xudc_get_frame() argument 1224 if (!gadget) in xudc_get_frame() 1227 udc = to_udc(gadget); in xudc_get_frame() [all …]
|
D | s3c2410_udc.c | 714 ret = dev->driver->setup(&dev->gadget, crq); in s3c2410_udc_handle_ep0_idle() 916 dev->gadget.speed = USB_SPEED_UNKNOWN; in s3c2410_udc_irq() 923 dev->gadget.speed = USB_SPEED_FULL; in s3c2410_udc_irq() 942 if (dev->gadget.speed != USB_SPEED_UNKNOWN in s3c2410_udc_irq() 945 dev->driver->resume(&dev->gadget); in s3c2410_udc_irq() 956 if (dev->gadget.speed != USB_SPEED_UNKNOWN in s3c2410_udc_irq() 959 dev->driver->suspend(&dev->gadget); in s3c2410_udc_irq() 1018 static inline struct s3c2410_udc *to_s3c2410_udc(struct usb_gadget *gadget) in to_s3c2410_udc() argument 1020 return container_of(gadget, struct s3c2410_udc, gadget); in to_s3c2410_udc() 1049 if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) in s3c2410_udc_ep_enable() [all …]
|
D | s3c2410_udc.h | 20 struct usb_gadget *gadget; member 81 struct usb_gadget gadget; member 98 #define to_s3c2410(g) (container_of((g), struct s3c2410_udc, gadget))
|
D | pxa25x_udc.c | 245 if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) { in pxa25x_ep_enable() 651 || dev->gadget.speed == USB_SPEED_UNKNOWN)) { in pxa25x_ep_queue() 852 if (ep->dev->gadget.speed == USB_SPEED_UNKNOWN in pxa25x_ep_fifo_status() 940 if (udc->gadget.speed != USB_SPEED_UNKNOWN) { in pullup() 961 udc = container_of(_gadget, struct pxa25x_udc, gadget); in pxa25x_udc_vbus_session() 973 udc = container_of(_gadget, struct pxa25x_udc, gadget); in pxa25x_udc_pullup() 992 udc = container_of(_gadget, struct pxa25x_udc, gadget); in pxa25x_udc_vbus_draw() 1032 dev->gadget.speed == USB_SPEED_FULL ? "full speed" : "disconnected"); in udc_seq_show() 1071 if (dev->gadget.speed != USB_SPEED_FULL || !dev->driver) in udc_seq_show() 1134 dev->debugfs_udc = debugfs_create_file(dev->gadget.name, \ [all …]
|
D | Kconfig | 4 # (b) the gadget driver using it. 24 # - debug/dummy gadget+hcd is last. 43 gadget drivers to also be dynamically linked. 54 gadget drivers to also be dynamically linked. 87 all gadget drivers to also be dynamically linked. 126 gadget drivers to also be dynamically linked. 141 gadget drivers to also be dynamically linked. 143 # if there's only one gadget driver, using only two bulk endpoints, 163 gadget drivers to also be dynamically linked. 175 gadget drivers to also be dynamically linked. [all …]
|
D | net2272.c | 202 if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) in net2272_enable() 224 if ((dev->gadget.speed == USB_SPEED_HIGH && max != 512) || in net2272_enable() 225 (dev->gadget.speed == USB_SPEED_FULL && max > 64)) { in net2272_enable() 386 usb_gadget_unmap_request(&dev->gadget, &req->req, in net2272_done() 843 if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) in net2272_queue() 848 status = usb_gadget_map_request(&dev->gadget, _req, in net2272_queue() 993 if (!ep->dev->driver || ep->dev->gadget.speed == USB_SPEED_UNKNOWN) in net2272_set_halt_and_wedge() 1048 if (!ep->dev->driver || ep->dev->gadget.speed == USB_SPEED_UNKNOWN) in net2272_fifo_status() 1068 if (!ep->dev->driver || ep->dev->gadget.speed == USB_SPEED_UNKNOWN) in net2272_fifo_flush() 1101 dev = container_of(_gadget, struct net2272, gadget); in net2272_get_frame() [all …]
|
D | net2280.c | 157 if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) { in net2280_enable() 205 dev->gadget.speed == USB_SPEED_HIGH && in net2280_enable() 211 if ((dev->gadget.speed == USB_SPEED_SUPER && max != 1024) || in net2280_enable() 212 (dev->gadget.speed == USB_SPEED_HIGH && max != 512) || in net2280_enable() 213 (dev->gadget.speed == USB_SPEED_FULL && max > 64)) { in net2280_enable() 627 ep->dev->gadget.speed == USB_SPEED_FULL) { in out_flush() 655 ep->dev->gadget.speed == USB_SPEED_FULL) { in read_fifo() 906 usb_gadget_unmap_request(&dev->gadget, &req->req, ep->is_in); in done() 951 if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) { in net2280_queue() 964 ret = usb_gadget_map_request(&dev->gadget, _req, in net2280_queue() [all …]
|
D | gr_udc.h | 192 struct usb_gadget gadget; member 227 #define to_gr_udc(gadget) (container_of((gadget), struct gr_udc, gadget)) argument
|
D | mv_u3d_core.c | 208 dma_unmap_single(ep->u3d->gadget.dev.parent, in mv_u3d_done() 216 usb_gadget_unmap_request(&u3d->gadget, &req->req, mv_u3d_ep_dir(ep)); in mv_u3d_done() 470 req->trb_head->trb_dma = dma_map_single(u3d->gadget.dev.parent, in mv_u3d_req_to_trb() 496 ret = usb_gadget_map_request(&u3d->gadget, &req->req, in mv_u3d_start_queue() 541 if (!u3d->driver || u3d->gadget.speed == USB_SPEED_UNKNOWN) in mv_u3d_ep_enable() 831 if (!u3d->driver || u3d->gadget.speed == USB_SPEED_UNKNOWN) { in mv_u3d_ep_queue() 1144 static int mv_u3d_vbus_session(struct usb_gadget *gadget, int is_active) in mv_u3d_vbus_session() argument 1150 u3d = container_of(gadget, struct mv_u3d, gadget); in mv_u3d_vbus_session() 1195 static int mv_u3d_vbus_draw(struct usb_gadget *gadget, unsigned mA) in mv_u3d_vbus_draw() argument 1197 struct mv_u3d *u3d = container_of(gadget, struct mv_u3d, gadget); in mv_u3d_vbus_draw() [all …]
|
D | amd5536udc.c | 331 if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) in udc_ep_enable() 828 usb_gadget_unmap_request(&dev->gadget, &req->req, ep->in); in complete_req() 1073 if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) in udc_queue() 1079 retval = usb_gadget_map_request(&udc->gadget, usbreq, ep->in); in udc_queue() 1320 if (!ep->dev->driver || ep->dev->gadget.speed == USB_SPEED_UNKNOWN) in udc_set_halt() 1384 static int udc_get_frame(struct usb_gadget *gadget) in udc_get_frame() argument 1390 static int udc_wakeup(struct usb_gadget *gadget) in udc_wakeup() argument 1394 if (!gadget) in udc_wakeup() 1396 dev = container_of(gadget, struct udc, gadget); in udc_wakeup() 1417 INIT_LIST_HEAD(&dev->gadget.ep_list); in make_ep_lists() [all …]
|
D | lpc32xx_udc.c | 149 struct usb_gadget gadget; member 212 return container_of(g, struct lpc32xx_udc, gadget); in to_udc() 549 udc->gadget.is_selfpowered ? "self" : "VBUS", in proc_udc_show() 555 list_for_each_entry(ep, &udc->gadget.ep_list, ep.ep_list) in proc_udc_show() 1398 udc->gadget.speed = USB_SPEED_FULL; in uda_usb_reset() 1441 INIT_LIST_HEAD(&udc->gadget.ep_list); in udc_reinit() 1442 INIT_LIST_HEAD(&udc->gadget.ep0->ep_list); in udc_reinit() 1448 list_add_tail(&ep->ep.ep_list, &udc->gadget.ep_list); in udc_reinit() 1469 usb_gadget_unmap_request(&udc->gadget, &req->req, ep->is_in); in done() 1587 if (udc->gadget.speed == USB_SPEED_UNKNOWN) in stop_activity() [all …]
|
D | r8a66597-udc.c | 93 r8a66597->gadget.speed = USB_SPEED_UNKNOWN; in r8a66597_usb_disconnect() 95 r8a66597->driver->disconnect(&r8a66597->gadget); in r8a66597_usb_disconnect() 666 return usb_gadget_map_request(&r8a66597->gadget, &req->req, dma->dir); in sudmac_alloc_channel() 676 usb_gadget_unmap_request(&r8a66597->gadget, &req->req, ep->dma->dir); in sudmac_free_channel() 916 if (ep->r8a66597->gadget.speed == USB_SPEED_UNKNOWN) in transfer_complete() 1196 r8a66597_queue(r8a66597->gadget.ep0, r8a66597->ep0_req, GFP_KERNEL); in get_status() 1327 r8a66597->gadget.speed = USB_SPEED_HIGH; in r8a66597_update_usb_speed() 1330 r8a66597->gadget.speed = USB_SPEED_FULL; in r8a66597_update_usb_speed() 1333 r8a66597->gadget.speed = USB_SPEED_UNKNOWN; in r8a66597_update_usb_speed() 1348 usb_gadget_udc_reset(&r8a66597->gadget, r8a66597->driver); in irq_device_state() [all …]
|
D | fotg210-udc.c | 67 if (ep->fotg210->gadget.speed == USB_SPEED_UNKNOWN) in fotg210_done() 420 if (ep->fotg210->gadget.speed == USB_SPEED_UNKNOWN) in fotg210_ep_queue() 757 fotg210_ep_queue(fotg210->gadget.ep0, fotg210->ep0_req, GFP_KERNEL); in fotg210_get_status() 771 if (fotg210->gadget.speed == USB_SPEED_UNKNOWN) { in fotg210_setup_packet() 773 fotg210->gadget.speed = value & DMCR_HS_EN ? in fotg210_setup_packet() 964 if (fotg210->driver->setup(&fotg210->gadget, in fotg210_irq() 1080 usb_del_gadget_udc(&fotg210->gadget); in fotg210_udc_remove() 1134 fotg210->gadget.ops = &fotg210_gadget_ops; in fotg210_udc_probe() 1136 fotg210->gadget.max_speed = USB_SPEED_HIGH; in fotg210_udc_probe() 1137 fotg210->gadget.dev.parent = &pdev->dev; in fotg210_udc_probe() [all …]
|
D | fusb300_udc.c | 433 if (ep->fusb300->gadget.speed == USB_SPEED_UNKNOWN) in fusb300_queue() 722 fusb300_queue(fusb300->gadget.ep0, fusb300->ep0_req, GFP_KERNEL); in get_status() 873 if (ep->fusb300->gadget.speed == USB_SPEED_UNKNOWN) in done() 946 ret = usb_gadget_map_request(&ep->fusb300->gadget, in fusb300_set_idma() 958 usb_gadget_unmap_request(&ep->fusb300->gadget, in fusb300_set_idma() 993 fusb300->gadget.speed = USB_SPEED_SUPER; in check_device_mode() 996 fusb300->gadget.speed = USB_SPEED_HIGH; in check_device_mode() 999 fusb300->gadget.speed = USB_SPEED_FULL; in check_device_mode() 1002 fusb300->gadget.speed = USB_SPEED_UNKNOWN; in check_device_mode() 1208 if (fusb300->driver->setup(&fusb300->gadget, &ctrl) < 0) in fusb300_irq() [all …]
|
D | pxa27x_udc.c | 249 root = debugfs_create_dir(udc->gadget.name, NULL); in pxa_init_debugfs() 1146 if (unlikely(!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)) { in pxa_ep_queue() 1335 if (ep->dev->gadget.speed == USB_SPEED_UNKNOWN || ep_is_empty(ep)) in pxa_ep_fifo_status() 1430 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) { in pxa_ep_enable() 1691 udc->gadget.speed = USB_SPEED_UNKNOWN; in udc_disable() 1710 INIT_LIST_HEAD(&dev->gadget.ep_list); in udc_init_data() 1711 INIT_LIST_HEAD(&dev->gadget.ep0->ep_list); in udc_init_data() 1727 &dev->gadget.ep_list); in udc_init_data() 1751 udc->gadget.speed = USB_SPEED_FULL; in udc_enable() 1803 &udc->gadget); in pxa27x_udc_start() [all …]
|
D | m66592-udc.c | 96 m66592->gadget.speed = USB_SPEED_UNKNOWN; in m66592_usb_disconnect() 98 m66592->driver->disconnect(&m66592->gadget); in m66592_usb_disconnect() 723 if (ep->m66592->gadget.speed == USB_SPEED_UNKNOWN) in transfer_complete() 999 m66592_queue(m66592->gadget.ep0, m66592->ep0_req, GFP_KERNEL); in get_status() 1126 m66592->gadget.speed = USB_SPEED_HIGH; in m66592_update_usb_speed() 1129 m66592->gadget.speed = USB_SPEED_FULL; in m66592_update_usb_speed() 1132 m66592->gadget.speed = USB_SPEED_UNKNOWN; in m66592_update_usb_speed() 1145 usb_gadget_udc_reset(&m66592->gadget, m66592->driver); in irq_device_state() 1151 && m66592->gadget.speed == USB_SPEED_UNKNOWN) in irq_device_state() 1182 if (m66592->driver->setup(&m66592->gadget, &ctrl) < 0) in irq_control_stage() [all …]
|
D | r8a66597-udc.h | 95 struct usb_gadget gadget; member 121 container_of(_gadget, struct r8a66597, gadget) 122 #define r8a66597_to_gadget(r8a66597) (&r8a66597->gadget) 123 #define r8a66597_to_dev(r8a66597) (r8a66597->gadget.dev.parent)
|
D | atmel_usba_udc.h | 332 struct usb_gadget gadget; member 369 static inline struct usba_udc *to_usba_udc(struct usb_gadget *gadget) in to_usba_udc() argument 371 return container_of(gadget, struct usba_udc, gadget); in to_usba_udc()
|
D | goku_udc.c | 109 if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) in goku_ep_enable() 311 usb_gadget_unmap_request(&dev->gadget, &req->req, ep->is_in); in done() 724 if (unlikely(!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)) in goku_queue() 733 status = usb_gadget_map_request(&dev->gadget, &req->req, in goku_queue() 1239 INIT_LIST_HEAD (&dev->gadget.ep_list); in udc_reinit() 1240 dev->gadget.ep0 = &dev->ep [0].ep; in udc_reinit() 1241 dev->gadget.speed = USB_SPEED_UNKNOWN; in udc_reinit() 1255 list_add_tail (&ep->ep.ep_list, &dev->gadget.ep_list); in udc_reinit() 1315 dev->gadget.speed = USB_SPEED_FULL; in ep0_start() 1486 tmp = dev->driver->setup(&dev->gadget, &ctrl); in ep0_setup() [all …]
|
D | pxa27x_udc.h | 447 struct usb_gadget gadget; member 478 #define to_pxa(g) (container_of((g), struct pxa_udc, gadget)) 480 static inline struct pxa_udc *to_gadget_udc(struct usb_gadget *gadget) in to_gadget_udc() argument 482 return container_of(gadget, struct pxa_udc, gadget); in to_gadget_udc()
|
D | at91_udc.h | 120 struct usb_gadget gadget; member 147 return container_of(g, struct at91_udc, gadget); in to_udc()
|
D | m66592-udc.h | 472 struct usb_gadget gadget; member 495 #define to_m66592(g) (container_of((g), struct m66592, gadget)) 497 #define gadget_to_m66592(_gadget) container_of(_gadget, struct m66592, gadget) 498 #define m66592_to_gadget(m66592) (&m66592->gadget)
|
D | fotg210.h | 241 struct usb_gadget gadget; member 253 #define gadget_to_fotg210(g) container_of((g), struct fotg210_udc, gadget)
|
D | pxa25x_udc.h | 100 struct usb_gadget gadget; member 129 #define to_pxa25x(g) (container_of((g), struct pxa25x_udc, gadget))
|
D | goku_udc.h | 243 struct usb_gadget gadget; member 263 #define to_goku_udc(g) (container_of((g), struct goku_udc, gadget))
|
D | net2280.h | 153 struct usb_gadget gadget; member 376 if (ep->dev->gadget.speed != USB_SPEED_HIGH) in set_max_speed()
|
D | amd5536udc.h | 523 struct usb_gadget gadget; member 565 #define to_amd5536_udc(g) (container_of((g), struct udc, gadget))
|
D | fsl_qe_udc.h | 269 struct usb_gadget *gadget; member 320 struct usb_gadget gadget; member
|
D | fsl_usb2_udc.h | 467 struct usb_gadget *gadget; member 477 struct usb_gadget gadget; member
|
D | omap_udc.h | 160 struct usb_gadget gadget; member
|
D | fusb300_udc.h | 661 struct usb_gadget gadget; member 676 #define to_fusb300(g) (container_of((g), struct fusb300, gadget))
|
D | mv_udc.h | 174 struct usb_gadget gadget; member
|
D | mv_u3d.h | 243 struct usb_gadget gadget; member
|
/linux-4.1.27/Documentation/ABI/testing/ |
D | configfs-usb-gadget | 1 What: /config/usb-gadget 8 What: /config/usb-gadget/gadget 13 The attributes of a gadget: 15 UDC - bind a gadget to UDC/unbind a gadget; 17 to bind a gadget, empty string "" to unbind. 28 What: /config/usb-gadget/gadget/configs 32 This group contains a USB gadget's configurations 34 What: /config/usb-gadget/gadget/configs/config 43 What: /config/usb-gadget/gadget/configs/config/strings 50 What: /config/usb-gadget/gadget/configs/config/strings/language [all …]
|
D | configfs-usb-gadget-uvc | 1 What: /config/usb-gadget/gadget/functions/uvc.name 10 What: /config/usb-gadget/gadget/functions/uvc.name/control 15 What: /config/usb-gadget/gadget/functions/uvc.name/control/class 20 What: /config/usb-gadget/gadget/functions/uvc.name/control/class/ss 25 What: /config/usb-gadget/gadget/functions/uvc.name/control/class/fs 30 What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal 35 What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal/output 40 What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal/output/default 54 What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal/camera 59 What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal/camera/default [all …]
|
D | sysfs-devices-platform-_UDC_-gadget | 1 What: /sys/devices/platform/_UDC_/gadget/suspended 5 Show the suspend state of an USB composite gadget. 11 What: /sys/devices/platform/_UDC_/gadget/gadget-lunX/nofua 16 the SCSI WRITE(10,12) commands when a gadget in USB Mass
|
D | configfs-usb-gadget-mass-storage | 1 What: /config/usb-gadget/gadget/functions/mass_storage.name 14 What: /config/usb-gadget/gadget/functions/mass_storage.name/lun.name
|
D | configfs-usb-gadget-loopback | 1 What: /config/usb-gadget/gadget/functions/Loopback.name
|
D | configfs-usb-gadget-printer | 1 What: /config/usb-gadget/gadget/functions/printer.name
|
D | configfs-usb-gadget-phonet | 1 What: /config/usb-gadget/gadget/functions/phonet.name
|
D | configfs-usb-gadget-sourcesink | 1 What: /config/usb-gadget/gadget/functions/SourceSink.name
|
D | configfs-usb-gadget-acm | 1 What: /config/usb-gadget/gadget/functions/acm.name
|
D | configfs-usb-gadget-serial | 1 What: /config/usb-gadget/gadget/functions/gser.name
|
D | configfs-usb-gadget-obex | 1 What: /config/usb-gadget/gadget/functions/obex.name
|
D | configfs-usb-gadget-uac2 | 1 What: /config/usb-gadget/gadget/functions/uac2.name
|
D | configfs-usb-gadget-ffs | 1 What: /config/usb-gadget/gadget/functions/ffs.name
|
D | configfs-usb-gadget-hid | 1 What: /config/usb-gadget/gadget/functions/hid.name
|
D | configfs-usb-gadget-uac1 | 1 What: /config/usb-gadget/gadget/functions/uac1.name
|
D | configfs-usb-gadget-midi | 1 What: /config/usb-gadget/gadget/functions/midi.name
|
D | configfs-usb-gadget-ecm | 1 What: /config/usb-gadget/gadget/functions/ecm.name
|
D | configfs-usb-gadget-ncm | 1 What: /config/usb-gadget/gadget/functions/ncm.name
|
D | configfs-usb-gadget-subset | 1 What: /config/usb-gadget/gadget/functions/geth.name
|
D | configfs-usb-gadget-rndis | 1 What: /config/usb-gadget/gadget/functions/rndis.name
|
D | configfs-usb-gadget-eem | 1 What: /config/usb-gadget/gadget/functions/eem.name
|
D | configfs-spear-pcie-gadget | 1 What: /config/pcie-gadget 17 /config/pcie-gadget.n/
|
/linux-4.1.27/Documentation/DocBook/ |
D | .gadget.xml.cmd | 1 …ocumentation/DocBook/gadget.xml := SRCTREE=./ ./scripts/docproc doc Documentation/DocBook/gadget.t… 2 …gadget.xml: Documentation/DocBook/gadget.tmpl include/linux/usb/ch9.h include/linux/usb/gadget.h d…
|
D | Makefile | 13 gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
|
/linux-4.1.27/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 | 140 struct usb_gadget *gadget; member 776 switch (data->dev->gadget->speed) { in ep_config() 929 (void) usb_ep_set_halt (dev->gadget->ep0); in ep0_read() 934 struct usb_ep *ep = dev->gadget->ep0; in ep0_read() 945 if (gadget_is_dualspeed(dev->gadget) in ep0_read() 946 && (dev->gadget->speed in ep0_read() 951 usb_gadget_vbus_draw(dev->gadget, 2 * power); in ep0_read() 984 clean_req (dev->gadget->ep0, dev->req); in ep0_read() 1124 retval = setup_req (dev->gadget->ep0, dev->req, len); in ep0_write() 1134 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()
|
D | multi.c | 156 if (gadget_is_otg(c->cdev->gadget)) { in rndis_do_config() 238 if (gadget_is_otg(c->cdev->gadget)) { in cdc_do_config() 314 struct usb_gadget *gadget = cdev->gadget; in multi_bind() local 325 if (!can_support_ecm(cdev->gadget)) { in multi_bind() 326 dev_err(&gadget->dev, "controller '%s' not usable\n", in multi_bind() 327 gadget->name); in multi_bind() 368 gether_set_gadget(ecm_opts->net, cdev->gadget); in multi_bind() 427 dev_info(&gadget->dev, DRIVER_DESC "\n"); in multi_bind()
|
D | printer.c | 131 struct usb_gadget *gadget = c->cdev->gadget; in printer_do_config() local 134 usb_ep_autoconfig_reset(gadget); in printer_do_config() 136 usb_gadget_set_selfpowered(gadget); in printer_do_config() 138 if (gadget_is_otg(gadget)) { in printer_do_config()
|
D | ncm.c | 116 if (gadget_is_otg(c->cdev->gadget)) { in ncm_do_config() 148 struct usb_gadget *gadget = cdev->gadget; in gncm_bind() local 180 dev_info(&gadget->dev, "%s\n", DRIVER_DESC); in gncm_bind()
|
D | Makefile | 5 ccflags-y := -I$(srctree)/drivers/usb/gadget/ 6 ccflags-y += -I$(srctree)/drivers/usb/gadget/udc/ 7 ccflags-y += -I$(srctree)/drivers/usb/gadget/function/
|
D | acm_ms.c | 129 if (gadget_is_otg(c->cdev->gadget)) { in acm_ms_do_config() 175 struct usb_gadget *gadget = cdev->gadget; in acm_ms_bind() local 226 dev_info(&gadget->dev, "%s, version: " DRIVER_VERSION "\n", in acm_ms_bind()
|
D | Kconfig | 4 # (b) the gadget driver using it. 27 USB "gadget drivers" can be written. 48 this gadget connects to another OTG device, with this one using 109 Within the USB device, this gadget driver exposes a network device 111 Treat it like a two-node Ethernet link: host, and gadget. 133 If you say "y" here, the Ethernet gadget driver will try to provide 157 If you say "y" here, the Ethernet gadget driver will use the EEM 202 configurations the gadget will provide. 254 This fabric is an USB gadget. Two USB protocols are supported that is 295 connections can then be made on the gadget system, using [all …]
|
D | g_ffs.c | 342 if (can_support_ecm(cdev->gadget)) { in gfs_bind() 388 gether_set_gadget(net, cdev->gadget); in gfs_bind() 393 if (can_support_ecm(cdev->gadget)) { in gfs_bind() 441 if (can_support_ecm(cdev->gadget)) in gfs_bind() 465 if (can_support_ecm(cdev->gadget)) { in gfs_unbind() 493 if (gadget_is_otg(c->cdev->gadget)) { in gfs_do_config() 546 if (can_support_ecm(c->cdev->gadget)) { in eth_bind_config()
|
D | hid.c | 114 if (gadget_is_otg(c->cdev->gadget)) { in do_config() 152 struct usb_gadget *gadget = cdev->gadget; in hid_bind() local 195 dev_info(&gadget->dev, DRIVER_DESC ", version: " DRIVER_VERSION "\n"); in hid_bind()
|
D | zero.c | 176 struct usb_gadget *g = cdev->gadget; in zero_autoresume() 194 if (cdev->gadget->speed == USB_SPEED_UNKNOWN) in zero_suspend() 343 if (gadget_is_otg(cdev->gadget)) { in zero_bind() 364 usb_ep_autoconfig_reset(cdev->gadget); in zero_bind() 369 usb_ep_autoconfig_reset(cdev->gadget); in zero_bind()
|
D | tcm_usb_gadget.c | 217 struct usb_gadget *gadget = fuas_to_gadget(fu); in bot_send_read_response() local 226 if (!gadget->sg_supported) { in bot_send_read_response() 259 struct usb_gadget *gadget = fuas_to_gadget(fu); in bot_send_write_request() local 270 if (!gadget->sg_supported) { in bot_send_write_request() 401 struct usb_gadget *gadget = f->config->cdev->gadget; in bot_set_alt() local 406 config_ep_by_speed(gadget, f, fu->ep_in); in bot_set_alt() 411 config_ep_by_speed(gadget, f, fu->ep_out); in bot_set_alt() 467 return usb_ep_queue(cdev->gadget->ep0, cdev->req, GFP_ATOMIC); in usbg_bot_setup() 527 struct usb_gadget *gadget = fuas_to_gadget(fu); in uasp_prepare_r_request() local 530 if (!gadget->sg_supported) { in uasp_prepare_r_request() [all …]
|
D | nokia.c | 229 struct usb_gadget *gadget = cdev->gadget; in nokia_bind() local 241 if (!gadget_supports_altsettings(gadget)) { in nokia_bind() 282 dev_info(&gadget->dev, "%s\n", NOKIA_LONG_NAME); in nokia_bind()
|
D | mass_storage.c | 138 if (gadget_is_otg(c->cdev->gadget)) { in msg_do_config() 214 dev_info(&cdev->gadget->dev, in msg_bind()
|
D | serial.c | 193 if (gadget_is_otg(cdev->gadget)) { in gs_bind() 202 usb_ep_autoconfig_reset(cdev->gadget); in gs_bind()
|
D | tcm_usb_gadget.h | 15 #define fuas_to_gadget(f) (f->function.config->cdev->gadget)
|
D | audio.c | 176 if (gadget_is_otg(c->cdev->gadget)) { in audio_do_config()
|
/linux-4.1.27/drivers/usb/gadget/udc/bdc/ |
D | bdc_udc.c | 91 bdc->gadget.ep0->maxpacket = EP0_MAX_PKT_SIZE; in bdc_uspc_connected() 92 bdc->gadget.speed = USB_SPEED_SUPER; in bdc_uspc_connected() 103 bdc->gadget.ep0->maxpacket = 64; in bdc_uspc_connected() 104 bdc->gadget.speed = USB_SPEED_HIGH; in bdc_uspc_connected() 109 bdc->gadget.ep0->maxpacket = 64; in bdc_uspc_connected() 110 bdc->gadget.speed = USB_SPEED_FULL; in bdc_uspc_connected() 115 bdc->gadget.ep0->maxpacket = 8; in bdc_uspc_connected() 116 bdc->gadget.speed = USB_SPEED_LOW; in bdc_uspc_connected() 130 usb_gadget_set_state(&bdc->gadget, USB_STATE_DEFAULT); in bdc_uspc_connected() 150 bdc->gadget_driver->disconnect(&bdc->gadget); in bdc_uspc_disconnected() [all …]
|
D | bdc_ep.c | 404 (req_len % bdc->gadget.ep0->maxpacket == 0)) { in setup_first_bd_ep0() 407 bdc->gadget.ep0->maxpacket); in setup_first_bd_ep0() 553 usb_gadget_unmap_request(&bdc->gadget, &req->usb_req, ep->dir); in bdc_req_complete() 691 ret = usb_gadget_map_request(&bdc->gadget, &req->usb_req, ep->dir); in ep0_queue() 730 ret = usb_gadget_map_request(&bdc->gadget, &req->usb_req, ep->dir); in ep_queue() 814 start_pending, end_pending, bdc->gadget.speed); in ep_dequeue() 824 if (bdc->gadget.speed == USB_SPEED_UNKNOWN) in ep_dequeue() 1112 enum usb_device_state state = bdc->gadget.state; in ep0_set_address() 1133 usb_gadget_set_state(&bdc->gadget, USB_STATE_ADDRESS); in ep0_set_address() 1135 usb_gadget_set_state(&bdc->gadget, USB_STATE_DEFAULT); in ep0_set_address() [all …]
|
D | bdc.h | 269 #define gadget_to_bdc(g) container_of(g, struct bdc, gadget) 410 struct usb_gadget gadget; member
|
/linux-4.1.27/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() 145 usb_gadget_vbus_disconnect(gpio_vbus->phy.otg->gadget); in gpio_vbus_work() 151 status, gpio_vbus->phy.otg->gadget); in gpio_vbus_work() 166 otg->gadget ? otg->gadget->name : "none"); in gpio_vbus_irq() 168 if (otg->gadget) in gpio_vbus_irq() 178 struct usb_gadget *gadget) in gpio_vbus_set_peripheral() argument 190 if (!gadget) { in gpio_vbus_set_peripheral() 192 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() 106 if (tu->phy.otg->gadget) in check_vbus_state() 107 usb_gadget_vbus_disconnect(tu->phy.otg->gadget); in check_vbus_state() 163 if (tu->phy.otg->gadget) in tahvo_usb_stop_peripheral() 164 usb_gadget_vbus_disconnect(tu->phy.otg->gadget); in tahvo_usb_stop_peripheral() 173 if (tu->phy.otg->gadget) in tahvo_usb_power_off() 174 usb_gadget_vbus_disconnect(tu->phy.otg->gadget); in tahvo_usb_power_off() 229 struct usb_gadget *gadget) in tahvo_usb_set_peripheral() argument 234 dev_dbg(&tu->pt_dev->dev, "%s %p\n", __func__, gadget); in tahvo_usb_set_peripheral() [all …]
|
D | phy-generic.c | 121 usb_gadget_vbus_connect(otg->gadget); in nop_gpio_vbus_thread() 127 otg->gadget); in nop_gpio_vbus_thread() 131 usb_gadget_vbus_disconnect(otg->gadget); in nop_gpio_vbus_thread() 137 otg->gadget); in nop_gpio_vbus_thread() 176 static int nop_set_peripheral(struct usb_otg *otg, struct usb_gadget *gadget) in nop_set_peripheral() argument 181 if (!gadget) { in nop_set_peripheral() 182 otg->gadget = NULL; in nop_set_peripheral() 186 otg->gadget = gadget; in nop_set_peripheral()
|
D | phy-isp1301-omap.c | 309 isp->phy.otg->gadget->b_hnp_enable = 0; in gadget_suspend() 310 isp->phy.otg->gadget->a_hnp_support = 0; in gadget_suspend() 311 isp->phy.otg->gadget->a_alt_hnp_support = 0; in gadget_suspend() 312 return usb_gadget_vbus_disconnect(isp->phy.otg->gadget); in gadget_suspend() 350 if (isp->phy.otg->gadget) { in a_idle() 351 isp->phy.otg->gadget->is_a_peripheral = 1; in a_idle() 374 if (isp->phy.otg->gadget) { in b_idle() 375 isp->phy.otg->gadget->is_a_peripheral = 0; in b_idle() 557 if (isp->phy.otg->gadget->b_hnp_enable) { in otg_update_isp() 929 usb_gadget_vbus_connect(isp->phy.otg->gadget); in b_peripheral() [all …]
|
D | phy-fsl-usb.c | 535 if (!otg->gadget || !otg->gadget->dev.parent) in fsl_otg_start_gadget() 539 dev = otg->gadget->dev.parent; in fsl_otg_start_gadget() 606 struct usb_gadget *gadget) in fsl_otg_set_peripheral() argument 619 if (!gadget) { in fsl_otg_set_peripheral() 621 otg->gadget->ops->vbus_draw(otg->gadget, 0); in fsl_otg_set_peripheral() 622 usb_gadget_vbus_disconnect(otg->gadget); in fsl_otg_set_peripheral() 623 otg->gadget = 0; in fsl_otg_set_peripheral() 629 otg->gadget = gadget; in fsl_otg_set_peripheral() 630 otg->gadget->is_a_peripheral = !otg_dev->fsm.id; in fsl_otg_set_peripheral() 752 if (otg->gadget) in fsl_otg_isr() [all …]
|
D | phy-msm-usb.c | 738 if (motg->pdata->mode == USB_DR_MODE_HOST || otg->gadget) { in msm_otg_set_host() 751 if (!phy->otg->gadget) in msm_otg_start_peripheral() 763 usb_gadget_vbus_connect(phy->otg->gadget); in msm_otg_start_peripheral() 766 usb_gadget_vbus_disconnect(phy->otg->gadget); in msm_otg_start_peripheral() 774 struct usb_gadget *gadget) in msm_otg_set_peripheral() argument 787 if (!gadget) { in msm_otg_set_peripheral() 791 otg->gadget = NULL; in msm_otg_set_peripheral() 795 otg->gadget = NULL; in msm_otg_set_peripheral() 800 otg->gadget = gadget; in msm_otg_set_peripheral() 1700 if (phy->otg->host || phy->otg->gadget) in msm_otg_remove()
|
D | phy-mv-usb.c | 75 struct usb_gadget *gadget) in mv_otg_set_peripheral() argument 77 otg->gadget = gadget; in mv_otg_set_peripheral() 228 if (!otg->gadget) in mv_otg_start_periphrals() 234 usb_gadget_vbus_connect(otg->gadget); in mv_otg_start_periphrals() 236 usb_gadget_vbus_disconnect(otg->gadget); in mv_otg_start_periphrals()
|
D | Kconfig | 134 This chip is typically used as USB transceiver for USB host, gadget 162 implements role switch between EHCI host driver and gadget driver. 183 This chip is typically used as USB PHY for USB host, gadget.
|
D | phy-ab8500-usb.c | 959 if (!ab->phy.otg->gadget) in ab8500_usb_phy_disable_work() 1065 struct usb_gadget *gadget) in ab8500_usb_set_peripheral() argument 1074 ab->phy.otg->gadget = gadget; in ab8500_usb_set_peripheral() 1081 if ((ab->mode != USB_IDLE) && !gadget) { in ab8500_usb_set_peripheral()
|
/linux-4.1.27/Documentation/usb/ |
D | gadget_configfs.txt | 5 Linux USB gadget configured through configfs 20 A gadget is seen by its host as a set of configurations, each of which contains 21 a number of interfaces which, from the gadget's perspective, are known as 26 Creating a gadget means deciding what configurations there will be 33 It also describes how configfs integration into gadget is designed. 62 For each gadget to be created its corresponding directory must be created: 64 $ mkdir $CONFIGFS_HOME/usb_gadget/<gadget name> 76 Each gadget needs to have its vendor id <VID> and product id <PID> specified: 81 A gadget also needs its serial number, manufacturer and product strings. 96 Each gadget will consist of a number of configurations, their corresponding [all …]
|
D | gadget_serial.txt | 24 This document and the gadget serial driver itself are 33 Versions of the gadget serial driver are available for the 35 version 2.3 or later of the gadget serial driver in a 2.6 42 gadget and usb drivers as modules. 53 The gadget serial driver is a Linux USB gadget driver, a USB device 58 The gadget serial driver talks over USB to either a CDC ACM driver 81 On the device-side Linux system, the gadget serial driver looks 84 On the host-side system, the gadget serial device looks like a 95 With the gadget serial driver and the host side ACM or generic 97 the host and the gadget side systems as if they were connected by a [all …]
|
D | gadget_multi.txt | 5 The Multifunction Composite Gadget (or g_multi) is a composite gadget 7 a... multifunction gadget. 14 and RNDIS can be turned off. If they are both enabled the gadget will 22 To make use of the gadget one needs to make it work on host side -- 23 without that there's no hope of achieving anything with the gadget. 28 Since the gadget uses standard composite framework and appears as such 39 For the gadget two work under Windows two conditions have to be met: 41 *** Detecting as composite gadget 43 First of all, Windows need to detect the gadget as an USB composite 44 gadget which on its own have some conditions[4]. If they are met, [all …]
|
D | mass-storage.txt | 7 to read-only, and gadget can indicate that it is removable and/or 21 This document describes how to use the gadget from user space, its 29 The mass storage gadget accepts the following mass storage specific 56 If this option is set for a logical unit, gadget will accept an 77 reader). It does *not* mean that the entire gadget can be 93 backing file could not be opened in read/write mode, the gadget 119 This parameter specifies number of logical units the gadget will 134 Specifies whether the gadget is allowed to halt bulk endpoints. 138 In addition to the above, the gadget also accepts the following 151 For each logical unit, the gadget creates a directory in the sysfs [all …]
|
D | gadget_printer.txt | 17 a gadget / "device class" driver using the Linux USB Gadget API. After the 18 USB device controller driver is loaded then load the printer gadget driver. 24 printer gadget driver using a device file. The printer returns a printer status 35 To load the USB device controller driver and the printer gadget driver. The 42 The follow command line parameter can be used when loading the printer gadget 100 To get the current printer status for the gadget driver: 197 /* Open device file for printer gadget. */ 217 /* Read data from printer gadget driver. */ 247 /* Open device file for printer gadget. */ 272 /* Write data to printer gadget driver. */ [all …]
|
D | gadget-testing.txt | 167 process which implements the function proper). The gadget should be enabled 168 by writing a suitable string to usb_gadget/<gadget>/UDC. 173 On the device: start the function's userspace daemon, enable the gadget 211 - create the gadget 212 - connect the gadget to a host, preferably not the one used 213 to control the gadget 220 - observe the keystrokes from the gadget 239 device: run the gadget 291 device: connect the gadget, enable it 316 There are two cases: playing a mid from the gadget to [all …]
|
D | functionfs.txt | 35 a gadget could use several FunctionFS functions. The idea is that 39 One can imagine a gadget that has an Ethernet, MTP and HID interfaces 49 On kernel level the gadget checks ffs_data->dev_name to identify 61 The gadget is registered only after all the declared function 65 Conversely, the gadget is unregistered after the first USB function
|
D | gadget_hid.txt | 2 Linux USB HID gadget driver 75 the amount of interrupt endpoints your gadget driver supports. 80 some data to the kernel, if HID is a part of a gadget composed with 91 gadget driver. To use, point it at a hidg device and set the 104 HID gadget. 108 gadget and you should receive the host answer, corresponding
|
D | authorization.txt | 89 etc, but you get the idea. Anybody with access to a device gadget kit
|
D | chipidea.txt | 17 1) Power up 2 Freescale i.MX6Q sabre SD boards with gadget class driver loaded
|
/linux-4.1.27/drivers/usb/isp1760/ |
D | isp1760-udc.c | 36 static inline struct isp1760_udc *gadget_to_udc(struct usb_gadget *gadget) in gadget_to_udc() argument 38 return container_of(gadget, struct isp1760_udc, gadget); in gadget_to_udc() 504 if (udc->gadget.state != USB_STATE_DEFAULT && in isp1760_udc_set_address() 505 udc->gadget.state != USB_STATE_ADDRESS) { in isp1760_udc_set_address() 507 udc->gadget.state); in isp1760_udc_set_address() 511 usb_gadget_set_state(&udc->gadget, addr ? USB_STATE_ADDRESS : in isp1760_udc_set_address() 621 if (udc->gadget.state != USB_STATE_ADDRESS && in isp1760_ep0_setup_standard() 622 udc->gadget.state != USB_STATE_CONFIGURED) in isp1760_ep0_setup_standard() 625 stall = udc->driver->setup(&udc->gadget, req) < 0; in isp1760_ep0_setup_standard() 629 usb_gadget_set_state(&udc->gadget, req->wValue ? in isp1760_ep0_setup_standard() [all …]
|
D | isp1760-udc.h | 73 struct usb_gadget gadget; member
|
D | Kconfig | 37 gadget function will be disabled.
|
/linux-4.1.27/drivers/usb/chipidea/ |
D | udc.c | 427 ret = usb_gadget_map_request(&ci->gadget, &hwreq->req, hwep->dir); in _hardware_enqueue() 603 usb_gadget_unmap_request(&hwep->ci->gadget, &hwreq->req, hwep->dir); in _hardware_dequeue() 703 static int _gadget_stop_activity(struct usb_gadget *gadget) in _gadget_stop_activity() argument 706 struct ci_hdrc *ci = container_of(gadget, struct ci_hdrc, gadget); in _gadget_stop_activity() 710 ci->gadget.speed = USB_SPEED_UNKNOWN; in _gadget_stop_activity() 716 gadget_for_each_ep(ep, gadget) { in _gadget_stop_activity() 723 gadget_for_each_ep(ep, gadget) { in _gadget_stop_activity() 751 if (ci->gadget.speed != USB_SPEED_UNKNOWN) in isr_reset_handler() 752 usb_gadget_udc_reset(&ci->gadget, ci->driver); in isr_reset_handler() 754 retval = _gadget_stop_activity(&ci->gadget); in isr_reset_handler() [all …]
|
D | debug.c | 26 struct usb_gadget *gadget = &ci->gadget; in ci_device_show() local 28 seq_printf(s, "speed = %d\n", gadget->speed); in ci_device_show() 29 seq_printf(s, "max_speed = %d\n", gadget->max_speed); in ci_device_show() 30 seq_printf(s, "is_otg = %d\n", gadget->is_otg); in ci_device_show() 31 seq_printf(s, "is_a_peripheral = %d\n", gadget->is_a_peripheral); in ci_device_show() 32 seq_printf(s, "b_hnp_enable = %d\n", gadget->b_hnp_enable); in ci_device_show() 33 seq_printf(s, "a_hnp_support = %d\n", gadget->a_hnp_support); in ci_device_show() 34 seq_printf(s, "a_alt_hnp_support = %d\n", gadget->a_alt_hnp_support); in ci_device_show() 36 (gadget->name ? gadget->name : "")); in ci_device_show()
|
D | otg.c | 65 usb_gadget_vbus_connect(&ci->gadget); in ci_handle_vbus_change() 67 usb_gadget_vbus_disconnect(&ci->gadget); in ci_handle_vbus_change()
|
D | otg_fsm.c | 539 usb_gadget_vbus_connect(&ci->gadget); in ci_otg_start_gadget() 541 usb_gadget_vbus_disconnect(&ci->gadget); in ci_otg_start_gadget() 680 ci->gadget.is_a_peripheral = 1; in ci_otg_fsm_event() 774 ci->otg.gadget = &ci->gadget; in ci_hdrc_otg_fsm_init()
|
D | ci_hdrc_msm.c | 22 struct device *dev = ci->gadget.dev.parent; in ci_hdrc_msm_notify_event()
|
D | ci.h | 221 struct usb_gadget gadget; member
|
/linux-4.1.27/drivers/usb/renesas_usbhs/ |
D | mod_gadget.c | 46 struct usb_gadget gadget; member 92 container_of(g, struct usbhsg_gpriv, gadget) 111 #define usbhsg_is_not_connected(gp) ((gp)->gadget.speed == USB_SPEED_UNKNOWN) 206 ret = usb_gadget_map_request(&gpriv->gadget, req, dir); in usbhsg_dma_map_ctrl() 212 usb_gadget_unmap_request(&gpriv->gadget, req, dir); in usbhsg_dma_map_ctrl() 466 gpriv->gadget.speed = usbhs_bus_get_speed(priv); in usbhsg_irq_dev_state() 470 gpriv->gadget.speed); in usbhsg_irq_dev_state() 541 ret = gpriv->driver->setup(&gpriv->gadget, &ctrl); in usbhsg_irq_ctrl_stage() 866 gpriv->gadget.speed = USB_SPEED_UNKNOWN; in usbhsg_try_stop() 884 static int usbhsg_gadget_start(struct usb_gadget *gadget, in usbhsg_gadget_start() argument [all …]
|
/linux-4.1.27/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_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()
|
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_ecm.c | 417 data[0] = cpu_to_le32(ecm_bitrate(cdev->gadget)); in ecm_do_notify() 420 DBG(cdev, "notify speed %d\n", ecm_bitrate(cdev->gadget)); in ecm_do_notify() 522 value = usb_ep_queue(cdev->gadget->ep0, req, GFP_ATOMIC); in ecm_setup() 550 if (config_ep_by_speed(cdev->gadget, f, ecm->notify)) in ecm_set_alt() 569 if (config_ep_by_speed(cdev->gadget, f, in ecm_set_alt() 571 config_ep_by_speed(cdev->gadget, f, in ecm_set_alt() 588 ecm->port.is_zlp_ok = !(gadget_is_musbhdrc(cdev->gadget) in ecm_set_alt() 696 if (!can_support_ecm(cdev->gadget)) in ecm_bind() 710 gether_set_gadget(ecm_opts->net, cdev->gadget); in ecm_bind() 749 ep = usb_ep_autoconfig(cdev->gadget, &fs_ecm_in_desc); in ecm_bind() [all …]
|
D | f_uvc.c | 308 if (config_ep_by_speed(cdev->gadget, f, uvc->control_ep)) in uvc_function_set_alt() 317 uvc_event->speed = cdev->gadget->speed; in uvc_function_set_alt() 364 ret = config_ep_by_speed(f->config->cdev->gadget, in uvc_function_set_alt() 446 strlcpy(uvc->vdev.name, cdev->gadget->name, sizeof(uvc->vdev.name)); in uvc_register_video() 648 ep = usb_ep_autoconfig(cdev->gadget, &uvc_control_ep); in uvc_function_bind() 656 if (gadget_is_superspeed(c->cdev->gadget)) in uvc_function_bind() 657 ep = usb_ep_autoconfig_ss(cdev->gadget, &uvc_ss_streaming_ep, in uvc_function_bind() 659 else if (gadget_is_dualspeed(cdev->gadget)) in uvc_function_bind() 660 ep = usb_ep_autoconfig(cdev->gadget, &uvc_hs_streaming_ep); in uvc_function_bind() 662 ep = usb_ep_autoconfig(cdev->gadget, &uvc_fs_streaming_ep); in uvc_function_bind() [all …]
|
D | f_subset.c | 271 if (config_ep_by_speed(cdev->gadget, f, geth->port.in_ep) || in geth_set_alt() 272 config_ep_by_speed(cdev->gadget, f, geth->port.out_ep)) { in geth_set_alt() 317 gether_set_gadget(gether_opts->net, cdev->gadget); in geth_bind() 342 ep = usb_ep_autoconfig(cdev->gadget, &fs_subset_in_desc); in geth_bind() 348 ep = usb_ep_autoconfig(cdev->gadget, &fs_subset_out_desc); in geth_bind() 377 gadget_is_superspeed(c->cdev->gadget) ? "super" : in geth_bind() 378 gadget_is_dualspeed(c->cdev->gadget) ? "dual" : "full", in geth_bind()
|
D | u_ether.c | 58 struct usb_gadget *gadget; member 91 static inline int qlen(struct usb_gadget *gadget, unsigned qmult) in qlen() argument 93 if (gadget_is_dualspeed(gadget) && (gadget->speed == USB_SPEED_HIGH || in qlen() 94 gadget->speed == USB_SPEED_SUPER)) in qlen() 164 strlcpy(p->fw_version, dev->gadget->name, sizeof(p->fw_version)); in eth_get_drvinfo() 165 strlcpy(p->bus_info, dev_name(&dev->gadget->dev), sizeof(p->bus_info)); in eth_get_drvinfo() 593 if (gadget_is_dualspeed(dev->gadget)) in eth_start_xmit() 594 req->no_interrupt = (dev->gadget->speed == USB_SPEED_HIGH || in eth_start_xmit() 595 dev->gadget->speed == USB_SPEED_SUPER) in eth_start_xmit() 803 dev->gadget = g; in gether_setup_name() [all …]
|
D | f_phonet.c | 405 struct usb_gadget *gadget = fp->function.config->cdev->gadget; in pn_set_alt() local 427 if (config_ep_by_speed(gadget, f, fp->in_ep) || in pn_set_alt() 428 config_ep_by_speed(gadget, f, fp->out_ep)) { in pn_set_alt() 489 struct usb_gadget *gadget = cdev->gadget; in pn_bind() local 506 gphonet_set_gadget(phonet_opts->net, gadget); in pn_bind() 529 ep = usb_ep_autoconfig(gadget, &pn_fs_sink_desc); in pn_bind() 535 ep = usb_ep_autoconfig(gadget, &pn_fs_source_desc); in pn_bind() 569 INFO(cdev, "using %s, OUT %s, IN %s\n", cdev->gadget->name, in pn_bind()
|
D | f_sourcesink.c | 357 ss->in_ep = usb_ep_autoconfig(cdev->gadget, &fs_source_desc); in sourcesink_bind() 361 f->name, cdev->gadget->name); in sourcesink_bind() 366 ss->out_ep = usb_ep_autoconfig(cdev->gadget, &fs_sink_desc); in sourcesink_bind() 390 ss->iso_in_ep = usb_ep_autoconfig(cdev->gadget, &fs_iso_source_desc); in sourcesink_bind() 395 ss->iso_out_ep = usb_ep_autoconfig(cdev->gadget, &fs_iso_sink_desc); in sourcesink_bind() 469 (gadget_is_superspeed(c->cdev->gadget) ? "super" : in sourcesink_bind() 470 (gadget_is_dualspeed(c->cdev->gadget) ? "dual" : "full")), in sourcesink_bind() 674 int speed = cdev->gadget->speed; in enable_source_sink() 679 result = config_ep_by_speed(cdev->gadget, &(ss->function), ep); in enable_source_sink() 698 result = config_ep_by_speed(cdev->gadget, &(ss->function), ep); in enable_source_sink() [all …]
|
D | f_rndis.c | 528 value = usb_ep_queue(cdev->gadget->ep0, req, GFP_ATOMIC); in rndis_setup() 552 if (config_ep_by_speed(cdev->gadget, f, rndis->notify)) in rndis_set_alt() 568 if (config_ep_by_speed(cdev->gadget, f, in rndis_set_alt() 570 config_ep_by_speed(cdev->gadget, f, in rndis_set_alt() 644 bitrate(cdev->gadget) / 100); in rndis_open() 702 gether_set_gadget(rndis_opts->net, cdev->gadget); in rndis_bind() 744 ep = usb_ep_autoconfig(cdev->gadget, &fs_in_desc); in rndis_bind() 750 ep = usb_ep_autoconfig(cdev->gadget, &fs_out_desc); in rndis_bind() 760 ep = usb_ep_autoconfig(cdev->gadget, &fs_notify_desc); in rndis_bind() 815 gadget_is_superspeed(c->cdev->gadget) ? "super" : in rndis_bind() [all …]
|
D | f_loopback.c | 196 loop->in_ep = usb_ep_autoconfig(cdev->gadget, &fs_loop_source_desc); in loopback_bind() 200 f->name, cdev->gadget->name); in loopback_bind() 205 loop->out_ep = usb_ep_autoconfig(cdev->gadget, &fs_loop_sink_desc); in loopback_bind() 226 (gadget_is_superspeed(c->cdev->gadget) ? "super" : in loopback_bind() 227 (gadget_is_dualspeed(c->cdev->gadget) ? "dual" : "full")), in loopback_bind() 312 result = config_ep_by_speed(cdev->gadget, &(loop->function), ep); in enable_endpoint()
|
D | f_eem.c | 206 if (config_ep_by_speed(cdev->gadget, f, in eem_set_alt() 208 config_ep_by_speed(cdev->gadget, f, in eem_set_alt() 268 gether_set_gadget(eem_opts->net, cdev->gadget); in eem_bind() 292 ep = usb_ep_autoconfig(cdev->gadget, &eem_fs_in_desc); in eem_bind() 298 ep = usb_ep_autoconfig(cdev->gadget, &eem_fs_out_desc); in eem_bind() 322 gadget_is_superspeed(c->cdev->gadget) ? "super" : in eem_bind() 323 gadget_is_dualspeed(c->cdev->gadget) ? "dual" : "full", in eem_bind()
|
D | f_printer.c | 69 struct usb_gadget *gadget; member 217 static inline struct usb_endpoint_descriptor *ep_desc(struct usb_gadget *gadget, in ep_desc() argument 222 switch (gadget->speed) { in ep_desc() 772 dev->in_ep->desc = ep_desc(dev->gadget, &fs_ep_in_desc, &hs_ep_in_desc, in set_printer_interface() 776 dev->out_ep->desc = ep_desc(dev->gadget, &fs_ep_out_desc, in set_printer_interface() 998 value = usb_ep_queue(cdev->gadget->ep0, req, GFP_ATOMIC); in printer_func_setup() 1010 struct usb_gadget *gadget = c->cdev->gadget; in printer_func_bind() local 1028 dev->gadget = gadget; in printer_func_bind() 1031 in_ep = usb_ep_autoconfig(cdev->gadget, &fs_ep_in_desc); in printer_func_bind() 1034 dev_err(&cdev->gadget->dev, "can't autoconfigure on %s\n", in printer_func_bind() [all …]
|
D | Makefile | 5 ccflags-y := -I$(srctree)/drivers/usb/gadget/ 6 ccflags-y += -I$(srctree)/drivers/usb/gadget/udc/
|
D | u_ether.h | 260 static inline bool can_support_ecm(struct usb_gadget *gadget) in can_support_ecm() argument 262 if (!gadget_supports_altsettings(gadget)) in can_support_ecm()
|
D | f_fs.c | 67 struct usb_gadget *gadget; member 227 ret = usb_ep_queue(ffs->gadget->ep0, req, GFP_ATOMIC); in __ffs_ep0_queue_wait() 233 usb_ep_dequeue(ffs->gadget->ep0, req); in __ffs_ep0_queue_wait() 245 usb_ep_set_halt(ffs->gadget->ep0); in __ffs_ep0_stall() 561 struct usb_gadget *gadget = ffs->gadget; in ffs_ep0_ioctl() local 569 } else if (gadget && gadget->ops->ioctl) { in ffs_ep0_ioctl() 570 ret = gadget->ops->ioctl(gadget, code, value); in ffs_ep0_ioctl() 725 struct usb_gadget *gadget = epfile->ffs->gadget; in ffs_epfile_io() local 740 data_len = usb_ep_align_maybe(gadget, ep->ep, data_len); in ffs_epfile_io() 1031 switch (epfile->ffs->gadget->speed) { in ffs_epfile_ioctl() [all …]
|
D | f_ncm.c | 513 data[0] = cpu_to_le32(ncm_bitrate(cdev->gadget)); in ncm_do_notify() 516 DBG(cdev, "notify speed %d\n", ncm_bitrate(cdev->gadget)); in ncm_do_notify() 784 value = usb_ep_queue(cdev->gadget->ep0, req, GFP_ATOMIC); in ncm_setup() 813 if (config_ep_by_speed(cdev->gadget, f, ncm->notify)) in ncm_set_alt() 842 if (config_ep_by_speed(cdev->gadget, f, in ncm_set_alt() 844 config_ep_by_speed(cdev->gadget, f, in ncm_set_alt() 857 gadget_is_musbhdrc(cdev->gadget) in ncm_set_alt() 1350 if (!can_support_ecm(cdev->gadget)) in ncm_bind() 1363 gether_set_gadget(ncm_opts->net, cdev->gadget); in ncm_bind() 1402 ep = usb_ep_autoconfig(cdev->gadget, &fs_ncm_in_desc); in ncm_bind() [all …]
|
D | uvc_v4l2.c | 42 return usb_ep_set_halt(cdev->gadget->ep0); in uvc_send_response() 49 return usb_ep_queue(cdev->gadget->ep0, req, GFP_KERNEL); in uvc_send_response() 75 strlcpy(cap->card, cdev->gadget->name, sizeof(cap->card)); in uvc_v4l2_querycap() 76 strlcpy(cap->bus_info, dev_name(&cdev->gadget->dev), in uvc_v4l2_querycap()
|
D | f_midi.c | 74 struct usb_gadget *gadget; member 308 err = config_ep_by_speed(midi->gadget, f, ep); in f_midi_start_ep() 343 err = config_ep_by_speed(midi->gadget, f, midi->out_ep); in f_midi_set_alt() 654 err = snd_card_new(&midi->gadget->dev, midi->index, midi->id, in f_midi_register_card() 723 midi->gadget = cdev->gadget; in f_midi_bind() 753 midi->in_ep = usb_ep_autoconfig(cdev->gadget, &bulk_in_desc); in f_midi_bind() 758 midi->out_ep = usb_ep_autoconfig(cdev->gadget, &bulk_out_desc); in f_midi_bind() 870 if (gadget_is_dualspeed(c->cdev->gadget)) { in f_midi_bind()
|
D | u_uac1.h | 51 struct usb_gadget *gadget; member
|
D | f_mass_storage.c | 259 struct usb_gadget *gadget; member 325 struct usb_gadget *gadget; /* Copy of cdev->gadget */ member 2282 rc = config_ep_by_speed(common->gadget, &(fsg->function), fsg->bulk_in); in do_set_interface() 2291 rc = config_ep_by_speed(common->gadget, &(fsg->function), in do_set_interface() 2800 common->gadget = cdev->gadget; in fsg_common_set_cdev() 2801 common->ep0 = cdev->gadget->ep0; in fsg_common_set_cdev() 2817 common->can_stall = can_stall && !(gadget_is_at91(common->gadget)); in fsg_common_set_cdev() 2888 lun->dev.parent = &common->gadget->dev; in fsg_common_create_lun() 3015 struct usb_gadget *gadget = c->cdev->gadget; in fsg_bind() local 3053 fsg->gadget = gadget; in fsg_bind() [all …]
|
D | f_uac2.c | 1007 struct usb_gadget *gadget = cdev->gadget; in afunc_bind() local 1079 agdev->out_ep = usb_ep_autoconfig(gadget, &fs_epout_desc); in afunc_bind() 1086 agdev->in_ep = usb_ep_autoconfig(gadget, &fs_epin_desc); in afunc_bind() 1148 struct usb_gadget *gadget = cdev->gadget; in afunc_set_alt() local 1173 config_ep_by_speed(gadget, fn, ep); in afunc_set_alt() 1183 config_ep_by_speed(gadget, fn, ep); in afunc_set_alt() 1187 if (gadget->speed == USB_SPEED_FULL) { in afunc_set_alt() 1431 value = usb_ep_queue(cdev->gadget->ep0, req, GFP_ATOMIC); in afunc_setup()
|
D | u_fs.h | 151 struct usb_gadget *gadget; member
|
D | f_uac1.c | 563 value = usb_ep_queue(cdev->gadget->ep0, req, GFP_ATOMIC); in f_audio_setup() 591 err = config_ep_by_speed(cdev->gadget, f, out_ep); in f_audio_set_alt() 679 audio->card.gadget = c->cdev->gadget; in f_audio_bind() 716 ep = usb_ep_autoconfig(cdev->gadget, &as_out_ep_desc); in f_audio_bind()
|
D | f_hid.c | 483 status = usb_ep_queue(cdev->gadget->ep0, req, GFP_ATOMIC); in hidg_setup() 519 status = config_ep_by_speed(f->config->cdev->gadget, f, in hidg_set_alt() 539 status = config_ep_by_speed(f->config->cdev->gadget, f, in hidg_set_alt() 614 ep = usb_ep_autoconfig(c->cdev->gadget, &hidg_fs_in_ep_desc); in hidg_bind() 620 ep = usb_ep_autoconfig(c->cdev->gadget, &hidg_fs_out_ep_desc); in hidg_bind()
|
/linux-4.1.27/Documentation/devicetree/bindings/usb/ |
D | dwc2.txt | 23 - g-use-dma: enable dma usage in gadget driver. 24 - g-rx-fifo-size: size of rx fifo size in gadget mode. 25 - g-np-tx-fifo-size: size of non-periodic tx fifo size in gadget mode. 26 - g-tx-fifo-size: size of periodic tx fifo per endpoint (except ep0) in gadget mode.
|
D | ci-hdrc-qcom.txt | 11 gadget@f9a55000 {
|
D | atmel-usb.txt | 52 usb1: gadget@fffa4000 { 82 usb2: gadget@fff78000 {
|
/linux-4.1.27/drivers/usb/dwc3/ |
D | gadget.c | 265 usb_gadget_unmap_request(&dwc->gadget, &req->request, in dwc3_gadget_giveback() 469 if (dwc->gadget.speed == USB_SPEED_SUPER) { in dwc3_gadget_set_ep_config() 1032 usb_gadget_unmap_request(&dwc->gadget, &req->request, in __dwc3_gadget_kick_transfer() 1101 ret = usb_gadget_map_request(&dwc->gadget, &req->request, in __dwc3_gadget_ep_queue() 1585 dwc->gadget.name, in dwc3_gadget_start() 1737 dwc->gadget.ep0 = &dep->endpoint; in dwc3_gadget_init_hw_endpoints() 1745 &dwc->gadget.ep_list); in dwc3_gadget_init_hw_endpoints() 1763 INIT_LIST_HEAD(&dwc->gadget.ep_list); in dwc3_gadget_init_endpoints() 2073 dwc->gadget_driver->disconnect(&dwc->gadget); in dwc3_disconnect_gadget() 2082 dwc->gadget_driver->suspend(&dwc->gadget); in dwc3_suspend_gadget() [all …]
|
D | ep0.c | 155 usb_gadget_set_state(&dwc->gadget, USB_STATE_CONFIGURED); in __dwc3_gadget_ep0_queue() 347 usb_status |= dwc->gadget.is_selfpowered; in dwc3_ep0_handle_status() 404 state = dwc->gadget.state; in dwc3_ep0_handle_feature() 502 enum usb_device_state state = dwc->gadget.state; in dwc3_ep0_set_address() 524 usb_gadget_set_state(&dwc->gadget, USB_STATE_ADDRESS); in dwc3_ep0_set_address() 526 usb_gadget_set_state(&dwc->gadget, USB_STATE_DEFAULT); in dwc3_ep0_set_address() 536 ret = dwc->gadget_driver->setup(&dwc->gadget, ctrl); in dwc3_ep0_delegate_req() 543 enum usb_device_state state = dwc->gadget.state; in dwc3_ep0_set_config() 566 usb_gadget_set_state(&dwc->gadget, in dwc3_ep0_set_config() 585 usb_gadget_set_state(&dwc->gadget, in dwc3_ep0_set_config() [all …]
|
D | Kconfig | 25 thereby the gadget feature will be regressed. 31 Select this when you want to use DWC3 in gadget mode only, 39 both host and gadget features are enabled.
|
D | Makefile | 15 dwc3-y += gadget.o ep0.o
|
D | gadget.h | 28 #define gadget_to_dwc(g) (container_of(g, struct dwc3, gadget))
|
/linux-4.1.27/drivers/phy/ |
D | phy-dm816x-usb.c | 72 struct usb_gadget *gadget) in dm816x_usb_phy_set_peripheral() argument 74 otg->gadget = gadget; in dm816x_usb_phy_set_peripheral() 75 if (!gadget) in dm816x_usb_phy_set_peripheral()
|
D | phy-omap-usb2.c | 91 struct usb_gadget *gadget) in omap_usb_set_peripheral() argument 93 otg->gadget = gadget; in omap_usb_set_peripheral() 94 if (!gadget) in omap_usb_set_peripheral()
|
D | phy-twl4030-usb.c | 610 struct usb_gadget *gadget) in twl4030_set_peripheral() argument 615 otg->gadget = gadget; in twl4030_set_peripheral() 616 if (!gadget) in twl4030_set_peripheral()
|
/linux-4.1.27/drivers/power/ |
D | isp1704_charger.c | 271 if (isp->phy->otg->gadget) in isp1704_charger_work() 272 usb_gadget_connect(isp->phy->otg->gadget); in isp1704_charger_work() 301 if (isp->phy->otg->gadget) in isp1704_charger_work() 302 usb_gadget_disconnect(isp->phy->otg->gadget); in isp1704_charger_work() 493 if (isp->phy->otg->gadget) in isp1704_charger_probe() 494 usb_gadget_disconnect(isp->phy->otg->gadget); in isp1704_charger_probe()
|
/linux-4.1.27/drivers/usb/dwc2/ |
D | gadget.c | 54 static inline struct dwc2_hsotg *to_hsotg(struct usb_gadget *gadget) in to_hsotg() argument 56 return container_of(gadget, struct dwc2_hsotg, gadget); in to_hsotg() 298 usb_gadget_unmap_request(&hsotg->gadget, req, hs_ep->dir_in); in s3c_hsotg_unmap_dma() 716 ret = usb_gadget_map_request(&hsotg->gadget, req, hs_ep->dir_in); in s3c_hsotg_map_dma() 1249 ret = hsotg->driver->setup(&hsotg->gadget, ctrl); in s3c_hsotg_process_control() 2080 hsotg->gadget.speed = USB_SPEED_FULL; in s3c_hsotg_irq_enumdone() 2086 hsotg->gadget.speed = USB_SPEED_HIGH; in s3c_hsotg_irq_enumdone() 2092 hsotg->gadget.speed = USB_SPEED_LOW; in s3c_hsotg_irq_enumdone() 2101 usb_speed_string(hsotg->gadget.speed)); in s3c_hsotg_irq_enumdone() 3024 static int s3c_hsotg_udc_start(struct usb_gadget *gadget, in s3c_hsotg_udc_start() argument [all …]
|
D | Kconfig | 13 dwc2_platform.ko. For all modes(host, gadget and dual-role), there 38 The Designware USB2.0 high-speed gadget controller 48 mode. In this mode both host and gadget features are enabled, and
|
D | Makefile | 13 dwc2-y += gadget.o
|
D | core.h | 172 if ((_hs)->gadget.speed != USB_SPEED_UNKNOWN && \ 175 (_hs)->driver->_entry(&(_hs)->gadget); \ 718 struct usb_gadget gadget; member
|
/linux-4.1.27/drivers/staging/emxx_udc/ |
D | emxx_udc.c | 492 udc->gadget.dev.parent, in _nbu2ss_dma_map_single() 502 udc->gadget.dev.parent, in _nbu2ss_dma_map_single() 539 dma_unmap_single(udc->gadget.dev.parent, in _nbu2ss_dma_unmap_single() 548 dma_sync_single_for_cpu(udc->gadget.dev.parent, in _nbu2ss_dma_unmap_single() 1611 if (udc->gadget.is_selfpowered) in std_req_get_status() 1781 nret = udc->driver->setup(&udc->gadget, &udc->ctrl); in _nbu2ss_decode_request() 1893 if (udc->gadget.speed == USB_SPEED_UNKNOWN) in _nbu2ss_ep0_int() 1894 udc->gadget.speed = _nbu2ss_get_speed(udc); in _nbu2ss_ep0_int() 2244 udc->gadget.speed = USB_SPEED_UNKNOWN; in _nbu2ss_quiesce() 2249 list_for_each_entry(ep, &udc->gadget.ep_list, ep.ep_list) { in _nbu2ss_quiesce() [all …]
|
D | TODO | 4 * move driver into drivers/usb/gadget/
|
D | Kconfig | 10 gadget drivers to also be dynamically linked.
|
/linux-4.1.27/drivers/usb/ |
D | README | 6 "gadget.pdf" for peripheral side.) Also, Documentation/usb has 33 gadget/ - This is for USB peripheral controller drivers and 34 the various gadget drivers which talk to them.
|
D | Kconfig | 152 source "drivers/usb/gadget/Kconfig" 158 This option adds LED triggers for USB host and/or gadget activity. 162 gadget.
|
D | Makefile | 60 obj-$(CONFIG_USB_GADGET) += gadget/
|
/linux-4.1.27/drivers/usb/musb/ |
D | Kconfig | 41 thereby the gadget feature will be regressed. 48 Select this when you want to use MUSB in gadget mode only, 57 both host and gadget features are enabled.
|
D | musb_gadget.c | 1531 static int musb_gadget_get_frame(struct usb_gadget *gadget) in musb_gadget_get_frame() argument 1533 struct musb *musb = gadget_to_musb(gadget); in musb_gadget_get_frame() 1538 static int musb_gadget_wakeup(struct usb_gadget *gadget) in musb_gadget_wakeup() argument 1540 struct musb *musb = gadget_to_musb(gadget); in musb_gadget_wakeup() 1613 musb_gadget_set_self_powered(struct usb_gadget *gadget, int is_selfpowered) in musb_gadget_set_self_powered() argument 1615 gadget->is_selfpowered = !!is_selfpowered; in musb_gadget_set_self_powered() 1637 static int musb_gadget_vbus_session(struct usb_gadget *gadget, int is_active) 1650 static int musb_gadget_vbus_draw(struct usb_gadget *gadget, unsigned mA) in musb_gadget_vbus_draw() argument 1652 struct musb *musb = gadget_to_musb(gadget); in musb_gadget_vbus_draw() 1659 static int musb_gadget_pullup(struct usb_gadget *gadget, int is_on) in musb_gadget_pullup() argument [all …]
|
/linux-4.1.27/arch/arm/boot/dts/ |
D | evk-pro3.dts | 39 usb1: gadget@fffa4000 {
|
D | ethernut5.dts | 52 usb1: gadget@fffa4000 {
|
D | at91-cosino_mega2560.dts | 47 usb2: gadget@f803c000 {
|
D | tny_a9263.dts | 48 usb1: gadget@fff78000 {
|
D | usb_a9260_common.dtsi | 40 usb1: gadget@fffa4000 {
|
D | at91rm9200ek.dts | 40 usb1: gadget@fffb0000 {
|
D | aks-cdu.dts | 54 usb1: gadget@fffa4000 {
|
D | usb_a9263.dts | 53 usb1: gadget@fff78000 {
|
D | at91-foxg20.dts | 46 usb1: gadget@fffa4000 {
|
D | at91-qil_a9260.dts | 43 usb1: gadget@fffa4000 {
|
D | at91sam9x5ek.dtsi | 55 usb2: gadget@f803c000 {
|
D | at91sam9rlek.dts | 148 usb0: gadget@fffd4000 {
|
D | at91sam9g20ek_common.dtsi | 82 usb1: gadget@fffa4000 {
|
D | at91sam9263ek.dts | 61 usb1: gadget@fff78000 {
|
D | at91sam9n12ek.dts | 130 usb1: gadget@f803c000 {
|
D | at91sam9261ek.dts | 117 usb1: gadget@fffa4000 {
|
D | sama5d3xmb.dtsi | 179 usb0: gadget@00500000 {
|
D | at91-sama5d3_xplained.dts | 266 usb0: gadget@00500000 {
|
/linux-4.1.27/drivers/usb/common/ |
D | usb-otg-fsm.c | 265 else if (fsm->b_sess_vld && fsm->otg->gadget) in otg_statemachine() 279 gadget->b_hnp_enable && fsm->a_bus_suspend) in otg_statemachine()
|
/linux-4.1.27/Documentation/misc-devices/ |
D | spear-pcie-gadget.txt | 20 PCIe gadget support for SPEAr13XX platform 97 It will have to be insured that, once link up is done on gadget, then only host
|
/linux-4.1.27/Documentation/ |
D | SM501.txt | 7 which may provide numerous interfaces including USB host controller USB gadget,
|