mmc: core: Add helper to see if a host can be retuned
authorSimon Horman <horms+renesas@verge.net.au>
Thu, 3 Nov 2016 14:15:59 +0000 (15:15 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 29 Nov 2016 08:00:54 +0000 (09:00 +0100)
This is in preparation for restoring saved tuning parameters
when resuming the TMIO driver.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
include/linux/mmc/host.h

index 5310f94be0ab49d20c7d8023b43bb6d13f23cb86..68639295148d647d04c7fcdb384ece6e0ca7b77f 100644 (file)
@@ -546,6 +546,11 @@ static inline void mmc_retune_recheck(struct mmc_host *host)
                host->retune_now = 1;
 }
 
+static inline bool mmc_can_retune(struct mmc_host *host)
+{
+       return host->can_retune == 1;
+}
+
 void mmc_retune_pause(struct mmc_host *host);
 void mmc_retune_unpause(struct mmc_host *host);