summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2020-11-06 14:25:18 -0700
committerCommit Bot <commit-bot@chromium.org>2020-11-09 01:49:00 +0000
commit8141e8d7eeeb915f2b529de39570e2efc8b86466 (patch)
tree4fb0433e08c4e1f4297757138e2e3c5e5a0a842d
parentb709dc9aaffe3692dbadd3f4cc3e0891b5daf3f9 (diff)
downloadchrome-ec-8141e8d7eeeb915f2b529de39570e2efc8b86466.tar.gz
zephyr: add option to shim power button
Add an option to shim the power button module. BUG=b:172471187 BRANCH=none TEST=volteer: press power button, observe UART output Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I7dbc705b19bfc312e2707080f22e411ebd7e2c1b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523382
-rw-r--r--zephyr/CMakeLists.txt2
-rw-r--r--zephyr/Kconfig8
2 files changed, 10 insertions, 0 deletions
diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt
index 2fc58241b6..a6a4b75e22 100644
--- a/zephyr/CMakeLists.txt
+++ b/zephyr/CMakeLists.txt
@@ -43,5 +43,7 @@ zephyr_sources_ifdef(CONFIG_PLATFORM_EC_KEYBOARD_PROTOCOL_8042
"${PLATFORM_EC}/common/keyboard_8042.c")
zephyr_sources_ifdef(CONFIG_PLATFORM_EC_LID_SWITCH
"${PLATFORM_EC}/common/lid_switch.c")
+zephyr_sources_ifdef(CONFIG_PLATFORM_EC_POWER_BUTTON
+ "${PLATFORM_EC}/common/power_button.c")
zephyr_sources_ifdef(CONFIG_PLATFORM_EC "${PLATFORM_EC}/common/queue.c")
zephyr_sources_ifdef(CONFIG_PLATFORM_EC_TIMER "${PLATFORM_EC}/common/timer.c")
diff --git a/zephyr/Kconfig b/zephyr/Kconfig
index e675f8eeea..381c2fe30c 100644
--- a/zephyr/Kconfig
+++ b/zephyr/Kconfig
@@ -125,4 +125,12 @@ config PLATFORM_EC_I2C
should make shimming other platform/ec modules which rely on i2c
communication "just work" without requiring any further code changes.
+config PLATFORM_EC_POWER_BUTTON
+ bool "Enable the power button module"
+ depends on PLATFORM_EC_HOSTCMD
+ help
+ Enable shimming the power button implementation and related
+ commands in platform/ec. This requires a GPIO named
+ GPIO_POWER_BUTTON_L in gpio_map.h.
+
endif # PLATFORM_EC