summaryrefslogtreecommitdiff
path: root/zephyr/emul/Kconfig.clock_control
diff options
context:
space:
mode:
authorYuval Peress <peress@google.com>2021-10-08 13:03:09 -0600
committerCommit Bot <commit-bot@chromium.org>2021-10-11 17:12:50 +0000
commite3389fa1e36e67fac8261096c3d8c1b56d9e26a4 (patch)
tree647b7e068f2b71703d6245ffa25103095f60c313 /zephyr/emul/Kconfig.clock_control
parent5765523800223bbb60da0e28c179ac59bd344af7 (diff)
downloadchrome-ec-e3389fa1e36e67fac8261096c3d8c1b56d9e26a4.tar.gz
zephyr: test: add an emulated clock to drivers test
BRANCH=none BUG=b:180112248 TEST=zmake configure --test zephyr/test/drivers Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I4a6561c58c7fab33a66ec8fd4a34da38ace6a45c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3213364 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'zephyr/emul/Kconfig.clock_control')
-rw-r--r--zephyr/emul/Kconfig.clock_control22
1 files changed, 22 insertions, 0 deletions
diff --git a/zephyr/emul/Kconfig.clock_control b/zephyr/emul/Kconfig.clock_control
new file mode 100644
index 0000000000..a4dfbce557
--- /dev/null
+++ b/zephyr/emul/Kconfig.clock_control
@@ -0,0 +1,22 @@
+# Copyright 2021 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+DT_COMPAT_CLOCK_CONTROL_EMUL := cros,clock-control-emul
+
+config EMUL_CLOCK_CONTROL
+ bool "Emulated clock control"
+ default $(dt_compat_enabled,$(DT_COMPAT_CLOCK_CONTROL_EMUL))
+ help
+ Enable the emulated clock control module. This module introduces a
+ functioning clock control implementation along with backdoor APIs to
+ verify and override behavior. Emulator API is available in
+ zephyr/include/emul/emul_clock_control.h
+
+if EMUL_CLOCK_CONTROL
+
+module = CLOCK_CONTROL_EMUL
+module-str = clock_control_emul
+source "subsys/logging/Kconfig.template.log_config"
+
+endif # EMUL_CLOCK_CONTROL