[PATCH master] regulator: fix enabling of always-on regulators
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Feb 28 06:56:12 PST 2022
We need to enable on either case, not if both are given.
Fixes: 9f542bd73948 ("regulator: respect "regulator-always-on" property")
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
drivers/regulator/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 997b986d5f07..ecee4203187c 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -130,7 +130,7 @@ static struct regulator_internal * __regulator_register(struct regulator_dev *rd
if (name)
ri->name = xstrdup(name);
- if (rd->boot_on && rd->always_on) {
+ if (rd->boot_on || rd->always_on) {
ret = regulator_enable_internal(ri);
if (ret && ret != -ENOSYS)
goto err;
--
2.30.2
More information about the barebox
mailing list