diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-21 16:59:04 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-12-24 01:37:34 +0000 |
commit | 97a2b7b25b87eb4ff95100ef80519782635b9065 (patch) | |
tree | ff5faf681c79c8ec0fe0fc3c71d37152bdeb38ee /zephyr/shim | |
parent | ee1449f03969c04e255e394ec07a3ebf3bc3d6e8 (diff) | |
download | chrome-ec-97a2b7b25b87eb4ff95100ef80519782635b9065.tar.gz |
zephyr: Enable the charger task
This supports monitoring and charging the battery. Enable it for
Zephyr.
BUG=b:175248556
BRANCH=none
TEST=build and run zephyr on volteer
No visible change, except more code is compiled in
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: I21ff976ba2f5de6e8f069e30028770eda408041a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2600229
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/shim')
-rw-r--r-- | zephyr/shim/include/shimmed_task_id.h | 3 | ||||
-rw-r--r-- | zephyr/shim/include/shimmed_tasks.h | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/zephyr/shim/include/shimmed_task_id.h b/zephyr/shim/include/shimmed_task_id.h index dc7e7f24ff..2918cad216 100644 --- a/zephyr/shim/include/shimmed_task_id.h +++ b/zephyr/shim/include/shimmed_task_id.h @@ -19,6 +19,9 @@ typedef uint8_t task_id_t; */ #ifndef CONFIG_ZTEST #define CROS_EC_TASK_LIST \ + COND_CODE_1(HAS_TASK_CHARGER, \ + (CROS_EC_TASK(CHARGER, charger_task, 0, \ + CONFIG_TASK_CHARGER_STACK_SIZE)), ()) \ COND_CODE_1(HAS_TASK_CHIPSET, \ (CROS_EC_TASK(CHIPSET, chipset_task, 0, \ CONFIG_TASK_CHIPSET_STACK_SIZE)), ()) \ diff --git a/zephyr/shim/include/shimmed_tasks.h b/zephyr/shim/include/shimmed_tasks.h index 3a34e79715..3cb57e866d 100644 --- a/zephyr/shim/include/shimmed_tasks.h +++ b/zephyr/shim/include/shimmed_tasks.h @@ -27,4 +27,8 @@ #define HAS_TASK_POWERBTN 1 #endif /* CONFIG_HAS_TASK_POWERBTN */ +#ifdef CONFIG_HAS_TASK_CHARGER +#define HAS_TASK_CHARGER 1 +#endif /* CONFIG_HAS_TASK_CHARGER */ + #endif /* __CROS_EC_SHIMMED_TASKS_H */ |