[PATCH 3/5] video: msm: change to min/max clock calls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux