diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2015-05-07 13:10:13 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2015-06-01 09:06:54 +0200 |
commit | 79d5a65aeea43920bf3ff60791f317570dd6f54f (patch) | |
tree | 6ff2bab35021a687df1e0c3b0f19d61aaf4f5f93 /drivers/mmc/core/sdio.c | |
parent | dfa13ebbe3340e538b988f5608efd9ff2ca7fc35 (diff) | |
download | linux-79d5a65aeea43920bf3ff60791f317570dd6f54f.tar.bz2 |
mmc: core: Enable / disable re-tuning
Enable re-tuning when tuning is executed and
disable re-tuning when card is no longer initialized.
In the case of SDIO suspend, the card can keep power.
In that case, re-tuning need not be disabled, but, if
a re-tuning timer is being used, ensure it is disabled
and assume that re-tuning will be needed upon resume
since it is not known how long the suspend will last.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core/sdio.c')
-rw-r--r-- | drivers/mmc/core/sdio.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index f6c28a7ea8df..5c1423a3e7d7 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -934,8 +934,12 @@ static int mmc_sdio_suspend(struct mmc_host *host) mmc_release_host(host); } - if (!mmc_card_keep_power(host)) + if (!mmc_card_keep_power(host)) { mmc_power_off(host); + } else if (host->retune_period) { + mmc_retune_timer_stop(host); + mmc_retune_needed(host); + } return 0; } |