Thread (4 messages) 4 messages, 3 authors, 2010-02-24

sleeping clk_[enable,disable]?

From: Uwe Kleine-König <hidden>
Date: 2010-02-24 08:46:07

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/  |
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help