aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/video4linux/v4l2-framework.txt
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-06-12 10:28:08 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-21 10:09:01 -0400
commit7cb59509a74da98721ac169431a9a0bd372e29b0 (patch)
treedfbce6ef2cdf57461d180b9ea1b0e2b2514afaac /Documentation/video4linux/v4l2-framework.txt
parente5715cfb2802cb5988f856f84454645772f4e2f5 (diff)
[media] v4l2-framework: update documentation
'parent' was renamed to 'dev_parent'. Clarify how/when this should be used. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'Documentation/video4linux/v4l2-framework.txt')
-rw-r--r--Documentation/video4linux/v4l2-framework.txt17
1 files changed, 11 insertions, 6 deletions
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index 24353ecab197..b5e6347b720f 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -574,9 +574,13 @@ of the video device exits.
574The default video_device_release() callback just calls kfree to free the 574The default video_device_release() callback just calls kfree to free the
575allocated memory. 575allocated memory.
576 576
577There is also a video_device_release_empty() function that does nothing
578(is empty) and can be used if the struct is embedded and there is nothing
579to do when it is released.
580
577You should also set these fields: 581You should also set these fields:
578 582
579- v4l2_dev: set to the v4l2_device parent device. 583- v4l2_dev: must be set to the v4l2_device parent device.
580 584
581- name: set to something descriptive and unique. 585- name: set to something descriptive and unique.
582 586
@@ -613,15 +617,16 @@ You should also set these fields:
613 If you want to have a separate priority state per (group of) device node(s), 617 If you want to have a separate priority state per (group of) device node(s),
614 then you can point it to your own struct v4l2_prio_state. 618 then you can point it to your own struct v4l2_prio_state.
615 619
616- parent: you only set this if v4l2_device was registered with NULL as 620- dev_parent: you only set this if v4l2_device was registered with NULL as
617 the parent device struct. This only happens in cases where one hardware 621 the parent device struct. This only happens in cases where one hardware
618 device has multiple PCI devices that all share the same v4l2_device core. 622 device has multiple PCI devices that all share the same v4l2_device core.
619 623
620 The cx88 driver is an example of this: one core v4l2_device struct, but 624 The cx88 driver is an example of this: one core v4l2_device struct, but
621 it is used by both an raw video PCI device (cx8800) and a MPEG PCI device 625 it is used by both a raw video PCI device (cx8800) and a MPEG PCI device
622 (cx8802). Since the v4l2_device cannot be associated with a particular 626 (cx8802). Since the v4l2_device cannot be associated with two PCI devices
623 PCI device it is setup without a parent device. But when the struct 627 at the same time it is setup without a parent device. But when the struct
624 video_device is setup you do know which parent PCI device to use. 628 video_device is initialized you *do* know which parent PCI device to use and
629 so you set dev_device to the correct PCI device.
625 630
626- flags: optional. Set to V4L2_FL_USE_FH_PRIO if you want to let the framework 631- flags: optional. Set to V4L2_FL_USE_FH_PRIO if you want to let the framework
627 handle the VIDIOC_G/S_PRIORITY ioctls. This requires that you use struct 632 handle the VIDIOC_G/S_PRIORITY ioctls. This requires that you use struct