aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-09-06 06:54:00 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-18 23:19:34 -0400
commit6b5270d21202fcf6ae16a6266fed83a30ccece7a (patch)
tree54036a74de819e7d6a63f7572ecf37b0a00ac94c /Documentation
parent5062cb70c828bd7b2a8223390ae836c5baa250b9 (diff)
V4L/DVB (12725): v4l: warn when desired devnodenr is in use & add _no_warn function
Warn when the desired device node number is already in use, except when the new video_register_device_no_warn function is called since in some use-cases that warning is not relevant. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/video4linux/v4l2-framework.txt22
1 files changed, 16 insertions, 6 deletions
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index 38b3716d8643..b806edaf3e75 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -486,17 +486,27 @@ VFL_TYPE_RADIO: radioX for radio tuners
486VFL_TYPE_VTX: vtxX for teletext devices (deprecated, don't use) 486VFL_TYPE_VTX: vtxX for teletext devices (deprecated, don't use)
487 487
488The last argument gives you a certain amount of control over the device 488The last argument gives you a certain amount of control over the device
489device node number used (i.e. the X in videoX). Normally you will pass -1 to 489device node number used (i.e. the X in videoX). Normally you will pass -1
490let the v4l2 framework pick the first free number. But if a driver creates 490to let the v4l2 framework pick the first free number. But sometimes users
491many devices, then it can be useful to have different video devices in 491want to select a specific node number. It is common that drivers allow
492separate ranges. For example, video capture devices start at 0, video 492the user to select a specific device node number through a driver module
493output devices start at 16. 493option. That number is then passed to this function and video_register_device
494 494will attempt to select that device node number. If that number was already
495in use, then the next free device node number will be selected and it
496will send a warning to the kernel log.
497
498Another use-case is if a driver creates many devices. In that case it can
499be useful to place different video devices in separate ranges. For example,
500video capture devices start at 0, video output devices start at 16.
495So you can use the last argument to specify a minimum device node number 501So you can use the last argument to specify a minimum device node number
496and the v4l2 framework will try to pick the first free number that is equal 502and the v4l2 framework will try to pick the first free number that is equal
497or higher to what you passed. If that fails, then it will just pick the 503or higher to what you passed. If that fails, then it will just pick the
498first free number. 504first free number.
499 505
506Since in this case you do not care about a warning about not being able
507to select the specified device node number, you can call the function
508video_register_device_no_warn() instead.
509
500Whenever a device node is created some attributes are also created for you. 510Whenever a device node is created some attributes are also created for you.
501If you look in /sys/class/video4linux you see the devices. Go into e.g. 511If you look in /sys/class/video4linux you see the devices. Go into e.g.
502video0 and you will see 'name' and 'index' attributes. The 'name' attribute 512video0 and you will see 'name' and 'index' attributes. The 'name' attribute