summaryrefslogtreecommitdiff
path: root/include/charge_state_v2.h
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2019-02-25 12:56:40 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-03-12 07:16:03 -0700
commita901dd977d800016bb63311cd0d229f45f4fe3fc (patch)
treeb3c7079e6d6bf4f3f70f98d2bfe8d673117216ef /include/charge_state_v2.h
parent6e539b64778deffeba0fde677e4770d46f949ea3 (diff)
downloadchrome-ec-a901dd977d800016bb63311cd0d229f45f4fe3fc.tar.gz
chgstv2: Allow board to set charge level for shutdown
Currently, BATTERY_LEVEL_SHUTDOWN is statically determined. This patch allows it to be set at runtime. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=b/123727148 BRANCH=nami,strago,coral TEST=Verify Vayne shuts down when soc <= 4 in s0 and s5. Change-Id: I535c451e97ebf6bc735c46d7789d4b56ed82914b Reviewed-on: https://chromium-review.googlesource.com/1512619 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'include/charge_state_v2.h')
-rw-r--r--include/charge_state_v2.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/charge_state_v2.h b/include/charge_state_v2.h
index ec164ea507..800ba4e1cd 100644
--- a/include/charge_state_v2.h
+++ b/include/charge_state_v2.h
@@ -126,5 +126,13 @@ enum critical_shutdown {
enum critical_shutdown board_critical_shutdown_check(
struct charge_state_data *curr);
+/**
+ * Callback to set battery level for shutdown
+ *
+ * A board can implement this to customize shutdown battery level at runtime.
+ *
+ * @return battery level for shutdown
+ */
+uint8_t board_set_battery_level_shutdown(void);
#endif /* __CROS_EC_CHARGE_STATE_V2_H */