From: Sunil V L <sunilvl@oss.qualcomm.com>
To: linux-acpi@vger.kernel.org, linux-riscv@lists.infradead.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Cc: "Rafael J . Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>,
Mayuresh Chitale <mchitale@gmail.com>,
Anup Patel <anup@brainfault.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Rob Herring <robh@kernel.org>,
Saravana Kannan <saravanak@kernel.org>,
Sunil V L <sunilvl@oss.qualcomm.com>
Subject: [RFC PATCH 1/5] of: property: Add in-ports/out-ports support to of_fwnode_graph_get_port_parent()
Date: Tue, 29 Sep 2026 14:25:20 +0530 [thread overview]
Message-ID: <20260929085524.1554507-2-sunilvl@oss.qualcomm.com> (raw)
In-Reply-To: <20260929085524.1554507-1-sunilvl@oss.qualcomm.com>
From: Sunil V L <sunilvl@oss.qualcomm.com>
Similar to its OF counterpart, the helper
of_fwnode_graph_get_port_parent() should also treat "in-ports" and
"out-ports" as container nodes. Without this, fwnode_* interfaces may
incorrectly return these nodes as port parents.
Extend the check to skip "in-ports" and "out-ports" so that the
correct parent node is returned. This change helps in using the
fwnode_* interface instead of OF-specific helpers.
This change is similar to commit 8f1e0d791b528 ("of: property: Add
in-ports/out-ports support to of_graph_get_port_parent()"), which
addressed the same issue in the OF specific handler.
Signed-off-by: Sunil V L <sunilvl@oss.qualcomm.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 72cf12907de0..c259ac1f0457 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -1228,7 +1228,9 @@ of_fwnode_graph_get_port_parent(struct fwnode_handle *fwnode)
return NULL;
/* Is this the "ports" node? If not, it's the port parent. */
- if (!of_node_name_eq(np, "ports"))
+ if (!of_node_name_eq(np, "ports") &&
+ !of_node_name_eq(np, "in-ports") &&
+ !of_node_name_eq(np, "out-ports"))
return of_fwnode_handle(np);
return of_fwnode_handle(of_get_next_parent(np));
--
2.43.0
next prev parent reply other threads:[~2026-09-29 8:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 8:55 [RFC PATCH 0/5] hwtracing: rvtrace: Add ACPI support Sunil V L
2026-09-29 8:55 ` Sunil V L [this message]
2026-09-29 8:55 ` [RFC PATCH 2/5] ACPI: property: Add ports/in-ports/out-ports support to acpi_fwnode_get_parent() Sunil V L
2026-09-29 8:55 ` [RFC PATCH 3/5] ACPI: property: Add device graph support Sunil V L
2026-09-29 8:55 ` [RFC PATCH 4/5] hwtracing: rvtrace: Move to fwnode_* APIs Sunil V L
2026-09-29 8:55 ` [RFC PATCH 5/5] hwtracing: rvtrace: Add ACPI support Sunil V L
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=20260929085524.1554507-2-sunilvl@oss.qualcomm.com \
--to=sunilvl@oss.qualcomm.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=anup@brainfault.org \
--cc=devicetree@vger.kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mchitale@gmail.com \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=saravanak@kernel.org \
/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
all inboxes | Powered by JetHome®