media: Clarify v4l2-async subdevice addition API

Now that most users of v4l2_async_notifier_add_subdev have been converted,
let's fix the documentation so it's more clear how the v4l2-async API
should be used.

Document functions that drivers should use, and their purpose.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
Ezequiel Garcia
2021-01-18 02:52:55 +01:00
committed by Mauro Carvalho Chehab
parent b01edcbd40
commit 3e90e5ad94
2 changed files with 50 additions and 13 deletions

View File

@@ -128,7 +128,12 @@ void v4l2_async_debug_init(struct dentry *debugfs_dir);
* @notifier: pointer to &struct v4l2_async_notifier
*
* This function initializes the notifier @asd_list. It must be called
* before the first call to @v4l2_async_notifier_add_subdev.
* before adding a subdevice to a notifier, using one of:
* @v4l2_async_notifier_add_fwnode_remote_subdev,
* @v4l2_async_notifier_add_fwnode_subdev,
* @v4l2_async_notifier_add_i2c_subdev,
* @__v4l2_async_notifier_add_subdev or
* @v4l2_async_notifier_parse_fwnode_endpoints.
*/
void v4l2_async_notifier_init(struct v4l2_async_notifier *notifier);
@@ -262,9 +267,11 @@ void v4l2_async_notifier_unregister(struct v4l2_async_notifier *notifier);
* sub-devices allocated for the purposes of the notifier but not the notifier
* itself. The user is responsible for calling this function to clean up the
* notifier after calling
* @v4l2_async_notifier_add_subdev,
* @v4l2_async_notifier_parse_fwnode_endpoints or
* @v4l2_fwnode_reference_parse_sensor_common.
* @v4l2_async_notifier_add_fwnode_remote_subdev,
* @v4l2_async_notifier_add_fwnode_subdev,
* @v4l2_async_notifier_add_i2c_subdev,
* @__v4l2_async_notifier_add_subdev or
* @v4l2_async_notifier_parse_fwnode_endpoints.
*
* There is no harm from calling v4l2_async_notifier_cleanup in other
* cases as long as its memory has been zeroed after it has been