Commit be8ae09d authored by Giuseppe Cavallaro's avatar Giuseppe Cavallaro Committed by Chris Ball

mmc: sdhci-pltfm: add suspend/resume functions

This patch adds the suspend and resume functions
in the sdhci-pltfm device driver.
Signed-off-by: default avatarGiuseppe Cavallaro <peppe.cavallaro@st.com>
Reviewed-by: default avatarWolfram Sang <w.sang@pengutronix.de>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent de528fa3
...@@ -165,6 +165,25 @@ static const struct platform_device_id sdhci_pltfm_ids[] = { ...@@ -165,6 +165,25 @@ static const struct platform_device_id sdhci_pltfm_ids[] = {
}; };
MODULE_DEVICE_TABLE(platform, 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 = { static struct platform_driver sdhci_pltfm_driver = {
.driver = { .driver = {
.name = "sdhci", .name = "sdhci",
...@@ -173,6 +192,8 @@ static struct platform_driver sdhci_pltfm_driver = { ...@@ -173,6 +192,8 @@ static struct platform_driver sdhci_pltfm_driver = {
.probe = sdhci_pltfm_probe, .probe = sdhci_pltfm_probe,
.remove = __devexit_p(sdhci_pltfm_remove), .remove = __devexit_p(sdhci_pltfm_remove),
.id_table = sdhci_pltfm_ids, .id_table = sdhci_pltfm_ids,
.suspend = sdhci_pltfm_suspend,
.resume = sdhci_pltfm_resume,
}; };
/*****************************************************************************\ /*****************************************************************************\
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment