diff options
author | Aseda Aboagye <aaboagye@google.com> | 2017-11-01 09:59:08 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-11-01 16:47:21 -0700 |
commit | 7bf1696711c37d829b4663fa4dfce5e35b4d237e (patch) | |
tree | ead615c45021e6f986c7d4bcb744e3c4c53beaf4 /include/charge_state.h | |
parent | 030e44309461552a18427ef1924e193bfc660106 (diff) | |
download | chrome-ec-7bf1696711c37d829b4663fa4dfce5e35b4d237e.tar.gz |
chg_ramp: Add charge_is_consuming_full_input_current().
Most boards had an identical implementation for this function,
previously known as board_is_consuming_full_charge(). To reduce copy
paste, let's just move it to common code. Boards that charge ramp
without a battery will have to define their own implementation, but
there probably won't be any boards like that in the near future.
BUG=None
BRANCH=None
TEST=make -j buildall
Change-Id: Ic99a378ac26dfd35d7d718bf9376eacfa8609166
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/748919
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'include/charge_state.h')
-rw-r--r-- | include/charge_state.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/charge_state.h b/include/charge_state.h index 0cf70c22de..fb1a41527a 100644 --- a/include/charge_state.h +++ b/include/charge_state.h @@ -92,6 +92,16 @@ uint32_t charge_get_flags(void); int charge_get_percent(void); /** + * Check if board is consuming full input current + * + * This returns true if the battery charge percentage is between 2% and 95% + * exclusive. + * + * @return Board is consuming full input current + */ +int charge_is_consuming_full_input_current(void); + +/** * Return non-zero if discharging and battery so low we should shut down. */ int charge_want_shutdown(void); |