Skip to content

Commit

Permalink
drivers: regulator: change tree trace level
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Gatien Chevallier <[email protected]>
  • Loading branch information
Pascal Paillet committed Oct 21, 2024
1 parent d10f101 commit 8dad118
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions core/drivers/regulator/regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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(&regulator_device_list))
DMSG("-- No registered regulator");
IMSG("-- No registered regulator");
else
print_tree();
}
Expand Down
2 changes: 1 addition & 1 deletion core/include/drivers/regulator.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ TEE_Result regulator_supported_voltages(struct regulator *regulator,
struct regulator_voltages_desc **desc,
const int **levels);

/* Print current regulator tree summary to console with debug trace level */
/* Print current regulator tree summary to console with info trace level */
#ifdef CFG_DRIVERS_REGULATOR
void regulator_print_tree(void);
#else
Expand Down

0 comments on commit 8dad118

Please sign in to comment.