linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rajendra Nayak <rnayak@ti.com>
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 05/11] OMAPDSS: add clk_prepare and clk_unprepare
Date: Fri, 22 Jun 2012 13:51:54 +0000	[thread overview]
Message-ID: <1340372890-10091-6-git-send-email-rnayak@ti.com> (raw)
In-Reply-To: <1340372890-10091-1-git-send-email-rnayak@ti.com>

In preparation of OMAP moving to Common Clk Framework(CCF) add clk_prepare()
and clk_unprepare() for the omapdss clocks.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: <linux-fbdev@vger.kernel.org>
---
 drivers/video/omap2/dss/dsi.c  |    5 ++++-
 drivers/video/omap2/dss/hdmi.c |    5 ++++-
 drivers/video/omap2/dss/venc.c |    5 ++++-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index ca8382d..81b474d 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -4776,6 +4776,7 @@ static int dsi_get_clocks(struct platform_device *dsidev)
 	}
 
 	dsi->sys_clk = clk;
+	clk_prepare(dsi->sys_clk);
 
 	return 0;
 }
@@ -4786,8 +4787,10 @@ static void dsi_put_clocks(struct platform_device *dsidev)
 
 	if (dsi->dss_clk)
 		clk_put(dsi->dss_clk);
-	if (dsi->sys_clk)
+	if (dsi->sys_clk) {
+		clk_unprepare(dsi->sys_clk);
 		clk_put(dsi->sys_clk);
+	}
 }
 
 static void __init dsi_probe_pdata(struct platform_device *dsidev)
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index 8195c71..0b7ded3 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -544,14 +544,17 @@ static int hdmi_get_clocks(struct platform_device *pdev)
 	}
 
 	hdmi.sys_clk = clk;
+	clk_prepare(hdmi.sys_clk);
 
 	return 0;
 }
 
 static void hdmi_put_clocks(void)
 {
-	if (hdmi.sys_clk)
+	if (hdmi.sys_clk) {
+		clk_unprepare(hdmi.sys_clk);
 		clk_put(hdmi.sys_clk);
+	}
 }
 
 #if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO)
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index 2b89739..62f395d 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -818,14 +818,17 @@ static int venc_get_clocks(struct platform_device *pdev)
 	}
 
 	venc.tv_dac_clk = clk;
+	clk_prepare(venc.tv_dac_clk);
 
 	return 0;
 }
 
 static void venc_put_clocks(void)
 {
-	if (venc.tv_dac_clk)
+	if (venc.tv_dac_clk) {
+		clk_unprepare(venc.tv_dac_clk);
 		clk_put(venc.tv_dac_clk);
+	}
 }
 
 static void __init venc_probe_pdata(struct platform_device *pdev)
-- 
1.7.1


       reply	other threads:[~2012-06-22 13:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1340372890-10091-1-git-send-email-rnayak@ti.com>
2012-06-22 13:51 ` Rajendra Nayak [this message]
2012-06-25  6:07   ` [PATCH 05/11] OMAPDSS: add clk_prepare and clk_unprepare Tomi Valkeinen
2012-06-25  7:11     ` Rajendra Nayak
2012-06-25  7:58       ` Tomi Valkeinen
2012-06-25 11:52         ` Rajendra Nayak
2012-06-25 13:14           ` Tomi Valkeinen
2012-06-26  5:12             ` Rajendra Nayak
2012-06-26  6:55               ` Tomi Valkeinen
2012-06-26  7:48                 ` Rajendra Nayak
2012-06-27  0:47             ` Mike Turquette
2012-06-27  4:19               ` Tomi Valkeinen
2012-06-27  5:31                 ` Rajendra Nayak
2012-06-25 11:22     ` Russell King - ARM Linux

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1340372890-10091-6-git-send-email-rnayak@ti.com \
    --to=rnayak@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).