Skip to content

Commit

Permalink
ath79: phy: remove named gpio exports
Browse files Browse the repository at this point in the history
The only real user of this patch was removed and migrated to the
upstream friendly regulator. Remove this hack.

Signed-off-by: Rosen Penev <[email protected]>
Link: openwrt/openwrt#17356
Signed-off-by: Hauke Mehrtens <[email protected]>
  • Loading branch information
neheb authored and hauke committed Jan 12, 2025
1 parent 90e86a8 commit 6c1ad28
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions target/linux/ath79/patches-6.6/700-phy-add-ath79-usb-phys.patch
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Signed-off-by: John Crispin <[email protected]>
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 <[email protected]>
+ *
Expand Down Expand Up @@ -144,16 +144,6 @@ Signed-off-by: John Crispin <[email protected]>
+ 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);
Expand Down Expand Up @@ -181,7 +171,7 @@ Signed-off-by: John Crispin <[email protected]>
+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 <[email protected]>
+ *
Expand Down Expand Up @@ -268,15 +258,6 @@ Signed-off-by: John Crispin <[email protected]>
+ 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);
Expand Down

0 comments on commit 6c1ad28

Please sign in to comment.