Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752264AbbBWJrT (ORCPT ); Mon, 23 Feb 2015 04:47:19 -0500 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:33107 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751787AbbBWJrS (ORCPT ); Mon, 23 Feb 2015 04:47:18 -0500 Message-ID: <54EAF704.9030706@st.com> Date: Mon, 23 Feb 2015 10:46:44 +0100 From: Maxime Coquelin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: =?UTF-8?B?VXdlIEtsZWluZS1Lw7ZuaWc=?= , Mike Turquette , Stephen Boyd CC: , =?UTF-8?B?U8O2cmVuIEJyaW5rbWFubg==?= , , Subject: Re: [PATCH 2/3] clk: divider: fix selection of divider when rounding to closest References: <20150221085620.GV19388@pengutronix.de> <1424515225-6929-1-git-send-email-u.kleine-koenig@pengutronix.de> <1424515225-6929-3-git-send-email-u.kleine-koenig@pengutronix.de> In-Reply-To: <1424515225-6929-3-git-send-email-u.kleine-koenig@pengutronix.de> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.251.16.163] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-02-23_01:2015-02-20,2015-02-22,1970-01-01 signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1116 Lines: 28 Hello Uwe, On 02/21/2015 11:40 AM, Uwe Kleine-König wrote: > It's an invalid approach to assume that among two divider values > the one nearer the exact divider is the better one. > > Assume a parent rate of 1000 Hz, a divider with CLK_DIVIDER_POWER_OF_TWO > and a target rate of 89 Hz. The exact divider is ~ 11.236 so 8 and 16 > are the candidates to choose from yielding rates 125 Hz and 62.5 Hz > respectivly. While 8 is nearer to 11.236 than 16 is, the latter is still > the better divider as 62.5 is nearer to 89 than 125 is. > > Fixes: 774b514390b1 (clk: divider: Add round to closest divider) > Signed-off-by: Uwe Kleine-König > --- > drivers/clk/clk-divider.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) For this one too, you can add my: Acked-by: Maxime Coquelin Thanks, Maxime -- 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/