Home
last modified time | relevance | path

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

123456

/external/u-boot/include/linux/usb/
Dgadget.h473 void (*udc_set_speed)(struct usb_gadget *gadget,
542 static inline void set_gadget_data(struct usb_gadget *gadget, void *data) in set_gadget_data() argument
544 gadget->dev.driver_data = data; in set_gadget_data()
547 static inline void *get_gadget_data(struct usb_gadget *gadget) in get_gadget_data() argument
549 return gadget->dev.driver_data; in get_gadget_data()
558 #define gadget_for_each_ep(tmp, gadget) \ argument
559 list_for_each_entry(tmp, &(gadget)->ep_list, ep_list)
610 static inline int usb_gadget_frame_number(struct usb_gadget *gadget) in usb_gadget_frame_number() argument
612 return gadget->ops->get_frame(gadget); in usb_gadget_frame_number()
628 static inline int usb_gadget_wakeup(struct usb_gadget *gadget) in usb_gadget_wakeup() argument
[all …]
/external/u-boot/drivers/usb/gadget/
Depautoconf.c47 struct usb_gadget *gadget, in ep_matches() argument
85 if (gadget_is_pxa(gadget) in ep_matches()
122 if (!gadget->is_dualspeed && max > 64) in ep_matches()
130 if (!gadget->is_dualspeed && max > 1023) in ep_matches()
136 if (!gadget->is_dualspeed) in ep_matches()
174 find_ep(struct usb_gadget *gadget, const char *name) in find_ep() argument
178 list_for_each_entry(ep, &gadget->ep_list, ep_list) { in find_ep()
216 struct usb_gadget *gadget, in usb_ep_autoconfig() argument
228 if (gadget_is_net2280(gadget) && type == USB_ENDPOINT_XFER_INT) { in usb_ep_autoconfig()
230 ep = find_ep(gadget, "ep-e"); in usb_ep_autoconfig()
[all …]
Dgadget_chips.h173 static inline int usb_gadget_controller_number(struct usb_gadget *gadget) in usb_gadget_controller_number() argument
175 if (gadget_is_net2280(gadget)) in usb_gadget_controller_number()
177 else if (gadget_is_dummy(gadget)) in usb_gadget_controller_number()
179 else if (gadget_is_pxa(gadget)) in usb_gadget_controller_number()
181 else if (gadget_is_sh(gadget)) in usb_gadget_controller_number()
183 else if (gadget_is_sa1100(gadget)) in usb_gadget_controller_number()
185 else if (gadget_is_goku(gadget)) in usb_gadget_controller_number()
187 else if (gadget_is_mq11xx(gadget)) in usb_gadget_controller_number()
189 else if (gadget_is_omap(gadget)) in usb_gadget_controller_number()
191 else if (gadget_is_n9604(gadget)) in usb_gadget_controller_number()
[all …]
Dcomposite.c100 status = usb_gadget_disconnect(cdev->gadget); in usb_function_deactivate()
127 status = usb_gadget_connect(cdev->gadget); in usb_function_activate()
224 struct usb_gadget *gadget = cdev->gadget; in config_desc() local
229 if (gadget_is_dualspeed(gadget)) { in config_desc()
230 if (gadget->speed == USB_SPEED_HIGH) in config_desc()
256 struct usb_gadget *gadget = cdev->gadget; in count_configs() local
261 if (gadget_is_dualspeed(gadget)) { in count_configs()
262 if (gadget->speed == USB_SPEED_HIGH) in count_configs()
293 qual->bMaxPacketSize0 = cdev->gadget->ep0->maxpacket; in device_qual()
316 struct usb_gadget *gadget = cdev->gadget; in set_config() local
[all …]
Dg_dnl.c94 struct usb_gadget *gadget = cdev->gadget; in g_dnl_unbind() local
97 "controller '%s'\n", __func__, gadget->name); in g_dnl_unbind()
98 usb_gadget_disconnect(gadget); in g_dnl_unbind()
196 struct usb_gadget *gadget = cdev->gadget; in g_dnl_get_bcd_device_number() local
199 gcnum = usb_gadget_controller_number(gadget); in g_dnl_get_bcd_device_number()
221 struct usb_gadget *gadget = cdev->gadget; in g_dnl_bind() local
225 debug("%s: gadget: 0x%p cdev: 0x%p\n", __func__, gadget, cdev); in g_dnl_bind()
261 __func__, gadget->name); in g_dnl_bind()
266 "controller '%s'\n", __func__, gadget->name); in g_dnl_bind()
267 usb_gadget_connect(gadget); in g_dnl_bind()
Dether.c100 struct usb_gadget *gadget; member
196 #define qlen(gadget) \ argument
197 (DEFAULT_QLEN*((gadget->speed == USB_SPEED_HIGH) ? qmult : 1))
210 #define qlen(gadget) DEFAULT_QLEN argument
930 struct usb_gadget *gadget = dev->gadget; in set_ether_config() local
935 dev->status = ep_desc(gadget, &hs_status_desc, in set_ether_config()
948 dev->in = ep_desc(gadget, &hs_source_desc, &fs_source_desc); in set_ether_config()
951 dev->out = ep_desc(gadget, &hs_sink_desc, &fs_sink_desc); in set_ether_config()
981 result = alloc_requests(dev, qlen(gadget), gfp_flags); in set_ether_config()
1048 struct usb_gadget *gadget = dev->gadget; in eth_set_config() local
[all …]
Dat91_udc.c301 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) { in at91_ep_enable()
440 if (!udc || !udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) { in at91_ep_queue()
597 static int at91_get_frame(struct usb_gadget *gadget) in at91_get_frame() argument
599 struct at91_udc *udc = to_udc(gadget); in at91_get_frame()
601 if (!to_udc(gadget)->clocked) in at91_get_frame()
606 static int at91_wakeup(struct usb_gadget *gadget) in at91_wakeup() argument
608 struct at91_udc *udc = to_udc(gadget); in at91_wakeup()
637 INIT_LIST_HEAD(&udc->gadget.ep_list); in udc_reinit()
638 INIT_LIST_HEAD(&udc->gadget.ep0->ep_list); in udc_reinit()
644 list_add_tail(&ep->ep.ep_list, &udc->gadget.ep_list); in udc_reinit()
[all …]
Ddwc2_udc_otg.c123 the_controller->gadget.dev.device_data = p; in set_udc_gadget_private_data()
126 void *get_udc_gadget_private_data(struct usb_gadget *gadget) in get_udc_gadget_private_data() argument
128 return gadget->dev.device_data; in get_udc_gadget_private_data()
175 dev->gadget.speed = USB_SPEED_UNKNOWN; in udc_disable()
191 INIT_LIST_HEAD(&dev->gadget.ep_list); in udc_reinit()
192 INIT_LIST_HEAD(&dev->gadget.ep0->ep_list); in udc_reinit()
200 list_add_tail(&ep->ep.ep_list, &dev->gadget.ep_list); in udc_reinit()
228 dev->gadget.speed = USB_SPEED_UNKNOWN; in udc_enable()
265 retval = driver->bind(&dev->gadget); in usb_gadget_register_driver()
269 dev->gadget.name, retval); in usb_gadget_register_driver()
[all …]
Df_dfu.c248 static int handle_dnload(struct usb_gadget *gadget, u16 len) in handle_dnload() argument
250 struct usb_composite_dev *cdev = get_gadget_data(gadget); in handle_dnload()
266 struct usb_gadget *gadget, in state_app_idle() argument
293 struct usb_gadget *gadget, in state_app_detach() argument
316 struct usb_gadget *gadget, in state_dfu_idle() argument
332 value = handle_dnload(gadget, len); in state_dfu_idle()
376 struct usb_gadget *gadget, in state_dfu_dnload_sync() argument
399 struct usb_gadget *gadget, in state_dfu_dnbusy() argument
419 struct usb_gadget *gadget, in state_dfu_dnload_idle() argument
430 value = handle_dnload(gadget, len); in state_dfu_dnload_idle()
[all …]
Datmel_usba_udc.c287 if (udc->gadget.speed != USB_SPEED_UNKNOWN) in usba_ep_disable()
346 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN || in usba_ep_queue()
471 static int usba_udc_get_frame(struct usb_gadget *gadget) in usba_udc_get_frame() argument
473 struct usba_udc *udc = to_usba_udc(gadget); in usba_udc_get_frame()
478 static int usba_udc_wakeup(struct usb_gadget *gadget) in usba_udc_wakeup() argument
480 struct usba_udc *udc = to_usba_udc(gadget); in usba_udc_wakeup()
497 usba_udc_set_selfpowered(struct usb_gadget *gadget, int is_selfpowered) in usba_udc_set_selfpowered() argument
499 struct usba_udc *udc = to_usba_udc(gadget); in usba_udc_set_selfpowered()
538 ep = to_usba_ep(udc->gadget.ep0); in reset_all_endpoints()
550 list_for_each_entry(ep, &udc->gadget.ep_list, ep.ep_list) { in reset_all_endpoints()
[all …]
Df_thor.c636 struct usb_gadget *gadget = dev->gadget; in thor_func_setup() local
662 value = usb_ep_queue(gadget->ep0, req, 0); in thor_func_setup()
749 struct usb_gadget *gadget = c->cdev->gadget; in thor_func_bind() local
761 dev->gadget = gadget; in thor_func_bind()
770 dev->req = usb_ep_alloc_request(gadget->ep0, 0); in thor_func_bind()
802 ep = usb_ep_autoconfig(gadget, &fs_in_desc); in thor_func_bind()
808 if (gadget_is_dualspeed(gadget)) { in thor_func_bind()
816 ep = usb_ep_autoconfig(gadget, &fs_out_desc); in thor_func_bind()
822 if (gadget_is_dualspeed(gadget)) in thor_func_bind()
829 ep = usb_ep_autoconfig(gadget, &fs_int_desc); in thor_func_bind()
[all …]
Df_fastboot.c152 struct usb_gadget *gadget = c->cdev->gadget; in fastboot_bind() local
168 f_fb->in_ep = usb_ep_autoconfig(gadget, &fs_ep_in); in fastboot_bind()
173 f_fb->out_ep = usb_ep_autoconfig(gadget, &fs_ep_out); in fastboot_bind()
180 if (gadget_is_dualspeed(gadget)) { in fastboot_bind()
243 struct usb_gadget *gadget = cdev->gadget; in fastboot_set_alt() local
250 d = fb_ep_desc(gadget, &fs_ep_out, &hs_ep_out); in fastboot_set_alt()
265 d = fb_ep_desc(gadget, &fs_ep_in, &hs_ep_in); in fastboot_set_alt()
DKconfig4 # (b) the gadget driver using it.
34 peripheral/device side bus controller, and a "gadget driver" for
83 bool "DesignWare USB2.0 HS OTG controller (gadget mode)"
86 The Designware USB2.0 high-speed gadget controller
122 This value will be used except for system-specific gadget
130 bool "Enable USB download gadget"
132 Composite USB download gadget support (g_dnl) for download functions.
133 This code works on top of composite gadget.
138 bool "Enable USB mass storage gadget"
144 bool "Enable USB rockusb gadget"
[all …]
Dci_udc.c84 static int ci_pullup(struct usb_gadget *gadget, int is_on);
142 .gadget = {
340 if ((max > 64) && (controller.gadget.speed == USB_SPEED_FULL)) in ci_ep_enable()
728 usb_ep_queue(controller.gadget.ep0, in handle_setup()
743 usb_ep_queue(controller.gadget.ep0, req, 0); in handle_setup()
751 usb_ep_queue(controller.gadget.ep0, req, 0); in handle_setup()
756 status = controller.driver->setup(&controller.gadget, &r); in handle_setup()
827 controller.gadget.speed = speed; in udc_irq()
884 controller.driver->disconnect(&controller.gadget); in udc_disconnect()
887 static int ci_pullup(struct usb_gadget *gadget, int is_on) in ci_pullup() argument
[all …]
Dpxa25x_udc.c327 if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) { in pxa25x_ep_enable()
745 || dev->gadget.speed == USB_SPEED_UNKNOWN)) { in pxa25x_ep_queue()
954 if (ep->dev->gadget.speed == USB_SPEED_UNKNOWN in pxa25x_ep_fifo_status()
1047 if (udc->gadget.speed != USB_SPEED_UNKNOWN) in pullup()
1062 udc = container_of(_gadget, struct pxa25x_udc, gadget); in pxa25x_udc_vbus_session()
1073 udc = container_of(_gadget, struct pxa25x_udc, gadget); in pxa25x_udc_pullup()
1121 dev->gadget.speed = USB_SPEED_UNKNOWN; in udc_disable()
1132 INIT_LIST_HEAD(&dev->gadget.ep_list); in udc_reinit()
1133 INIT_LIST_HEAD(&dev->gadget.ep0->ep_list); in udc_reinit()
1141 list_add_tail(&ep->ep.ep_list, &dev->gadget.ep_list); in udc_reinit()
[all …]
Datmel_usba_udc.h287 struct usb_gadget gadget; member
312 static inline struct usba_udc *to_usba_udc(struct usb_gadget *gadget) in to_usba_udc() argument
314 return container_of(gadget, struct usba_udc, gadget); in to_usba_udc()
Dfotg210.c50 struct usb_gadget gadget; member
336 chip->gadget.speed = USB_SPEED_HIGH; in fotg210_setup()
341 chip->gadget.speed = USB_SPEED_FULL; in fotg210_setup()
440 if (chip->driver->setup(&chip->gadget, req) < 0) in fotg210_setup()
738 chip = container_of(_gadget, struct fotg210_chip, gadget); in fotg210_pullup()
752 chip = container_of(_gadget, struct fotg210_chip, gadget); in fotg210_get_frame()
775 .gadget = {
922 INIT_LIST_HEAD(&chip->gadget.ep_list); in usb_gadget_register_driver()
933 list_add_tail(&ep->ep.ep_list, &chip->gadget.ep_list); in usb_gadget_register_driver()
942 ret = driver->bind(&chip->gadget); in usb_gadget_register_driver()
[all …]
Df_sdp.c417 struct usb_gadget *gadget = f->config->cdev->gadget; in sdp_setup() local
460 value = usb_ep_queue(gadget->ep0, req, 0); in sdp_setup()
472 struct usb_gadget *gadget = c->cdev->gadget; in sdp_bind() local
485 ep = usb_ep_autoconfig(gadget, &in_desc); in sdp_bind()
787 c->cdev, c->cdev->gadget, c->cdev->gadget->ep0); in sdp_add()
/external/u-boot/drivers/usb/gadget/udc/
Dudc-core.c38 struct usb_gadget *gadget; member
49 int usb_gadget_map_request(struct usb_gadget *gadget, in usb_gadget_map_request() argument
62 void usb_gadget_unmap_request(struct usb_gadget *gadget, in usb_gadget_unmap_request() argument
91 void usb_gadget_set_state(struct usb_gadget *gadget, in usb_gadget_set_state() argument
94 gadget->state = state; in usb_gadget_set_state()
109 void usb_gadget_udc_reset(struct usb_gadget *gadget, in usb_gadget_udc_reset() argument
112 driver->reset(gadget); in usb_gadget_udc_reset()
113 usb_gadget_set_state(gadget, USB_STATE_DEFAULT); in usb_gadget_udc_reset()
132 return udc->gadget->ops->udc_start(udc->gadget, udc->driver); in usb_gadget_udc_start()
149 udc->gadget->ops->udc_stop(udc->gadget); in usb_gadget_udc_stop()
[all …]
/external/u-boot/drivers/usb/cdns3/
Dgadget.c646 usb_gadget_unmap_request(&priv_dev->gadget, request, in cdns3_gadget_giveback()
906 if (priv_dev->gadget.speed == USB_SPEED_SUPER) in cdns3_ep_run_transfer()
1027 list_for_each_entry(ep, &priv_dev->gadget.ep_list, ep_list) { in cdns3_set_hw_configuration()
1280 priv_dev->gadget_driver->disconnect(&priv_dev->gadget); in cdns3_disconnect_gadget()
1310 priv_dev->gadget.speed = speed; in cdns3_check_usb_interrupt_proceed()
1311 usb_gadget_set_state(&priv_dev->gadget, USB_STATE_POWERED); in cdns3_check_usb_interrupt_proceed()
1318 priv_dev->gadget.speed = USB_SPEED_UNKNOWN; in cdns3_check_usb_interrupt_proceed()
1319 usb_gadget_set_state(&priv_dev->gadget, USB_STATE_NOTATTACHED); in cdns3_check_usb_interrupt_proceed()
1327 priv_dev->gadget_driver->suspend(&priv_dev->gadget); in cdns3_check_usb_interrupt_proceed()
1336 priv_dev->gadget_driver->resume(&priv_dev->gadget); in cdns3_check_usb_interrupt_proceed()
[all …]
Dep0.c99 ret = priv_dev->gadget_driver->setup(&priv_dev->gadget, ctrl_req); in cdns3_ep0_delegate_req()
150 enum usb_device_state device_state = priv_dev->gadget.state; in cdns3_req_ep0_set_configuration()
177 usb_gadget_set_state(&priv_dev->gadget, in cdns3_req_ep0_set_configuration()
186 usb_gadget_set_state(&priv_dev->gadget, in cdns3_req_ep0_set_configuration()
207 enum usb_device_state device_state = priv_dev->gadget.state; in cdns3_req_ep0_set_address()
231 usb_gadget_set_state(&priv_dev->gadget, in cdns3_req_ep0_set_address()
262 if (priv_dev->gadget.speed != USB_SPEED_SUPER) in cdns3_req_ep0_get_status()
307 state = priv_dev->gadget.state; in cdns3_ep0_feature_handle_device()
308 speed = priv_dev->gadget.speed; in cdns3_ep0_feature_handle_device()
459 if (priv_dev->gadget.state < USB_STATE_ADDRESS) in cdns3_req_ep0_set_sel()
[all …]
/external/u-boot/drivers/usb/musb-new/
Dmusb_uboot.c373 static struct musb *gadget; variable
378 if (!gadget || !gadget->isr) in usb_gadget_handle_interrupts()
381 return gadget->isr(0, gadget); in usb_gadget_handle_interrupts()
394 if (!gadget) { in usb_gadget_register_driver()
399 ret = musb_gadget_start(&gadget->g, driver); in usb_gadget_register_driver()
405 ret = driver->bind(&gadget->g); in usb_gadget_register_driver()
417 driver->disconnect(&gadget->g); in usb_gadget_unregister_driver()
419 driver->unbind(&gadget->g); in usb_gadget_unregister_driver()
437 musbp = &gadget; in musb_register()
/external/u-boot/drivers/usb/dwc3/
Dgadget.c255 usb_gadget_unmap_request(&dwc->gadget, &req->request, in dwc3_gadget_giveback()
397 if (dwc->gadget.speed == USB_SPEED_SUPER) { in dwc3_gadget_set_ep_config()
910 usb_gadget_unmap_request(&dwc->gadget, &req->request, in __dwc3_gadget_kick_transfer()
986 ret = usb_gadget_map_request(&dwc->gadget, &req->request, in __dwc3_gadget_ep_queue()
1457 dwc->gadget.name, in dwc3_gadget_start()
1604 dwc->gadget.ep0 = &dep->endpoint; in dwc3_gadget_init_hw_endpoints()
1612 &dwc->gadget.ep_list); in dwc3_gadget_init_hw_endpoints()
1630 INIT_LIST_HEAD(&dwc->gadget.ep_list); in dwc3_gadget_init_endpoints()
1919 dwc->gadget_driver->disconnect(&dwc->gadget); in dwc3_disconnect_gadget()
1928 dwc->gadget_driver->suspend(&dwc->gadget); in dwc3_suspend_gadget()
[all …]
Dep0.c157 usb_gadget_set_state(&dwc->gadget, USB_STATE_CONFIGURED); in __dwc3_gadget_ep0_queue()
401 state = dwc->gadget.state; in dwc3_ep0_handle_feature()
499 enum usb_device_state state = dwc->gadget.state; in dwc3_ep0_set_address()
520 usb_gadget_set_state(&dwc->gadget, USB_STATE_ADDRESS); in dwc3_ep0_set_address()
522 usb_gadget_set_state(&dwc->gadget, USB_STATE_DEFAULT); in dwc3_ep0_set_address()
532 ret = dwc->gadget_driver->setup(&dwc->gadget, ctrl); in dwc3_ep0_delegate_req()
539 enum usb_device_state state = dwc->gadget.state; in dwc3_ep0_set_config()
563 usb_gadget_set_state(&dwc->gadget, in dwc3_ep0_set_config()
582 usb_gadget_set_state(&dwc->gadget, in dwc3_ep0_set_config()
638 enum usb_device_state state = dwc->gadget.state; in dwc3_ep0_set_sel()
[all …]
/external/u-boot/doc/device-tree-bindings/usb/
Ddwc2.txt37 - g-rx-fifo-size: size of rx fifo size in gadget mode.
38 - g-np-tx-fifo-size: size of non-periodic tx fifo size in gadget mode.
39 - g-tx-fifo-size: size of periodic tx fifo per endpoint (except ep0) in gadget mode.
46 - g-use-dma: gadget DMA mode is automatically detected

123456