Home
last modified time | relevance | path

Searched refs:gadget (Results 1 – 25 of 157) sorted by relevance

1234567

/drivers/usb/gadget/udc/
Dcore.c48 struct usb_gadget *gadget; member
441 int usb_gadget_frame_number(struct usb_gadget *gadget) in usb_gadget_frame_number() argument
445 ret = gadget->ops->get_frame(gadget); in usb_gadget_frame_number()
447 trace_usb_gadget_frame_number(gadget, ret); in usb_gadget_frame_number()
466 int usb_gadget_wakeup(struct usb_gadget *gadget) in usb_gadget_wakeup() argument
470 if (!gadget->ops->wakeup) { in usb_gadget_wakeup()
475 ret = gadget->ops->wakeup(gadget); in usb_gadget_wakeup()
478 trace_usb_gadget_wakeup(gadget, ret); in usb_gadget_wakeup()
493 int usb_gadget_set_selfpowered(struct usb_gadget *gadget) in usb_gadget_set_selfpowered() argument
497 if (!gadget->ops->set_selfpowered) { in usb_gadget_set_selfpowered()
[all …]
Dat91_udc.c199 udc->gadget.is_selfpowered ? "self" : "VBUS", in proc_udc_show()
233 list_for_each_entry (ep, &udc->gadget.ep_list, ep.ep_list) { in proc_udc_show()
506 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) { in at91_ep_enable()
645 if (!udc || !udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) { in at91_ep_queue()
805 static int at91_get_frame(struct usb_gadget *gadget) in at91_get_frame() argument
807 struct at91_udc *udc = to_udc(gadget); in at91_get_frame()
809 if (!to_udc(gadget)->clocked) in at91_get_frame()
814 static int at91_wakeup(struct usb_gadget *gadget) in at91_wakeup() argument
816 struct at91_udc *udc = to_udc(gadget); in at91_wakeup()
845 INIT_LIST_HEAD(&udc->gadget.ep_list); in udc_reinit()
[all …]
Ds3c-hsudc.c144 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()
1038 INIT_LIST_HEAD(&hsudc->gadget.ep_list); in s3c_hsudc_setup_ep()
1096 hsudc->gadget.speed = (sys_status & S3C_SSR_HSP) ? in s3c_hsudc_irq()
[all …]
Dbcm63xx_udc.c306 struct usb_gadget gadget; member
349 return container_of(g, struct bcm63xx_udc, gadget); in gadget_to_udc()
471 int is_hs = udc->gadget.speed == USB_SPEED_HIGH; in bcm63xx_fifo_setup()
568 int max_pkt = udc->gadget.speed == USB_SPEED_HIGH ? in bcm63xx_ep_setup()
961 INIT_LIST_HEAD(&udc->gadget.ep_list); in bcm63xx_init_udc_hw()
969 list_add_tail(&bep->ep.ep_list, &udc->gadget.ep_list); in bcm63xx_init_udc_hw()
977 udc->gadget.ep0 = &udc->bep[0].ep; in bcm63xx_init_udc_hw()
980 udc->gadget.speed = USB_SPEED_UNKNOWN; in bcm63xx_init_udc_hw()
1006 if (udc->gadget.max_speed == USB_SPEED_HIGH) in bcm63xx_init_udc_hw()
1102 usb_gadget_unmap_request(&udc->gadget, &breq->req, in bcm63xx_ep_disable()
[all …]
Dfsl_udc_core.c190 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 …]
Ddummy_hcd.c86 struct usb_gadget *gadget; member
259 struct usb_gadget gadget; member
292 return dum->gadget.dev.parent; in udc_dev()
297 return container_of(ep->gadget, struct dummy, gadget); in ep_to_dummy()
300 static inline struct dummy_hcd *gadget_to_dummy_hcd(struct usb_gadget *gadget) in gadget_to_dummy_hcd() argument
302 struct dummy *dum = container_of(gadget, struct dummy, gadget); in gadget_to_dummy_hcd()
303 if (dum->gadget.speed == USB_SPEED_SUPER) in gadget_to_dummy_hcd()
311 return container_of(dev, struct dummy, gadget.dev); in gadget_dev_to_dummy()
428 dum->gadget.speed != USB_SPEED_SUPER) || in set_link_state()
430 dum->gadget.speed == USB_SPEED_SUPER)) in set_link_state()
[all …]
Dmv_udc_core.c240 usb_gadget_unmap_request(&udc->gadget, &req->req, ep_dir(ep)); in done()
458 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) in mv_ep_enable()
710 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) in mv_ep_queue()
716 retval = usb_gadget_map_request(&udc->gadget, _req, ep_dir(ep)); in mv_ep_queue()
752 usb_gadget_unmap_request(&udc->gadget, _req, ep_dir(ep)); in mv_ep_queue()
1115 static int mv_udc_get_frame(struct usb_gadget *gadget) in mv_udc_get_frame() argument
1120 if (!gadget) in mv_udc_get_frame()
1123 udc = container_of(gadget, struct mv_udc, gadget); in mv_udc_get_frame()
1131 static int mv_udc_wakeup(struct usb_gadget *gadget) in mv_udc_wakeup() argument
1133 struct mv_udc *udc = container_of(gadget, struct mv_udc, gadget); in mv_udc_wakeup()
[all …]
/drivers/usb/gadget/
Depautoconf.c68 struct usb_gadget *gadget, in usb_ep_autoconfig_ss() argument
78 if (gadget->ops->match_ep) { in usb_ep_autoconfig_ss()
79 ep = gadget->ops->match_ep(gadget, desc, ep_comp); in usb_ep_autoconfig_ss()
85 list_for_each_entry (ep, &gadget->ep_list, ep_list) { in usb_ep_autoconfig_ss()
86 if (usb_gadget_ep_match_desc(gadget, ep, desc, ep_comp)) in usb_ep_autoconfig_ss()
107 if (++gadget->in_epnum > 15) in usb_ep_autoconfig_ss()
109 desc->bEndpointAddress = USB_DIR_IN | gadget->in_epnum; in usb_ep_autoconfig_ss()
111 if (++gadget->out_epnum > 15) in usb_ep_autoconfig_ss()
113 desc->bEndpointAddress |= gadget->out_epnum; in usb_ep_autoconfig_ss()
166 struct usb_gadget *gadget, in usb_ep_autoconfig() argument
[all …]
Dcomposite.c352 status = usb_gadget_deactivate(cdev->gadget); in usb_function_deactivate()
384 status = usb_gadget_activate(cdev->gadget); in usb_function_activate()
501 struct usb_gadget *gadget = cdev->gadget; in config_desc() local
507 if (gadget->speed >= USB_SPEED_SUPER) in config_desc()
508 speed = gadget->speed; in config_desc()
509 else if (gadget_is_dualspeed(gadget)) { in config_desc()
511 if (gadget->speed == USB_SPEED_HIGH) in config_desc()
564 struct usb_gadget *gadget = cdev->gadget; in count_configs() local
571 if (gadget_is_dualspeed(gadget)) { in count_configs()
572 if (gadget->speed == USB_SPEED_HIGH) in count_configs()
[all …]
/drivers/usb/gadget/legacy/
Ddbgp.c26 struct usb_gadget *gadget; member
123 dev_dbg(&dbgp.gadget->dev, in dbgp_complete()
161 dev_dbg(&dbgp.gadget->dev, in dbgp_enable_ep_req()
203 dev_dbg(&dbgp.gadget->dev, "enable ep: failure (%d:%d)\n", stp, err); in dbgp_enable_ep()
208 static void dbgp_disconnect(struct usb_gadget *gadget) in dbgp_disconnect() argument
217 static void dbgp_unbind(struct usb_gadget *gadget) in dbgp_unbind() argument
225 usb_ep_free_request(gadget->ep0, dbgp.req); in dbgp_unbind()
234 static int dbgp_configure_endpoints(struct usb_gadget *gadget) in dbgp_configure_endpoints() argument
238 usb_ep_autoconfig_reset(gadget); in dbgp_configure_endpoints()
240 dbgp.i_ep = usb_ep_autoconfig(gadget, &i_desc); in dbgp_configure_endpoints()
[all …]
Dether.c218 if (gadget_is_otg(c->cdev->gadget)) { in rndis_do_config()
260 if (gadget_is_otg(c->cdev->gadget)) { in eth_do_config()
275 } else if (can_support_ecm(c->cdev->gadget)) { in eth_do_config()
310 struct usb_gadget *gadget = cdev->gadget; in eth_bind() local
331 } else if (can_support_ecm(gadget)) { in eth_bind()
371 gether_set_gadget(net, cdev->gadget); in eth_bind()
378 else if (can_support_ecm(gadget)) in eth_bind()
406 if (gadget_is_otg(gadget) && !otg_desc[0]) { in eth_bind()
409 usb_desc = usb_otg_descriptor_alloc(gadget); in eth_bind()
412 usb_otg_descriptor_init(gadget, usb_desc); in eth_bind()
[all …]
Dcdc2.c97 if (gadget_is_otg(c->cdev->gadget)) { in cdc_do_config()
144 struct usb_gadget *gadget = cdev->gadget; in cdc_bind() local
148 if (!can_support_ecm(cdev->gadget)) { in cdc_bind()
149 dev_err(&gadget->dev, "controller '%s' not usable\n", in cdc_bind()
150 gadget->name); in cdc_bind()
182 if (gadget_is_otg(gadget) && !otg_desc[0]) { in cdc_bind()
185 usb_desc = usb_otg_descriptor_alloc(gadget); in cdc_bind()
188 usb_otg_descriptor_init(gadget, usb_desc); in cdc_bind()
199 dev_info(&gadget->dev, "%s, version: " DRIVER_VERSION "\n", in cdc_bind()
Dinode.c142 struct usb_gadget *gadget; member
781 switch (data->dev->gadget->speed) { in ep_config()
934 (void) usb_ep_set_halt (dev->gadget->ep0); in ep0_read()
939 struct usb_ep *ep = dev->gadget->ep0; in ep0_read()
955 if (gadget_is_dualspeed(dev->gadget) in ep0_read()
956 && (dev->gadget->speed in ep0_read()
961 usb_gadget_vbus_draw(dev->gadget, 2 * power); in ep0_read()
997 clean_req (dev->gadget->ep0, dev->req); in ep0_read()
1137 retval = setup_req (dev->gadget->ep0, dev->req, len); in ep0_write()
1148 dev->gadget->ep0, dev->req, in ep0_write()
[all …]
Dprinter.c120 struct usb_gadget *gadget = c->cdev->gadget; in printer_do_config() local
123 usb_ep_autoconfig_reset(gadget); in printer_do_config()
125 usb_gadget_set_selfpowered(gadget); in printer_do_config()
127 if (gadget_is_otg(gadget)) { in printer_do_config()
172 if (gadget_is_otg(cdev->gadget) && !otg_desc[0]) { in printer_bind()
175 usb_desc = usb_otg_descriptor_alloc(cdev->gadget); in printer_bind()
180 usb_otg_descriptor_init(cdev->gadget, usb_desc); in printer_bind()
Dmulti.c142 if (gadget_is_otg(c->cdev->gadget)) { in rndis_do_config()
224 if (gadget_is_otg(c->cdev->gadget)) { in cdc_do_config()
300 struct usb_gadget *gadget = cdev->gadget; in multi_bind() local
311 if (!can_support_ecm(cdev->gadget)) { in multi_bind()
312 dev_err(&gadget->dev, "controller '%s' not usable\n", in multi_bind()
313 gadget->name); in multi_bind()
354 gether_set_gadget(ecm_opts->net, cdev->gadget); in multi_bind()
402 if (gadget_is_otg(gadget) && !otg_desc[0]) { in multi_bind()
405 usb_desc = usb_otg_descriptor_alloc(gadget); in multi_bind()
408 usb_otg_descriptor_init(gadget, usb_desc); in multi_bind()
[all …]
Dncm.c103 if (gadget_is_otg(c->cdev->gadget)) { in ncm_do_config()
135 struct usb_gadget *gadget = cdev->gadget; in gncm_bind() local
161 if (gadget_is_otg(gadget) && !otg_desc[0]) { in gncm_bind()
164 usb_desc = usb_otg_descriptor_alloc(gadget); in gncm_bind()
167 usb_otg_descriptor_init(gadget, usb_desc); in gncm_bind()
178 dev_info(&gadget->dev, "%s\n", DRIVER_DESC); in gncm_bind()
/drivers/usb/gadget/udc/bdc/
Dbdc_udc.c91 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 …]
/drivers/usb/phy/
Dphy-gpio-vbus-usb.c107 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 …]
Dphy-tahvo.c88 if (tu->phy.otg->gadget) in check_vbus_state()
89 usb_gadget_vbus_connect(tu->phy.otg->gadget); in check_vbus_state()
107 if (tu->phy.otg->gadget) in check_vbus_state()
108 usb_gadget_vbus_disconnect(tu->phy.otg->gadget); in check_vbus_state()
164 if (tu->phy.otg->gadget) in tahvo_usb_stop_peripheral()
165 usb_gadget_vbus_disconnect(tu->phy.otg->gadget); in tahvo_usb_stop_peripheral()
174 if (tu->phy.otg->gadget) in tahvo_usb_power_off()
175 usb_gadget_vbus_disconnect(tu->phy.otg->gadget); in tahvo_usb_power_off()
230 struct usb_gadget *gadget) in tahvo_usb_set_peripheral() argument
235 dev_dbg(&tu->pt_dev->dev, "%s %p\n", __func__, gadget); in tahvo_usb_set_peripheral()
[all …]
/drivers/usb/isp1760/
Disp1760-udc.c36 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 …]
/drivers/usb/chipidea/
Dudc.c426 ret = usb_gadget_map_request(&ci->gadget, &hwreq->req, hwep->dir); in _hardware_enqueue()
606 usb_gadget_unmap_request(&hwep->ci->gadget, &hwreq->req, hwep->dir); in _hardware_dequeue()
706 static int _gadget_stop_activity(struct usb_gadget *gadget) in _gadget_stop_activity() argument
709 struct ci_hdrc *ci = container_of(gadget, struct ci_hdrc, gadget); in _gadget_stop_activity()
713 ci->gadget.speed = USB_SPEED_UNKNOWN; in _gadget_stop_activity()
719 gadget_for_each_ep(ep, gadget) { in _gadget_stop_activity()
726 gadget_for_each_ep(ep, gadget) { in _gadget_stop_activity()
754 if (ci->gadget.speed != USB_SPEED_UNKNOWN) in isr_reset_handler()
755 usb_gadget_udc_reset(&ci->gadget, ci->driver); in isr_reset_handler()
757 retval = _gadget_stop_activity(&ci->gadget); in isr_reset_handler()
[all …]
/drivers/usb/renesas_usbhs/
Dmod_gadget.c48 struct usb_gadget gadget; member
96 container_of(g, struct usbhsg_gpriv, gadget)
115 #define usbhsg_is_not_connected(gp) ((gp)->gadget.speed == USB_SPEED_UNKNOWN)
469 gpriv->gadget.speed = usbhs_bus_get_speed(priv); in usbhsg_irq_dev_state()
473 gpriv->gadget.speed); in usbhsg_irq_dev_state()
544 ret = gpriv->driver->setup(&gpriv->gadget, &ctrl); in usbhsg_irq_ctrl_stage()
898 gpriv->gadget.speed = USB_SPEED_UNKNOWN; in usbhsg_try_stop()
939 static int usbhsg_gadget_start(struct usb_gadget *gadget, in usbhsg_gadget_start() argument
942 struct usbhsg_gpriv *gpriv = usbhsg_gadget_to_gpriv(gadget); in usbhsg_gadget_start()
955 &gpriv->gadget); in usbhsg_gadget_start()
[all …]
/drivers/usb/gadget/function/
Df_obex.c202 dev_dbg(&cdev->gadget->dev, in obex_set_alt()
210 dev_dbg(&cdev->gadget->dev, in obex_set_alt()
216 dev_dbg(&cdev->gadget->dev, in obex_set_alt()
218 if (config_ep_by_speed(cdev->gadget, f, in obex_set_alt()
220 config_ep_by_speed(cdev->gadget, f, in obex_set_alt()
229 dev_dbg(&cdev->gadget->dev, in obex_set_alt()
257 dev_dbg(&cdev->gadget->dev, "obex ttyGS%d disable\n", obex->port_num); in obex_disable()
271 dev_dbg(&cdev->gadget->dev, in obex_connect()
284 dev_dbg(&cdev->gadget->dev, in obex_disconnect()
299 if (!gadget_is_altset_supported(c->cdev->gadget)) in can_support_obex()
[all …]
Df_acm.c315 dev_dbg(&cdev->gadget->dev, "acm ttyGS%d completion, err %d\n", in acm_complete_set_line_coding()
322 dev_dbg(&cdev->gadget->dev, "acm ttyGS%d short resp, len %d\n", in acm_complete_set_line_coding()
367 cdev->gadget->ep0->driver_data = acm; in acm_setup()
399 dev_vdbg(&cdev->gadget->dev, in acm_setup()
407 dev_dbg(&cdev->gadget->dev, in acm_setup()
413 value = usb_ep_queue(cdev->gadget->ep0, req, GFP_ATOMIC); in acm_setup()
431 dev_vdbg(&cdev->gadget->dev, in acm_set_alt()
436 if (config_ep_by_speed(cdev->gadget, f, acm->notify)) in acm_set_alt()
443 dev_dbg(&cdev->gadget->dev, in acm_set_alt()
448 dev_dbg(&cdev->gadget->dev, in acm_set_alt()
[all …]
Df_serial.c157 dev_dbg(&cdev->gadget->dev, in gser_set_alt()
162 dev_dbg(&cdev->gadget->dev, in gser_set_alt()
164 if (config_ep_by_speed(cdev->gadget, f, gser->port.in) || in gser_set_alt()
165 config_ep_by_speed(cdev->gadget, f, gser->port.out)) { in gser_set_alt()
180 dev_dbg(&cdev->gadget->dev, in gser_disable()
218 ep = usb_ep_autoconfig(cdev->gadget, &gser_fs_in_desc); in gser_bind()
223 ep = usb_ep_autoconfig(cdev->gadget, &gser_fs_out_desc); in gser_bind()
242 dev_dbg(&cdev->gadget->dev, "generic ttyGS%d: %s speed IN/%s OUT/%s\n", in gser_bind()
244 gadget_is_superspeed(c->cdev->gadget) ? "super" : in gser_bind()
245 gadget_is_dualspeed(c->cdev->gadget) ? "dual" : "full", in gser_bind()

1234567