[ltp] [Patch 0/3] ibm-acpi: LED Subsystem integration.

linux-thinkpad@linux-thinkpad.org linux-thinkpad@linux-thinkpad.org
Thu, 26 Oct 2006 01:54:37 +0200


Hello.

This second version applies cleanly against 2.6.19-rc3. On 2.6.18 there are
small offsets, but it work anyway.

For the first patchset please see:
http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/2006-October/036759.html

Changes from the first version:

- Add set_led() function. (Thanks Shem for spotting)
- convert write_led() to use set_led()
- convert new sysfs functions to use set_led()
- Add set_light() function.
- convert write_light() to use set_light()
- convert new sysfs functions to use set_light()
- Rename thinklight:white in thinklight

Please test and report bugs, as I like to send this upstream as soon as
possible. If possible in the 2.6.20 merge window.

TODO:
-----

- All this led_*_set functions looks bloated.
- Only show leds available on the machine and the right ThinkLight color.
  (Follow in a later patchset.)
- Make blinking available through the LED subsystem. This needs help from Richard
  Purdie. Follow in a later patchset.)

How to use it?
-------------- 
/sys/class/leds/thinklight
/sys/class/leds/power:green
/sys/class/leds/battery:amber
/sys/class/leds/battery:green
/sys/class/leds/ultrabase:green
/sys/class/leds/ultrabay:green
/sys/class/leds/standby:green
/sys/class/leds/thinklight:white

Values greater then 0 turns the led on. 0 turns it off.

Example for to turn on the standby led:

echo 1 > /sys/class/leds/standby\:green/brightness

LED information table:
----------------------

Another tradition is to collect infromation and publish them on thinkwiki.org.

My question is, which led numbers control which LEDs at your machine. For
example the LEDs number 4 and 5 are unknow. Also it would be interesting to see
if some numbers are used different on different machines.

I start a wiki page about this. Please add your infos there:

http://www.thinkwiki.org/wiki/Ibm-acpi-led-table

regards
Stefan Schmidt