From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master] regulator: bcm2835: fix USB-breaking regression
Date: Wed, 25 Feb 2026 12:57:12 +0100 [thread overview]
Message-ID: <20260225115713.2047529-1-a.fatoum@pengutronix.de> (raw)
For use in multi-platform configurations, regulator_bcm2835_init() was
gated behind a lookup for "raspberrypi,bcm2835-firmware"-compatible nodes
in the live barebox DT.
The lookup using of_get_compatible_child is erroneous though, because it
only looks at immediate children and doesn't recurse down.
This is unfortunate, when the firmware node is at /soc/firmware.
Fix this by using the correct API.
Fixes: 3ee4d8927379 ("regulator: bcm2835: register only on Raspberry Pi")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
drivers/regulator/bcm2835.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/bcm2835.c b/drivers/regulator/bcm2835.c
index 9d2803baca24..0f54437c64f1 100644
--- a/drivers/regulator/bcm2835.c
+++ b/drivers/regulator/bcm2835.c
@@ -138,7 +138,7 @@ postcore_platform_driver(regulator_bcm2835_driver);
static int regulator_bcm2835_init(void)
{
- if (of_get_compatible_child(of_get_root_node(),
+ if (of_find_compatible_node(NULL, NULL,
"raspberrypi,bcm2835-firmware"))
add_generic_device("regulator-bcm2835", DEVICE_ID_SINGLE, NULL,
0, 0, 0, NULL);
--
2.47.3
next reply other threads:[~2026-02-25 11:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 11:57 Ahmad Fatoum [this message]
2026-02-25 13:56 ` 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=20260225115713.2047529-1-a.fatoum@pengutronix.de \
--to=a.fatoum@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