Skip to content

Commit

Permalink
regulator: core: Handle probe deferral from DT when resolving supplies
Browse files Browse the repository at this point in the history
When resolving regulator-regulator supplies we ignore probe deferral
returns from regulator_dev_lookup() (such as are generated for DT when
we can see a supply is registered) and just fall back to the dummy
regulator if there are full constraints (as is the case for DT).  This
means that probe deferral is broken for DT systems, fix that by paying
attention to -EPROBE_DEFER return codes like we do -ENODEV.

A further patch will simplify this further, this is a minimal fix for
the specific issue.

Fixes: 9f7e25e (regulator: core: Handle full constraints systems when resolving supplies)
Reported-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mark Brown <broonnie@kernel.org>
Cc: stable@vger.kernel.org
  • Loading branch information
Mark Brown committed Oct 1, 2015
1 parent 16651fc commit 0642312
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1403,6 +1403,10 @@ static int regulator_resolve_supply(struct regulator_dev *rdev)
return 0;
}

/* Did the lookup explicitly defer for us? */
if (ret == -EPROBE_DEFER)
return ret;

if (have_full_constraints()) {
r = dummy_regulator_rdev;
} else {
Expand Down

0 comments on commit 0642312

Please sign in to comment.