[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201221135758.edgskzkyyrw4lcx7@pengutronix.de>
Date: Mon, 21 Dec 2020 14:57:58 +0100
From: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To: Stephen Boyd <sboyd@...nel.org>,
Michael Turquette <mturquette@...libre.com>
Cc: linux-pwm@...r.kernel.org, Artur Rojek <contact@...ur-rojek.eu>,
Mathieu Malaterre <malat@...ian.org>,
linux-kernel@...r.kernel.org, Paul Cercueil <paul@...pouillou.net>,
od@...c.me, Thierry Reding <thierry.reding@...il.com>,
kernel@...gutronix.de, linux-clk@...r.kernel.org
Subject: Re: About rounding in the clk framework [Was: Re: [PATCH 4/7] pwm:
jz4740: Improve algorithm of clock calculation]
Hello,
On Tue, Apr 14, 2020 at 11:24:12AM +0200, Uwe Kleine-König wrote:
> Hello Stephen, hello Michael,
>
> On Wed, Feb 12, 2020 at 08:29:11AM +0100, Uwe Kleine-König wrote:
> > Can you please explain what is the reason why clk_round_rate_up/down()
> > is a bad idea? Would it help to create a patch that introduces these
> > functions to get the discussion going?
>
> I didn't get any feedback on my mail. Are you to busy working on more
> important stuff? Is the answer so obvious that you don't consider it
> worth your time to answer?
>
> Looking a bit through the code I see there are two callbacks hwclks can
> provide to implement rounding (determine_rate and round_rate). The docs
> for both use the term "return the closes rate actually supported". Does
> that mean "round-closest" is already the official policy and other
> strategies in lowlevel drivers are a bug?
Feedback here would be really appreciated. I intend to unify the rounding
behaviour of PWMs to always round down. If there was a similar
constraint for clks, some corner cases might be a bit simpler.
Looking forward to read about your thoughts,
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists