Message ID | 20250223122227.725233-6-ivo.ivanov.ivanov1@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | phy: samsung: add Exynos2200 SNPS eUSB2 driver | expand |
On 25-02-23 14:22:24, Ivaylo Ivanov wrote: > Some platforms initialize their eUSB2 to USB repeater in the previous > stage bootloader and leave it in a working state for linux. Make the > repeater optional in order to allow for reusing that state until > proper repeater drivers are introduced. > > Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> > --- > drivers/phy/phy-snps-eusb2.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/phy/phy-snps-eusb2.c b/drivers/phy/phy-snps-eusb2.c > index 4e5914a76..dcc69c00a 100644 > --- a/drivers/phy/phy-snps-eusb2.c > +++ b/drivers/phy/phy-snps-eusb2.c > @@ -461,7 +461,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); Maybe make it optional based on compatible or something? > if (IS_ERR(phy->repeater)) > return dev_err_probe(dev, PTR_ERR(phy->repeater), > "failed to get repeater\n"); > -- > 2.43.0 >
On 24/02/2025 11:11, Abel Vesa wrote: > On 25-02-23 14:22:24, Ivaylo Ivanov wrote: >> Some platforms initialize their eUSB2 to USB repeater in the previous >> stage bootloader and leave it in a working state for linux. Make the >> repeater optional in order to allow for reusing that state until >> proper repeater drivers are introduced. >> >> Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> >> --- >> drivers/phy/phy-snps-eusb2.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/phy/phy-snps-eusb2.c b/drivers/phy/phy-snps-eusb2.c >> index 4e5914a76..dcc69c00a 100644 >> --- a/drivers/phy/phy-snps-eusb2.c >> +++ b/drivers/phy/phy-snps-eusb2.c >> @@ -461,7 +461,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); > > Maybe make it optional based on compatible or something? It's already optional in the bindings: Documentation/devicetree/bindings/phy/qcom,snps-eusb2-phy.yaml So it's: Acked-by: Neil Armstrong <neil.armstrong@linaro.org> > >> if (IS_ERR(phy->repeater)) >> return dev_err_probe(dev, PTR_ERR(phy->repeater), >> "failed to get repeater\n"); >> -- >> 2.43.0 >> >
diff --git a/drivers/phy/phy-snps-eusb2.c b/drivers/phy/phy-snps-eusb2.c index 4e5914a76..dcc69c00a 100644 --- a/drivers/phy/phy-snps-eusb2.c +++ b/drivers/phy/phy-snps-eusb2.c @@ -461,7 +461,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");
Some platforms initialize their eUSB2 to USB repeater in the previous stage bootloader and leave it in a working state for linux. Make the repeater optional in order to allow for reusing that state until proper repeater drivers are introduced. Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> --- drivers/phy/phy-snps-eusb2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)