diff options
author | Dong Aisheng <aisheng.dong@nxp.com> | 2016-02-26 18:02:22 +0800 |
---|---|---|
committer | Dong Aisheng <aisheng.dong@nxp.com> | 2016-03-01 19:02:54 +0800 |
commit | 3a4a074d2ead8044afe42cd0d060fe25564b274c (patch) | |
tree | d3f8d2dd5616a4268d3ec6f5b761c28aecd66240 /drivers | |
parent | cd2d38c8051ad67ef95eac0fe72656be7a04c944 (diff) |
MLK-12462-1 mmc: core: add MMC_PM_IGNORE_PM_NOTIFY feature
With igore pm notify feature, MMC core will not re-detect card
after system suspend/resume. This is needed for some special cards
like Broadcom WiFi which can't work propertly on card re-detect
after system resume.
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/core/host.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index c81a31621fbf..74fb8fc13855 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -517,6 +517,8 @@ int mmc_of_parse(struct mmc_host *host) host->pm_caps |= MMC_PM_KEEP_POWER; if (of_property_read_bool(np, "enable-sdio-wakeup")) host->pm_caps |= MMC_PM_WAKE_SDIO_IRQ; + if (of_get_property(np, "pm-ignore-notify", NULL)) + host->pm_caps |= MMC_PM_IGNORE_PM_NOTIFY; if (of_property_read_bool(np, "mmc-ddr-1_8v")) host->caps |= MMC_CAP_1_8V_DDR; if (of_property_read_bool(np, "mmc-ddr-1_2v")) @@ -651,7 +653,8 @@ int mmc_add_host(struct mmc_host *host) mmc_host_clk_sysfs_init(host); mmc_start_host(host); - register_pm_notifier(&host->pm_notify); + if (!(host->pm_caps& MMC_PM_IGNORE_PM_NOTIFY)) + register_pm_notifier(&host->pm_notify); return 0; } @@ -668,7 +671,8 @@ EXPORT_SYMBOL(mmc_add_host); */ void mmc_remove_host(struct mmc_host *host) { - unregister_pm_notifier(&host->pm_notify); + if (!(host->pm_caps& MMC_PM_IGNORE_PM_NOTIFY)) + unregister_pm_notifier(&host->pm_notify); mmc_stop_host(host); #ifdef CONFIG_DEBUG_FS |