diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2021-02-16 14:25:30 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-02-17 20:51:47 +0000 |
commit | bec265cdd46c81f6ef8eb3a563dfbdee98be56d6 (patch) | |
tree | 595d3db9b4b7d2425b23c63238825cd18ff609a0 | |
parent | ef52b799b478d3e7f1f3782ab21abab2ceb62ad8 (diff) | |
download | chrome-ec-bec265cdd46c81f6ef8eb3a563dfbdee98be56d6.tar.gz |
zephyr: delbin: enable lid switch
Enable the lid switch and interrupt.
BUG=b:180410072
BRANCH=none
TEST=open and close lid switch, observe UART prints
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I76455e73a310a6c9ce3e4de8094ca5a2cef516a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2699529
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 302908d564..87ea6b3c54 100644 --- a/zephyr/projects/delbin/include/gpio_map.h +++ b/zephyr/projects/delbin/include/gpio_map.h @@ -12,6 +12,7 @@ #define GPIO_AC_PRESENT NAMED_GPIO(acok_od) #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_WP_L NAMED_GPIO(ec_wp_l) /* @@ -29,6 +30,8 @@ * #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 +#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) #endif /* __ZEPHYR_GPIO_MAP_H */ diff --git a/zephyr/projects/delbin/prj.conf b/zephyr/projects/delbin/prj.conf index 7aba8b6dee..0644eca499 100644 --- a/zephyr/projects/delbin/prj.conf +++ b/zephyr/projects/delbin/prj.conf @@ -11,6 +11,7 @@ CONFIG_ESPI=y CONFIG_PLATFORM_EC_ESPI_VW_SLP_S4=y CONFIG_PLATFORM_EC_EXTPOWER_GPIO=y +CONFIG_PLATFORM_EC_LID_SWITCH=y # TODO(b/180410072): bringup these features CONFIG_PLATFORM_EC_BACKLIGHT_LID=n |