summaryrefslogtreecommitdiff
path: root/include/media/v4l2-async.h
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2023-05-19 13:44:03 +0200
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-07-28 10:48:49 +0200
commit28a1295795d85a25f2e7dd391c43969e95fcb341 (patch)
tree4b38e6a9c1c10029d80b579e1bdfd42bfe80427b /include/media/v4l2-async.h
parentc91fd7b7a8ae17ab8be0b6e765e4a38783749330 (diff)
media: v4l: async: Allow multiple connections between entities
When the v4l2-async framework was introduced, the use case for it was to connect a camera sensor with a parallel receiver. Both tended to be rather simple devices with a single connection between them. The framework has been since improved in multiple ways but there are limitations that have remained, for instance the assumption an async sub-device is connected towards a single notifier and via a single link only. This patch enables connecting a sub-device to one or more notifiers simultaneously, with one or more connections per notifier. The notifier information is moved from the sub-device to the connection and the connections in sub-device are no longer a pointer but a linked list. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> # imx6qp Tested-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> # rcar + adv746x Tested-by: Aishwarya Kothari <aishwarya.kothari@toradex.com> # Apalis i.MX6Q with TC358743 Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> # Renesas RZ/G2L SMARC Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'include/media/v4l2-async.h')
-rw-r--r--include/media/v4l2-async.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/include/media/v4l2-async.h b/include/media/v4l2-async.h
index 5bc2efe720c2..8670b8e44851 100644
--- a/include/media/v4l2-async.h
+++ b/include/media/v4l2-async.h
@@ -62,27 +62,32 @@ struct v4l2_async_match_desc {
};
/**
- * struct v4l2_async_connection - connection descriptor, as known to a bridge
+ * struct v4l2_async_connection - sub-device connection descriptor, as known to
+ * a bridge
*
* @match: struct of match type and per-bus type matching data sets
+ * @notifier: the async notifier the connection is related to
* @asc_entry: used to add struct v4l2_async_connection objects to the
* notifier @waiting_list or @done_list
+ * @asc_subdev_entry: entry in struct v4l2_async_subdev.asc_list list
* @sd: the related sub-device
*
- * When this struct is used as a member in a driver specific struct,
- * the driver specific struct shall contain the &struct
- * v4l2_async_connection as its first member.
+ * When this struct is used as a member in a driver specific struct, the driver
+ * specific struct shall contain the &struct v4l2_async_connection as its first
+ * member.
*/
struct v4l2_async_connection {
struct v4l2_async_match_desc match;
+ struct v4l2_async_notifier *notifier;
struct list_head asc_entry;
+ struct list_head asc_subdev_entry;
struct v4l2_subdev *sd;
};
/**
* struct v4l2_async_notifier_operations - Asynchronous V4L2 notifier operations
- * @bound: a subdevice driver has successfully probed one of the subdevices
- * @complete: All subdevices have been probed successfully. The complete
+ * @bound: a sub-device has been bound by the given connection
+ * @complete: All connections have been bound successfully. The complete
* callback is only executed for the root notifier.
* @unbind: a subdevice is leaving
* @destroy: the asc is about to be freed