• Home
  • Raw
  • Download

Lines Matching refs:otg

258 	if ((fsl_otg_dev->phy.otg->state == OTG_STATE_B_SRP_INIT) &&  in b_srp_end()
271 if (!fsl_otg_dev->phy.otg->host->b_hnp_enable) in a_wait_enum()
459 struct usb_otg *otg = fsm->otg; in fsl_otg_start_host() local
462 container_of(otg->usb_phy, struct fsl_otg, phy); in fsl_otg_start_host()
465 if (!otg->host) in fsl_otg_start_host()
467 dev = otg->host->controller; in fsl_otg_start_host()
526 struct usb_otg *otg = fsm->otg; in fsl_otg_start_gadget() local
529 if (!otg->gadget || !otg->gadget->dev.parent) in fsl_otg_start_gadget()
533 dev = otg->gadget->dev.parent; in fsl_otg_start_gadget()
550 static int fsl_otg_set_host(struct usb_otg *otg, struct usb_bus *host) in fsl_otg_set_host() argument
554 if (!otg) in fsl_otg_set_host()
557 otg_dev = container_of(otg->usb_phy, struct fsl_otg, phy); in fsl_otg_set_host()
561 otg->host = host; in fsl_otg_set_host()
569 otg->host->otg_port = fsl_otg_initdata.otg_port; in fsl_otg_set_host()
570 otg->host->is_b_host = otg_dev->fsm.id; in fsl_otg_set_host()
586 otg->state = OTG_STATE_UNDEFINED; in fsl_otg_set_host()
599 static int fsl_otg_set_peripheral(struct usb_otg *otg, in fsl_otg_set_peripheral() argument
604 if (!otg) in fsl_otg_set_peripheral()
607 otg_dev = container_of(otg->usb_phy, struct fsl_otg, phy); in fsl_otg_set_peripheral()
614 if (!otg->default_a) in fsl_otg_set_peripheral()
615 otg->gadget->ops->vbus_draw(otg->gadget, 0); in fsl_otg_set_peripheral()
616 usb_gadget_vbus_disconnect(otg->gadget); in fsl_otg_set_peripheral()
617 otg->gadget = 0; in fsl_otg_set_peripheral()
623 otg->gadget = gadget; in fsl_otg_set_peripheral()
624 otg->gadget->is_a_peripheral = !otg_dev->fsm.id; in fsl_otg_set_peripheral()
662 static int fsl_otg_start_srp(struct usb_otg *otg) in fsl_otg_start_srp() argument
666 if (!otg || otg->state != OTG_STATE_B_IDLE) in fsl_otg_start_srp()
669 otg_dev = container_of(otg->usb_phy, struct fsl_otg, phy); in fsl_otg_start_srp()
680 static int fsl_otg_start_hnp(struct usb_otg *otg) in fsl_otg_start_hnp() argument
684 if (!otg) in fsl_otg_start_hnp()
687 otg_dev = container_of(otg->usb_phy, struct fsl_otg, phy); in fsl_otg_start_hnp()
709 struct usb_otg *otg = ((struct fsl_otg *)dev_id)->phy.otg; in fsl_otg_isr() local
720 otg->default_a = (fsm->id == 0); in fsl_otg_isr()
726 otg->default_a = (fsm->id == 0); in fsl_otg_isr()
733 if (otg->host) in fsl_otg_isr()
734 otg->host->is_b_host = fsm->id; in fsl_otg_isr()
735 if (otg->gadget) in fsl_otg_isr()
736 otg->gadget->is_a_peripheral = !fsm->id; in fsl_otg_isr()
785 fsl_otg_tc->phy.otg = kzalloc(sizeof(struct usb_otg), GFP_KERNEL); in fsl_otg_conf()
786 if (!fsl_otg_tc->phy.otg) { in fsl_otg_conf()
808 fsl_otg_tc->phy.otg->usb_phy = &fsl_otg_tc->phy; in fsl_otg_conf()
809 fsl_otg_tc->phy.otg->set_host = fsl_otg_set_host; in fsl_otg_conf()
810 fsl_otg_tc->phy.otg->set_peripheral = fsl_otg_set_peripheral; in fsl_otg_conf()
811 fsl_otg_tc->phy.otg->start_hnp = fsl_otg_start_hnp; in fsl_otg_conf()
812 fsl_otg_tc->phy.otg->start_srp = fsl_otg_start_srp; in fsl_otg_conf()
826 kfree(fsl_otg_tc->phy.otg); in fsl_otg_conf()
847 fsm->otg = p_otg->phy.otg; in usb_otg_start()
882 kfree(p_otg->phy.otg); in usb_otg_start()
942 p_otg->phy.otg->state = OTG_STATE_UNDEFINED; in usb_otg_start()
945 p_otg->phy.otg->state = OTG_STATE_A_IDLE; in usb_otg_start()
1000 usb_otg_state_string(fsl_otg_dev->phy.otg->state)); in show_fsl_usb2_otg_state()
1153 kfree(fsl_otg_dev->phy.otg); in fsl_otg_remove()