Ferenc Wagner wrote:
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!
Great! Do you want to be memorized by "Tested-by:" line?
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]
Almost all machines produce this... Spec defines 2 GPE blocks as
default, so we complain if only one is used, but that happens quite
often...
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]
This one also could be treated as false positive -- spec says it should
be string, but almost all BIOS implementations return buffer here.
ACPI: Battery Slot [BAT0] (battery present)
I'm willing to provide further info if anybody here is interested.
These issues are already known, and second even has a patch lurking
somewhere in this list... So no action required.
Thanks again,
Alex.
--
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