OMAPDSS: add clk_prepare_enable and clk_disable_unprepare
authorRajendra Nayak <rnayak@ti.com>
Wed, 27 Jun 2012 08:51:26 +0000 (14:21 +0530)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 29 Jun 2012 06:09:17 +0000 (09:09 +0300)
In preparation of OMAP moving to Common Clk Framework(CCF) change
clk_enable() and clk_disable() calls to clk_prepare_enable() and
clk_disable_unprepare() in omapdss. This can be safely done, as omapdss
never enables or disables clocks in atomic context.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: <linux-fbdev@vger.kernel.org>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Mike Turquette <mturquette@linaro.org>
[tomi.valkeinen@ti.com: updated patch description]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/omap2/dss/dsi.c
drivers/video/omap2/dss/hdmi.c
drivers/video/omap2/dss/venc.c

index ca8382d346e9bb0af2d8b749efd0e6d6ae25ff09..423ef6afa9e1c79fd8303daaeabc41355f7a0a5b 100644 (file)
@@ -1085,9 +1085,9 @@ static inline void dsi_enable_pll_clock(struct platform_device *dsidev,
        struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
 
        if (enable)
-               clk_enable(dsi->sys_clk);
+               clk_prepare_enable(dsi->sys_clk);
        else
-               clk_disable(dsi->sys_clk);
+               clk_disable_unprepare(dsi->sys_clk);
 
        if (enable && dsi->pll_locked) {
                if (wait_for_bit_change(dsidev, DSI_PLL_STATUS, 1, 1) != 1)
index 8195c7166d200c8e575aba54f5e4f46c335df002..b9424b3c8d45f185c2591e652dc802d5d4820616 100644 (file)
@@ -785,7 +785,7 @@ static int __exit omapdss_hdmihw_remove(struct platform_device *pdev)
 
 static int hdmi_runtime_suspend(struct device *dev)
 {
-       clk_disable(hdmi.sys_clk);
+       clk_disable_unprepare(hdmi.sys_clk);
 
        dispc_runtime_put();
 
@@ -800,7 +800,7 @@ static int hdmi_runtime_resume(struct device *dev)
        if (r < 0)
                return r;
 
-       clk_enable(hdmi.sys_clk);
+       clk_prepare_enable(hdmi.sys_clk);
 
        return 0;
 }
index 2b8973931ff48e845cd9a1386b7b437b369b24e4..fd3744059e5b6546e94d076252761d68926cfeff 100644 (file)
@@ -930,7 +930,7 @@ static int __exit omap_venchw_remove(struct platform_device *pdev)
 static int venc_runtime_suspend(struct device *dev)
 {
        if (venc.tv_dac_clk)
-               clk_disable(venc.tv_dac_clk);
+               clk_disable_unprepare(venc.tv_dac_clk);
 
        dispc_runtime_put();
 
@@ -946,7 +946,7 @@ static int venc_runtime_resume(struct device *dev)
                return r;
 
        if (venc.tv_dac_clk)
-               clk_enable(venc.tv_dac_clk);
+               clk_prepare_enable(venc.tv_dac_clk);
 
        return 0;
 }