summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/tmio_mmc.h
diff options
context:
space:
mode:
authorGuennadi Liakhovetski2011-05-05 18:13:12 +0200
committerChris Ball2011-05-25 05:53:51 +0200
commite6ee7182c3b22afe0b983eac89dc020a93a13179 (patch)
treeed40843e6e306917818f00aa00dc0a3c37d98d31 /drivers/mmc/host/tmio_mmc.h
parentmmc: sh_mmcif: protect against a theoretical race (diff)
downloadkernel-qcow2-linux-e6ee7182c3b22afe0b983eac89dc020a93a13179.tar.gz
kernel-qcow2-linux-e6ee7182c3b22afe0b983eac89dc020a93a13179.tar.xz
kernel-qcow2-linux-e6ee7182c3b22afe0b983eac89dc020a93a13179.zip
mmc: Add runtime and system-wide PM to the TMIO MMC driver
Add runtime and system-wide power management to the TMIO MMC driver in PIO and DMA modes, allowing it to properly save and restore its state during system suspend. Runtime PM is very crude ATM, because the controller has to be powered on all the time to detect card hotplug events. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/tmio_mmc.h')
-rw-r--r--drivers/mmc/host/tmio_mmc.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index 099ed49a259b..c1470e6b138d 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -51,6 +51,8 @@ struct tmio_mmc_host {
void (*set_pwr)(struct platform_device *host, int state);
void (*set_clk_div)(struct platform_device *host, int state);
+ int pm_error;
+
/* pio related stuff */
struct scatterlist *sg_ptr;
struct scatterlist *sg_orig;
@@ -120,4 +122,12 @@ static inline void tmio_mmc_release_dma(struct tmio_mmc_host *host)
}
#endif
+#ifdef CONFIG_PM
+int tmio_mmc_host_suspend(struct device *dev);
+int tmio_mmc_host_resume(struct device *dev);
+#else
+#define tmio_mmc_host_suspend NULL
+#define tmio_mmc_host_resume NULL
+#endif
+
#endif