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

Commit 8fa52ab6 authored by Asutosh Das's avatar Asutosh Das
Browse files

scsi: ufshcd: Turn-off Vdd-hba during suspend



Turn-off Vdd-hba of ufs when link is not off.
This will not prevent CxPC.

Change-Id: I70dc95a2b4f2001ce052877f698930adb6b4b72b
Signed-off-by: default avatarAsutosh Das <asutoshd@codeaurora.org>
parent a546e4ea
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -8026,6 +8026,23 @@ static int ufshcd_vreg_set_hpm(struct ufs_hba *hba)
	return ret;
}

#if defined(CONFIG_SCSI_UFSHCD_QTI)
static void ufshcd_hba_vreg_set_lpm(struct ufs_hba *hba)
{
	if (ufshcd_is_link_off(hba) ||
	    (ufshcd_is_link_hibern8(hba)
	     && ufshcd_is_power_collapse_during_hibern8_allowed(hba)))
		ufshcd_setup_hba_vreg(hba, false);
}

static void ufshcd_hba_vreg_set_hpm(struct ufs_hba *hba)
{
	if (ufshcd_is_link_off(hba) ||
	    (ufshcd_is_link_hibern8(hba)
	     && ufshcd_is_power_collapse_during_hibern8_allowed(hba)))
		ufshcd_setup_hba_vreg(hba, true);
}
#else
static void ufshcd_hba_vreg_set_lpm(struct ufs_hba *hba)
{
	if (ufshcd_is_link_off(hba))
@@ -8037,6 +8054,7 @@ static void ufshcd_hba_vreg_set_hpm(struct ufs_hba *hba)
	if (ufshcd_is_link_off(hba))
		ufshcd_setup_hba_vreg(hba, true);
}
#endif

/**
 * ufshcd_suspend - helper function for suspend operations