Skip to content

Commit 8f1e0d7

Browse files
Saravana Kannanrobherring
authored andcommitted
of: property: Add in-ports/out-ports support to of_graph_get_port_parent()
Similar to the existing "ports" node name, coresight device tree bindings have added "in-ports" and "out-ports" as standard node names for a collection of ports. Add support for these name to of_graph_get_port_parent() so that remote-endpoint parsing can find the correct parent node for these coresight ports too. Signed-off-by: Saravana Kannan <saravanak@google.com> Link: https://lore.kernel.org/r/20240207011803.2637531-4-saravanak@google.com Signed-off-by: Rob Herring <robh@kernel.org>
1 parent 782bfd0 commit 8f1e0d7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/of/property.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,9 @@ struct device_node *of_graph_get_port_parent(struct device_node *node)
763763
/* Walk 3 levels up only if there is 'ports' node. */
764764
for (depth = 3; depth && node; depth--) {
765765
node = of_get_next_parent(node);
766-
if (depth == 2 && !of_node_name_eq(node, "ports"))
766+
if (depth == 2 && !of_node_name_eq(node, "ports") &&
767+
!of_node_name_eq(node, "in-ports") &&
768+
!of_node_name_eq(node, "out-ports"))
767769
break;
768770
}
769771
return node;

0 commit comments

Comments
 (0)