public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH (mmc-next) 1/3] mmc: add suspend/resume in the sdhci-pltfm driver (V3)
@ 2010-09-28  8:41 Giuseppe CAVALLARO
  2010-09-28  8:41 ` [PATCH (mmc-next) 2/3] mmc: fix a warning when compile the sdhci d.d. (V2) Giuseppe CAVALLARO
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Giuseppe CAVALLARO @ 2010-09-28  8:41 UTC (permalink / raw)
  To: linux-mmc; +Cc: w.sang, Giuseppe Cavallaro

This patch adds the suspend and resume functions
in the sdhci-pltfm device driver.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
 drivers/mmc/host/sdhci-pltfm.c |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
index e045e3c..4f126de 100644
--- a/drivers/mmc/host/sdhci-pltfm.c
+++ b/drivers/mmc/host/sdhci-pltfm.c
@@ -165,6 +165,25 @@ static const struct platform_device_id sdhci_pltfm_ids[] = {
 };
 MODULE_DEVICE_TABLE(platform, sdhci_pltfm_ids);
 
+#ifdef CONFIG_PM
+static int sdhci_pltfm_suspend(struct platform_device *dev, pm_message_t state)
+{
+	struct sdhci_host *host = platform_get_drvdata(dev);
+
+	return sdhci_suspend_host(host, state);
+}
+
+static int sdhci_pltfm_resume(struct platform_device *dev)
+{
+	struct sdhci_host *host = platform_get_drvdata(dev);
+
+	return sdhci_resume_host(host);
+}
+#else
+#define sdhci_pltfm_suspend	NULL
+#define sdhci_pltfm_resume	NULL
+#endif	/* CONFIG_PM */
+
 static struct platform_driver sdhci_pltfm_driver = {
 	.driver = {
 		.name	= "sdhci",
@@ -173,6 +192,8 @@ static struct platform_driver sdhci_pltfm_driver = {
 	.probe		= sdhci_pltfm_probe,
 	.remove		= __devexit_p(sdhci_pltfm_remove),
 	.id_table	= sdhci_pltfm_ids,
+	.suspend	= sdhci_pltfm_suspend,
+	.resume		= sdhci_pltfm_resume,
 };
 
 /*****************************************************************************\
-- 
1.5.5.6


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-10-04  8:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-28  8:41 [PATCH (mmc-next) 1/3] mmc: add suspend/resume in the sdhci-pltfm driver (V3) Giuseppe CAVALLARO
2010-09-28  8:41 ` [PATCH (mmc-next) 2/3] mmc: fix a warning when compile the sdhci d.d. (V2) Giuseppe CAVALLARO
2010-09-28  8:41   ` [PATCH (mmc-next) 3/3] mmc: split the sdhci.h to help platforms that uses shdci-pltfm " Giuseppe CAVALLARO
2010-09-28 11:14     ` Wolfram Sang
2010-09-28 11:09   ` [PATCH (mmc-next) 2/3] mmc: fix a warning when compile the sdhci " Wolfram Sang
2010-09-28 11:08 ` [PATCH (mmc-next) 1/3] mmc: add suspend/resume in the sdhci-pltfm driver (V3) Wolfram Sang
2010-09-30 23:25 ` Chris Ball
2010-10-01  7:07   ` Wolfram Sang
2010-10-04  5:36   ` Peppe CAVALLARO
2010-10-04  8:57     ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox