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

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

Merge "usb: dwc3-msm: Prevent suspend during pwr_event_handler"

parents de966119 c4c5210b
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1982,6 +1982,13 @@ static void dwc3_pwr_event_handler(struct dwc3_msm *mdwc)
	struct dwc3 *dwc = platform_get_drvdata(mdwc->dwc3);
	u32 irq_stat, irq_clear = 0;

	/*
	 * Increment the PM count to prevent suspend from happening
	 * during this routine. noresume is fine, since this function
	 * should only be called when not in LPM.
	 */
	pm_runtime_get_noresume(mdwc->dev);

	irq_stat = dwc3_msm_read_reg(mdwc->base, PWR_EVNT_IRQ_STAT_REG);
	dev_dbg(mdwc->dev, "%s irq_stat=%X\n", __func__, irq_stat);

@@ -2031,6 +2038,7 @@ static void dwc3_pwr_event_handler(struct dwc3_msm *mdwc)
			__func__, irq_stat);

	dwc3_msm_write_reg(mdwc->base, PWR_EVNT_IRQ_STAT_REG, irq_clear);
	pm_runtime_put(mdwc->dev);
}

static irqreturn_t msm_dwc3_pwr_irq_thread(int irq, void *_mdwc)