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