summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>2025-05-04 17:45:23 +0300
committerVinod Koul <vkoul@kernel.org>2025-05-14 11:43:38 +0100
commitd460be705ae599c0cbfc1ee4ba6a41b225525609 (patch)
tree8991d6ce9b4ae00c3ef7f0950fa05aef311a9e4d
parent3983b4e9746da1b6091f1d9083f44ed3f12717cb (diff)
phy: phy-snps-eusb2: make repeater optional
As described in the device tree bindings, it's not necessary for the SNPS eUSB2 phy to be connected to a repeater. In configurations where there are such instances, the driver probing fails and the usb controller does not work. Make the repeater optional to avoid that, which also lets us use the eUSB2 phy when it's connected to a repeater that is not configurable by the kernel (for example it's missing a driver), as long as it has been configured beforehand (usually by the bootloader). Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> Acked-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://lore.kernel.org/r/20250504144527.1723980-7-ivo.ivanov.ivanov1@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r--drivers/phy/phy-snps-eusb2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/phy/phy-snps-eusb2.c b/drivers/phy/phy-snps-eusb2.c
index 1933e8440945..4094786d2737 100644
--- a/drivers/phy/phy-snps-eusb2.c
+++ b/drivers/phy/phy-snps-eusb2.c
@@ -426,7 +426,7 @@ static int snps_eusb2_hsphy_probe(struct platform_device *pdev)
return dev_err_probe(dev, ret,
"failed to get regulator supplies\n");
- phy->repeater = devm_of_phy_get_by_index(dev, np, 0);
+ phy->repeater = devm_of_phy_optional_get(dev, np, 0);
if (IS_ERR(phy->repeater))
return dev_err_probe(dev, PTR_ERR(phy->repeater),
"failed to get repeater\n");