aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2013-09-04 04:00:37 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2013-09-19 15:12:24 -0400
commite36bd9c6c99f47902d6fd6804730aa587ae275a0 (patch)
tree6426b0df30b5fe3f5e58bd184c20f265b8609b33
parentedaf6d3d264ae9323a53a49b2a1cf42cc5df1be2 (diff)
ARM: 7832/1: mmc: mmci: Use optional sleep pinctrl state
By optionally putting the pins into sleep state in the .runtime_suspend callback we can accomplish two things. One is to minimize current leakage from pins and thus save power, second we can prevent the IP from driving pins output in an uncontrolled manner, which may happen if the power domain drops the domain regulator. When returning from idle, entering .runtime_resume callback, the pins are restored to default state. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Rickard Andersson <rickard.andersson@stericsson.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--drivers/mmc/host/mmci.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 5dffbbd57663..c550b3ebb635 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -1750,6 +1750,7 @@ static int mmci_runtime_suspend(struct device *dev)
1750 1750
1751 if (mmc) { 1751 if (mmc) {
1752 struct mmci_host *host = mmc_priv(mmc); 1752 struct mmci_host *host = mmc_priv(mmc);
1753 pinctrl_pm_select_sleep_state(dev);
1753 clk_disable_unprepare(host->clk); 1754 clk_disable_unprepare(host->clk);
1754 } 1755 }
1755 1756
@@ -1764,6 +1765,7 @@ static int mmci_runtime_resume(struct device *dev)
1764 if (mmc) { 1765 if (mmc) {
1765 struct mmci_host *host = mmc_priv(mmc); 1766 struct mmci_host *host = mmc_priv(mmc);
1766 clk_prepare_enable(host->clk); 1767 clk_prepare_enable(host->clk);
1768 pinctrl_pm_select_default_state(dev);
1767 } 1769 }
1768 1770
1769 return 0; 1771 return 0;