From e5c6f97d1a4a1fa5ad17c2bab4e316a47b8def9a Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Fri, 8 Sep 2017 12:05:33 +0800 Subject: charge_state_v2: Basic dual-battery charging algorithm First version of the algorithm, some TODOs are left in the code but this, generally, works reasonably well. When charging, we allocate input current in this general order: - Base system (fixed, low, number) - Lid system (based on PSYS) - Lid battery (estimating how much current the battery actually requires) - Base battery (similar estimation) - Provide everything else to lid When discharging, we generally: - First discharge the base battery - Then discharge the lid battery BRANCH=none BUG=b:71881017 TEST=Flash lux and wand, EC-EC communication works, adapter power is split in a sensible way, and discharging works fine. Change-Id: I8a4f87963962fc5466b2fedf1347eb4dadd35740 Signed-off-by: Nicolas Boichat Reviewed-on: https://chromium-review.googlesource.com/659460 Commit-Ready: ChromeOS CL Exonerator Bot Reviewed-by: Randall Spangler --- include/ec_commands.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/ec_commands.h') diff --git a/include/ec_commands.h b/include/ec_commands.h index 10ac439215..00c6dad089 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -163,7 +163,7 @@ #define EC_BATT_FLAG_DISCHARGING 0x04 #define EC_BATT_FLAG_CHARGING 0x08 #define EC_BATT_FLAG_LEVEL_CRITICAL 0x10 -/* Set if some of the dynamic data is invalid (or outdated). */ +/* Set if some of the static/dynamic data is invalid (or outdated). */ #define EC_BATT_FLAG_INVALID_DATA 0x20 /* Switch flags at EC_MEMMAP_SWITCHES */ -- cgit v1.2.1