Lines Matching refs:gadget
833 static int _gadget_stop_activity(struct usb_gadget *gadget) in _gadget_stop_activity() argument
836 struct ci_hdrc *ci = container_of(gadget, struct ci_hdrc, gadget); in _gadget_stop_activity()
840 gadget_for_each_ep(ep, gadget) { in _gadget_stop_activity()
847 gadget_for_each_ep(ep, gadget) { in _gadget_stop_activity()
857 ci->gadget.speed = USB_SPEED_UNKNOWN; in _gadget_stop_activity()
881 if (ci->gadget.speed != USB_SPEED_UNKNOWN) in isr_reset_handler()
882 usb_gadget_udc_reset(&ci->gadget, ci->driver); in isr_reset_handler()
884 retval = _gadget_stop_activity(&ci->gadget); in isr_reset_handler()
1012 ci->gadget.is_selfpowered; in isr_get_status_response()
1055 usb_gadget_set_state(&ci->gadget, USB_STATE_ADDRESS); in isr_setup_status_complete()
1129 dev_warn(&ci->gadget.dev, in otg_a_alt_hnp_support()
1262 ci->gadget.b_hnp_enable = 1; in isr_setup_packet_handler()
1273 ci->gadget.a_hnp_support = 1; in isr_setup_packet_handler()
1291 err = ci->driver->setup(&ci->gadget, &req); in isr_setup_packet_handler()
1433 if (hwep->ci->gadget.speed == USB_SPEED_UNKNOWN) { in ep_disable()
1526 if (hwep->ci->gadget.speed == USB_SPEED_UNKNOWN) { in ep_queue()
1553 if (hwep->ci->gadget.speed != USB_SPEED_UNKNOWN) in ep_dequeue()
1565 usb_gadget_unmap_request(&hwep->ci->gadget, req, hwep->dir); in ep_dequeue()
1625 if (hwep->ci->gadget.speed == USB_SPEED_UNKNOWN) { in ep_fifo_flush()
1659 struct ci_hdrc *ci = container_of(_gadget, struct ci_hdrc, gadget); in ci_hdrc_gadget_connect()
1676 ci->driver->disconnect(&ci->gadget); in ci_hdrc_gadget_connect()
1681 _gadget_stop_activity(&ci->gadget); in ci_hdrc_gadget_connect()
1689 struct ci_hdrc *ci = container_of(_gadget, struct ci_hdrc, gadget); in ci_udc_vbus_session()
1713 struct ci_hdrc *ci = container_of(_gadget, struct ci_hdrc, gadget); in ci_udc_wakeup()
1718 if (ci->gadget.speed == USB_SPEED_UNKNOWN) { in ci_udc_wakeup()
1738 struct ci_hdrc *ci = container_of(_gadget, struct ci_hdrc, gadget); in ci_udc_vbus_draw()
1747 struct ci_hdrc *ci = container_of(_gadget, struct ci_hdrc, gadget); in ci_udc_selfpowered()
1763 struct ci_hdrc *ci = container_of(_gadget, struct ci_hdrc, gadget); in ci_udc_pullup()
1782 static int ci_udc_start(struct usb_gadget *gadget,
1784 static int ci_udc_stop(struct usb_gadget *gadget);
1787 static struct usb_ep *ci_udc_match_ep(struct usb_gadget *gadget, in ci_udc_match_ep() argument
1791 struct ci_hdrc *ci = container_of(gadget, struct ci_hdrc, gadget); in ci_udc_match_ep()
1795 list_for_each_entry_reverse(ep, &ci->gadget.ep_list, ep_list) { in ci_udc_match_ep()
1879 list_add_tail(&hwep->ep.ep_list, &ci->gadget.ep_list); in init_eps()
1905 static int ci_udc_start(struct usb_gadget *gadget, in ci_udc_start() argument
1908 struct ci_hdrc *ci = container_of(gadget, struct ci_hdrc, gadget); in ci_udc_start()
1933 ci_hdrc_gadget_connect(gadget, 1); in ci_udc_start()
1935 usb_udc_vbus_handler(&ci->gadget, false); in ci_udc_start()
1959 static int ci_udc_stop(struct usb_gadget *gadget) in ci_udc_stop() argument
1961 struct ci_hdrc *ci = container_of(gadget, struct ci_hdrc, gadget); in ci_udc_stop()
1973 _gadget_stop_activity(&ci->gadget); in ci_udc_stop()
2018 ci->gadget.speed = hw_port_is_high_speed(ci) ? in udc_irq()
2023 ci->driver->resume(&ci->gadget); in udc_irq()
2027 usb_gadget_set_state(&ci->gadget, in udc_irq()
2037 ci->resume_state = ci->gadget.state; in udc_irq()
2038 if (ci->gadget.speed != USB_SPEED_UNKNOWN && in udc_irq()
2041 ci->driver->suspend(&ci->gadget); in udc_irq()
2044 usb_gadget_set_state(&ci->gadget, in udc_irq()
2066 ci->gadget.ops = &usb_gadget_ops; in udc_start()
2067 ci->gadget.speed = USB_SPEED_UNKNOWN; in udc_start()
2068 ci->gadget.max_speed = USB_SPEED_HIGH; in udc_start()
2069 ci->gadget.name = ci->platdata->name; in udc_start()
2070 ci->gadget.otg_caps = otg_caps; in udc_start()
2071 ci->gadget.sg_supported = 1; in udc_start()
2072 ci->gadget.irq = ci->irq; in udc_start()
2075 ci->gadget.quirk_avoids_skb_reserve = 1; in udc_start()
2079 ci->gadget.is_otg = 1; in udc_start()
2081 INIT_LIST_HEAD(&ci->gadget.ep_list); in udc_start()
2102 ci->gadget.ep0 = &ci->ep0in->ep; in udc_start()
2104 retval = usb_add_gadget_udc(dev, &ci->gadget); in udc_start()
2129 usb_del_gadget_udc(&ci->gadget); in ci_hdrc_gadget_destroy()