From 994329b0b26d31b8fd9984c2205534ee4c26508b Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Mon, 28 Feb 2022 15:56:12 +0100 Subject: 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 Link: https://lore.barebox.org/20220228145612.867073-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer --- drivers/regulator/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/regulator/core.c') 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; -- cgit v1.2.3