aboutsummaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorMark Brown2015-07-14 11:17:26 +0100
committerMark Brown2015-07-15 12:19:44 +0100
commit9f7e25edb1575a6d2363dc003f9cc09d840657e2 (patch)
tree30ca2a8ed996e09d588d3ca8ca0a55a9a1f3e610 /drivers/regulator
parentd770e558e21961ad6cfdf0ff7df0eb5d7d4f0754 (diff)
regulator: core: Handle full constraints systems when resolving supplies
When resolving device supplies if we fail to look up the regulator we substitute in the dummy supply instead if the system has fully specified constraints. When resolving supplies for regulators we do not have the equivalent code and instead just directly use the regulator_dev_lookup() result causing spurious failures. This does not affect DT systems since we are able to detect missing mappings directly as part of regulator_dev_lookup() and so have appropriate handling in the DT specific code. Reported-by: Christian Hartmann <cornogle@googlemail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/core.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index c9f72019bd68..bb8528dfad8c 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1381,9 +1381,13 @@ static int regulator_resolve_supply(struct regulator_dev *rdev)
}
if (!r) {
- dev_err(dev, "Failed to resolve %s-supply for %s\n",
- rdev->supply_name, rdev->desc->name);
- return -EPROBE_DEFER;
+ if (have_full_constraints()) {
+ r = dummy_regulator_rdev;
+ } else {
+ dev_err(dev, "Failed to resolve %s-supply for %s\n",
+ rdev->supply_name, rdev->desc->name);
+ return -EPROBE_DEFER;
+ }
}
/* Recursively resolve the supply of the supply */