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

Commit 9dfea8de authored by Hemant Kumar's avatar Hemant Kumar
Browse files

usb: dwc3: Use clock API to control the memory power states



GDSC driver is removing control for USB memory power states.
DWC driver need to explicitly call clk_set_flag() API to turn
off both memory core and periphery upon vbus off. When core
clock is turned on both of them will be turn on automatically.

Change-Id: I7e442daf51c6ece39b8fe5cc8a38d3405163c9b5
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
parent e94b446e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1927,6 +1927,12 @@ static int dwc3_msm_suspend(struct dwc3_msm *mdwc)
		clk_disable_unprepare(mdwc->bus_aggr_clk);
	clk_disable_unprepare(mdwc->utmi_clk);

	/* Memory core: OFF, Memory periphery: OFF */
	if (!mdwc->in_host_mode && !mdwc->vbus_active) {
		clk_set_flags(mdwc->core_clk, CLKFLAG_NORETAIN_MEM);
		clk_set_flags(mdwc->core_clk, CLKFLAG_NORETAIN_PERIPH);
	}

	clk_set_rate(mdwc->core_clk, 19200000);
	clk_disable_unprepare(mdwc->core_clk);
	/*