[PATCH 1/6] net: phy: Add fallbacks for the obsoletes phy DT properties

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In addition to the standard 'phy-handle' devicetree property, the binding
specifies two properties, which are considered obsolete: 'phy' and 'phy-device'.
This commit adds support for them in of_mdio_find_phy().

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@xxxxxxxxxxxxxxxxxx>
---
 drivers/net/phy/phy.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 1a2fdf1..cad4cf5 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -275,6 +275,10 @@ static struct phy_device *of_mdio_find_phy(struct eth_device *edev)
 
 	phy_node = of_parse_phandle(edev->parent->device_node, "phy-handle", 0);
 	if (!phy_node)
+		phy_node = of_parse_phandle(edev->parent->device_node, "phy", 0);
+	if (!phy_node)
+		phy_node = of_parse_phandle(edev->parent->device_node, "phy-device", 0);
+	if (!phy_node)
 		return NULL;
 
 	bus_for_each_device(&mdio_bus_type, dev) {
-- 
2.0.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux