From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [PATCH v9 1/5] media: open.rst: better document device node naming
Date: Fri, 8 May 2020 15:35:17 +0200 [thread overview]
Message-ID: <20200508153517.3544f768@coco.lan> (raw)
In-Reply-To: <ed58ee26-251c-6ea9-e55b-7d1fd34e0f57@xs4all.nl>
Em Fri, 8 May 2020 15:24:33 +0200
Hans Verkuil <hverkuil-cisco@xs4all.nl> escreveu:
> On 08/05/2020 15:10, Mauro Carvalho Chehab wrote:
> > Right now, only kAPI documentation describes the device naming.
> > However, such description is needed at the uAPI too. Add it,
> > and describe how to get an unique identify for a given device.
>
> identifier
>
> >
> > Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> > ---
> > .../userspace-api/media/v4l/open.rst | 43 +++++++++++++++++--
> > 1 file changed, 40 insertions(+), 3 deletions(-)
> >
> > diff --git a/Documentation/userspace-api/media/v4l/open.rst b/Documentation/userspace-api/media/v4l/open.rst
> > index 38046ef20141..86816b247a17 100644
> > --- a/Documentation/userspace-api/media/v4l/open.rst
> > +++ b/Documentation/userspace-api/media/v4l/open.rst
> > @@ -14,12 +14,14 @@ Opening and Closing Devices
> > ***************************
> >
> >
> > -Device Naming
> > -=============
> > +.. _v4l2_device_naming:
> > +
> > +V4L2 Device Node Naming
> > +=======================
> >
> > V4L2 drivers are implemented as kernel modules, loaded manually by the
> > system administrator or automatically when a device is first discovered.
> > -The driver modules plug into the "videodev" kernel module. It provides
> > +The driver modules plug into the ``videodev`` kernel module. It provides
> > helper functions and a common application interface specified in this
> > document.
> >
> > @@ -30,6 +32,41 @@ option CONFIG_VIDEO_FIXED_MINOR_RANGES. In that case minor numbers
> > are allocated in ranges depending on the device node type (video, radio,
> > etc.).
> >
> > +The device nodes supported by the Video4Linux subsystem are:
> > +
> > +======================== ======================================================
> > +Default device node name Usage
> > +======================== ======================================================
> > +``/dev/videoX`` Video input/output devices
>
> Also metadata input/output devices.
>
> I would prefer capture/output given the traditional names that V4L2 uses.
>
> > +``/dev/vbiX`` Vertical blank data (i.e. closed captions, teletext)
> > +``/dev/radioX`` Radio tuners and modulators
> > +``/dev/swradioX`` Software Defined Radio tuners and modulators
> > +``/dev/v4l-touchX`` Touch sensors
> > +``/dev/v4l-sudevX`` Video sub-devices (used by sensors and other I2C
>
> sudevX -> subdevX
>
> You made this typo in more places, it's best to search and replace.
>
> > + devices)\ [#]_
>
> That suggests that subdevs are i2c devices, they can be any processing block on
> any bus.
For all the above: Ok. Will address at the next version.
>
> > +======================== ======================================================
> > +
> > +Where ``X`` is a non-negative number.
> > +
> > +.. note::
> > +
> > + 1. The actual device node name is system-dependent, as udev rules may apply.
> > + 2. There is no guarantee that ``X`` will remain the same for the same
> > + device, as the number depends on the device driver's probe order.
> > + If you need an unique name, udev default rules produce
> > + ``/dev/v4l/by-id/`` and ``/dev/v4l/by-path/`` directories containing
> > + links that can be used uniquely to identify a V4L2 device node::
> > +
> > + $ tree /dev/v4l
> > + /dev/v4l
> > + ├── by-id
> > + │ └── usb-OmniVision._USB_Camera-B4.04.27.1-video-index0 -> ../../video0
> > + └── by-path
> > + └── pci-0000:00:14.0-usb-0:2:1.0-video-index0 -> ../../video0
> > +
> > +.. [#] **V4L2 sub-device nodes** (e. g. ``/dev/v4l-sudevX``) use a different
> > + set of system calls, as covered at :ref:`subdev`.
> > +
> > Many drivers support "video_nr", "radio_nr" or "vbi_nr" module
> > options to select specific video/radio/vbi node numbers. This allows the
> > user to request that the device node is named e.g. /dev/video5 instead
>
> It looks like there is a missing period at the end of the sentence.
The full sentence here is:
Many drivers support "video_nr", "radio_nr" or "vbi_nr" module
options to select specific video/radio/vbi node numbers. This allows the
user to request that the device node is named e.g. /dev/video5 instead
of leaving it to chance. When the driver supports multiple devices of
the same type more than one device node number can be assigned,
separated by commas:
This paragraph (untouched by this patch) sounds ok to me ;-)
Thanks,
Mauro
next prev parent reply other threads:[~2020-05-08 13:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-08 13:10 [PATCH v9 0/5] Add a glossary for the media subsystem Mauro Carvalho Chehab
2020-05-08 13:10 ` [PATCH v9 1/5] media: open.rst: better document device node naming Mauro Carvalho Chehab
2020-05-08 13:24 ` Hans Verkuil
2020-05-08 13:35 ` Mauro Carvalho Chehab [this message]
2020-05-08 13:55 ` Hans Verkuil
2020-05-08 13:10 ` [PATCH v9 2/5] media: open.rst: remove the minor number range Mauro Carvalho Chehab
2020-05-08 13:10 ` [PATCH v9 3/5] media: docs: add glossary.rst with common terms used at V4L2 spec Mauro Carvalho Chehab
2020-05-08 13:40 ` Hans Verkuil
2020-05-08 14:25 ` Mauro Carvalho Chehab
2020-05-08 14:54 ` Hans Verkuil
2020-05-08 13:10 ` [PATCH v9 4/5] media: glossary.rst: add terms for MC-centric video-node-centric Mauro Carvalho Chehab
2020-05-08 13:46 ` Hans Verkuil
2020-05-08 14:36 ` Mauro Carvalho Chehab
2020-05-08 13:10 ` [PATCH v9 5/5] media: open.rst: document mc-centric and video-node-centric Mauro Carvalho Chehab
2020-05-08 13:54 ` Hans Verkuil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200508153517.3544f768@coco.lan \
--to=mchehab+huawei@kernel.org \
--cc=hans.verkuil@cisco.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.