regulator: print state at boot

Make the initial state of the regulator shown when debugging.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Link: https://lore.kernel.org/r/53c4f3d394d68f0989174f89e3b0882cebbbd787.1601155770.git.mirq-linux@rere.qmqm.pl
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Michał Mirosław 2020-09-26 23:32:40 +02:00 committed by Mark Brown
parent 8d23b0b8fc
commit 99ad5f6ec0
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 7 additions and 2 deletions

View File

@ -1114,7 +1114,12 @@ static void print_constraints(struct regulator_dev *rdev)
count += scnprintf(buf + count, len - count, "standby ");
if (!count)
scnprintf(buf, len, "no parameters");
count = scnprintf(buf, len, "no parameters");
else
--count;
count += scnprintf(buf + count, len - count, ", %s",
_regulator_is_enabled(rdev) ? "enabled" : "disabled");
rdev_dbg(rdev, "%s\n", buf);