Hi Sakari, Thank you for the patch. On Thu, May 25, 2023 at 12:16:15PM +0300, Sakari Ailus wrote: > Document that sub-device notifiers are now registered using > v4l2_async_subdev_nf_init(). No documentation is changed as it seems that > sub-device notifiers were not documented apart from kernel-doc comments. > > Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> > --- > Documentation/driver-api/media/v4l2-subdev.rst | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/Documentation/driver-api/media/v4l2-subdev.rst b/Documentation/driver-api/media/v4l2-subdev.rst > index 83d3d29608136..d62b341642c96 100644 > --- a/Documentation/driver-api/media/v4l2-subdev.rst > +++ b/Documentation/driver-api/media/v4l2-subdev.rst > @@ -193,9 +193,7 @@ picked up by bridge drivers. > Bridge drivers in turn have to register a notifier object. This is > performed using the :c:func:`v4l2_async_nf_register` call. To > unregister the notifier the driver has to call > -:c:func:`v4l2_async_nf_unregister`. The former of the two functions > -takes two arguments: a pointer to struct :c:type:`v4l2_device` and a > -pointer to struct :c:type:`v4l2_async_notifier`. > +:c:func:`v4l2_async_nf_unregister`. > > Before registering the notifier, bridge drivers must do two things: first, the > notifier must be initialized using the :c:func:`v4l2_async_nf_init`. > @@ -204,6 +202,12 @@ that the bridge device needs for its operation. Several functions are available > to add subdevice descriptors to a notifier, depending on the type of device and > the needs of the driver. > > +For a sub-device driver to register a notifier, the process is otherwise similar > +to that of a bridge driver, apart from that the notifier is initialised using > +:c:func:`v4l2_async_subdev_nf_init` instead. A sub-device notifier may complete > +only after the V4L2 device becomes available, i.e. there's a path via async > +sub-devices and notifiers to that root notifier. This is correct, but I doubt anyone who doesn't have an in-depth knowledge of the v4l2-async framework will be able to understand it. For instance, the concept of "root notifier" isn't explained anywhere. And the v4l2_async_subdev_nf_register() function isn't mentioned. The v4l2-async documentation needs a rewrite. > + > :c:func:`v4l2_async_nf_add_fwnode`, :c:func:`v4l2_async_nf_add_fwnode_remote` > :c:and func:`v4l2_async_nf_add_i2c` are for registering their async sub-devices > :c:with the notifier. -- Regards, Laurent Pinchart