Skip to content

Commit 0dbcdc0

Browse files
sudeep-hollastorulf
authored andcommitted
mmc: core: enable support for the standard "wakeup-source" property
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>
1 parent 4ef7675 commit 0dbcdc0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

drivers/mmc/core/host.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,8 @@ int mmc_of_parse(struct mmc_host *host)
275275
host->caps2 |= MMC_CAP2_FULL_PWR_CYCLE;
276276
if (of_property_read_bool(np, "keep-power-in-suspend"))
277277
host->pm_caps |= MMC_PM_KEEP_POWER;
278-
if (of_property_read_bool(np, "enable-sdio-wakeup"))
278+
if (of_property_read_bool(np, "wakeup-source") ||
279+
of_property_read_bool(np, "enable-sdio-wakeup")) /* legacy */
279280
host->pm_caps |= MMC_PM_WAKE_SDIO_IRQ;
280281
if (of_property_read_bool(np, "mmc-ddr-1_8v"))
281282
host->caps |= MMC_CAP_1_8V_DDR;

drivers/mmc/host/sdhci-pltfm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ void sdhci_get_of_property(struct platform_device *pdev)
104104
if (of_find_property(np, "keep-power-in-suspend", NULL))
105105
host->mmc->pm_caps |= MMC_PM_KEEP_POWER;
106106

107-
if (of_find_property(np, "enable-sdio-wakeup", NULL))
107+
if (of_property_read_bool(np, "wakeup-source") ||
108+
of_property_read_bool(np, "enable-sdio-wakeup")) /* legacy */
108109
host->mmc->pm_caps |= MMC_PM_WAKE_SDIO_IRQ;
109110
}
110111
#else

0 commit comments

Comments
 (0)