summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-02-28 15:56:12 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2022-03-01 09:48:31 +0100
commit994329b0b26d31b8fd9984c2205534ee4c26508b (patch)
treea85092b44a481cfe2f47d953d79b9938ef112ad8
parent8ab6dbdaa72f1533e3f80608932bc0b52f83a451 (diff)
downloadbarebox-994329b0b26d31b8fd9984c2205534ee4c26508b.tar.gz
barebox-994329b0b26d31b8fd9984c2205534ee4c26508b.tar.xz
regulator: fix enabling of always-on regulators
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@pengutronix.de> Link: https://lore.barebox.org/20220228145612.867073-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/regulator/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index b2e5f8caa2..a4674424b7 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;