summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2021-03-10 15:37:03 -0700
committerCommit Bot <commit-bot@chromium.org>2021-03-11 23:43:40 +0000
commitc4648b3bc53ce20d648a6ef67422344a8b682e13 (patch)
treeba4fb7d67d4d2a6256dcae387d705ec7d06f98f5
parentc534e94e5fb2f5021f00dd034ccf9ab14ed84454 (diff)
downloadchrome-ec-c4648b3bc53ce20d648a6ef67422344a8b682e13.tar.gz
zephyr: lazor: enable power button
Enable the power button module and interrupt. BUG=b:182398910 BRANCH=none TEST=push power button, see UART print Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I7e3d1cdf30e49d5179e746c941b51772f50b5c80 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2749426 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r--zephyr/projects/trogdor/lazor/include/gpio_map.h7
-rw-r--r--zephyr/projects/trogdor/lazor/prj.conf1
2 files changed, 6 insertions, 2 deletions
diff --git a/zephyr/projects/trogdor/lazor/include/gpio_map.h b/zephyr/projects/trogdor/lazor/include/gpio_map.h
index 35d92eb9fa..d29e4c93d2 100644
--- a/zephyr/projects/trogdor/lazor/include/gpio_map.h
+++ b/zephyr/projects/trogdor/lazor/include/gpio_map.h
@@ -11,6 +11,7 @@
#define GPIO_ENTERING_RW NAMED_GPIO(ec_entering_rw)
#define GPIO_LID_OPEN NAMED_GPIO(lid_open_ec)
+#define GPIO_POWER_BUTTON_L NAMED_GPIO(ec_pwr_btn_odl)
#define GPIO_WP_L NAMED_GPIO(ec_wp_odl)
/*
@@ -28,7 +29,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/trogdor/lazor/prj.conf b/zephyr/projects/trogdor/lazor/prj.conf
index 9c0037712a..4c159692a9 100644
--- a/zephyr/projects/trogdor/lazor/prj.conf
+++ b/zephyr/projects/trogdor/lazor/prj.conf
@@ -7,6 +7,7 @@ CONFIG_SHIMMED_TASKS=y
CONFIG_PLATFORM_EC=y
CONFIG_PLATFORM_EC_BRINGUP=y
CONFIG_PLATFORM_EC_LID_SWITCH=y
+CONFIG_PLATFORM_EC_POWER_BUTTON=y
# Trogdor family does not use EFS2 (toggled by PLATFORM_EC_VBOOT).
CONFIG_PLATFORM_EC_VBOOT=n