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

Commit 3ca0a2b8 authored by Sujit Reddy Thumma's avatar Sujit Reddy Thumma
Browse files

scsi: ufs-msm: fix issue with setting the ref_clk enable flag



Fix missing update of ref_clk enable reference count when the
clocks are enabled and also enable shutting down the phy and
device during system suspend.

Change-Id: I7772cd87e0d0528ab5dbe6ea9f09e6d02c86f96c
Signed-off-by: default avatarSujit Reddy Thumma <sthumma@codeaurora.org>
parent e679a0e5
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -1045,6 +1045,8 @@ static int msm_ufs_enable_phy_ref_clk(struct msm_ufs_phy *phy)
				__func__, ret);
		goto out_disable_parent;
	}

	phy->is_ref_clk_enabled = true;
	goto out;

out_disable_parent:
@@ -1501,11 +1503,12 @@ static int msm_ufs_init(struct ufs_hba *hba)
	msm_ufs_advertise_quirks(hba);
	if (hba->quirks & UFSHCD_QUIRK_BROKEN_SUSPEND) {
		/*
		 * During runtime suspend and system suspend keep the device
		 * and the link active but shut-off the system clocks.
		 * During runtime suspend keep the device and the link active
		 * but shut-off the system clocks. During system suspend power
		 * off both link and device.
		 */
		hba->rpm_lvl = UFS_PM_LVL_0;
		hba->spm_lvl = UFS_PM_LVL_0;
		hba->spm_lvl = UFS_PM_LVL_4;

	} else if (hba->quirks & UFSHCD_QUIRK_BROKEN_HIBERN8) {
		/*