]> git.ipfire.org Git - people/arne_f/kernel.git/commitdiff
usb: host: xhci-plat: enable BROKEN_PED quirk if platform requested
authorFelipe Balbi <balbi@ti.com>
Tue, 4 Apr 2017 19:32:24 +0000 (19:32 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Apr 2017 10:41:19 +0000 (12:41 +0200)
[ Upstream commit 21939f003ad09355d9c975735750bb22aa37d8de ]

In case 'quirk-broken-port-ped' property is passed in via device property,
we should enable the corresponding BROKEN_PED quirk flag for XHCI core.

[rogerq@ti.com] Updated code from platform data to device property
and added DT binding.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/devicetree/bindings/usb/usb-xhci.txt
drivers/usb/host/xhci-plat.c

index 966885c636d02919c0d80a36a0b76230685a6e54..7790c819859a59cc9faf62488518a1185c96881b 100644 (file)
@@ -26,6 +26,7 @@ Required properties:
 Optional properties:
   - clocks: reference to a clock
   - usb3-lpm-capable: determines if platform is USB3 LPM capable
+  - quirk-broken-port-ped: set if the controller has broken port disable mechanism
 
 Example:
        usb@f0931000 {
index 5895e84f9dcc37ce8f20e0a7886f6643a4c9bf7b..be1572331a6489bd0bbb055107e35d5be8b792e3 100644 (file)
@@ -223,6 +223,9 @@ static int xhci_plat_probe(struct platform_device *pdev)
        if (device_property_read_bool(&pdev->dev, "usb3-lpm-capable"))
                xhci->quirks |= XHCI_LPM_SUPPORT;
 
+       if (device_property_read_bool(&pdev->dev, "quirk-broken-port-ped"))
+               xhci->quirks |= XHCI_BROKEN_PORT_PED;
+
        hcd->usb_phy = devm_usb_get_phy_by_phandle(&pdev->dev, "usb-phy", 0);
        if (IS_ERR(hcd->usb_phy)) {
                ret = PTR_ERR(hcd->usb_phy);