[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201103035556.21260-3-kishon@ti.com>
Date: Tue, 3 Nov 2020 09:25:49 +0530
From: Kishon Vijay Abraham I <kishon@...com>
To: Kishon Vijay Abraham I <kishon@...com>,
Vinod Koul <vkoul@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Philipp Zabel <p.zabel@...gutronix.de>
CC: Swapnil Kashinath Jakhade <sjakhade@...ence.com>,
Milind Parab <mparab@...ence.com>,
Yuti Suresh Amonkar <yamonkar@...ence.com>,
<linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>
Subject: [PATCH 2/9] phy: ti: j721e-wiz: Get PHY properties only for "phy" subnode
"serdes" node (child node of WIZ) can have sub-nodes for representing links
or it can have sub-nodes for representing the various clocks within the
serdes. Instead of trying to read "reg" from every child node used for
assigning "lane_phy_type", read only if the child node's name is "phy".
Signed-off-by: Kishon Vijay Abraham I <kishon@...com>
---
drivers/phy/ti/phy-j721e-wiz.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/phy/ti/phy-j721e-wiz.c b/drivers/phy/ti/phy-j721e-wiz.c
index c9cfafe89cbf..d57d29382ce4 100644
--- a/drivers/phy/ti/phy-j721e-wiz.c
+++ b/drivers/phy/ti/phy-j721e-wiz.c
@@ -787,6 +787,9 @@ static int wiz_get_lane_phy_types(struct device *dev, struct wiz *wiz)
u32 reg, num_lanes = 1, phy_type = PHY_NONE;
int ret, i;
+ if (!(of_node_name_eq(subnode, "phy")))
+ continue;
+
ret = of_property_read_u32(subnode, "reg", ®);
if (ret) {
dev_err(dev,
--
2.17.1
Powered by blists - more mailing lists