summaryrefslogtreecommitdiff
path: root/include/linux/mmc/host.h
diff options
context:
space:
mode:
authorPhilippe Langlais <philippe.langlais@stericsson.com>2012-04-06 11:11:17 +0200
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-04-06 11:11:17 +0200
commit5d7e606a3696b992df40afaf9b04872320346c41 (patch)
tree92b060685f1187ae895eb8dc7256445ed455bfa5 /include/linux/mmc/host.h
parent546c9b21117077f145d59a0168fcb6fd0a3c3b24 (diff)
parent285f0b3fe3a59c56db9ae68e6a1ae0e2a67b72f9 (diff)
Merge topic branch 'storage-mmc' into integration-linux-ux500-3.3
Diffstat (limited to 'include/linux/mmc/host.h')
-rw-r--r--include/linux/mmc/host.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index ee2b0363c04..37f995176bb 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -318,6 +318,11 @@ struct mmc_host {
int detect_change; /* card detect flag */
struct mmc_hotplug hotplug;
+ struct delayed_work resume; /* deferred resume work */
+ unsigned int pm_state; /* used for deferred resume */
+#define MMC_HOST_DEFERRED_RESUME (1 << 0)
+#define MMC_HOST_NEEDS_RESUME (1 << 1)
+
const struct mmc_bus_ops *bus_ops; /* current bus driver */
unsigned int bus_refs; /* reference counter */
@@ -366,6 +371,7 @@ static inline void *mmc_priv(struct mmc_host *host)
extern int mmc_suspend_host(struct mmc_host *);
extern int mmc_resume_host(struct mmc_host *);
+extern void mmc_resume_host_sync(struct mmc_host *);
extern int mmc_power_save_host(struct mmc_host *host);
extern int mmc_power_restore_host(struct mmc_host *host);
@@ -464,4 +470,15 @@ static inline unsigned int mmc_host_clk_rate(struct mmc_host *host)
return host->ios.clock;
}
#endif
+
+static inline int mmc_host_deferred_resume(struct mmc_host *host)
+{
+ return host->pm_state & MMC_HOST_DEFERRED_RESUME;
+}
+
+static inline int mmc_host_needs_resume(struct mmc_host *host)
+{
+ return host->pm_state & MMC_HOST_NEEDS_RESUME;
+}
+
#endif /* LINUX_MMC_HOST_H */