summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-tegra.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ehci-tegra.c')
-rw-r--r--drivers/usb/host/ehci-tegra.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 13d96d3b1320..095447d9e3a2 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -522,6 +522,7 @@ static int tegra_ehci_probe(struct platform_device *pdev)
struct resource *res;
struct usb_hcd *hcd;
struct tegra_ehci_hcd *tegra;
+ struct tegra_usb_platform_data *pdata = dev_get_platdata(&pdev->dev);
int err = 0;
int irq;
@@ -592,13 +593,15 @@ static int tegra_ehci_probe(struct platform_device *pdev)
goto fail_phy;
}
- err = enable_irq_wake(tegra->irq);
- if (err < 0) {
- dev_warn(&pdev->dev,
- "Couldn't enable USB host mode wakeup, irq=%d, "
- "error=%d\n", irq, err);
- err = 0;
- tegra->irq = 0;
+ if (pdata->u_data.host.remote_wakeup_supported) {
+ err = enable_irq_wake(tegra->irq);
+ if (err < 0) {
+ dev_warn(&pdev->dev,
+ "Couldn't enable USB host mode wakeup,"
+ " irq=%d error=%d\n", irq, err);
+ err = 0;
+ tegra->irq = 0;
+ }
}
tegra->ehci = hcd_to_ehci(hcd);
@@ -646,6 +649,7 @@ static int tegra_ehci_suspend(struct platform_device *pdev, pm_message_t state)
static int tegra_ehci_remove(struct platform_device *pdev)
{
struct tegra_ehci_hcd *tegra = platform_get_drvdata(pdev);
+ struct tegra_usb_platform_data *pdata = dev_get_platdata(&pdev->dev);
struct usb_hcd *hcd = ehci_to_hcd(tegra->ehci);
if (tegra == NULL || hcd == NULL)
@@ -658,7 +662,7 @@ static int tegra_ehci_remove(struct platform_device *pdev)
}
#endif
- if (tegra->irq)
+ if (tegra->irq && pdata->u_data.host.remote_wakeup_supported)
disable_irq_wake(tegra->irq);
/* Make sure phy is powered ON to access USB register */