diff options
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/core.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index e70e15c4aa28..eb750a1ed7fe 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -2802,6 +2802,14 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, ret = set_supply(rdev, r); if (ret < 0) goto scrub; + + /* Enable supply if rail is enabled */ + if (rdev->desc->ops->is_enabled && + rdev->desc->ops->is_enabled(rdev)) { + ret = regulator_enable(rdev->supply); + if (ret < 0) + goto scrub; + } } /* add consumers devices */ |