Skip to content
Snippets Groups Projects
user avatar
Josef Gajdusek authored
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: default avatarJosef Gajdusek <atx@atx.name>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
232de514
History
Name Last commit Last update