Skip to content

Commit 1f8af97

Browse files
claudiubezneapH5
authored andcommitted
reset: rzg2l-usbphy-ctrl: Assign proper of node to the allocated device
The platform device named "rzg2l-usb-vbus-regulator", allocated by the rzg2l-usbphy-ctrl driver, is used to instantiate a regulator driver. This regulator driver is associated with a device tree (DT) node, which is a child of the rzg2l-usbphy-ctrl DT node. The regulator's DT node allows consumer nodes to reference the regulator and configure the regulator as needed. Starting with commit cd7a38c ("regulator: core: do not silently ignore provided init_data") the struct regulator_dev::dev::of_node is no longer populated using of_node_get(config->of_node) if the regulator does not provide init_data. Since the rzg2l-usb-vbus-regulator does not provide init_data, this behaviour causes the of_find_regulator_by_node() function to fails, resulting in errors when attempting to request the regulator. To fix this issue, call device_set_of_node_from_dev() for the "rzg2l-usb-vbus-regulator" platform device. Fixes: 84fbd61 ("regulator: Add Renesas RZ/G2L USB VBUS regulator driver") Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/r/20241119085554.1035881-1-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
1 parent 40384c8 commit 1f8af97

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/reset/reset-rzg2l-usbphy-ctrl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ static int rzg2l_usbphy_ctrl_probe(struct platform_device *pdev)
176176
vdev->dev.parent = dev;
177177
priv->vdev = vdev;
178178

179+
device_set_of_node_from_dev(&vdev->dev, dev);
179180
error = platform_device_add(vdev);
180181
if (error)
181182
goto err_device_put;

0 commit comments

Comments
 (0)