]> 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)
committerNitin Garg <nitin.garg@freescale.com>
Fri, 16 Jan 2015 03:18:01 +0000 (21:18 -0600)
Enable wakeup for SDIO IRQ when the host is able to keep power
during suspend.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit 19a1ec6ca25b2fc639fc75a25dd8a1fd452f8578)

drivers/mmc/host/sdhci-esdhc-imx.c

index 3b972aa716ca6e1632ddc1d844bfcecd52dcfcee..9b596802790700c72a131c1c56c6bf8f11531c84 100644 (file)
@@ -951,6 +951,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
@@ -1143,6 +1146,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;