If a platform supports LPM then enable quirk in XHCI for the same.
Signed-off-by: Pratyush Anand <[email protected]>
---
drivers/usb/dwc3/core.c | 1 +
drivers/usb/dwc3/core.h | 1 +
drivers/usb/dwc3/host.c | 2 ++
3 files changed, 4 insertions(+)
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 358375e..119dea3 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -490,6 +490,7 @@ static int dwc3_probe(struct platform_device *pdev)
dwc->maximum_speed = DWC3_DCFG_SUPERSPEED;
dwc->needs_fifo_resize = of_property_read_bool(node, "tx-fifo-resize");
+ dwc->lpm_capable = of_property_read_bool(node, "lpm-capable");
pm_runtime_enable(dev);
pm_runtime_get_sync(dev);
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index 27dad99..f7bf6da 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -725,6 +725,7 @@ struct dwc3 {
unsigned setup_packet_pending:1;
unsigned delayed_status:1;
unsigned needs_fifo_resize:1;
+ unsigned lpm_capable:1;
unsigned resize_fifos:1;
unsigned pullups_connected:1;
diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
index a362ed9..38b5c41 100644
--- a/drivers/usb/dwc3/host.c
+++ b/drivers/usb/dwc3/host.c
@@ -86,6 +86,8 @@ int dwc3_host_init(struct dwc3 *dwc)
hcd = platform_get_drvdata(xhci);
xhci_dev = hcd_to_xhci(hcd);
xhci_dev->shared_hcd->phy = dwc->usb3_phy;
+ if (dwc->lpm_capable)
+ xhci_dev->quirks |= XHCI_LPM_SUPPORT;
return 0;
--
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html