Lines Matching refs:dwc2
668 struct dwc2_hsotg *dwc2 = dev_get_drvdata(dev); in dwc2_suspend() local
669 bool is_device_mode = dwc2_is_device_mode(dwc2); in dwc2_suspend()
673 dwc2_hsotg_suspend(dwc2); in dwc2_suspend()
675 dwc2_drd_suspend(dwc2); in dwc2_suspend()
677 if (dwc2->params.activate_stm_id_vb_detection) { in dwc2_suspend()
685 dwc2_force_mode(dwc2, !is_device_mode); in dwc2_suspend()
687 spin_lock_irqsave(&dwc2->lock, flags); in dwc2_suspend()
688 gotgctl = dwc2_readl(dwc2, GOTGCTL); in dwc2_suspend()
697 dwc2_writel(dwc2, gotgctl, GOTGCTL); in dwc2_suspend()
698 spin_unlock_irqrestore(&dwc2->lock, flags); in dwc2_suspend()
700 ggpio = dwc2_readl(dwc2, GGPIO); in dwc2_suspend()
703 dwc2_writel(dwc2, ggpio, GGPIO); in dwc2_suspend()
705 regulator_disable(dwc2->usb33d); in dwc2_suspend()
708 if (dwc2->ll_hw_enabled && in dwc2_suspend()
709 (is_device_mode || dwc2_host_can_poweroff_phy(dwc2))) { in dwc2_suspend()
710 ret = __dwc2_lowlevel_hw_disable(dwc2); in dwc2_suspend()
711 dwc2->phy_off_for_suspend = true; in dwc2_suspend()
719 struct dwc2_hsotg *dwc2 = dev_get_drvdata(dev); in dwc2_resume() local
722 if (dwc2->phy_off_for_suspend && dwc2->ll_hw_enabled) { in dwc2_resume()
723 ret = __dwc2_lowlevel_hw_enable(dwc2); in dwc2_resume()
727 dwc2->phy_off_for_suspend = false; in dwc2_resume()
729 if (dwc2->params.activate_stm_id_vb_detection) { in dwc2_resume()
733 ret = regulator_enable(dwc2->usb33d); in dwc2_resume()
737 ggpio = dwc2_readl(dwc2, GGPIO); in dwc2_resume()
740 dwc2_writel(dwc2, ggpio, GGPIO); in dwc2_resume()
745 spin_lock_irqsave(&dwc2->lock, flags); in dwc2_resume()
746 gotgctl = dwc2_readl(dwc2, GOTGCTL); in dwc2_resume()
750 dwc2_writel(dwc2, gotgctl, GOTGCTL); in dwc2_resume()
751 spin_unlock_irqrestore(&dwc2->lock, flags); in dwc2_resume()
755 dwc2_force_dr_mode(dwc2); in dwc2_resume()
757 dwc2_drd_resume(dwc2); in dwc2_resume()
759 if (dwc2_is_device_mode(dwc2)) in dwc2_resume()
760 ret = dwc2_hsotg_resume(dwc2); in dwc2_resume()