Lines Matching refs:gadget
86 bdc->gadget.ep0->maxpacket = EP0_MAX_PKT_SIZE; in bdc_uspc_connected()
87 bdc->gadget.speed = USB_SPEED_SUPER; in bdc_uspc_connected()
98 bdc->gadget.ep0->maxpacket = 64; in bdc_uspc_connected()
99 bdc->gadget.speed = USB_SPEED_HIGH; in bdc_uspc_connected()
104 bdc->gadget.ep0->maxpacket = 64; in bdc_uspc_connected()
105 bdc->gadget.speed = USB_SPEED_FULL; in bdc_uspc_connected()
110 bdc->gadget.ep0->maxpacket = 8; in bdc_uspc_connected()
111 bdc->gadget.speed = USB_SPEED_LOW; in bdc_uspc_connected()
125 usb_gadget_set_state(&bdc->gadget, USB_STATE_DEFAULT); in bdc_uspc_connected()
145 bdc->gadget_driver->disconnect(&bdc->gadget); in bdc_uspc_disconnected()
149 bdc->gadget.speed = USB_SPEED_UNKNOWN; in bdc_uspc_disconnected()
187 if ((bdc->gadget.speed != USB_SPEED_UNKNOWN) && in handle_link_state_change()
192 bdc->gadget_driver->suspend(&bdc->gadget); in handle_link_state_change()
199 if (bdc->gadget.speed == USB_SPEED_SUPER) { in handle_link_state_change()
220 bdc->gadget_driver->resume(&bdc->gadget); in handle_link_state_change()
256 usb_gadget_set_state(&bdc->gadget, USB_STATE_POWERED); in bdc_sr_uspc()
362 static int bdc_udc_start(struct usb_gadget *gadget, in bdc_udc_start() argument
365 struct bdc *bdc = gadget_to_bdc(gadget); in bdc_udc_start()
373 bdc->gadget.name, in bdc_udc_start()
389 bdc->gadget.dev.driver = &driver->driver; in bdc_udc_start()
396 static int bdc_udc_stop(struct usb_gadget *gadget) in bdc_udc_stop() argument
398 struct bdc *bdc = gadget_to_bdc(gadget); in bdc_udc_stop()
405 bdc->gadget.dev.driver = NULL; in bdc_udc_stop()
411 static int bdc_udc_pullup(struct usb_gadget *gadget, int is_on) in bdc_udc_pullup() argument
413 struct bdc *bdc = gadget_to_bdc(gadget); in bdc_udc_pullup()
418 if (!gadget) in bdc_udc_pullup()
446 static int bdc_udc_set_selfpowered(struct usb_gadget *gadget, in bdc_udc_set_selfpowered() argument
449 struct bdc *bdc = gadget_to_bdc(gadget); in bdc_udc_set_selfpowered()
453 gadget->is_selfpowered = (is_self != 0); in bdc_udc_set_selfpowered()
465 static int bdc_udc_wakeup(struct usb_gadget *gadget) in bdc_udc_wakeup() argument
467 struct bdc *bdc = gadget_to_bdc(gadget); in bdc_udc_wakeup()
491 if (bdc->gadget.speed == USB_SPEED_SUPER) in bdc_udc_wakeup()
523 bdc->gadget.ops = &bdc_gadget_ops; in bdc_udc_init()
524 bdc->gadget.max_speed = USB_SPEED_SUPER; in bdc_udc_init()
525 bdc->gadget.speed = USB_SPEED_UNKNOWN; in bdc_udc_init()
526 bdc->gadget.dev.parent = bdc->dev; in bdc_udc_init()
528 bdc->gadget.sg_supported = false; in bdc_udc_init()
531 bdc->gadget.name = BRCM_BDC_NAME; in bdc_udc_init()
547 ret = usb_add_gadget_udc(bdc->dev, &bdc->gadget); in bdc_udc_init()
552 usb_gadget_set_state(&bdc->gadget, USB_STATE_NOTATTACHED); in bdc_udc_init()
571 usb_del_gadget_udc(&bdc->gadget); in bdc_udc_init()
587 usb_del_gadget_udc(&bdc->gadget); in bdc_udc_exit()