]> git.baikalelectronics.ru Git - kernel.git/commit
battery: don't assume we are fully charged when not charging or discharging
authorRichard Hughes <hughsient@gmail.com>
Sun, 25 Jan 2009 15:05:50 +0000 (15:05 +0000)
committerLen Brown <len.brown@intel.com>
Sat, 21 Feb 2009 17:36:19 +0000 (12:36 -0500)
commitf2324b4a6fdc00e35d9163d33be5b1626f187c83
tree04e50eb89f1927198e5de7b1aeeaa3f29816a66b
parenta7e15feb8d4c001eaa0f5a1bc96b0550a7543d52
battery: don't assume we are fully charged when not charging or discharging

On hardware like the T61 it can take a couple of seconds for the battery
to start charging after the power is connected, and we incorrectly tell
userspace that we are fully charged, and then go back to charging.

Only mark a battery as fully charged when the preset charge matches either
the last full charge, or the design charge.

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

Signed-off-by: Richard Hughes <hughsient@gmail.com>
Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/battery.c