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

Commit 7db752bb authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "scsi: ufs: Put hba into LPM during clk gating"

parents 7ba2cebc e9425a0e
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -270,6 +270,10 @@ static void ufshcd_resume_clkscaling(struct ufs_hba *hba);
static void ufshcd_suspend_clkscaling(struct ufs_hba *hba);
static void __ufshcd_suspend_clkscaling(struct ufs_hba *hba);
static int ufshcd_scale_clks(struct ufs_hba *hba, bool scale_up);
#if defined(CONFIG_SCSI_UFSHCD_QTI)
static void ufshcd_hba_vreg_set_lpm(struct ufs_hba *hba);
static void ufshcd_hba_vreg_set_hpm(struct ufs_hba *hba);
#endif
static irqreturn_t ufshcd_intr(int irq, void *__hba);
static int ufshcd_change_power_mode(struct ufs_hba *hba,
			     struct ufs_pa_layer_attr *pwr_mode);
@@ -1619,6 +1623,9 @@ static void ufshcd_ungate_work(struct work_struct *work)
	}

	spin_unlock_irqrestore(hba->host->host_lock, flags);
#if defined(CONFIG_SCSI_UFSHCD_QTI)
	ufshcd_hba_vreg_set_hpm(hba);
#endif
	ufshcd_setup_clocks(hba, true);

	ufshcd_enable_irq(hba);
@@ -1784,6 +1791,10 @@ static void ufshcd_gate_work(struct work_struct *work)
		/* If link is active, device ref_clk can't be switched off */
		__ufshcd_setup_clocks(hba, false, true);

#if defined(CONFIG_SCSI_UFSHCD_QTI)
	/* Put the host controller in low power mode if possible */
	ufshcd_hba_vreg_set_lpm(hba);
#endif
	/*
	 * In case you are here to cancel this work the gating state
	 * would be marked as REQ_CLKS_ON. In this case keep the state