[PATCH] convert powermac ide blink to new led infrastructure

Benjamin Herrenschmidt benh at kernel.crashing.org
Mon May 1 19:10:47 EST 2006


On Mon, 2006-05-01 at 10:59 +0200, Johannes Berg wrote:
> On Mon, 2006-05-01 at 16:56 +1000, Benjamin Herrenschmidt wrote:
> 
> > 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




More information about the Linuxppc-dev mailing list