Add platform data and set usb3_lpm_capable and has_lpm_erratum.

Cc: <sta...@vger.kernel.org> # v3.18+
Signed-off-by: John Youn <johny...@synopsys.com>
---
 drivers/usb/dwc3/dwc3-pci.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c
index e09cb40..4479a41 100644
--- a/drivers/usb/dwc3/dwc3-pci.c
+++ b/drivers/usb/dwc3/dwc3-pci.c
@@ -108,6 +108,21 @@ static int dwc3_pci_quirks(struct pci_dev *pdev)
                }
        }
 
+       if (pdev->vendor == PCI_VENDOR_ID_SYNOPSYS &&
+           (pdev->device == PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3 ||
+            pdev->device == PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3_AXI ||
+            pdev->device == PCI_DEVICE_ID_SYNOPSYS_HAPSUSB31)) {
+
+               struct dwc3_platform_data pdata;
+
+               memset(&pdata, 0, sizeof(pdata));
+               pdata.usb3_lpm_capable = true;
+               pdata.has_lpm_erratum = true;
+
+               return platform_device_add_data(pci_get_drvdata(pdev), &pdata,
+                                               sizeof(pdata));
+       }
+
        return 0;
 }
 
-- 
2.5.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to