Re: [PATCH] convert powermac ide blink to new led infrastructure
- To: Johannes Berg <email@example.com>
- Cc: debian-powerpc <firstname.lastname@example.org>, linuxppc-dev list <email@example.com>
- Subject: Re: [PATCH] convert powermac ide blink to new led infrastructure
- From: Benjamin Herrenschmidt <firstname.lastname@example.org>
- Date: Mon, 01 May 2006 16:56:48 +1000
- Message-id: <email@example.com>
- In-reply-to: <1146237326.19164.111.camel@localhost>
- References: <1146235779.19164.109.camel@localhost> <1146237326.19164.111.camel@localhost>
On Fri, 2006-04-28 at 17:15 +0200, Johannes Berg wrote:
> [resent slightly different patch that adds a comment over the original
> This patch removes the old pmac ide led blink code and
> adds generic LED subsystem support for the LED.
> Ben: I removed the retry code that was present in the original. I guess
> LEDs aren't really too important but if it really is necessary please
> tell me and I'll add it back.
> Also, I don't have any suspend handling things. It doesn't appear to be
> necessary, how do I find out?
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.