diff options
author | Peter Marheine <pmarheine@chromium.org> | 2020-11-05 13:25:01 +1100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-11-10 07:27:48 +0000 |
commit | 6bc9bb622a31845277d5513fa80fb6766ee68f6c (patch) | |
tree | c3137f9eda02fa7de48c6d222d82f239677ed396 /include/battery.h | |
parent | f445f83ecbe4fb9196debf1b0eee5a3c84fd1013 (diff) | |
download | chrome-ec-6bc9bb622a31845277d5513fa80fb6766ee68f6c.tar.gz |
Add EC_CMD_BATTERY_GET_STATIC v1 for zork
Some zork variants have battery model names that differ only beyond
the 7th character, which cannot be differentiated with the current
limitation of 8 characters per battery string. Introduce a new hostcmd
version that allows longer battery strings and enable it on Zork.
Because allowing longer strings through the host memory map is more
difficult and not required (because getting the full longer string
is mostly only useful for servicing), the host memory map is unchanged.
ectool is updated to use hostcmd (rather than memory map) if the new
command version is available, in order to take advantage of it.
BUG=b:171854783
TEST=ectool battery prints longer strings when supported by the EC;
a hacked EC on morphius can return 11 characters of text.
An EC running older firmware still works with a new ectool.
BRANCH=zork
Change-Id: I63d20d4f690b6945cb1d423aafaf55dafc039211
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2519243
Reviewed-by: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'include/battery.h')
-rw-r--r-- | include/battery.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/battery.h b/include/battery.h index 96fa900d4f..aed1e1c5cf 100644 --- a/include/battery.h +++ b/include/battery.h @@ -19,7 +19,7 @@ enum battery_index { }; #ifdef CONFIG_BATTERY_V2 -extern struct ec_response_battery_static_info +extern struct ec_response_battery_static_info_v1 battery_static[CONFIG_BATTERY_COUNT]; extern struct ec_response_battery_dynamic_info battery_dynamic[CONFIG_BATTERY_COUNT]; |