[PATCH] platform/raspberrypi: vchiq: register bus at subsys_initcall
From: Martin Wetterwald
Date: Tue Oct 13 2026 - 09:59:16 EST
Since the VCHIQ interface was moved out of staging, its bus is no longer
guaranteed to be registered before its client drivers. bcm2835-audio,
still in drivers/staging, registers at device_initcall level and now
runs first:
Driver 'bcm2835-audio' was unable to register with bus_type
'vchiq-bus' because the bus was not initialized.
Register the bus and the platform driver at subsys_initcall so the bus
exists before any client driver, independently of link order. The
platform driver probe already returns -EPROBE_DEFER while the firmware
is not ready, so probing earlier is safe. When built as modules, this is
equivalent to module_init() and nothing changes.
Tested on Raspberry Pi 1B rev2, 1B+, 2B, 3B and 4B with VCHIQ and
bcm2835-audio both builtin and both as modules.
Fixes: aa125180c673 ("platform/raspberrypi: Destage VCHIQ interface")
Reported-by: Martin Wetterwald <martin@xxxxxxxxxxxxx>
Link: https://lore.kernel.org/r/CAFERDQ0FpdVvA5VJxOyRAE_pgxnPVmFx1tkZio5R272j6Bs4tg@xxxxxxxxxxxxxx/
Closes: https://lore.kernel.org/r/CAFERDQ0FpdVvA5VJxOyRAE_pgxnPVmFx1tkZio5R272j6Bs4tg@xxxxxxxxxxxxxx/
Signed-off-by: Martin Wetterwald <martin@xxxxxxxxxxxxx>
---
drivers/platform/raspberrypi/vchiq-interface/vchiq_arm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/raspberrypi/vchiq-interface/vchiq_arm.c b/drivers/platform/raspberrypi/vchiq-interface/vchiq_arm.c
index e78641703252..d35f5ac5c2e2 100644
--- a/drivers/platform/raspberrypi/vchiq-interface/vchiq_arm.c
+++ b/drivers/platform/raspberrypi/vchiq-interface/vchiq_arm.c
@@ -1462,7 +1462,7 @@ static int __init vchiq_driver_init(void)
return ret;
}
-module_init(vchiq_driver_init);
+subsys_initcall(vchiq_driver_init);
static void __exit vchiq_driver_exit(void)
{
--
2.55.0