From 657e7a7439e0639e3a7fb7484ca0c7fef89188f1 Mon Sep 17 00:00:00 2001 From: Jack Rosenthal Date: Fri, 6 Nov 2020 14:31:43 -0700 Subject: volteer: add interrupt and configuration for power button Bring in the platform/ec power button implementation and add the interrupt configuration. BUG=b:172471187 TEST=press power button, observe UART output Cq-Depend: chromium:2523382 Change-Id: I5c60f0962f5eb325844936ba6d27e8e71a288d4a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/zephyr-chrome/+/2523463 Tested-by: Jack Rosenthal Commit-Queue: Jack Rosenthal Reviewed-by: Jett Rink Reviewed-by: Simon Glass Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2630143 --- zephyr/projects/volteer/include/gpio_map.h | 7 +++++-- zephyr/projects/volteer/prj.conf | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/zephyr/projects/volteer/include/gpio_map.h b/zephyr/projects/volteer/include/gpio_map.h index 8ef49c847b..6ed97a42e8 100644 --- a/zephyr/projects/volteer/include/gpio_map.h +++ b/zephyr/projects/volteer/include/gpio_map.h @@ -10,6 +10,7 @@ #include #include "lid_switch.h" +#include "power_button.h" /* * Without https://github.com/zephyrproject-rtos/zephyr/pull/29282, we need @@ -54,7 +55,9 @@ * #define EC_CROS_GPIO_INTERRUPTS \ * GPIO_INT(NAMED_GPIO(h1_ec_pwr_btn_odl), GPIO_INT_EDGE_BOTH, button_print) */ -#define EC_CROS_GPIO_INTERRUPTS \ - GPIO_INT(GPIO_LID_OPEN, GPIO_INT_EDGE_BOTH, lid_interrupt) +#define EC_CROS_GPIO_INTERRUPTS \ + GPIO_INT(GPIO_LID_OPEN, GPIO_INT_EDGE_BOTH, lid_interrupt) \ + GPIO_INT(GPIO_POWER_BUTTON_L, GPIO_INT_EDGE_BOTH, \ + power_button_interrupt) #endif /* __ZEPHYR_GPIO_MAP_H */ diff --git a/zephyr/projects/volteer/prj.conf b/zephyr/projects/volteer/prj.conf index 5ee787f303..64ba01055f 100644 --- a/zephyr/projects/volteer/prj.conf +++ b/zephyr/projects/volteer/prj.conf @@ -10,3 +10,4 @@ CONFIG_PLATFORM_EC=y CONFIG_I2C=y CONFIG_PLATFORM_EC_KEYBOARD=y CONFIG_PLATFORM_EC_LID_SWITCH=y +CONFIG_PLATFORM_EC_POWER_BUTTON=y -- cgit v1.2.1