mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH master] regulator: bcm2835: fix USB-breaking regression
@ 2026-02-25 11:57 Ahmad Fatoum
  2026-02-25 13:56 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2026-02-25 11:57 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-02-25 13:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-25 11:57 [PATCH master] regulator: bcm2835: fix USB-breaking regression Ahmad Fatoum
2026-02-25 13:56 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox