[PATCH] clk: Update comment for clk_round_rate()

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Thu Apr 5 03:03:24 EDT 2012


Hello,

On Thu, Apr 05, 2012 at 10:41:58AM +0530, Viresh Kumar wrote:
> On 4/4/2012 11:37 PM, Turquette, Mike wrote:
> > The common clk framework doesn't enforce any policy like this, nor do
> > I think it should.  The clk framework is far from complete and I
> > wouldn't be surprised if we see folks who want their rounded rate to
> > represent a minimum value (instead of a maximum as your patch states).
> 
> Ok. Just for example, suppose foo_clk can have following rates:
> 100, 110, 120, 130, 140.
> 
> And we call round_rate with a value of 126.
> 
> Now i can't visualize why would anybody want it to return 130 (above the
> limits requested)? I agree both 100 and 120 can be returned, based on
> your below logic.
It depends on your scenario. E.g. for an UART clock it might be better
to choose 130. Here choosing the frequency is not about a fixed maximum
but to match the sample rate of the device connect to your UART.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |



More information about the linux-arm-kernel mailing list