]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
[media] v4l2: rename VIDIOC_DBG_G_CHIP_NAME to _CHIP_INFO
authorHans Verkuil <hans.verkuil@cisco.com>
Sat, 6 Apr 2013 09:16:58 +0000 (06:16 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 14 Apr 2013 22:47:33 +0000 (19:47 -0300)
This ioctl will be extended to return more information than just the name.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Documentation/DocBook/media/v4l/compat.xml
Documentation/DocBook/media/v4l/v4l2.xml
Documentation/DocBook/media/v4l/vidioc-dbg-g-chip-info.xml [moved from Documentation/DocBook/media/v4l/vidioc-dbg-g-chip-name.xml with 93% similarity]
Documentation/DocBook/media/v4l/vidioc-dbg-g-register.xml
drivers/media/usb/em28xx/em28xx-video.c
drivers/media/v4l2-core/v4l2-dev.c
drivers/media/v4l2-core/v4l2-ioctl.c
include/media/v4l2-ioctl.h
include/uapi/linux/videodev2.h

index e44161ffdd071013086b8960e82edb8a6a4859ae..f43542ae2981c538c20fe07fdbbf17b06d259ca6 100644 (file)
@@ -2507,7 +2507,7 @@ that used it. It was originally scheduled for removal in 2.6.35.
          </para>
         </listitem>
         <listitem>
-         <para>Added new debugging ioctl &VIDIOC-DBG-G-CHIP-NAME;.
+         <para>Added new debugging ioctl &VIDIOC-DBG-G-CHIP-INFO;.
          </para>
         </listitem>
       </orderedlist>
index c1f3340842131e0e78182d8c780f9e6c6ade43ff..bfc93cdcf69644ca9d4e42d0652881330c747e3e 100644 (file)
@@ -147,7 +147,7 @@ applications. -->
        <revremark>Remove obsolete and unused DV_PRESET ioctls:
        VIDIOC_G_DV_PRESET, VIDIOC_S_DV_PRESET, VIDIOC_QUERY_DV_PRESET and
        VIDIOC_ENUM_DV_PRESET. Remove the related v4l2_input/output capability
-       flags V4L2_IN_CAP_PRESETS and V4L2_OUT_CAP_PRESETS. Added VIDIOC_DBG_G_CHIP_NAME.
+       flags V4L2_IN_CAP_PRESETS and V4L2_OUT_CAP_PRESETS. Added VIDIOC_DBG_G_CHIP_INFO.
        </revremark>
       </revision>
 
@@ -548,7 +548,7 @@ and discussions on the V4L mailing list.</revremark>
     &sub-create-bufs;
     &sub-cropcap;
     &sub-dbg-g-chip-ident;
-    &sub-dbg-g-chip-name;
+    &sub-dbg-g-chip-info;
     &sub-dbg-g-register;
     &sub-decoder-cmd;
     &sub-dqevent;
similarity index 93%
rename from Documentation/DocBook/media/v4l/vidioc-dbg-g-chip-name.xml
rename to Documentation/DocBook/media/v4l/vidioc-dbg-g-chip-info.xml
index fa3bd42ab167ef23addbd8d70d1b1d0cdd432f73..e1cece6c5de1bfa44d8274f2e15afee087ca05f3 100644 (file)
@@ -1,11 +1,11 @@
-<refentry id="vidioc-dbg-g-chip-name">
+<refentry id="vidioc-dbg-g-chip-info">
   <refmeta>
-    <refentrytitle>ioctl VIDIOC_DBG_G_CHIP_NAME</refentrytitle>
+    <refentrytitle>ioctl VIDIOC_DBG_G_CHIP_INFO</refentrytitle>
     &manvol;
   </refmeta>
 
   <refnamediv>
-    <refname>VIDIOC_DBG_G_CHIP_NAME</refname>
+    <refname>VIDIOC_DBG_G_CHIP_INFO</refname>
     <refpurpose>Identify the chips on a TV card</refpurpose>
   </refnamediv>
 
@@ -15,7 +15,7 @@
        <funcdef>int <function>ioctl</function></funcdef>
        <paramdef>int <parameter>fd</parameter></paramdef>
        <paramdef>int <parameter>request</parameter></paramdef>
-       <paramdef>struct v4l2_dbg_chip_name
+       <paramdef>struct v4l2_dbg_chip_info
 *<parameter>argp</parameter></paramdef>
       </funcprototype>
     </funcsynopsis>
@@ -34,7 +34,7 @@
       <varlistentry>
        <term><parameter>request</parameter></term>
        <listitem>
-         <para>VIDIOC_DBG_G_CHIP_NAME</para>
+         <para>VIDIOC_DBG_G_CHIP_INFO</para>
        </listitem>
       </varlistentry>
       <varlistentry>
@@ -69,8 +69,8 @@ so it can be fixed.</para>
     <para>To query the driver applications must initialize the
 <structfield>match.type</structfield> and
 <structfield>match.addr</structfield> or <structfield>match.name</structfield>
-fields of a &v4l2-dbg-chip-name;
-and call <constant>VIDIOC_DBG_G_CHIP_NAME</constant> with a pointer to
+fields of a &v4l2-dbg-chip-info;
+and call <constant>VIDIOC_DBG_G_CHIP_INFO</constant> with a pointer to
 this structure. On success the driver stores information about the
 selected chip in the <structfield>name</structfield> and
 <structfield>flags</structfield> fields. On failure the structure
@@ -81,7 +81,7 @@ remains unchanged.</para>
 <structfield>match.addr</structfield> selects the nth bridge 'chip'
 on the TV card. You can enumerate all chips by starting at zero and
 incrementing <structfield>match.addr</structfield> by one until
-<constant>VIDIOC_DBG_G_CHIP_NAME</constant> fails with an &EINVAL;.
+<constant>VIDIOC_DBG_G_CHIP_INFO</constant> fails with an &EINVAL;.
 The number zero always selects the bridge chip itself, &eg; the chip
 connected to the PCI or USB bus. Non-zero numbers identify specific
 parts of the bridge chip such as an AC97 register block.</para>
@@ -138,8 +138,8 @@ to the <structfield>type</structfield> field.</entry>
       </tgroup>
     </table>
 
-    <table pgwide="1" frame="none" id="v4l2-dbg-chip-name">
-      <title>struct <structname>v4l2_dbg_chip_name</structname></title>
+    <table pgwide="1" frame="none" id="v4l2-dbg-chip-info">
+      <title>struct <structname>v4l2_dbg_chip_info</structname></title>
       <tgroup cols="3">
        &cs-str;
        <tbody valign="top">
index db7844f2439f28b2f6f8cacfe1ddd5c036c706c0..d13bac9e244504bc6659787cd622ff883ccae680 100644 (file)
@@ -99,7 +99,7 @@ unchanged.</para>
 <structfield>match.addr</structfield> selects the nth non-sub-device chip
 on the TV card.  The number zero always selects the host chip, &eg; the
 chip connected to the PCI or USB bus. You can find out which chips are
-present with the &VIDIOC-DBG-G-CHIP-NAME; ioctl.</para>
+present with the &VIDIOC-DBG-G-CHIP-INFO; ioctl.</para>
 
     <para>When <structfield>match.type</structfield> is
 <constant>V4L2_CHIP_MATCH_I2C_DRIVER</constant>,
@@ -109,7 +109,7 @@ For instance
 supported by the saa7127 driver, regardless of its &i2c; bus address.
 When multiple chips supported by the same driver are present, the
 effect of these ioctls is undefined. Again with the
-&VIDIOC-DBG-G-CHIP-NAME; ioctl you can find out which &i2c; chips are
+&VIDIOC-DBG-G-CHIP-INFO; ioctl you can find out which &i2c; chips are
 present.</para>
 
     <para>When <structfield>match.type</structfield> is
@@ -131,14 +131,14 @@ on the TV card.</para>
 
       <para>Due to a flaw in the Linux &i2c; bus driver these ioctls may
 return successfully without actually reading or writing a register. To
-catch the most likely failure we recommend a &VIDIOC-DBG-G-CHIP-NAME;
+catch the most likely failure we recommend a &VIDIOC-DBG-G-CHIP-INFO;
 call confirming the presence of the selected &i2c; chip.</para>
     </note>
 
     <para>These ioctls are optional, not all drivers may support them.
 However when a driver supports these ioctls it must also support
-&VIDIOC-DBG-G-CHIP-NAME;. Conversely it may support
-<constant>VIDIOC_DBG_G_CHIP_NAME</constant> but not these ioctls.</para>
+&VIDIOC-DBG-G-CHIP-INFO;. Conversely it may support
+<constant>VIDIOC_DBG_G_CHIP_INFO</constant> but not these ioctls.</para>
 
     <para><constant>VIDIOC_DBG_G_REGISTER</constant> and
 <constant>VIDIOC_DBG_S_REGISTER</constant> were introduced in Linux
index 39951f5731e1c7121172ba329996f29fa7f1b93e..c27c1f6713969cbe81ec010e29e9d1d40966511a 100644 (file)
@@ -1332,8 +1332,8 @@ static int vidioc_g_chip_ident(struct file *file, void *priv,
 }
 
 #ifdef CONFIG_VIDEO_ADV_DEBUG
-static int vidioc_g_chip_name(struct file *file, void *priv,
-              struct v4l2_dbg_chip_name *chip)
+static int vidioc_g_chip_info(struct file *file, void *priv,
+              struct v4l2_dbg_chip_info *chip)
 {
        struct em28xx_fh      *fh  = priv;
        struct em28xx         *dev = fh->dev;
@@ -1797,7 +1797,7 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
        .vidioc_unsubscribe_event = v4l2_event_unsubscribe,
        .vidioc_g_chip_ident        = vidioc_g_chip_ident,
 #ifdef CONFIG_VIDEO_ADV_DEBUG
-       .vidioc_g_chip_name         = vidioc_g_chip_name,
+       .vidioc_g_chip_info         = vidioc_g_chip_info,
        .vidioc_g_register          = vidioc_g_register,
        .vidioc_s_register          = vidioc_s_register,
 #endif
@@ -1827,7 +1827,7 @@ static const struct v4l2_ioctl_ops radio_ioctl_ops = {
        .vidioc_subscribe_event = v4l2_ctrl_subscribe_event,
        .vidioc_unsubscribe_event = v4l2_event_unsubscribe,
        .vidioc_g_chip_ident  = vidioc_g_chip_ident,
-       .vidioc_g_chip_name   = vidioc_g_chip_name,
+       .vidioc_g_chip_info   = vidioc_g_chip_info,
 #ifdef CONFIG_VIDEO_ADV_DEBUG
        .vidioc_g_register    = vidioc_g_register,
        .vidioc_s_register    = vidioc_s_register,
index 1c3b43cf773d27b61233567c65836b9b48e4b0de..5923c5dfacd5ae8c8cb65af2499d42d149773803 100644 (file)
@@ -592,7 +592,7 @@ static void determine_valid_ioctls(struct video_device *vdev)
        SET_VALID_IOCTL(ops, VIDIOC_S_FREQUENCY, vidioc_s_frequency);
        SET_VALID_IOCTL(ops, VIDIOC_LOG_STATUS, vidioc_log_status);
 #ifdef CONFIG_VIDEO_ADV_DEBUG
-       set_bit(_IOC_NR(VIDIOC_DBG_G_CHIP_NAME), valid_ioctls);
+       set_bit(_IOC_NR(VIDIOC_DBG_G_CHIP_INFO), valid_ioctls);
        set_bit(_IOC_NR(VIDIOC_DBG_G_REGISTER), valid_ioctls);
        set_bit(_IOC_NR(VIDIOC_DBG_S_REGISTER), valid_ioctls);
 #endif
index c48d0acd8bb9c9545cf9d6ae1483ee7533243b1b..f81bda1a48ec33ce603a1f741466bac726298e21 100644 (file)
@@ -638,9 +638,9 @@ static void v4l_print_dbg_chip_ident(const void *arg, bool write_only)
                        p->ident, p->revision);
 }
 
-static void v4l_print_dbg_chip_name(const void *arg, bool write_only)
+static void v4l_print_dbg_chip_info(const void *arg, bool write_only)
 {
-       const struct v4l2_dbg_chip_name *p = arg;
+       const struct v4l2_dbg_chip_info *p = arg;
 
        pr_cont("type=%u, ", p->match.type);
        if (p->match.type == V4L2_CHIP_MATCH_I2C_DRIVER)
@@ -1854,12 +1854,12 @@ static int v4l_dbg_g_chip_ident(const struct v4l2_ioctl_ops *ops,
        return ops->vidioc_g_chip_ident(file, fh, p);
 }
 
-static int v4l_dbg_g_chip_name(const struct v4l2_ioctl_ops *ops,
+static int v4l_dbg_g_chip_info(const struct v4l2_ioctl_ops *ops,
                                struct file *file, void *fh, void *arg)
 {
 #ifdef CONFIG_VIDEO_ADV_DEBUG
        struct video_device *vfd = video_devdata(file);
-       struct v4l2_dbg_chip_name *p = arg;
+       struct v4l2_dbg_chip_info *p = arg;
        struct v4l2_subdev *sd;
        int idx = 0;
 
@@ -1875,8 +1875,8 @@ static int v4l_dbg_g_chip_name(const struct v4l2_ioctl_ops *ops,
                        strlcpy(p->name, vfd->parent->driver->name, sizeof(p->name));
                else
                        strlcpy(p->name, "bridge", sizeof(p->name));
-               if (ops->vidioc_g_chip_name)
-                       return ops->vidioc_g_chip_name(file, fh, arg);
+               if (ops->vidioc_g_chip_info)
+                       return ops->vidioc_g_chip_info(file, fh, arg);
                if (p->match.addr)
                        return -EINVAL;
                return 0;
@@ -2116,7 +2116,7 @@ static struct v4l2_ioctl_info v4l2_ioctls[] = {
        IOCTL_INFO_STD(VIDIOC_QUERY_DV_TIMINGS, vidioc_query_dv_timings, v4l_print_dv_timings, 0),
        IOCTL_INFO_STD(VIDIOC_DV_TIMINGS_CAP, vidioc_dv_timings_cap, v4l_print_dv_timings_cap, INFO_FL_CLEAR(v4l2_dv_timings_cap, type)),
        IOCTL_INFO_FNC(VIDIOC_ENUM_FREQ_BANDS, v4l_enum_freq_bands, v4l_print_freq_band, 0),
-       IOCTL_INFO_FNC(VIDIOC_DBG_G_CHIP_NAME, v4l_dbg_g_chip_name, v4l_print_dbg_chip_name, INFO_FL_CLEAR(v4l2_dbg_chip_name, match)),
+       IOCTL_INFO_FNC(VIDIOC_DBG_G_CHIP_INFO, v4l_dbg_g_chip_info, v4l_print_dbg_chip_info, INFO_FL_CLEAR(v4l2_dbg_chip_info, match)),
 };
 #define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls)
 
index 6b917d69e4081adf601059f13f7632e403990da3..931652f0e2af9e20a7d79053cbd718e8aeceaddc 100644 (file)
@@ -244,8 +244,8 @@ struct v4l2_ioctl_ops {
        int (*vidioc_s_register)       (struct file *file, void *fh,
                                        const struct v4l2_dbg_register *reg);
 
-       int (*vidioc_g_chip_name)      (struct file *file, void *fh,
-                                       struct v4l2_dbg_chip_name *chip);
+       int (*vidioc_g_chip_info)      (struct file *file, void *fh,
+                                       struct v4l2_dbg_chip_info *chip);
 #endif
        int (*vidioc_g_chip_ident)     (struct file *file, void *fh,
                                        struct v4l2_dbg_chip_ident *chip);
index 4c941c103c441c4aa02caee588cdf0b62f2784a5..be43b46595271622f21d80ba20127744a2cf515a 100644 (file)
@@ -1839,8 +1839,8 @@ struct v4l2_dbg_chip_ident {
 #define V4L2_CHIP_FL_READABLE (1 << 0)
 #define V4L2_CHIP_FL_WRITABLE (1 << 1)
 
-/* VIDIOC_DBG_G_CHIP_NAME */
-struct v4l2_dbg_chip_name {
+/* VIDIOC_DBG_G_CHIP_INFO */
+struct v4l2_dbg_chip_info {
        struct v4l2_dbg_match match;
        char name[32];
        __u32 flags;
@@ -1938,7 +1938,7 @@ struct v4l2_create_buffers {
 
 /* Experimental, meant for debugging, testing and internal use.
    Never use this ioctl in applications!
-   Note: this ioctl is deprecated in favor of VIDIOC_DBG_G_CHIP_NAME and
+   Note: this ioctl is deprecated in favor of VIDIOC_DBG_G_CHIP_INFO and
    will go away in the future. */
 #define VIDIOC_DBG_G_CHIP_IDENT _IOWR('V', 81, struct v4l2_dbg_chip_ident)
 
@@ -1976,7 +1976,7 @@ struct v4l2_create_buffers {
 
 /* Experimental, meant for debugging, testing and internal use.
    Never use these in applications! */
-#define VIDIOC_DBG_G_CHIP_NAME  _IOWR('V', 102, struct v4l2_dbg_chip_name)
+#define VIDIOC_DBG_G_CHIP_INFO  _IOWR('V', 102, struct v4l2_dbg_chip_info)
 
 /* Reminder: when adding new ioctls please add support for them to
    drivers/media/video/v4l2-compat-ioctl32.c as well! */