public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Saravana Kannan <saravanak@google.com>
To: Rob Herring <robh+dt@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>,
	 Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Saravana Kannan <saravanak@google.com>
Cc: Xu Yang <xu.yang_2@nxp.com>,
	kernel-team@android.com, devicetree@vger.kernel.org,
	 linux-kernel@vger.kernel.org
Subject: [PATCH v2 3/3] of: property: Add in-ports/out-ports support to of_graph_get_port_parent()
Date: Tue,  6 Feb 2024 17:18:02 -0800	[thread overview]
Message-ID: <20240207011803.2637531-4-saravanak@google.com> (raw)
In-Reply-To: <20240207011803.2637531-1-saravanak@google.com>

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>
---
 drivers/of/property.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/of/property.c b/drivers/of/property.c
index 7bb2d8e290de..39a3ee1dfb58 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -763,7 +763,9 @@ struct device_node *of_graph_get_port_parent(struct device_node *node)
 	/* Walk 3 levels up only if there is 'ports' node. */
 	for (depth = 3; depth && node; depth--) {
 		node = of_get_next_parent(node);
-		if (depth == 2 && !of_node_name_eq(node, "ports"))
+		if (depth == 2 && !of_node_name_eq(node, "ports") &&
+		    !of_node_name_eq(node, "in-ports") &&
+		    !of_node_name_eq(node, "out-ports"))
 			break;
 	}
 	return node;
-- 
2.43.0.594.gd9cf4e227d-goog


  parent reply	other threads:[~2024-02-07  1:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-07  1:17 [PATCH v2 0/3] Improve remote-endpoint parsing Saravana Kannan
2024-02-07  1:18 ` [PATCH v2 1/3] of: property: Improve finding the consumer of a remote-endpoint property Saravana Kannan
2024-02-07  1:18 ` [PATCH v2 2/3] of: property: Improve finding the supplier " Saravana Kannan
2024-02-23 16:18   ` Luca Ceresoli
2024-02-24  1:35     ` Saravana Kannan
2024-02-26 11:52       ` [REGRESSION] " Luca Ceresoli
2024-02-28 21:56         ` Rob Herring
2024-02-28 23:58           ` Saravana Kannan
2024-02-29  0:26             ` Rob Herring
2024-02-29  9:34               ` Luca Ceresoli
2024-02-29 22:10                 ` Rob Herring
2024-02-29 22:54                   ` Saravana Kannan
2024-03-01  9:59                   ` Luca Ceresoli
2024-02-28 22:01     ` Rob Herring
2024-02-07  1:18 ` Saravana Kannan [this message]
2024-02-21  0:47   ` [PATCH v2 3/3] of: property: Add in-ports/out-ports support to of_graph_get_port_parent() Saravana Kannan
2024-02-21  7:00     ` Greg Kroah-Hartman
2024-02-21  8:38       ` Greg Kroah-Hartman
2024-02-07  8:10 ` [PATCH v2 0/3] Improve remote-endpoint parsing Rob Herring
2024-02-07 21:07   ` Saravana Kannan
2024-02-09 10:31 ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240207011803.2637531-4-saravanak@google.com \
    --to=saravanak@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=xu.yang_2@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox