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

Commit d2e18313 authored by Nitin Rawat's avatar Nitin Rawat
Browse files

scsi: ufs: Ensure phy gdsc is on below calling enable clock



This fix checks for phy gdsc regulator state and calls
gcc clock enable only if the state is on.

Change-Id: Ia7da57c48adcc05670bdf2989582f48b13c17fc4
Signed-off-by: default avatarNitin Rawat <nitirawa@codeaurora.org>
parent 2190df27
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -10278,10 +10278,18 @@ static void ufshcd_hba_vreg_set_lpm(struct ufs_hba *hba)

static void ufshcd_hba_vreg_set_hpm(struct ufs_hba *hba)
{
	int ret;
	struct ufs_vreg_info *info = &hba->vreg_info;

	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);
		ret = ufshcd_setup_hba_vreg(hba, true);

	if (ret && (info->vdd_hba->enabled == false)) {
		dev_err(hba->dev, "vdd_hba is not enabled\n");
		BUG_ON(1);
	}
}

/**