Lines Matching +full:module +full:- +full:instance
1 .. SPDX-License-Identifier: GPL-2.0
3 V4L2 device instance
4 --------------------
6 Each device instance is represented by a struct v4l2_device.
10 You must register the device instance by calling:
16 dev->driver_data field is ``NULL``, it will be linked to
20 dev->driver_data manually to point to the driver-specific device structure
21 that embed the struct v4l2_device instance. This is achieved by a
22 ``dev_set_drvdata()`` call before registering the V4L2 device instance.
24 properly initialized and registered :c:type:`media_device` instance.
26 If :c:type:`v4l2_dev <v4l2_device>`\ ->name is empty then it will be set to a
30 :c:type:`v4l2_dev <v4l2_device>`\ ->name before calling
34 name and a driver-global atomic_t instance. This will generate names like
36 a dash: ``cx18-0``, ``cx18-1``, etc. This function returns the instance number.
44 You can also supply a ``notify()`` callback that can be called by sub-devices
46 sub-device. Any notifications a sub-device supports must be defined in a header
54 If the dev->driver_data field points to :c:type:`v4l2_dev <v4l2_device>`,
77 .. code-block:: c
104 Sometimes you need to keep a running counter of the device instance. This is
105 commonly used to map a device instance to an index of a module option array.
109 .. code-block:: c
116 state->instance = atomic_inc_return(&drv_instance) - 1;
146 .. kernel-doc:: include/media/v4l2-device.h