From: Marco Felsch <m.felsch@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] regulator: fixed: take regulator-boot-on into account
Date: Wed, 29 Jan 2020 12:38:23 +0100 [thread overview]
Message-ID: <20200129113823.8304-1-m.felsch@pengutronix.de> (raw)
There are regulators which are turned on by default (hw-design) and
shouldn't be disabled during the boot. Upstream uses the
regulator-boot-on dt-property for it:
8<--------------------------------------------------
regulator-boot-on:
description: bootloader/firmware enabled regulator
type: boolean
8<--------------------------------------------------
The difference between boot-on and always-on is the linux suspend
handling. Regulators marked as boot-on can be disabled during suspend.
This case isn't interesting for barebox so we can mark those as
always-on too.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
drivers/regulator/fixed.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index cb5d785817..78b8290ff2 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -86,7 +86,8 @@ static int regulator_fixed_probe(struct device_d *dev)
fix->rdesc.ops = &fixed_ops;
fix->rdev.desc = &fix->rdesc;
- if (of_find_property(dev->device_node, "regulator-always-on", NULL)) {
+ if (of_find_property(dev->device_node, "regulator-always-on", NULL) ||
+ of_find_property(dev->device_node, "regulator-boot-on", NULL)) {
fix->always_on = 1;
regulator_fixed_enable(&fix->rdev);
}
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2020-01-29 11:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-29 11:38 Marco Felsch [this message]
2020-02-03 8:12 ` 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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200129113823.8304-1-m.felsch@pengutronix.de \
--to=m.felsch@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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