summaryrefslogtreecommitdiff
path: root/include/media
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-02-15 05:27:20 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-03-11 11:59:52 +0100
commitdbedd2f4901e8e86f78d30b7f586a1987d83a69e (patch)
tree64f5597dc105df552d5b96ce366cbabcd4a6430e /include/media
parent42849cf0869fc8df5fa7c9cfdbd7dceb59d0f93a (diff)
media: v4l2-mc: Add link flags to v4l2_create_fwnode_links_to_pad()
Add a flags argument to the v4l2_create_fwnode_links_to_pad() function to specify the link flags. This allows drivers to create immutable links for instance. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/v4l2-mc.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/media/v4l2-mc.h b/include/media/v4l2-mc.h
index bdaa5f2f8ca2..c181685923d5 100644
--- a/include/media/v4l2-mc.h
+++ b/include/media/v4l2-mc.h
@@ -91,6 +91,7 @@ int v4l_vb2q_enable_media_source(struct vb2_queue *q);
*
* @src_sd: pointer to a source subdev
* @sink: pointer to a subdev sink pad
+ * @flags: the link flags
*
* This function searches for fwnode endpoint connections from a source
* subdevice to a single sink pad, and if suitable connections are found,
@@ -98,6 +99,11 @@ int v4l_vb2q_enable_media_source(struct vb2_queue *q);
* called by the sink subdevice, in its v4l2-async notifier subdev bound
* callback, to create links from a bound source subdevice.
*
+ * The @flags argument specifies the link flags. The caller shall ensure that
+ * the flags are valid regardless of the number of links that may be created.
+ * For instance, setting the MEDIA_LNK_FL_ENABLED flag will cause all created
+ * links to be enabled, which isn't valid if more than one link is created.
+ *
* .. note::
*
* Any sink subdevice that calls this function must implement the
@@ -107,7 +113,7 @@ int v4l_vb2q_enable_media_source(struct vb2_queue *q);
* Return 0 on success or a negative error code on failure.
*/
int v4l2_create_fwnode_links_to_pad(struct v4l2_subdev *src_sd,
- struct media_pad *sink);
+ struct media_pad *sink, u32 flags);
/**
* v4l2_create_fwnode_links - Create fwnode-based links from a source