regulator: debug early supply resolving
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>
Fri, 13 Nov 2020 00:20:27 +0000 (01:20 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 13 Nov 2020 16:10:05 +0000 (16:10 +0000)
Help debugging the case when set_machine_constraints() needs to be
repeated.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Tested-by: Ahmad Fatoum <a.fatoum@pengutronix.de> # stpmic1
Link: https://lore.kernel.org/r/f9cba575580369e46661a9278ee6c6a8d8564c2a.1605226675.git.mirq-linux@rere.qmqm.pl
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/core.c

index 2e1ea18221ef9a7faaa3dbdafd5843e951964920..2aa7def7cec6761f5ee53d01b6922b40ab9b0276 100644 (file)
@@ -5299,6 +5299,8 @@ regulator_register(const struct regulator_desc *regulator_desc,
                /* FIXME: this currently triggers a chicken-and-egg problem
                 * when creating -SUPPLY symlink in sysfs to a regulator
                 * that is just being created */
+               rdev_dbg(rdev, "will resolve supply early: %s\n",
+                        rdev->supply_name);
                ret = regulator_resolve_supply(rdev);
                if (!ret)
                        ret = set_machine_constraints(rdev, constraints);