summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Barnaś <mb@semihalf.com>2022-10-13 13:35:43 +0200
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-01-12 15:20:28 +0000
commita223dd3664d5f7feae933a47601b7cbb5e5bae7b (patch)
tree43d4d5c315c9cdcb6d1cb00f57f3ede05f62190c
parentc1e61f332c76f74652985fcdd168a26c75ce3acb (diff)
downloadchrome-ec-a223dd3664d5f7feae933a47601b7cbb5e5bae7b.tar.gz
zephyr: enable Kconfig based on the devicetree - keyboard
This commit adds automatic selection of required Kconfig options based on the device tree nodes for module: keyboard BUG=b:251812799 BRANCH=main TEST=run twister and zcompare script Change-Id: I7efb4ed68b475b62d5a399d0f68d2b9e0f1c1bf4 Signed-off-by: Michał Barnaś <mb@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3982647 Reviewed-by: Yuval Peress <peress@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
-rw-r--r--zephyr/Kconfig.keyboard6
-rw-r--r--zephyr/program/intelrvp/adlrvp/adlrvp_npcx/prj.conf3
-rw-r--r--zephyr/test/drivers/prj.conf1
3 files changed, 7 insertions, 3 deletions
diff --git a/zephyr/Kconfig.keyboard b/zephyr/Kconfig.keyboard
index c425d7af0d..31e7024567 100644
--- a/zephyr/Kconfig.keyboard
+++ b/zephyr/Kconfig.keyboard
@@ -2,11 +2,13 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+CHOSEN_CROS_EC_RAW_KB := cros-ec,raw-kb
+
menuconfig PLATFORM_EC_KEYBOARD
bool "Keyboard support"
- select HAS_TASK_KEYSCAN
- default n if ARCH_POSIX
default y
+ depends on DT_HAS_CROS_KEYSCAN_ENABLED || $(dt_chosen_enabled,$(CHOSEN_CROS_EC_RAW_KB))
+ select HAS_TASK_KEYSCAN
help
Enable compilation of support for scanning a keyboard and providing
the resulting input to the AP over the host interface. This consists
diff --git a/zephyr/program/intelrvp/adlrvp/adlrvp_npcx/prj.conf b/zephyr/program/intelrvp/adlrvp/adlrvp_npcx/prj.conf
index d04abada31..eef09c8277 100644
--- a/zephyr/program/intelrvp/adlrvp/adlrvp_npcx/prj.conf
+++ b/zephyr/program/intelrvp/adlrvp/adlrvp_npcx/prj.conf
@@ -11,3 +11,6 @@ CONFIG_PLATFORM_EC_DEDICATED_CHARGE_PORT=y
# RTC
CONFIG_PLATFORM_EC_RTC=y
+
+# Keyboard
+CONFIG_CROS_KB_RAW_NPCX=y
diff --git a/zephyr/test/drivers/prj.conf b/zephyr/test/drivers/prj.conf
index ac10d89ead..5023cd0b09 100644
--- a/zephyr/test/drivers/prj.conf
+++ b/zephyr/test/drivers/prj.conf
@@ -136,7 +136,6 @@ CONFIG_PLATFORM_EC_VSTORE_SLOT_COUNT=2
CONFIG_WATCHDOG=y
CONFIG_WDT_DISABLE_AT_BOOT=y
CONFIG_PLATFORM_EC_USB_PD_HOST_CMD=y
-CONFIG_PLATFORM_EC_KEYBOARD=y
CONFIG_PLATFORM_EC_KEYBOARD_PROTOCOL_MKBP=y
CONFIG_PLATFORM_EC_MKBP_EVENT=y
CONFIG_PLATFORM_EC_MKBP_USE_GPIO=y