]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
phy: qcom: m31-eusb2: Make USB repeater optional
authorWesley Cheng <wesley.cheng@oss.qualcomm.com>
Mon, 2 Mar 2026 08:34:46 +0000 (10:34 +0200)
committerVinod Koul <vkoul@kernel.org>
Sun, 10 May 2026 11:58:58 +0000 (17:28 +0530)
A repeater is not required for the PHY to function. On systems with
multiple PHY instances connected to a multi-port controller, some PHYs
may be unconnected. All PHYs must still probe successfully even without
attached repeaters, otherwise the controller probe fails.

So make it optional.

Signed-off-by: Wesley Cheng <wesley.cheng@oss.qualcomm.com>
[abel.vesa@oss.qualcomm.com: commit re-worded to reflect actual reason]
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://patch.msgid.link/20260302-phy-qcom-m31-eusb2-make-repeater-optional-v2-1-dbf714c72056@oss.qualcomm.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/qualcomm/phy-qcom-m31-eusb2.c

index 68f1ba8fec4ad0f787f9a834a37fa615d239d95d..0bec8657149c985ff1ecd23354857c8b9bc0a523 100644 (file)
@@ -285,7 +285,7 @@ static int m31eusb2_phy_probe(struct platform_device *pdev)
 
        phy_set_drvdata(phy->phy, phy);
 
-       phy->repeater = devm_of_phy_get_by_index(dev, dev->of_node, 0);
+       phy->repeater = devm_phy_optional_get(dev, NULL);
        if (IS_ERR(phy->repeater))
                return dev_err_probe(dev, PTR_ERR(phy->repeater),
                                     "failed to get repeater\n");