]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / battery: fix wrong value of capacity_now reported when fully charged
authorJosef Gajdusek <atx@atx.name>
Tue, 17 Jun 2014 21:15:49 +0000 (23:15 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 7 Jul 2014 21:37:06 +0000 (23:37 +0200)
commit4dfe67111310a5d361ec031cb2f2ba8c2a09794c
treea66ce250f7260efc070edf9ff9512eaf03d44f81
parente7f4a846c42cc513e10668eb3b54734b0e7c60dc
ACPI / battery: fix wrong value of capacity_now reported when fully charged

It seems that some batteries (noticed on DELL JYPJ136) assume
capacity_now = design_capacity when fully charged. This causes
reported capacity to suddenly jump to >full_charge_capacity (and that
means capacity reported to userspace is >100% and incorrect)
values after 99%. This patch detects capacity_now > full_charge_capacity,
notifies userspace (unless it is the known bug where capacity_now ==
design_capacity) and trims the value to full_charge_capacity.

Signed-off-by: Josef Gajdusek <atx@atx.name>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/battery.c