Lines Matching refs:otg_dev
467 struct fsl_otg *otg_dev = in fsl_otg_start_host() local
483 if (otg_dev->host_working) in fsl_otg_start_host()
504 otg_dev->host_working = 1; in fsl_otg_start_host()
508 if (!otg_dev->host_working) in fsl_otg_start_host()
519 otg_dev->host_working = 0; in fsl_otg_start_host()
558 struct fsl_otg *otg_dev; in fsl_otg_set_host() local
563 otg_dev = container_of(otg->usb_phy, struct fsl_otg, phy); in fsl_otg_set_host()
564 if (otg_dev != fsl_otg_dev) in fsl_otg_set_host()
569 otg_dev->fsm.a_bus_drop = 0; in fsl_otg_set_host()
570 otg_dev->fsm.a_bus_req = 1; in fsl_otg_set_host()
576 otg->host->is_b_host = otg_dev->fsm.id; in fsl_otg_set_host()
582 otg_dev->host_working = 1; in fsl_otg_set_host()
583 schedule_delayed_work(&otg_dev->otg_event, 100); in fsl_otg_set_host()
587 if (!(fsl_readl(&otg_dev->dr_mem_map->otgsc) & in fsl_otg_set_host()
590 struct otg_fsm *fsm = &otg_dev->fsm; in fsl_otg_set_host()
597 otg_dev->host_working = 0; in fsl_otg_set_host()
599 otg_statemachine(&otg_dev->fsm); in fsl_otg_set_host()
608 struct fsl_otg *otg_dev; in fsl_otg_set_peripheral() local
613 otg_dev = container_of(otg->usb_phy, struct fsl_otg, phy); in fsl_otg_set_peripheral()
614 VDBG("otg_dev 0x%x\n", (int)otg_dev); in fsl_otg_set_peripheral()
616 if (otg_dev != fsl_otg_dev) in fsl_otg_set_peripheral()
624 otg_dev->fsm.b_bus_req = 0; in fsl_otg_set_peripheral()
625 otg_statemachine(&otg_dev->fsm); in fsl_otg_set_peripheral()
630 otg->gadget->is_a_peripheral = !otg_dev->fsm.id; in fsl_otg_set_peripheral()
632 otg_dev->fsm.b_bus_req = 1; in fsl_otg_set_peripheral()
635 pr_debug("ID pin=%d\n", otg_dev->fsm.id); in fsl_otg_set_peripheral()
636 if (otg_dev->fsm.id == 1) { in fsl_otg_set_peripheral()
637 fsl_otg_start_host(&otg_dev->fsm, 0); in fsl_otg_set_peripheral()
638 otg_drv_vbus(&otg_dev->fsm, 0); in fsl_otg_set_peripheral()
639 fsl_otg_start_gadget(&otg_dev->fsm, 1); in fsl_otg_set_peripheral()
681 struct fsl_otg *otg_dev; in fsl_otg_start_srp() local
686 otg_dev = container_of(otg->usb_phy, struct fsl_otg, phy); in fsl_otg_start_srp()
687 if (otg_dev != fsl_otg_dev) in fsl_otg_start_srp()
690 otg_dev->fsm.b_bus_req = 1; in fsl_otg_start_srp()
691 otg_statemachine(&otg_dev->fsm); in fsl_otg_start_srp()
699 struct fsl_otg *otg_dev; in fsl_otg_start_hnp() local
704 otg_dev = container_of(otg->usb_phy, struct fsl_otg, phy); in fsl_otg_start_hnp()
705 if (otg_dev != fsl_otg_dev) in fsl_otg_start_hnp()
711 otg_dev->fsm.a_bus_req = 0; in fsl_otg_start_hnp()
712 otg_statemachine(&otg_dev->fsm); in fsl_otg_start_hnp()