Lines Matching refs:otg_dev
461 struct fsl_otg *otg_dev = in fsl_otg_start_host() local
477 if (otg_dev->host_working) in fsl_otg_start_host()
498 otg_dev->host_working = 1; in fsl_otg_start_host()
502 if (!otg_dev->host_working) in fsl_otg_start_host()
513 otg_dev->host_working = 0; in fsl_otg_start_host()
552 struct fsl_otg *otg_dev; in fsl_otg_set_host() local
557 otg_dev = container_of(otg->usb_phy, struct fsl_otg, phy); in fsl_otg_set_host()
558 if (otg_dev != fsl_otg_dev) in fsl_otg_set_host()
563 otg_dev->fsm.a_bus_drop = 0; in fsl_otg_set_host()
564 otg_dev->fsm.a_bus_req = 1; in fsl_otg_set_host()
570 otg->host->is_b_host = otg_dev->fsm.id; in fsl_otg_set_host()
576 otg_dev->host_working = 1; in fsl_otg_set_host()
577 schedule_delayed_work(&otg_dev->otg_event, 100); in fsl_otg_set_host()
581 if (!(fsl_readl(&otg_dev->dr_mem_map->otgsc) & in fsl_otg_set_host()
584 struct otg_fsm *fsm = &otg_dev->fsm; in fsl_otg_set_host()
591 otg_dev->host_working = 0; in fsl_otg_set_host()
593 otg_statemachine(&otg_dev->fsm); in fsl_otg_set_host()
602 struct fsl_otg *otg_dev; in fsl_otg_set_peripheral() local
607 otg_dev = container_of(otg->usb_phy, struct fsl_otg, phy); in fsl_otg_set_peripheral()
608 VDBG("otg_dev 0x%x\n", (int)otg_dev); in fsl_otg_set_peripheral()
610 if (otg_dev != fsl_otg_dev) in fsl_otg_set_peripheral()
618 otg_dev->fsm.b_bus_req = 0; in fsl_otg_set_peripheral()
619 otg_statemachine(&otg_dev->fsm); in fsl_otg_set_peripheral()
624 otg->gadget->is_a_peripheral = !otg_dev->fsm.id; in fsl_otg_set_peripheral()
626 otg_dev->fsm.b_bus_req = 1; in fsl_otg_set_peripheral()
629 pr_debug("ID pin=%d\n", otg_dev->fsm.id); in fsl_otg_set_peripheral()
630 if (otg_dev->fsm.id == 1) { in fsl_otg_set_peripheral()
631 fsl_otg_start_host(&otg_dev->fsm, 0); in fsl_otg_set_peripheral()
632 otg_drv_vbus(&otg_dev->fsm, 0); in fsl_otg_set_peripheral()
633 fsl_otg_start_gadget(&otg_dev->fsm, 1); in fsl_otg_set_peripheral()
664 struct fsl_otg *otg_dev; in fsl_otg_start_srp() local
669 otg_dev = container_of(otg->usb_phy, struct fsl_otg, phy); in fsl_otg_start_srp()
670 if (otg_dev != fsl_otg_dev) in fsl_otg_start_srp()
673 otg_dev->fsm.b_bus_req = 1; in fsl_otg_start_srp()
674 otg_statemachine(&otg_dev->fsm); in fsl_otg_start_srp()
682 struct fsl_otg *otg_dev; in fsl_otg_start_hnp() local
687 otg_dev = container_of(otg->usb_phy, struct fsl_otg, phy); in fsl_otg_start_hnp()
688 if (otg_dev != fsl_otg_dev) in fsl_otg_start_hnp()
694 otg_dev->fsm.a_bus_req = 0; in fsl_otg_start_hnp()
695 otg_statemachine(&otg_dev->fsm); in fsl_otg_start_hnp()