diff options
author | Alec Berg <alecaberg@chromium.org> | 2015-02-01 12:55:39 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-02-03 05:39:18 +0000 |
commit | 0cfc6a087f103dfa1a03d5e6671844ddd4ac8c14 (patch) | |
tree | aa3d87439408be8b28203f08d453b3e29d3baed6 /include | |
parent | c9adf202e3b1d50bda52fda9cb2f9cff918d64b4 (diff) | |
download | chrome-ec-0cfc6a087f103dfa1a03d5e6671844ddd4ac8c14.tar.gz |
hooks: add hook for battery state of charge change
Add hook for battery state of charge change. Hook will be used
to cleanup the samus charging workarounds to follow.
BUG=none
BRANCH=samus
TEST=make -j buildall
Change-Id: I99cbb8264783802139cac689804b056623063695
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/245252
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/hooks.h | 7 | ||||
-rw-r--r-- | include/link_defs.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/hooks.h b/include/hooks.h index a4a518354a..15ab778c5b 100644 --- a/include/hooks.h +++ b/include/hooks.h @@ -139,6 +139,13 @@ enum hook_type { HOOK_CHARGE_STATE_CHANGE, /* + * Battery state of charge changed + * + * Hook routines are called from the charger task. + */ + HOOK_BATTERY_SOC_CHANGE, + + /* * Periodic tick, every HOOK_TICK_INTERVAL. * * Hook routines will be called from the TICK task. diff --git a/include/link_defs.h b/include/link_defs.h index 67ae9779d2..cfb7f0ced2 100644 --- a/include/link_defs.h +++ b/include/link_defs.h @@ -46,6 +46,8 @@ extern const struct hook_data __hooks_pwrbtn_change[]; extern const struct hook_data __hooks_pwrbtn_change_end[]; extern const struct hook_data __hooks_charge_state_change[]; extern const struct hook_data __hooks_charge_state_change_end[]; +extern const struct hook_data __hooks_battery_soc_change[]; +extern const struct hook_data __hooks_battery_soc_change_end[]; extern const struct hook_data __hooks_tick[]; extern const struct hook_data __hooks_tick_end[]; extern const struct hook_data __hooks_second[]; |