aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/video4linux/v4l2-framework.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/video4linux/v4l2-framework.txt')
-rw-r--r--Documentation/video4linux/v4l2-framework.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index 51a7b6db118f..df0247ed13d8 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -91,7 +91,8 @@ NULL, then you *must* setup v4l2_dev->name before calling v4l2_device_register.
91 91
92The first 'dev' argument is normally the struct device pointer of a pci_dev, 92The first 'dev' argument is normally the struct device pointer of a pci_dev,
93usb_device or platform_device. It is rare for dev to be NULL, but it happens 93usb_device or platform_device. It is rare for dev to be NULL, but it happens
94with ISA devices, for example. 94with ISA devices or when one device creates multiple PCI devices, thus making
95it impossible to associate v4l2_dev with a particular parent.
95 96
96You unregister with: 97You unregister with:
97 98
@@ -414,6 +415,15 @@ You should also set these fields:
414- ioctl_ops: if you use the v4l2_ioctl_ops to simplify ioctl maintenance 415- ioctl_ops: if you use the v4l2_ioctl_ops to simplify ioctl maintenance
415 (highly recommended to use this and it might become compulsory in the 416 (highly recommended to use this and it might become compulsory in the
416 future!), then set this to your v4l2_ioctl_ops struct. 417 future!), then set this to your v4l2_ioctl_ops struct.
418- parent: you only set this if v4l2_device was registered with NULL as
419 the parent device struct. This only happens in cases where one hardware
420 device has multiple PCI devices that all share the same v4l2_device core.
421
422 The cx88 driver is an example of this: one core v4l2_device struct, but
423 it is used by both an raw video PCI device (cx8800) and a MPEG PCI device
424 (cx8802). Since the v4l2_device cannot be associated with a particular
425 PCI device it is setup without a parent device. But when the struct
426 video_device is setup you do know which parent PCI device to use.
417 427
418If you use v4l2_ioctl_ops, then you should set either .unlocked_ioctl or 428If you use v4l2_ioctl_ops, then you should set either .unlocked_ioctl or
419.ioctl to video_ioctl2 in your v4l2_file_operations struct. 429.ioctl to video_ioctl2 in your v4l2_file_operations struct.