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





--- Comment #8 from Zhang Rui <[email protected]>  2010-06-04 03:16:17 ---
Created an attachment (id=26645)
 --> (https://bugzilla.kernel.org/attachment.cgi?id=26645)
custom UPBS method

please boot a kernel that newer than 2.6.33.
mount debug fs.
run "cat custom_UPBS.hen > /sys/kernel/debug/acpi/custom_method".
and then see if the battery status is reported correctly.

custom UPBS ASL code:
DefinitionBlock ("", "UPBS", 1, "", "", 0x20080715)
{
  External (\_SB_.BAT1.PBST, PkgObj)
  External (\_SB_.POSW, MethodObj)
  External (\_SB.PCI0.LPCB.EC0.MCUR)
  External (\_SB.PCI0.LPCB.EC0.BFFG)
  External (\_SB.PCI0.LPCB.EC0.BATF)
  External (\_SB.PCI0.LPCB.EC0.B1FC)
  External (\_SB.PCI0.LPCB.EC0.MBRM)
  External (\_SB.PCI0.LPCB.EC0.BA1C)
  External (\_SB.CM26)
  External (\_SB.PCI0.LPCB.EC0.MBVG)
  External (\_SB.PCI0.LPCB.EC0.MBTC)

  Method (\_SB_.BAT1.UPBS, 0, NotSerialized)
  {
                Store (\_SB.PCI0.LPCB.EC0.MCUR, Local5)
                Store (POSW (Local5), Index (PBST, 0x01))
                Store (\_SB.PCI0.LPCB.EC0.BFFG, Local1)
                If (LEqual (Local1, 0x01))
                {
                        Store (\_SB.PCI0.LPCB.EC0.B1FC, Index (PBST, 0x02))
                }
                Else
                {
                    Store (\_SB.PCI0.LPCB.EC0.MBRM, Index (PBST, 0x02))
                }

                Store (\_SB.PCI0.LPCB.EC0.BA1C, Local1)
                Store (Local1, \_SB.CM26)
                Store (\_SB.PCI0.LPCB.EC0.MBVG, Index (PBST, 0x03))
                If (LNotEqual (Local5, 0x00))
                {
                    If (\_SB.PCI0.LPCB.EC0.MBTC)
                    {
                        Store (0x02, Index (PBST, 0x00))
                    }
                    Else
                    {
                        Store (0x01, Index (PBST, 0x00))
                    }
                }
                Else
                {
                    Store (0x00, Index (PBST, 0x00))
                }
  }
}

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

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
acpi-bugzilla mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/acpi-bugzilla

Reply via email to