diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2017-03-07 14:18:04 -0800 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2017-04-03 15:12:37 +0200 |
commit | c6634703d092bffee980cbe5c0459074f94d9299 (patch) | |
tree | ec3c14addd7c6bc586744844777a83bef88e8300 | |
parent | 2df675a89358549e656592c3eb9781860e909cd4 (diff) |
mmc: sdhci-esdhc-imx: make sure runtime PM is suspended in system suspend
Use force suspend/resume to trigger runtime PM when entering system
suspend.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r-- | drivers/mmc/host/sdhci-esdhc-imx.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index a02edfc2b8f3..1adab3f907b9 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -1368,6 +1368,7 @@ int sdhci_esdhc_suspend(struct device *dev) struct sdhci_host *host = dev_get_drvdata(dev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct pltfm_imx_data *imx_data = pltfm_host->priv; + int ret; if ((imx_data->socdata->flags & ESDHC_FLAG_STATE_LOST_IN_LPMODE) && (host->tuning_mode != SDHCI_TUNING_MODE_1)) { @@ -1375,11 +1376,19 @@ int sdhci_esdhc_suspend(struct device *dev) mmc_retune_needed(host->mmc); } - return sdhci_pltfm_suspend(dev); + ret = sdhci_pltfm_suspend(dev); + if (ret) + return ret; + + pm_runtime_force_suspend(dev); + + return 0; } int sdhci_esdhc_resume(struct device *dev) { + pm_runtime_force_resume(dev); + return sdhci_pltfm_resume(dev); } #endif |