diff options
author | Wai-Hong Tam <waihong@google.com> | 2021-03-29 15:35:06 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-30 00:23:53 +0000 |
commit | 6434079af8371e54e675d5e9bc985fba4af9c2e9 (patch) | |
tree | b8c765325de5cdfce824351ec629079573fdb110 /zephyr/app/ec | |
parent | 9d5ba6124c98868174894181afdb8b40f7b38f16 (diff) | |
download | chrome-ec-6434079af8371e54e675d5e9bc985fba4af9c2e9.tar.gz |
zephyr: main: initialize the buttons
Initialize the button states and enables the interrupts.
BRANCH=None
BUG=b:182398910
TEST=With the following CLs, tested the volume buttons working.
Change-Id: I4d5b6965915c1103093114c3b01acb965c619a37
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2792693
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'zephyr/app/ec')
-rw-r--r-- | zephyr/app/ec/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/zephyr/app/ec/main.c b/zephyr/app/ec/main.c index 58b2b2a51e..44f272e0d6 100644 --- a/zephyr/app/ec/main.c +++ b/zephyr/app/ec/main.c @@ -6,6 +6,7 @@ #include <sys/printk.h> #include <zephyr.h> +#include "button.h" #include "chipset.h" #include "ec_tasks.h" #include "hooks.h" @@ -47,6 +48,11 @@ void main(void) keyboard_scan_init(); } + if (IS_ENABLED(CONFIG_DEDICATED_RECOVERY_BUTTON) || + IS_ENABLED(CONFIG_VOLUME_BUTTONS)) { + button_init(); + } + if (IS_ENABLED(CONFIG_PLATFORM_EC_ESPI)) { if (zephyr_shim_setup_espi() < 0) { printk("Failed to init eSPI!\n"); |