Skip to content

Commit

Permalink
ARM: 7916/1: amba: Add clk_prepare|unprepare in runtime PM callbacks
Browse files Browse the repository at this point in the history
To fully gate the clock and thus potentially also save more power in
runtime suspend state, extend clock handling with clk_prepare|unprepare
in the runtime PM callbacks.

Signed-off-by: Ulf Hansson <[email protected]>
Signed-off-by: Russell King <[email protected]>
  • Loading branch information
storulf authored and Russell King committed Dec 9, 2013
1 parent 89a5c98 commit 5303c0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/amba/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static int amba_pm_runtime_suspend(struct device *dev)
int ret = pm_generic_runtime_suspend(dev);

if (ret == 0 && dev->driver)
clk_disable(pcdev->pclk);
clk_disable_unprepare(pcdev->pclk);

return ret;
}
Expand All @@ -106,7 +106,7 @@ static int amba_pm_runtime_resume(struct device *dev)
int ret;

if (dev->driver) {
ret = clk_enable(pcdev->pclk);
ret = clk_prepare_enable(pcdev->pclk);
/* Failure is probably fatal to the system, but... */
if (ret)
return ret;
Expand Down

0 comments on commit 5303c0f

Please sign in to comment.