diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2020-11-06 11:58:59 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-11-07 10:41:21 +0000 |
commit | 4e85dbb7bbac0e7f482a42c94cfb6d0f639da913 (patch) | |
tree | 2afc1d27a5f632b0aefa0e92b600f977387105eb | |
parent | 644fda4eeac6bd70542ea3a3d45940e749c04d0f (diff) | |
download | chrome-ec-4e85dbb7bbac0e7f482a42c94cfb6d0f639da913.tar.gz |
zephyr: shim the lid switch
Enable an option to compile common/lid_switch.c.
BUG=b:172652088
BRANCH=none
TEST=On volteer, with zephyr-chrome CL, observe lid{open,close,state}
console commands, gpio interrupt works
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Ica5b8abd1b0e0d9666ded9bd27927562ee36b80c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523456
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
-rw-r--r-- | zephyr/CMakeLists.txt | 2 | ||||
-rw-r--r-- | zephyr/Kconfig | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index c9aa8bf115..49b08c16dd 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -38,5 +38,7 @@ zephyr_sources_ifdef(CONFIG_PLATFORM_EC "${PLATFORM_EC}/common/base32.c" zephyr_sources_ifdef(CONFIG_SHELL "${PLATFORM_EC}/common/gpio_commands.c") 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 "${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 73e1a0feec..827a3b1d70 100644 --- a/zephyr/Kconfig +++ b/zephyr/Kconfig @@ -102,4 +102,11 @@ config PLATFORM_EC_HOOKS hook_call_deferred to Zephyr's work queues, and a compatible DECLARE_HOOK implementation. +config PLATFORM_EC_LID_SWITCH + bool "Enable the lid switch module" + help + Enable shimming the lid switch implementation and related + commands in platform/ec. This requires a GPIO named + GPIO_LID_OPEN to be defined in gpio_map.h. + endif # PLATFORM_EC |