diff options
author | Yuval Peress <peress@chromium.org> | 2021-04-06 13:09:12 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-07 06:03:36 +0000 |
commit | 2ea0707aed5b740421956cc9fdf197e1e3d9aecd (patch) | |
tree | 99a16873c34bed0dc0e14c9a59f139f3df4ad4f9 /zephyr/Kconfig.rtc | |
parent | 9c44f9e96f4bd965f05b425d8fb54c535e3eb2b7 (diff) | |
download | chrome-ec-2ea0707aed5b740421956cc9fdf197e1e3d9aecd.tar.gz |
zephyr: kconfig: move rtc configs to separate file
Clean up the root Kconfig for Zephyr by moving sub configs to separate
file (Kconfig.rtc).
BRANCH=none
BUG=none
TEST=zmake testall
Change-Id: I6d9879dd293f944b3029ed1100fc4e406ae8f82c
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2808150
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'zephyr/Kconfig.rtc')
-rw-r--r-- | zephyr/Kconfig.rtc | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/zephyr/Kconfig.rtc b/zephyr/Kconfig.rtc new file mode 100644 index 0000000000..5f36893122 --- /dev/null +++ b/zephyr/Kconfig.rtc @@ -0,0 +1,40 @@ +# 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. + +if PLATFORM_EC_RTC + +config PLATFORM_EC_CONSOLE_CMD_RTC + bool "Console command: rtc" + help + This command allows getting and setting the current RTC value. The + value is in seconds since the Epoch (midnight on 1/1/70). You can + convert this to a human date on the command line with 'date -u -d @n' + where n is the numeric value. To convert a time to seconds, use: + + date -d '1970-01-01 UTC + n seconds' + +config PLATFORM_EC_CONSOLE_CMD_RTC_ALARM + bool "Console command: rtc_alarm" + depends on PLATFORM_EC_CONSOLE_CMD_RTC + help + This command supports setting a real-time-clock (RTC) alarm that + causes an interrupt when the timer reaches that point. To set the + alarm: + + rtc <sec> [<usec>] + + where: + <sec> is the number of seconds since the epoch + <usec> is the optional number of microseconds (fractional seconds) + +config PLATFORM_EC_HOSTCMD_RTC + bool "Host command: EC_CMD_RTC_GET_VALUE etc." + depends on PLATFORM_EC_HOSTCMD + help + Enables support for EC_CMD_RTC_GET_VALUE, EC_CMD_RTC_SET_VALUE, + EC_CMD_RTC_GET_ALARM and EC_CMD_RTC_SET_ALARM which colectively allow + the AP to control the EC's real-time-clock. The AP typically makes + use of the EC's RTC to avoid needing a discrete RTC chip on the board. + +endif # PLATFORM_EC_RTC |