summaryrefslogtreecommitdiff
path: root/include/media
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2023-05-15 12:06:50 +0300
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-07-28 11:47:56 +0300
commitc91fd7b7a8ae17ab8be0b6e765e4a38783749330 (patch)
tree576dc031d35525df11aefea46ad4ea7d5d7558f6 /include/media
parent9bf19fbf0c8bc4392210c1ea104a8db732624f3d (diff)
downloadlinux-c91fd7b7a8ae17ab8be0b6e765e4a38783749330.tar.xz
media: v4l: async: Obtain async connection based on sub-device
Add v4l2_async_connection_unique() function for obtaining a struct v4l2_async_connection, typically allocated by drivers together with their own information on an external sub-device. The relation between connections and sub-devices still remains 1:1 but this code becomes more complex when the relation soon changes. 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')
-rw-r--r--include/media/v4l2-async.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/media/v4l2-async.h b/include/media/v4l2-async.h
index c06b3b832228..5bc2efe720c2 100644
--- a/include/media/v4l2-async.h
+++ b/include/media/v4l2-async.h
@@ -211,6 +211,17 @@ __v4l2_async_nf_add_i2c(struct v4l2_async_notifier *notifier,
sizeof(type)))
/**
+ * v4l2_async_connection_unique - return a unique &struct v4l2_async_connection
+ * for a sub-device
+ * @sd: the sub-device
+ *
+ * Return an async connection for a sub-device, when there is a single
+ * one only.
+ */
+struct v4l2_async_connection *
+v4l2_async_connection_unique(struct v4l2_subdev *sd);
+
+/**
* v4l2_async_nf_register - registers a subdevice asynchronous notifier
*
* @v4l2_dev: pointer to &struct v4l2_device