[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201019225903.14276-9-djrscally@gmail.com>
Date: Mon, 19 Oct 2020 23:59:02 +0100
From: Daniel Scally <djrscally@...il.com>
To: linux-kernel@...r.kernel.org, linux-media@...r.kernel.org
Cc: linux.walleij@...aro.org, prabhakar.mahadev-lad.rj@...renesas.com,
heikki.krogerus@...ux.intel.com, dmitry.torokhov@...il.com,
laurent.pinchart+renesas@...asonboard.com,
kieran.bingham+renesas@...asonboard.com, jacopo+renesas@...ndi.org,
robh@...nel.org, davem@...emloft.net, linux@...musvillemoes.dk,
andriy.shevchenko@...ux.intel.com, sergey.senozhatsky@...il.com,
rostedt@...dmis.org, pmladek@...e.com, mchehab@...nel.org,
tian.shu.qiu@...el.com, bingbu.cao@...el.com,
sakari.ailus@...ux.intel.com, yong.zhi@...el.com,
rafael@...nel.org, gregkh@...uxfoundation.org, kitakar@...il.com,
dan.carpenter@...cle.org
Subject: [RFC PATCH v3 8/9] media: v4l2-core: v4l2-async: Check possible match in match_fwnode based on sd->fwnode->secondary
Where the fwnode graph is comprised of software_nodes, these will be
assigned as the secondary to dev->fwnode. Check the v4l2_subdev's fwnode
for a secondary and attempt to match against it during match_fwnode() to
accommodate that possibility.
Signed-off-by: Daniel Scally <djrscally@...il.com>
---
Changes in v3:
- patch introduced
drivers/media/v4l2-core/v4l2-async.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
index e3ab003a6..6486dbde7 100644
--- a/drivers/media/v4l2-core/v4l2-async.c
+++ b/drivers/media/v4l2-core/v4l2-async.c
@@ -87,6 +87,14 @@ static bool match_fwnode(struct v4l2_async_notifier *notifier,
if (sd->fwnode == asd->match.fwnode)
return true;
+ /*
+ * Check the same situation for any possible secondary assigned to the
+ * subdev's fwnode
+ */
+ if ((!IS_ERR_OR_NULL(sd->fwnode->secondary)) &&
+ sd->fwnode->secondary == asd->match.fwnode)
+ return true;
+
/*
* Otherwise, check if the sd fwnode and the asd fwnode refer to an
* endpoint or a device. If they're of the same type, there's no match.
--
2.17.1
Powered by blists - more mailing lists