From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [RFCv2 API PATCH 05/28] DocBook: bus_info can no longer be empty.
Date: Sat, 08 Sep 2012 16:19:18 +0200 [thread overview]
Message-ID: <504B53E6.6000107@gmail.com> (raw)
In-Reply-To: <201209081315.15411.hverkuil@xs4all.nl>
On 09/08/2012 01:15 PM, Hans Verkuil wrote:
> On Fri September 7 2012 22:00:33 Sylwester Nawrocki wrote:
>> On 09/07/2012 03:29 PM, Hans Verkuil wrote:
>>> From: Hans Verkuil<hans.verkuil@cisco.com>
>>>
>>> During the 2012 Media Workshop it was decided that bus_info as returned
>>> by VIDIOC_QUERYCAP can no longer be empty. It should be a unique identifier,
>>> and empty strings are obviously not unique.
>>>
>>> Signed-off-by: Hans Verkuil<hans.verkuil@cisco.com>
>>
>> Reviewed-by: Sylwester Nawrocki<s.nawrocki@samsung.com>
>>
>>> ---
>>> Documentation/DocBook/media/v4l/vidioc-querycap.xml | 14 ++++++++++----
>>> 1 file changed, 10 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/Documentation/DocBook/media/v4l/vidioc-querycap.xml b/Documentation/DocBook/media/v4l/vidioc-querycap.xml
>>> index f33dd74..d5b1248 100644
>>> --- a/Documentation/DocBook/media/v4l/vidioc-querycap.xml
>>> +++ b/Documentation/DocBook/media/v4l/vidioc-querycap.xml
>>> @@ -90,11 +90,17 @@ ambiguities.</entry>
>>> <entry>__u8</entry>
>>> <entry><structfield>bus_info</structfield>[32]</entry>
>>> <entry>Location of the device in the system, a
>>> -NUL-terminated ASCII string. For example: "PCI Slot 4". This
>>> +NUL-terminated ASCII string. For example: "PCI:0000:05:06.0". This
>>> information is intended for users, to distinguish multiple
>>> -identical devices. If no such information is available the field may
>>> -simply count the devices controlled by the driver, or contain the
>>> -empty string (<structfield>bus_info</structfield>[0] = 0).<!-- XXX pci_dev->slot_name example --></entry>
>>> +identical devices. If no such information is available the field must
>>> +simply count the devices controlled by the driver ("vivi-000"). The bus_info
>>> +must start with "PCI:" for PCI boards, "PCIe:" for PCI Express boards,
>>> +"usb-" for USB devices, "I2C:" for i2c devices, "ISA:" for ISA devices and
>>> +"parport" for parallel port devices.
>>> +For devices without a bus it should start with the driver name, optionally
>>
>> Most, if not all, devices are on some sort of bus. What would be an example
>> of a device "without a bus" ?
>
> Virtual devices like vivi and platform devices. Or is there some sort of
> platform bus?
OK, then virtual devices like vivi are indeed not on any bus. But saying so,
or implicitly assuming, about platform devices would have been misleading.
On ASICs and SoCs such devices are on some kind of on-chip peripheral bus,
e.g. AMBA APB/AHB [1]. So perhaps we could specify that for platform devices
bus_info should start with "platform-" ? A unique remainder could be easily
formed in drivers on basis of a memory mapped register region address/size
and/or a device interrupt number to the CPU. However, exposing such sensitive
data may be questionable, so it's probably better to just stick with a simple
counter of identical devices.
>> Could we just be saying here "For other devices" instead of "For devices
>> without a bus", or something similar ?
>
> Well, I'd like for any device on a bus to have a consistent naming convention
> so we can guarantee that bus_info is always unique.
>
> Regards,
>
> Hans
>
>>
>>> +followed by "-" and an index if multiple instances of the device as possible.
>>> +Many platform devices can have only one instance, so in that case bus_info
>>> +is identical to the<structfield>driver</structfield> field.</entry>
>>> </row>
>>> <row>
>>> <entry>__u32</entry>
[1] http://www-micro.deis.unibo.it/~magagni/amba99.pdf
--
Regards,
Sylwester
next prev parent reply other threads:[~2012-09-08 14:19 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-07 13:29 [RFCv2 API PATCH 00/28] Full series of API fixes from the 2012 Media Workshop Hans Verkuil
2012-09-07 13:29 ` [RFCv2 API PATCH 01/28] v4l: Remove experimental tag from certain API elements Hans Verkuil
2012-09-07 13:29 ` [RFCv2 API PATCH 02/28] videodev2.h: split off controls into v4l2-controls.h Hans Verkuil
2012-09-07 13:29 ` [RFCv2 API PATCH 03/28] DocBook: improve STREAMON/OFF documentation Hans Verkuil
2012-09-07 19:58 ` Sylwester Nawrocki
2012-09-13 2:17 ` Laurent Pinchart
2012-09-07 13:29 ` [RFCv2 API PATCH 04/28] DocBook: make the G/S/TRY_FMT specification more strict Hans Verkuil
2012-09-07 20:00 ` Sylwester Nawrocki
2012-09-13 2:18 ` Laurent Pinchart
2012-09-07 13:29 ` [RFCv2 API PATCH 05/28] DocBook: bus_info can no longer be empty Hans Verkuil
2012-09-07 20:00 ` Sylwester Nawrocki
2012-09-08 11:15 ` Hans Verkuil
2012-09-08 14:19 ` Sylwester Nawrocki [this message]
2012-09-09 8:45 ` Hans Verkuil
2012-09-09 14:01 ` Sylwester Nawrocki
2012-09-13 1:24 ` Laurent Pinchart
2012-09-13 10:40 ` Hans Verkuil
2012-09-19 18:46 ` Laurent Pinchart
2012-09-20 6:38 ` Hans Verkuil
2012-09-20 13:24 ` Laurent Pinchart
2012-09-07 13:29 ` [RFCv2 API PATCH 06/28] v4l2-core: deprecate V4L2_BUF_TYPE_PRIVATE Hans Verkuil
2012-09-13 2:21 ` Laurent Pinchart
2012-09-13 10:46 ` Hans Verkuil
2012-09-07 13:29 ` [RFCv2 API PATCH 07/28] DocBook: " Hans Verkuil
2012-09-07 13:29 ` [RFCv2 API PATCH 08/28] v4l2: remove experimental tag from a number of old drivers Hans Verkuil
2012-09-07 20:04 ` Sylwester Nawrocki
2012-09-07 13:29 ` [RFCv2 API PATCH 09/28] DocBook: document when to return ENODATA Hans Verkuil
2012-09-07 13:29 ` [RFCv2 API PATCH 10/28] Rename V4L2_(IN|OUT)_CAP_CUSTOM_TIMINGS Hans Verkuil
2012-09-13 2:22 ` Laurent Pinchart
2012-09-13 10:47 ` Hans Verkuil
2012-09-07 13:29 ` [RFCv2 API PATCH 11/28] DocBook: fix awkward language and fix the documented return value Hans Verkuil
2012-09-07 20:08 ` Sylwester Nawrocki
2012-09-07 13:29 ` [RFCv2 API PATCH 12/28] v4l2-core: Add new V4L2_CAP_MONOTONIC_TS capability Hans Verkuil
2012-09-07 20:11 ` Sylwester Nawrocki
2012-09-13 2:26 ` Laurent Pinchart
2012-09-13 20:38 ` Sakari Ailus
2012-09-13 20:50 ` Laurent Pinchart
2012-09-13 20:56 ` Hans Verkuil
2012-09-14 9:02 ` Sakari Ailus
2012-09-14 9:21 ` Hans Verkuil
2012-09-07 13:29 ` [RFCv2 API PATCH 13/28] Add V4L2_CAP_MONOTONIC_TS where applicable Hans Verkuil
2012-09-07 20:15 ` Sylwester Nawrocki
2012-09-08 14:33 ` Rémi Denis-Courmont
2012-09-09 8:46 ` Hans Verkuil
2012-09-13 1:27 ` Laurent Pinchart
2012-09-07 13:29 ` [RFCv2 API PATCH 14/28] DocBook: clarify that sequence is also set for output devices Hans Verkuil
2012-09-07 20:18 ` Sylwester Nawrocki
2012-09-13 2:28 ` Laurent Pinchart
2012-09-13 10:48 ` Hans Verkuil
2012-09-07 13:29 ` [RFCv2 API PATCH 15/28] DocBook: Mark CROPCAP as optional instead of as compulsory Hans Verkuil
2012-09-13 2:32 ` Laurent Pinchart
2012-09-07 13:29 ` [RFCv2 API PATCH 16/28] v4l2: make vidioc_s_fbuf const Hans Verkuil
2012-09-07 13:29 ` [RFCv2 API PATCH 17/28] v4l2: make vidioc_s_jpegcomp const Hans Verkuil
2012-09-07 13:29 ` [RFCv2 API PATCH 18/28] v4l2: make vidioc_s_freq_hw_seek const Hans Verkuil
2012-09-07 13:29 ` [RFCv2 API PATCH 19/28] v4l2: make vidioc_(un)subscribe_event const Hans Verkuil
2012-09-07 13:29 ` [RFCv2 API PATCH 20/28] v4l2: make vidioc_s_audio const Hans Verkuil
2012-09-07 13:29 ` [RFCv2 API PATCH 21/28] v4l2: make vidioc_s_audout const Hans Verkuil
2012-09-07 13:29 ` [RFCv2 API PATCH 22/28] v4l2: make vidioc_s_modulator const Hans Verkuil
2012-09-07 13:29 ` [RFCv2 API PATCH 23/28] v4l2: make vidioc_s_crop const Hans Verkuil
2012-09-07 13:29 ` [RFCv2 API PATCH 24/28] v4l2-dev: add new VFL_DIR_ defines Hans Verkuil
2012-09-13 2:36 ` Laurent Pinchart
2012-09-13 10:54 ` Hans Verkuil
2012-09-07 13:29 ` [RFCv2 API PATCH 25/28] Set vfl_dir for all display or m2m drivers Hans Verkuil
2012-09-13 2:37 ` Laurent Pinchart
2012-09-13 10:56 ` Hans Verkuil
2012-09-07 13:29 ` [RFCv2 API PATCH 26/28] v4l2-dev: improve ioctl validity checks Hans Verkuil
2012-09-07 13:29 ` [RFCv2 API PATCH 27/28] v4l2-dev: reorder checks into blocks of ioctls with similar properties Hans Verkuil
2012-09-07 13:29 ` [RFCv2 API PATCH 28/28] Add vfl_dir field documentation Hans Verkuil
2012-09-07 13:59 ` [RFCv2 API PATCH 00/28] Full series of API fixes from the 2012 Media Workshop Devin Heitmueller
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=504B53E6.6000107@gmail.com \
--to=sylvester.nawrocki@gmail.com \
--cc=hans.verkuil@cisco.com \
--cc=hverkuil@xs4all.nl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).