]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
base: power - use clk_prepare_enable and clk_prepare_disable
authorMurali Karicheri <m-karicheri2@ti.com>
Mon, 22 Oct 2012 23:18:40 +0000 (01:18 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 31 Oct 2012 20:06:45 +0000 (21:06 +0100)
When PM runtime is enabled in DaVinci and the machine migrates to
common clk framework, the clk_enable() gets called without
clk_prepare(). This patch is to fix this issue so that PM run
time can inter work with common clk framework.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/clock_ops.c

index eb78e9640c4a86c0df9c0464e7dbd0b37f4ab75d..9d8fde709390e853909ba52aec823167882da2ae 100644 (file)
@@ -99,7 +99,7 @@ static void __pm_clk_remove(struct pm_clock_entry *ce)
 
        if (ce->status < PCE_STATUS_ERROR) {
                if (ce->status == PCE_STATUS_ENABLED)
-                       clk_disable(ce->clk);
+                       clk_disable_unprepare(ce->clk);
 
                if (ce->status >= PCE_STATUS_ACQUIRED)
                        clk_put(ce->clk);
@@ -396,7 +396,7 @@ static void enable_clock(struct device *dev, const char *con_id)
 
        clk = clk_get(dev, con_id);
        if (!IS_ERR(clk)) {
-               clk_enable(clk);
+               clk_prepare_enable(clk);
                clk_put(clk);
                dev_info(dev, "Runtime PM disabled, clock forced on.\n");
        }
@@ -413,7 +413,7 @@ static void disable_clock(struct device *dev, const char *con_id)
 
        clk = clk_get(dev, con_id);
        if (!IS_ERR(clk)) {
-               clk_disable(clk);
+               clk_disable_unprepare(clk);
                clk_put(clk);
                dev_info(dev, "Runtime PM disabled, clock forced off.\n");
        }