summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2017-02-19 16:40:21 +0000
committerMark Brown <broonie@kernel.org>2017-02-19 16:40:21 +0000
commit1c35539cd76848bc65d791c6741e3f0195901f5f (patch)
treee171ec520a673323683e0b0bcb84c00734b94e07
parent6b80562d514032502a43b72346153a03fe01c3f6 (diff)
parent3827b64dba27ebadb4faf51f2c91143e01ba1f6d (diff)
Merge remote-tracking branch 'regulator/fix/core' into regulator-linus
-rw-r--r--drivers/regulator/core.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 04baac9a165b..8028835d3967 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -4540,6 +4540,16 @@ static int __init regulator_init_complete(void)
if (of_have_populated_dt())
has_full_constraints = true;
+ /*
+ * Regulators may had failed to resolve their input supplies
+ * when were registered, either because the input supply was
+ * not registered yet or because its parent device was not
+ * bound yet. So attempt to resolve the input supplies for
+ * pending regulators before trying to disable unused ones.
+ */
+ class_for_each_device(&regulator_class, NULL, NULL,
+ regulator_register_resolve_supply);
+
/* If we have a full configuration then disable any regulators
* we have permission to change the status for and which are
* not in use or always_on. This is effectively the default