[PATCH] regulator: renesas-usb-vbus-regulator: Fix module autoloading

From: Nhat Tran

Date: Mon Nov 16 2026 - 03:44:44 EST


The driver can be built as a module, and Kconfig makes it a module by
default when RESET_RZG2L_USBPHY_CTRL is a module. However the driver has
neither a platform_device_id table nor a MODULE_ALIAS(), so no module
alias is generated and udev never loads it.

The device is created by the rzg2l-usbphy-ctrl reset driver with
platform_device_set_of_node_from_dev(), which marks the OF node as
reused, so the uevent carries the platform modalias
"platform:rzg2l-usb-vbus-regulator" rather than an OF one.

Without the regulator, the USB0 PHY waits forever for its vbus supply,
and the whole USB0 port stays unusable. On an RZ/G2L SMARC EVK:

# cat /sys/kernel/debug/devices_deferred
11c50100.usb platform: supplier 11c50200.usb-phy not ready
11c50000.usb platform: supplier 11c50200.usb-phy not ready
11c60000.usb platform: supplier 11c50200.usb-phy not ready
11c50200.usb-phy

Loading the module by hand makes all of them probe.

Add a platform_device_id table and export it with MODULE_DEVICE_TABLE()
so that the module is loaded automatically.

Fixes: 84fbd6198766 ("regulator: Add Renesas RZ/G2L USB VBUS regulator driver")
Signed-off-by: Nhat Tran <nhat.tranminhk2@xxxxxxxxx>
---
drivers/regulator/renesas-usb-vbus-regulator.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/drivers/regulator/renesas-usb-vbus-regulator.c b/drivers/regulator/renesas-usb-vbus-regulator.c
index 9ba791bd72ec..65a58bf5ffa4 100644
--- a/drivers/regulator/renesas-usb-vbus-regulator.c
+++ b/drivers/regulator/renesas-usb-vbus-regulator.c
@@ -55,12 +55,19 @@ static int rzg2l_usb_vbus_regulator_probe(struct platform_device *pdev)
return 0;
}

+static const struct platform_device_id rzg2l_usb_vbus_regulator_ids[] = {
+ { .name = "rzg2l-usb-vbus-regulator" },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(platform, rzg2l_usb_vbus_regulator_ids);
+
static struct platform_driver rzg2l_usb_vbus_regulator_driver = {
.probe = rzg2l_usb_vbus_regulator_probe,
.driver = {
.name = "rzg2l-usb-vbus-regulator",
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
},
+ .id_table = rzg2l_usb_vbus_regulator_ids,
};
module_platform_driver(rzg2l_usb_vbus_regulator_driver);

--
2.25.1