http://bugzilla.kernel.org/show_bug.cgi?id=13563





--- Comment #4 from Zhang Rui <rui.zh...@intel.com>  2009-06-22 02:51:23 ---
                If (LEqual (Local0, 0x02)) // battery is present
                {
                    And (Local7, One, Local0) // get the AC status
                    If (LEqual (Local0, One)) // if AC is on
                    {
                        And (Local7, 0x80, Local1) // get the Battery status
                        If (LEqual (Local1, 0x80)) // if battery is charging
                        {
                            Or (Local4, 0x02, Local4) // _BST returns charging
                        }
                        Else                       // if battery is not
charging
                        {
                            Or (Local4, One, Local4) // _BST returns discharing
                        }
                    }
                }
                // _BST returns Charged if AC is off ?

This is how the Battery state field of _BST is set in the original DSDT.
This is apparently wrong.
I have modified the AML to
                If (LEqual (Local0, 0x02))
                {
                    And (Local7, One, Local0)
                    If (LEqual (Local0, One))
                    {
                        And (Local7, 0x80, Local1)
                        If (LEqual (Local1, 0x80))
                        {
                            Or (Local4, 0x02, Local4) // if AC is on and
battery is charging, it's "Charging"
                        }
                        // if AC is on and battery is not charging, it's
"Charged"
                    }
                    Else
                    {
                        Or (Local4, One, Local4) // if AC is not on, it's
"Discharging"
                    }
                }

-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
acpi-bugzilla mailing list
acpi-bugzilla@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acpi-bugzilla

Reply via email to