[PATCH] convert powermac ide blink to new led infrastructure

Richard Purdie rpurdie at rpsys.net
Wed Jun 28 19:38:02 EST 2006


On Tue, 2006-06-27 at 19:31 +0200, Johannes Berg wrote:
> > Looks good. Only one nit: in pmu_led_set(), you should be able to test
> > if the requested state is identical to the current one and do nothing
> > without taking the lock no ?
> > 
> > Or does the upper level LED infrastructure takes care of it ?
> 
> I don't know, Richard? But yeah, I can do that too.

The core doesn't do that. In some cases setting the LED is easier and
cheaper than checking a cached value. If setting the LED state is
expensive, it would be simple enough to implement value caching in the
driver.

Part of the problem is also that we provide several values to the driver
(brightness, power, blanking, device specific parameters) and it needs
to combine those values in a way that is only meaningful to the specific
driver.

Richard




More information about the Linuxppc-dev mailing list