Lines Matching refs:gadget
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()
1175 rc = usb_gadget_map_request(&udc->gadget, req, bep->iudma->is_tx); in bcm63xx_udc_queue()
1211 usb_gadget_unmap_request(&udc->gadget, &breq->req, bep->iudma->is_tx); in bcm63xx_udc_dequeue()
1307 rc = udc->driver->setup(&udc->gadget, ctrl); in bcm63xx_ep0_setup_callback()
1385 usb_gadget_map_request(&udc->gadget, req, iudma->is_tx); in bcm63xx_ep0_map_write()
1419 usb_gadget_unmap_request(&udc->gadget, req, is_tx); in bcm63xx_ep0_nuke_reply()
1544 usb_gadget_unmap_request(&udc->gadget, in bcm63xx_ep0_do_idle()
1740 static int bcm63xx_udc_get_frame(struct usb_gadget *gadget) in bcm63xx_udc_get_frame() argument
1742 struct bcm63xx_udc *udc = gadget_to_udc(gadget); in bcm63xx_udc_get_frame()
1755 static int bcm63xx_udc_pullup(struct usb_gadget *gadget, int is_on) in bcm63xx_udc_pullup() argument
1757 struct bcm63xx_udc *udc = gadget_to_udc(gadget); in bcm63xx_udc_pullup()
1763 udc->gadget.speed = USB_SPEED_UNKNOWN; in bcm63xx_udc_pullup()
1774 bcm63xx_select_pullup(gadget_to_udc(gadget), true); in bcm63xx_udc_pullup()
1777 bcm63xx_select_pullup(gadget_to_udc(gadget), false); in bcm63xx_udc_pullup()
1802 static int bcm63xx_udc_start(struct usb_gadget *gadget, in bcm63xx_udc_start() argument
1805 struct bcm63xx_udc *udc = gadget_to_udc(gadget); in bcm63xx_udc_start()
1827 udc->gadget.dev.of_node = udc->dev->of_node; in bcm63xx_udc_start()
1839 static int bcm63xx_udc_stop(struct usb_gadget *gadget, in bcm63xx_udc_stop() argument
1842 struct bcm63xx_udc *udc = gadget_to_udc(gadget); in bcm63xx_udc_stop()
1906 enum usb_device_speed oldspeed = udc->gadget.speed; in bcm63xx_update_link_speed()
1910 udc->gadget.speed = USB_SPEED_HIGH; in bcm63xx_update_link_speed()
1913 udc->gadget.speed = USB_SPEED_FULL; in bcm63xx_update_link_speed()
1917 udc->gadget.speed = USB_SPEED_UNKNOWN; in bcm63xx_update_link_speed()
1923 if (udc->gadget.speed != oldspeed) { in bcm63xx_update_link_speed()
1925 udc->gadget.speed == USB_SPEED_HIGH ? "high" : "full"); in bcm63xx_update_link_speed()
1979 udc->gadget.speed != USB_SPEED_UNKNOWN) in bcm63xx_udc_ctrl_isr()
1982 udc->gadget.speed = USB_SPEED_UNKNOWN; in bcm63xx_udc_ctrl_isr()
2016 udc->driver->disconnect(&udc->gadget); in bcm63xx_udc_ctrl_isr()
2098 usb_gadget_unmap_request(&udc->gadget, req, iudma->is_tx); in bcm63xx_udc_data_isr()
2266 root = debugfs_create_dir(udc->gadget.name, NULL); in bcm63xx_udc_init_debugfs()
2354 udc->gadget.ops = &bcm63xx_udc_ops; in bcm63xx_udc_probe()
2355 udc->gadget.name = dev_name(dev); in bcm63xx_udc_probe()
2358 udc->gadget.max_speed = USB_SPEED_HIGH; in bcm63xx_udc_probe()
2360 udc->gadget.max_speed = USB_SPEED_FULL; in bcm63xx_udc_probe()
2396 rc = usb_add_gadget_udc(dev, &udc->gadget); in bcm63xx_udc_probe()
2415 usb_del_gadget_udc(&udc->gadget); in bcm63xx_udc_remove()