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

Commit eddc3bb7 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: phy-msm: Resume HW early on bus-resume when pm_suspended"

parents f5be93c4 911e6423
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -817,7 +817,9 @@ static void msm_otg_kick_sm_work(struct msm_otg *motg)
	if (atomic_read(&motg->in_lpm))
		motg->resume_pending = true;

	if (atomic_read(&motg->pm_suspended)) {
	/* For device mode, resume now. Let pm_resume handle other cases */
	if (atomic_read(&motg->pm_suspended) &&
			motg->phy.state != OTG_STATE_B_SUSPEND) {
		motg->sm_work_pending = true;
	} else if (!motg->sm_work_pending) {
		/* process event only if previous one is not pending */
@@ -5237,13 +5239,8 @@ static int msm_otg_pm_resume(struct device *dev)
	if (motg->resume_pending || motg->phy_irq_pending) {
		msm_otg_dbg_log_event(&motg->phy, "PM RESUME BY USB",
				motg->async_int, motg->resume_pending);
		/* Bring hardware out of LPM asap, sm_work can handle the rest*/
		msm_otg_resume(motg);

		/* sm work will start in pm notify */
		/* sm work if pending will start in pm notify to exit LPM */
	}
	msm_otg_dbg_log_event(&motg->phy, "PM RESUME DONE",
			get_pm_runtime_counter(dev), motg->async_int);

	return ret;
}