public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* HP dv9000t battery discharge rate
@ 2006-12-04 21:30 Sergey Basmanov
  2006-12-05  9:43 ` Bruno Ducrot
  0 siblings, 1 reply; 3+ messages in thread
From: Sergey Basmanov @ 2006-12-04 21:30 UTC (permalink / raw)
  To: linux-acpi

Hi,
Was looking how to get battery discharge rate on this laptop.
This is part of DSDT:
            Name (PBST, Package (0x04)
            {
                0x00,
                0xFFFFFFFF,
                0xFFFFFFFF,
                0x2710
            })
...

            Method (_BST, 0, NotSerialized)
            {
                If (ECON)
                {
                    If (\_SB.PCI0.LPCB.EC0.MBTS)
                    {
                        UPBS ()
                    }
                    Else
                    {
                        IVBS ()
                    }
                }
                Else
                {
                    IVBS ()
                }

                Return (PBST)
            }
...
            Method (UPBS, 0, NotSerialized)
            {
                Store (\_SB.PCI0.LPCB.EC0.MBRM, Local5)
                If (LNot (And (Local5, 0x8000)))
                {
                    ShiftRight (Local5, 0x05, Local5)
                    ShiftLeft (Local5, 0x05, Local5)
                    If (LNotEqual (Local5, DerefOf (Index (PBST, 0x02))))
                    {
                        Store (Local5, Index (PBST, 0x02))
                    }
                }

                Store (\_SB.PCI0.LPCB.EC0.MBCV, Index (PBST, 0x03))
                Store (\_SB.PCI0.LPCB.EC0.MBST, Index (PBST, 0x00))
                Store (\_SB.PCI0.LPCB.EC0.BA1C, BCAP)
            }

and method IVBS just stores default values into PBST.
So, I'm not familiar with iasl and rest, but if I understand right, UPBS 
method is used in case when battery connected and known to system.
In UPBS method I don't see any code that updates PBST at 0x01 
(discharge_rate). HP support says that sensor is present in system.
Any ideas where this sensor located and how can I get discharge rate 
visible in ACPI (kernel 2.6.18.2)?

PS: Please, reply to e-mail directly because I'm not subscribed to this 
list.
Thank You..


^ permalink raw reply	[flat|nested] 3+ messages in thread
* RE: HP dv9000t battery discharge rate
@ 2006-12-05  1:55 Lebedev, Vladimir P
  0 siblings, 0 replies; 3+ messages in thread
From: Lebedev, Vladimir P @ 2006-12-05  1:55 UTC (permalink / raw)
  To: Sergey Basmanov; +Cc: linux-acpi


I guess your DSDT does not support 'present rate'.
Look in /proc/acpi/BAT*/state file. The 'present rate' field is the PBST
at 0x01. I expect the 'unknown' (0xFFFFFFFF) value of 'present rate'. Is
it?


-----Original Message-----
From: linux-acpi-owner@vger.kernel.org
[mailto:linux-acpi-owner@vger.kernel.org] On Behalf Of Sergey Basmanov
Sent: Tuesday, December 05, 2006 12:31 AM
To: linux-acpi@vger.kernel.org
Subject: HP dv9000t battery discharge rate

Hi,
Was looking how to get battery discharge rate on this laptop.
This is part of DSDT:
            Name (PBST, Package (0x04)
            {
                0x00,
                0xFFFFFFFF,
                0xFFFFFFFF,
                0x2710
            })
...

            Method (_BST, 0, NotSerialized)
            {
                If (ECON)
                {
                    If (\_SB.PCI0.LPCB.EC0.MBTS)
                    {
                        UPBS ()
                    }
                    Else
                    {
                        IVBS ()
                    }
                }
                Else
                {
                    IVBS ()
                }

                Return (PBST)
            }
...
            Method (UPBS, 0, NotSerialized)
            {
                Store (\_SB.PCI0.LPCB.EC0.MBRM, Local5)
                If (LNot (And (Local5, 0x8000)))
                {
                    ShiftRight (Local5, 0x05, Local5)
                    ShiftLeft (Local5, 0x05, Local5)
                    If (LNotEqual (Local5, DerefOf (Index (PBST,
0x02))))
                    {
                        Store (Local5, Index (PBST, 0x02))
                    }
                }

                Store (\_SB.PCI0.LPCB.EC0.MBCV, Index (PBST, 0x03))
                Store (\_SB.PCI0.LPCB.EC0.MBST, Index (PBST, 0x00))
                Store (\_SB.PCI0.LPCB.EC0.BA1C, BCAP)
            }

and method IVBS just stores default values into PBST.
So, I'm not familiar with iasl and rest, but if I understand right, UPBS

method is used in case when battery connected and known to system.
In UPBS method I don't see any code that updates PBST at 0x01 
(discharge_rate). HP support says that sensor is present in system.
Any ideas where this sensor located and how can I get discharge rate 
visible in ACPI (kernel 2.6.18.2)?

PS: Please, reply to e-mail directly because I'm not subscribed to this 
list.
Thank You..

-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-12-05  9:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-04 21:30 HP dv9000t battery discharge rate Sergey Basmanov
2006-12-05  9:43 ` Bruno Ducrot
  -- strict thread matches above, loose matches on Subject: below --
2006-12-05  1:55 Lebedev, Vladimir P

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox