* [PATCH master] regulator: fix enabling of always-on regulators
@ 2022-02-28 14:56 Ahmad Fatoum
2022-03-01 8:48 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2022-02-28 14:56 UTC (permalink / raw)
To: barebox; +Cc: ejo, Ahmad Fatoum
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>
---
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;
--
2.30.2
_______________________________________________
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 master] regulator: fix enabling of always-on regulators
2022-02-28 14:56 [PATCH master] regulator: fix enabling of always-on regulators Ahmad Fatoum
@ 2022-03-01 8:48 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2022-03-01 8:48 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox, ejo
On Mon, Feb 28, 2022 at 03:56:12PM +0100, Ahmad Fatoum wrote:
> 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>
> ---
> drivers/regulator/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks
Sascha
>
> 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;
> --
> 2.30.2
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
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:[~2022-03-01 8:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-28 14:56 [PATCH master] regulator: fix enabling of always-on regulators Ahmad Fatoum
2022-03-01 8:48 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox