summaryrefslogtreecommitdiff
path: root/include/media/v4l2-async.h
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2023-02-19 13:09:00 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-07-28 10:40:17 +0200
commitf0e10d0a971c43fb2035fccc06de8bdd22674ec9 (patch)
treed4424b7b7f0b9fa601ec20c8bfe1c0a2c8c9742b /include/media/v4l2-async.h
parent1c5cd3efa66246172a4354054cf2586d5a55acfd (diff)
media: v4l: async: Make V4L2 async match information a struct
Make V4L2 async match information a struct, making it easier to use it elsewhere outside the scope of struct v4l2_async_subdev. Also remove an obsolete comment --- none of these fields are supposed to be touched by drivers. 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 Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> 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.h41
1 files changed, 23 insertions, 18 deletions
diff --git a/include/media/v4l2-async.h b/include/media/v4l2-async.h
index 2c9baa3c9266..d347ef32f4ec 100644
--- a/include/media/v4l2-async.h
+++ b/include/media/v4l2-async.h
@@ -34,23 +34,37 @@ enum v4l2_async_match_type {
};
/**
- * struct v4l2_async_subdev - sub-device descriptor, as known to a bridge
+ * struct v4l2_async_match_desc - async sub-device match information
*
- * @match_type: type of match that will be used
- * @match: union of per-bus type matching data sets
- * @match.fwnode:
- * pointer to &struct fwnode_handle to be matched.
+ * @type: type of match that will be used
+ * @fwnode: pointer to &struct fwnode_handle to be matched.
* Used if @match_type is %V4L2_ASYNC_MATCH_FWNODE.
- * @match.i2c: embedded struct with I2C parameters to be matched.
+ * @i2c: embedded struct with I2C parameters to be matched.
* Both @match.i2c.adapter_id and @match.i2c.address
* should be matched.
* Used if @match_type is %V4L2_ASYNC_MATCH_I2C.
- * @match.i2c.adapter_id:
+ * @i2c.adapter_id:
* I2C adapter ID to be matched.
* Used if @match_type is %V4L2_ASYNC_MATCH_I2C.
- * @match.i2c.address:
+ * @i2c.address:
* I2C address to be matched.
* Used if @match_type is %V4L2_ASYNC_MATCH_I2C.
+ */
+struct v4l2_async_match_desc {
+ enum v4l2_async_match_type type;
+ union {
+ struct fwnode_handle *fwnode;
+ struct {
+ int adapter_id;
+ unsigned short address;
+ } i2c;
+ };
+};
+
+/**
+ * struct v4l2_async_subdev - sub-device descriptor, as known to a bridge
+ *
+ * @match: struct of match type and per-bus type matching data sets
* @asd_list: used to add struct v4l2_async_subdev objects to the
* master notifier @asd_list
* @list: used to link struct v4l2_async_subdev objects, waiting to be
@@ -61,16 +75,7 @@ enum v4l2_async_match_type {
* v4l2_async_subdev as its first member.
*/
struct v4l2_async_subdev {
- enum v4l2_async_match_type match_type;
- union {
- struct fwnode_handle *fwnode;
- struct {
- int adapter_id;
- unsigned short address;
- } i2c;
- } match;
-
- /* v4l2-async core private: not to be used by drivers */
+ struct v4l2_async_match_desc match;
struct list_head list;
struct list_head asd_list;
};