sleeping clk_[enable,disable]?

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Wed Feb 24 03:46:07 EST 2010


Hello,

On Tue, Feb 23, 2010 at 03:32:19PM +0100, Linus Walleij wrote:
> A question here:
> 
> If you have a clocking hardware that would actually require
> clk_[enable,disable] to
> sleep in order to ascertain that the clock is actually in the
> requested state when
> you return from these functions, what can you do?
> 
> I could think of several solutions, like:
> 
> * Actually let clk_[enable,disable] sleep, make sure all drivers only calls them
>   in thread context.
> 
> * Impose a state in the clk so it can be "in transition", then an
> additional function
>   clk_is_stable() which will also have to be added to most drivers but had the
>   advantage of not violating the defined clk_[enable,disable] API.
> 
> * Throw in udelay():s after the clk_[enable,disable] calls, with some values
>   that are unfortunately then spread out in the drivers instead of in the
>   clk implementation.
I had a similar problem some time ago, and choosed to let
clk_{en,dis}able sleep.

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