From cdb56a9b6aac1be385fdbd282e0a9dd210373939 Mon Sep 17 00:00:00 2001
From: Pascal Paillet
Date: Wed, 2 Oct 2024 16:14:37 +0200
Subject: [PATCH] drivers: regulator: change tree trace level
Change regulator trace level of print tree so that
it can bee seen when it is requested by
xtest --stats --regulators.
Signed-off-by: Pascal Paillet
Acked-by: Gatien Chevallier
---
core/drivers/regulator/regulator.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/core/drivers/regulator/regulator.c b/core/drivers/regulator/regulator.c
index 9abf2588d74..61edba7240e 100644
--- a/core/drivers/regulator/regulator.c
+++ b/core/drivers/regulator/regulator.c
@@ -310,7 +310,8 @@ static TEE_Result regulator_core_cleanup(void)
}
}
- regulator_print_tree();
+ if (TRACE_LEVEL >= TRACE_DEBUG)
+ regulator_print_tree();
return TEE_SUCCESS;
}
@@ -447,7 +448,7 @@ static void __maybe_unused print_regulator(struct regulator *regulator,
if (!msg)
snprintf(msg_end - 4, 4, "...");
- DMSG("%s", msg_buf);
+ IMSG("%s", msg_buf);
}
static void print_tree(void)
@@ -486,10 +487,10 @@ static void print_tree(void)
void regulator_print_tree(void)
{
if (IS_ENABLED(CFG_DRIVERS_REGULATOR_PRINT_TREE) &&
- TRACE_LEVEL >= TRACE_DEBUG) {
- DMSG("Regulator tree summary");
+ TRACE_LEVEL >= TRACE_INFO) {
+ IMSG("Regulator tree summary");
if (SLIST_EMPTY(®ulator_device_list))
- DMSG("-- No registered regulator");
+ IMSG("-- No registered regulator");
else
print_tree();
}