Lines Matching full:dwc2

57 static const char dwc2_driver_name[] = "dwc2";
224 hsotg->reset = devm_reset_control_get_optional(hsotg->dev, "dwc2"); in dwc2_lowlevel_hw_init()
233 hsotg->reset_ecc = devm_reset_control_get_optional(hsotg->dev, "dwc2-ecc"); in dwc2_lowlevel_hw_init()
378 * In specific conditions (involving usb hubs) dwc2 devices can create a
382 * of being able to handle the dwc2 interrupts. Disabling dwc2-irqs
665 struct dwc2_hsotg *dwc2 = dev_get_drvdata(dev); in dwc2_suspend() local
666 bool is_device_mode = dwc2_is_device_mode(dwc2); in dwc2_suspend()
670 dwc2_hsotg_suspend(dwc2); in dwc2_suspend()
672 dwc2_drd_suspend(dwc2); in dwc2_suspend()
674 if (dwc2->params.activate_stm_id_vb_detection) { in dwc2_suspend()
682 dwc2_force_mode(dwc2, !is_device_mode); in dwc2_suspend()
684 spin_lock_irqsave(&dwc2->lock, flags); in dwc2_suspend()
685 gotgctl = dwc2_readl(dwc2, GOTGCTL); in dwc2_suspend()
694 dwc2_writel(dwc2, gotgctl, GOTGCTL); in dwc2_suspend()
695 spin_unlock_irqrestore(&dwc2->lock, flags); in dwc2_suspend()
697 ggpio = dwc2_readl(dwc2, GGPIO); in dwc2_suspend()
700 dwc2_writel(dwc2, ggpio, GGPIO); in dwc2_suspend()
702 regulator_disable(dwc2->usb33d); in dwc2_suspend()
705 if (dwc2->ll_hw_enabled && in dwc2_suspend()
706 (is_device_mode || dwc2_host_can_poweroff_phy(dwc2))) { in dwc2_suspend()
707 ret = __dwc2_lowlevel_hw_disable(dwc2); in dwc2_suspend()
708 dwc2->phy_off_for_suspend = true; in dwc2_suspend()
716 struct dwc2_hsotg *dwc2 = dev_get_drvdata(dev); in dwc2_resume() local
719 if (dwc2->phy_off_for_suspend && dwc2->ll_hw_enabled) { in dwc2_resume()
720 ret = __dwc2_lowlevel_hw_enable(dwc2); in dwc2_resume()
724 dwc2->phy_off_for_suspend = false; in dwc2_resume()
726 if (dwc2->params.activate_stm_id_vb_detection) { in dwc2_resume()
730 ret = regulator_enable(dwc2->usb33d); in dwc2_resume()
734 ggpio = dwc2_readl(dwc2, GGPIO); in dwc2_resume()
737 dwc2_writel(dwc2, ggpio, GGPIO); in dwc2_resume()
742 spin_lock_irqsave(&dwc2->lock, flags); in dwc2_resume()
743 gotgctl = dwc2_readl(dwc2, GOTGCTL); in dwc2_resume()
747 dwc2_writel(dwc2, gotgctl, GOTGCTL); in dwc2_resume()
748 spin_unlock_irqrestore(&dwc2->lock, flags); in dwc2_resume()
752 dwc2_force_dr_mode(dwc2); in dwc2_resume()
754 dwc2_drd_resume(dwc2); in dwc2_resume()
756 if (dwc2_is_device_mode(dwc2)) in dwc2_resume()
757 ret = dwc2_hsotg_resume(dwc2); in dwc2_resume()