From b0afd60f2f83ea11b7b940d444ffbe6a74f43cf3 Mon Sep 17 00:00:00 2001 From: james_chao Date: Sat, 5 Mar 2016 02:28:38 +0800 Subject: battery: add CONFIG_BATTERY_LEVEL_NEAR_FULL Add CONFIG_BATTERY_LEVEL_NEAR_FULL and set default value 97% BUG=none BRANCH=remotes/cros/firmware-strago-7287.B TEST=make buildall -j Change-Id: I9f4a424fb6df2f2d7990b7ac98bc0e187e587699 Signed-off-by: james_chao Reviewed-on: https://chromium-review.googlesource.com/330491 Reviewed-by: Shawn N (cherry picked from commit d04d8931852c0dbdcf094d16e3394b757efbdcee) Reviewed-on: https://chromium-review.googlesource.com/330315 --- include/battery.h | 2 +- include/config.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/battery.h b/include/battery.h index 14c7f57ad4..dcf05592a6 100644 --- a/include/battery.h +++ b/include/battery.h @@ -14,7 +14,7 @@ #define BATTERY_LEVEL_FULL 100 /* Tell host we're charged when battery level >= this percentage */ -#define BATTERY_LEVEL_NEAR_FULL 97 +#define BATTERY_LEVEL_NEAR_FULL CONFIG_BATTERY_LEVEL_NEAR_FULL /* * Send battery-low host event when discharging and battery level <= this level diff --git a/include/config.h b/include/config.h index 7eff5078f8..ab0896775a 100644 --- a/include/config.h +++ b/include/config.h @@ -191,6 +191,11 @@ */ #undef CONFIG_BATTERY_REVIVE_DISCONNECT +/* + * Define the battery level near full + */ +#define CONFIG_BATTERY_LEVEL_NEAR_FULL 97 + /* Boot header storage offset. */ #undef CONFIG_BOOT_HEADER_STORAGE_OFF -- cgit v1.2.1