summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew McRae <amcrae@google.com>2023-01-15 10:29:29 +1100
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-01-16 00:48:29 +0000
commitfcb72f48af1ad9513a2835e4f3e067e055d91b89 (patch)
tree02f3e6d3daee6e11c898b584315acbb714db408a
parent0f52d7a9845beffe639aa7cefa195aaae274aad1 (diff)
downloadchrome-ec-fcb72f48af1ad9513a2835e4f3e067e055d91b89.tar.gz
ap_power: Reduce power signal debug name storage
Use shortened power signal debug names by default, unless the BRINGUP config option is set. This reduces flash space usage by around 520 bytes. BUG=none TEST=Verify on craask BRANCH=none Change-Id: I69bdb74e7b272b9f5b842b888052e04e3e659c01 Signed-off-by: Andrew McRae <amcrae@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4165982 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org>
-rw-r--r--zephyr/subsys/ap_pwrseq/Kconfig11
-rw-r--r--zephyr/subsys/ap_pwrseq/power_signals.c4
2 files changed, 15 insertions, 0 deletions
diff --git a/zephyr/subsys/ap_pwrseq/Kconfig b/zephyr/subsys/ap_pwrseq/Kconfig
index e16637c263..eabb45fab8 100644
--- a/zephyr/subsys/ap_pwrseq/Kconfig
+++ b/zephyr/subsys/ap_pwrseq/Kconfig
@@ -52,6 +52,17 @@ config AP_PWRSEQ_SIGNAL_VW
help
Helper symbol to enable virtual wire (VW) based power sequencing.
+config AP_PWRSEQ_SIGNAL_DEBUG_NAMES
+ bool
+ default y if PLATFORM_EC_BRINGUP
+ help
+ Enable this option to allow display of the more descriptive
+ dbg-name based signal names.
+ Disable this option to just show the enum-name of the signals.
+ Enabled by default during bringup.
+
+ Disabling the option will save around 520 bytes of flash space.
+
config AP_PWRSEQ_AUTOSTART
bool "Start the power sequence thread automatically"
default n
diff --git a/zephyr/subsys/ap_pwrseq/power_signals.c b/zephyr/subsys/ap_pwrseq/power_signals.c
index 67c3328ecb..67101d7128 100644
--- a/zephyr/subsys/ap_pwrseq/power_signals.c
+++ b/zephyr/subsys/ap_pwrseq/power_signals.c
@@ -42,7 +42,11 @@ struct ps_config {
#define PWR_ENUM(id, tag) TAG_PWR_ENUM(tag, PWR_SIGNAL_ENUM(id))
+#ifdef CONFIG_AP_PWRSEQ_SIGNAL_DEBUG_NAMES
#define DBGNAME(id) "(" DT_PROP(id, enum_name) ") " DT_PROP(id, dbg_label)
+#else
+#define DBGNAME(id) DT_PROP(id, enum_name)
+#endif
#define GEN_PS_ENTRY(id, src, tag) \
{ \