From: Josef Gajdusek Date: Tue, 17 Jun 2014 21:15:49 +0000 (+0200) Subject: ACPI / battery: fix wrong value of capacity_now reported when fully charged X-Git-Tag: omap-for-v3.17/fixes-against-rc2~317^2~3^4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=232de514379082e7ec431c66c9713a6ef23d5dcb;p=pandora-kernel.git 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 Signed-off-by: Rafael J. Wysocki --- Reading git-diff-tree failed