Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04ddcb09 authored by Ajay Agarwal's avatar Ajay Agarwal Committed by Gerrit - the friendly Code Review server
Browse files

USB: phy: msm: Turn off HSUSB vdd LDO on OTG suspend



Currently we keep voting for hsusb_vdd LDO on msm_otg_suspend.
As a result, LDO remains ON after suspend. Fix this by adding
disable and enable of the LDO during OTG suspend and resume
respectively.

Change-Id: Ifcd754df29fe8e67d42bad0dabc3f848497afdd8
Signed-off-by: default avatarAjay Agarwal <ajaya@codeaurora.org>
parent a20eb0fd
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1462,6 +1462,7 @@ phcd_retry:

	if (motg->lpm_flags & PHY_RETENTIONED ||
		(motg->caps & ALLOW_VDD_MIN_WITH_RETENTION_DISABLED)) {
		regulator_disable(hsusb_vdd);
		msm_hsusb_config_vddcx(0);
	}

@@ -1587,6 +1588,8 @@ static int msm_otg_resume(struct msm_otg *motg)
	if (motg->lpm_flags & PHY_RETENTIONED ||
		(motg->caps & ALLOW_VDD_MIN_WITH_RETENTION_DISABLED)) {
		msm_hsusb_config_vddcx(1);
		ret = regulator_enable(hsusb_vdd);
		WARN(ret, "hsusb_vdd LDO enable failed\n");
		msm_otg_disable_phy_hv_int(motg);
		msm_otg_exit_phy_retention(motg);
		motg->lpm_flags &= ~PHY_RETENTIONED;