Commit c4a57017 authored by Steve Longerbeam's avatar Steve Longerbeam Committed by Mauro Carvalho Chehab

media: v4l2-subdev.rst: Update doc regarding subdev descriptors

Update the doc to describe the new method of adding subdevice
descriptors to async notifiers.
Signed-off-by: default avatarSteve Longerbeam <slongerbeam@gmail.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 66beb323
...@@ -247,20 +247,28 @@ performed using the :c:func:`v4l2_async_unregister_subdev` call. Subdevices ...@@ -247,20 +247,28 @@ performed using the :c:func:`v4l2_async_unregister_subdev` call. Subdevices
registered this way are stored in a global list of subdevices, ready to be registered this way are stored in a global list of subdevices, ready to be
picked up by bridge drivers. picked up by bridge drivers.
Bridge drivers in turn have to register a notifier object with an array of Bridge drivers in turn have to register a notifier object. This is
subdevice descriptors that the bridge device needs for its operation. This is
performed using the :c:func:`v4l2_async_notifier_register` call. To performed using the :c:func:`v4l2_async_notifier_register` call. To
unregister the notifier the driver has to call unregister the notifier the driver has to call
:c:func:`v4l2_async_notifier_unregister`. The former of the two functions :c:func:`v4l2_async_notifier_unregister`. The former of the two functions
takes two arguments: a pointer to struct :c:type:`v4l2_device` and a pointer to takes two arguments: a pointer to struct :c:type:`v4l2_device` and a
struct :c:type:`v4l2_async_notifier`. The latter contains a pointer to an array pointer to struct :c:type:`v4l2_async_notifier`.
of pointers to subdevice descriptors of type struct :c:type:`v4l2_async_subdev`
type. The V4L2 core will then use these descriptors to match asynchronously Before registering the notifier, bridge drivers must do two things:
registered first, the notifier must be initialized using the
subdevices to them. If a match is detected the ``.bound()`` notifier callback :c:func:`v4l2_async_notifier_init`. Second, bridge drivers can then
is called. After all subdevices have been located the .complete() callback is begin to form a list of subdevice descriptors that the bridge device
called. When a subdevice is removed from the system the .unbind() method is needs for its operation. Subdevice descriptors are added to the notifier
called. All three callbacks are optional. using the :c:func:`v4l2_async_notifier_add_subdev` call. This function
takes two arguments: a pointer to struct :c:type:`v4l2_async_notifier`,
and a pointer to the subdevice descripter, which is of type struct
:c:type:`v4l2_async_subdev`.
The V4L2 core will then use these descriptors to match asynchronously
registered subdevices to them. If a match is detected the ``.bound()``
notifier callback is called. After all subdevices have been located the
.complete() callback is called. When a subdevice is removed from the
system the .unbind() method is called. All three callbacks are optional.
V4L2 sub-device userspace API V4L2 sub-device userspace API
----------------------------- -----------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment