Re: battery: current a factor of 10 off? [fix confirmed]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alexey Starikovskiy <aystarik@xxxxxxxxx> writes:

> Alexey Starikovskiy wrote:
>
>> On Fri, Nov 21, 2008 at 3:33 AM, Ferenc Wagner <wferi@xxxxxxx> wrote:
>>
>>> on my ThinkPad R50e the current_now reading seems something like 10
>>> times the actual value.  [...]
>>
>> Good catch.  ACPI battery interface report its state either in mW
>> or in mA, and discharge rate in your case is reported in
>> mW. power_supply interface does not have such a parameter, so
>> current_now parameter is used for all cases. But in case of mW,
>> reported discharge should be converted into mA.
>>
>> Please test the attached patch.
>
> This patch should be better -- no integer overflow.

Hi Alex,

Thanks, this patch really fixes the issue (tried on 2.6.28-rc6).
Hope to see it soon in Linus' tree!

Btw. that kernel gives me two ACPI warnings on boot:

  ACPI: RSDP 000F6E40, 0024 (r2 IBM   )
  ACPI: XSDT 1F6EF33D, 004C (r1 IBM    TP-1W        2060  LTP        0)
  ACPI: FACP 1F6EF400, 00F4 (r3 IBM    TP-1W        2060 IBM         1)
  ACPI Warning (tbfadt-0460): Optional field "Gpe1Block" has zero address or length: 000000000000102C/0 [20080926]
  ACPI: DSDT 1F6EF5E7, 7865 (r1 IBM    TP-1W        2060 MSFT  100000E)
  ACPI: FACS 1F6F8000, 0040
  ACPI: SSDT 1F6EF5B4, 0033 (r1 IBM    TP-1W        2060 MSFT  100000E)
  ACPI: ECDT 1F6F6E4C, 0052 (r1 IBM    TP-1W        2060 IBM         1)
  ACPI: TCPA 1F6F6E9E, 0032 (r1 IBM    TP-1W        2060 PTL         1)
  ACPI: BOOT 1F6F6FD8, 0028 (r1 IBM    TP-1W        2060  LTP        1)
  [...]
  ACPI Warning (nspredef-0858): \_SB_.PCI0.LPC_.EC__.BAT0._BIF: Return Package type mismatch at index 9 - found Buffer, expected String [20080926]
  ACPI: Battery Slot [BAT0] (battery present)

I'm willing to provide further info if anybody here is interested.
-- 
Cheers,
Feri.
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux