[RFCv2 PATCH 8/8] DocBook/media: document the new media_device_info fields.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Hans Verkuil <hans.verkuil@xxxxxxxxx>

Document major, minor and entity_id, and that MEDIA_IOC_DEVICE_INFO
can be called for other media devices as well, besides just the
media controller.

Signed-off-by: Hans Verkuil <hans.verkuil@xxxxxxxxx>
---
 .../DocBook/media/v4l/media-ioc-device-info.xml    | 35 ++++++++++++++++++----
 1 file changed, 30 insertions(+), 5 deletions(-)

diff --git a/Documentation/DocBook/media/v4l/media-ioc-device-info.xml b/Documentation/DocBook/media/v4l/media-ioc-device-info.xml
index 2ce5214..9506cf6 100644
--- a/Documentation/DocBook/media/v4l/media-ioc-device-info.xml
+++ b/Documentation/DocBook/media/v4l/media-ioc-device-info.xml
@@ -49,11 +49,20 @@
   <refsect1>
     <title>Description</title>
 
-    <para>All media devices must support the <constant>MEDIA_IOC_DEVICE_INFO</constant>
-    ioctl. To query device information, applications call the ioctl with a
-    pointer to a &media-device-info;. The driver fills the structure and returns
-    the information to the application.
-    The ioctl never fails.</para>
+    <para>All media devices, both the media controller device itself and any
+    device node used to access a media entity, must support the
+    <constant>MEDIA_IOC_DEVICE_INFO</constant> ioctl. To query device information,
+    applications call the ioctl with a pointer to a &media-device-info;. The driver
+    fills the structure and returns the information to the application.
+    The ioctl never fails, unless it is not a media device, in which case an error
+    is returned, most likely the &ENOTTY;.</para>
+
+    <para>Besides getting the device information from the media controller device
+    itself, applications can use this ioctl as well to check if a device node is part
+    of a media controller. If the ioctl succeeds, then the <structfield>major</structfield>
+    and <structfield>minor</structfield> fields will give you the major and minor
+    numbers of the media controller device and the <structfield>entity_id</structfield>
+    field gives you the entity ID of the media device.</para>
 
     <table pgwide="1" frame="none" id="media-device-info">
       <title>struct <structname>media_device_info</structname></title>
@@ -110,6 +119,22 @@
 	  </row>
 	  <row>
 	    <entry>__u32</entry>
+	    <entry><structfield>major</structfield></entry>
+	    <entry>The major number of the media device node.</entry>
+	  </row>
+	  <row>
+	    <entry>__u32</entry>
+	    <entry><structfield>minor</structfield></entry>
+	    <entry>The minor number of the media device node.</entry>
+	  </row>
+	  <row>
+	    <entry>__u32</entry>
+	    <entry><structfield>entity_id</structfield></entry>
+	    <entry>The entity ID if this ioctl was called for a device that is
+	    an entity. The media controller will set this to 0.</entry>
+	  </row>
+	  <row>
+	    <entry>__u32</entry>
 	    <entry><structfield>reserved</structfield>[31]</entry>
 	    <entry>Reserved for future extensions. Drivers and applications must
 	    set this array to zero.</entry>
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux