Commit 96b03d2a3078d5e95a8b106634faa7cea88ebe5e
Committed by
Mauro Carvalho Chehab
1 parent
0f0fe4b9f6
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
[media] v4l2: rename VIDIOC_DBG_G_CHIP_NAME to _CHIP_INFO
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>
Showing 10 changed files with 249 additions and 249 deletions Side-by-side Diff
- Documentation/DocBook/media/v4l/compat.xml
- Documentation/DocBook/media/v4l/v4l2.xml
- Documentation/DocBook/media/v4l/vidioc-dbg-g-chip-info.xml
- Documentation/DocBook/media/v4l/vidioc-dbg-g-chip-name.xml
- 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
Documentation/DocBook/media/v4l/compat.xml
Documentation/DocBook/media/v4l/v4l2.xml
... | ... | @@ -147,7 +147,7 @@ |
147 | 147 | <revremark>Remove obsolete and unused DV_PRESET ioctls: |
148 | 148 | VIDIOC_G_DV_PRESET, VIDIOC_S_DV_PRESET, VIDIOC_QUERY_DV_PRESET and |
149 | 149 | VIDIOC_ENUM_DV_PRESET. Remove the related v4l2_input/output capability |
150 | - flags V4L2_IN_CAP_PRESETS and V4L2_OUT_CAP_PRESETS. Added VIDIOC_DBG_G_CHIP_NAME. | |
150 | + flags V4L2_IN_CAP_PRESETS and V4L2_OUT_CAP_PRESETS. Added VIDIOC_DBG_G_CHIP_INFO. | |
151 | 151 | </revremark> |
152 | 152 | </revision> |
153 | 153 | |
... | ... | @@ -548,7 +548,7 @@ |
548 | 548 | &sub-create-bufs; |
549 | 549 | &sub-cropcap; |
550 | 550 | &sub-dbg-g-chip-ident; |
551 | - &sub-dbg-g-chip-name; | |
551 | + &sub-dbg-g-chip-info; | |
552 | 552 | &sub-dbg-g-register; |
553 | 553 | &sub-decoder-cmd; |
554 | 554 | &sub-dqevent; |
Documentation/DocBook/media/v4l/vidioc-dbg-g-chip-info.xml
1 | +<refentry id="vidioc-dbg-g-chip-info"> | |
2 | + <refmeta> | |
3 | + <refentrytitle>ioctl VIDIOC_DBG_G_CHIP_INFO</refentrytitle> | |
4 | + &manvol; | |
5 | + </refmeta> | |
6 | + | |
7 | + <refnamediv> | |
8 | + <refname>VIDIOC_DBG_G_CHIP_INFO</refname> | |
9 | + <refpurpose>Identify the chips on a TV card</refpurpose> | |
10 | + </refnamediv> | |
11 | + | |
12 | + <refsynopsisdiv> | |
13 | + <funcsynopsis> | |
14 | + <funcprototype> | |
15 | + <funcdef>int <function>ioctl</function></funcdef> | |
16 | + <paramdef>int <parameter>fd</parameter></paramdef> | |
17 | + <paramdef>int <parameter>request</parameter></paramdef> | |
18 | + <paramdef>struct v4l2_dbg_chip_info | |
19 | +*<parameter>argp</parameter></paramdef> | |
20 | + </funcprototype> | |
21 | + </funcsynopsis> | |
22 | + </refsynopsisdiv> | |
23 | + | |
24 | + <refsect1> | |
25 | + <title>Arguments</title> | |
26 | + | |
27 | + <variablelist> | |
28 | + <varlistentry> | |
29 | + <term><parameter>fd</parameter></term> | |
30 | + <listitem> | |
31 | + <para>&fd;</para> | |
32 | + </listitem> | |
33 | + </varlistentry> | |
34 | + <varlistentry> | |
35 | + <term><parameter>request</parameter></term> | |
36 | + <listitem> | |
37 | + <para>VIDIOC_DBG_G_CHIP_INFO</para> | |
38 | + </listitem> | |
39 | + </varlistentry> | |
40 | + <varlistentry> | |
41 | + <term><parameter>argp</parameter></term> | |
42 | + <listitem> | |
43 | + <para></para> | |
44 | + </listitem> | |
45 | + </varlistentry> | |
46 | + </variablelist> | |
47 | + </refsect1> | |
48 | + | |
49 | + <refsect1> | |
50 | + <title>Description</title> | |
51 | + | |
52 | + <note> | |
53 | + <title>Experimental</title> | |
54 | + | |
55 | + <para>This is an <link | |
56 | +linkend="experimental">experimental</link> interface and may change in | |
57 | +the future.</para> | |
58 | + </note> | |
59 | + | |
60 | + <para>For driver debugging purposes this ioctl allows test | |
61 | +applications to query the driver about the chips present on the TV | |
62 | +card. Regular applications must not use it. When you found a chip | |
63 | +specific bug, please contact the linux-media mailing list (&v4l-ml;) | |
64 | +so it can be fixed.</para> | |
65 | + | |
66 | + <para>Additionally the Linux kernel must be compiled with the | |
67 | +<constant>CONFIG_VIDEO_ADV_DEBUG</constant> option to enable this ioctl.</para> | |
68 | + | |
69 | + <para>To query the driver applications must initialize the | |
70 | +<structfield>match.type</structfield> and | |
71 | +<structfield>match.addr</structfield> or <structfield>match.name</structfield> | |
72 | +fields of a &v4l2-dbg-chip-info; | |
73 | +and call <constant>VIDIOC_DBG_G_CHIP_INFO</constant> with a pointer to | |
74 | +this structure. On success the driver stores information about the | |
75 | +selected chip in the <structfield>name</structfield> and | |
76 | +<structfield>flags</structfield> fields. On failure the structure | |
77 | +remains unchanged.</para> | |
78 | + | |
79 | + <para>When <structfield>match.type</structfield> is | |
80 | +<constant>V4L2_CHIP_MATCH_BRIDGE</constant>, | |
81 | +<structfield>match.addr</structfield> selects the nth bridge 'chip' | |
82 | +on the TV card. You can enumerate all chips by starting at zero and | |
83 | +incrementing <structfield>match.addr</structfield> by one until | |
84 | +<constant>VIDIOC_DBG_G_CHIP_INFO</constant> fails with an &EINVAL;. | |
85 | +The number zero always selects the bridge chip itself, ⪚ the chip | |
86 | +connected to the PCI or USB bus. Non-zero numbers identify specific | |
87 | +parts of the bridge chip such as an AC97 register block.</para> | |
88 | + | |
89 | + <para>When <structfield>match.type</structfield> is | |
90 | +<constant>V4L2_CHIP_MATCH_SUBDEV</constant>, | |
91 | +<structfield>match.addr</structfield> selects the nth sub-device. This | |
92 | +allows you to enumerate over all sub-devices.</para> | |
93 | + | |
94 | + <para>On success, the <structfield>name</structfield> field will | |
95 | +contain a chip name and the <structfield>flags</structfield> field will | |
96 | +contain <constant>V4L2_CHIP_FL_READABLE</constant> if the driver supports | |
97 | +reading registers from the device or <constant>V4L2_CHIP_FL_WRITABLE</constant> | |
98 | +if the driver supports writing registers to the device.</para> | |
99 | + | |
100 | + <para>We recommended the <application>v4l2-dbg</application> | |
101 | +utility over calling this ioctl directly. It is available from the | |
102 | +LinuxTV v4l-dvb repository; see <ulink | |
103 | +url="http://linuxtv.org/repo/">http://linuxtv.org/repo/</ulink> for | |
104 | +access instructions.</para> | |
105 | + | |
106 | + <!-- Note for convenience vidioc-dbg-g-register.sgml | |
107 | + contains a duplicate of this table. --> | |
108 | + <table pgwide="1" frame="none" id="name-v4l2-dbg-match"> | |
109 | + <title>struct <structname>v4l2_dbg_match</structname></title> | |
110 | + <tgroup cols="4"> | |
111 | + &cs-ustr; | |
112 | + <tbody valign="top"> | |
113 | + <row> | |
114 | + <entry>__u32</entry> | |
115 | + <entry><structfield>type</structfield></entry> | |
116 | + <entry>See <xref linkend="name-chip-match-types" /> for a list of | |
117 | +possible types.</entry> | |
118 | + </row> | |
119 | + <row> | |
120 | + <entry>union</entry> | |
121 | + <entry>(anonymous)</entry> | |
122 | + </row> | |
123 | + <row> | |
124 | + <entry></entry> | |
125 | + <entry>__u32</entry> | |
126 | + <entry><structfield>addr</structfield></entry> | |
127 | + <entry>Match a chip by this number, interpreted according | |
128 | +to the <structfield>type</structfield> field.</entry> | |
129 | + </row> | |
130 | + <row> | |
131 | + <entry></entry> | |
132 | + <entry>char</entry> | |
133 | + <entry><structfield>name[32]</structfield></entry> | |
134 | + <entry>Match a chip by this name, interpreted according | |
135 | +to the <structfield>type</structfield> field.</entry> | |
136 | + </row> | |
137 | + </tbody> | |
138 | + </tgroup> | |
139 | + </table> | |
140 | + | |
141 | + <table pgwide="1" frame="none" id="v4l2-dbg-chip-info"> | |
142 | + <title>struct <structname>v4l2_dbg_chip_info</structname></title> | |
143 | + <tgroup cols="3"> | |
144 | + &cs-str; | |
145 | + <tbody valign="top"> | |
146 | + <row> | |
147 | + <entry>struct v4l2_dbg_match</entry> | |
148 | + <entry><structfield>match</structfield></entry> | |
149 | + <entry>How to match the chip, see <xref linkend="name-v4l2-dbg-match" />.</entry> | |
150 | + </row> | |
151 | + <row> | |
152 | + <entry>char</entry> | |
153 | + <entry><structfield>name[32]</structfield></entry> | |
154 | + <entry>The name of the chip.</entry> | |
155 | + </row> | |
156 | + <row> | |
157 | + <entry>__u32</entry> | |
158 | + <entry><structfield>flags</structfield></entry> | |
159 | + <entry>Set by the driver. If <constant>V4L2_CHIP_FL_READABLE</constant> | |
160 | +is set, then the driver supports reading registers from the device. If | |
161 | +<constant>V4L2_CHIP_FL_WRITABLE</constant> is set, then it supports writing registers.</entry> | |
162 | + </row> | |
163 | + <row> | |
164 | + <entry>__u32</entry> | |
165 | + <entry><structfield>reserved[8]</structfield></entry> | |
166 | + <entry>Reserved fields, both application and driver must set these to 0.</entry> | |
167 | + </row> | |
168 | + </tbody> | |
169 | + </tgroup> | |
170 | + </table> | |
171 | + | |
172 | + <!-- Note for convenience vidioc-dbg-g-register.sgml | |
173 | + contains a duplicate of this table. --> | |
174 | + <table pgwide="1" frame="none" id="name-chip-match-types"> | |
175 | + <title>Chip Match Types</title> | |
176 | + <tgroup cols="3"> | |
177 | + &cs-def; | |
178 | + <tbody valign="top"> | |
179 | + <row> | |
180 | + <entry><constant>V4L2_CHIP_MATCH_BRIDGE</constant></entry> | |
181 | + <entry>0</entry> | |
182 | + <entry>Match the nth chip on the card, zero for the | |
183 | + bridge chip. Does not match sub-devices.</entry> | |
184 | + </row> | |
185 | + <row> | |
186 | + <entry><constant>V4L2_CHIP_MATCH_I2C_DRIVER</constant></entry> | |
187 | + <entry>1</entry> | |
188 | + <entry>Match an &i2c; chip by its driver name. Can't be used with this ioctl.</entry> | |
189 | + </row> | |
190 | + <row> | |
191 | + <entry><constant>V4L2_CHIP_MATCH_I2C_ADDR</constant></entry> | |
192 | + <entry>2</entry> | |
193 | + <entry>Match a chip by its 7 bit &i2c; bus address. Can't be used with this ioctl.</entry> | |
194 | + </row> | |
195 | + <row> | |
196 | + <entry><constant>V4L2_CHIP_MATCH_AC97</constant></entry> | |
197 | + <entry>3</entry> | |
198 | + <entry>Match the nth anciliary AC97 chip. Can't be used with this ioctl.</entry> | |
199 | + </row> | |
200 | + <row> | |
201 | + <entry><constant>V4L2_CHIP_MATCH_SUBDEV</constant></entry> | |
202 | + <entry>4</entry> | |
203 | + <entry>Match the nth sub-device.</entry> | |
204 | + </row> | |
205 | + </tbody> | |
206 | + </tgroup> | |
207 | + </table> | |
208 | + </refsect1> | |
209 | + | |
210 | + <refsect1> | |
211 | + &return-value; | |
212 | + | |
213 | + <variablelist> | |
214 | + <varlistentry> | |
215 | + <term><errorcode>EINVAL</errorcode></term> | |
216 | + <listitem> | |
217 | + <para>The <structfield>match_type</structfield> is invalid or | |
218 | +no device could be matched.</para> | |
219 | + </listitem> | |
220 | + </varlistentry> | |
221 | + </variablelist> | |
222 | + </refsect1> | |
223 | +</refentry> |
Documentation/DocBook/media/v4l/vidioc-dbg-g-chip-name.xml
1 | -<refentry id="vidioc-dbg-g-chip-name"> | |
2 | - <refmeta> | |
3 | - <refentrytitle>ioctl VIDIOC_DBG_G_CHIP_NAME</refentrytitle> | |
4 | - &manvol; | |
5 | - </refmeta> | |
6 | - | |
7 | - <refnamediv> | |
8 | - <refname>VIDIOC_DBG_G_CHIP_NAME</refname> | |
9 | - <refpurpose>Identify the chips on a TV card</refpurpose> | |
10 | - </refnamediv> | |
11 | - | |
12 | - <refsynopsisdiv> | |
13 | - <funcsynopsis> | |
14 | - <funcprototype> | |
15 | - <funcdef>int <function>ioctl</function></funcdef> | |
16 | - <paramdef>int <parameter>fd</parameter></paramdef> | |
17 | - <paramdef>int <parameter>request</parameter></paramdef> | |
18 | - <paramdef>struct v4l2_dbg_chip_name | |
19 | -*<parameter>argp</parameter></paramdef> | |
20 | - </funcprototype> | |
21 | - </funcsynopsis> | |
22 | - </refsynopsisdiv> | |
23 | - | |
24 | - <refsect1> | |
25 | - <title>Arguments</title> | |
26 | - | |
27 | - <variablelist> | |
28 | - <varlistentry> | |
29 | - <term><parameter>fd</parameter></term> | |
30 | - <listitem> | |
31 | - <para>&fd;</para> | |
32 | - </listitem> | |
33 | - </varlistentry> | |
34 | - <varlistentry> | |
35 | - <term><parameter>request</parameter></term> | |
36 | - <listitem> | |
37 | - <para>VIDIOC_DBG_G_CHIP_NAME</para> | |
38 | - </listitem> | |
39 | - </varlistentry> | |
40 | - <varlistentry> | |
41 | - <term><parameter>argp</parameter></term> | |
42 | - <listitem> | |
43 | - <para></para> | |
44 | - </listitem> | |
45 | - </varlistentry> | |
46 | - </variablelist> | |
47 | - </refsect1> | |
48 | - | |
49 | - <refsect1> | |
50 | - <title>Description</title> | |
51 | - | |
52 | - <note> | |
53 | - <title>Experimental</title> | |
54 | - | |
55 | - <para>This is an <link | |
56 | -linkend="experimental">experimental</link> interface and may change in | |
57 | -the future.</para> | |
58 | - </note> | |
59 | - | |
60 | - <para>For driver debugging purposes this ioctl allows test | |
61 | -applications to query the driver about the chips present on the TV | |
62 | -card. Regular applications must not use it. When you found a chip | |
63 | -specific bug, please contact the linux-media mailing list (&v4l-ml;) | |
64 | -so it can be fixed.</para> | |
65 | - | |
66 | - <para>Additionally the Linux kernel must be compiled with the | |
67 | -<constant>CONFIG_VIDEO_ADV_DEBUG</constant> option to enable this ioctl.</para> | |
68 | - | |
69 | - <para>To query the driver applications must initialize the | |
70 | -<structfield>match.type</structfield> and | |
71 | -<structfield>match.addr</structfield> or <structfield>match.name</structfield> | |
72 | -fields of a &v4l2-dbg-chip-name; | |
73 | -and call <constant>VIDIOC_DBG_G_CHIP_NAME</constant> with a pointer to | |
74 | -this structure. On success the driver stores information about the | |
75 | -selected chip in the <structfield>name</structfield> and | |
76 | -<structfield>flags</structfield> fields. On failure the structure | |
77 | -remains unchanged.</para> | |
78 | - | |
79 | - <para>When <structfield>match.type</structfield> is | |
80 | -<constant>V4L2_CHIP_MATCH_BRIDGE</constant>, | |
81 | -<structfield>match.addr</structfield> selects the nth bridge 'chip' | |
82 | -on the TV card. You can enumerate all chips by starting at zero and | |
83 | -incrementing <structfield>match.addr</structfield> by one until | |
84 | -<constant>VIDIOC_DBG_G_CHIP_NAME</constant> fails with an &EINVAL;. | |
85 | -The number zero always selects the bridge chip itself, ⪚ the chip | |
86 | -connected to the PCI or USB bus. Non-zero numbers identify specific | |
87 | -parts of the bridge chip such as an AC97 register block.</para> | |
88 | - | |
89 | - <para>When <structfield>match.type</structfield> is | |
90 | -<constant>V4L2_CHIP_MATCH_SUBDEV</constant>, | |
91 | -<structfield>match.addr</structfield> selects the nth sub-device. This | |
92 | -allows you to enumerate over all sub-devices.</para> | |
93 | - | |
94 | - <para>On success, the <structfield>name</structfield> field will | |
95 | -contain a chip name and the <structfield>flags</structfield> field will | |
96 | -contain <constant>V4L2_CHIP_FL_READABLE</constant> if the driver supports | |
97 | -reading registers from the device or <constant>V4L2_CHIP_FL_WRITABLE</constant> | |
98 | -if the driver supports writing registers to the device.</para> | |
99 | - | |
100 | - <para>We recommended the <application>v4l2-dbg</application> | |
101 | -utility over calling this ioctl directly. It is available from the | |
102 | -LinuxTV v4l-dvb repository; see <ulink | |
103 | -url="http://linuxtv.org/repo/">http://linuxtv.org/repo/</ulink> for | |
104 | -access instructions.</para> | |
105 | - | |
106 | - <!-- Note for convenience vidioc-dbg-g-register.sgml | |
107 | - contains a duplicate of this table. --> | |
108 | - <table pgwide="1" frame="none" id="name-v4l2-dbg-match"> | |
109 | - <title>struct <structname>v4l2_dbg_match</structname></title> | |
110 | - <tgroup cols="4"> | |
111 | - &cs-ustr; | |
112 | - <tbody valign="top"> | |
113 | - <row> | |
114 | - <entry>__u32</entry> | |
115 | - <entry><structfield>type</structfield></entry> | |
116 | - <entry>See <xref linkend="name-chip-match-types" /> for a list of | |
117 | -possible types.</entry> | |
118 | - </row> | |
119 | - <row> | |
120 | - <entry>union</entry> | |
121 | - <entry>(anonymous)</entry> | |
122 | - </row> | |
123 | - <row> | |
124 | - <entry></entry> | |
125 | - <entry>__u32</entry> | |
126 | - <entry><structfield>addr</structfield></entry> | |
127 | - <entry>Match a chip by this number, interpreted according | |
128 | -to the <structfield>type</structfield> field.</entry> | |
129 | - </row> | |
130 | - <row> | |
131 | - <entry></entry> | |
132 | - <entry>char</entry> | |
133 | - <entry><structfield>name[32]</structfield></entry> | |
134 | - <entry>Match a chip by this name, interpreted according | |
135 | -to the <structfield>type</structfield> field.</entry> | |
136 | - </row> | |
137 | - </tbody> | |
138 | - </tgroup> | |
139 | - </table> | |
140 | - | |
141 | - <table pgwide="1" frame="none" id="v4l2-dbg-chip-name"> | |
142 | - <title>struct <structname>v4l2_dbg_chip_name</structname></title> | |
143 | - <tgroup cols="3"> | |
144 | - &cs-str; | |
145 | - <tbody valign="top"> | |
146 | - <row> | |
147 | - <entry>struct v4l2_dbg_match</entry> | |
148 | - <entry><structfield>match</structfield></entry> | |
149 | - <entry>How to match the chip, see <xref linkend="name-v4l2-dbg-match" />.</entry> | |
150 | - </row> | |
151 | - <row> | |
152 | - <entry>char</entry> | |
153 | - <entry><structfield>name[32]</structfield></entry> | |
154 | - <entry>The name of the chip.</entry> | |
155 | - </row> | |
156 | - <row> | |
157 | - <entry>__u32</entry> | |
158 | - <entry><structfield>flags</structfield></entry> | |
159 | - <entry>Set by the driver. If <constant>V4L2_CHIP_FL_READABLE</constant> | |
160 | -is set, then the driver supports reading registers from the device. If | |
161 | -<constant>V4L2_CHIP_FL_WRITABLE</constant> is set, then it supports writing registers.</entry> | |
162 | - </row> | |
163 | - <row> | |
164 | - <entry>__u32</entry> | |
165 | - <entry><structfield>reserved[8]</structfield></entry> | |
166 | - <entry>Reserved fields, both application and driver must set these to 0.</entry> | |
167 | - </row> | |
168 | - </tbody> | |
169 | - </tgroup> | |
170 | - </table> | |
171 | - | |
172 | - <!-- Note for convenience vidioc-dbg-g-register.sgml | |
173 | - contains a duplicate of this table. --> | |
174 | - <table pgwide="1" frame="none" id="name-chip-match-types"> | |
175 | - <title>Chip Match Types</title> | |
176 | - <tgroup cols="3"> | |
177 | - &cs-def; | |
178 | - <tbody valign="top"> | |
179 | - <row> | |
180 | - <entry><constant>V4L2_CHIP_MATCH_BRIDGE</constant></entry> | |
181 | - <entry>0</entry> | |
182 | - <entry>Match the nth chip on the card, zero for the | |
183 | - bridge chip. Does not match sub-devices.</entry> | |
184 | - </row> | |
185 | - <row> | |
186 | - <entry><constant>V4L2_CHIP_MATCH_I2C_DRIVER</constant></entry> | |
187 | - <entry>1</entry> | |
188 | - <entry>Match an &i2c; chip by its driver name. Can't be used with this ioctl.</entry> | |
189 | - </row> | |
190 | - <row> | |
191 | - <entry><constant>V4L2_CHIP_MATCH_I2C_ADDR</constant></entry> | |
192 | - <entry>2</entry> | |
193 | - <entry>Match a chip by its 7 bit &i2c; bus address. Can't be used with this ioctl.</entry> | |
194 | - </row> | |
195 | - <row> | |
196 | - <entry><constant>V4L2_CHIP_MATCH_AC97</constant></entry> | |
197 | - <entry>3</entry> | |
198 | - <entry>Match the nth anciliary AC97 chip. Can't be used with this ioctl.</entry> | |
199 | - </row> | |
200 | - <row> | |
201 | - <entry><constant>V4L2_CHIP_MATCH_SUBDEV</constant></entry> | |
202 | - <entry>4</entry> | |
203 | - <entry>Match the nth sub-device.</entry> | |
204 | - </row> | |
205 | - </tbody> | |
206 | - </tgroup> | |
207 | - </table> | |
208 | - </refsect1> | |
209 | - | |
210 | - <refsect1> | |
211 | - &return-value; | |
212 | - | |
213 | - <variablelist> | |
214 | - <varlistentry> | |
215 | - <term><errorcode>EINVAL</errorcode></term> | |
216 | - <listitem> | |
217 | - <para>The <structfield>match_type</structfield> is invalid or | |
218 | -no device could be matched.</para> | |
219 | - </listitem> | |
220 | - </varlistentry> | |
221 | - </variablelist> | |
222 | - </refsect1> | |
223 | -</refentry> |
Documentation/DocBook/media/v4l/vidioc-dbg-g-register.xml
... | ... | @@ -99,7 +99,7 @@ |
99 | 99 | <structfield>match.addr</structfield> selects the nth non-sub-device chip |
100 | 100 | on the TV card. The number zero always selects the host chip, ⪚ the |
101 | 101 | chip connected to the PCI or USB bus. You can find out which chips are |
102 | -present with the &VIDIOC-DBG-G-CHIP-NAME; ioctl.</para> | |
102 | +present with the &VIDIOC-DBG-G-CHIP-INFO; ioctl.</para> | |
103 | 103 | |
104 | 104 | <para>When <structfield>match.type</structfield> is |
105 | 105 | <constant>V4L2_CHIP_MATCH_I2C_DRIVER</constant>, |
... | ... | @@ -109,7 +109,7 @@ |
109 | 109 | supported by the saa7127 driver, regardless of its &i2c; bus address. |
110 | 110 | When multiple chips supported by the same driver are present, the |
111 | 111 | effect of these ioctls is undefined. Again with the |
112 | -&VIDIOC-DBG-G-CHIP-NAME; ioctl you can find out which &i2c; chips are | |
112 | +&VIDIOC-DBG-G-CHIP-INFO; ioctl you can find out which &i2c; chips are | |
113 | 113 | present.</para> |
114 | 114 | |
115 | 115 | <para>When <structfield>match.type</structfield> is |
116 | 116 | |
... | ... | @@ -131,14 +131,14 @@ |
131 | 131 | |
132 | 132 | <para>Due to a flaw in the Linux &i2c; bus driver these ioctls may |
133 | 133 | return successfully without actually reading or writing a register. To |
134 | -catch the most likely failure we recommend a &VIDIOC-DBG-G-CHIP-NAME; | |
134 | +catch the most likely failure we recommend a &VIDIOC-DBG-G-CHIP-INFO; | |
135 | 135 | call confirming the presence of the selected &i2c; chip.</para> |
136 | 136 | </note> |
137 | 137 | |
138 | 138 | <para>These ioctls are optional, not all drivers may support them. |
139 | 139 | However when a driver supports these ioctls it must also support |
140 | -&VIDIOC-DBG-G-CHIP-NAME;. Conversely it may support | |
141 | -<constant>VIDIOC_DBG_G_CHIP_NAME</constant> but not these ioctls.</para> | |
140 | +&VIDIOC-DBG-G-CHIP-INFO;. Conversely it may support | |
141 | +<constant>VIDIOC_DBG_G_CHIP_INFO</constant> but not these ioctls.</para> | |
142 | 142 | |
143 | 143 | <para><constant>VIDIOC_DBG_G_REGISTER</constant> and |
144 | 144 | <constant>VIDIOC_DBG_S_REGISTER</constant> were introduced in Linux |
drivers/media/usb/em28xx/em28xx-video.c
... | ... | @@ -1332,8 +1332,8 @@ |
1332 | 1332 | } |
1333 | 1333 | |
1334 | 1334 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
1335 | -static int vidioc_g_chip_name(struct file *file, void *priv, | |
1336 | - struct v4l2_dbg_chip_name *chip) | |
1335 | +static int vidioc_g_chip_info(struct file *file, void *priv, | |
1336 | + struct v4l2_dbg_chip_info *chip) | |
1337 | 1337 | { |
1338 | 1338 | struct em28xx_fh *fh = priv; |
1339 | 1339 | struct em28xx *dev = fh->dev; |
... | ... | @@ -1797,7 +1797,7 @@ |
1797 | 1797 | .vidioc_unsubscribe_event = v4l2_event_unsubscribe, |
1798 | 1798 | .vidioc_g_chip_ident = vidioc_g_chip_ident, |
1799 | 1799 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
1800 | - .vidioc_g_chip_name = vidioc_g_chip_name, | |
1800 | + .vidioc_g_chip_info = vidioc_g_chip_info, | |
1801 | 1801 | .vidioc_g_register = vidioc_g_register, |
1802 | 1802 | .vidioc_s_register = vidioc_s_register, |
1803 | 1803 | #endif |
... | ... | @@ -1827,7 +1827,7 @@ |
1827 | 1827 | .vidioc_subscribe_event = v4l2_ctrl_subscribe_event, |
1828 | 1828 | .vidioc_unsubscribe_event = v4l2_event_unsubscribe, |
1829 | 1829 | .vidioc_g_chip_ident = vidioc_g_chip_ident, |
1830 | - .vidioc_g_chip_name = vidioc_g_chip_name, | |
1830 | + .vidioc_g_chip_info = vidioc_g_chip_info, | |
1831 | 1831 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
1832 | 1832 | .vidioc_g_register = vidioc_g_register, |
1833 | 1833 | .vidioc_s_register = vidioc_s_register, |
drivers/media/v4l2-core/v4l2-dev.c
... | ... | @@ -592,7 +592,7 @@ |
592 | 592 | SET_VALID_IOCTL(ops, VIDIOC_S_FREQUENCY, vidioc_s_frequency); |
593 | 593 | SET_VALID_IOCTL(ops, VIDIOC_LOG_STATUS, vidioc_log_status); |
594 | 594 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
595 | - set_bit(_IOC_NR(VIDIOC_DBG_G_CHIP_NAME), valid_ioctls); | |
595 | + set_bit(_IOC_NR(VIDIOC_DBG_G_CHIP_INFO), valid_ioctls); | |
596 | 596 | set_bit(_IOC_NR(VIDIOC_DBG_G_REGISTER), valid_ioctls); |
597 | 597 | set_bit(_IOC_NR(VIDIOC_DBG_S_REGISTER), valid_ioctls); |
598 | 598 | #endif |
drivers/media/v4l2-core/v4l2-ioctl.c
... | ... | @@ -638,9 +638,9 @@ |
638 | 638 | p->ident, p->revision); |
639 | 639 | } |
640 | 640 | |
641 | -static void v4l_print_dbg_chip_name(const void *arg, bool write_only) | |
641 | +static void v4l_print_dbg_chip_info(const void *arg, bool write_only) | |
642 | 642 | { |
643 | - const struct v4l2_dbg_chip_name *p = arg; | |
643 | + const struct v4l2_dbg_chip_info *p = arg; | |
644 | 644 | |
645 | 645 | pr_cont("type=%u, ", p->match.type); |
646 | 646 | if (p->match.type == V4L2_CHIP_MATCH_I2C_DRIVER) |
647 | 647 | |
... | ... | @@ -1854,12 +1854,12 @@ |
1854 | 1854 | return ops->vidioc_g_chip_ident(file, fh, p); |
1855 | 1855 | } |
1856 | 1856 | |
1857 | -static int v4l_dbg_g_chip_name(const struct v4l2_ioctl_ops *ops, | |
1857 | +static int v4l_dbg_g_chip_info(const struct v4l2_ioctl_ops *ops, | |
1858 | 1858 | struct file *file, void *fh, void *arg) |
1859 | 1859 | { |
1860 | 1860 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
1861 | 1861 | struct video_device *vfd = video_devdata(file); |
1862 | - struct v4l2_dbg_chip_name *p = arg; | |
1862 | + struct v4l2_dbg_chip_info *p = arg; | |
1863 | 1863 | struct v4l2_subdev *sd; |
1864 | 1864 | int idx = 0; |
1865 | 1865 | |
... | ... | @@ -1875,8 +1875,8 @@ |
1875 | 1875 | strlcpy(p->name, vfd->parent->driver->name, sizeof(p->name)); |
1876 | 1876 | else |
1877 | 1877 | strlcpy(p->name, "bridge", sizeof(p->name)); |
1878 | - if (ops->vidioc_g_chip_name) | |
1879 | - return ops->vidioc_g_chip_name(file, fh, arg); | |
1878 | + if (ops->vidioc_g_chip_info) | |
1879 | + return ops->vidioc_g_chip_info(file, fh, arg); | |
1880 | 1880 | if (p->match.addr) |
1881 | 1881 | return -EINVAL; |
1882 | 1882 | return 0; |
... | ... | @@ -2116,7 +2116,7 @@ |
2116 | 2116 | IOCTL_INFO_STD(VIDIOC_QUERY_DV_TIMINGS, vidioc_query_dv_timings, v4l_print_dv_timings, 0), |
2117 | 2117 | IOCTL_INFO_STD(VIDIOC_DV_TIMINGS_CAP, vidioc_dv_timings_cap, v4l_print_dv_timings_cap, INFO_FL_CLEAR(v4l2_dv_timings_cap, type)), |
2118 | 2118 | IOCTL_INFO_FNC(VIDIOC_ENUM_FREQ_BANDS, v4l_enum_freq_bands, v4l_print_freq_band, 0), |
2119 | - 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)), | |
2119 | + 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)), | |
2120 | 2120 | }; |
2121 | 2121 | #define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls) |
2122 | 2122 |
include/media/v4l2-ioctl.h
... | ... | @@ -244,8 +244,8 @@ |
244 | 244 | int (*vidioc_s_register) (struct file *file, void *fh, |
245 | 245 | const struct v4l2_dbg_register *reg); |
246 | 246 | |
247 | - int (*vidioc_g_chip_name) (struct file *file, void *fh, | |
248 | - struct v4l2_dbg_chip_name *chip); | |
247 | + int (*vidioc_g_chip_info) (struct file *file, void *fh, | |
248 | + struct v4l2_dbg_chip_info *chip); | |
249 | 249 | #endif |
250 | 250 | int (*vidioc_g_chip_ident) (struct file *file, void *fh, |
251 | 251 | struct v4l2_dbg_chip_ident *chip); |
include/uapi/linux/videodev2.h
... | ... | @@ -1839,8 +1839,8 @@ |
1839 | 1839 | #define V4L2_CHIP_FL_READABLE (1 << 0) |
1840 | 1840 | #define V4L2_CHIP_FL_WRITABLE (1 << 1) |
1841 | 1841 | |
1842 | -/* VIDIOC_DBG_G_CHIP_NAME */ | |
1843 | -struct v4l2_dbg_chip_name { | |
1842 | +/* VIDIOC_DBG_G_CHIP_INFO */ | |
1843 | +struct v4l2_dbg_chip_info { | |
1844 | 1844 | struct v4l2_dbg_match match; |
1845 | 1845 | char name[32]; |
1846 | 1846 | __u32 flags; |
... | ... | @@ -1938,7 +1938,7 @@ |
1938 | 1938 | |
1939 | 1939 | /* Experimental, meant for debugging, testing and internal use. |
1940 | 1940 | Never use this ioctl in applications! |
1941 | - Note: this ioctl is deprecated in favor of VIDIOC_DBG_G_CHIP_NAME and | |
1941 | + Note: this ioctl is deprecated in favor of VIDIOC_DBG_G_CHIP_INFO and | |
1942 | 1942 | will go away in the future. */ |
1943 | 1943 | #define VIDIOC_DBG_G_CHIP_IDENT _IOWR('V', 81, struct v4l2_dbg_chip_ident) |
1944 | 1944 | |
... | ... | @@ -1976,7 +1976,7 @@ |
1976 | 1976 | |
1977 | 1977 | /* Experimental, meant for debugging, testing and internal use. |
1978 | 1978 | Never use these in applications! */ |
1979 | -#define VIDIOC_DBG_G_CHIP_NAME _IOWR('V', 102, struct v4l2_dbg_chip_name) | |
1979 | +#define VIDIOC_DBG_G_CHIP_INFO _IOWR('V', 102, struct v4l2_dbg_chip_info) | |
1980 | 1980 | |
1981 | 1981 | /* Reminder: when adding new ioctls please add support for them to |
1982 | 1982 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ |