summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDong Aisheng <b29396@freescale.com>2014-01-13 16:47:31 +0800
committerDong Aisheng <b29396@freescale.com>2014-01-15 15:06:01 +0800
commitde4e3d006f88b1a9eed76c2b04a64d7bd2fb35c5 (patch)
tree1e35195d0d55c9e8b9634f3c629d4eb0665978d4 /drivers
parenteb51d3b395ecb7b2848c1b3a080fd119e11c807f (diff)
ENGR00295184-5 mmc: sdhci-esdhc-imx: add wakeup feature for sdio irq
Enable wakeup for SDIO IRQ when the host is able to keep power during suspend. Signed-off-by: Dong Aisheng <b29396@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/sdhci-esdhc-imx.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index d2b9e2933844..3994b6a2b179 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -976,6 +976,9 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
if (of_find_property(np, "keep-power-in-suspend", NULL))
host->mmc->pm_caps |= MMC_PM_KEEP_POWER;
+ if (of_find_property(np, "enable-sdio-wakeup", NULL))
+ host->mmc->pm_caps |= MMC_PM_WAKE_SDIO_IRQ;
+
return 0;
}
#else
@@ -1167,6 +1170,10 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V;
}
+ if (host->mmc->pm_caps & MMC_PM_KEEP_POWER &&
+ host->mmc->pm_caps & MMC_PM_WAKE_SDIO_IRQ)
+ device_init_wakeup(&pdev->dev, 1);
+
err = sdhci_add_host(host);
if (err)
goto disable_clk;