summaryrefslogtreecommitdiff
path: root/include/media/v4l2-async.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/media/v4l2-async.h')
-rw-r--r--include/media/v4l2-async.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/media/v4l2-async.h b/include/media/v4l2-async.h
index 8670b8e44851..41a9c4bada8a 100644
--- a/include/media/v4l2-async.h
+++ b/include/media/v4l2-async.h
@@ -126,6 +126,18 @@ struct v4l2_async_notifier {
};
/**
+ * struct v4l2_async_subdev_endpoint - Entry in sub-device's fwnode list
+ *
+ * @async_subdev_endpoint_entry: An entry in async_subdev_endpoint_list of
+ * &struct v4l2_subdev
+ * @endpoint: Endpoint fwnode agains which to match the sub-device
+ */
+struct v4l2_async_subdev_endpoint {
+ struct list_head async_subdev_endpoint_entry;
+ struct fwnode_handle *endpoint;
+};
+
+/**
* v4l2_async_debug_init - Initialize debugging tools.
*
* @debugfs_dir: pointer to the parent debugfs &struct dentry
@@ -216,6 +228,24 @@ __v4l2_async_nf_add_i2c(struct v4l2_async_notifier *notifier,
sizeof(type)))
/**
+ * v4l2_async_subdev_endpoint_add - Add an endpoint fwnode to async sub-device
+ * matching list
+ *
+ * @sd: the sub-device
+ * @fwnode: the endpoint fwnode to match
+ *
+ * Add a fwnode to the async sub-device's matching list. This allows registering
+ * multiple async sub-devices from a single device.
+ *
+ * Note that calling v4l2_subdev_cleanup() as part of the sub-device's cleanup
+ * if endpoints have been added to the sub-device's fwnode matching list.
+ *
+ * Returns an error on failure, 0 on success.
+ */
+int v4l2_async_subdev_endpoint_add(struct v4l2_subdev *sd,
+ struct fwnode_handle *fwnode);
+
+/**
* v4l2_async_connection_unique - return a unique &struct v4l2_async_connection
* for a sub-device
* @sd: the sub-device