From e470e5a7f05143646685ed1bb0b73076fc2682ba Mon Sep 17 00:00:00 2001 From: Daisuke Nojiri Date: Thu, 1 Nov 2018 12:46:33 -0700 Subject: Battery: Apply full factor to full capacity This change introduces CONFIG_BATT_HOST_FULL_FACTOR. If it's 100, meaning no compensation, we multiply full capacity by CONFIG_BATT_FULL_FACTOR. This makes the rest of the system see consistent charge percentage behavior. Signed-off-by: Daisuke Nojiri BUG=b:109954565,b:80270446 BRANCH=none TEST=Verify display percentages printed by EC and power_supply_info move up synchronously on charge and turns to full at the same time. Change-Id: Ifb27c802b0cf04195ac5b426c13f9476189feb75 Reviewed-on: https://chromium-review.googlesource.com/1313468 Commit-Ready: ChromeOS CL Exonerator Bot Tested-by: Daisuke Nojiri Reviewed-by: Jett Rink --- include/config.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'include') diff --git a/include/config.h b/include/config.h index 6f283416e4..4051703f99 100644 --- a/include/config.h +++ b/include/config.h @@ -425,12 +425,9 @@ * Some batteries don't update full capacity timely or don't update it at all. * On such systems, compensation is required to guarantee remaining_capacity * will be equal to full_capacity eventually. This used to be done in ACPI. - * - * This number should match those used by powerd to evenly scale battery - * reading from 0 to 100%. These are default values, which are effective until - * the host boots. */ #define CONFIG_BATT_FULL_FACTOR 98 +#define CONFIG_BATT_HOST_FULL_FACTOR 94 #define CONFIG_BATT_HOST_SHUTDOWN_PERCENTAGE 4 /* -- cgit v1.2.1