diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-13 15:09:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-13 15:09:57 -0400 |
commit | 858655116bfc722837e3aec0909b8e9d08f96996 (patch) | |
tree | ef9171d51ffcd01e40d1131d62be32e5a7d371dc /Documentation | |
parent | 239dab4636f7f5f971ac39b5ca84254cff112cac (diff) | |
parent | 1b2c14b44adcb7836528640bfdc40bf7499d987d (diff) |
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab:
"This series contain:
- new i2c video drivers: ml86v7667 (video decoder),
ths8200 (video encoder)
- a new video driver for EasyCap cards based on Fushicai USBTV007
- Improved support for OF and embedded systems, with V4L2 async
initialization and a better support for clocks
- API cleanups on the ioctls used by the v4l2 debug tool
- Lots of cleanups
- As usual, several driver improvements and new cards additions
- Revert two changesets that change the minimal symbol rate for
stv0399, as request by Manu
- Update MAINTAINERS and other files to point to my new e-mail"
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (378 commits)
MAINTAINERS & ABI: Update to point to my new email
[media] stb0899: restore minimal rate to 5Mbauds
[media] exynos4-is: Correct colorspace handling at FIMC-LITE
[media] exynos4-is: Set valid initial format on FIMC.n subdevs
[media] exynos4-is: Set valid initial format on FIMC-IS-ISP subdev pads
[media] exynos4-is: Fix format propagation on FIMC-IS-ISP subdev
[media] exynos4-is: Set valid initial format at FIMC-LITE
[media] exynos4-is: Fix format propagation on FIMC-LITE.n subdevs
[media] MAINTAINERS: Update S5P/Exynos FIMC driver entry
[media] Documentation: Update driver's directory in video4linux/fimc.txt
[media] exynos4-is: Change fimc-is firmware file names
[media] exynos4-is: Add support for Exynos5250 MIPI-CSIS
[media] exynos4-is: Add Exynos5250 SoC support to fimc-lite driver
[media] exynos4-is: Drop drvdata handling in fimc-lite for non-dt platforms
[media] media: i2c: tvp514x: remove manual setting of subdev name
[media] media: i2c: tvp7002: remove manual setting of subdev name
[media] mem2mem: set missing v4l2_dev pointer
[media] wl128x: add missing struct v4l2_device
[media] tvp514x: Fix init seqeunce
[media] saa7134: Fix sparse warnings by adding __user annotation
...
Diffstat (limited to 'Documentation')
20 files changed, 278 insertions, 406 deletions
diff --git a/Documentation/ABI/testing/sysfs-devices-edac b/Documentation/ABI/testing/sysfs-devices-edac index 30ee78aaed75..6568e0010e1a 100644 --- a/Documentation/ABI/testing/sysfs-devices-edac +++ b/Documentation/ABI/testing/sysfs-devices-edac | |||
@@ -77,7 +77,7 @@ Description: Read/Write attribute file that controls memory scrubbing. | |||
77 | 77 | ||
78 | What: /sys/devices/system/edac/mc/mc*/max_location | 78 | What: /sys/devices/system/edac/mc/mc*/max_location |
79 | Date: April 2012 | 79 | Date: April 2012 |
80 | Contact: Mauro Carvalho Chehab <mchehab@redhat.com> | 80 | Contact: Mauro Carvalho Chehab <m.chehab@samsung.com> |
81 | linux-edac@vger.kernel.org | 81 | linux-edac@vger.kernel.org |
82 | Description: This attribute file displays the information about the last | 82 | Description: This attribute file displays the information about the last |
83 | available memory slot in this memory controller. It is used by | 83 | available memory slot in this memory controller. It is used by |
@@ -85,7 +85,7 @@ Description: This attribute file displays the information about the last | |||
85 | 85 | ||
86 | What: /sys/devices/system/edac/mc/mc*/(dimm|rank)*/size | 86 | What: /sys/devices/system/edac/mc/mc*/(dimm|rank)*/size |
87 | Date: April 2012 | 87 | Date: April 2012 |
88 | Contact: Mauro Carvalho Chehab <mchehab@redhat.com> | 88 | Contact: Mauro Carvalho Chehab <m.chehab@samsung.com> |
89 | linux-edac@vger.kernel.org | 89 | linux-edac@vger.kernel.org |
90 | Description: This attribute file will display the size of dimm or rank. | 90 | Description: This attribute file will display the size of dimm or rank. |
91 | For dimm*/size, this is the size, in MB of the DIMM memory | 91 | For dimm*/size, this is the size, in MB of the DIMM memory |
@@ -96,14 +96,14 @@ Description: This attribute file will display the size of dimm or rank. | |||
96 | 96 | ||
97 | What: /sys/devices/system/edac/mc/mc*/(dimm|rank)*/dimm_dev_type | 97 | What: /sys/devices/system/edac/mc/mc*/(dimm|rank)*/dimm_dev_type |
98 | Date: April 2012 | 98 | Date: April 2012 |
99 | Contact: Mauro Carvalho Chehab <mchehab@redhat.com> | 99 | Contact: Mauro Carvalho Chehab <m.chehab@samsung.com> |
100 | linux-edac@vger.kernel.org | 100 | linux-edac@vger.kernel.org |
101 | Description: This attribute file will display what type of DRAM device is | 101 | Description: This attribute file will display what type of DRAM device is |
102 | being utilized on this DIMM (x1, x2, x4, x8, ...). | 102 | being utilized on this DIMM (x1, x2, x4, x8, ...). |
103 | 103 | ||
104 | What: /sys/devices/system/edac/mc/mc*/(dimm|rank)*/dimm_edac_mode | 104 | What: /sys/devices/system/edac/mc/mc*/(dimm|rank)*/dimm_edac_mode |
105 | Date: April 2012 | 105 | Date: April 2012 |
106 | Contact: Mauro Carvalho Chehab <mchehab@redhat.com> | 106 | Contact: Mauro Carvalho Chehab <m.chehab@samsung.com> |
107 | linux-edac@vger.kernel.org | 107 | linux-edac@vger.kernel.org |
108 | Description: This attribute file will display what type of Error detection | 108 | Description: This attribute file will display what type of Error detection |
109 | and correction is being utilized. For example: S4ECD4ED would | 109 | and correction is being utilized. For example: S4ECD4ED would |
@@ -111,7 +111,7 @@ Description: This attribute file will display what type of Error detection | |||
111 | 111 | ||
112 | What: /sys/devices/system/edac/mc/mc*/(dimm|rank)*/dimm_label | 112 | What: /sys/devices/system/edac/mc/mc*/(dimm|rank)*/dimm_label |
113 | Date: April 2012 | 113 | Date: April 2012 |
114 | Contact: Mauro Carvalho Chehab <mchehab@redhat.com> | 114 | Contact: Mauro Carvalho Chehab <m.chehab@samsung.com> |
115 | linux-edac@vger.kernel.org | 115 | linux-edac@vger.kernel.org |
116 | Description: This control file allows this DIMM to have a label assigned | 116 | Description: This control file allows this DIMM to have a label assigned |
117 | to it. With this label in the module, when errors occur | 117 | to it. With this label in the module, when errors occur |
@@ -126,14 +126,14 @@ Description: This control file allows this DIMM to have a label assigned | |||
126 | 126 | ||
127 | What: /sys/devices/system/edac/mc/mc*/(dimm|rank)*/dimm_location | 127 | What: /sys/devices/system/edac/mc/mc*/(dimm|rank)*/dimm_location |
128 | Date: April 2012 | 128 | Date: April 2012 |
129 | Contact: Mauro Carvalho Chehab <mchehab@redhat.com> | 129 | Contact: Mauro Carvalho Chehab <m.chehab@samsung.com> |
130 | linux-edac@vger.kernel.org | 130 | linux-edac@vger.kernel.org |
131 | Description: This attribute file will display the location (csrow/channel, | 131 | Description: This attribute file will display the location (csrow/channel, |
132 | branch/channel/slot or channel/slot) of the dimm or rank. | 132 | branch/channel/slot or channel/slot) of the dimm or rank. |
133 | 133 | ||
134 | What: /sys/devices/system/edac/mc/mc*/(dimm|rank)*/dimm_mem_type | 134 | What: /sys/devices/system/edac/mc/mc*/(dimm|rank)*/dimm_mem_type |
135 | Date: April 2012 | 135 | Date: April 2012 |
136 | Contact: Mauro Carvalho Chehab <mchehab@redhat.com> | 136 | Contact: Mauro Carvalho Chehab <m.chehab@samsung.com> |
137 | linux-edac@vger.kernel.org | 137 | linux-edac@vger.kernel.org |
138 | Description: This attribute file will display what type of memory is | 138 | Description: This attribute file will display what type of memory is |
139 | currently on this csrow. Normally, either buffered or | 139 | currently on this csrow. Normally, either buffered or |
diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml index f43542ae2981..0c7195e3e093 100644 --- a/Documentation/DocBook/media/v4l/compat.xml +++ b/Documentation/DocBook/media/v4l/compat.xml | |||
@@ -2254,7 +2254,7 @@ video encoding.</para> | |||
2254 | <orderedlist> | 2254 | <orderedlist> |
2255 | <listitem> | 2255 | <listitem> |
2256 | <para>The <constant>VIDIOC_G_CHIP_IDENT</constant> ioctl was renamed | 2256 | <para>The <constant>VIDIOC_G_CHIP_IDENT</constant> ioctl was renamed |
2257 | to <constant>VIDIOC_G_CHIP_IDENT_OLD</constant> and &VIDIOC-DBG-G-CHIP-IDENT; | 2257 | to <constant>VIDIOC_G_CHIP_IDENT_OLD</constant> and <constant>VIDIOC_DBG_G_CHIP_IDENT</constant> |
2258 | was introduced in its place. The old struct <structname>v4l2_chip_ident</structname> | 2258 | was introduced in its place. The old struct <structname>v4l2_chip_ident</structname> |
2259 | was renamed to <structname id="v4l2-chip-ident-old">v4l2_chip_ident_old</structname>.</para> | 2259 | was renamed to <structname id="v4l2-chip-ident-old">v4l2_chip_ident_old</structname>.</para> |
2260 | </listitem> | 2260 | </listitem> |
@@ -2513,6 +2513,16 @@ that used it. It was originally scheduled for removal in 2.6.35. | |||
2513 | </orderedlist> | 2513 | </orderedlist> |
2514 | </section> | 2514 | </section> |
2515 | 2515 | ||
2516 | <section> | ||
2517 | <title>V4L2 in Linux 3.11</title> | ||
2518 | <orderedlist> | ||
2519 | <listitem> | ||
2520 | <para>Remove obsolete <constant>VIDIOC_DBG_G_CHIP_IDENT</constant> ioctl. | ||
2521 | </para> | ||
2522 | </listitem> | ||
2523 | </orderedlist> | ||
2524 | </section> | ||
2525 | |||
2516 | <section id="other"> | 2526 | <section id="other"> |
2517 | <title>Relation of V4L2 to other Linux multimedia APIs</title> | 2527 | <title>Relation of V4L2 to other Linux multimedia APIs</title> |
2518 | 2528 | ||
@@ -2596,7 +2606,7 @@ and may change in the future.</para> | |||
2596 | ioctls.</para> | 2606 | ioctls.</para> |
2597 | </listitem> | 2607 | </listitem> |
2598 | <listitem> | 2608 | <listitem> |
2599 | <para>&VIDIOC-DBG-G-CHIP-IDENT; ioctl.</para> | 2609 | <para>&VIDIOC-DBG-G-CHIP-INFO; ioctl.</para> |
2600 | </listitem> | 2610 | </listitem> |
2601 | <listitem> | 2611 | <listitem> |
2602 | <para>&VIDIOC-ENUM-DV-TIMINGS;, &VIDIOC-QUERY-DV-TIMINGS; and | 2612 | <para>&VIDIOC-ENUM-DV-TIMINGS;, &VIDIOC-QUERY-DV-TIMINGS; and |
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml index bfe823dd0f31..8469fe13945c 100644 --- a/Documentation/DocBook/media/v4l/v4l2.xml +++ b/Documentation/DocBook/media/v4l/v4l2.xml | |||
@@ -141,6 +141,14 @@ structs, ioctls) must be noted in more detail in the history chapter | |||
141 | applications. --> | 141 | applications. --> |
142 | 142 | ||
143 | <revision> | 143 | <revision> |
144 | <revnumber>3.11</revnumber> | ||
145 | <date>2013-05-26</date> | ||
146 | <authorinitials>hv</authorinitials> | ||
147 | <revremark>Remove obsolete VIDIOC_DBG_G_CHIP_IDENT ioctl. | ||
148 | </revremark> | ||
149 | </revision> | ||
150 | |||
151 | <revision> | ||
144 | <revnumber>3.10</revnumber> | 152 | <revnumber>3.10</revnumber> |
145 | <date>2013-03-25</date> | 153 | <date>2013-03-25</date> |
146 | <authorinitials>hv</authorinitials> | 154 | <authorinitials>hv</authorinitials> |
@@ -493,7 +501,7 @@ and discussions on the V4L mailing list.</revremark> | |||
493 | </partinfo> | 501 | </partinfo> |
494 | 502 | ||
495 | <title>Video for Linux Two API Specification</title> | 503 | <title>Video for Linux Two API Specification</title> |
496 | <subtitle>Revision 3.10</subtitle> | 504 | <subtitle>Revision 3.11</subtitle> |
497 | 505 | ||
498 | <chapter id="common"> | 506 | <chapter id="common"> |
499 | &sub-common; | 507 | &sub-common; |
@@ -547,7 +555,6 @@ and discussions on the V4L mailing list.</revremark> | |||
547 | <!-- All ioctls go here. --> | 555 | <!-- All ioctls go here. --> |
548 | &sub-create-bufs; | 556 | &sub-create-bufs; |
549 | &sub-cropcap; | 557 | &sub-cropcap; |
550 | &sub-dbg-g-chip-ident; | ||
551 | &sub-dbg-g-chip-info; | 558 | &sub-dbg-g-chip-info; |
552 | &sub-dbg-g-register; | 559 | &sub-dbg-g-register; |
553 | &sub-decoder-cmd; | 560 | &sub-decoder-cmd; |
diff --git a/Documentation/DocBook/media/v4l/vidioc-dbg-g-chip-ident.xml b/Documentation/DocBook/media/v4l/vidioc-dbg-g-chip-ident.xml deleted file mode 100644 index 921e18550d26..000000000000 --- a/Documentation/DocBook/media/v4l/vidioc-dbg-g-chip-ident.xml +++ /dev/null | |||
@@ -1,271 +0,0 @@ | |||
1 | <refentry id="vidioc-dbg-g-chip-ident"> | ||
2 | <refmeta> | ||
3 | <refentrytitle>ioctl VIDIOC_DBG_G_CHIP_IDENT</refentrytitle> | ||
4 | &manvol; | ||
5 | </refmeta> | ||
6 | |||
7 | <refnamediv> | ||
8 | <refname>VIDIOC_DBG_G_CHIP_IDENT</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_ident | ||
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_IDENT</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>To query the driver applications must initialize the | ||
67 | <structfield>match.type</structfield> and | ||
68 | <structfield>match.addr</structfield> or <structfield>match.name</structfield> | ||
69 | fields of a &v4l2-dbg-chip-ident; | ||
70 | and call <constant>VIDIOC_DBG_G_CHIP_IDENT</constant> with a pointer to | ||
71 | this structure. On success the driver stores information about the | ||
72 | selected chip in the <structfield>ident</structfield> and | ||
73 | <structfield>revision</structfield> fields. On failure the structure | ||
74 | remains unchanged.</para> | ||
75 | |||
76 | <para>When <structfield>match.type</structfield> is | ||
77 | <constant>V4L2_CHIP_MATCH_HOST</constant>, | ||
78 | <structfield>match.addr</structfield> selects the nth non-&i2c; chip | ||
79 | on the TV card. You can enumerate all chips by starting at zero and | ||
80 | incrementing <structfield>match.addr</structfield> by one until | ||
81 | <constant>VIDIOC_DBG_G_CHIP_IDENT</constant> fails with an &EINVAL;. | ||
82 | The number zero always selects the host chip, ⪚ the chip connected | ||
83 | to the PCI or USB bus.</para> | ||
84 | |||
85 | <para>When <structfield>match.type</structfield> is | ||
86 | <constant>V4L2_CHIP_MATCH_I2C_DRIVER</constant>, | ||
87 | <structfield>match.name</structfield> contains the I2C driver name. | ||
88 | For instance | ||
89 | <constant>"saa7127"</constant> will match any chip | ||
90 | supported by the saa7127 driver, regardless of its &i2c; bus address. | ||
91 | When multiple chips supported by the same driver are present, the | ||
92 | ioctl will return <constant>V4L2_IDENT_AMBIGUOUS</constant> in the | ||
93 | <structfield>ident</structfield> field.</para> | ||
94 | |||
95 | <para>When <structfield>match.type</structfield> is | ||
96 | <constant>V4L2_CHIP_MATCH_I2C_ADDR</constant>, | ||
97 | <structfield>match.addr</structfield> selects a chip by its 7 bit | ||
98 | &i2c; bus address.</para> | ||
99 | |||
100 | <para>When <structfield>match.type</structfield> is | ||
101 | <constant>V4L2_CHIP_MATCH_AC97</constant>, | ||
102 | <structfield>match.addr</structfield> selects the nth AC97 chip | ||
103 | on the TV card. You can enumerate all chips by starting at zero and | ||
104 | incrementing <structfield>match.addr</structfield> by one until | ||
105 | <constant>VIDIOC_DBG_G_CHIP_IDENT</constant> fails with an &EINVAL;.</para> | ||
106 | |||
107 | <para>On success, the <structfield>ident</structfield> field will | ||
108 | contain a chip ID from the Linux | ||
109 | <filename>media/v4l2-chip-ident.h</filename> header file, and the | ||
110 | <structfield>revision</structfield> field will contain a driver | ||
111 | specific value, or zero if no particular revision is associated with | ||
112 | this chip.</para> | ||
113 | |||
114 | <para>When the driver could not identify the selected chip, | ||
115 | <structfield>ident</structfield> will contain | ||
116 | <constant>V4L2_IDENT_UNKNOWN</constant>. When no chip matched | ||
117 | the ioctl will succeed but the | ||
118 | <structfield>ident</structfield> field will contain | ||
119 | <constant>V4L2_IDENT_NONE</constant>. If multiple chips matched, | ||
120 | <structfield>ident</structfield> will contain | ||
121 | <constant>V4L2_IDENT_AMBIGUOUS</constant>. In all these cases the | ||
122 | <structfield>revision</structfield> field remains unchanged.</para> | ||
123 | |||
124 | <para>This ioctl is optional, not all drivers may support it. It | ||
125 | was introduced in Linux 2.6.21, but the API was changed to the | ||
126 | one described here in 2.6.29.</para> | ||
127 | |||
128 | <para>We recommended the <application>v4l2-dbg</application> | ||
129 | utility over calling this ioctl directly. It is available from the | ||
130 | LinuxTV v4l-dvb repository; see <ulink | ||
131 | url="http://linuxtv.org/repo/">http://linuxtv.org/repo/</ulink> for | ||
132 | access instructions.</para> | ||
133 | |||
134 | <!-- Note for convenience vidioc-dbg-g-register.sgml | ||
135 | contains a duplicate of this table. --> | ||
136 | <table pgwide="1" frame="none" id="ident-v4l2-dbg-match"> | ||
137 | <title>struct <structname>v4l2_dbg_match</structname></title> | ||
138 | <tgroup cols="4"> | ||
139 | &cs-ustr; | ||
140 | <tbody valign="top"> | ||
141 | <row> | ||
142 | <entry>__u32</entry> | ||
143 | <entry><structfield>type</structfield></entry> | ||
144 | <entry>See <xref linkend="ident-chip-match-types" /> for a list of | ||
145 | possible types.</entry> | ||
146 | </row> | ||
147 | <row> | ||
148 | <entry>union</entry> | ||
149 | <entry>(anonymous)</entry> | ||
150 | </row> | ||
151 | <row> | ||
152 | <entry></entry> | ||
153 | <entry>__u32</entry> | ||
154 | <entry><structfield>addr</structfield></entry> | ||
155 | <entry>Match a chip by this number, interpreted according | ||
156 | to the <structfield>type</structfield> field.</entry> | ||
157 | </row> | ||
158 | <row> | ||
159 | <entry></entry> | ||
160 | <entry>char</entry> | ||
161 | <entry><structfield>name[32]</structfield></entry> | ||
162 | <entry>Match a chip by this name, interpreted according | ||
163 | to the <structfield>type</structfield> field.</entry> | ||
164 | </row> | ||
165 | </tbody> | ||
166 | </tgroup> | ||
167 | </table> | ||
168 | |||
169 | <table pgwide="1" frame="none" id="v4l2-dbg-chip-ident"> | ||
170 | <title>struct <structname>v4l2_dbg_chip_ident</structname></title> | ||
171 | <tgroup cols="3"> | ||
172 | &cs-str; | ||
173 | <tbody valign="top"> | ||
174 | <row> | ||
175 | <entry>struct v4l2_dbg_match</entry> | ||
176 | <entry><structfield>match</structfield></entry> | ||
177 | <entry>How to match the chip, see <xref linkend="ident-v4l2-dbg-match" />.</entry> | ||
178 | </row> | ||
179 | <row> | ||
180 | <entry>__u32</entry> | ||
181 | <entry><structfield>ident</structfield></entry> | ||
182 | <entry>A chip identifier as defined in the Linux | ||
183 | <filename>media/v4l2-chip-ident.h</filename> header file, or one of | ||
184 | the values from <xref linkend="chip-ids" />.</entry> | ||
185 | </row> | ||
186 | <row> | ||
187 | <entry>__u32</entry> | ||
188 | <entry><structfield>revision</structfield></entry> | ||
189 | <entry>A chip revision, chip and driver specific.</entry> | ||
190 | </row> | ||
191 | </tbody> | ||
192 | </tgroup> | ||
193 | </table> | ||
194 | |||
195 | <!-- Note for convenience vidioc-dbg-g-register.sgml | ||
196 | contains a duplicate of this table. --> | ||
197 | <table pgwide="1" frame="none" id="ident-chip-match-types"> | ||
198 | <title>Chip Match Types</title> | ||
199 | <tgroup cols="3"> | ||
200 | &cs-def; | ||
201 | <tbody valign="top"> | ||
202 | <row> | ||
203 | <entry><constant>V4L2_CHIP_MATCH_BRIDGE</constant></entry> | ||
204 | <entry>0</entry> | ||
205 | <entry>Match the nth chip on the card, zero for the | ||
206 | bridge chip. Does not match sub-devices.</entry> | ||
207 | </row> | ||
208 | <row> | ||
209 | <entry><constant>V4L2_CHIP_MATCH_I2C_DRIVER</constant></entry> | ||
210 | <entry>1</entry> | ||
211 | <entry>Match an &i2c; chip by its driver name.</entry> | ||
212 | </row> | ||
213 | <row> | ||
214 | <entry><constant>V4L2_CHIP_MATCH_I2C_ADDR</constant></entry> | ||
215 | <entry>2</entry> | ||
216 | <entry>Match a chip by its 7 bit &i2c; bus address.</entry> | ||
217 | </row> | ||
218 | <row> | ||
219 | <entry><constant>V4L2_CHIP_MATCH_AC97</constant></entry> | ||
220 | <entry>3</entry> | ||
221 | <entry>Match the nth anciliary AC97 chip.</entry> | ||
222 | </row> | ||
223 | <row> | ||
224 | <entry><constant>V4L2_CHIP_MATCH_SUBDEV</constant></entry> | ||
225 | <entry>4</entry> | ||
226 | <entry>Match the nth sub-device. Can't be used with this ioctl.</entry> | ||
227 | </row> | ||
228 | </tbody> | ||
229 | </tgroup> | ||
230 | </table> | ||
231 | |||
232 | <!-- This is an anonymous enum in media/v4l2-chip-ident.h. --> | ||
233 | <table pgwide="1" frame="none" id="chip-ids"> | ||
234 | <title>Chip Identifiers</title> | ||
235 | <tgroup cols="3"> | ||
236 | &cs-def; | ||
237 | <tbody valign="top"> | ||
238 | <row> | ||
239 | <entry><constant>V4L2_IDENT_NONE</constant></entry> | ||
240 | <entry>0</entry> | ||
241 | <entry>No chip matched.</entry> | ||
242 | </row> | ||
243 | <row> | ||
244 | <entry><constant>V4L2_IDENT_AMBIGUOUS</constant></entry> | ||
245 | <entry>1</entry> | ||
246 | <entry>Multiple chips matched.</entry> | ||
247 | </row> | ||
248 | <row> | ||
249 | <entry><constant>V4L2_IDENT_UNKNOWN</constant></entry> | ||
250 | <entry>2</entry> | ||
251 | <entry>A chip is present at this address, but the driver | ||
252 | could not identify it.</entry> | ||
253 | </row> | ||
254 | </tbody> | ||
255 | </tgroup> | ||
256 | </table> | ||
257 | </refsect1> | ||
258 | |||
259 | <refsect1> | ||
260 | &return-value; | ||
261 | |||
262 | <variablelist> | ||
263 | <varlistentry> | ||
264 | <term><errorcode>EINVAL</errorcode></term> | ||
265 | <listitem> | ||
266 | <para>The <structfield>match_type</structfield> is invalid.</para> | ||
267 | </listitem> | ||
268 | </varlistentry> | ||
269 | </variablelist> | ||
270 | </refsect1> | ||
271 | </refentry> | ||
diff --git a/Documentation/DocBook/media/v4l/vidioc-dbg-g-chip-info.xml b/Documentation/DocBook/media/v4l/vidioc-dbg-g-chip-info.xml index e1cece6c5de1..4c4603c135fe 100644 --- a/Documentation/DocBook/media/v4l/vidioc-dbg-g-chip-info.xml +++ b/Documentation/DocBook/media/v4l/vidioc-dbg-g-chip-info.xml | |||
@@ -73,8 +73,7 @@ fields of a &v4l2-dbg-chip-info; | |||
73 | and call <constant>VIDIOC_DBG_G_CHIP_INFO</constant> with a pointer to | 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 | 74 | this structure. On success the driver stores information about the |
75 | selected chip in the <structfield>name</structfield> and | 75 | selected chip in the <structfield>name</structfield> and |
76 | <structfield>flags</structfield> fields. On failure the structure | 76 | <structfield>flags</structfield> fields.</para> |
77 | remains unchanged.</para> | ||
78 | 77 | ||
79 | <para>When <structfield>match.type</structfield> is | 78 | <para>When <structfield>match.type</structfield> is |
80 | <constant>V4L2_CHIP_MATCH_BRIDGE</constant>, | 79 | <constant>V4L2_CHIP_MATCH_BRIDGE</constant>, |
@@ -132,7 +131,7 @@ to the <structfield>type</structfield> field.</entry> | |||
132 | <entry>char</entry> | 131 | <entry>char</entry> |
133 | <entry><structfield>name[32]</structfield></entry> | 132 | <entry><structfield>name[32]</structfield></entry> |
134 | <entry>Match a chip by this name, interpreted according | 133 | <entry>Match a chip by this name, interpreted according |
135 | to the <structfield>type</structfield> field.</entry> | 134 | to the <structfield>type</structfield> field. Currently unused.</entry> |
136 | </row> | 135 | </row> |
137 | </tbody> | 136 | </tbody> |
138 | </tgroup> | 137 | </tgroup> |
@@ -183,21 +182,6 @@ is set, then the driver supports reading registers from the device. If | |||
183 | bridge chip. Does not match sub-devices.</entry> | 182 | bridge chip. Does not match sub-devices.</entry> |
184 | </row> | 183 | </row> |
185 | <row> | 184 | <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> | 185 | <entry><constant>V4L2_CHIP_MATCH_SUBDEV</constant></entry> |
202 | <entry>4</entry> | 186 | <entry>4</entry> |
203 | <entry>Match the nth sub-device.</entry> | 187 | <entry>Match the nth sub-device.</entry> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-dbg-g-register.xml b/Documentation/DocBook/media/v4l/vidioc-dbg-g-register.xml index d13bac9e2445..3d038e75d12b 100644 --- a/Documentation/DocBook/media/v4l/vidioc-dbg-g-register.xml +++ b/Documentation/DocBook/media/v4l/vidioc-dbg-g-register.xml | |||
@@ -76,7 +76,7 @@ compiled with the <constant>CONFIG_VIDEO_ADV_DEBUG</constant> option | |||
76 | to enable these ioctls.</para> | 76 | to enable these ioctls.</para> |
77 | 77 | ||
78 | <para>To write a register applications must initialize all fields | 78 | <para>To write a register applications must initialize all fields |
79 | of a &v4l2-dbg-register; and call | 79 | of a &v4l2-dbg-register; except for <structfield>size</structfield> and call |
80 | <constant>VIDIOC_DBG_S_REGISTER</constant> with a pointer to this | 80 | <constant>VIDIOC_DBG_S_REGISTER</constant> with a pointer to this |
81 | structure. The <structfield>match.type</structfield> and | 81 | structure. The <structfield>match.type</structfield> and |
82 | <structfield>match.addr</structfield> or <structfield>match.name</structfield> | 82 | <structfield>match.addr</structfield> or <structfield>match.name</structfield> |
@@ -91,8 +91,8 @@ written into the register.</para> | |||
91 | <structfield>reg</structfield> fields, and call | 91 | <structfield>reg</structfield> fields, and call |
92 | <constant>VIDIOC_DBG_G_REGISTER</constant> with a pointer to this | 92 | <constant>VIDIOC_DBG_G_REGISTER</constant> with a pointer to this |
93 | structure. On success the driver stores the register value in the | 93 | structure. On success the driver stores the register value in the |
94 | <structfield>val</structfield> field. On failure the structure remains | 94 | <structfield>val</structfield> field and the size (in bytes) of the |
95 | unchanged.</para> | 95 | value in <structfield>size</structfield>.</para> |
96 | 96 | ||
97 | <para>When <structfield>match.type</structfield> is | 97 | <para>When <structfield>match.type</structfield> is |
98 | <constant>V4L2_CHIP_MATCH_BRIDGE</constant>, | 98 | <constant>V4L2_CHIP_MATCH_BRIDGE</constant>, |
@@ -102,39 +102,9 @@ chip connected to the PCI or USB bus. You can find out which chips are | |||
102 | present with the &VIDIOC-DBG-G-CHIP-INFO; ioctl.</para> | 102 | present with the &VIDIOC-DBG-G-CHIP-INFO; ioctl.</para> |
103 | 103 | ||
104 | <para>When <structfield>match.type</structfield> is | 104 | <para>When <structfield>match.type</structfield> is |
105 | <constant>V4L2_CHIP_MATCH_I2C_DRIVER</constant>, | ||
106 | <structfield>match.name</structfield> contains the I2C driver name. | ||
107 | For instance | ||
108 | <constant>"saa7127"</constant> will match any chip | ||
109 | supported by the saa7127 driver, regardless of its &i2c; bus address. | ||
110 | When multiple chips supported by the same driver are present, the | ||
111 | effect of these ioctls is undefined. Again with the | ||
112 | &VIDIOC-DBG-G-CHIP-INFO; ioctl you can find out which &i2c; chips are | ||
113 | present.</para> | ||
114 | |||
115 | <para>When <structfield>match.type</structfield> is | ||
116 | <constant>V4L2_CHIP_MATCH_I2C_ADDR</constant>, | ||
117 | <structfield>match.addr</structfield> selects a chip by its 7 bit &i2c; | ||
118 | bus address.</para> | ||
119 | |||
120 | <para>When <structfield>match.type</structfield> is | ||
121 | <constant>V4L2_CHIP_MATCH_AC97</constant>, | ||
122 | <structfield>match.addr</structfield> selects the nth AC97 chip | ||
123 | on the TV card.</para> | ||
124 | |||
125 | <para>When <structfield>match.type</structfield> is | ||
126 | <constant>V4L2_CHIP_MATCH_SUBDEV</constant>, | 105 | <constant>V4L2_CHIP_MATCH_SUBDEV</constant>, |
127 | <structfield>match.addr</structfield> selects the nth sub-device.</para> | 106 | <structfield>match.addr</structfield> selects the nth sub-device.</para> |
128 | 107 | ||
129 | <note> | ||
130 | <title>Success not guaranteed</title> | ||
131 | |||
132 | <para>Due to a flaw in the Linux &i2c; bus driver these ioctls may | ||
133 | return successfully without actually reading or writing a register. To | ||
134 | catch the most likely failure we recommend a &VIDIOC-DBG-G-CHIP-INFO; | ||
135 | call confirming the presence of the selected &i2c; chip.</para> | ||
136 | </note> | ||
137 | |||
138 | <para>These ioctls are optional, not all drivers may support them. | 108 | <para>These ioctls are optional, not all drivers may support them. |
139 | However when a driver supports these ioctls it must also support | 109 | However when a driver supports these ioctls it must also support |
140 | &VIDIOC-DBG-G-CHIP-INFO;. Conversely it may support | 110 | &VIDIOC-DBG-G-CHIP-INFO;. Conversely it may support |
@@ -150,7 +120,7 @@ LinuxTV v4l-dvb repository; see <ulink | |||
150 | url="http://linuxtv.org/repo/">http://linuxtv.org/repo/</ulink> for | 120 | url="http://linuxtv.org/repo/">http://linuxtv.org/repo/</ulink> for |
151 | access instructions.</para> | 121 | access instructions.</para> |
152 | 122 | ||
153 | <!-- Note for convenience vidioc-dbg-g-chip-ident.sgml | 123 | <!-- Note for convenience vidioc-dbg-g-chip-info.sgml |
154 | contains a duplicate of this table. --> | 124 | contains a duplicate of this table. --> |
155 | <table pgwide="1" frame="none" id="v4l2-dbg-match"> | 125 | <table pgwide="1" frame="none" id="v4l2-dbg-match"> |
156 | <title>struct <structname>v4l2_dbg_match</structname></title> | 126 | <title>struct <structname>v4l2_dbg_match</structname></title> |
@@ -160,7 +130,7 @@ access instructions.</para> | |||
160 | <row> | 130 | <row> |
161 | <entry>__u32</entry> | 131 | <entry>__u32</entry> |
162 | <entry><structfield>type</structfield></entry> | 132 | <entry><structfield>type</structfield></entry> |
163 | <entry>See <xref linkend="ident-chip-match-types" /> for a list of | 133 | <entry>See <xref linkend="chip-match-types" /> for a list of |
164 | possible types.</entry> | 134 | possible types.</entry> |
165 | </row> | 135 | </row> |
166 | <row> | 136 | <row> |
@@ -179,7 +149,7 @@ to the <structfield>type</structfield> field.</entry> | |||
179 | <entry>char</entry> | 149 | <entry>char</entry> |
180 | <entry><structfield>name[32]</structfield></entry> | 150 | <entry><structfield>name[32]</structfield></entry> |
181 | <entry>Match a chip by this name, interpreted according | 151 | <entry>Match a chip by this name, interpreted according |
182 | to the <structfield>type</structfield> field.</entry> | 152 | to the <structfield>type</structfield> field. Currently unused.</entry> |
183 | </row> | 153 | </row> |
184 | </tbody> | 154 | </tbody> |
185 | </tgroup> | 155 | </tgroup> |
@@ -199,6 +169,11 @@ to the <structfield>type</structfield> field.</entry> | |||
199 | <entry>How to match the chip, see <xref linkend="v4l2-dbg-match" />.</entry> | 169 | <entry>How to match the chip, see <xref linkend="v4l2-dbg-match" />.</entry> |
200 | </row> | 170 | </row> |
201 | <row> | 171 | <row> |
172 | <entry>__u32</entry> | ||
173 | <entry><structfield>size</structfield></entry> | ||
174 | <entry>The register size in bytes.</entry> | ||
175 | </row> | ||
176 | <row> | ||
202 | <entry>__u64</entry> | 177 | <entry>__u64</entry> |
203 | <entry><structfield>reg</structfield></entry> | 178 | <entry><structfield>reg</structfield></entry> |
204 | <entry>A register number.</entry> | 179 | <entry>A register number.</entry> |
@@ -213,7 +188,7 @@ register.</entry> | |||
213 | </tgroup> | 188 | </tgroup> |
214 | </table> | 189 | </table> |
215 | 190 | ||
216 | <!-- Note for convenience vidioc-dbg-g-chip-ident.sgml | 191 | <!-- Note for convenience vidioc-dbg-g-chip-info.sgml |
217 | contains a duplicate of this table. --> | 192 | contains a duplicate of this table. --> |
218 | <table pgwide="1" frame="none" id="chip-match-types"> | 193 | <table pgwide="1" frame="none" id="chip-match-types"> |
219 | <title>Chip Match Types</title> | 194 | <title>Chip Match Types</title> |
@@ -227,21 +202,6 @@ register.</entry> | |||
227 | bridge chip. Does not match sub-devices.</entry> | 202 | bridge chip. Does not match sub-devices.</entry> |
228 | </row> | 203 | </row> |
229 | <row> | 204 | <row> |
230 | <entry><constant>V4L2_CHIP_MATCH_I2C_DRIVER</constant></entry> | ||
231 | <entry>1</entry> | ||
232 | <entry>Match an &i2c; chip by its driver name.</entry> | ||
233 | </row> | ||
234 | <row> | ||
235 | <entry><constant>V4L2_CHIP_MATCH_I2C_ADDR</constant></entry> | ||
236 | <entry>2</entry> | ||
237 | <entry>Match a chip by its 7 bit &i2c; bus address.</entry> | ||
238 | </row> | ||
239 | <row> | ||
240 | <entry><constant>V4L2_CHIP_MATCH_AC97</constant></entry> | ||
241 | <entry>3</entry> | ||
242 | <entry>Match the nth anciliary AC97 chip.</entry> | ||
243 | </row> | ||
244 | <row> | ||
245 | <entry><constant>V4L2_CHIP_MATCH_SUBDEV</constant></entry> | 205 | <entry><constant>V4L2_CHIP_MATCH_SUBDEV</constant></entry> |
246 | <entry>4</entry> | 206 | <entry>4</entry> |
247 | <entry>Match the nth sub-device.</entry> | 207 | <entry>Match the nth sub-device.</entry> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-querystd.xml b/Documentation/DocBook/media/v4l/vidioc-querystd.xml index fe80a183d957..222348542182 100644 --- a/Documentation/DocBook/media/v4l/vidioc-querystd.xml +++ b/Documentation/DocBook/media/v4l/vidioc-querystd.xml | |||
@@ -54,7 +54,8 @@ standard automatically. To do so, applications call <constant> | |||
54 | VIDIOC_QUERYSTD</constant> with a pointer to a &v4l2-std-id; type. The | 54 | VIDIOC_QUERYSTD</constant> with a pointer to a &v4l2-std-id; type. The |
55 | driver stores here a set of candidates, this can be a single flag or a | 55 | driver stores here a set of candidates, this can be a single flag or a |
56 | set of supported standards if for example the hardware can only | 56 | set of supported standards if for example the hardware can only |
57 | distinguish between 50 and 60 Hz systems. When detection is not | 57 | distinguish between 50 and 60 Hz systems. If no signal was detected, |
58 | then the driver will return V4L2_STD_UNKNOWN. When detection is not | ||
58 | possible or fails, the set must contain all standards supported by the | 59 | possible or fails, the set must contain all standards supported by the |
59 | current video input or output.</para> | 60 | current video input or output.</para> |
60 | 61 | ||
diff --git a/Documentation/devicetree/bindings/media/exynos-fimc-lite.txt b/Documentation/devicetree/bindings/media/exynos-fimc-lite.txt index de9f6b78ee51..0bf6fb7fbeab 100644 --- a/Documentation/devicetree/bindings/media/exynos-fimc-lite.txt +++ b/Documentation/devicetree/bindings/media/exynos-fimc-lite.txt | |||
@@ -2,8 +2,10 @@ Exynos4x12/Exynos5 SoC series camera host interface (FIMC-LITE) | |||
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | 4 | ||
5 | - compatible : should be "samsung,exynos4212-fimc-lite" for Exynos4212 and | 5 | - compatible : should be one of: |
6 | Exynos4412 SoCs; | 6 | "samsung,exynos4212-fimc-lite" for Exynos4212/4412 SoCs, |
7 | "samsung,exynos5250-fimc-lite" for Exynos5250 compatible | ||
8 | devices; | ||
7 | - reg : physical base address and size of the device memory mapped | 9 | - reg : physical base address and size of the device memory mapped |
8 | registers; | 10 | registers; |
9 | - interrupts : should contain FIMC-LITE interrupt; | 11 | - interrupts : should contain FIMC-LITE interrupt; |
diff --git a/Documentation/devicetree/bindings/media/i2c/mt9p031.txt b/Documentation/devicetree/bindings/media/i2c/mt9p031.txt new file mode 100644 index 000000000000..cb60443ff78f --- /dev/null +++ b/Documentation/devicetree/bindings/media/i2c/mt9p031.txt | |||
@@ -0,0 +1,40 @@ | |||
1 | * Aptina 1/2.5-Inch 5Mp CMOS Digital Image Sensor | ||
2 | |||
3 | The Aptina MT9P031 is a 1/2.5-inch CMOS active pixel digital image sensor with | ||
4 | an active array size of 2592H x 1944V. It is programmable through a simple | ||
5 | two-wire serial interface. | ||
6 | |||
7 | Required Properties: | ||
8 | - compatible: value should be either one among the following | ||
9 | (a) "aptina,mt9p031" for mt9p031 sensor | ||
10 | (b) "aptina,mt9p031m" for mt9p031m sensor | ||
11 | |||
12 | - input-clock-frequency: Input clock frequency. | ||
13 | |||
14 | - pixel-clock-frequency: Pixel clock frequency. | ||
15 | |||
16 | Optional Properties: | ||
17 | - reset-gpios: Chip reset GPIO | ||
18 | |||
19 | For further reading on port node refer to | ||
20 | Documentation/devicetree/bindings/media/video-interfaces.txt. | ||
21 | |||
22 | Example: | ||
23 | |||
24 | i2c0@1c22000 { | ||
25 | ... | ||
26 | ... | ||
27 | mt9p031@5d { | ||
28 | compatible = "aptina,mt9p031"; | ||
29 | reg = <0x5d>; | ||
30 | reset-gpios = <&gpio3 30 0>; | ||
31 | |||
32 | port { | ||
33 | mt9p031_1: endpoint { | ||
34 | input-clock-frequency = <6000000>; | ||
35 | pixel-clock-frequency = <96000000>; | ||
36 | }; | ||
37 | }; | ||
38 | }; | ||
39 | ... | ||
40 | }; | ||
diff --git a/Documentation/devicetree/bindings/media/i2c/tvp514x.txt b/Documentation/devicetree/bindings/media/i2c/tvp514x.txt new file mode 100644 index 000000000000..46752cc71f2e --- /dev/null +++ b/Documentation/devicetree/bindings/media/i2c/tvp514x.txt | |||
@@ -0,0 +1,44 @@ | |||
1 | * Texas Instruments TVP514x video decoder | ||
2 | |||
3 | The TVP5146/TVP5146m2/TVP5147/TVP5147m1 device is high quality, single-chip | ||
4 | digital video decoder that digitizes and decodes all popular baseband analog | ||
5 | video formats into digital video component. The tvp514x decoder supports analog- | ||
6 | to-digital (A/D) conversion of component RGB and YPbPr signals as well as A/D | ||
7 | conversion and decoding of NTSC, PAL and SECAM composite and S-video into | ||
8 | component YCbCr. | ||
9 | |||
10 | Required Properties : | ||
11 | - compatible : value should be either one among the following | ||
12 | (a) "ti,tvp5146" for tvp5146 decoder. | ||
13 | (b) "ti,tvp5146m2" for tvp5146m2 decoder. | ||
14 | (c) "ti,tvp5147" for tvp5147 decoder. | ||
15 | (d) "ti,tvp5147m1" for tvp5147m1 decoder. | ||
16 | |||
17 | - hsync-active: HSYNC Polarity configuration for endpoint. | ||
18 | |||
19 | - vsync-active: VSYNC Polarity configuration for endpoint. | ||
20 | |||
21 | - pclk-sample: Clock polarity of the endpoint. | ||
22 | |||
23 | For further reading on port node refer to Documentation/devicetree/bindings/ | ||
24 | media/video-interfaces.txt. | ||
25 | |||
26 | Example: | ||
27 | |||
28 | i2c0@1c22000 { | ||
29 | ... | ||
30 | ... | ||
31 | tvp514x@5c { | ||
32 | compatible = "ti,tvp5146"; | ||
33 | reg = <0x5c>; | ||
34 | |||
35 | port { | ||
36 | tvp514x_1: endpoint { | ||
37 | hsync-active = <1>; | ||
38 | vsync-active = <1>; | ||
39 | pclk-sample = <0>; | ||
40 | }; | ||
41 | }; | ||
42 | }; | ||
43 | ... | ||
44 | }; | ||
diff --git a/Documentation/devicetree/bindings/media/samsung-fimc.txt b/Documentation/devicetree/bindings/media/samsung-fimc.txt index 51c776b7f7a3..96312f6c4c26 100644 --- a/Documentation/devicetree/bindings/media/samsung-fimc.txt +++ b/Documentation/devicetree/bindings/media/samsung-fimc.txt | |||
@@ -127,22 +127,22 @@ Example: | |||
127 | }; | 127 | }; |
128 | }; | 128 | }; |
129 | }; | 129 | }; |
130 | }; | ||
131 | 130 | ||
132 | /* MIPI CSI-2 bus IF sensor */ | 131 | /* MIPI CSI-2 bus IF sensor */ |
133 | s5c73m3: sensor@0x1a { | 132 | s5c73m3: sensor@0x1a { |
134 | compatible = "samsung,s5c73m3"; | 133 | compatible = "samsung,s5c73m3"; |
135 | reg = <0x1a>; | 134 | reg = <0x1a>; |
136 | vddio-supply = <...>; | 135 | vddio-supply = <...>; |
137 | 136 | ||
138 | clock-frequency = <24000000>; | 137 | clock-frequency = <24000000>; |
139 | clocks = <...>; | 138 | clocks = <...>; |
140 | clock-names = "mclk"; | 139 | clock-names = "mclk"; |
141 | 140 | ||
142 | port { | 141 | port { |
143 | s5c73m3_1: endpoint { | 142 | s5c73m3_1: endpoint { |
144 | data-lanes = <1 2 3 4>; | 143 | data-lanes = <1 2 3 4>; |
145 | remote-endpoint = <&csis0_ep>; | 144 | remote-endpoint = <&csis0_ep>; |
145 | }; | ||
146 | }; | 146 | }; |
147 | }; | 147 | }; |
148 | }; | 148 | }; |
diff --git a/Documentation/devicetree/bindings/media/samsung-mipi-csis.txt b/Documentation/devicetree/bindings/media/samsung-mipi-csis.txt index 5f8e28e2484f..be45f0b1a449 100644 --- a/Documentation/devicetree/bindings/media/samsung-mipi-csis.txt +++ b/Documentation/devicetree/bindings/media/samsung-mipi-csis.txt | |||
@@ -5,8 +5,8 @@ Required properties: | |||
5 | 5 | ||
6 | - compatible : "samsung,s5pv210-csis" for S5PV210 (S5PC110), | 6 | - compatible : "samsung,s5pv210-csis" for S5PV210 (S5PC110), |
7 | "samsung,exynos4210-csis" for Exynos4210 (S5PC210), | 7 | "samsung,exynos4210-csis" for Exynos4210 (S5PC210), |
8 | "samsung,exynos4212-csis" for Exynos4212/Exynos4412 | 8 | "samsung,exynos4212-csis" for Exynos4212/Exynos4412, |
9 | SoC series; | 9 | "samsung,exynos5250-csis" for Exynos5250; |
10 | - reg : offset and length of the register set for the device; | 10 | - reg : offset and length of the register set for the device; |
11 | - interrupts : should contain MIPI CSIS interrupt; the format of the | 11 | - interrupts : should contain MIPI CSIS interrupt; the format of the |
12 | interrupt specifier depends on the interrupt controller; | 12 | interrupt specifier depends on the interrupt controller; |
diff --git a/Documentation/devicetree/bindings/media/sh_mobile_ceu.txt b/Documentation/devicetree/bindings/media/sh_mobile_ceu.txt new file mode 100644 index 000000000000..1ce4e46bcbb7 --- /dev/null +++ b/Documentation/devicetree/bindings/media/sh_mobile_ceu.txt | |||
@@ -0,0 +1,18 @@ | |||
1 | Bindings, specific for the sh_mobile_ceu_camera.c driver: | ||
2 | - compatible: Should be "renesas,sh-mobile-ceu" | ||
3 | - reg: register base and size | ||
4 | - interrupts: the interrupt number | ||
5 | - interrupt-parent: the interrupt controller | ||
6 | - renesas,max-width: maximum image width, supported on this SoC | ||
7 | - renesas,max-height: maximum image height, supported on this SoC | ||
8 | |||
9 | Example: | ||
10 | |||
11 | ceu0: ceu@0xfe910000 { | ||
12 | compatible = "renesas,sh-mobile-ceu"; | ||
13 | reg = <0xfe910000 0xa0>; | ||
14 | interrupt-parent = <&intcs>; | ||
15 | interrupts = <0x880>; | ||
16 | renesas,max-width = <8188>; | ||
17 | renesas,max-height = <8188>; | ||
18 | }; | ||
diff --git a/Documentation/media-framework.txt b/Documentation/media-framework.txt index eeced24e56af..f552a75c0e70 100644 --- a/Documentation/media-framework.txt +++ b/Documentation/media-framework.txt | |||
@@ -265,7 +265,7 @@ connected to another pad through an enabled link | |||
265 | media_entity_find_link(struct media_pad *source, | 265 | media_entity_find_link(struct media_pad *source, |
266 | struct media_pad *sink); | 266 | struct media_pad *sink); |
267 | 267 | ||
268 | media_entity_remote_source(struct media_pad *pad); | 268 | media_entity_remote_pad(struct media_pad *pad); |
269 | 269 | ||
270 | Refer to the kerneldoc documentation for more information. | 270 | Refer to the kerneldoc documentation for more information. |
271 | 271 | ||
diff --git a/Documentation/video4linux/CARDLIST.bttv b/Documentation/video4linux/CARDLIST.bttv index 581f666a76cf..f14475011fea 100644 --- a/Documentation/video4linux/CARDLIST.bttv +++ b/Documentation/video4linux/CARDLIST.bttv | |||
@@ -160,3 +160,6 @@ | |||
160 | 159 -> ProVideo PV183 [1830:1540,1831:1540,1832:1540,1833:1540,1834:1540,1835:1540,1836:1540,1837:1540] | 160 | 159 -> ProVideo PV183 [1830:1540,1831:1540,1832:1540,1833:1540,1834:1540,1835:1540,1836:1540,1837:1540] |
161 | 160 -> Tongwei Video Technology TD-3116 [f200:3116] | 161 | 160 -> Tongwei Video Technology TD-3116 [f200:3116] |
162 | 161 -> Aposonic W-DVR [0279:0228] | 162 | 161 -> Aposonic W-DVR [0279:0228] |
163 | 162 -> Adlink MPG24 | ||
164 | 163 -> Bt848 Capture 14MHz | ||
165 | 164 -> CyberVision CV06 (SV) | ||
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134 index b3ad68309109..8df17d063499 100644 --- a/Documentation/video4linux/CARDLIST.saa7134 +++ b/Documentation/video4linux/CARDLIST.saa7134 | |||
@@ -190,3 +190,4 @@ | |||
190 | 189 -> Kworld PC150-U [17de:a134] | 190 | 189 -> Kworld PC150-U [17de:a134] |
191 | 190 -> Asus My Cinema PS3-100 [1043:48cd] | 191 | 190 -> Asus My Cinema PS3-100 [1043:48cd] |
192 | 191 -> Hawell HW-9004V1 | 192 | 191 -> Hawell HW-9004V1 |
193 | 192 -> AverMedia AverTV Satellite Hybrid+FM A706 [1461:2055] | ||
diff --git a/Documentation/video4linux/CARDLIST.tuner b/Documentation/video4linux/CARDLIST.tuner index 5b83a3ff15c2..ac8862184962 100644 --- a/Documentation/video4linux/CARDLIST.tuner +++ b/Documentation/video4linux/CARDLIST.tuner | |||
@@ -86,6 +86,6 @@ tuner=85 - Philips FQ1236 MK5 | |||
86 | tuner=86 - Tena TNF5337 MFD | 86 | tuner=86 - Tena TNF5337 MFD |
87 | tuner=87 - Xceive 4000 tuner | 87 | tuner=87 - Xceive 4000 tuner |
88 | tuner=88 - Xceive 5000C tuner | 88 | tuner=88 - Xceive 5000C tuner |
89 | tuner=89 - Sony PAL+SECAM (BTF-PG472Z) | 89 | tuner=89 - Sony BTF-PG472Z PAL/SECAM |
90 | tuner=90 - Sony NTSC-M-JP (BTF-PK467Z) | 90 | tuner=90 - Sony BTF-PK467Z NTSC-M-JP |
91 | tuner=91 - Sony NTSC-M (BTF-PB463Z) | 91 | tuner=91 - Sony BTF-PB463Z NTSC-M |
diff --git a/Documentation/video4linux/fimc.txt b/Documentation/video4linux/fimc.txt index 25f4d3402722..e51f1b5b7324 100644 --- a/Documentation/video4linux/fimc.txt +++ b/Documentation/video4linux/fimc.txt | |||
@@ -1,6 +1,6 @@ | |||
1 | Samsung S5P/EXYNOS4 FIMC driver | 1 | Samsung S5P/EXYNOS4 FIMC driver |
2 | 2 | ||
3 | Copyright (C) 2012 Samsung Electronics Co., Ltd. | 3 | Copyright (C) 2012 - 2013 Samsung Electronics Co., Ltd. |
4 | --------------------------------------------------------------------------- | 4 | --------------------------------------------------------------------------- |
5 | 5 | ||
6 | The FIMC (Fully Interactive Mobile Camera) device available in Samsung | 6 | The FIMC (Fully Interactive Mobile Camera) device available in Samsung |
@@ -10,7 +10,7 @@ data from LCD controller (FIMD) through the SoC internal writeback data | |||
10 | path. There are multiple FIMC instances in the SoCs (up to 4), having | 10 | path. There are multiple FIMC instances in the SoCs (up to 4), having |
11 | slightly different capabilities, like pixel alignment constraints, rotator | 11 | slightly different capabilities, like pixel alignment constraints, rotator |
12 | availability, LCD writeback support, etc. The driver is located at | 12 | availability, LCD writeback support, etc. The driver is located at |
13 | drivers/media/platform/s5p-fimc directory. | 13 | drivers/media/platform/exynos4-is directory. |
14 | 14 | ||
15 | 1. Supported SoCs | 15 | 1. Supported SoCs |
16 | ================= | 16 | ================= |
@@ -36,21 +36,21 @@ Not currently supported: | |||
36 | ===================== | 36 | ===================== |
37 | 37 | ||
38 | - media device driver | 38 | - media device driver |
39 | drivers/media/platform/s5p-fimc/fimc-mdevice.[ch] | 39 | drivers/media/platform/exynos4-is/media-dev.[ch] |
40 | 40 | ||
41 | - camera capture video device driver | 41 | - camera capture video device driver |
42 | drivers/media/platform/s5p-fimc/fimc-capture.c | 42 | drivers/media/platform/exynos4-is/fimc-capture.c |
43 | 43 | ||
44 | - MIPI-CSI2 receiver subdev | 44 | - MIPI-CSI2 receiver subdev |
45 | drivers/media/platform/s5p-fimc/mipi-csis.[ch] | 45 | drivers/media/platform/exynos4-is/mipi-csis.[ch] |
46 | 46 | ||
47 | - video post-processor (mem-to-mem) | 47 | - video post-processor (mem-to-mem) |
48 | drivers/media/platform/s5p-fimc/fimc-core.c | 48 | drivers/media/platform/exynos4-is/fimc-core.c |
49 | 49 | ||
50 | - common files | 50 | - common files |
51 | drivers/media/platform/s5p-fimc/fimc-core.h | 51 | drivers/media/platform/exynos4-is/fimc-core.h |
52 | drivers/media/platform/s5p-fimc/fimc-reg.h | 52 | drivers/media/platform/exynos4-is/fimc-reg.h |
53 | drivers/media/platform/s5p-fimc/regs-fimc.h | 53 | drivers/media/platform/exynos4-is/regs-fimc.h |
54 | 54 | ||
55 | 4. User space interfaces | 55 | 4. User space interfaces |
56 | ======================== | 56 | ======================== |
@@ -143,7 +143,8 @@ or retrieve the information from /dev/media? with help of the media-ctl tool: | |||
143 | 6. Platform support | 143 | 6. Platform support |
144 | =================== | 144 | =================== |
145 | 145 | ||
146 | The machine code (plat-s5p and arch/arm/mach-*) must select following options | 146 | The machine code (arch/arm/plat-samsung and arch/arm/mach-*) must select |
147 | following options: | ||
147 | 148 | ||
148 | CONFIG_S5P_DEV_FIMC0 mandatory | 149 | CONFIG_S5P_DEV_FIMC0 mandatory |
149 | CONFIG_S5P_DEV_FIMC1 \ | 150 | CONFIG_S5P_DEV_FIMC1 \ |
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt index a300b283a1a0..6c4866b49eb5 100644 --- a/Documentation/video4linux/v4l2-framework.txt +++ b/Documentation/video4linux/v4l2-framework.txt | |||
@@ -246,7 +246,6 @@ may be NULL if the subdev driver does not support anything from that category. | |||
246 | It looks like this: | 246 | It looks like this: |
247 | 247 | ||
248 | struct v4l2_subdev_core_ops { | 248 | struct v4l2_subdev_core_ops { |
249 | int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip); | ||
250 | int (*log_status)(struct v4l2_subdev *sd); | 249 | int (*log_status)(struct v4l2_subdev *sd); |
251 | int (*init)(struct v4l2_subdev *sd, u32 val); | 250 | int (*init)(struct v4l2_subdev *sd, u32 val); |
252 | ... | 251 | ... |
@@ -326,8 +325,27 @@ that width, height and the media bus pixel code are equal on both source and | |||
326 | sink of the link. Subdev drivers are also free to use this function to | 325 | sink of the link. Subdev drivers are also free to use this function to |
327 | perform the checks mentioned above in addition to their own checks. | 326 | perform the checks mentioned above in addition to their own checks. |
328 | 327 | ||
329 | A device (bridge) driver needs to register the v4l2_subdev with the | 328 | There are currently two ways to register subdevices with the V4L2 core. The |
330 | v4l2_device: | 329 | first (traditional) possibility is to have subdevices registered by bridge |
330 | drivers. This can be done when the bridge driver has the complete information | ||
331 | about subdevices connected to it and knows exactly when to register them. This | ||
332 | is typically the case for internal subdevices, like video data processing units | ||
333 | within SoCs or complex PCI(e) boards, camera sensors in USB cameras or connected | ||
334 | to SoCs, which pass information about them to bridge drivers, usually in their | ||
335 | platform data. | ||
336 | |||
337 | There are however also situations where subdevices have to be registered | ||
338 | asynchronously to bridge devices. An example of such a configuration is a Device | ||
339 | Tree based system where information about subdevices is made available to the | ||
340 | system independently from the bridge devices, e.g. when subdevices are defined | ||
341 | in DT as I2C device nodes. The API used in this second case is described further | ||
342 | below. | ||
343 | |||
344 | Using one or the other registration method only affects the probing process, the | ||
345 | run-time bridge-subdevice interaction is in both cases the same. | ||
346 | |||
347 | In the synchronous case a device (bridge) driver needs to register the | ||
348 | v4l2_subdev with the v4l2_device: | ||
331 | 349 | ||
332 | int err = v4l2_device_register_subdev(v4l2_dev, sd); | 350 | int err = v4l2_device_register_subdev(v4l2_dev, sd); |
333 | 351 | ||
@@ -346,24 +364,24 @@ Afterwards the subdev module can be unloaded and sd->dev == NULL. | |||
346 | 364 | ||
347 | You can call an ops function either directly: | 365 | You can call an ops function either directly: |
348 | 366 | ||
349 | err = sd->ops->core->g_chip_ident(sd, &chip); | 367 | err = sd->ops->core->g_std(sd, &norm); |
350 | 368 | ||
351 | but it is better and easier to use this macro: | 369 | but it is better and easier to use this macro: |
352 | 370 | ||
353 | err = v4l2_subdev_call(sd, core, g_chip_ident, &chip); | 371 | err = v4l2_subdev_call(sd, core, g_std, &norm); |
354 | 372 | ||
355 | The macro will to the right NULL pointer checks and returns -ENODEV if subdev | 373 | The macro will to the right NULL pointer checks and returns -ENODEV if subdev |
356 | is NULL, -ENOIOCTLCMD if either subdev->core or subdev->core->g_chip_ident is | 374 | is NULL, -ENOIOCTLCMD if either subdev->core or subdev->core->g_std is |
357 | NULL, or the actual result of the subdev->ops->core->g_chip_ident ops. | 375 | NULL, or the actual result of the subdev->ops->core->g_std ops. |
358 | 376 | ||
359 | It is also possible to call all or a subset of the sub-devices: | 377 | It is also possible to call all or a subset of the sub-devices: |
360 | 378 | ||
361 | v4l2_device_call_all(v4l2_dev, 0, core, g_chip_ident, &chip); | 379 | v4l2_device_call_all(v4l2_dev, 0, core, g_std, &norm); |
362 | 380 | ||
363 | Any subdev that does not support this ops is skipped and error results are | 381 | Any subdev that does not support this ops is skipped and error results are |
364 | ignored. If you want to check for errors use this: | 382 | ignored. If you want to check for errors use this: |
365 | 383 | ||
366 | err = v4l2_device_call_until_err(v4l2_dev, 0, core, g_chip_ident, &chip); | 384 | err = v4l2_device_call_until_err(v4l2_dev, 0, core, g_std, &norm); |
367 | 385 | ||
368 | Any error except -ENOIOCTLCMD will exit the loop with that error. If no | 386 | Any error except -ENOIOCTLCMD will exit the loop with that error. If no |
369 | errors (except -ENOIOCTLCMD) occurred, then 0 is returned. | 387 | errors (except -ENOIOCTLCMD) occurred, then 0 is returned. |
@@ -394,6 +412,30 @@ controlled through GPIO pins. This distinction is only relevant when setting | |||
394 | up the device, but once the subdev is registered it is completely transparent. | 412 | up the device, but once the subdev is registered it is completely transparent. |
395 | 413 | ||
396 | 414 | ||
415 | In the asynchronous case subdevice probing can be invoked independently of the | ||
416 | bridge driver availability. The subdevice driver then has to verify whether all | ||
417 | the requirements for a successful probing are satisfied. This can include a | ||
418 | check for a master clock availability. If any of the conditions aren't satisfied | ||
419 | the driver might decide to return -EPROBE_DEFER to request further reprobing | ||
420 | attempts. Once all conditions are met the subdevice shall be registered using | ||
421 | the v4l2_async_register_subdev() function. Unregistration is performed using | ||
422 | the v4l2_async_unregister_subdev() call. Subdevices registered this way are | ||
423 | stored in a global list of subdevices, ready to be picked up by bridge drivers. | ||
424 | |||
425 | Bridge drivers in turn have to register a notifier object with an array of | ||
426 | subdevice descriptors that the bridge device needs for its operation. This is | ||
427 | performed using the v4l2_async_notifier_register() call. To unregister the | ||
428 | notifier the driver has to call v4l2_async_notifier_unregister(). The former of | ||
429 | the two functions takes two arguments: a pointer to struct v4l2_device and a | ||
430 | pointer to struct v4l2_async_notifier. The latter contains a pointer to an array | ||
431 | of pointers to subdevice descriptors of type struct v4l2_async_subdev type. The | ||
432 | V4L2 core will then use these descriptors to match asynchronously registered | ||
433 | subdevices to them. If a match is detected the .bound() notifier callback is | ||
434 | called. After all subdevices have been located the .complete() callback is | ||
435 | called. When a subdevice is removed from the system the .unbind() method is | ||
436 | called. All three callbacks are optional. | ||
437 | |||
438 | |||
397 | V4L2 sub-device userspace API | 439 | V4L2 sub-device userspace API |
398 | ----------------------------- | 440 | ----------------------------- |
399 | 441 | ||
@@ -575,9 +617,13 @@ of the video device exits. | |||
575 | The default video_device_release() callback just calls kfree to free the | 617 | The default video_device_release() callback just calls kfree to free the |
576 | allocated memory. | 618 | allocated memory. |
577 | 619 | ||
620 | There is also a video_device_release_empty() function that does nothing | ||
621 | (is empty) and can be used if the struct is embedded and there is nothing | ||
622 | to do when it is released. | ||
623 | |||
578 | You should also set these fields: | 624 | You should also set these fields: |
579 | 625 | ||
580 | - v4l2_dev: set to the v4l2_device parent device. | 626 | - v4l2_dev: must be set to the v4l2_device parent device. |
581 | 627 | ||
582 | - name: set to something descriptive and unique. | 628 | - name: set to something descriptive and unique. |
583 | 629 | ||
@@ -614,15 +660,16 @@ You should also set these fields: | |||
614 | If you want to have a separate priority state per (group of) device node(s), | 660 | If you want to have a separate priority state per (group of) device node(s), |
615 | then you can point it to your own struct v4l2_prio_state. | 661 | then you can point it to your own struct v4l2_prio_state. |
616 | 662 | ||
617 | - parent: you only set this if v4l2_device was registered with NULL as | 663 | - dev_parent: you only set this if v4l2_device was registered with NULL as |
618 | the parent device struct. This only happens in cases where one hardware | 664 | the parent device struct. This only happens in cases where one hardware |
619 | device has multiple PCI devices that all share the same v4l2_device core. | 665 | device has multiple PCI devices that all share the same v4l2_device core. |
620 | 666 | ||
621 | The cx88 driver is an example of this: one core v4l2_device struct, but | 667 | The cx88 driver is an example of this: one core v4l2_device struct, but |
622 | it is used by both an raw video PCI device (cx8800) and a MPEG PCI device | 668 | it is used by both a raw video PCI device (cx8800) and a MPEG PCI device |
623 | (cx8802). Since the v4l2_device cannot be associated with a particular | 669 | (cx8802). Since the v4l2_device cannot be associated with two PCI devices |
624 | PCI device it is setup without a parent device. But when the struct | 670 | at the same time it is setup without a parent device. But when the struct |
625 | video_device is setup you do know which parent PCI device to use. | 671 | video_device is initialized you *do* know which parent PCI device to use and |
672 | so you set dev_device to the correct PCI device. | ||
626 | 673 | ||
627 | - flags: optional. Set to V4L2_FL_USE_FH_PRIO if you want to let the framework | 674 | - flags: optional. Set to V4L2_FL_USE_FH_PRIO if you want to let the framework |
628 | handle the VIDIOC_G/S_PRIORITY ioctls. This requires that you use struct | 675 | handle the VIDIOC_G/S_PRIORITY ioctls. This requires that you use struct |
@@ -1061,3 +1108,29 @@ available event type is 'class base + 1'. | |||
1061 | 1108 | ||
1062 | An example on how the V4L2 events may be used can be found in the OMAP | 1109 | An example on how the V4L2 events may be used can be found in the OMAP |
1063 | 3 ISP driver (drivers/media/platform/omap3isp). | 1110 | 3 ISP driver (drivers/media/platform/omap3isp). |
1111 | |||
1112 | |||
1113 | V4L2 clocks | ||
1114 | ----------- | ||
1115 | |||
1116 | Many subdevices, like camera sensors, TV decoders and encoders, need a clock | ||
1117 | signal to be supplied by the system. Often this clock is supplied by the | ||
1118 | respective bridge device. The Linux kernel provides a Common Clock Framework for | ||
1119 | this purpose. However, it is not (yet) available on all architectures. Besides, | ||
1120 | the nature of the multi-functional (clock, data + synchronisation, I2C control) | ||
1121 | connection of subdevices to the system might impose special requirements on the | ||
1122 | clock API usage. E.g. V4L2 has to support clock provider driver unregistration | ||
1123 | while a subdevice driver is holding a reference to the clock. For these reasons | ||
1124 | a V4L2 clock helper API has been developed and is provided to bridge and | ||
1125 | subdevice drivers. | ||
1126 | |||
1127 | The API consists of two parts: two functions to register and unregister a V4L2 | ||
1128 | clock source: v4l2_clk_register() and v4l2_clk_unregister() and calls to control | ||
1129 | a clock object, similar to the respective generic clock API calls: | ||
1130 | v4l2_clk_get(), v4l2_clk_put(), v4l2_clk_enable(), v4l2_clk_disable(), | ||
1131 | v4l2_clk_get_rate(), and v4l2_clk_set_rate(). Clock suppliers have to provide | ||
1132 | clock operations that will be called when clock users invoke respective API | ||
1133 | methods. | ||
1134 | |||
1135 | It is expected that once the CCF becomes available on all relevant | ||
1136 | architectures this API will be removed. | ||
diff --git a/Documentation/zh_CN/video4linux/v4l2-framework.txt b/Documentation/zh_CN/video4linux/v4l2-framework.txt index 44c1d934c4e3..0da95dbaef34 100644 --- a/Documentation/zh_CN/video4linux/v4l2-framework.txt +++ b/Documentation/zh_CN/video4linux/v4l2-framework.txt | |||
@@ -247,7 +247,6 @@ i2c_client 结构体,i2c_set_clientdata() 函数可用于保存一个 v4l2_sub | |||
247 | 这些结构体定义如下: | 247 | 这些结构体定义如下: |
248 | 248 | ||
249 | struct v4l2_subdev_core_ops { | 249 | struct v4l2_subdev_core_ops { |
250 | int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip); | ||
251 | int (*log_status)(struct v4l2_subdev *sd); | 250 | int (*log_status)(struct v4l2_subdev *sd); |
252 | int (*init)(struct v4l2_subdev *sd, u32 val); | 251 | int (*init)(struct v4l2_subdev *sd, u32 val); |
253 | ... | 252 | ... |
@@ -337,24 +336,24 @@ subdev->dev 域就指向了 v4l2_device。 | |||
337 | 336 | ||
338 | 注册之设备后,可通过以下方式直接调用其操作函数: | 337 | 注册之设备后,可通过以下方式直接调用其操作函数: |
339 | 338 | ||
340 | err = sd->ops->core->g_chip_ident(sd, &chip); | 339 | err = sd->ops->core->g_std(sd, &norm); |
341 | 340 | ||
342 | 但使用如下宏会比较容易且合适: | 341 | 但使用如下宏会比较容易且合适: |
343 | 342 | ||
344 | err = v4l2_subdev_call(sd, core, g_chip_ident, &chip); | 343 | err = v4l2_subdev_call(sd, core, g_std, &norm); |
345 | 344 | ||
346 | 这个宏将会做 NULL 指针检查,如果 subdev 为 NULL,则返回-ENODEV;如果 | 345 | 这个宏将会做 NULL 指针检查,如果 subdev 为 NULL,则返回-ENODEV;如果 |
347 | subdev->core 或 subdev->core->g_chip_ident 为 NULL,则返回 -ENOIOCTLCMD; | 346 | subdev->core 或 subdev->core->g_std 为 NULL,则返回 -ENOIOCTLCMD; |
348 | 否则将返回 subdev->ops->core->g_chip_ident ops 调用的实际结果。 | 347 | 否则将返回 subdev->ops->core->g_std ops 调用的实际结果。 |
349 | 348 | ||
350 | 有时也可能同时调用所有或一系列子设备的某个操作函数: | 349 | 有时也可能同时调用所有或一系列子设备的某个操作函数: |
351 | 350 | ||
352 | v4l2_device_call_all(v4l2_dev, 0, core, g_chip_ident, &chip); | 351 | v4l2_device_call_all(v4l2_dev, 0, core, g_std, &norm); |
353 | 352 | ||
354 | 任何不支持此操作的子设备都会被跳过,并忽略错误返回值。但如果你需要 | 353 | 任何不支持此操作的子设备都会被跳过,并忽略错误返回值。但如果你需要 |
355 | 检查出错码,则可使用如下函数: | 354 | 检查出错码,则可使用如下函数: |
356 | 355 | ||
357 | err = v4l2_device_call_until_err(v4l2_dev, 0, core, g_chip_ident, &chip); | 356 | err = v4l2_device_call_until_err(v4l2_dev, 0, core, g_std, &norm); |
358 | 357 | ||
359 | 除 -ENOIOCTLCMD 外的任何错误都会跳出循环并返回错误值。如果(除 -ENOIOCTLCMD | 358 | 除 -ENOIOCTLCMD 外的任何错误都会跳出循环并返回错误值。如果(除 -ENOIOCTLCMD |
360 | 外)没有错误发生,则返回 0。 | 359 | 外)没有错误发生,则返回 0。 |