Re: [PATCH E 10/14] OMAP clock: support "dry run" rate and parent changes

From: David Brownell
Date: Sun Feb 08 2009 - 14:49:21 EST


On Sunday 08 February 2009, Russell King - ARM Linux wrote:
> A far better way to approach this would be to split the set_rate/recalc
> functionality into two parts:
>
> 1. a method which returns the both the new clock rate and the hardware
> programming information
> 2. a method to commit the hardware programming information to the registers

Much simpler to just pass a "commit" flag and not
try to come up with some generic way to represent
"hardware programming information"; in general that
will be very different between clocks.

Then clk_round_rate() passes "false" for commit,
while clk_set_rate() passes "true". And in both
cases the value returned is the rate, or negative
errno to indicate a fault.

- Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/