From: John Youn Date: Sat, 26 Sep 2015 07:11:15 +0000 (-0700) Subject: usb: dwc3: pci: Add platform data for Synopsys HAPS X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bb7f3d6d323a56b9c3b3e727380d1395a7f10107;p=linux-beck.git usb: dwc3: pci: Add platform data for Synopsys HAPS Add platform data and set usb3_lpm_capable and has_lpm_erratum. Cc: # v3.18+ Signed-off-by: John Youn Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index a286db7ffe94..65165308a04f 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; }