mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <>
Cc:, Ahmad Fatoum <>
Subject: [PATCH master] regulator: fix enabling of always-on regulators
Date: Mon, 28 Feb 2022 15:56:12 +0100	[thread overview]
Message-ID: <> (raw)

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 <>
 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;

barebox mailing list

             reply	other threads:[~2022-02-28 14:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-28 14:56 Ahmad Fatoum [this message]
2022-03-01  8:48 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox