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

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

Merge "dwc3-msm: Add support to disable host mode PM runtime"

parents ff79fc3c 8c155eaf
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -48,6 +48,8 @@ Optional properties :
  present if this property is defined.
- qcom,ext-hub-reset-gpio: This corresponds to gpio which is used for HUB reset.
- qcom,disable-dev-mode-pm: If present, it disables PM runtime functionality for device mode.
- qcom,disable-host-mode-pm: If present, it disables XHCI PM runtime functionality when USB
  host mode is used.
Sub nodes:
- Sub node for "DWC3- USB3 controller".
  This sub node is required property for device node. The properties of this subnode
+12 −0
Original line number Diff line number Diff line
@@ -207,6 +207,7 @@ struct dwc3_msm {
	bool			vbus_active;
	bool			suspend;
	bool			ext_inuse;
	bool			disable_host_mode_pm;
	enum dwc3_id_state	id_state;
	unsigned long		lpm_flags;
#define MDWC3_SS_PHY_SUSPEND		BIT(0)
@@ -2333,6 +2334,9 @@ static int dwc3_msm_probe(struct platform_device *pdev)
		dev_err(&pdev->dev,
			"unable to read platform data tx fifo size\n");

	mdwc->disable_host_mode_pm = of_property_read_bool(node,
				"qcom,disable-host-mode-pm");

	dwc3_set_notifier(&dwc3_msm_notify_event);

	/* Assumes dwc3 is the only DT child of dwc3-msm */
@@ -2605,6 +2609,14 @@ static int dwc3_otg_start_host(struct dwc3_msm *mdwc, int on)
			return ret;
		}

		/*
		 * In some cases it is observed that USB PHY is not going into
		 * suspend with host mode suspend functionality. Hence disable
		 * XHCI's runtime PM here if disable_host_mode_pm is set.
		 */
		if (mdwc->disable_host_mode_pm)
			pm_runtime_disable(&dwc->xhci->dev);

		hcd = platform_get_drvdata(dwc->xhci);

		mdwc->in_host_mode = true;