]> git.kernelconcepts.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)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 20 Aug 2014 08:06:54 +0000 (10:06 +0200)
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 94139fdbb36dea4ef2f3c938a0d81985b1323cc3..adaad86d4babbb79213961df663ffb5817b84192 100644 (file)
@@ -974,6 +974,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
@@ -1163,6 +1166,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;