diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2021-09-17 13:44:03 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-09-17 23:51:08 +0000 |
commit | 09bb5e3659aa2802669e9504947175832069daf7 (patch) | |
tree | 87c7219d048de96a8ee89ae66e0ebdb566f91707 | |
parent | 96a9ffe99bdaf600ae6f93ee97ee4534f3b3b170 (diff) | |
download | chrome-ec-09bb5e3659aa2802669e9504947175832069daf7.tar.gz |
zephyr: guybrush: Bringup power button
Enable power button interrupt and module.
Don't have the x86 state machine going yet.
BUG=b:195137794
BRANCH=none
TEST=push the button, see the prints
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I5996a65fe40afd58027452e5b44a60becbbdfa0d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3169199
Reviewed-by: Diana Z <dzigterman@chromium.org>
-rw-r--r-- | zephyr/projects/guybrush/gpio.dts | 1 | ||||
-rw-r--r-- | zephyr/projects/guybrush/include/gpio_map.h | 8 | ||||
-rw-r--r-- | zephyr/projects/guybrush/prj.conf | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/zephyr/projects/guybrush/gpio.dts b/zephyr/projects/guybrush/gpio.dts index 1730c745d7..eea163ad62 100644 --- a/zephyr/projects/guybrush/gpio.dts +++ b/zephyr/projects/guybrush/gpio.dts @@ -18,6 +18,7 @@ mech_pwr_btn_odl { gpios = <&gpiod 2 GPIO_INPUT>; label = "MECH_PWR_BTN_ODL"; + enum-name = "GPIO_POWER_BUTTON_L"; }; ec_pwr_btn_odl { gpios = <&gpio0 1 GPIO_INPUT>; diff --git a/zephyr/projects/guybrush/include/gpio_map.h b/zephyr/projects/guybrush/include/gpio_map.h index 4cabdfce94..668bb5a0ba 100644 --- a/zephyr/projects/guybrush/include/gpio_map.h +++ b/zephyr/projects/guybrush/include/gpio_map.h @@ -24,8 +24,10 @@ * #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) \ - GPIO_INT(GPIO_AC_PRESENT, GPIO_INT_EDGE_BOTH, extpower_interrupt) +#define EC_CROS_GPIO_INTERRUPTS \ + GPIO_INT(GPIO_LID_OPEN, GPIO_INT_EDGE_BOTH, lid_interrupt) \ + GPIO_INT(GPIO_AC_PRESENT, GPIO_INT_EDGE_BOTH, extpower_interrupt) \ + GPIO_INT(GPIO_POWER_BUTTON_L, GPIO_INT_EDGE_BOTH, \ + power_button_interrupt) #endif /* __ZEPHYR_GPIO_MAP_H */ diff --git a/zephyr/projects/guybrush/prj.conf b/zephyr/projects/guybrush/prj.conf index bc4667937a..ef049bcc15 100644 --- a/zephyr/projects/guybrush/prj.conf +++ b/zephyr/projects/guybrush/prj.conf @@ -12,7 +12,7 @@ CONFIG_PLATFORM_EC_VBOOT_EFS2=n CONFIG_AP=n # Power button -CONFIG_PLATFORM_EC_POWER_BUTTON=n +CONFIG_PLATFORM_EC_POWER_BUTTON=y CONFIG_HAS_TASK_POWERBTN=n # External power |