Lines Matching refs:gadget
61 if (d->gadget.speed == USB_SPEED_HIGH) in ast_vhub_dev_enable()
105 d->gadget.speed = USB_SPEED_UNKNOWN; in ast_vhub_dev_disable()
174 st0 = d->gadget.is_selfpowered << USB_DEVICE_SELF_POWERED; in ast_vhub_dev_status()
239 if (d->gadget.speed == USB_SPEED_UNKNOWN) { in ast_vhub_std_dev_request()
240 d->gadget.speed = ep->vhub->speed; in ast_vhub_std_dev_request()
241 if (d->gadget.speed > d->driver->max_speed) in ast_vhub_std_dev_request()
242 d->gadget.speed = d->driver->max_speed; in ast_vhub_std_dev_request()
244 d->gadget.speed); in ast_vhub_std_dev_request()
277 static int ast_vhub_udc_wakeup(struct usb_gadget* gadget) in ast_vhub_udc_wakeup() argument
279 struct ast_vhub_dev *d = to_ast_dev(gadget); in ast_vhub_udc_wakeup()
297 static int ast_vhub_udc_get_frame(struct usb_gadget* gadget) in ast_vhub_udc_get_frame() argument
299 struct ast_vhub_dev *d = to_ast_dev(gadget); in ast_vhub_udc_get_frame()
315 static int ast_vhub_udc_pullup(struct usb_gadget* gadget, int on) in ast_vhub_udc_pullup() argument
317 struct ast_vhub_dev *d = to_ast_dev(gadget); in ast_vhub_udc_pullup()
341 static int ast_vhub_udc_start(struct usb_gadget *gadget, in ast_vhub_udc_start() argument
344 struct ast_vhub_dev *d = to_ast_dev(gadget); in ast_vhub_udc_start()
353 d->gadget.is_selfpowered = 1; in ast_vhub_udc_start()
360 static struct usb_ep *ast_vhub_udc_match_ep(struct usb_gadget *gadget, in ast_vhub_udc_match_ep() argument
364 struct ast_vhub_dev *d = to_ast_dev(gadget); in ast_vhub_udc_match_ep()
377 list_for_each_entry(u_ep, &gadget->ep_list, ep_list) { in ast_vhub_udc_match_ep()
378 if (usb_gadget_ep_match_desc(gadget, u_ep, desc, ss)) { in ast_vhub_udc_match_ep()
396 if (gadget_is_dualspeed(gadget)) in ast_vhub_udc_match_ep()
402 if (gadget_is_dualspeed(gadget)) in ast_vhub_udc_match_ep()
408 if (gadget_is_dualspeed(gadget)) in ast_vhub_udc_match_ep()
445 static int ast_vhub_udc_stop(struct usb_gadget *gadget) in ast_vhub_udc_stop() argument
447 struct ast_vhub_dev *d = to_ast_dev(gadget); in ast_vhub_udc_stop()
455 d->gadget.speed = USB_SPEED_UNKNOWN; in ast_vhub_udc_stop()
480 d->driver->suspend(&d->gadget); in ast_vhub_dev_suspend()
489 d->driver->resume(&d->gadget); in ast_vhub_dev_resume()
509 usb_gadget_udc_reset(&d->gadget, d->driver); in ast_vhub_dev_reset()
533 usb_del_gadget_udc(&d->gadget); in ast_vhub_del_dev()
584 INIT_LIST_HEAD(&d->gadget.ep_list); in ast_vhub_init_dev()
585 d->gadget.ops = &ast_vhub_udc_ops; in ast_vhub_init_dev()
586 d->gadget.ep0 = &d->ep0.ep; in ast_vhub_init_dev()
587 d->gadget.name = KBUILD_MODNAME; in ast_vhub_init_dev()
589 d->gadget.max_speed = USB_SPEED_FULL; in ast_vhub_init_dev()
591 d->gadget.max_speed = USB_SPEED_HIGH; in ast_vhub_init_dev()
592 d->gadget.speed = USB_SPEED_UNKNOWN; in ast_vhub_init_dev()
593 d->gadget.dev.of_node = vhub->pdev->dev.of_node; in ast_vhub_init_dev()
595 rc = usb_add_gadget_udc(d->port_dev, &d->gadget); in ast_vhub_init_dev()