summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJin Qian <jqian@nvidia.com>2011-06-17 12:24:20 -0700
committerNiket Sirsi <nsirsi@nvidia.com>2011-06-22 11:44:53 -0700
commitf7820484ea6558798c652c420507520de2eeeeec (patch)
tree10a25f41a96c57440ee5744906b700ec958ab436 /include
parent5f6c159f73520b187a58cdc1235e5e31d204ca1a (diff)
Revert "mmc: revert deferred resume"
This reverts commit 40c8a6e8551e81ad4d7647029e0d85f7b0a7e496. Original change broke LP1 suspend/resume Bug 840959,841139 Change-Id: I0fd50729cb81a5e56eca397428ee2c8b04f10e23 Reviewed-on: http://git-master/r/37353 Reviewed-by: Narendra Damahe <ndamahe@nvidia.com> Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com> Tested-by: Jin Qian <jqian@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mmc/host.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 7076851d9c2c..62ffcb05fb78 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -230,6 +230,10 @@ struct mmc_host {
const struct mmc_bus_ops *bus_ops; /* current bus driver */
unsigned int bus_refs; /* reference counter */
+ unsigned int bus_resume_flags;
+#define MMC_BUSRESUME_MANUAL_RESUME (1 << 0)
+#define MMC_BUSRESUME_NEEDS_RESUME (1 << 1)
+
unsigned int tuning_status;
#define MMC_SD_TUNING_COMPLETED (1 << 0)
#define MMC_SD_SAMPLING_CLOCK_SELECT_SET (1 << 1)
@@ -283,6 +287,18 @@ static inline void *mmc_priv(struct mmc_host *host)
#define mmc_dev(x) ((x)->parent)
#define mmc_classdev(x) (&(x)->class_dev)
#define mmc_hostname(x) (dev_name(&(x)->class_dev))
+#define mmc_bus_needs_resume(host) ((host)->bus_resume_flags & MMC_BUSRESUME_NEEDS_RESUME)
+#define mmc_bus_manual_resume(host) ((host)->bus_resume_flags & MMC_BUSRESUME_MANUAL_RESUME)
+
+static inline void mmc_set_bus_resume_policy(struct mmc_host *host, int manual)
+{
+ if (manual)
+ host->bus_resume_flags |= MMC_BUSRESUME_MANUAL_RESUME;
+ else
+ host->bus_resume_flags &= ~MMC_BUSRESUME_MANUAL_RESUME;
+}
+
+extern int mmc_resume_bus(struct mmc_host *host);
extern int mmc_suspend_host(struct mmc_host *);
extern int mmc_resume_host(struct mmc_host *);