diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2020-11-06 14:31:43 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-15 03:55:07 +0000 |
commit | 657e7a7439e0639e3a7fb7484ca0c7fef89188f1 (patch) | |
tree | 23c957d51c58675152b6e704c67b0cc68cff21bc | |
parent | 9f7f2f5e7506136bc7f28ad793310f38cefa18de (diff) | |
download | chrome-ec-657e7a7439e0639e3a7fb7484ca0c7fef89188f1.tar.gz |
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 <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2630143
-rw-r--r-- | zephyr/projects/volteer/include/gpio_map.h | 7 | ||||
-rw-r--r-- | 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 <gpio_signal.h> #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 |