aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-pl022.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-01-22 13:41:36 -0500
committerMark Brown <broonie@linaro.org>2014-02-03 07:22:55 -0500
commit3e7dde425dbcc7965398e92909d898c4ebc9fdb8 (patch)
treeb6cc2d4804b702744feb1643f6087cdb363fa330 /drivers/spi/spi-pl022.c
parent38dbfb59d1175ef458d006556061adeaa8751b72 (diff)
spi/pl022: Unprepare clocks while suspended
When the driver was converted to clk_prepare() the suspend path didn't have any changes made so the clock remains prepared throughout the runtime of the driver. Unprepare it when suspended so that any savings that can be made as a result are made. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/spi/spi-pl022.c')
-rw-r--r--drivers/spi/spi-pl022.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index 2789b452e711..4ec49eae6141 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -2296,7 +2296,7 @@ pl022_remove(struct amba_device *adev)
2296 */ 2296 */
2297static void pl022_suspend_resources(struct pl022 *pl022, bool runtime) 2297static void pl022_suspend_resources(struct pl022 *pl022, bool runtime)
2298{ 2298{
2299 clk_disable(pl022->clk); 2299 clk_disable_unprepare(pl022->clk);
2300 2300
2301 if (runtime) 2301 if (runtime)
2302 pinctrl_pm_select_idle_state(&pl022->adev->dev); 2302 pinctrl_pm_select_idle_state(&pl022->adev->dev);
@@ -2312,7 +2312,7 @@ static void pl022_resume_resources(struct pl022 *pl022, bool runtime)
2312 /* Then let's idle the pins until the next transfer happens */ 2312 /* Then let's idle the pins until the next transfer happens */
2313 pinctrl_pm_select_idle_state(&pl022->adev->dev); 2313 pinctrl_pm_select_idle_state(&pl022->adev->dev);
2314 2314
2315 clk_enable(pl022->clk); 2315 clk_prepare_enable(pl022->clk);
2316} 2316}
2317#endif 2317#endif
2318 2318