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 <p.paillet@foss.st.com>
Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
  • Loading branch information
Pascal Paillet committed Oct 21, 2024
1 parent 335588e commit cdb56a9
Showing 1 changed file with 6 additions and 5 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

0 comments on commit cdb56a9

Please sign in to comment.