diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2017-03-20 18:50:32 +0100 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2017-04-24 21:41:26 +0200 |
commit | d38dcad4e7b48f3d68d5d058f8f4f52a99862e6e (patch) | |
tree | 654812cebbf2ed25a161d9b405f038fe20d381a8 /drivers/mmc/host/sdhci-st.c | |
parent | mmc: sdhci: Optimize delay loops (diff) | |
download | linux-d38dcad4e7b48f3d68d5d058f8f4f52a99862e6e.tar.xz linux-d38dcad4e7b48f3d68d5d058f8f4f52a99862e6e.zip |
mmc: sdhci: Let drivers decide whether to use mmc_retune_needed() with pm
Devices might save and restore tuning values so that re-tuning might not be
needed after a pm transition. Let drivers decide by pushing the
mmc_retune_needed() logic down to them.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Diffstat (limited to 'drivers/mmc/host/sdhci-st.c')
-rw-r--r-- | drivers/mmc/host/sdhci-st.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-st.c b/drivers/mmc/host/sdhci-st.c index 7fff6490855c..68c36c9fa231 100644 --- a/drivers/mmc/host/sdhci-st.c +++ b/drivers/mmc/host/sdhci-st.c @@ -463,8 +463,12 @@ static int sdhci_st_suspend(struct device *dev) struct sdhci_host *host = dev_get_drvdata(dev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct st_mmc_platform_data *pdata = sdhci_pltfm_priv(pltfm_host); - int ret = sdhci_suspend_host(host); + int ret; + + if (host->tuning_mode != SDHCI_TUNING_MODE_3) + mmc_retune_needed(host->mmc); + ret = sdhci_suspend_host(host); if (ret) goto out; |