diff --git a/target/linux/ath79/patches-6.6/700-phy-add-ath79-usb-phys.patch b/target/linux/ath79/patches-6.6/700-phy-add-ath79-usb-phys.patch index b50e4b51a45..1c1b2f2ca1b 100644 --- a/target/linux/ath79/patches-6.6/700-phy-add-ath79-usb-phys.patch +++ b/target/linux/ath79/patches-6.6/700-phy-add-ath79-usb-phys.patch @@ -51,7 +51,7 @@ Signed-off-by: John Crispin obj-$(CONFIG_PHY_LPC18XX_USB_OTG) += phy-lpc18xx-usb-otg.o --- /dev/null +++ b/drivers/phy/phy-ar7100-usb.c -@@ -0,0 +1,127 @@ +@@ -0,0 +1,117 @@ +/* + * Copyright (C) 2018 John Crispin + * @@ -144,16 +144,6 @@ Signed-off-by: John Crispin + if (IS_ERR(priv->phy)) + return dev_err_probe(&pdev->dev, PTR_ERR(priv->phy), "failed to create PHY"); + -+ priv->gpio = of_get_named_gpio(pdev->dev.of_node, "gpios", 0); -+ if (gpio_is_valid(priv->gpio)) { -+ int ret = devm_gpio_request(&pdev->dev, priv->gpio, dev_name(&pdev->dev)); -+ if (ret) -+ return dev_err_probe(&pdev->dev, ret, "failed to request gpio"); -+ -+ gpio_export_with_name(gpio_to_desc(priv->gpio), 0, dev_name(&pdev->dev)); -+ gpio_set_value(priv->gpio, 1); -+ } -+ + phy_set_drvdata(priv->phy, priv); + + phy_provider = devm_of_phy_provider_register(&pdev->dev, of_phy_simple_xlate); @@ -181,7 +171,7 @@ Signed-off-by: John Crispin +MODULE_LICENSE("GPL"); --- /dev/null +++ b/drivers/phy/phy-ar7200-usb.c -@@ -0,0 +1,120 @@ +@@ -0,0 +1,111 @@ +/* + * Copyright (C) 2015 Alban Bedel + * @@ -268,15 +258,6 @@ Signed-off-by: John Crispin + if (IS_ERR(priv->phy)) + return dev_err_probe(&pdev->dev, PTR_ERR(priv->phy), "failed to create PHY"); + -+ priv->gpio = of_get_named_gpio(pdev->dev.of_node, "gpios", 0); -+ if (gpio_is_valid(priv->gpio)) { -+ int ret = devm_gpio_request(&pdev->dev, priv->gpio, dev_name(&pdev->dev)); -+ if (ret) -+ return dev_err_probe(&pdev->dev, ret, "failed to request gpio"); -+ gpio_export_with_name(gpio_to_desc(priv->gpio), 0, dev_name(&pdev->dev)); -+ gpio_set_value(priv->gpio, 1); -+ } -+ + phy_set_drvdata(priv->phy, priv); + + phy_provider = devm_of_phy_provider_register(&pdev->dev, of_phy_simple_xlate);