aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorPratyush Anand <pratyush.anand@st.com>2014-07-04 17:01:25 +0300
committerMark Brown <broonie@kernel.org>2014-12-08 17:51:13 +0000
commit4f953a1e6a6941ef4109f4a0ea31f2a61c6df863 (patch)
tree91cf455c6a139ee87f19d5019420c9cf808e328e /drivers/usb
parente233358d7cad8ce02835335f580723498248d09e (diff)
xhci: Platform: Set xhci lpm support quirk based on platform data
If an xhci platform supports USB3 LPM capability then enable XHCI_LPM_SUPPORT quirk flag. Signed-off-by: Pratyush Anand <pratyush.anand@st.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 20f6fdd01c2c0de9cc1109083222edded24c5350) Signed-off-by: Mark Brown <broonie@kernel.org> Conflicts: Documentation/devicetree/bindings/usb/usb-xhci.txt
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/xhci-plat.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index ab1b6d8d2fc4..874dede5b8e8 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -16,6 +16,7 @@
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
+#include <linux/usb/xhci_pdriver.h>
#include "xhci.h"
@@ -87,6 +88,8 @@ static const struct hc_driver xhci_plat_xhci_driver = {
static int xhci_plat_probe(struct platform_device *pdev)
{
+ struct device_node *node = pdev->dev.of_node;
+ struct usb_xhci_pdata *pdata = dev_get_platdata(&pdev->dev);
const struct hc_driver *driver;
struct xhci_hcd *xhci;
struct resource *res;
@@ -152,6 +155,9 @@ static int xhci_plat_probe(struct platform_device *pdev)
goto dealloc_usb2_hcd;
}
+ if ((node && of_property_read_bool(node, "usb3-lpm-capable")) ||
+ (pdata && pdata->usb3_lpm_capable))
+ xhci->quirks |= XHCI_LPM_SUPPORT;
/*
* Set the xHCI pointer before xhci_plat_setup() (aka hcd_driver.reset)
* is called by usb_add_hcd().