diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2021-02-16 14:39:03 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-02-18 01:15:50 +0000 |
commit | 95a0ec812979ae829b5cf1adb7f722224db76bf7 (patch) | |
tree | cb956c05cd35c8789a80937347ee0b50a3a3e13e | |
parent | c8090e9f301c5a5313327f869f30db5dd26f7750 (diff) | |
download | chrome-ec-95a0ec812979ae829b5cf1adb7f722224db76bf7.tar.gz |
zephyr: delbin: enable power button module
Enable power button code and interrupt.
BUG=b:180410072
BRANCH=none
TEST=press power button, observe UART prints
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I83d7ab66bd7448d2e87e21dce9281c7b1246ca87
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2699531
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | zephyr/projects/delbin/include/gpio_map.h | 5 | ||||
-rw-r--r-- | zephyr/projects/delbin/prj.conf | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/zephyr/projects/delbin/include/gpio_map.h b/zephyr/projects/delbin/include/gpio_map.h index 87ea6b3c54..528a9e5713 100644 --- a/zephyr/projects/delbin/include/gpio_map.h +++ b/zephyr/projects/delbin/include/gpio_map.h @@ -13,6 +13,7 @@ #define GPIO_EC_PCH_WAKE_ODL NAMED_GPIO(ec_pch_wake_odl) #define GPIO_ENTERING_RW NAMED_GPIO(ec_entering_rw) #define GPIO_LID_OPEN NAMED_GPIO(ec_lid_open) +#define GPIO_POWER_BUTTON_L NAMED_GPIO(h1_ec_pwr_btn_odl) #define GPIO_WP_L NAMED_GPIO(ec_wp_l) /* @@ -32,6 +33,8 @@ */ #define EC_CROS_GPIO_INTERRUPTS \ GPIO_INT(GPIO_AC_PRESENT, GPIO_INT_EDGE_BOTH, extpower_interrupt) \ - GPIO_INT(GPIO_LID_OPEN, GPIO_INT_EDGE_BOTH, lid_interrupt) + 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/delbin/prj.conf b/zephyr/projects/delbin/prj.conf index 0644eca499..545ef3c136 100644 --- a/zephyr/projects/delbin/prj.conf +++ b/zephyr/projects/delbin/prj.conf @@ -12,6 +12,7 @@ CONFIG_PLATFORM_EC_ESPI_VW_SLP_S4=y CONFIG_PLATFORM_EC_EXTPOWER_GPIO=y CONFIG_PLATFORM_EC_LID_SWITCH=y +CONFIG_PLATFORM_EC_POWER_BUTTON=y # TODO(b/180410072): bringup these features CONFIG_PLATFORM_EC_BACKLIGHT_LID=n |