aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host
diff options
context:
space:
mode:
authorGiuseppe Cavallaro <peppe.cavallaro@st.com>2010-09-28 04:41:27 -0400
committerChris Ball <cjb@laptop.org>2010-10-23 09:11:17 -0400
commitbe8ae09d9a800a40771c93356216678aff9ca577 (patch)
tree8839c63471c2405dc8ee5bd7282c0f3cb1d4538a /drivers/mmc/host
parentde528fa3f94da95f7667eb1583178268c3a403d0 (diff)
mmc: sdhci-pltfm: add suspend/resume functions
This patch adds the suspend and resume functions in the sdhci-pltfm device driver. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r--drivers/mmc/host/sdhci-pltfm.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
index e045e3c61dde..4f126de5f492 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[] = {
165}; 165};
166MODULE_DEVICE_TABLE(platform, sdhci_pltfm_ids); 166MODULE_DEVICE_TABLE(platform, sdhci_pltfm_ids);
167 167
168#ifdef CONFIG_PM
169static int sdhci_pltfm_suspend(struct platform_device *dev, pm_message_t state)
170{
171 struct sdhci_host *host = platform_get_drvdata(dev);
172
173 return sdhci_suspend_host(host, state);
174}
175
176static int sdhci_pltfm_resume(struct platform_device *dev)
177{
178 struct sdhci_host *host = platform_get_drvdata(dev);
179
180 return sdhci_resume_host(host);
181}
182#else
183#define sdhci_pltfm_suspend NULL
184#define sdhci_pltfm_resume NULL
185#endif /* CONFIG_PM */
186
168static struct platform_driver sdhci_pltfm_driver = { 187static struct platform_driver sdhci_pltfm_driver = {
169 .driver = { 188 .driver = {
170 .name = "sdhci", 189 .name = "sdhci",
@@ -173,6 +192,8 @@ static struct platform_driver sdhci_pltfm_driver = {
173 .probe = sdhci_pltfm_probe, 192 .probe = sdhci_pltfm_probe,
174 .remove = __devexit_p(sdhci_pltfm_remove), 193 .remove = __devexit_p(sdhci_pltfm_remove),
175 .id_table = sdhci_pltfm_ids, 194 .id_table = sdhci_pltfm_ids,
195 .suspend = sdhci_pltfm_suspend,
196 .resume = sdhci_pltfm_resume,
176}; 197};
177 198
178/*****************************************************************************\ 199/*****************************************************************************\