All of lore.kernel.org
 help / color / mirror / Atom feed
* Battery 'present rate' display weirdness
@ 2007-07-27 15:23 Andika Triwidada
  2007-07-28  8:50 ` Alexey Starikovskiy
  0 siblings, 1 reply; 3+ messages in thread
From: Andika Triwidada @ 2007-07-27 15:23 UTC (permalink / raw)
  To: linux-acpi

My Acer Aspire 5580 shows normal info on discharging

andika@hokage:~$ cat /proc/acpi/battery/*/*
alarm:                   unsupported
present:                 yes
design capacity:         4000 mAh
last full capacity:      4131 mAh
battery technology:      rechargeable
design voltage:          11100 mV
design capacity warning: 300 mAh
design capacity low:     165 mAh
capacity granularity 1:  32 mAh
capacity granularity 2:  32 mAh
model number:            PRESPAL
serial number:           217
battery type:            LION
OEM info:                PANASONIC
present:                 yes
capacity state:          ok
charging state:          discharging
present rate:            2437 mA
remaining capacity:      448 mAh
present voltage:         10336 mV

But abnormal (?) one when charging:

andika@hokage:~$ cat /proc/acpi/battery/*/*
alarm:                   unsupported
present:                 yes
design capacity:         4000 mAh
last full capacity:      4131 mAh
battery technology:      rechargeable
design voltage:          11100 mV
design capacity warning: 300 mAh
design capacity low:     165 mAh
capacity granularity 1:  32 mAh
capacity granularity 2:  32 mAh
model number:            PRESPAL
serial number:           217
battery type:            LION
OEM info:                PANASONIC
present:                 yes
capacity state:          ok
charging state:          charging
present rate:            63418 mA
                         ^^^^^^^^
remaining capacity:      256 mAh
present voltage:         10640 mV

Does it need to be handled differently in battery.c or up to any
userspace tools to check 'charging state' and calculate proper (65535
- x) 'present rate'?

This is on kernel 2.6.22

TIA.

--
andika

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

* Re: Battery 'present rate' display weirdness
  2007-07-27 15:23 Battery 'present rate' display weirdness Andika Triwidada
@ 2007-07-28  8:50 ` Alexey Starikovskiy
  2007-07-28 10:32   ` Andika Triwidada
  0 siblings, 1 reply; 3+ messages in thread
From: Alexey Starikovskiy @ 2007-07-28  8:50 UTC (permalink / raw)
  To: Andika Triwidada; +Cc: linux-acpi

Hello Andika,

Acer was long user of smart battery system (SBS), which allows for 
negative values of the current (it is signed 16 bit value in SBS).
If your Acer exports battery directly with SBS, there is a bug in drivers/acpi/sbs.c
If it exports battery with ACPI control methods (CM), then there is a need of 
workaround in drivers/acpi/battery.c (CM uses 64 bit value to store current, 
so this is not a matter of getting absolute value of it).  

Could you please open bug against ACPI/Battery and attach acpidump output
to it?

Thanks,
Alex. 

Andika Triwidada wrote:
> My Acer Aspire 5580 shows normal info on discharging
> 
> andika@hokage:~$ cat /proc/acpi/battery/*/*
> alarm:                   unsupported
> present:                 yes
> design capacity:         4000 mAh
> last full capacity:      4131 mAh
> battery technology:      rechargeable
> design voltage:          11100 mV
> design capacity warning: 300 mAh
> design capacity low:     165 mAh
> capacity granularity 1:  32 mAh
> capacity granularity 2:  32 mAh
> model number:            PRESPAL
> serial number:           217
> battery type:            LION
> OEM info:                PANASONIC
> present:                 yes
> capacity state:          ok
> charging state:          discharging
> present rate:            2437 mA
> remaining capacity:      448 mAh
> present voltage:         10336 mV
> 
> But abnormal (?) one when charging:
> 
> andika@hokage:~$ cat /proc/acpi/battery/*/*
> alarm:                   unsupported
> present:                 yes
> design capacity:         4000 mAh
> last full capacity:      4131 mAh
> battery technology:      rechargeable
> design voltage:          11100 mV
> design capacity warning: 300 mAh
> design capacity low:     165 mAh
> capacity granularity 1:  32 mAh
> capacity granularity 2:  32 mAh
> model number:            PRESPAL
> serial number:           217
> battery type:            LION
> OEM info:                PANASONIC
> present:                 yes
> capacity state:          ok
> charging state:          charging
> present rate:            63418 mA
>                          ^^^^^^^^
> remaining capacity:      256 mAh
> present voltage:         10640 mV
> 
> Does it need to be handled differently in battery.c or up to any
> userspace tools to check 'charging state' and calculate proper (65535
> - x) 'present rate'?
> 
> This is on kernel 2.6.22
> 
> TIA.
> 
> --
> andika
> -
> 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

* Re: Battery 'present rate' display weirdness
  2007-07-28  8:50 ` Alexey Starikovskiy
@ 2007-07-28 10:32   ` Andika Triwidada
  0 siblings, 0 replies; 3+ messages in thread
From: Andika Triwidada @ 2007-07-28 10:32 UTC (permalink / raw)
  To: Alexey Starikovskiy; +Cc: linux-acpi

On 7/28/07, Alexey Starikovskiy <aystarik@gmail.com> wrote:
> Hello Andika,
>
> Acer was long user of smart battery system (SBS), which allows for
> negative values of the current (it is signed 16 bit value in SBS).
> If your Acer exports battery directly with SBS, there is a bug in drivers/acpi/sbs.c
> If it exports battery with ACPI control methods (CM), then there is a need of
> workaround in drivers/acpi/battery.c (CM uses 64 bit value to store current,
> so this is not a matter of getting absolute value of it).
>
> Could you please open bug against ACPI/Battery and attach acpidump output
> to it?
>
> Thanks,
> Alex.

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

sbs doesn't seems to recogniza the battery, loaded ok but nothing new
under /proc/acpi. How do I make sure?

Let me know if you need more info.

Thanks.
Andika

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

end of thread, other threads:[~2007-07-28 10:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-27 15:23 Battery 'present rate' display weirdness Andika Triwidada
2007-07-28  8:50 ` Alexey Starikovskiy
2007-07-28 10:32   ` Andika Triwidada

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.