* [PATCH] regulator: fixed: take regulator-boot-on into account
@ 2020-01-29 11:38 Marco Felsch
2020-02-03 8:12 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Marco Felsch @ 2020-01-29 11:38 UTC (permalink / raw)
To: barebox
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: fixed: take regulator-boot-on into account
2020-01-29 11:38 [PATCH] regulator: fixed: take regulator-boot-on into account Marco Felsch
@ 2020-02-03 8:12 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2020-02-03 8:12 UTC (permalink / raw)
To: Marco Felsch; +Cc: barebox
On Wed, Jan 29, 2020 at 12:38:23PM +0100, Marco Felsch wrote:
> 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(-)
Applied, thanks
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-03 8:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-29 11:38 [PATCH] regulator: fixed: take regulator-boot-on into account Marco Felsch
2020-02-03 8:12 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox