Lines Matching refs:gadget

48 static inline struct dwc2_hsotg *to_hsotg(struct usb_gadget *gadget)  in to_hsotg()  argument
50 return container_of(gadget, struct dwc2_hsotg, gadget); in to_hsotg()
292 usb_gadget_unmap_request(&hsotg->gadget, req, hs_ep->dir_in); in dwc2_hsotg_unmap_dma()
710 ret = usb_gadget_map_request(&hsotg->gadget, req, hs_ep->dir_in); in dwc2_hsotg_map_dma()
1251 ret = hsotg->driver->setup(&hsotg->gadget, ctrl); in dwc2_hsotg_process_control()
2101 hsotg->gadget.speed = USB_SPEED_FULL; in dwc2_hsotg_irq_enumdone()
2107 hsotg->gadget.speed = USB_SPEED_HIGH; in dwc2_hsotg_irq_enumdone()
2113 hsotg->gadget.speed = USB_SPEED_LOW; in dwc2_hsotg_irq_enumdone()
2122 usb_speed_string(hsotg->gadget.speed)); in dwc2_hsotg_irq_enumdone()
3123 static int dwc2_hsotg_udc_start(struct usb_gadget *gadget, in dwc2_hsotg_udc_start() argument
3126 struct dwc2_hsotg *hsotg = to_hsotg(gadget); in dwc2_hsotg_udc_start()
3152 hsotg->gadget.dev.of_node = hsotg->dev->of_node; in dwc2_hsotg_udc_start()
3153 hsotg->gadget.speed = USB_SPEED_UNKNOWN; in dwc2_hsotg_udc_start()
3162 otg_set_peripheral(hsotg->uphy->otg, &hsotg->gadget); in dwc2_hsotg_udc_start()
3186 static int dwc2_hsotg_udc_stop(struct usb_gadget *gadget) in dwc2_hsotg_udc_stop() argument
3188 struct dwc2_hsotg *hsotg = to_hsotg(gadget); in dwc2_hsotg_udc_stop()
3206 hsotg->gadget.speed = USB_SPEED_UNKNOWN; in dwc2_hsotg_udc_stop()
3226 static int dwc2_hsotg_gadget_getframe(struct usb_gadget *gadget) in dwc2_hsotg_gadget_getframe() argument
3228 return dwc2_hsotg_read_frameno(to_hsotg(gadget)); in dwc2_hsotg_gadget_getframe()
3238 static int dwc2_hsotg_pullup(struct usb_gadget *gadget, int is_on) in dwc2_hsotg_pullup() argument
3240 struct dwc2_hsotg *hsotg = to_hsotg(gadget); in dwc2_hsotg_pullup()
3263 hsotg->gadget.speed = USB_SPEED_UNKNOWN; in dwc2_hsotg_pullup()
3269 static int dwc2_hsotg_vbus_session(struct usb_gadget *gadget, int is_active) in dwc2_hsotg_vbus_session() argument
3271 struct dwc2_hsotg *hsotg = to_hsotg(gadget); in dwc2_hsotg_vbus_session()
3306 static int dwc2_hsotg_vbus_draw(struct usb_gadget *gadget, unsigned mA) in dwc2_hsotg_vbus_draw() argument
3308 struct dwc2_hsotg *hsotg = to_hsotg(gadget); in dwc2_hsotg_vbus_draw()
3358 list_add_tail(&hs_ep->ep.ep_list, &hsotg->gadget.ep_list); in dwc2_hsotg_initep()
3574 hsotg->gadget.max_speed = USB_SPEED_HIGH; in dwc2_gadget_init()
3575 hsotg->gadget.ops = &dwc2_hsotg_gadget_ops; in dwc2_gadget_init()
3576 hsotg->gadget.name = dev_name(dev); in dwc2_gadget_init()
3578 hsotg->gadget.is_otg = 1; in dwc2_gadget_init()
3637 INIT_LIST_HEAD(&hsotg->gadget.ep_list); in dwc2_gadget_init()
3638 hsotg->gadget.ep0 = &hsotg->eps_out[0]->ep; in dwc2_gadget_init()
3659 ret = usb_add_gadget_udc(dev, &hsotg->gadget); in dwc2_gadget_init()
3674 usb_del_gadget_udc(&hsotg->gadget); in dwc2_hsotg_remove()
3696 hsotg->gadget.speed = USB_SPEED_UNKNOWN; in dwc2_hsotg_suspend()