Skip to content

Commit

Permalink
ARM: 7832/1: mmc: mmci: Use optional sleep pinctrl state
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ulf Hansson authored and Russell King committed Sep 19, 2013
1 parent edaf6d3 commit e36bd9c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/mmc/host/mmci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1750,6 +1750,7 @@ static int mmci_runtime_suspend(struct device *dev)

if (mmc) {
struct mmci_host *host = mmc_priv(mmc);
pinctrl_pm_select_sleep_state(dev);
clk_disable_unprepare(host->clk);
}

Expand All @@ -1764,6 +1765,7 @@ static int mmci_runtime_resume(struct device *dev)
if (mmc) {
struct mmci_host *host = mmc_priv(mmc);
clk_prepare_enable(host->clk);
pinctrl_pm_select_default_state(dev);
}

return 0;
Expand Down

0 comments on commit e36bd9c

Please sign in to comment.