[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201224010907.263125-4-djrscally@gmail.com>
Date: Thu, 24 Dec 2020 01:08:56 +0000
From: Daniel Scally <djrscally@...il.com>
To: linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org,
linux-media@...r.kernel.org, devel@...ica.org
Cc: rjw@...ysocki.net, lenb@...nel.org, gregkh@...uxfoundation.org,
yong.zhi@...el.com, sakari.ailus@...ux.intel.com,
bingbu.cao@...el.com, tian.shu.qiu@...el.com, mchehab@...nel.org,
robert.moore@...el.com, erik.kaneda@...el.com, pmladek@...e.com,
rostedt@...dmis.org, sergey.senozhatsky@...il.com,
andriy.shevchenko@...ux.intel.com, linux@...musvillemoes.dk,
laurent.pinchart+renesas@...asonboard.com,
jacopo+renesas@...ndi.org, kieran.bingham+renesas@...asonboard.com,
hverkuil-cisco@...all.nl, m.felsch@...gutronix.de,
niklas.soderlund+renesas@...natech.se, slongerbeam@...il.com,
heikki.krogerus@...ux.intel.com, linus.walleij@...aro.org,
Laurent Pinchart <laurent.pinchart@...asonboard.com>
Subject: [PATCH v3 03/14] property: Call fwnode_graph_get_endpoint_by_id() for fwnode->secondary
This function is used to find fwnode endpoints against a device. In
some instances those endpoints are software nodes which are children of
fwnode->secondary. Add support to fwnode_graph_get_endpoint_by_id() to
find those endpoints by recursively calling itself passing the ptr to
fwnode->secondary in the event no endpoint is found for the primary.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@...ux.intel.com>
Signed-off-by: Daniel Scally <djrscally@...il.com>
---
Changes in v3
- None
drivers/base/property.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/base/property.c b/drivers/base/property.c
index bc9c634df6df..ddba75d90af2 100644
--- a/drivers/base/property.c
+++ b/drivers/base/property.c
@@ -1163,7 +1163,14 @@ fwnode_graph_get_endpoint_by_id(const struct fwnode_handle *fwnode,
best_ep_id = fwnode_ep.id;
}
- return best_ep;
+ if (best_ep)
+ return best_ep;
+
+ if (fwnode && !IS_ERR_OR_NULL(fwnode->secondary))
+ return fwnode_graph_get_endpoint_by_id(fwnode->secondary, port,
+ endpoint, flags);
+
+ return NULL;
}
EXPORT_SYMBOL_GPL(fwnode_graph_get_endpoint_by_id);
--
2.25.1
Powered by blists - more mailing lists