summaryrefslogtreecommitdiff
path: root/include/ec_commands.h
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2018-01-08 15:04:39 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-01-10 09:19:05 -0800
commit5ec8f4f49541efa98a606dbf84f0516b66378bef (patch)
treeaf3ba088920cb0820565fab551002b1a1f18baf4 /include/ec_commands.h
parent31e68a035b83acf13b73f3b5b63fbb99540faea9 (diff)
downloadchrome-ec-5ec8f4f49541efa98a606dbf84f0516b66378bef.tar.gz
ec_commands: EC_CMD_BATTERY_GET_DYNAMIC: Clarify the meaning of flags
flags are actually _not_ BATT_FLAG_*, but EC_BATT_FLAG_*. Clarify that in the comment, and add a new EC_BATT_FLAG_INVALID flag to indicate that some of the data may be invalid (dual-battery master needs to know that to make appropriate charging/discharging decision). BRANCH=none BUG=b:65697962 BUG=b:65697620 TEST=Flash hammer and wand, flags make sense. Change-Id: I3c428c850020a29b3f452504b60b52946a04c503 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/859400 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'include/ec_commands.h')
-rw-r--r--include/ec_commands.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h
index 189618731a..20c29a6f7e 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -163,6 +163,8 @@
#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). */
+#define EC_BATT_FLAG_INVALID_DATA 0x20
/* Switch flags at EC_MEMMAP_SWITCHES */
#define EC_SWITCH_LID_OPEN 0x01
@@ -4724,7 +4726,7 @@ struct __ec_align2 ec_response_battery_dynamic_info {
int16_t actual_current; /* Battery current (mA); negative=discharging */
int16_t remaining_capacity; /* Remaining capacity (mAh) */
int16_t full_capacity; /* Capacity (mAh, might change occasionally) */
- int16_t flags; /* Flags, see BATT_FLAG_* in battery.h */
+ int16_t flags; /* Flags, see EC_BATT_FLAG_* */
int16_t desired_voltage; /* Charging voltage desired by battery (mV) */
int16_t desired_current; /* Charging current desired by battery (mA) */
};