|
@@ -2802,6 +2802,14 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
|
|
ret = set_supply(rdev, r);
|
|
ret = set_supply(rdev, r);
|
|
if (ret < 0)
|
|
if (ret < 0)
|
|
goto scrub;
|
|
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 */
|
|
/* add consumers devices */
|