Skip to content

Commit 47b412c

Browse files
jhovoldvinodkoul
authored andcommitted
phy: qcom-qmp-combo: fix type-c switch registration
Due to a long-standing issue in driver core, drivers may not probe defer after having registered child devices to avoid triggering a probe deferral loop (see fbc35b4 ("Add documentation on meaning of -EPROBE_DEFER")). Move registration of the typec switch to after looking up clocks and other resources. Note that PHY creation can in theory also trigger a probe deferral when a 'phy' supply is used. This does not seem to affect the QMP PHY driver but the PHY subsystem should be reworked to address this (i.e. by separating initialisation and registration of the PHY). Fixes: 2851117 ("phy: qcom-qmp-combo: Introduce orientation switching") Cc: [email protected] # 6.5 Cc: Bjorn Andersson <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Acked-by: Vinod Koul <[email protected]> Acked-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent d2d7b8e commit 47b412c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/phy/qualcomm/phy-qcom-qmp-combo.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3562,10 +3562,6 @@ static int qmp_combo_probe(struct platform_device *pdev)
35623562
if (ret)
35633563
return ret;
35643564

3565-
ret = qmp_combo_typec_switch_register(qmp);
3566-
if (ret)
3567-
return ret;
3568-
35693565
/* Check for legacy binding with child nodes. */
35703566
usb_np = of_get_child_by_name(dev->of_node, "usb3-phy");
35713567
if (usb_np) {
@@ -3585,6 +3581,10 @@ static int qmp_combo_probe(struct platform_device *pdev)
35853581
if (ret)
35863582
goto err_node_put;
35873583

3584+
ret = qmp_combo_typec_switch_register(qmp);
3585+
if (ret)
3586+
goto err_node_put;
3587+
35883588
ret = drm_aux_bridge_register(dev);
35893589
if (ret)
35903590
goto err_node_put;

0 commit comments

Comments
 (0)