summaryrefslogtreecommitdiff
path: root/linux/Documentation/video4linux/v4l2-framework.txt
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-09-06 13:54:00 +0300
committerHans Verkuil <hverkuil@xs4all.nl>2009-09-06 13:54:00 +0300
commit856378592a1b9be61e28092caf5e87446bae4694 (patch)
treee9d775f64e0893ce1c89aa61e59e0e3ca8a4cde8 /linux/Documentation/video4linux/v4l2-framework.txt
parent026fbaf9a959eb5b7770b075a604999f704640cb (diff)
downloadmediapointer-dvb-s2-856378592a1b9be61e28092caf5e87446bae4694.tar.gz
mediapointer-dvb-s2-856378592a1b9be61e28092caf5e87446bae4694.tar.bz2
v4l: warn when desired devnodenr is in use & add _no_warn function
From: Hans Verkuil <hverkuil@xs4all.nl> 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. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/Documentation/video4linux/v4l2-framework.txt')
-rw-r--r--linux/Documentation/video4linux/v4l2-framework.txt22
1 files changed, 16 insertions, 6 deletions
diff --git a/linux/Documentation/video4linux/v4l2-framework.txt b/linux/Documentation/video4linux/v4l2-framework.txt
index 38b3716d8..b806edaf3 100644
--- a/linux/Documentation/video4linux/v4l2-framework.txt
+++ b/linux/Documentation/video4linux/v4l2-framework.txt
@@ -486,17 +486,27 @@ VFL_TYPE_RADIO: radioX for radio tuners
VFL_TYPE_VTX: vtxX for teletext devices (deprecated, don't use)
The last argument gives you a certain amount of control over the device
-device node number used (i.e. the X in videoX). Normally you will pass -1 to
-let the v4l2 framework pick the first free number. But if a driver creates
-many devices, then it can be useful to have different video devices in
-separate ranges. For example, video capture devices start at 0, video
-output devices start at 16.
-
+device node number used (i.e. the X in videoX). Normally you will pass -1
+to let the v4l2 framework pick the first free number. But sometimes users
+want to select a specific node number. It is common that drivers allow
+the user to select a specific device node number through a driver module
+option. That number is then passed to this function and video_register_device
+will attempt to select that device node number. If that number was already
+in use, then the next free device node number will be selected and it
+will send a warning to the kernel log.
+
+Another use-case is if a driver creates many devices. In that case it can
+be useful to place different video devices in separate ranges. For example,
+video capture devices start at 0, video output devices start at 16.
So you can use the last argument to specify a minimum device node number
and the v4l2 framework will try to pick the first free number that is equal
or higher to what you passed. If that fails, then it will just pick the
first free number.
+Since in this case you do not care about a warning about not being able
+to select the specified device node number, you can call the function
+video_register_device_no_warn() instead.
+
Whenever a device node is created some attributes are also created for you.
If you look in /sys/class/video4linux you see the devices. Go into e.g.
video0 and you will see 'name' and 'index' attributes. The 'name' attribute