[PATCH master] regulator: bcm2835: fix USB-breaking regression

Ahmad Fatoum a.fatoum at pengutronix.de
Wed Feb 25 03:57:12 PST 2026


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 at 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




More information about the barebox mailing list