summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDino Li <Dino.Li@ite.com.tw>2021-07-22 12:11:19 +0800
committerCommit Bot <commit-bot@chromium.org>2021-07-23 02:58:35 +0000
commita6c0ab97d9074a4b856e1f3162bef48dc0e51f57 (patch)
treeff956fcc5bcd7f821e1d97cb57792aa5b759c028
parentb00e78a45275dc44245ebf8c91b8209388004d8b (diff)
downloadchrome-ec-a6c0ab97d9074a4b856e1f3162bef48dc0e51f57.tar.gz
zephyr: add support for CONFIG_HOSTCMD_REGULATOR
Add Kconfig option to enable host command of voltage regulator control. BRANCH=none BUG=b:189855648 TEST=zmake testall Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I3cb8a875f8354f4223d31e2d54319f0fb2690b5b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3045033 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
-rw-r--r--zephyr/Kconfig7
-rw-r--r--zephyr/shim/include/config_chip.h5
2 files changed, 12 insertions, 0 deletions
diff --git a/zephyr/Kconfig b/zephyr/Kconfig
index ea437bda40..6351eef2bb 100644
--- a/zephyr/Kconfig
+++ b/zephyr/Kconfig
@@ -376,6 +376,13 @@ config PLATFORM_EC_HOSTCMD_GET_UPTIME_INFO
the EC has been powered up, the number of AP resets, an optional log
of AP-reset events and some flags.
+config PLATFORM_EC_HOSTCMD_REGULATOR
+ bool "Host command of voltage regulator control"
+ help
+ Enable host commands (EC_CMD_REGULATOR_) for controlling voltage
+ regulator. The board should also implement board functions defined in
+ include/regulator.h.
+
config PLATFORM_EC_I2C
bool "I2C shim"
default n if ARCH_POSIX
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index 0cfd9de4d7..2da4af174b 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -779,6 +779,11 @@
#define CONFIG_MT6360_BC12_GPIO
#endif
+#undef CONFIG_HOSTCMD_REGULATOR
+#ifdef CONFIG_PLATFORM_EC_HOSTCMD_REGULATOR
+#define CONFIG_HOSTCMD_REGULATOR
+#endif
+
#undef CONFIG_USB_PD_DUAL_ROLE
#ifdef CONFIG_PLATFORM_EC_USB_PD_DUAL_ROLE
#define CONFIG_USB_PD_DUAL_ROLE