regulator: Defer lookup of supply to regulator_get

Instead of resolving regulator supplies during registration move this to
the time of a consumer retrieving a handle. The benefit is that it's
possible for one driver to register regulators with internal
dependencies out of order.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Bjorn Andersson 2015-03-24 18:56:05 -07:00 committed by Mark Brown
parent 5c9e719691
commit 6261b06de5
2 changed files with 57 additions and 36 deletions

View file

@ -367,6 +367,7 @@ struct regulator_dev {
struct device dev;
struct regulation_constraints *constraints;
struct regulator *supply; /* for tree */
const char *supply_name;
struct regmap *regmap;
struct delayed_work disable_work;