Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Sudeep Holla and committed by
Ulf Hansson
0dbcdc06 4ef76753

+4 -2
+2 -1
drivers/mmc/core/host.c
··· 275 275 host->caps2 |= MMC_CAP2_FULL_PWR_CYCLE; 276 276 if (of_property_read_bool(np, "keep-power-in-suspend")) 277 277 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 */ 279 280 host->pm_caps |= MMC_PM_WAKE_SDIO_IRQ; 280 281 if (of_property_read_bool(np, "mmc-ddr-1_8v")) 281 282 host->caps |= MMC_CAP_1_8V_DDR;
+2 -1
drivers/mmc/host/sdhci-pltfm.c
··· 104 104 if (of_find_property(np, "keep-power-in-suspend", NULL)) 105 105 host->mmc->pm_caps |= MMC_PM_KEEP_POWER; 106 106 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 */ 108 109 host->mmc->pm_caps |= MMC_PM_WAKE_SDIO_IRQ; 109 110 } 110 111 #else