Commit 83a7b32a authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Ulf Hansson

mmc: sdhci-pltfm: export sdhci_pltfm_suspend/resume

This will be useful when drivers want to reuse either suspend or
resume callback instead of whole of sdhci_pltfm_pmops.
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 1ab0d2d7
...@@ -391,24 +391,6 @@ static int sdhci_cdns_probe(struct platform_device *pdev) ...@@ -391,24 +391,6 @@ static int sdhci_cdns_probe(struct platform_device *pdev)
} }
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
static int sdhci_cdns_suspend(struct device *dev)
{
struct sdhci_host *host = dev_get_drvdata(dev);
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
int ret;
if (host->tuning_mode != SDHCI_TUNING_MODE_3)
mmc_retune_needed(host->mmc);
ret = sdhci_suspend_host(host);
if (ret)
return ret;
clk_disable_unprepare(pltfm_host->clk);
return 0;
}
static int sdhci_cdns_resume(struct device *dev) static int sdhci_cdns_resume(struct device *dev)
{ {
struct sdhci_host *host = dev_get_drvdata(dev); struct sdhci_host *host = dev_get_drvdata(dev);
...@@ -438,7 +420,7 @@ static int sdhci_cdns_resume(struct device *dev) ...@@ -438,7 +420,7 @@ static int sdhci_cdns_resume(struct device *dev)
#endif #endif
static const struct dev_pm_ops sdhci_cdns_pm_ops = { static const struct dev_pm_ops sdhci_cdns_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(sdhci_cdns_suspend, sdhci_cdns_resume) SET_SYSTEM_SLEEP_PM_OPS(sdhci_pltfm_suspend, sdhci_cdns_resume)
}; };
static const struct of_device_id sdhci_cdns_match[] = { static const struct of_device_id sdhci_cdns_match[] = {
......
...@@ -209,7 +209,7 @@ int sdhci_pltfm_unregister(struct platform_device *pdev) ...@@ -209,7 +209,7 @@ int sdhci_pltfm_unregister(struct platform_device *pdev)
EXPORT_SYMBOL_GPL(sdhci_pltfm_unregister); EXPORT_SYMBOL_GPL(sdhci_pltfm_unregister);
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
static int sdhci_pltfm_suspend(struct device *dev) int sdhci_pltfm_suspend(struct device *dev)
{ {
struct sdhci_host *host = dev_get_drvdata(dev); struct sdhci_host *host = dev_get_drvdata(dev);
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
...@@ -226,8 +226,9 @@ static int sdhci_pltfm_suspend(struct device *dev) ...@@ -226,8 +226,9 @@ static int sdhci_pltfm_suspend(struct device *dev)
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(sdhci_pltfm_suspend);
static int sdhci_pltfm_resume(struct device *dev) int sdhci_pltfm_resume(struct device *dev)
{ {
struct sdhci_host *host = dev_get_drvdata(dev); struct sdhci_host *host = dev_get_drvdata(dev);
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
...@@ -243,6 +244,7 @@ static int sdhci_pltfm_resume(struct device *dev) ...@@ -243,6 +244,7 @@ static int sdhci_pltfm_resume(struct device *dev)
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(sdhci_pltfm_resume);
#endif #endif
const struct dev_pm_ops sdhci_pltfm_pmops = { const struct dev_pm_ops sdhci_pltfm_pmops = {
......
...@@ -109,6 +109,8 @@ static inline void *sdhci_pltfm_priv(struct sdhci_pltfm_host *host) ...@@ -109,6 +109,8 @@ static inline void *sdhci_pltfm_priv(struct sdhci_pltfm_host *host)
return host->private; return host->private;
} }
int sdhci_pltfm_suspend(struct device *dev);
int sdhci_pltfm_resume(struct device *dev);
extern const struct dev_pm_ops sdhci_pltfm_pmops; extern const struct dev_pm_ops sdhci_pltfm_pmops;
#endif /* _DRIVERS_MMC_SDHCI_PLTFM_H */ #endif /* _DRIVERS_MMC_SDHCI_PLTFM_H */
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