Lines Matching full:otg
3 * TUSB6010 USB 2.0 OTG Dual Role controller
324 /* This is used by gadget drivers, and OTG transceiver logic, allowing
346 if (x->otg->default_a || mA < (musb->min_power << 1)) in tusb_draw_power()
465 switch (musb->xceiv->otg->state) { in musb_do_idle()
471 usb_otg_state_string(musb->xceiv->otg->state)); in musb_do_idle()
525 && (musb->xceiv->otg->state == OTG_STATE_A_WAIT_BCON))) { in tusb_musb_try_idle()
527 usb_otg_state_string(musb->xceiv->otg->state)); in tusb_musb_try_idle()
544 usb_otg_state_string(musb->xceiv->otg->state), in tusb_musb_try_idle()
561 struct usb_otg *otg = musb->xceiv->otg; in tusb_musb_set_vbus() local
574 otg->default_a = 1; in tusb_musb_set_vbus()
575 musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; in tusb_musb_set_vbus()
588 switch (musb->xceiv->otg->state) { in tusb_musb_set_vbus()
591 musb->xceiv->otg->state = OTG_STATE_A_WAIT_VFALL; in tusb_musb_set_vbus()
594 musb->xceiv->otg->state = OTG_STATE_A_IDLE; in tusb_musb_set_vbus()
597 musb->xceiv->otg->state = OTG_STATE_A_IDLE; in tusb_musb_set_vbus()
600 otg->default_a = 1; in tusb_musb_set_vbus()
604 otg->default_a = 0; in tusb_musb_set_vbus()
605 musb->xceiv->otg->state = OTG_STATE_B_IDLE; in tusb_musb_set_vbus()
619 dev_dbg(musb->controller, "VBUS %s, devctl %02x otg %3x conf %08x prcm %08x\n", in tusb_musb_set_vbus()
620 usb_otg_state_string(musb->xceiv->otg->state), in tusb_musb_set_vbus()
627 * Sets the mode to OTG, peripheral or host by changing the ID detection.
687 struct usb_otg *otg = musb->xceiv->otg; in tusb_otg_ints() local
695 otg->default_a = default_a; in tusb_otg_ints()
707 if (!otg->default_a) { in tusb_otg_ints()
719 if (musb->xceiv->otg->state != OTG_STATE_B_IDLE) { in tusb_otg_ints()
721 musb->xceiv->otg->state = OTG_STATE_B_IDLE; in tusb_otg_ints()
726 dev_dbg(musb->controller, "vbus change, %s, otg %03x\n", in tusb_otg_ints()
727 usb_otg_state_string(musb->xceiv->otg->state), otg_stat); in tusb_otg_ints()
732 dev_dbg(musb->controller, "vbus change, %s, otg %03x\n", in tusb_otg_ints()
733 usb_otg_state_string(musb->xceiv->otg->state), otg_stat); in tusb_otg_ints()
735 switch (musb->xceiv->otg->state) { in tusb_otg_ints()
777 /* OTG timer expiration */ in tusb_otg_ints()
782 usb_otg_state_string(musb->xceiv->otg->state), otg_stat); in tusb_otg_ints()
784 switch (musb->xceiv->otg->state) { in tusb_otg_ints()
796 musb->xceiv->otg->state = OTG_STATE_A_WAIT_BCON; in tusb_otg_ints()
880 /* OTG state change reports (annoyingly) not issued by Mentor core */ in tusb_musb_interrupt()
959 /* maybe force into the Default-A OTG state machine */ in tusb_musb_enable()
1084 /* simplify: always sense/pullup ID pins, as if in OTG mode */ in tusb_musb_start()