[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54EAF5F4.3070509@st.com>
Date: Mon, 23 Feb 2015 10:42:12 +0100
From: Maxime Coquelin <maxime.coquelin@...com>
To: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>,
Mike Turquette <mturquette@...aro.org>,
Stephen Boyd <sboyd@...eaurora.org>
CC: <linux-arm-kernel@...ts.infradead.org>,
Sören Brinkmann <soren.brinkmann@...inx.com>,
<linux-kernel@...r.kernel.org>, <kernel@...gutronix.de>
Subject: Re: [PATCH 3/3] clk: divider: fix calculation of initial best divider
when rounding to closest
Hi Uwe,
On 02/21/2015 11:40 AM, Uwe Kleine-König wrote:
> Similar to the reasoning for the previous commit
>
> DIV_ROUND_CLOSEST(parent_rate, rate)
>
> might not be the best integer divisor to get a good approximation for
> rate from parent_rate (given the metric for CLK_DIVIDER_ROUND_CLOSEST).
>
> For example assume a parent rate of 1000 Hz and a target rate of 700.
> Using DIV_ROUND_CLOSEST the suggested divisor gets calculated to 1
> resulting in a target rate of 1000 with a delta of 300 to the desired
> rate. With choosing 2 as divisor however the resulting rate is 500 which
> is nearer to 700.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
> ---
> drivers/clk/clk-divider.c | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
This is correct. Thanks for fixing this.
You can add my:
Acked-by: Maxime Coquelin <maxime.coquelin@...com>
Best regards,
Maxime
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists