Thread (9 messages) 9 messages, 2 authors, 2006-05-01

Re: [PATCH] convert powermac ide blink to new led infrastructure

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2006-05-01 09:10:54

On Mon, 2006-05-01 at 10:59 +0200, Johannes Berg wrote:
On Mon, 2006-05-01 at 16:56 +1000, Benjamin Herrenschmidt wrote:
quoted
Hrm... you find out the hard way in general ... we'll have to be careful
with this one, maybe have the PMU driver stop the LED after the device
suspend dance or do a sysdev with a suspend/resume and make sure that
any pending LED request is complete. Also, your code isn't testing if
the PMU request is still in progress before possibly sending another
one ... that's a bit dangerous (and may cause the LED to get "stuck").
You can re-use a request once it's complete though. In addition, my PMU
code was written to minimize spinlock usage in the hot path... There
might be a way to do the same here.
I don't really understand how the PMU works hence wasn't really sure
what the whole request thing does. Do we get an interrupt when it
completes or something? If so, could I get at that notification via the
request structure?
Yes, there is a callback, that's the "done" function, but you can also
poll/check on request->complete though in this case, polling is not
recommended, the LED stuff should be as low latency as possible.
I'll take a closer look and rework this, I think it's worthwhile even if
it requires some more effort.

johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help