mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
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>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
1c5cd3efa6
commit
f0e10d0a97
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user