[Soekris] [RFC][PATCH] LED Class support for Soekris net48xx

Chris Boot bootc at bootc.net
Sun Jul 9 11:00:28 UTC 2006


Chris Boot wrote:
> After many years using Linux and hanging about on LKML without having 
> done much actual kernel hacking, I've decided to have a go! The module 
> below adds LED Class device support for the Soekris net48xx Error LED. 
> Tested only on a net4801, but should work on a net4826 as well. I'd love 
> to find a way of detecting a Soekris net48xx device but there is no DMI 
> or any Soekris-specific PCI devices.

It has made its way into 2.6.18-rc1-mm1 now, so if any of you are willing to try 
it I'd be grateful! It particularly needs testing on a net4826.

Simply enable LEDS_CLASS and SCx200_GPIO support (modules work), enable a LED 
trigger like LEDTRIG_HEARTBEAT, and do the following:

echo heartbeat > /sys/class/leds/net48xx:error/trigger

That should make your net48xx have a LED heartbeat that is tied to the load 
average...

Alternatively you can just do the following to turn on/off from userspace 
instead of using the /dev/gpio devices:

echo 0 > /sys/class/leds/net48xx:error/brightness
echo 1 > /sys/class/leds/net48xx:error/brightness

Enjoy!

Chris

-- 
Chris Boot
bootc at bootc.net
http://www.bootc.net/


More information about the Soekris-tech mailing list