Lines Matching refs:gadget
35 static inline struct isp1760_udc *gadget_to_udc(struct usb_gadget *gadget) in gadget_to_udc() argument
37 return container_of(gadget, struct isp1760_udc, gadget); in gadget_to_udc()
566 if (udc->gadget.state != USB_STATE_DEFAULT && in isp1760_udc_set_address()
567 udc->gadget.state != USB_STATE_ADDRESS) { in isp1760_udc_set_address()
569 udc->gadget.state); in isp1760_udc_set_address()
573 usb_gadget_set_state(&udc->gadget, addr ? USB_STATE_ADDRESS : in isp1760_udc_set_address()
684 if (udc->gadget.state != USB_STATE_ADDRESS && in isp1760_ep0_setup_standard()
685 udc->gadget.state != USB_STATE_CONFIGURED) in isp1760_ep0_setup_standard()
688 stall = udc->driver->setup(&udc->gadget, req) < 0; in isp1760_ep0_setup_standard()
692 usb_gadget_set_state(&udc->gadget, req->wValue ? in isp1760_ep0_setup_standard()
704 return udc->driver->setup(&udc->gadget, req) < 0; in isp1760_ep0_setup_standard()
763 stall = udc->driver->setup(&udc->gadget, &req.r) < 0; in isp1760_ep0_setup()
1129 usb_gadget_set_state(&udc->gadget, USB_STATE_POWERED); in isp1760_udc_connect()
1136 if (udc->gadget.state < USB_STATE_POWERED) in isp1760_udc_disconnect()
1140 udc->gadget.state); in isp1760_udc_disconnect()
1142 udc->gadget.speed = USB_SPEED_UNKNOWN; in isp1760_udc_disconnect()
1143 usb_gadget_set_state(&udc->gadget, USB_STATE_ATTACHED); in isp1760_udc_disconnect()
1146 udc->driver->disconnect(&udc->gadget); in isp1760_udc_disconnect()
1199 udc->gadget.speed = USB_SPEED_FULL; in isp1760_udc_reset()
1201 usb_gadget_udc_reset(&udc->gadget, udc->driver); in isp1760_udc_reset()
1208 if (udc->gadget.state < USB_STATE_DEFAULT) in isp1760_udc_suspend()
1212 udc->driver->suspend(&udc->gadget); in isp1760_udc_suspend()
1217 if (udc->gadget.state < USB_STATE_DEFAULT) in isp1760_udc_resume()
1221 udc->driver->resume(&udc->gadget); in isp1760_udc_resume()
1228 static int isp1760_udc_get_frame(struct usb_gadget *gadget) in isp1760_udc_get_frame() argument
1230 struct isp1760_udc *udc = gadget_to_udc(gadget); in isp1760_udc_get_frame()
1235 static int isp1760_udc_wakeup(struct usb_gadget *gadget) in isp1760_udc_wakeup() argument
1237 struct isp1760_udc *udc = gadget_to_udc(gadget); in isp1760_udc_wakeup()
1243 static int isp1760_udc_set_selfpowered(struct usb_gadget *gadget, in isp1760_udc_set_selfpowered() argument
1246 struct isp1760_udc *udc = gadget_to_udc(gadget); in isp1760_udc_set_selfpowered()
1256 static int isp1760_udc_pullup(struct usb_gadget *gadget, int is_on) in isp1760_udc_pullup() argument
1258 struct isp1760_udc *udc = gadget_to_udc(gadget); in isp1760_udc_pullup()
1266 static int isp1760_udc_start(struct usb_gadget *gadget, in isp1760_udc_start() argument
1269 struct isp1760_udc *udc = gadget_to_udc(gadget); in isp1760_udc_start()
1296 usb_gadget_set_state(&udc->gadget, USB_STATE_ATTACHED); in isp1760_udc_start()
1309 static int isp1760_udc_stop(struct usb_gadget *gadget) in isp1760_udc_stop() argument
1311 struct isp1760_udc *udc = gadget_to_udc(gadget); in isp1760_udc_stop()
1418 udc->gadget.speed = USB_SPEED_HIGH; in isp1760_udc_irq()
1433 else if (udc->gadget.state >= USB_STATE_POWERED) in isp1760_udc_vbus_poll()
1448 INIT_LIST_HEAD(&udc->gadget.ep_list); in isp1760_udc_init_eps()
1480 udc->gadget.ep0 = &ep->ep; in isp1760_udc_init_eps()
1487 list_add_tail(&ep->ep.ep_list, &udc->gadget.ep_list); in isp1760_udc_init_eps()
1568 udc->gadget.ops = &isp1760_udc_ops; in isp1760_udc_register()
1569 udc->gadget.speed = USB_SPEED_UNKNOWN; in isp1760_udc_register()
1570 udc->gadget.max_speed = USB_SPEED_HIGH; in isp1760_udc_register()
1571 udc->gadget.name = "isp1761_udc"; in isp1760_udc_register()
1575 ret = usb_add_gadget_udc(isp->dev, &udc->gadget); in isp1760_udc_register()
1596 usb_del_gadget_udc(&udc->gadget); in isp1760_udc_unregister()