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

Commit 8036cdae authored by Kyle Yan's avatar Kyle Yan Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: dwc3: core: Allow platform glue driver to handle PM" into msm-4.9

parents 4e70ce4c 5ca41123
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1547,6 +1547,10 @@ static int dwc3_suspend(struct device *dev)
	struct dwc3	*dwc = dev_get_drvdata(dev);
	int		ret;

	/* Check if platform glue driver handling PM, if not then handle here */
	if (!dwc3_notify_event(dwc, DWC3_CORE_PM_SUSPEND_EVENT))
		return 0;

	ret = dwc3_suspend_common(dwc);
	if (ret)
		return ret;
@@ -1561,6 +1565,10 @@ static int dwc3_resume(struct device *dev)
	struct dwc3	*dwc = dev_get_drvdata(dev);
	int		ret;

	/* Check if platform glue driver handling PM, if not then handle here */
	if (!dwc3_notify_event(dwc, DWC3_CORE_PM_RESUME_EVENT))
		return 0;

	pinctrl_pm_select_default_state(dev);

	ret = dwc3_resume_common(dwc);