[support-gang] XO brightness key operation

James Cameron quozl at laptop.org
Tue Apr 10 01:56:40 EDT 2012


On Tue, Apr 10, 2012 at 01:16:15AM -0400, John Watlington wrote:
> [...] We ended up using a dual LED package shared with the storage LED
> (third from the right), to minimize damage due to PCB handling prior
> to laptop assembly.  [...]

The light sensor LED can also be forced on for testing.  The Open
Firmware command "test /leds" does this.

But you can do it manually:

	ok ols-led-on

Or in Linux:

	mount -t debugfs none /sys/kernel/debug
	echo '57:0' > /sys/kernel/debug/olpc-ec/generic

(the file name is generic in 11.3.1, but generic changes to cmd in
12.1.0)

This disables the light sensor LED and makes it glow, by using it in the
normal polarity that LEDs are used.

The result varies by build:

SKU19x dim green
SKU200 dim green
SKU201 dim green
SKU202 dim green
SKU203 red (this is where the change to two LED package happened)
SKU204 red
(i've no other SKUs here)

A fun feature of ols-led-on is that it persists when the laptop is
turned off.  So it can be used in Open Firmware test scripts for
indicating a laptop with a problem that needs attention.

The light sensor LED only faces the front.  It does not appear from the
back.

In conjunction with the storage LED, you can cause an orange glow from
the front left:

	ok ols-led-on hdd-led-on

At the same time, you'll only see a green glow from the back left.

To clear the state, either remove the battery and DC cable, run the
"test /leds" command again, or script what the test command does:

	ols-led-ec-control

Presumably one could cause minor consternation for comic effect by
preparing a laptop with the red glow before handing it to a colleague.

-- 
James Cameron
http://quozl.linux.org.au/



More information about the Devel mailing list