From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wolverine02.qualcomm.com ([199.106.114.251]:16851 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754491Ab0GMUDj (ORCPT ); Tue, 13 Jul 2010 16:03:39 -0400 From: Daniel Walker Subject: [PATCH 3/5] video: msm: change to min/max clock calls Date: Tue, 13 Jul 2010 13:03:09 -0700 Message-Id: <1279051391-16564-3-git-send-email-dwalker@codeaurora.org> In-Reply-To: <1279051391-16564-1-git-send-email-dwalker@codeaurora.org> References: <1279051391-16564-1-git-send-email-dwalker@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org List-ID: To: linux-arm-msm@vger.kernel.org Cc: Pavel Machek , David =?iso-8859-1?q?Lanzend=F6rfer?= , Daniel Walker 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 --- 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.