]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
usb: host: xhci-plat: enable BROKEN_PED quirk if platform requested
authorFelipe Balbi <balbi@ti.com>
Mon, 23 Jan 2017 12:19:59 +0000 (14:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Jan 2017 09:57:35 +0000 (10:57 +0100)
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>
Documentation/devicetree/bindings/usb/usb-xhci.txt
drivers/usb/host/xhci-plat.c

index 0b7d8576001c50804b3062144e8b2fec94bcdaab..2d80b60eeabefe54f4f548fd15cb4da6fb7ab912 100644 (file)
@@ -27,6 +27,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 c0cd98e804a39451aa07e6721f530e95eca0fc4d..6d33b42ffcf5224a1b347666c77b010df9001d91 100644 (file)
@@ -232,6 +232,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);