Re: "i" LEDs on Thinkpad Edge 13" AMD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Sep 26, 2010 at 10:40:27AM +0100, Martin Dengler wrote:
> Does anyone have an idea what I should look at to get to be able to
> control:
> 
> a) the LEDs brightness levels
> b) the LEDs independently
> 
> ...?

Was the question missing some information that would make it easier to
answer?

The only things I've found so far (next step is to turn on ACPI
debugging and start replacing methods, perhaps) is that:

1) the DSDT table contains the following code:

            Method (LED, 2, NotSerialized)
            {
                Or (Arg0, Arg1, Local0)
                If (\_SB.PCI0.LPC0.ECON)
                {
                    Store (Local0, HLCL)
                }
                Else
                {
                    \WBEC (0x0C, Local0)
                }
            }

2) The following code shows interesting behaviour:

unsigned int i;
for (i=0; i < 256; ++i) {
    acpi_evalf(led_handle, NULL, NULL, "vdd", led, i);
    msleep(2000);
}

...in that, for led = 0, when "i" is (16 * k) + 3 (for all k >= 0)[1],
the LEDs go off.  led = 0 corresponds to the sysfs directory
/sys/class/leds/tpacpi::power/brightness for me. Once they're off,
setting i to any of (16 * k) + 0, 1, 2, or 3 will not change the LEDs
from being dark.  Any other value will cause the LEDs to come back on.
But once they are on, only (16 * k) + 3 will get them to turn off
again.

So the odd thing is that using i = (16 * k) + j, 0 <= j <= 2 seems not
to change the state of the LED, whether it is on or off.  Other values
of j between 4 and 15 always turn the LEDs on, if they are off.

There's obviously some power-of-two stuff going on here, and together
with the DSDT LED method "Or"ing its arguments I thought using LED 0
would help expose the logic, but I can't see the pattern right away.
At one point I thought the 2^4 bit selected which LED (indexed from 1
:P) to control and the 2^2 bit selected its state (1 for off, 0 for
on).

Any pointers would be appreciated ("ur doing it wr0ng" is better than
nothing, too).

Martin


1. and of course where (16 * k) + 3 < 256.

Attachment: pgp3ypoRLoJam.pgp
Description: PGP signature

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
ibm-acpi-devel mailing list
ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel

[Index of Archives]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite Photos]     [Yosemite Advice]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux