]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00295184-5 mmc: sdhci-esdhc-imx: add wakeup feature for sdio irq
authorDong Aisheng <b29396@freescale.com>
Mon, 13 Jan 2014 08:47:31 +0000 (16:47 +0800)
committerDong Aisheng <b29396@freescale.com>
Wed, 15 Jan 2014 07:06:01 +0000 (15:06 +0800)
Enable wakeup for SDIO IRQ when the host is able to keep power
during suspend.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
drivers/mmc/host/sdhci-esdhc-imx.c

index d2b9e2933844b83b2964349e9f7cc4e9f691c20d..3994b6a2b179533f173f1b2860219e9ae9c82148 100644 (file)
@@ -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;