zephyr: main: initialize the buttons
Initialize the button states and enables the interrupts.
BRANCH=None
TEST=With the following CLs, tested the volume buttons working.
#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");
