mmc: core: enable support for the standard "wakeup-source" property
authorSudeep Holla <Sudeep.Holla@arm.com>
Wed, 21 Oct 2015 10:10:02 +0000 (11:10 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 22 Dec 2015 10:32:01 +0000 (11:32 +0100)
Though the mmc core driver should/will continue to support the legacy
"enable-sdio-wakeup" property to enable SDIO as the wakeup source, we
need to add support for the new standard property "wakeup-source".

This patch adds support for "wakeup-source" property in addition to the
existing "enable-sdio-wakeup" property.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/host.c
drivers/mmc/host/sdhci-pltfm.c

index da950c4..e2cad92 100644 (file)
@@ -275,7 +275,8 @@ int mmc_of_parse(struct mmc_host *host)
                host->caps2 |= MMC_CAP2_FULL_PWR_CYCLE;
        if (of_property_read_bool(np, "keep-power-in-suspend"))
                host->pm_caps |= MMC_PM_KEEP_POWER;
-       if (of_property_read_bool(np, "enable-sdio-wakeup"))
+       if (of_property_read_bool(np, "wakeup-source") ||
+           of_property_read_bool(np, "enable-sdio-wakeup")) /* legacy */
                host->pm_caps |= MMC_PM_WAKE_SDIO_IRQ;
        if (of_property_read_bool(np, "mmc-ddr-1_8v"))
                host->caps |= MMC_CAP_1_8V_DDR;
index 87fb5ea..072bb27 100644 (file)
@@ -104,7 +104,8 @@ void sdhci_get_of_property(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))
+       if (of_property_read_bool(np, "wakeup-source") ||
+           of_property_read_bool(np, "enable-sdio-wakeup")) /* legacy */
                host->mmc->pm_caps |= MMC_PM_WAKE_SDIO_IRQ;
 }
 #else