Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752076AbbFZKqa (ORCPT ); Fri, 26 Jun 2015 06:46:30 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:39633 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751828AbbFZKqV (ORCPT ); Fri, 26 Jun 2015 06:46:21 -0400 Message-ID: <558D2D78.4060602@codeaurora.org> Date: Fri, 26 Jun 2015 16:16:16 +0530 From: Archit Taneja User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Hai Li , linux-kernel@vger.kernel.org, sboyd@codeaurora.org CC: mturquette@linaro.org, georgi.djakov@linaro.org, tomeu.vizoso@collabora.com Subject: Re: [PATCH] clk: qcom: Use parent rate when set rate to pixel RCG clock References: <1435271733-24455-1-git-send-email-hali@codeaurora.org> In-Reply-To: <1435271733-24455-1-git-send-email-hali@codeaurora.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1369 Lines: 42 On 06/26/2015 04:05 AM, Hai Li wrote: > Since the parent rate has been recalculated, pixel RCG clock > should rely on it to find the correct M/N values during set_rate, > instead of calling __clk_round_rate() to its parent again. Tested-by: Archit Taneja > > Signed-off-by: Hai Li > --- > drivers/clk/qcom/clk-rcg2.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/clk/qcom/clk-rcg2.c b/drivers/clk/qcom/clk-rcg2.c > index 4d3e2f7..b344899 100644 > --- a/drivers/clk/qcom/clk-rcg2.c > +++ b/drivers/clk/qcom/clk-rcg2.c > @@ -615,10 +615,11 @@ static int clk_pixel_set_rate(struct clk_hw *hw, unsigned long rate, > if (!parent) > return -EINVAL; > > + src_rate = parent_rate; > + > for (; frac->num; frac++) { > request = (rate * frac->den) / frac->num; > > - src_rate = __clk_round_rate(parent, request); > if ((src_rate < (request - delta)) || > (src_rate > (request + delta))) > continue; > -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/