diff options
author | Ryan Zhang <Ryan.Zhang@quanta.corp-partner.google.com> | 2017-09-01 14:12:57 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-09-11 00:16:58 -0700 |
commit | 30287d4757f754d1feeebf45ea0af914eef60ead (patch) | |
tree | d01d09e949550a7da303c78adba9e4ce0878d78c /include/charge_state_v2.h | |
parent | f3c51cb5bcdf469faf843e76af9d7c468b640960 (diff) | |
download | chrome-ec-30287d4757f754d1feeebf45ea0af914eef60ead.tar.gz |
charger: Add CONFIG_CHARGE_STATE_DEBUG
Servo / Suzy-Q related debugging methods is a big challenge
in factory especially after servo debug header is removed.
Expose some information to OS from EC will do a great help
for massive production.
+ expose charge/battery related state to ectool
1. chg_ctl_mode
2. manual_mode
3. battery_seems_to_be_dead
4. battery_seems_to_be_disconnected
5. battery_was_removed
6. disch_on_ac (learn mode state)
BUG=b:65265543
BRANCH=master
TEST=`ectool chargestate param 0x20000~0x20006 get correct state`
Change-Id: Ic2ed38e2eb9def01be29729fa1fe1959eb73fe43
Signed-off-by: Ryan Zhang <ryan.zhang@quanta.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/646412
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'include/charge_state_v2.h')
-rw-r--r-- | include/charge_state_v2.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/charge_state_v2.h b/include/charge_state_v2.h index e908758371..1c85323a60 100644 --- a/include/charge_state_v2.h +++ b/include/charge_state_v2.h @@ -50,5 +50,16 @@ struct charge_state_data { */ int charge_set_input_current_limit(int ma, int mv); +/* + * Expose charge/battery related state + * + * @param param command to get corresponding data + * @param value the corresponding data + * @return EC_SUCCESS or error + */ +#ifdef CONFIG_CHARGE_STATE_DEBUG +int charge_get_charge_state_debug(int param, uint32_t *value); +#endif /* CONFIG_CHARGE_STATE_DEBUG */ + #endif /* __CROS_EC_CHARGE_STATE_V2_H */ |