https://bugzilla.kernel.org/show_bug.cgi?id=15867


Zhang Rui <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]




--- Comment #7 from Zhang Rui <[email protected]>  2010-05-11 08:22:04 ---
BATS is set unconditionally in _REG method, even if the battery is not present
at the moment.
This is wrong, IMO, AML code should reset the BATS value based on
PCI0.LPC.EC0.ESTS, once the EC operegion can be accessed,

we can re-write the BAT0._STA method like:
            Name (BATT, Zero)
            Method (_STA, 0, NotSerialized)
            {
                If (LEqual(BATT, Zero))
                {
                    Store (\_SB.PCI0.LPC.EC0.ESTS, Local0)
                    If (LEqual (And (Local0, 0x08), 0x08))
                    {
                       Store (One, BATS)
                    }
                    Else
                    {
                       Store (Zero, BATS)
                    }
                    Store (One, BATT)
                }

                If (ECON)
                {
                    If (BATS)
                    {
                        Return (0x1F)
                    }
                    Else
                    {
                        Return (0x0F)
                    }
                }
                Else
                {
                    Return (0x0F)
                }

                Return (0x0F)
            }

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
------------------------------------------------------------------------------

_______________________________________________
acpi-bugzilla mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/acpi-bugzilla

Reply via email to