linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Walker <dwalker@codeaurora.org>
To: linux-arm-msm@vger.kernel.org
Cc: "Pavel Machek" <pavel@ucw.cz>,
	"David Lanzendörfer" <david.lanzendoerfer@o2s.ch>,
	"Daniel Walker" <dwalker@codeaurora.org>
Subject: [PATCH 3/5] video: msm: change to min/max clock calls
Date: Tue, 13 Jul 2010 13:03:09 -0700	[thread overview]
Message-ID: <1279051391-16564-3-git-send-email-dwalker@codeaurora.org> (raw)
In-Reply-To: <1279051391-16564-1-git-send-email-dwalker@codeaurora.org>

The clocks used for mddi are MIN/MAX clocks. They can't be set to
a specific clock value, only be given a min and max. We can fake
it by make the min equal the max.

This is a hack, we really need to make the min/max different and set
it in a acceptable way.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
---
 drivers/video/msm/mddi.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/video/msm/mddi.c b/drivers/video/msm/mddi.c
index 844eff3..fac58d6 100644
--- a/drivers/video/msm/mddi.c
+++ b/drivers/video/msm/mddi.c
@@ -622,6 +622,8 @@ uint32_t mddi_remote_read(struct msm_mddi_client_data *cdata, uint32_t reg)
 }
 
 static struct mddi_info mddi_info[2];
+int clk_set_min_rate(struct clk *clk, unsigned long rate);
+int clk_set_max_rate(struct clk *clk, unsigned long rate);
 
 static int __init mddi_clk_setup(struct platform_device *pdev,
 				 struct mddi_info *mddi,
@@ -638,7 +640,10 @@ static int __init mddi_clk_setup(struct platform_device *pdev,
 	ret =  clk_enable(mddi->clk);
 	if (ret)
 		goto fail;
-	ret = clk_set_rate(mddi->clk, clk_rate);
+	ret = clk_set_max_rate(mddi->clk, clk_rate);
+	if (ret)
+		goto fail;
+	ret = clk_set_min_rate(mddi->clk, clk_rate);
 	if (ret)
 		goto fail;
 	return 0;
-- 
1.7.0.4

-- 
Sent by an consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

  parent reply	other threads:[~2010-07-13 20:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-13 20:03 [PATCH 1/5] msm: fb: initial framebuffer support Daniel Walker
2010-07-13 20:03 ` [PATCH 2/5] msm: gpio support for trout Daniel Walker
2010-07-13 20:03 ` Daniel Walker [this message]
2010-07-13 20:03 ` [PATCH 4/5] msm: fix up mddi clock Daniel Walker
2010-07-13 20:03 ` [PATCH 5/5] [ARM] msm: mdp: fix for 2.6.32 Daniel Walker
2010-07-13 20:05 ` [PATCH 1/5] msm: fb: initial framebuffer support Daniel Walker

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=1279051391-16564-3-git-send-email-dwalker@codeaurora.org \
    --to=dwalker@codeaurora.org \
    --cc=david.lanzendoerfer@o2s.ch \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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).