Lines Matching +full:non +full:- +full:descriptive

1 .. SPDX-License-Identifier: GPL-2.0
7 :c:type:`video_device` struct (``v4l2-dev.h``). This struct can either be
12 .. code-block:: c
17 return -ENOMEM;
19 vdev->release = video_device_release;
24 .. code-block:: c
26 struct video_device *vdev = &my_vdev->vdev;
28 vdev->release = my_vdev_release;
42 - :c:type:`video_device`->v4l2_dev: must be set to the :c:type:`v4l2_device`
45 - :c:type:`video_device`->name: set to something descriptive and unique.
47 - :c:type:`video_device`->vfl_dir: set this to ``VFL_DIR_RX`` for capture
51 - :c:type:`video_device`->fops: set to the :c:type:`v4l2_file_operations`
54 - :c:type:`video_device`->ioctl_ops: if you use the :c:type:`v4l2_ioctl_ops`
57 :c:type:`v4l2_ioctl_ops` struct. The :c:type:`video_device`->vfl_type and
58 :c:type:`video_device`->vfl_dir fields are used to disable ops that do not
59 match the type/dir combination. E.g. VBI ops are disabled for non-VBI nodes,
64 - :c:type:`video_device`->lock: leave to ``NULL`` if you want to do all the
66 ``mutex_lock`` and before the :c:type:`video_device`->unlocked_ioctl
70 - :c:type:`video_device`->queue: a pointer to the struct vb2_queue
72 If queue is not ``NULL``, and queue->lock is not ``NULL``, then queue->lock
82 - :c:type:`video_device`->prio: keeps track of the priorities. Used to
89 - :c:type:`video_device`->dev_parent: you only set this if v4l2_device was
102 :c:type:`video_device`->unlocked_ioctl to :c:func:`video_ioctl2` in your
124 .. code-block:: c
126 struct media_pad *pad = &my_vdev->pad;
129 err = media_entity_pads_init(&vdev->entity, 1, pad);
138 ------------------
146 is a second lock that you can set: :c:type:`video_device`->queue->lock. If
147 set, then this lock will be used instead of :c:type:`video_device`->lock
162 If you use the ``queue->lock`` pointer, then you can use the helper functions
167 using :c:type:`video_device`->queue->lock, then you have to first lock
168 :c:type:`video_device`->queue->lock followed by :c:type:`video_device`->lock.
173 -------------------------
178 .. code-block:: c
180 err = video_register_device(vdev, VFL_TYPE_VIDEO, -1);
200 ``VFL_TYPE_SUBDEV`` ``/dev/v4l-subdevX`` for V4L2 subdevices
203 ``VFL_TYPE_TOUCH`` ``/dev/v4l-touchX`` for touch sensors
207 node number used (i.e. the X in ``videoX``). Normally you will pass -1
216 Another use-case is if a driver creates many devices. In that case it can
244 - :c:type:`video_device`->vfl_type: the device type passed to
246 - :c:type:`video_device`->minor: the assigned device minor number.
247 - :c:type:`video_device`->num: the device node number (i.e. the X in
249 - :c:type:`video_device`->index: the device index number.
254 it. The ``vdev->release()`` callback will never be called if the registration
259 ----------------------
287 --------------------
304 When the last user of the video device node exits, then the ``vdev->release()``
311 (&vdev->entity);
317 ----------------
321 - file and :c:type:`video_device` private data
349 .. code-block:: c
351 struct v4l2_device *v4l2_dev = vdev->v4l2_dev;
353 - Device node name
365 ------------------------------------------
367 .. kernel-doc:: include/media/v4l2-dev.h