]> git.karo-electronics.de Git - linux-beck.git/commitdiff
spi/pl022: Unprepare clocks while suspended
authorMark Brown <broonie@linaro.org>
Wed, 22 Jan 2014 18:41:36 +0000 (18:41 +0000)
committerMark Brown <broonie@linaro.org>
Mon, 3 Feb 2014 12:22:55 +0000 (12:22 +0000)
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>
drivers/spi/spi-pl022.c

index 2789b452e71159a86164ff752ef2c1e06a6da411..4ec49eae61418d1bd1cbb9cf4c63354ebd8b6002 100644 (file)
@@ -2296,7 +2296,7 @@ pl022_remove(struct amba_device *adev)
  */
 static void pl022_suspend_resources(struct pl022 *pl022, bool runtime)
 {
-       clk_disable(pl022->clk);
+       clk_disable_unprepare(pl022->clk);
 
        if (runtime)
                pinctrl_pm_select_idle_state(&pl022->adev->dev);
@@ -2312,7 +2312,7 @@ static void pl022_resume_resources(struct pl022 *pl022, bool runtime)
                /* Then let's idle the pins until the next transfer happens */
                pinctrl_pm_select_idle_state(&pl022->adev->dev);
 
-       clk_enable(pl022->clk);
+       clk_prepare_enable(pl022->clk);
 }
 #endif