summary refs log tree commit diff
path: root/drivers/usb/dwc3/host.c
diff options
context:
space:
mode:
authorThinh Nguyen <thinh.nguyen@synopsys.com>2018-11-07 18:10:42 -0800
committerFelipe Balbi <felipe.balbi@linux.intel.com>2018-11-26 09:06:31 +0200
commit022a0208c0ff038f8970a71cb298f85722b4a0ef (patch)
tree07206c07876b774feb1f2be1d1393572fa53cf44 /drivers/usb/dwc3/host.c
parent5455e156078bfcb72505f59b933c9ef726351e2b (diff)
downloadlinux-022a0208c0ff038f8970a71cb298f85722b4a0ef.tar.gz
usb: dwc3: Support option to disable USB2 LPM
Support the option to disable USB2 LPM. Set xhci "usb2-lpm-disable"
property via "snps,usb2-lpm-disable" property.

Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3/host.c')
-rw-r--r--drivers/usb/dwc3/host.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
index 1a3878a3be78..f55947294f7c 100644
--- a/drivers/usb/dwc3/host.c
+++ b/drivers/usb/dwc3/host.c
@@ -46,7 +46,7 @@ out:
 
 int dwc3_host_init(struct dwc3 *dwc)
 {
-	struct property_entry	props[3];
+	struct property_entry	props[4];
 	struct platform_device	*xhci;
 	int			ret, irq;
 	struct resource		*res;
@@ -93,6 +93,9 @@ int dwc3_host_init(struct dwc3 *dwc)
 	if (dwc->usb3_lpm_capable)
 		props[prop_idx++].name = "usb3-lpm-capable";
 
+	if (dwc->usb2_lpm_disable)
+		props[prop_idx++].name = "usb2-lpm-disable";
+
 	/**
 	 * WORKAROUND: dwc3 revisions <=3.00a have a limitation
 	 * where Port Disable command doesn't work.