diff options
Diffstat (limited to 'Documentation')
50 files changed, 1416 insertions, 604 deletions
diff --git a/Documentation/ABI/testing/sysfs-block-zram b/Documentation/ABI/testing/sysfs-block-zram new file mode 100644 index 000000000000..c8b3b48ec62c --- /dev/null +++ b/Documentation/ABI/testing/sysfs-block-zram | |||
@@ -0,0 +1,99 @@ | |||
1 | What: /sys/block/zram<id>/disksize | ||
2 | Date: August 2010 | ||
3 | Contact: Nitin Gupta <ngupta@vflare.org> | ||
4 | Description: | ||
5 | The disksize file is read-write and specifies the disk size | ||
6 | which represents the limit on the *uncompressed* worth of data | ||
7 | that can be stored in this disk. | ||
8 | |||
9 | What: /sys/block/zram<id>/initstate | ||
10 | Date: August 2010 | ||
11 | Contact: Nitin Gupta <ngupta@vflare.org> | ||
12 | Description: | ||
13 | The disksize file is read-only and shows the initialization | ||
14 | state of the device. | ||
15 | |||
16 | What: /sys/block/zram<id>/reset | ||
17 | Date: August 2010 | ||
18 | Contact: Nitin Gupta <ngupta@vflare.org> | ||
19 | Description: | ||
20 | The disksize file is write-only and allows resetting the | ||
21 | device. The reset operation frees all the memory assocaited | ||
22 | with this device. | ||
23 | |||
24 | What: /sys/block/zram<id>/num_reads | ||
25 | Date: August 2010 | ||
26 | Contact: Nitin Gupta <ngupta@vflare.org> | ||
27 | Description: | ||
28 | The num_reads file is read-only and specifies the number of | ||
29 | reads (failed or successful) done on this device. | ||
30 | |||
31 | What: /sys/block/zram<id>/num_writes | ||
32 | Date: August 2010 | ||
33 | Contact: Nitin Gupta <ngupta@vflare.org> | ||
34 | Description: | ||
35 | The num_writes file is read-only and specifies the number of | ||
36 | writes (failed or successful) done on this device. | ||
37 | |||
38 | What: /sys/block/zram<id>/invalid_io | ||
39 | Date: August 2010 | ||
40 | Contact: Nitin Gupta <ngupta@vflare.org> | ||
41 | Description: | ||
42 | The invalid_io file is read-only and specifies the number of | ||
43 | non-page-size-aligned I/O requests issued to this device. | ||
44 | |||
45 | What: /sys/block/zram<id>/notify_free | ||
46 | Date: August 2010 | ||
47 | Contact: Nitin Gupta <ngupta@vflare.org> | ||
48 | Description: | ||
49 | The notify_free file is read-only and specifies the number of | ||
50 | swap slot free notifications received by this device. These | ||
51 | notifications are send to a swap block device when a swap slot | ||
52 | is freed. This statistic is applicable only when this disk is | ||
53 | being used as a swap disk. | ||
54 | |||
55 | What: /sys/block/zram<id>/discard | ||
56 | Date: August 2010 | ||
57 | Contact: Nitin Gupta <ngupta@vflare.org> | ||
58 | Description: | ||
59 | The discard file is read-only and specifies the number of | ||
60 | discard requests received by this device. These requests | ||
61 | provide information to block device regarding blocks which are | ||
62 | no longer used by filesystem. | ||
63 | |||
64 | What: /sys/block/zram<id>/zero_pages | ||
65 | Date: August 2010 | ||
66 | Contact: Nitin Gupta <ngupta@vflare.org> | ||
67 | Description: | ||
68 | The zero_pages file is read-only and specifies number of zero | ||
69 | filled pages written to this disk. No memory is allocated for | ||
70 | such pages. | ||
71 | |||
72 | What: /sys/block/zram<id>/orig_data_size | ||
73 | Date: August 2010 | ||
74 | Contact: Nitin Gupta <ngupta@vflare.org> | ||
75 | Description: | ||
76 | The orig_data_size file is read-only and specifies uncompressed | ||
77 | size of data stored in this disk. This excludes zero-filled | ||
78 | pages (zero_pages) since no memory is allocated for them. | ||
79 | Unit: bytes | ||
80 | |||
81 | What: /sys/block/zram<id>/compr_data_size | ||
82 | Date: August 2010 | ||
83 | Contact: Nitin Gupta <ngupta@vflare.org> | ||
84 | Description: | ||
85 | The compr_data_size file is read-only and specifies compressed | ||
86 | size of data stored in this disk. So, compression ratio can be | ||
87 | calculated using orig_data_size and this statistic. | ||
88 | Unit: bytes | ||
89 | |||
90 | What: /sys/block/zram<id>/mem_used_total | ||
91 | Date: August 2010 | ||
92 | Contact: Nitin Gupta <ngupta@vflare.org> | ||
93 | Description: | ||
94 | The mem_used_total file is read-only and specifies the amount | ||
95 | of memory, including allocator fragmentation and metadata | ||
96 | overhead, allocated for this disk. So, allocator space | ||
97 | efficiency can be calculated using compr_data_size and this | ||
98 | statistic. | ||
99 | Unit: bytes \ No newline at end of file | ||
diff --git a/Documentation/DocBook/media-entities.tmpl b/Documentation/DocBook/media-entities.tmpl index 6ae97157b1c7..be34dcbe0d90 100644 --- a/Documentation/DocBook/media-entities.tmpl +++ b/Documentation/DocBook/media-entities.tmpl | |||
@@ -250,6 +250,9 @@ | |||
250 | <!ENTITY sub-yuv422p SYSTEM "v4l/pixfmt-yuv422p.xml"> | 250 | <!ENTITY sub-yuv422p SYSTEM "v4l/pixfmt-yuv422p.xml"> |
251 | <!ENTITY sub-yuyv SYSTEM "v4l/pixfmt-yuyv.xml"> | 251 | <!ENTITY sub-yuyv SYSTEM "v4l/pixfmt-yuyv.xml"> |
252 | <!ENTITY sub-yvyu SYSTEM "v4l/pixfmt-yvyu.xml"> | 252 | <!ENTITY sub-yvyu SYSTEM "v4l/pixfmt-yvyu.xml"> |
253 | <!ENTITY sub-srggb10 SYSTEM "v4l/pixfmt-srggb10.xml"> | ||
254 | <!ENTITY sub-srggb8 SYSTEM "v4l/pixfmt-srggb8.xml"> | ||
255 | <!ENTITY sub-y10 SYSTEM "v4l/pixfmt-y10.xml"> | ||
253 | <!ENTITY sub-pixfmt SYSTEM "v4l/pixfmt.xml"> | 256 | <!ENTITY sub-pixfmt SYSTEM "v4l/pixfmt.xml"> |
254 | <!ENTITY sub-cropcap SYSTEM "v4l/vidioc-cropcap.xml"> | 257 | <!ENTITY sub-cropcap SYSTEM "v4l/vidioc-cropcap.xml"> |
255 | <!ENTITY sub-dbg-g-register SYSTEM "v4l/vidioc-dbg-g-register.xml"> | 258 | <!ENTITY sub-dbg-g-register SYSTEM "v4l/vidioc-dbg-g-register.xml"> |
@@ -347,6 +350,9 @@ | |||
347 | <!ENTITY yuv422p SYSTEM "v4l/pixfmt-yuv422p.xml"> | 350 | <!ENTITY yuv422p SYSTEM "v4l/pixfmt-yuv422p.xml"> |
348 | <!ENTITY yuyv SYSTEM "v4l/pixfmt-yuyv.xml"> | 351 | <!ENTITY yuyv SYSTEM "v4l/pixfmt-yuyv.xml"> |
349 | <!ENTITY yvyu SYSTEM "v4l/pixfmt-yvyu.xml"> | 352 | <!ENTITY yvyu SYSTEM "v4l/pixfmt-yvyu.xml"> |
353 | <!ENTITY srggb10 SYSTEM "v4l/pixfmt-srggb10.xml"> | ||
354 | <!ENTITY srggb8 SYSTEM "v4l/pixfmt-srggb8.xml"> | ||
355 | <!ENTITY y10 SYSTEM "v4l/pixfmt-y10.xml"> | ||
350 | <!ENTITY cropcap SYSTEM "v4l/vidioc-cropcap.xml"> | 356 | <!ENTITY cropcap SYSTEM "v4l/vidioc-cropcap.xml"> |
351 | <!ENTITY dbg-g-register SYSTEM "v4l/vidioc-dbg-g-register.xml"> | 357 | <!ENTITY dbg-g-register SYSTEM "v4l/vidioc-dbg-g-register.xml"> |
352 | <!ENTITY encoder-cmd SYSTEM "v4l/vidioc-encoder-cmd.xml"> | 358 | <!ENTITY encoder-cmd SYSTEM "v4l/vidioc-encoder-cmd.xml"> |
diff --git a/Documentation/DocBook/v4l/compat.xml b/Documentation/DocBook/v4l/compat.xml index 54447f0d0784..c9ce61d981f5 100644 --- a/Documentation/DocBook/v4l/compat.xml +++ b/Documentation/DocBook/v4l/compat.xml | |||
@@ -21,11 +21,15 @@ API.</para> | |||
21 | <title>Opening and Closing Devices</title> | 21 | <title>Opening and Closing Devices</title> |
22 | 22 | ||
23 | <para>For compatibility reasons the character device file names | 23 | <para>For compatibility reasons the character device file names |
24 | recommended for V4L2 video capture, overlay, radio, teletext and raw | 24 | recommended for V4L2 video capture, overlay, radio and raw |
25 | vbi capture devices did not change from those used by V4L. They are | 25 | vbi capture devices did not change from those used by V4L. They are |
26 | listed in <xref linkend="devices" /> and below in <xref | 26 | listed in <xref linkend="devices" /> and below in <xref |
27 | linkend="v4l-dev" />.</para> | 27 | linkend="v4l-dev" />.</para> |
28 | 28 | ||
29 | <para>The teletext devices (minor range 192-223) have been removed in | ||
30 | V4L2 and no longer exist. There is no hardware available anymore for handling | ||
31 | pure teletext. Instead raw or sliced VBI is used.</para> | ||
32 | |||
29 | <para>The V4L <filename>videodev</filename> module automatically | 33 | <para>The V4L <filename>videodev</filename> module automatically |
30 | assigns minor numbers to drivers in load order, depending on the | 34 | assigns minor numbers to drivers in load order, depending on the |
31 | registered device type. We recommend that V4L2 drivers by default | 35 | registered device type. We recommend that V4L2 drivers by default |
@@ -66,13 +70,6 @@ not compatible with V4L or V4L2.</para> </footnote>, | |||
66 | <entry>64-127</entry> | 70 | <entry>64-127</entry> |
67 | </row> | 71 | </row> |
68 | <row> | 72 | <row> |
69 | <entry>Teletext decoder</entry> | ||
70 | <entry><para><filename>/dev/vtx</filename>, | ||
71 | <filename>/dev/vtx0</filename> to | ||
72 | <filename>/dev/vtx31</filename></para></entry> | ||
73 | <entry>192-223</entry> | ||
74 | </row> | ||
75 | <row> | ||
76 | <entry>Raw VBI capture</entry> | 73 | <entry>Raw VBI capture</entry> |
77 | <entry><para><filename>/dev/vbi</filename>, | 74 | <entry><para><filename>/dev/vbi</filename>, |
78 | <filename>/dev/vbi0</filename> to | 75 | <filename>/dev/vbi0</filename> to |
@@ -2345,6 +2342,17 @@ more information.</para> | |||
2345 | </listitem> | 2342 | </listitem> |
2346 | </orderedlist> | 2343 | </orderedlist> |
2347 | </section> | 2344 | </section> |
2345 | <section> | ||
2346 | <title>V4L2 in Linux 2.6.37</title> | ||
2347 | <orderedlist> | ||
2348 | <listitem> | ||
2349 | <para>Remove the vtx (videotext/teletext) API. This API was no longer | ||
2350 | used and no hardware exists to verify the API. Nor were any userspace applications found | ||
2351 | that used it. It was originally scheduled for removal in 2.6.35. | ||
2352 | </para> | ||
2353 | </listitem> | ||
2354 | </orderedlist> | ||
2355 | </section> | ||
2348 | 2356 | ||
2349 | <section id="other"> | 2357 | <section id="other"> |
2350 | <title>Relation of V4L2 to other Linux multimedia APIs</title> | 2358 | <title>Relation of V4L2 to other Linux multimedia APIs</title> |
diff --git a/Documentation/DocBook/v4l/controls.xml b/Documentation/DocBook/v4l/controls.xml index 8408caaee276..2fae3e87ce73 100644 --- a/Documentation/DocBook/v4l/controls.xml +++ b/Documentation/DocBook/v4l/controls.xml | |||
@@ -312,10 +312,17 @@ minimum value disables backlight compensation.</entry> | |||
312 | information and bits 24-31 must be zero.</entry> | 312 | information and bits 24-31 must be zero.</entry> |
313 | </row> | 313 | </row> |
314 | <row> | 314 | <row> |
315 | <entry><constant>V4L2_CID_ILLUMINATORS_1</constant> | ||
316 | <constant>V4L2_CID_ILLUMINATORS_2</constant></entry> | ||
317 | <entry>boolean</entry> | ||
318 | <entry>Switch on or off the illuminator 1 or 2 of the device | ||
319 | (usually a microscope).</entry> | ||
320 | </row> | ||
321 | <row> | ||
315 | <entry><constant>V4L2_CID_LASTP1</constant></entry> | 322 | <entry><constant>V4L2_CID_LASTP1</constant></entry> |
316 | <entry></entry> | 323 | <entry></entry> |
317 | <entry>End of the predefined control IDs (currently | 324 | <entry>End of the predefined control IDs (currently |
318 | <constant>V4L2_CID_BG_COLOR</constant> + 1).</entry> | 325 | <constant>V4L2_CID_ILLUMINATORS_2</constant> + 1).</entry> |
319 | </row> | 326 | </row> |
320 | <row> | 327 | <row> |
321 | <entry><constant>V4L2_CID_PRIVATE_BASE</constant></entry> | 328 | <entry><constant>V4L2_CID_PRIVATE_BASE</constant></entry> |
@@ -357,9 +364,6 @@ enumerate_menu (void) | |||
357 | querymenu.index++) { | 364 | querymenu.index++) { |
358 | if (0 == ioctl (fd, &VIDIOC-QUERYMENU;, &querymenu)) { | 365 | if (0 == ioctl (fd, &VIDIOC-QUERYMENU;, &querymenu)) { |
359 | printf (" %s\n", querymenu.name); | 366 | printf (" %s\n", querymenu.name); |
360 | } else { | ||
361 | perror ("VIDIOC_QUERYMENU"); | ||
362 | exit (EXIT_FAILURE); | ||
363 | } | 367 | } |
364 | } | 368 | } |
365 | } | 369 | } |
diff --git a/Documentation/DocBook/v4l/dev-rds.xml b/Documentation/DocBook/v4l/dev-rds.xml index 0869d701b1e5..360d2737e649 100644 --- a/Documentation/DocBook/v4l/dev-rds.xml +++ b/Documentation/DocBook/v4l/dev-rds.xml | |||
@@ -3,15 +3,16 @@ | |||
3 | <para>The Radio Data System transmits supplementary | 3 | <para>The Radio Data System transmits supplementary |
4 | information in binary format, for example the station name or travel | 4 | information in binary format, for example the station name or travel |
5 | information, on an inaudible audio subcarrier of a radio program. This | 5 | information, on an inaudible audio subcarrier of a radio program. This |
6 | interface is aimed at devices capable of receiving and decoding RDS | 6 | interface is aimed at devices capable of receiving and/or transmitting RDS |
7 | information.</para> | 7 | information.</para> |
8 | 8 | ||
9 | <para>For more information see the core RDS standard <xref linkend="en50067" /> | 9 | <para>For more information see the core RDS standard <xref linkend="en50067" /> |
10 | and the RBDS standard <xref linkend="nrsc4" />.</para> | 10 | and the RBDS standard <xref linkend="nrsc4" />.</para> |
11 | 11 | ||
12 | <para>Note that the RBDS standard as is used in the USA is almost identical | 12 | <para>Note that the RBDS standard as is used in the USA is almost identical |
13 | to the RDS standard. Any RDS decoder can also handle RBDS. Only some of the fields | 13 | to the RDS standard. Any RDS decoder/encoder can also handle RBDS. Only some of the |
14 | have slightly different meanings. See the RBDS standard for more information.</para> | 14 | fields have slightly different meanings. See the RBDS standard for more |
15 | information.</para> | ||
15 | 16 | ||
16 | <para>The RBDS standard also specifies support for MMBS (Modified Mobile Search). | 17 | <para>The RBDS standard also specifies support for MMBS (Modified Mobile Search). |
17 | This is a proprietary format which seems to be discontinued. The RDS interface does not | 18 | This is a proprietary format which seems to be discontinued. The RDS interface does not |
@@ -21,16 +22,25 @@ be needed, then please contact the linux-media mailing list: &v4l-ml;.</para> | |||
21 | <section> | 22 | <section> |
22 | <title>Querying Capabilities</title> | 23 | <title>Querying Capabilities</title> |
23 | 24 | ||
24 | <para>Devices supporting the RDS capturing API | 25 | <para>Devices supporting the RDS capturing API set |
25 | set the <constant>V4L2_CAP_RDS_CAPTURE</constant> flag in | 26 | the <constant>V4L2_CAP_RDS_CAPTURE</constant> flag in |
26 | the <structfield>capabilities</structfield> field of &v4l2-capability; | 27 | the <structfield>capabilities</structfield> field of &v4l2-capability; |
27 | returned by the &VIDIOC-QUERYCAP; ioctl. | 28 | returned by the &VIDIOC-QUERYCAP; ioctl. Any tuner that supports RDS |
28 | Any tuner that supports RDS will set the | 29 | will set the <constant>V4L2_TUNER_CAP_RDS</constant> flag in |
29 | <constant>V4L2_TUNER_CAP_RDS</constant> flag in the <structfield>capability</structfield> | 30 | the <structfield>capability</structfield> field of &v4l2-tuner;. If |
30 | field of &v4l2-tuner;. | 31 | the driver only passes RDS blocks without interpreting the data |
31 | Whether an RDS signal is present can be detected by looking at | 32 | the <constant>V4L2_TUNER_SUB_RDS_BLOCK_IO</constant> flag has to be |
32 | the <structfield>rxsubchans</structfield> field of &v4l2-tuner;: the | 33 | set, see <link linkend="reading-rds-data">Reading RDS data</link>. |
33 | <constant>V4L2_TUNER_SUB_RDS</constant> will be set if RDS data was detected.</para> | 34 | For future use the |
35 | flag <constant>V4L2_TUNER_SUB_RDS_CONTROLS</constant> has also been | ||
36 | defined. However, a driver for a radio tuner with this capability does | ||
37 | not yet exist, so if you are planning to write such a driver you | ||
38 | should discuss this on the linux-media mailing list: &v4l-ml;.</para> | ||
39 | |||
40 | <para> Whether an RDS signal is present can be detected by looking | ||
41 | at the <structfield>rxsubchans</structfield> field of &v4l2-tuner;: | ||
42 | the <constant>V4L2_TUNER_SUB_RDS</constant> will be set if RDS data | ||
43 | was detected.</para> | ||
34 | 44 | ||
35 | <para>Devices supporting the RDS output API | 45 | <para>Devices supporting the RDS output API |
36 | set the <constant>V4L2_CAP_RDS_OUTPUT</constant> flag in | 46 | set the <constant>V4L2_CAP_RDS_OUTPUT</constant> flag in |
@@ -40,16 +50,31 @@ Any modulator that supports RDS will set the | |||
40 | <constant>V4L2_TUNER_CAP_RDS</constant> flag in the <structfield>capability</structfield> | 50 | <constant>V4L2_TUNER_CAP_RDS</constant> flag in the <structfield>capability</structfield> |
41 | field of &v4l2-modulator;. | 51 | field of &v4l2-modulator;. |
42 | In order to enable the RDS transmission one must set the <constant>V4L2_TUNER_SUB_RDS</constant> | 52 | In order to enable the RDS transmission one must set the <constant>V4L2_TUNER_SUB_RDS</constant> |
43 | bit in the <structfield>txsubchans</structfield> field of &v4l2-modulator;.</para> | 53 | bit in the <structfield>txsubchans</structfield> field of &v4l2-modulator;. |
44 | 54 | If the driver only passes RDS blocks without interpreting the data | |
55 | the <constant>V4L2_TUNER_SUB_RDS_BLOCK_IO</constant> flag has to be set. If the | ||
56 | tuner is capable of handling RDS entities like program identification codes and radio | ||
57 | text, the flag <constant>V4L2_TUNER_SUB_RDS_CONTROLS</constant> should be set, | ||
58 | see <link linkend="writing-rds-data">Writing RDS data</link> and | ||
59 | <link linkend="fm-tx-controls">FM Transmitter Control Reference</link>.</para> | ||
45 | </section> | 60 | </section> |
46 | 61 | ||
47 | <section> | 62 | <section id="reading-rds-data"> |
48 | <title>Reading RDS data</title> | 63 | <title>Reading RDS data</title> |
49 | 64 | ||
50 | <para>RDS data can be read from the radio device | 65 | <para>RDS data can be read from the radio device |
51 | with the &func-read; function. The data is packed in groups of three bytes, | 66 | with the &func-read; function. The data is packed in groups of three bytes.</para> |
67 | </section> | ||
68 | |||
69 | <section id="writing-rds-data"> | ||
70 | <title>Writing RDS data</title> | ||
71 | |||
72 | <para>RDS data can be written to the radio device | ||
73 | with the &func-write; function. The data is packed in groups of three bytes, | ||
52 | as follows:</para> | 74 | as follows:</para> |
75 | </section> | ||
76 | |||
77 | <section> | ||
53 | <table frame="none" pgwide="1" id="v4l2-rds-data"> | 78 | <table frame="none" pgwide="1" id="v4l2-rds-data"> |
54 | <title>struct | 79 | <title>struct |
55 | <structname>v4l2_rds_data</structname></title> | 80 | <structname>v4l2_rds_data</structname></title> |
@@ -111,48 +136,57 @@ as follows:</para> | |||
111 | <tbody valign="top"> | 136 | <tbody valign="top"> |
112 | <row> | 137 | <row> |
113 | <entry>V4L2_RDS_BLOCK_MSK</entry> | 138 | <entry>V4L2_RDS_BLOCK_MSK</entry> |
139 | <entry> </entry> | ||
114 | <entry>7</entry> | 140 | <entry>7</entry> |
115 | <entry>Mask for bits 0-2 to get the block ID.</entry> | 141 | <entry>Mask for bits 0-2 to get the block ID.</entry> |
116 | </row> | 142 | </row> |
117 | <row> | 143 | <row> |
118 | <entry>V4L2_RDS_BLOCK_A</entry> | 144 | <entry>V4L2_RDS_BLOCK_A</entry> |
145 | <entry> </entry> | ||
119 | <entry>0</entry> | 146 | <entry>0</entry> |
120 | <entry>Block A.</entry> | 147 | <entry>Block A.</entry> |
121 | </row> | 148 | </row> |
122 | <row> | 149 | <row> |
123 | <entry>V4L2_RDS_BLOCK_B</entry> | 150 | <entry>V4L2_RDS_BLOCK_B</entry> |
151 | <entry> </entry> | ||
124 | <entry>1</entry> | 152 | <entry>1</entry> |
125 | <entry>Block B.</entry> | 153 | <entry>Block B.</entry> |
126 | </row> | 154 | </row> |
127 | <row> | 155 | <row> |
128 | <entry>V4L2_RDS_BLOCK_C</entry> | 156 | <entry>V4L2_RDS_BLOCK_C</entry> |
157 | <entry> </entry> | ||
129 | <entry>2</entry> | 158 | <entry>2</entry> |
130 | <entry>Block C.</entry> | 159 | <entry>Block C.</entry> |
131 | </row> | 160 | </row> |
132 | <row> | 161 | <row> |
133 | <entry>V4L2_RDS_BLOCK_D</entry> | 162 | <entry>V4L2_RDS_BLOCK_D</entry> |
163 | <entry> </entry> | ||
134 | <entry>3</entry> | 164 | <entry>3</entry> |
135 | <entry>Block D.</entry> | 165 | <entry>Block D.</entry> |
136 | </row> | 166 | </row> |
137 | <row> | 167 | <row> |
138 | <entry>V4L2_RDS_BLOCK_C_ALT</entry> | 168 | <entry>V4L2_RDS_BLOCK_C_ALT</entry> |
169 | <entry> </entry> | ||
139 | <entry>4</entry> | 170 | <entry>4</entry> |
140 | <entry>Block C'.</entry> | 171 | <entry>Block C'.</entry> |
141 | </row> | 172 | </row> |
142 | <row> | 173 | <row> |
143 | <entry>V4L2_RDS_BLOCK_INVALID</entry> | 174 | <entry>V4L2_RDS_BLOCK_INVALID</entry> |
175 | <entry>read-only</entry> | ||
144 | <entry>7</entry> | 176 | <entry>7</entry> |
145 | <entry>An invalid block.</entry> | 177 | <entry>An invalid block.</entry> |
146 | </row> | 178 | </row> |
147 | <row> | 179 | <row> |
148 | <entry>V4L2_RDS_BLOCK_CORRECTED</entry> | 180 | <entry>V4L2_RDS_BLOCK_CORRECTED</entry> |
181 | <entry>read-only</entry> | ||
149 | <entry>0x40</entry> | 182 | <entry>0x40</entry> |
150 | <entry>A bit error was detected but corrected.</entry> | 183 | <entry>A bit error was detected but corrected.</entry> |
151 | </row> | 184 | </row> |
152 | <row> | 185 | <row> |
153 | <entry>V4L2_RDS_BLOCK_ERROR</entry> | 186 | <entry>V4L2_RDS_BLOCK_ERROR</entry> |
187 | <entry>read-only</entry> | ||
154 | <entry>0x80</entry> | 188 | <entry>0x80</entry> |
155 | <entry>An incorrectable error occurred.</entry> | 189 | <entry>An uncorrectable error occurred.</entry> |
156 | </row> | 190 | </row> |
157 | </tbody> | 191 | </tbody> |
158 | </tgroup> | 192 | </tgroup> |
diff --git a/Documentation/DocBook/v4l/dev-teletext.xml b/Documentation/DocBook/v4l/dev-teletext.xml index 76184e8ed618..414b1cfff9f4 100644 --- a/Documentation/DocBook/v4l/dev-teletext.xml +++ b/Documentation/DocBook/v4l/dev-teletext.xml | |||
@@ -1,35 +1,32 @@ | |||
1 | <title>Teletext Interface</title> | 1 | <title>Teletext Interface</title> |
2 | 2 | ||
3 | <para>This interface aims at devices receiving and demodulating | 3 | <para>This interface was aimed at devices receiving and demodulating |
4 | Teletext data [<xref linkend="ets300706" />, <xref linkend="itu653" />], evaluating the | 4 | Teletext data [<xref linkend="ets300706" />, <xref linkend="itu653" />], evaluating the |
5 | Teletext packages and storing formatted pages in cache memory. Such | 5 | Teletext packages and storing formatted pages in cache memory. Such |
6 | devices are usually implemented as microcontrollers with serial | 6 | devices are usually implemented as microcontrollers with serial |
7 | interface (I<superscript>2</superscript>C) and can be found on older | 7 | interface (I<superscript>2</superscript>C) and could be found on old |
8 | TV cards, dedicated Teletext decoding cards and home-brew devices | 8 | TV cards, dedicated Teletext decoding cards and home-brew devices |
9 | connected to the PC parallel port.</para> | 9 | connected to the PC parallel port.</para> |
10 | 10 | ||
11 | <para>The Teletext API was designed by Martin Buck. It is defined in | 11 | <para>The Teletext API was designed by Martin Buck. It was defined in |
12 | the kernel header file <filename>linux/videotext.h</filename>, the | 12 | the kernel header file <filename>linux/videotext.h</filename>, the |
13 | specification is available from <ulink url="ftp://ftp.gwdg.de/pub/linux/misc/videotext/"> | 13 | specification is available from <ulink url="ftp://ftp.gwdg.de/pub/linux/misc/videotext/"> |
14 | ftp://ftp.gwdg.de/pub/linux/misc/videotext/</ulink>. (Videotext is the name of | 14 | ftp://ftp.gwdg.de/pub/linux/misc/videotext/</ulink>. (Videotext is the name of |
15 | the German public television Teletext service.) Conventional character | 15 | the German public television Teletext service.)</para> |
16 | device file names are <filename>/dev/vtx</filename> and | ||
17 | <filename>/dev/vttuner</filename>, with device number 83, 0 and 83, 16 | ||
18 | respectively. A similar interface exists for the Philips SAA5249 | ||
19 | Teletext decoder [specification?] with character device file names | ||
20 | <filename>/dev/tlkN</filename>, device number 102, N.</para> | ||
21 | 16 | ||
22 | <para>Eventually the Teletext API was integrated into the V4L API | 17 | <para>Eventually the Teletext API was integrated into the V4L API |
23 | with character device file names <filename>/dev/vtx0</filename> to | 18 | with character device file names <filename>/dev/vtx0</filename> to |
24 | <filename>/dev/vtx31</filename>, device major number 81, minor numbers | 19 | <filename>/dev/vtx31</filename>, device major number 81, minor numbers |
25 | 192 to 223. For reference the V4L Teletext API specification is | 20 | 192 to 223.</para> |
26 | reproduced here in full: "Teletext interfaces talk the existing VTX | ||
27 | API." Teletext devices with major number 83 and 102 will be removed in | ||
28 | Linux 2.6.</para> | ||
29 | 21 | ||
30 | <para>There are no plans to replace the Teletext API or to integrate | 22 | <para>However, teletext decoders were quickly replaced by more |
31 | it into V4L2. Please write to the linux-media mailing list: &v4l-ml; | 23 | generic VBI demodulators and those dedicated teletext decoders no longer exist. |
32 | when the need arises.</para> | 24 | For many years the vtx devices were still around, even though nobody used |
25 | them. So the decision was made to finally remove support for the Teletext API in | ||
26 | kernel 2.6.37.</para> | ||
27 | |||
28 | <para>Modern devices all use the <link linkend="raw-vbi">raw</link> or | ||
29 | <link linkend="sliced">sliced</link> VBI API.</para> | ||
33 | 30 | ||
34 | <!-- | 31 | <!-- |
35 | Local Variables: | 32 | Local Variables: |
diff --git a/Documentation/DocBook/v4l/pixfmt-packed-rgb.xml b/Documentation/DocBook/v4l/pixfmt-packed-rgb.xml index 26e879231088..4db272b8a0d3 100644 --- a/Documentation/DocBook/v4l/pixfmt-packed-rgb.xml +++ b/Documentation/DocBook/v4l/pixfmt-packed-rgb.xml | |||
@@ -739,7 +739,7 @@ defined in error. Drivers may interpret them as in <xref | |||
739 | <entry>b<subscript>1</subscript></entry> | 739 | <entry>b<subscript>1</subscript></entry> |
740 | <entry>b<subscript>0</subscript></entry> | 740 | <entry>b<subscript>0</subscript></entry> |
741 | </row> | 741 | </row> |
742 | <row id="V4L2-PIX-FMT-BGR666"> | 742 | <row><!-- id="V4L2-PIX-FMT-BGR666" --> |
743 | <entry><constant>V4L2_PIX_FMT_BGR666</constant></entry> | 743 | <entry><constant>V4L2_PIX_FMT_BGR666</constant></entry> |
744 | <entry>'BGRH'</entry> | 744 | <entry>'BGRH'</entry> |
745 | <entry></entry> | 745 | <entry></entry> |
diff --git a/Documentation/DocBook/v4l/pixfmt-srggb10.xml b/Documentation/DocBook/v4l/pixfmt-srggb10.xml new file mode 100644 index 000000000000..7b274092e60c --- /dev/null +++ b/Documentation/DocBook/v4l/pixfmt-srggb10.xml | |||
@@ -0,0 +1,90 @@ | |||
1 | <refentry> | ||
2 | <refmeta> | ||
3 | <refentrytitle>V4L2_PIX_FMT_SRGGB10 ('RG10'), | ||
4 | V4L2_PIX_FMT_SGRBG10 ('BA10'), | ||
5 | V4L2_PIX_FMT_SGBRG10 ('GB10'), | ||
6 | V4L2_PIX_FMT_SBGGR10 ('BG10'), | ||
7 | </refentrytitle> | ||
8 | &manvol; | ||
9 | </refmeta> | ||
10 | <refnamediv> | ||
11 | <refname id="V4L2-PIX-FMT-SRGGB10"><constant>V4L2_PIX_FMT_SRGGB10</constant></refname> | ||
12 | <refname id="V4L2-PIX-FMT-SGRBG10"><constant>V4L2_PIX_FMT_SGRBG10</constant></refname> | ||
13 | <refname id="V4L2-PIX-FMT-SGBRG10"><constant>V4L2_PIX_FMT_SGBRG10</constant></refname> | ||
14 | <refname id="V4L2-PIX-FMT-SBGGR10"><constant>V4L2_PIX_FMT_SBGGR10</constant></refname> | ||
15 | <refpurpose>10-bit Bayer formats expanded to 16 bits</refpurpose> | ||
16 | </refnamediv> | ||
17 | <refsect1> | ||
18 | <title>Description</title> | ||
19 | |||
20 | <para>The following four pixel formats are raw sRGB / Bayer formats with | ||
21 | 10 bits per colour. Each colour component is stored in a 16-bit word, with 6 | ||
22 | unused high bits filled with zeros. Each n-pixel row contains n/2 green samples | ||
23 | and n/2 blue or red samples, with alternating red and blue rows. Bytes are | ||
24 | stored in memory in little endian order. They are conventionally described | ||
25 | as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example of one of these | ||
26 | formats</para> | ||
27 | |||
28 | <example> | ||
29 | <title><constant>V4L2_PIX_FMT_SBGGR10</constant> 4 × 4 | ||
30 | pixel image</title> | ||
31 | |||
32 | <formalpara> | ||
33 | <title>Byte Order.</title> | ||
34 | <para>Each cell is one byte, high 6 bits in high bytes are 0. | ||
35 | <informaltable frame="none"> | ||
36 | <tgroup cols="5" align="center"> | ||
37 | <colspec align="left" colwidth="2*" /> | ||
38 | <tbody valign="top"> | ||
39 | <row> | ||
40 | <entry>start + 0:</entry> | ||
41 | <entry>B<subscript>00low</subscript></entry> | ||
42 | <entry>B<subscript>00high</subscript></entry> | ||
43 | <entry>G<subscript>01low</subscript></entry> | ||
44 | <entry>G<subscript>01high</subscript></entry> | ||
45 | <entry>B<subscript>02low</subscript></entry> | ||
46 | <entry>B<subscript>02high</subscript></entry> | ||
47 | <entry>G<subscript>03low</subscript></entry> | ||
48 | <entry>G<subscript>03high</subscript></entry> | ||
49 | </row> | ||
50 | <row> | ||
51 | <entry>start + 8:</entry> | ||
52 | <entry>G<subscript>10low</subscript></entry> | ||
53 | <entry>G<subscript>10high</subscript></entry> | ||
54 | <entry>R<subscript>11low</subscript></entry> | ||
55 | <entry>R<subscript>11high</subscript></entry> | ||
56 | <entry>G<subscript>12low</subscript></entry> | ||
57 | <entry>G<subscript>12high</subscript></entry> | ||
58 | <entry>R<subscript>13low</subscript></entry> | ||
59 | <entry>R<subscript>13high</subscript></entry> | ||
60 | </row> | ||
61 | <row> | ||
62 | <entry>start + 16:</entry> | ||
63 | <entry>B<subscript>20low</subscript></entry> | ||
64 | <entry>B<subscript>20high</subscript></entry> | ||
65 | <entry>G<subscript>21low</subscript></entry> | ||
66 | <entry>G<subscript>21high</subscript></entry> | ||
67 | <entry>B<subscript>22low</subscript></entry> | ||
68 | <entry>B<subscript>22high</subscript></entry> | ||
69 | <entry>G<subscript>23low</subscript></entry> | ||
70 | <entry>G<subscript>23high</subscript></entry> | ||
71 | </row> | ||
72 | <row> | ||
73 | <entry>start + 24:</entry> | ||
74 | <entry>G<subscript>30low</subscript></entry> | ||
75 | <entry>G<subscript>30high</subscript></entry> | ||
76 | <entry>R<subscript>31low</subscript></entry> | ||
77 | <entry>R<subscript>31high</subscript></entry> | ||
78 | <entry>G<subscript>32low</subscript></entry> | ||
79 | <entry>G<subscript>32high</subscript></entry> | ||
80 | <entry>R<subscript>33low</subscript></entry> | ||
81 | <entry>R<subscript>33high</subscript></entry> | ||
82 | </row> | ||
83 | </tbody> | ||
84 | </tgroup> | ||
85 | </informaltable> | ||
86 | </para> | ||
87 | </formalpara> | ||
88 | </example> | ||
89 | </refsect1> | ||
90 | </refentry> | ||
diff --git a/Documentation/DocBook/v4l/pixfmt-srggb8.xml b/Documentation/DocBook/v4l/pixfmt-srggb8.xml new file mode 100644 index 000000000000..2570e3be3cf1 --- /dev/null +++ b/Documentation/DocBook/v4l/pixfmt-srggb8.xml | |||
@@ -0,0 +1,67 @@ | |||
1 | <refentry id="V4L2-PIX-FMT-SRGGB8"> | ||
2 | <refmeta> | ||
3 | <refentrytitle>V4L2_PIX_FMT_SRGGB8 ('RGGB')</refentrytitle> | ||
4 | &manvol; | ||
5 | </refmeta> | ||
6 | <refnamediv> | ||
7 | <refname><constant>V4L2_PIX_FMT_SRGGB8</constant></refname> | ||
8 | <refpurpose>Bayer RGB format</refpurpose> | ||
9 | </refnamediv> | ||
10 | <refsect1> | ||
11 | <title>Description</title> | ||
12 | |||
13 | <para>This is commonly the native format of digital cameras, | ||
14 | reflecting the arrangement of sensors on the CCD device. Only one red, | ||
15 | green or blue value is given for each pixel. Missing components must | ||
16 | be interpolated from neighbouring pixels. From left to right the first | ||
17 | row consists of a red and green value, the second row of a green and | ||
18 | blue value. This scheme repeats to the right and down for every two | ||
19 | columns and rows.</para> | ||
20 | |||
21 | <example> | ||
22 | <title><constant>V4L2_PIX_FMT_SRGGB8</constant> 4 × 4 | ||
23 | pixel image</title> | ||
24 | |||
25 | <formalpara> | ||
26 | <title>Byte Order.</title> | ||
27 | <para>Each cell is one byte. | ||
28 | <informaltable frame="none"> | ||
29 | <tgroup cols="5" align="center"> | ||
30 | <colspec align="left" colwidth="2*" /> | ||
31 | <tbody valign="top"> | ||
32 | <row> | ||
33 | <entry>start + 0:</entry> | ||
34 | <entry>R<subscript>00</subscript></entry> | ||
35 | <entry>G<subscript>01</subscript></entry> | ||
36 | <entry>R<subscript>02</subscript></entry> | ||
37 | <entry>G<subscript>03</subscript></entry> | ||
38 | </row> | ||
39 | <row> | ||
40 | <entry>start + 4:</entry> | ||
41 | <entry>G<subscript>10</subscript></entry> | ||
42 | <entry>B<subscript>11</subscript></entry> | ||
43 | <entry>G<subscript>12</subscript></entry> | ||
44 | <entry>B<subscript>13</subscript></entry> | ||
45 | </row> | ||
46 | <row> | ||
47 | <entry>start + 8:</entry> | ||
48 | <entry>R<subscript>20</subscript></entry> | ||
49 | <entry>G<subscript>21</subscript></entry> | ||
50 | <entry>R<subscript>22</subscript></entry> | ||
51 | <entry>G<subscript>23</subscript></entry> | ||
52 | </row> | ||
53 | <row> | ||
54 | <entry>start + 12:</entry> | ||
55 | <entry>G<subscript>30</subscript></entry> | ||
56 | <entry>B<subscript>31</subscript></entry> | ||
57 | <entry>G<subscript>32</subscript></entry> | ||
58 | <entry>B<subscript>33</subscript></entry> | ||
59 | </row> | ||
60 | </tbody> | ||
61 | </tgroup> | ||
62 | </informaltable> | ||
63 | </para> | ||
64 | </formalpara> | ||
65 | </example> | ||
66 | </refsect1> | ||
67 | </refentry> | ||
diff --git a/Documentation/DocBook/v4l/pixfmt-y10.xml b/Documentation/DocBook/v4l/pixfmt-y10.xml new file mode 100644 index 000000000000..d065043db8d8 --- /dev/null +++ b/Documentation/DocBook/v4l/pixfmt-y10.xml | |||
@@ -0,0 +1,79 @@ | |||
1 | <refentry id="V4L2-PIX-FMT-Y10"> | ||
2 | <refmeta> | ||
3 | <refentrytitle>V4L2_PIX_FMT_Y10 ('Y10 ')</refentrytitle> | ||
4 | &manvol; | ||
5 | </refmeta> | ||
6 | <refnamediv> | ||
7 | <refname><constant>V4L2_PIX_FMT_Y10</constant></refname> | ||
8 | <refpurpose>Grey-scale image</refpurpose> | ||
9 | </refnamediv> | ||
10 | <refsect1> | ||
11 | <title>Description</title> | ||
12 | |||
13 | <para>This is a grey-scale image with a depth of 10 bits per pixel. Pixels | ||
14 | are stored in 16-bit words with unused high bits padded with 0. The least | ||
15 | significant byte is stored at lower memory addresses (little-endian).</para> | ||
16 | |||
17 | <example> | ||
18 | <title><constant>V4L2_PIX_FMT_Y10</constant> 4 × 4 | ||
19 | pixel image</title> | ||
20 | |||
21 | <formalpara> | ||
22 | <title>Byte Order.</title> | ||
23 | <para>Each cell is one byte. | ||
24 | <informaltable frame="none"> | ||
25 | <tgroup cols="9" align="center"> | ||
26 | <colspec align="left" colwidth="2*" /> | ||
27 | <tbody valign="top"> | ||
28 | <row> | ||
29 | <entry>start + 0:</entry> | ||
30 | <entry>Y'<subscript>00low</subscript></entry> | ||
31 | <entry>Y'<subscript>00high</subscript></entry> | ||
32 | <entry>Y'<subscript>01low</subscript></entry> | ||
33 | <entry>Y'<subscript>01high</subscript></entry> | ||
34 | <entry>Y'<subscript>02low</subscript></entry> | ||
35 | <entry>Y'<subscript>02high</subscript></entry> | ||
36 | <entry>Y'<subscript>03low</subscript></entry> | ||
37 | <entry>Y'<subscript>03high</subscript></entry> | ||
38 | </row> | ||
39 | <row> | ||
40 | <entry>start + 8:</entry> | ||
41 | <entry>Y'<subscript>10low</subscript></entry> | ||
42 | <entry>Y'<subscript>10high</subscript></entry> | ||
43 | <entry>Y'<subscript>11low</subscript></entry> | ||
44 | <entry>Y'<subscript>11high</subscript></entry> | ||
45 | <entry>Y'<subscript>12low</subscript></entry> | ||
46 | <entry>Y'<subscript>12high</subscript></entry> | ||
47 | <entry>Y'<subscript>13low</subscript></entry> | ||
48 | <entry>Y'<subscript>13high</subscript></entry> | ||
49 | </row> | ||
50 | <row> | ||
51 | <entry>start + 16:</entry> | ||
52 | <entry>Y'<subscript>20low</subscript></entry> | ||
53 | <entry>Y'<subscript>20high</subscript></entry> | ||
54 | <entry>Y'<subscript>21low</subscript></entry> | ||
55 | <entry>Y'<subscript>21high</subscript></entry> | ||
56 | <entry>Y'<subscript>22low</subscript></entry> | ||
57 | <entry>Y'<subscript>22high</subscript></entry> | ||
58 | <entry>Y'<subscript>23low</subscript></entry> | ||
59 | <entry>Y'<subscript>23high</subscript></entry> | ||
60 | </row> | ||
61 | <row> | ||
62 | <entry>start + 24:</entry> | ||
63 | <entry>Y'<subscript>30low</subscript></entry> | ||
64 | <entry>Y'<subscript>30high</subscript></entry> | ||
65 | <entry>Y'<subscript>31low</subscript></entry> | ||
66 | <entry>Y'<subscript>31high</subscript></entry> | ||
67 | <entry>Y'<subscript>32low</subscript></entry> | ||
68 | <entry>Y'<subscript>32high</subscript></entry> | ||
69 | <entry>Y'<subscript>33low</subscript></entry> | ||
70 | <entry>Y'<subscript>33high</subscript></entry> | ||
71 | </row> | ||
72 | </tbody> | ||
73 | </tgroup> | ||
74 | </informaltable> | ||
75 | </para> | ||
76 | </formalpara> | ||
77 | </example> | ||
78 | </refsect1> | ||
79 | </refentry> | ||
diff --git a/Documentation/DocBook/v4l/pixfmt.xml b/Documentation/DocBook/v4l/pixfmt.xml index c4ad0a8e42dc..d7c467187095 100644 --- a/Documentation/DocBook/v4l/pixfmt.xml +++ b/Documentation/DocBook/v4l/pixfmt.xml | |||
@@ -566,7 +566,9 @@ access the palette, this must be done with ioctls of the Linux framebuffer API.< | |||
566 | &sub-sbggr8; | 566 | &sub-sbggr8; |
567 | &sub-sgbrg8; | 567 | &sub-sgbrg8; |
568 | &sub-sgrbg8; | 568 | &sub-sgrbg8; |
569 | &sub-srggb8; | ||
569 | &sub-sbggr16; | 570 | &sub-sbggr16; |
571 | &sub-srggb10; | ||
570 | </section> | 572 | </section> |
571 | 573 | ||
572 | <section id="yuv-formats"> | 574 | <section id="yuv-formats"> |
@@ -589,6 +591,7 @@ information.</para> | |||
589 | 591 | ||
590 | &sub-packed-yuv; | 592 | &sub-packed-yuv; |
591 | &sub-grey; | 593 | &sub-grey; |
594 | &sub-y10; | ||
592 | &sub-y16; | 595 | &sub-y16; |
593 | &sub-yuyv; | 596 | &sub-yuyv; |
594 | &sub-uyvy; | 597 | &sub-uyvy; |
@@ -685,6 +688,11 @@ http://www.ivtvdriver.org/</ulink></para><para>The format is documented in the | |||
685 | kernel sources in the file <filename>Documentation/video4linux/cx2341x/README.hm12</filename> | 688 | kernel sources in the file <filename>Documentation/video4linux/cx2341x/README.hm12</filename> |
686 | </para></entry> | 689 | </para></entry> |
687 | </row> | 690 | </row> |
691 | <row id="V4L2-PIX-FMT-CPIA1"> | ||
692 | <entry><constant>V4L2_PIX_FMT_CPIA1</constant></entry> | ||
693 | <entry>'CPIA'</entry> | ||
694 | <entry>YUV format used by the gspca cpia1 driver.</entry> | ||
695 | </row> | ||
688 | <row id="V4L2-PIX-FMT-SPCA501"> | 696 | <row id="V4L2-PIX-FMT-SPCA501"> |
689 | <entry><constant>V4L2_PIX_FMT_SPCA501</constant></entry> | 697 | <entry><constant>V4L2_PIX_FMT_SPCA501</constant></entry> |
690 | <entry>'S501'</entry> | 698 | <entry>'S501'</entry> |
@@ -705,11 +713,6 @@ kernel sources in the file <filename>Documentation/video4linux/cx2341x/README.hm | |||
705 | <entry>'S561'</entry> | 713 | <entry>'S561'</entry> |
706 | <entry>Compressed GBRG Bayer format used by the gspca driver.</entry> | 714 | <entry>Compressed GBRG Bayer format used by the gspca driver.</entry> |
707 | </row> | 715 | </row> |
708 | <row id="V4L2-PIX-FMT-SGRBG10"> | ||
709 | <entry><constant>V4L2_PIX_FMT_SGRBG10</constant></entry> | ||
710 | <entry>'DA10'</entry> | ||
711 | <entry>10 bit raw Bayer, expanded to 16 bits.</entry> | ||
712 | </row> | ||
713 | <row id="V4L2-PIX-FMT-SGRBG10DPCM8"> | 716 | <row id="V4L2-PIX-FMT-SGRBG10DPCM8"> |
714 | <entry><constant>V4L2_PIX_FMT_SGRBG10DPCM8</constant></entry> | 717 | <entry><constant>V4L2_PIX_FMT_SGRBG10DPCM8</constant></entry> |
715 | <entry>'DB10'</entry> | 718 | <entry>'DB10'</entry> |
@@ -770,6 +773,11 @@ kernel sources in the file <filename>Documentation/video4linux/cx2341x/README.hm | |||
770 | <entry>'S920'</entry> | 773 | <entry>'S920'</entry> |
771 | <entry>YUV 4:2:0 format of the gspca sn9c20x driver.</entry> | 774 | <entry>YUV 4:2:0 format of the gspca sn9c20x driver.</entry> |
772 | </row> | 775 | </row> |
776 | <row id="V4L2-PIX-FMT-SN9C2028"> | ||
777 | <entry><constant>V4L2_PIX_FMT_SN9C2028</constant></entry> | ||
778 | <entry>'SONX'</entry> | ||
779 | <entry>Compressed GBRG bayer format of the gspca sn9c2028 driver.</entry> | ||
780 | </row> | ||
773 | <row id="V4L2-PIX-FMT-STV0680"> | 781 | <row id="V4L2-PIX-FMT-STV0680"> |
774 | <entry><constant>V4L2_PIX_FMT_STV0680</constant></entry> | 782 | <entry><constant>V4L2_PIX_FMT_STV0680</constant></entry> |
775 | <entry>'S680'</entry> | 783 | <entry>'S680'</entry> |
@@ -787,6 +795,20 @@ http://www.thedirks.org/winnov/</ulink></para></entry> | |||
787 | <entry>'TM60'</entry> | 795 | <entry>'TM60'</entry> |
788 | <entry><para>Used by Trident tm6000</para></entry> | 796 | <entry><para>Used by Trident tm6000</para></entry> |
789 | </row> | 797 | </row> |
798 | <row id="V4L2-PIX-FMT-CIT-YYVYUY"> | ||
799 | <entry><constant>V4L2_PIX_FMT_CIT_YYVYUY</constant></entry> | ||
800 | <entry>'CITV'</entry> | ||
801 | <entry><para>Used by xirlink CIT, found at IBM webcams.</para> | ||
802 | <para>Uses one line of Y then 1 line of VYUY</para> | ||
803 | </entry> | ||
804 | </row> | ||
805 | <row id="V4L2-PIX-FMT-KONICA420"> | ||
806 | <entry><constant>V4L2_PIX_FMT_KONICA420</constant></entry> | ||
807 | <entry>'KONI'</entry> | ||
808 | <entry><para>Used by Konica webcams.</para> | ||
809 | <para>YUV420 planar in blocks of 256 pixels.</para> | ||
810 | </entry> | ||
811 | </row> | ||
790 | <row id="V4L2-PIX-FMT-YYUV"> | 812 | <row id="V4L2-PIX-FMT-YYUV"> |
791 | <entry><constant>V4L2_PIX_FMT_YYUV</constant></entry> | 813 | <entry><constant>V4L2_PIX_FMT_YYUV</constant></entry> |
792 | <entry>'YYUV'</entry> | 814 | <entry>'YYUV'</entry> |
diff --git a/Documentation/DocBook/v4l/v4l2.xml b/Documentation/DocBook/v4l/v4l2.xml index 7c3c098d5d08..839e93e875ae 100644 --- a/Documentation/DocBook/v4l/v4l2.xml +++ b/Documentation/DocBook/v4l/v4l2.xml | |||
@@ -99,6 +99,7 @@ Remote Controller chapter.</contrib> | |||
99 | <year>2007</year> | 99 | <year>2007</year> |
100 | <year>2008</year> | 100 | <year>2008</year> |
101 | <year>2009</year> | 101 | <year>2009</year> |
102 | <year>2010</year> | ||
102 | <holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin | 103 | <holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin |
103 | Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab</holder> | 104 | Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab</holder> |
104 | </copyright> | 105 | </copyright> |
@@ -110,10 +111,17 @@ Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab</holder> | |||
110 | <!-- Put document revisions here, newest first. --> | 111 | <!-- Put document revisions here, newest first. --> |
111 | <!-- API revisions (changes and additions of defines, enums, | 112 | <!-- API revisions (changes and additions of defines, enums, |
112 | structs, ioctls) must be noted in more detail in the history chapter | 113 | structs, ioctls) must be noted in more detail in the history chapter |
113 | (compat.sgml), along with the possible impact on existing drivers and | 114 | (compat.xml), along with the possible impact on existing drivers and |
114 | applications. --> | 115 | applications. --> |
115 | 116 | ||
116 | <revision> | 117 | <revision> |
118 | <revnumber>2.6.37</revnumber> | ||
119 | <date>2010-08-06</date> | ||
120 | <authorinitials>hv</authorinitials> | ||
121 | <revremark>Removed obsolete vtx (videotext) API.</revremark> | ||
122 | </revision> | ||
123 | |||
124 | <revision> | ||
117 | <revnumber>2.6.33</revnumber> | 125 | <revnumber>2.6.33</revnumber> |
118 | <date>2009-12-03</date> | 126 | <date>2009-12-03</date> |
119 | <authorinitials>mk</authorinitials> | 127 | <authorinitials>mk</authorinitials> |
diff --git a/Documentation/DocBook/v4l/videodev2.h.xml b/Documentation/DocBook/v4l/videodev2.h.xml index 865b06d9e679..325b23b6964c 100644 --- a/Documentation/DocBook/v4l/videodev2.h.xml +++ b/Documentation/DocBook/v4l/videodev2.h.xml | |||
@@ -154,23 +154,13 @@ enum <link linkend="v4l2-buf-type">v4l2_buf_type</link> { | |||
154 | V4L2_BUF_TYPE_VBI_OUTPUT = 5, | 154 | V4L2_BUF_TYPE_VBI_OUTPUT = 5, |
155 | V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6, | 155 | V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6, |
156 | V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7, | 156 | V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7, |
157 | #if 1 /*KEEP*/ | 157 | #if 1 |
158 | /* Experimental */ | 158 | /* Experimental */ |
159 | V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8, | 159 | V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8, |
160 | #endif | 160 | #endif |
161 | V4L2_BUF_TYPE_PRIVATE = 0x80, | 161 | V4L2_BUF_TYPE_PRIVATE = 0x80, |
162 | }; | 162 | }; |
163 | 163 | ||
164 | enum <link linkend="v4l2-ctrl-type">v4l2_ctrl_type</link> { | ||
165 | V4L2_CTRL_TYPE_INTEGER = 1, | ||
166 | V4L2_CTRL_TYPE_BOOLEAN = 2, | ||
167 | V4L2_CTRL_TYPE_MENU = 3, | ||
168 | V4L2_CTRL_TYPE_BUTTON = 4, | ||
169 | V4L2_CTRL_TYPE_INTEGER64 = 5, | ||
170 | V4L2_CTRL_TYPE_CTRL_CLASS = 6, | ||
171 | V4L2_CTRL_TYPE_STRING = 7, | ||
172 | }; | ||
173 | |||
174 | enum <link linkend="v4l2-tuner-type">v4l2_tuner_type</link> { | 164 | enum <link linkend="v4l2-tuner-type">v4l2_tuner_type</link> { |
175 | V4L2_TUNER_RADIO = 1, | 165 | V4L2_TUNER_RADIO = 1, |
176 | V4L2_TUNER_ANALOG_TV = 2, | 166 | V4L2_TUNER_ANALOG_TV = 2, |
@@ -288,6 +278,7 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> { | |||
288 | #define <link linkend="V4L2-PIX-FMT-RGB565">V4L2_PIX_FMT_RGB565</link> v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */ | 278 | #define <link linkend="V4L2-PIX-FMT-RGB565">V4L2_PIX_FMT_RGB565</link> v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */ |
289 | #define <link linkend="V4L2-PIX-FMT-RGB555X">V4L2_PIX_FMT_RGB555X</link> v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ | 279 | #define <link linkend="V4L2-PIX-FMT-RGB555X">V4L2_PIX_FMT_RGB555X</link> v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ |
290 | #define <link linkend="V4L2-PIX-FMT-RGB565X">V4L2_PIX_FMT_RGB565X</link> v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ | 280 | #define <link linkend="V4L2-PIX-FMT-RGB565X">V4L2_PIX_FMT_RGB565X</link> v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ |
281 | #define <link linkend="V4L2-PIX-FMT-BGR666">V4L2_PIX_FMT_BGR666</link> v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */ | ||
291 | #define <link linkend="V4L2-PIX-FMT-BGR24">V4L2_PIX_FMT_BGR24</link> v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */ | 282 | #define <link linkend="V4L2-PIX-FMT-BGR24">V4L2_PIX_FMT_BGR24</link> v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */ |
292 | #define <link linkend="V4L2-PIX-FMT-RGB24">V4L2_PIX_FMT_RGB24</link> v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */ | 283 | #define <link linkend="V4L2-PIX-FMT-RGB24">V4L2_PIX_FMT_RGB24</link> v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */ |
293 | #define <link linkend="V4L2-PIX-FMT-BGR32">V4L2_PIX_FMT_BGR32</link> v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */ | 284 | #define <link linkend="V4L2-PIX-FMT-BGR32">V4L2_PIX_FMT_BGR32</link> v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */ |
@@ -295,6 +286,9 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> { | |||
295 | 286 | ||
296 | /* Grey formats */ | 287 | /* Grey formats */ |
297 | #define <link linkend="V4L2-PIX-FMT-GREY">V4L2_PIX_FMT_GREY</link> v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */ | 288 | #define <link linkend="V4L2-PIX-FMT-GREY">V4L2_PIX_FMT_GREY</link> v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */ |
289 | #define <link linkend="V4L2-PIX-FMT-Y4">V4L2_PIX_FMT_Y4</link> v4l2_fourcc('Y', '0', '4', ' ') /* 4 Greyscale */ | ||
290 | #define <link linkend="V4L2-PIX-FMT-Y6">V4L2_PIX_FMT_Y6</link> v4l2_fourcc('Y', '0', '6', ' ') /* 6 Greyscale */ | ||
291 | #define <link linkend="V4L2-PIX-FMT-Y10">V4L2_PIX_FMT_Y10</link> v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */ | ||
298 | #define <link linkend="V4L2-PIX-FMT-Y16">V4L2_PIX_FMT_Y16</link> v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ | 292 | #define <link linkend="V4L2-PIX-FMT-Y16">V4L2_PIX_FMT_Y16</link> v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ |
299 | 293 | ||
300 | /* Palette formats */ | 294 | /* Palette formats */ |
@@ -330,7 +324,11 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> { | |||
330 | #define <link linkend="V4L2-PIX-FMT-SBGGR8">V4L2_PIX_FMT_SBGGR8</link> v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ | 324 | #define <link linkend="V4L2-PIX-FMT-SBGGR8">V4L2_PIX_FMT_SBGGR8</link> v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ |
331 | #define <link linkend="V4L2-PIX-FMT-SGBRG8">V4L2_PIX_FMT_SGBRG8</link> v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ | 325 | #define <link linkend="V4L2-PIX-FMT-SGBRG8">V4L2_PIX_FMT_SGBRG8</link> v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ |
332 | #define <link linkend="V4L2-PIX-FMT-SGRBG8">V4L2_PIX_FMT_SGRBG8</link> v4l2_fourcc('G', 'R', 'B', 'G') /* 8 GRGR.. BGBG.. */ | 326 | #define <link linkend="V4L2-PIX-FMT-SGRBG8">V4L2_PIX_FMT_SGRBG8</link> v4l2_fourcc('G', 'R', 'B', 'G') /* 8 GRGR.. BGBG.. */ |
333 | #define <link linkend="V4L2-PIX-FMT-SGRBG10">V4L2_PIX_FMT_SGRBG10</link> v4l2_fourcc('B', 'A', '1', '0') /* 10bit raw bayer */ | 327 | #define <link linkend="V4L2-PIX-FMT-SRGGB8">V4L2_PIX_FMT_SRGGB8</link> v4l2_fourcc('R', 'G', 'G', 'B') /* 8 RGRG.. GBGB.. */ |
328 | #define <link linkend="V4L2-PIX-FMT-SBGGR10">V4L2_PIX_FMT_SBGGR10</link> v4l2_fourcc('B', 'G', '1', '0') /* 10 BGBG.. GRGR.. */ | ||
329 | #define <link linkend="V4L2-PIX-FMT-SGBRG10">V4L2_PIX_FMT_SGBRG10</link> v4l2_fourcc('G', 'B', '1', '0') /* 10 GBGB.. RGRG.. */ | ||
330 | #define <link linkend="V4L2-PIX-FMT-SGRBG10">V4L2_PIX_FMT_SGRBG10</link> v4l2_fourcc('B', 'A', '1', '0') /* 10 GRGR.. BGBG.. */ | ||
331 | #define <link linkend="V4L2-PIX-FMT-SRGGB10">V4L2_PIX_FMT_SRGGB10</link> v4l2_fourcc('R', 'G', '1', '0') /* 10 RGRG.. GBGB.. */ | ||
334 | /* 10bit raw bayer DPCM compressed to 8 bits */ | 332 | /* 10bit raw bayer DPCM compressed to 8 bits */ |
335 | #define <link linkend="V4L2-PIX-FMT-SGRBG10DPCM8">V4L2_PIX_FMT_SGRBG10DPCM8</link> v4l2_fourcc('B', 'D', '1', '0') | 333 | #define <link linkend="V4L2-PIX-FMT-SGRBG10DPCM8">V4L2_PIX_FMT_SGRBG10DPCM8</link> v4l2_fourcc('B', 'D', '1', '0') |
336 | /* | 334 | /* |
@@ -346,6 +344,7 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> { | |||
346 | #define <link linkend="V4L2-PIX-FMT-MPEG">V4L2_PIX_FMT_MPEG</link> v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 */ | 344 | #define <link linkend="V4L2-PIX-FMT-MPEG">V4L2_PIX_FMT_MPEG</link> v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 */ |
347 | 345 | ||
348 | /* Vendor-specific formats */ | 346 | /* Vendor-specific formats */ |
347 | #define <link linkend="V4L2-PIX-FMT-CPIA1">V4L2_PIX_FMT_CPIA1</link> v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */ | ||
349 | #define <link linkend="V4L2-PIX-FMT-WNVA">V4L2_PIX_FMT_WNVA</link> v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */ | 348 | #define <link linkend="V4L2-PIX-FMT-WNVA">V4L2_PIX_FMT_WNVA</link> v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */ |
350 | #define <link linkend="V4L2-PIX-FMT-SN9C10X">V4L2_PIX_FMT_SN9C10X</link> v4l2_fourcc('S', '9', '1', '0') /* SN9C10x compression */ | 349 | #define <link linkend="V4L2-PIX-FMT-SN9C10X">V4L2_PIX_FMT_SN9C10X</link> v4l2_fourcc('S', '9', '1', '0') /* SN9C10x compression */ |
351 | #define <link linkend="V4L2-PIX-FMT-SN9C20X-I420">V4L2_PIX_FMT_SN9C20X_I420</link> v4l2_fourcc('S', '9', '2', '0') /* SN9C20x YUV 4:2:0 */ | 350 | #define <link linkend="V4L2-PIX-FMT-SN9C20X-I420">V4L2_PIX_FMT_SN9C20X_I420</link> v4l2_fourcc('S', '9', '2', '0') /* SN9C20x YUV 4:2:0 */ |
@@ -358,12 +357,15 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> { | |||
358 | #define <link linkend="V4L2-PIX-FMT-SPCA561">V4L2_PIX_FMT_SPCA561</link> v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */ | 357 | #define <link linkend="V4L2-PIX-FMT-SPCA561">V4L2_PIX_FMT_SPCA561</link> v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */ |
359 | #define <link linkend="V4L2-PIX-FMT-PAC207">V4L2_PIX_FMT_PAC207</link> v4l2_fourcc('P', '2', '0', '7') /* compressed BGGR bayer */ | 358 | #define <link linkend="V4L2-PIX-FMT-PAC207">V4L2_PIX_FMT_PAC207</link> v4l2_fourcc('P', '2', '0', '7') /* compressed BGGR bayer */ |
360 | #define <link linkend="V4L2-PIX-FMT-MR97310A">V4L2_PIX_FMT_MR97310A</link> v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */ | 359 | #define <link linkend="V4L2-PIX-FMT-MR97310A">V4L2_PIX_FMT_MR97310A</link> v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */ |
360 | #define <link linkend="V4L2-PIX-FMT-SN9C2028">V4L2_PIX_FMT_SN9C2028</link> v4l2_fourcc('S', 'O', 'N', 'X') /* compressed GBRG bayer */ | ||
361 | #define <link linkend="V4L2-PIX-FMT-SQ905C">V4L2_PIX_FMT_SQ905C</link> v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */ | 361 | #define <link linkend="V4L2-PIX-FMT-SQ905C">V4L2_PIX_FMT_SQ905C</link> v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */ |
362 | #define <link linkend="V4L2-PIX-FMT-PJPG">V4L2_PIX_FMT_PJPG</link> v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ | 362 | #define <link linkend="V4L2-PIX-FMT-PJPG">V4L2_PIX_FMT_PJPG</link> v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ |
363 | #define <link linkend="V4L2-PIX-FMT-OV511">V4L2_PIX_FMT_OV511</link> v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */ | 363 | #define <link linkend="V4L2-PIX-FMT-OV511">V4L2_PIX_FMT_OV511</link> v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */ |
364 | #define <link linkend="V4L2-PIX-FMT-OV518">V4L2_PIX_FMT_OV518</link> v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ | 364 | #define <link linkend="V4L2-PIX-FMT-OV518">V4L2_PIX_FMT_OV518</link> v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ |
365 | #define <link linkend="V4L2-PIX-FMT-TM6000">V4L2_PIX_FMT_TM6000</link> v4l2_fourcc('T', 'M', '6', '0') /* tm5600/tm60x0 */ | ||
366 | #define <link linkend="V4L2-PIX-FMT-STV0680">V4L2_PIX_FMT_STV0680</link> v4l2_fourcc('S', '6', '8', '0') /* stv0680 bayer */ | 365 | #define <link linkend="V4L2-PIX-FMT-STV0680">V4L2_PIX_FMT_STV0680</link> v4l2_fourcc('S', '6', '8', '0') /* stv0680 bayer */ |
366 | #define <link linkend="V4L2-PIX-FMT-TM6000">V4L2_PIX_FMT_TM6000</link> v4l2_fourcc('T', 'M', '6', '0') /* tm5600/tm60x0 */ | ||
367 | #define <link linkend="V4L2-PIX-FMT-CIT-YYVYUY">V4L2_PIX_FMT_CIT_YYVYUY</link> v4l2_fourcc('C', 'I', 'T', 'V') /* one line of Y then 1 line of VYUY */ | ||
368 | #define <link linkend="V4L2-PIX-FMT-KONICA420">V4L2_PIX_FMT_KONICA420</link> v4l2_fourcc('K', 'O', 'N', 'I') /* YUV420 planar in blocks of 256 pixels */ | ||
367 | 369 | ||
368 | /* | 370 | /* |
369 | * F O R M A T E N U M E R A T I O N | 371 | * F O R M A T E N U M E R A T I O N |
@@ -380,7 +382,7 @@ struct <link linkend="v4l2-fmtdesc">v4l2_fmtdesc</link> { | |||
380 | #define V4L2_FMT_FLAG_COMPRESSED 0x0001 | 382 | #define V4L2_FMT_FLAG_COMPRESSED 0x0001 |
381 | #define V4L2_FMT_FLAG_EMULATED 0x0002 | 383 | #define V4L2_FMT_FLAG_EMULATED 0x0002 |
382 | 384 | ||
383 | #if 1 /*KEEP*/ | 385 | #if 1 |
384 | /* Experimental Frame Size and frame rate enumeration */ | 386 | /* Experimental Frame Size and frame rate enumeration */ |
385 | /* | 387 | /* |
386 | * F R A M E S I Z E E N U M E R A T I O N | 388 | * F R A M E S I Z E E N U M E R A T I O N |
@@ -544,6 +546,8 @@ struct <link linkend="v4l2-buffer">v4l2_buffer</link> { | |||
544 | #define V4L2_BUF_FLAG_KEYFRAME 0x0008 /* Image is a keyframe (I-frame) */ | 546 | #define V4L2_BUF_FLAG_KEYFRAME 0x0008 /* Image is a keyframe (I-frame) */ |
545 | #define V4L2_BUF_FLAG_PFRAME 0x0010 /* Image is a P-frame */ | 547 | #define V4L2_BUF_FLAG_PFRAME 0x0010 /* Image is a P-frame */ |
546 | #define V4L2_BUF_FLAG_BFRAME 0x0020 /* Image is a B-frame */ | 548 | #define V4L2_BUF_FLAG_BFRAME 0x0020 /* Image is a B-frame */ |
549 | /* Buffer is ready, but the data contained within is corrupted. */ | ||
550 | #define V4L2_BUF_FLAG_ERROR 0x0040 | ||
547 | #define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */ | 551 | #define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */ |
548 | #define V4L2_BUF_FLAG_INPUT 0x0200 /* input field is valid */ | 552 | #define V4L2_BUF_FLAG_INPUT 0x0200 /* input field is valid */ |
549 | 553 | ||
@@ -934,6 +938,16 @@ struct <link linkend="v4l2-ext-controls">v4l2_ext_controls</link> { | |||
934 | #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) | 938 | #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) |
935 | #define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000) | 939 | #define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000) |
936 | 940 | ||
941 | enum <link linkend="v4l2-ctrl-type">v4l2_ctrl_type</link> { | ||
942 | V4L2_CTRL_TYPE_INTEGER = 1, | ||
943 | V4L2_CTRL_TYPE_BOOLEAN = 2, | ||
944 | V4L2_CTRL_TYPE_MENU = 3, | ||
945 | V4L2_CTRL_TYPE_BUTTON = 4, | ||
946 | V4L2_CTRL_TYPE_INTEGER64 = 5, | ||
947 | V4L2_CTRL_TYPE_CTRL_CLASS = 6, | ||
948 | V4L2_CTRL_TYPE_STRING = 7, | ||
949 | }; | ||
950 | |||
937 | /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ | 951 | /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ |
938 | struct <link linkend="v4l2-queryctrl">v4l2_queryctrl</link> { | 952 | struct <link linkend="v4l2-queryctrl">v4l2_queryctrl</link> { |
939 | __u32 id; | 953 | __u32 id; |
@@ -1018,21 +1032,27 @@ enum <link linkend="v4l2-colorfx">v4l2_colorfx</link> { | |||
1018 | V4L2_COLORFX_NONE = 0, | 1032 | V4L2_COLORFX_NONE = 0, |
1019 | V4L2_COLORFX_BW = 1, | 1033 | V4L2_COLORFX_BW = 1, |
1020 | V4L2_COLORFX_SEPIA = 2, | 1034 | V4L2_COLORFX_SEPIA = 2, |
1021 | V4L2_COLORFX_NEGATIVE = 3, | 1035 | V4L2_COLORFX_NEGATIVE = 3, |
1022 | V4L2_COLORFX_EMBOSS = 4, | 1036 | V4L2_COLORFX_EMBOSS = 4, |
1023 | V4L2_COLORFX_SKETCH = 5, | 1037 | V4L2_COLORFX_SKETCH = 5, |
1024 | V4L2_COLORFX_SKY_BLUE = 6, | 1038 | V4L2_COLORFX_SKY_BLUE = 6, |
1025 | V4L2_COLORFX_GRASS_GREEN = 7, | 1039 | V4L2_COLORFX_GRASS_GREEN = 7, |
1026 | V4L2_COLORFX_SKIN_WHITEN = 8, | 1040 | V4L2_COLORFX_SKIN_WHITEN = 8, |
1027 | V4L2_COLORFX_VIVID = 9. | 1041 | V4L2_COLORFX_VIVID = 9, |
1028 | }; | 1042 | }; |
1029 | #define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) | 1043 | #define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) |
1030 | #define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) | 1044 | #define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) |
1031 | 1045 | ||
1032 | #define V4L2_CID_ROTATE (V4L2_CID_BASE+34) | 1046 | #define V4L2_CID_ROTATE (V4L2_CID_BASE+34) |
1033 | #define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35) | 1047 | #define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35) |
1048 | |||
1049 | #define V4L2_CID_CHROMA_GAIN (V4L2_CID_BASE+36) | ||
1050 | |||
1051 | #define V4L2_CID_ILLUMINATORS_1 (V4L2_CID_BASE+37) | ||
1052 | #define V4L2_CID_ILLUMINATORS_2 (V4L2_CID_BASE+38) | ||
1053 | |||
1034 | /* last CID + 1 */ | 1054 | /* last CID + 1 */ |
1035 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+36) | 1055 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+39) |
1036 | 1056 | ||
1037 | /* MPEG-class control IDs defined by V4L2 */ | 1057 | /* MPEG-class control IDs defined by V4L2 */ |
1038 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) | 1058 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) |
@@ -1349,6 +1369,8 @@ struct <link linkend="v4l2-modulator">v4l2_modulator</link> { | |||
1349 | #define V4L2_TUNER_CAP_SAP 0x0020 | 1369 | #define V4L2_TUNER_CAP_SAP 0x0020 |
1350 | #define V4L2_TUNER_CAP_LANG1 0x0040 | 1370 | #define V4L2_TUNER_CAP_LANG1 0x0040 |
1351 | #define V4L2_TUNER_CAP_RDS 0x0080 | 1371 | #define V4L2_TUNER_CAP_RDS 0x0080 |
1372 | #define V4L2_TUNER_CAP_RDS_BLOCK_IO 0x0100 | ||
1373 | #define V4L2_TUNER_CAP_RDS_CONTROLS 0x0200 | ||
1352 | 1374 | ||
1353 | /* Flags for the 'rxsubchans' field */ | 1375 | /* Flags for the 'rxsubchans' field */ |
1354 | #define V4L2_TUNER_SUB_MONO 0x0001 | 1376 | #define V4L2_TUNER_SUB_MONO 0x0001 |
@@ -1378,7 +1400,8 @@ struct <link linkend="v4l2-hw-freq-seek">v4l2_hw_freq_seek</link> { | |||
1378 | enum <link linkend="v4l2-tuner-type">v4l2_tuner_type</link> type; | 1400 | enum <link linkend="v4l2-tuner-type">v4l2_tuner_type</link> type; |
1379 | __u32 seek_upward; | 1401 | __u32 seek_upward; |
1380 | __u32 wrap_around; | 1402 | __u32 wrap_around; |
1381 | __u32 reserved[8]; | 1403 | __u32 spacing; |
1404 | __u32 reserved[7]; | ||
1382 | }; | 1405 | }; |
1383 | 1406 | ||
1384 | /* | 1407 | /* |
@@ -1433,7 +1456,7 @@ struct <link linkend="v4l2-audioout">v4l2_audioout</link> { | |||
1433 | * | 1456 | * |
1434 | * NOTE: EXPERIMENTAL API | 1457 | * NOTE: EXPERIMENTAL API |
1435 | */ | 1458 | */ |
1436 | #if 1 /*KEEP*/ | 1459 | #if 1 |
1437 | #define V4L2_ENC_IDX_FRAME_I (0) | 1460 | #define V4L2_ENC_IDX_FRAME_I (0) |
1438 | #define V4L2_ENC_IDX_FRAME_P (1) | 1461 | #define V4L2_ENC_IDX_FRAME_P (1) |
1439 | #define V4L2_ENC_IDX_FRAME_B (2) | 1462 | #define V4L2_ENC_IDX_FRAME_B (2) |
@@ -1626,6 +1649,38 @@ struct <link linkend="v4l2-streamparm">v4l2_streamparm</link> { | |||
1626 | }; | 1649 | }; |
1627 | 1650 | ||
1628 | /* | 1651 | /* |
1652 | * E V E N T S | ||
1653 | */ | ||
1654 | |||
1655 | #define V4L2_EVENT_ALL 0 | ||
1656 | #define V4L2_EVENT_VSYNC 1 | ||
1657 | #define V4L2_EVENT_EOS 2 | ||
1658 | #define V4L2_EVENT_PRIVATE_START 0x08000000 | ||
1659 | |||
1660 | /* Payload for V4L2_EVENT_VSYNC */ | ||
1661 | struct <link linkend="v4l2-event-vsync">v4l2_event_vsync</link> { | ||
1662 | /* Can be V4L2_FIELD_ANY, _NONE, _TOP or _BOTTOM */ | ||
1663 | __u8 field; | ||
1664 | } __attribute__ ((packed)); | ||
1665 | |||
1666 | struct <link linkend="v4l2-event">v4l2_event</link> { | ||
1667 | __u32 type; | ||
1668 | union { | ||
1669 | struct <link linkend="v4l2-event-vsync">v4l2_event_vsync</link> vsync; | ||
1670 | __u8 data[64]; | ||
1671 | } u; | ||
1672 | __u32 pending; | ||
1673 | __u32 sequence; | ||
1674 | struct timespec timestamp; | ||
1675 | __u32 reserved[9]; | ||
1676 | }; | ||
1677 | |||
1678 | struct <link linkend="v4l2-event-subscription">v4l2_event_subscription</link> { | ||
1679 | __u32 type; | ||
1680 | __u32 reserved[7]; | ||
1681 | }; | ||
1682 | |||
1683 | /* | ||
1629 | * A D V A N C E D D E B U G G I N G | 1684 | * A D V A N C E D D E B U G G I N G |
1630 | * | 1685 | * |
1631 | * NOTE: EXPERIMENTAL API, NEVER RELY ON THIS IN APPLICATIONS! | 1686 | * NOTE: EXPERIMENTAL API, NEVER RELY ON THIS IN APPLICATIONS! |
@@ -1720,7 +1775,7 @@ struct <link linkend="v4l2-dbg-chip-ident">v4l2_dbg_chip_ident</link> { | |||
1720 | #define VIDIOC_G_EXT_CTRLS _IOWR('V', 71, struct <link linkend="v4l2-ext-controls">v4l2_ext_controls</link>) | 1775 | #define VIDIOC_G_EXT_CTRLS _IOWR('V', 71, struct <link linkend="v4l2-ext-controls">v4l2_ext_controls</link>) |
1721 | #define VIDIOC_S_EXT_CTRLS _IOWR('V', 72, struct <link linkend="v4l2-ext-controls">v4l2_ext_controls</link>) | 1776 | #define VIDIOC_S_EXT_CTRLS _IOWR('V', 72, struct <link linkend="v4l2-ext-controls">v4l2_ext_controls</link>) |
1722 | #define VIDIOC_TRY_EXT_CTRLS _IOWR('V', 73, struct <link linkend="v4l2-ext-controls">v4l2_ext_controls</link>) | 1777 | #define VIDIOC_TRY_EXT_CTRLS _IOWR('V', 73, struct <link linkend="v4l2-ext-controls">v4l2_ext_controls</link>) |
1723 | #if 1 /*KEEP*/ | 1778 | #if 1 |
1724 | #define VIDIOC_ENUM_FRAMESIZES _IOWR('V', 74, struct <link linkend="v4l2-frmsizeenum">v4l2_frmsizeenum</link>) | 1779 | #define VIDIOC_ENUM_FRAMESIZES _IOWR('V', 74, struct <link linkend="v4l2-frmsizeenum">v4l2_frmsizeenum</link>) |
1725 | #define VIDIOC_ENUM_FRAMEINTERVALS _IOWR('V', 75, struct <link linkend="v4l2-frmivalenum">v4l2_frmivalenum</link>) | 1780 | #define VIDIOC_ENUM_FRAMEINTERVALS _IOWR('V', 75, struct <link linkend="v4l2-frmivalenum">v4l2_frmivalenum</link>) |
1726 | #define VIDIOC_G_ENC_INDEX _IOR('V', 76, struct <link linkend="v4l2-enc-idx">v4l2_enc_idx</link>) | 1781 | #define VIDIOC_G_ENC_INDEX _IOR('V', 76, struct <link linkend="v4l2-enc-idx">v4l2_enc_idx</link>) |
@@ -1728,7 +1783,7 @@ struct <link linkend="v4l2-dbg-chip-ident">v4l2_dbg_chip_ident</link> { | |||
1728 | #define VIDIOC_TRY_ENCODER_CMD _IOWR('V', 78, struct <link linkend="v4l2-encoder-cmd">v4l2_encoder_cmd</link>) | 1783 | #define VIDIOC_TRY_ENCODER_CMD _IOWR('V', 78, struct <link linkend="v4l2-encoder-cmd">v4l2_encoder_cmd</link>) |
1729 | #endif | 1784 | #endif |
1730 | 1785 | ||
1731 | #if 1 /*KEEP*/ | 1786 | #if 1 |
1732 | /* Experimental, meant for debugging, testing and internal use. | 1787 | /* Experimental, meant for debugging, testing and internal use. |
1733 | Only implemented if CONFIG_VIDEO_ADV_DEBUG is defined. | 1788 | Only implemented if CONFIG_VIDEO_ADV_DEBUG is defined. |
1734 | You must be root to use these ioctls. Never use these in applications! */ | 1789 | You must be root to use these ioctls. Never use these in applications! */ |
@@ -1747,6 +1802,9 @@ struct <link linkend="v4l2-dbg-chip-ident">v4l2_dbg_chip_ident</link> { | |||
1747 | #define VIDIOC_QUERY_DV_PRESET _IOR('V', 86, struct <link linkend="v4l2-dv-preset">v4l2_dv_preset</link>) | 1802 | #define VIDIOC_QUERY_DV_PRESET _IOR('V', 86, struct <link linkend="v4l2-dv-preset">v4l2_dv_preset</link>) |
1748 | #define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct <link linkend="v4l2-dv-timings">v4l2_dv_timings</link>) | 1803 | #define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct <link linkend="v4l2-dv-timings">v4l2_dv_timings</link>) |
1749 | #define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct <link linkend="v4l2-dv-timings">v4l2_dv_timings</link>) | 1804 | #define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct <link linkend="v4l2-dv-timings">v4l2_dv_timings</link>) |
1805 | #define VIDIOC_DQEVENT _IOR('V', 89, struct <link linkend="v4l2-event">v4l2_event</link>) | ||
1806 | #define VIDIOC_SUBSCRIBE_EVENT _IOW('V', 90, struct <link linkend="v4l2-event-subscription">v4l2_event_subscription</link>) | ||
1807 | #define VIDIOC_UNSUBSCRIBE_EVENT _IOW('V', 91, struct <link linkend="v4l2-event-subscription">v4l2_event_subscription</link>) | ||
1750 | 1808 | ||
1751 | /* Reminder: when adding new ioctls please add support for them to | 1809 | /* Reminder: when adding new ioctls please add support for them to |
1752 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ | 1810 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ |
diff --git a/Documentation/DocBook/v4l/vidioc-g-dv-preset.xml b/Documentation/DocBook/v4l/vidioc-g-dv-preset.xml index 3c6784e132f3..d733721a7519 100644 --- a/Documentation/DocBook/v4l/vidioc-g-dv-preset.xml +++ b/Documentation/DocBook/v4l/vidioc-g-dv-preset.xml | |||
@@ -16,8 +16,7 @@ | |||
16 | <funcdef>int <function>ioctl</function></funcdef> | 16 | <funcdef>int <function>ioctl</function></funcdef> |
17 | <paramdef>int <parameter>fd</parameter></paramdef> | 17 | <paramdef>int <parameter>fd</parameter></paramdef> |
18 | <paramdef>int <parameter>request</parameter></paramdef> | 18 | <paramdef>int <parameter>request</parameter></paramdef> |
19 | <paramdef>&v4l2-dv-preset; | 19 | <paramdef>struct v4l2_dv_preset *<parameter>argp</parameter></paramdef> |
20 | *<parameter>argp</parameter></paramdef> | ||
21 | </funcprototype> | 20 | </funcprototype> |
22 | </funcsynopsis> | 21 | </funcsynopsis> |
23 | </refsynopsisdiv> | 22 | </refsynopsisdiv> |
diff --git a/Documentation/DocBook/v4l/vidioc-g-dv-timings.xml b/Documentation/DocBook/v4l/vidioc-g-dv-timings.xml index ecc19576bb8f..d5ec6abf0ce2 100644 --- a/Documentation/DocBook/v4l/vidioc-g-dv-timings.xml +++ b/Documentation/DocBook/v4l/vidioc-g-dv-timings.xml | |||
@@ -16,8 +16,7 @@ | |||
16 | <funcdef>int <function>ioctl</function></funcdef> | 16 | <funcdef>int <function>ioctl</function></funcdef> |
17 | <paramdef>int <parameter>fd</parameter></paramdef> | 17 | <paramdef>int <parameter>fd</parameter></paramdef> |
18 | <paramdef>int <parameter>request</parameter></paramdef> | 18 | <paramdef>int <parameter>request</parameter></paramdef> |
19 | <paramdef>&v4l2-dv-timings; | 19 | <paramdef>struct v4l2_dv_timings *<parameter>argp</parameter></paramdef> |
20 | *<parameter>argp</parameter></paramdef> | ||
21 | </funcprototype> | 20 | </funcprototype> |
22 | </funcsynopsis> | 21 | </funcsynopsis> |
23 | </refsynopsisdiv> | 22 | </refsynopsisdiv> |
diff --git a/Documentation/DocBook/v4l/vidioc-query-dv-preset.xml b/Documentation/DocBook/v4l/vidioc-query-dv-preset.xml index 402229ee06f6..d272f7ab91b8 100644 --- a/Documentation/DocBook/v4l/vidioc-query-dv-preset.xml +++ b/Documentation/DocBook/v4l/vidioc-query-dv-preset.xml | |||
@@ -16,7 +16,7 @@ input</refpurpose> | |||
16 | <funcdef>int <function>ioctl</function></funcdef> | 16 | <funcdef>int <function>ioctl</function></funcdef> |
17 | <paramdef>int <parameter>fd</parameter></paramdef> | 17 | <paramdef>int <parameter>fd</parameter></paramdef> |
18 | <paramdef>int <parameter>request</parameter></paramdef> | 18 | <paramdef>int <parameter>request</parameter></paramdef> |
19 | <paramdef>&v4l2-dv-preset; *<parameter>argp</parameter></paramdef> | 19 | <paramdef>struct v4l2_dv_preset *<parameter>argp</parameter></paramdef> |
20 | </funcprototype> | 20 | </funcprototype> |
21 | </funcsynopsis> | 21 | </funcsynopsis> |
22 | </refsynopsisdiv> | 22 | </refsynopsisdiv> |
diff --git a/Documentation/DocBook/v4l/vidioc-querycap.xml b/Documentation/DocBook/v4l/vidioc-querycap.xml index 6ab7e25b31b6..d499da93a450 100644 --- a/Documentation/DocBook/v4l/vidioc-querycap.xml +++ b/Documentation/DocBook/v4l/vidioc-querycap.xml | |||
@@ -184,7 +184,7 @@ data.</entry> | |||
184 | <row> | 184 | <row> |
185 | <entry><constant>V4L2_CAP_RDS_CAPTURE</constant></entry> | 185 | <entry><constant>V4L2_CAP_RDS_CAPTURE</constant></entry> |
186 | <entry>0x00000100</entry> | 186 | <entry>0x00000100</entry> |
187 | <entry>The device supports the <link linkend="rds">RDS</link> interface.</entry> | 187 | <entry>The device supports the <link linkend="rds">RDS</link> capture interface.</entry> |
188 | </row> | 188 | </row> |
189 | <row> | 189 | <row> |
190 | <entry><constant>V4L2_CAP_VIDEO_OUTPUT_OVERLAY</constant></entry> | 190 | <entry><constant>V4L2_CAP_VIDEO_OUTPUT_OVERLAY</constant></entry> |
@@ -206,6 +206,11 @@ driver capabilities.</para></footnote></entry> | |||
206 | hardware frequency seeking.</entry> | 206 | hardware frequency seeking.</entry> |
207 | </row> | 207 | </row> |
208 | <row> | 208 | <row> |
209 | <entry><constant>V4L2_CAP_RDS_OUTPUT</constant></entry> | ||
210 | <entry>0x00000800</entry> | ||
211 | <entry>The device supports the <link linkend="rds">RDS</link> output interface.</entry> | ||
212 | </row> | ||
213 | <row> | ||
209 | <entry><constant>V4L2_CAP_TUNER</constant></entry> | 214 | <entry><constant>V4L2_CAP_TUNER</constant></entry> |
210 | <entry>0x00010000</entry> | 215 | <entry>0x00010000</entry> |
211 | <entry>The device has some sort of tuner to | 216 | <entry>The device has some sort of tuner to |
diff --git a/Documentation/DocBook/v4l/vidioc-queryctrl.xml b/Documentation/DocBook/v4l/vidioc-queryctrl.xml index 8e0e055ac934..0d5e8283cf32 100644 --- a/Documentation/DocBook/v4l/vidioc-queryctrl.xml +++ b/Documentation/DocBook/v4l/vidioc-queryctrl.xml | |||
@@ -103,8 +103,12 @@ structure. The driver fills the rest of the structure or returns an | |||
103 | <structfield>index</structfield> is invalid. Menu items are enumerated | 103 | <structfield>index</structfield> is invalid. Menu items are enumerated |
104 | by calling <constant>VIDIOC_QUERYMENU</constant> with successive | 104 | by calling <constant>VIDIOC_QUERYMENU</constant> with successive |
105 | <structfield>index</structfield> values from &v4l2-queryctrl; | 105 | <structfield>index</structfield> values from &v4l2-queryctrl; |
106 | <structfield>minimum</structfield> (0) to | 106 | <structfield>minimum</structfield> to |
107 | <structfield>maximum</structfield>, inclusive.</para> | 107 | <structfield>maximum</structfield>, inclusive. Note that it is possible |
108 | for <constant>VIDIOC_QUERYMENU</constant> to return an &EINVAL; for some | ||
109 | indices between <structfield>minimum</structfield> and <structfield>maximum</structfield>. | ||
110 | In that case that particular menu item is not supported by this driver. Also note that | ||
111 | the <structfield>minimum</structfield> value is not necessarily 0.</para> | ||
108 | 112 | ||
109 | <para>See also the examples in <xref linkend="control" />.</para> | 113 | <para>See also the examples in <xref linkend="control" />.</para> |
110 | 114 | ||
@@ -139,7 +143,7 @@ string. This information is intended for the user.</entry> | |||
139 | <entry><structfield>minimum</structfield></entry> | 143 | <entry><structfield>minimum</structfield></entry> |
140 | <entry>Minimum value, inclusive. This field gives a lower | 144 | <entry>Minimum value, inclusive. This field gives a lower |
141 | bound for <constant>V4L2_CTRL_TYPE_INTEGER</constant> controls and the | 145 | bound for <constant>V4L2_CTRL_TYPE_INTEGER</constant> controls and the |
142 | lowest valid index (always 0) for <constant>V4L2_CTRL_TYPE_MENU</constant> controls. | 146 | lowest valid index for <constant>V4L2_CTRL_TYPE_MENU</constant> controls. |
143 | For <constant>V4L2_CTRL_TYPE_STRING</constant> controls the minimum value | 147 | For <constant>V4L2_CTRL_TYPE_STRING</constant> controls the minimum value |
144 | gives the minimum length of the string. This length <emphasis>does not include the terminating | 148 | gives the minimum length of the string. This length <emphasis>does not include the terminating |
145 | zero</emphasis>. It may not be valid for any other type of control, including | 149 | zero</emphasis>. It may not be valid for any other type of control, including |
@@ -279,7 +283,7 @@ values which are actually different on the hardware.</entry> | |||
279 | </row> | 283 | </row> |
280 | <row> | 284 | <row> |
281 | <entry><constant>V4L2_CTRL_TYPE_MENU</constant></entry> | 285 | <entry><constant>V4L2_CTRL_TYPE_MENU</constant></entry> |
282 | <entry>0</entry> | 286 | <entry>≥ 0</entry> |
283 | <entry>1</entry> | 287 | <entry>1</entry> |
284 | <entry>N-1</entry> | 288 | <entry>N-1</entry> |
285 | <entry>The control has a menu of N choices. The names of | 289 | <entry>The control has a menu of N choices. The names of |
@@ -405,8 +409,10 @@ writing a value will cause the device to carry out a given action | |||
405 | <term><errorcode>EINVAL</errorcode></term> | 409 | <term><errorcode>EINVAL</errorcode></term> |
406 | <listitem> | 410 | <listitem> |
407 | <para>The &v4l2-queryctrl; <structfield>id</structfield> | 411 | <para>The &v4l2-queryctrl; <structfield>id</structfield> |
408 | is invalid. The &v4l2-querymenu; <structfield>id</structfield> or | 412 | is invalid. The &v4l2-querymenu; <structfield>id</structfield> is |
409 | <structfield>index</structfield> is invalid.</para> | 413 | invalid or <structfield>index</structfield> is out of range (less than |
414 | <structfield>minimum</structfield> or greater than <structfield>maximum</structfield>) | ||
415 | or this particular menu item is not supported by the driver.</para> | ||
410 | </listitem> | 416 | </listitem> |
411 | </varlistentry> | 417 | </varlistentry> |
412 | <varlistentry> | 418 | <varlistentry> |
diff --git a/Documentation/DocBook/v4l/vidioc-s-hw-freq-seek.xml b/Documentation/DocBook/v4l/vidioc-s-hw-freq-seek.xml index 14b3ec7ed75b..c30dcc4232c0 100644 --- a/Documentation/DocBook/v4l/vidioc-s-hw-freq-seek.xml +++ b/Documentation/DocBook/v4l/vidioc-s-hw-freq-seek.xml | |||
@@ -51,7 +51,8 @@ | |||
51 | 51 | ||
52 | <para>Start a hardware frequency seek from the current frequency. | 52 | <para>Start a hardware frequency seek from the current frequency. |
53 | To do this applications initialize the <structfield>tuner</structfield>, | 53 | To do this applications initialize the <structfield>tuner</structfield>, |
54 | <structfield>type</structfield>, <structfield>seek_upward</structfield> and | 54 | <structfield>type</structfield>, <structfield>seek_upward</structfield>, |
55 | <structfield>spacing</structfield> and | ||
55 | <structfield>wrap_around</structfield> fields, and zero out the | 56 | <structfield>wrap_around</structfield> fields, and zero out the |
56 | <structfield>reserved</structfield> array of a &v4l2-hw-freq-seek; and | 57 | <structfield>reserved</structfield> array of a &v4l2-hw-freq-seek; and |
57 | call the <constant>VIDIOC_S_HW_FREQ_SEEK</constant> ioctl with a pointer | 58 | call the <constant>VIDIOC_S_HW_FREQ_SEEK</constant> ioctl with a pointer |
@@ -89,7 +90,12 @@ field and the &v4l2-tuner; <structfield>index</structfield> field.</entry> | |||
89 | </row> | 90 | </row> |
90 | <row> | 91 | <row> |
91 | <entry>__u32</entry> | 92 | <entry>__u32</entry> |
92 | <entry><structfield>reserved</structfield>[8]</entry> | 93 | <entry><structfield>spacing</structfield></entry> |
94 | <entry>If non-zero, defines the hardware seek resolution in Hz. The driver selects the nearest value that is supported by the device. If spacing is zero a reasonable default value is used.</entry> | ||
95 | </row> | ||
96 | <row> | ||
97 | <entry>__u32</entry> | ||
98 | <entry><structfield>reserved</structfield>[7]</entry> | ||
93 | <entry>Reserved for future extensions. Drivers and | 99 | <entry>Reserved for future extensions. Drivers and |
94 | applications must set the array to zero.</entry> | 100 | applications must set the array to zero.</entry> |
95 | </row> | 101 | </row> |
diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c index 6e25c2659e0a..a2976a6de033 100644 --- a/Documentation/accounting/getdelays.c +++ b/Documentation/accounting/getdelays.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <sys/types.h> | 21 | #include <sys/types.h> |
22 | #include <sys/stat.h> | 22 | #include <sys/stat.h> |
23 | #include <sys/socket.h> | 23 | #include <sys/socket.h> |
24 | #include <sys/wait.h> | ||
24 | #include <signal.h> | 25 | #include <signal.h> |
25 | 26 | ||
26 | #include <linux/genetlink.h> | 27 | #include <linux/genetlink.h> |
@@ -266,11 +267,13 @@ int main(int argc, char *argv[]) | |||
266 | int containerset = 0; | 267 | int containerset = 0; |
267 | char containerpath[1024]; | 268 | char containerpath[1024]; |
268 | int cfd = 0; | 269 | int cfd = 0; |
270 | int forking = 0; | ||
271 | sigset_t sigset; | ||
269 | 272 | ||
270 | struct msgtemplate msg; | 273 | struct msgtemplate msg; |
271 | 274 | ||
272 | while (1) { | 275 | while (!forking) { |
273 | c = getopt(argc, argv, "qdiw:r:m:t:p:vlC:"); | 276 | c = getopt(argc, argv, "qdiw:r:m:t:p:vlC:c:"); |
274 | if (c < 0) | 277 | if (c < 0) |
275 | break; | 278 | break; |
276 | 279 | ||
@@ -319,6 +322,28 @@ int main(int argc, char *argv[]) | |||
319 | err(1, "Invalid pid\n"); | 322 | err(1, "Invalid pid\n"); |
320 | cmd_type = TASKSTATS_CMD_ATTR_PID; | 323 | cmd_type = TASKSTATS_CMD_ATTR_PID; |
321 | break; | 324 | break; |
325 | case 'c': | ||
326 | |||
327 | /* Block SIGCHLD for sigwait() later */ | ||
328 | if (sigemptyset(&sigset) == -1) | ||
329 | err(1, "Failed to empty sigset"); | ||
330 | if (sigaddset(&sigset, SIGCHLD)) | ||
331 | err(1, "Failed to set sigchld in sigset"); | ||
332 | sigprocmask(SIG_BLOCK, &sigset, NULL); | ||
333 | |||
334 | /* fork/exec a child */ | ||
335 | tid = fork(); | ||
336 | if (tid < 0) | ||
337 | err(1, "Fork failed\n"); | ||
338 | if (tid == 0) | ||
339 | if (execvp(argv[optind - 1], | ||
340 | &argv[optind - 1]) < 0) | ||
341 | exit(-1); | ||
342 | |||
343 | /* Set the command type and avoid further processing */ | ||
344 | cmd_type = TASKSTATS_CMD_ATTR_PID; | ||
345 | forking = 1; | ||
346 | break; | ||
322 | case 'v': | 347 | case 'v': |
323 | printf("debug on\n"); | 348 | printf("debug on\n"); |
324 | dbg = 1; | 349 | dbg = 1; |
@@ -370,6 +395,15 @@ int main(int argc, char *argv[]) | |||
370 | goto err; | 395 | goto err; |
371 | } | 396 | } |
372 | 397 | ||
398 | /* | ||
399 | * If we forked a child, wait for it to exit. Cannot use waitpid() | ||
400 | * as all the delicious data would be reaped as part of the wait | ||
401 | */ | ||
402 | if (tid && forking) { | ||
403 | int sig_received; | ||
404 | sigwait(&sigset, &sig_received); | ||
405 | } | ||
406 | |||
373 | if (tid) { | 407 | if (tid) { |
374 | rc = send_cmd(nl_sd, id, mypid, TASKSTATS_CMD_GET, | 408 | rc = send_cmd(nl_sd, id, mypid, TASKSTATS_CMD_GET, |
375 | cmd_type, &tid, sizeof(__u32)); | 409 | cmd_type, &tid, sizeof(__u32)); |
diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt index b34823ff1646..190018b0c649 100644 --- a/Documentation/cgroups/cgroups.txt +++ b/Documentation/cgroups/cgroups.txt | |||
@@ -18,7 +18,8 @@ CONTENTS: | |||
18 | 1.2 Why are cgroups needed ? | 18 | 1.2 Why are cgroups needed ? |
19 | 1.3 How are cgroups implemented ? | 19 | 1.3 How are cgroups implemented ? |
20 | 1.4 What does notify_on_release do ? | 20 | 1.4 What does notify_on_release do ? |
21 | 1.5 How do I use cgroups ? | 21 | 1.5 What does clone_children do ? |
22 | 1.6 How do I use cgroups ? | ||
22 | 2. Usage Examples and Syntax | 23 | 2. Usage Examples and Syntax |
23 | 2.1 Basic Usage | 24 | 2.1 Basic Usage |
24 | 2.2 Attaching processes | 25 | 2.2 Attaching processes |
@@ -293,7 +294,16 @@ notify_on_release in the root cgroup at system boot is disabled | |||
293 | value of their parents notify_on_release setting. The default value of | 294 | value of their parents notify_on_release setting. The default value of |
294 | a cgroup hierarchy's release_agent path is empty. | 295 | a cgroup hierarchy's release_agent path is empty. |
295 | 296 | ||
296 | 1.5 How do I use cgroups ? | 297 | 1.5 What does clone_children do ? |
298 | --------------------------------- | ||
299 | |||
300 | If the clone_children flag is enabled (1) in a cgroup, then all | ||
301 | cgroups created beneath will call the post_clone callbacks for each | ||
302 | subsystem of the newly created cgroup. Usually when this callback is | ||
303 | implemented for a subsystem, it copies the values of the parent | ||
304 | subsystem, this is the case for the cpuset. | ||
305 | |||
306 | 1.6 How do I use cgroups ? | ||
297 | -------------------------- | 307 | -------------------------- |
298 | 308 | ||
299 | To start a new job that is to be contained within a cgroup, using | 309 | To start a new job that is to be contained within a cgroup, using |
diff --git a/Documentation/coccinelle.txt b/Documentation/coccinelle.txt index cd2b02837066..4a276ea7001c 100644 --- a/Documentation/coccinelle.txt +++ b/Documentation/coccinelle.txt | |||
@@ -24,6 +24,9 @@ of many distributions, e.g. : | |||
24 | You can get the latest version released from the Coccinelle homepage at | 24 | You can get the latest version released from the Coccinelle homepage at |
25 | http://coccinelle.lip6.fr/ | 25 | http://coccinelle.lip6.fr/ |
26 | 26 | ||
27 | Information and tips about Coccinelle are also provided on the wiki | ||
28 | pages at http://cocci.ekstranet.diku.dk/wiki/doku.php | ||
29 | |||
27 | Once you have it, run the following command: | 30 | Once you have it, run the following command: |
28 | 31 | ||
29 | ./configure | 32 | ./configure |
@@ -41,20 +44,22 @@ A Coccinelle-specific target is defined in the top level | |||
41 | Makefile. This target is named 'coccicheck' and calls the 'coccicheck' | 44 | Makefile. This target is named 'coccicheck' and calls the 'coccicheck' |
42 | front-end in the 'scripts' directory. | 45 | front-end in the 'scripts' directory. |
43 | 46 | ||
44 | Four modes are defined: report, patch, context, and org. The mode to | 47 | Four modes are defined: patch, report, context, and org. The mode to |
45 | use is specified by setting the MODE variable with 'MODE=<mode>'. | 48 | use is specified by setting the MODE variable with 'MODE=<mode>'. |
46 | 49 | ||
50 | 'patch' proposes a fix, when possible. | ||
51 | |||
47 | 'report' generates a list in the following format: | 52 | 'report' generates a list in the following format: |
48 | file:line:column-column: message | 53 | file:line:column-column: message |
49 | 54 | ||
50 | 'patch' proposes a fix, when possible. | ||
51 | |||
52 | 'context' highlights lines of interest and their context in a | 55 | 'context' highlights lines of interest and their context in a |
53 | diff-like style.Lines of interest are indicated with '-'. | 56 | diff-like style.Lines of interest are indicated with '-'. |
54 | 57 | ||
55 | 'org' generates a report in the Org mode format of Emacs. | 58 | 'org' generates a report in the Org mode format of Emacs. |
56 | 59 | ||
57 | Note that not all semantic patches implement all modes. | 60 | Note that not all semantic patches implement all modes. For easy use |
61 | of Coccinelle, the default mode is "chain" which tries the previous | ||
62 | modes in the order above until one succeeds. | ||
58 | 63 | ||
59 | To make a report for every semantic patch, run the following command: | 64 | To make a report for every semantic patch, run the following command: |
60 | 65 | ||
@@ -68,9 +73,9 @@ To produce patches, run: | |||
68 | 73 | ||
69 | 74 | ||
70 | The coccicheck target applies every semantic patch available in the | 75 | The coccicheck target applies every semantic patch available in the |
71 | subdirectories of 'scripts/coccinelle' to the entire Linux kernel. | 76 | sub-directories of 'scripts/coccinelle' to the entire Linux kernel. |
72 | 77 | ||
73 | For each semantic patch, a changelog message is proposed. It gives a | 78 | For each semantic patch, a commit message is proposed. It gives a |
74 | description of the problem being checked by the semantic patch, and | 79 | description of the problem being checked by the semantic patch, and |
75 | includes a reference to Coccinelle. | 80 | includes a reference to Coccinelle. |
76 | 81 | ||
@@ -93,12 +98,35 @@ or | |||
93 | make coccicheck COCCI=<my_SP.cocci> MODE=report | 98 | make coccicheck COCCI=<my_SP.cocci> MODE=report |
94 | 99 | ||
95 | 100 | ||
101 | Using Coccinelle on (modified) files | ||
102 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
103 | |||
104 | To apply Coccinelle on a file basis, instead of a directory basis, the | ||
105 | following command may be used: | ||
106 | |||
107 | make C=1 CHECK="scripts/coccicheck" | ||
108 | |||
109 | To check only newly edited code, use the value 2 for the C flag, i.e. | ||
110 | |||
111 | make C=2 CHECK="scripts/coccicheck" | ||
112 | |||
113 | This runs every semantic patch in scripts/coccinelle by default. The | ||
114 | COCCI variable may additionally be used to only apply a single | ||
115 | semantic patch as shown in the previous section. | ||
116 | |||
117 | The "chain" mode is the default. You can select another one with the | ||
118 | MODE variable explained above. | ||
119 | |||
120 | In this mode, there is no information about semantic patches | ||
121 | displayed, and no commit message proposed. | ||
122 | |||
123 | |||
96 | Proposing new semantic patches | 124 | Proposing new semantic patches |
97 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 125 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
98 | 126 | ||
99 | New semantic patches can be proposed and submitted by kernel | 127 | New semantic patches can be proposed and submitted by kernel |
100 | developers. For sake of clarity, they should be organized in the | 128 | developers. For sake of clarity, they should be organized in the |
101 | subdirectories of 'scripts/coccinelle/'. | 129 | sub-directories of 'scripts/coccinelle/'. |
102 | 130 | ||
103 | 131 | ||
104 | Detailed description of the 'report' mode | 132 | Detailed description of the 'report' mode |
@@ -111,7 +139,7 @@ Example: | |||
111 | 139 | ||
112 | Running | 140 | Running |
113 | 141 | ||
114 | make coccicheck MODE=report COCCI=scripts/coccinelle/err_cast.cocci | 142 | make coccicheck MODE=report COCCI=scripts/coccinelle/api/err_cast.cocci |
115 | 143 | ||
116 | will execute the following part of the SmPL script. | 144 | will execute the following part of the SmPL script. |
117 | 145 | ||
@@ -149,7 +177,7 @@ identified. | |||
149 | Example: | 177 | Example: |
150 | 178 | ||
151 | Running | 179 | Running |
152 | make coccicheck MODE=patch COCCI=scripts/coccinelle/err_cast.cocci | 180 | make coccicheck MODE=patch COCCI=scripts/coccinelle/api/err_cast.cocci |
153 | 181 | ||
154 | will execute the following part of the SmPL script. | 182 | will execute the following part of the SmPL script. |
155 | 183 | ||
@@ -193,7 +221,7 @@ NOTE: The diff-like output generated is NOT an applicable patch. The | |||
193 | Example: | 221 | Example: |
194 | 222 | ||
195 | Running | 223 | Running |
196 | make coccicheck MODE=context COCCI=scripts/coccinelle/err_cast.cocci | 224 | make coccicheck MODE=context COCCI=scripts/coccinelle/api/err_cast.cocci |
197 | 225 | ||
198 | will execute the following part of the SmPL script. | 226 | will execute the following part of the SmPL script. |
199 | 227 | ||
@@ -228,7 +256,7 @@ diff -u -p /home/user/linux/crypto/ctr.c /tmp/nothing | |||
228 | Example: | 256 | Example: |
229 | 257 | ||
230 | Running | 258 | Running |
231 | make coccicheck MODE=org COCCI=scripts/coccinelle/err_cast.cocci | 259 | make coccicheck MODE=org COCCI=scripts/coccinelle/api/err_cast.cocci |
232 | 260 | ||
233 | will execute the following part of the SmPL script. | 261 | will execute the following part of the SmPL script. |
234 | 262 | ||
diff --git a/Documentation/devices.txt b/Documentation/devices.txt index c58abf1ccc71..eccffe715229 100644 --- a/Documentation/devices.txt +++ b/Documentation/devices.txt | |||
@@ -1496,9 +1496,6 @@ Your cooperation is appreciated. | |||
1496 | 64 = /dev/radio0 Radio device | 1496 | 64 = /dev/radio0 Radio device |
1497 | ... | 1497 | ... |
1498 | 127 = /dev/radio63 Radio device | 1498 | 127 = /dev/radio63 Radio device |
1499 | 192 = /dev/vtx0 Teletext device | ||
1500 | ... | ||
1501 | 223 = /dev/vtx31 Teletext device | ||
1502 | 224 = /dev/vbi0 Vertical blank interrupt | 1499 | 224 = /dev/vbi0 Vertical blank interrupt |
1503 | ... | 1500 | ... |
1504 | 255 = /dev/vbi31 Vertical blank interrupt | 1501 | 255 = /dev/vbi31 Vertical blank interrupt |
@@ -2520,6 +2517,12 @@ Your cooperation is appreciated. | |||
2520 | 8 = /dev/mmcblk1 Second SD/MMC card | 2517 | 8 = /dev/mmcblk1 Second SD/MMC card |
2521 | ... | 2518 | ... |
2522 | 2519 | ||
2520 | The start of next SD/MMC card can be configured with | ||
2521 | CONFIG_MMC_BLOCK_MINORS, or overridden at boot/modprobe | ||
2522 | time using the mmcblk.perdev_minors option. That would | ||
2523 | bump the offset between each card to be the configured | ||
2524 | value instead of the default 8. | ||
2525 | |||
2523 | 179 char CCube DVXChip-based PCI products | 2526 | 179 char CCube DVXChip-based PCI products |
2524 | 0 = /dev/dvxirq0 First DVX device | 2527 | 0 = /dev/dvxirq0 First DVX device |
2525 | 1 = /dev/dvxirq1 Second DVX device | 2528 | 1 = /dev/dvxirq1 Second DVX device |
diff --git a/Documentation/dvb/get_dvb_firmware b/Documentation/dvb/get_dvb_firmware index 350959f4e41b..59690de8ebfe 100644 --- a/Documentation/dvb/get_dvb_firmware +++ b/Documentation/dvb/get_dvb_firmware | |||
@@ -26,7 +26,8 @@ use IO::Handle; | |||
26 | "dec3000s", "vp7041", "dibusb", "nxt2002", "nxt2004", | 26 | "dec3000s", "vp7041", "dibusb", "nxt2002", "nxt2004", |
27 | "or51211", "or51132_qam", "or51132_vsb", "bluebird", | 27 | "or51211", "or51132_qam", "or51132_vsb", "bluebird", |
28 | "opera1", "cx231xx", "cx18", "cx23885", "pvrusb2", "mpc718", | 28 | "opera1", "cx231xx", "cx18", "cx23885", "pvrusb2", "mpc718", |
29 | "af9015", "ngene", "az6027"); | 29 | "af9015", "ngene", "az6027", "lme2510_lg", "lme2510c_s7395", |
30 | "lme2510c_s7395_old"); | ||
30 | 31 | ||
31 | # Check args | 32 | # Check args |
32 | syntax() if (scalar(@ARGV) != 1); | 33 | syntax() if (scalar(@ARGV) != 1); |
@@ -584,6 +585,49 @@ sub az6027{ | |||
584 | 585 | ||
585 | $firmware; | 586 | $firmware; |
586 | } | 587 | } |
588 | |||
589 | sub lme2510_lg { | ||
590 | my $sourcefile = "LMEBDA_DVBS.sys"; | ||
591 | my $hash = "fc6017ad01e79890a97ec53bea157ed2"; | ||
592 | my $outfile = "dvb-usb-lme2510-lg.fw"; | ||
593 | my $hasho = "caa065d5fdbd2c09ad57b399bbf55cad"; | ||
594 | |||
595 | checkstandard(); | ||
596 | |||
597 | verify($sourcefile, $hash); | ||
598 | extract($sourcefile, 4168, 3841, $outfile); | ||
599 | verify($outfile, $hasho); | ||
600 | $outfile; | ||
601 | } | ||
602 | |||
603 | sub lme2510c_s7395 { | ||
604 | my $sourcefile = "US2A0D.sys"; | ||
605 | my $hash = "b0155a8083fb822a3bd47bc360e74601"; | ||
606 | my $outfile = "dvb-usb-lme2510c-s7395.fw"; | ||
607 | my $hasho = "3a3cf1aeebd17b6ddc04cebe131e94cf"; | ||
608 | |||
609 | checkstandard(); | ||
610 | |||
611 | verify($sourcefile, $hash); | ||
612 | extract($sourcefile, 37248, 3720, $outfile); | ||
613 | verify($outfile, $hasho); | ||
614 | $outfile; | ||
615 | } | ||
616 | |||
617 | sub lme2510c_s7395_old { | ||
618 | my $sourcefile = "LMEBDA_DVBS7395C.sys"; | ||
619 | my $hash = "7572ae0eb9cdf91baabd7c0ba9e09b31"; | ||
620 | my $outfile = "dvb-usb-lme2510c-s7395.fw"; | ||
621 | my $hasho = "90430c5b435eb5c6f88fd44a9d950674"; | ||
622 | |||
623 | checkstandard(); | ||
624 | |||
625 | verify($sourcefile, $hash); | ||
626 | extract($sourcefile, 4208, 3881, $outfile); | ||
627 | verify($outfile, $hasho); | ||
628 | $outfile; | ||
629 | } | ||
630 | |||
587 | # --------------------------------------------------------------- | 631 | # --------------------------------------------------------------- |
588 | # Utilities | 632 | # Utilities |
589 | 633 | ||
diff --git a/Documentation/dvb/lmedm04.txt b/Documentation/dvb/lmedm04.txt new file mode 100644 index 000000000000..e175784b89bf --- /dev/null +++ b/Documentation/dvb/lmedm04.txt | |||
@@ -0,0 +1,58 @@ | |||
1 | To extract firmware for the DM04/QQBOX you need to copy the | ||
2 | following file(s) to this directory. | ||
3 | |||
4 | for DM04+/QQBOX LME2510C (Sharp 7395 Tuner) | ||
5 | ------------------------------------------- | ||
6 | |||
7 | The Sharp 7395 driver can be found in windows/system32/driver | ||
8 | |||
9 | US2A0D.sys (dated 17 Mar 2009) | ||
10 | |||
11 | |||
12 | and run | ||
13 | ./get_dvb_firmware lme2510c_s7395 | ||
14 | |||
15 | will produce | ||
16 | dvb-usb-lme2510c-s7395.fw | ||
17 | |||
18 | An alternative but older firmware can be found on the driver | ||
19 | disk DVB-S_EN_3.5A in BDADriver/driver | ||
20 | |||
21 | LMEBDA_DVBS7395C.sys (dated 18 Jan 2008) | ||
22 | |||
23 | and run | ||
24 | ./get_dvb_firmware lme2510c_s7395_old | ||
25 | |||
26 | will produce | ||
27 | dvb-usb-lme2510c-s7395.fw | ||
28 | |||
29 | -------------------------------------------------------------------- | ||
30 | |||
31 | The LG firmware can be found on the driver | ||
32 | disk DM04+_5.1A[LG] in BDADriver/driver | ||
33 | |||
34 | for DM04 LME2510 (LG Tuner) | ||
35 | --------------------------- | ||
36 | |||
37 | LMEBDA_DVBS.sys (dated 13 Nov 2007) | ||
38 | |||
39 | and run | ||
40 | ./get_dvb_firmware lme2510_lg | ||
41 | |||
42 | will produce | ||
43 | dvb-usb-lme2510-lg.fw | ||
44 | |||
45 | |||
46 | Other LG firmware can be extracted manually from US280D.sys | ||
47 | only found in windows/system32/driver. | ||
48 | |||
49 | dd if=US280D.sys ibs=1 skip=42616 count=3668 of=dvb-usb-lme2510-lg.fw | ||
50 | |||
51 | for DM04 LME2510C (LG Tuner) | ||
52 | --------------------------- | ||
53 | |||
54 | dd if=US280D.sys ibs=1 skip=35200 count=3850 of=dvb-usb-lme2510c-lg.fw | ||
55 | |||
56 | --------------------------------------------------------------------- | ||
57 | |||
58 | Copy the firmware file(s) to /lib/firmware | ||
diff --git a/Documentation/fb/viafb.txt b/Documentation/fb/viafb.txt index f3e046a6a987..1a2e8aa3fbb1 100644 --- a/Documentation/fb/viafb.txt +++ b/Documentation/fb/viafb.txt | |||
@@ -197,6 +197,54 @@ Notes: | |||
197 | example, | 197 | example, |
198 | # fbset -depth 16 | 198 | # fbset -depth 16 |
199 | 199 | ||
200 | |||
201 | [Configure viafb via /proc] | ||
202 | --------------------------- | ||
203 | The following files exist in /proc/viafb | ||
204 | |||
205 | supported_output_devices | ||
206 | |||
207 | This read-only file contains a full ',' seperated list containing all | ||
208 | output devices that could be available on your platform. It is likely | ||
209 | that not all of those have a connector on your hardware but it should | ||
210 | provide a good starting point to figure out which of those names match | ||
211 | a real connector. | ||
212 | Example: | ||
213 | # cat /proc/viafb/supported_output_devices | ||
214 | |||
215 | iga1/output_devices | ||
216 | iga2/output_devices | ||
217 | |||
218 | These two files are readable and writable. iga1 and iga2 are the two | ||
219 | independent units that produce the screen image. Those images can be | ||
220 | forwarded to one or more output devices. Reading those files is a way | ||
221 | to query which output devices are currently used by an iga. | ||
222 | Example: | ||
223 | # cat /proc/viafb/iga1/output_devices | ||
224 | If there are no output devices printed the output of this iga is lost. | ||
225 | This can happen for example if only one (the other) iga is used. | ||
226 | Writing to these files allows adjusting the output devices during | ||
227 | runtime. One can add new devices, remove existing ones or switch | ||
228 | between igas. Essentially you can write a ',' seperated list of device | ||
229 | names (or a single one) in the same format as the output to those | ||
230 | files. You can add a '+' or '-' as a prefix allowing simple addition | ||
231 | and removal of devices. So a prefix '+' adds the devices from your list | ||
232 | to the already existing ones, '-' removes the listed devices from the | ||
233 | existing ones and if no prefix is given it replaces all existing ones | ||
234 | with the listed ones. If you remove devices they are expected to turn | ||
235 | off. If you add devices that are already part of the other iga they are | ||
236 | removed there and added to the new one. | ||
237 | Examples: | ||
238 | Add CRT as output device to iga1 | ||
239 | # echo +CRT > /proc/viafb/iga1/output_devices | ||
240 | |||
241 | Remove (turn off) DVP1 and LVDS1 as output devices of iga2 | ||
242 | # echo -DVP1,LVDS1 > /proc/viafb/iga2/output_devices | ||
243 | |||
244 | Replace all iga1 output devices by CRT | ||
245 | # echo CRT > /proc/viafb/iga1/output_devices | ||
246 | |||
247 | |||
200 | [Bootup with viafb]: | 248 | [Bootup with viafb]: |
201 | -------------------- | 249 | -------------------- |
202 | Add the following line to your grub.conf: | 250 | Add the following line to your grub.conf: |
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index d2af87ba96e1..d8f36f984faa 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -98,7 +98,7 @@ Who: Pavel Machek <pavel@ucw.cz> | |||
98 | --------------------------- | 98 | --------------------------- |
99 | 99 | ||
100 | What: Video4Linux API 1 ioctls and from Video devices. | 100 | What: Video4Linux API 1 ioctls and from Video devices. |
101 | When: July 2009 | 101 | When: kernel 2.6.38 |
102 | Files: include/linux/videodev.h | 102 | Files: include/linux/videodev.h |
103 | Check: include/linux/videodev.h | 103 | Check: include/linux/videodev.h |
104 | Why: V4L1 AP1 was replaced by V4L2 API during migration from 2.4 to 2.6 | 104 | Why: V4L1 AP1 was replaced by V4L2 API during migration from 2.4 to 2.6 |
@@ -116,6 +116,21 @@ Who: Mauro Carvalho Chehab <mchehab@infradead.org> | |||
116 | 116 | ||
117 | --------------------------- | 117 | --------------------------- |
118 | 118 | ||
119 | What: Video4Linux obsolete drivers using V4L1 API | ||
120 | When: kernel 2.6.38 | ||
121 | Files: drivers/staging/cpia/* drivers/staging/stradis/* | ||
122 | Check: drivers/staging/cpia/cpia.c drivers/staging/stradis/stradis.c | ||
123 | Why: There are some drivers still using V4L1 API, despite all efforts we've done | ||
124 | to migrate. Those drivers are for obsolete hardware that the old maintainer | ||
125 | didn't care (or not have the hardware anymore), and that no other developer | ||
126 | could find any hardware to buy. They probably have no practical usage today, | ||
127 | and people with such old hardware could probably keep using an older version | ||
128 | of the kernel. Those drivers will be moved to staging on 2.6.37 and, if nobody | ||
129 | care enough to port and test them with V4L2 API, they'll be removed on 2.6.38. | ||
130 | Who: Mauro Carvalho Chehab <mchehab@infradead.org> | ||
131 | |||
132 | --------------------------- | ||
133 | |||
119 | What: sys_sysctl | 134 | What: sys_sysctl |
120 | When: September 2010 | 135 | When: September 2010 |
121 | Option: CONFIG_SYSCTL_SYSCALL | 136 | Option: CONFIG_SYSCTL_SYSCALL |
@@ -470,29 +485,6 @@ When: April 2011 | |||
470 | Why: Superseded by xt_CT | 485 | Why: Superseded by xt_CT |
471 | Who: Netfilter developer team <netfilter-devel@vger.kernel.org> | 486 | Who: Netfilter developer team <netfilter-devel@vger.kernel.org> |
472 | 487 | ||
473 | --------------------------- | ||
474 | |||
475 | What: video4linux /dev/vtx teletext API support | ||
476 | When: 2.6.35 | ||
477 | Files: drivers/media/video/saa5246a.c drivers/media/video/saa5249.c | ||
478 | include/linux/videotext.h | ||
479 | Why: The vtx device nodes have been superseded by vbi device nodes | ||
480 | for many years. No applications exist that use the vtx support. | ||
481 | Of the two i2c drivers that actually support this API the saa5249 | ||
482 | has been impossible to use for a year now and no known hardware | ||
483 | that supports this device exists. The saa5246a is theoretically | ||
484 | supported by the old mxb boards, but it never actually worked. | ||
485 | |||
486 | In summary: there is no hardware that can use this API and there | ||
487 | are no applications actually implementing this API. | ||
488 | |||
489 | The vtx support still reserves minors 192-223 and we would really | ||
490 | like to reuse those for upcoming new functionality. In the unlikely | ||
491 | event that new hardware appears that wants to use the functionality | ||
492 | provided by the vtx API, then that functionality should be build | ||
493 | around the sliced VBI API instead. | ||
494 | Who: Hans Verkuil <hverkuil@xs4all.nl> | ||
495 | |||
496 | ---------------------------- | 488 | ---------------------------- |
497 | 489 | ||
498 | What: IRQF_DISABLED | 490 | What: IRQF_DISABLED |
@@ -526,6 +518,23 @@ Who: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | |||
526 | 518 | ||
527 | ---------------------------- | 519 | ---------------------------- |
528 | 520 | ||
521 | What: namespace cgroup (ns_cgroup) | ||
522 | When: 2.6.38 | ||
523 | Why: The ns_cgroup leads to some problems: | ||
524 | * cgroup creation is out-of-control | ||
525 | * cgroup name can conflict when pids are looping | ||
526 | * it is not possible to have a single process handling | ||
527 | a lot of namespaces without falling in a exponential creation time | ||
528 | * we may want to create a namespace without creating a cgroup | ||
529 | |||
530 | The ns_cgroup is replaced by a compatibility flag 'clone_children', | ||
531 | where a newly created cgroup will copy the parent cgroup values. | ||
532 | The userspace has to manually create a cgroup and add a task to | ||
533 | the 'tasks' file. | ||
534 | Who: Daniel Lezcano <daniel.lezcano@free.fr> | ||
535 | |||
536 | ---------------------------- | ||
537 | |||
529 | What: iwlwifi disable_hw_scan module parameters | 538 | What: iwlwifi disable_hw_scan module parameters |
530 | When: 2.6.40 | 539 | When: 2.6.40 |
531 | Why: Hareware scan is the prefer method for iwlwifi devices for | 540 | Why: Hareware scan is the prefer method for iwlwifi devices for |
diff --git a/Documentation/filesystems/00-INDEX b/Documentation/filesystems/00-INDEX index 4303614b5add..8c624a18f67d 100644 --- a/Documentation/filesystems/00-INDEX +++ b/Documentation/filesystems/00-INDEX | |||
@@ -96,8 +96,6 @@ seq_file.txt | |||
96 | - how to use the seq_file API | 96 | - how to use the seq_file API |
97 | sharedsubtree.txt | 97 | sharedsubtree.txt |
98 | - a description of shared subtrees for namespaces. | 98 | - a description of shared subtrees for namespaces. |
99 | smbfs.txt | ||
100 | - info on using filesystems with the SMB protocol (Win 3.11 and NT). | ||
101 | spufs.txt | 99 | spufs.txt |
102 | - info and mount options for the SPU filesystem used on Cell. | 100 | - info and mount options for the SPU filesystem used on Cell. |
103 | sysfs-pci.txt | 101 | sysfs-pci.txt |
diff --git a/Documentation/filesystems/9p.txt b/Documentation/filesystems/9p.txt index f9765e8cf086..b22abba78fed 100644 --- a/Documentation/filesystems/9p.txt +++ b/Documentation/filesystems/9p.txt | |||
@@ -111,7 +111,7 @@ OPTIONS | |||
111 | This can be used to share devices/named pipes/sockets between | 111 | This can be used to share devices/named pipes/sockets between |
112 | hosts. This functionality will be expanded in later versions. | 112 | hosts. This functionality will be expanded in later versions. |
113 | 113 | ||
114 | access there are three access modes. | 114 | access there are four access modes. |
115 | user = if a user tries to access a file on v9fs | 115 | user = if a user tries to access a file on v9fs |
116 | filesystem for the first time, v9fs sends an | 116 | filesystem for the first time, v9fs sends an |
117 | attach command (Tattach) for that user. | 117 | attach command (Tattach) for that user. |
@@ -120,6 +120,8 @@ OPTIONS | |||
120 | the files on the mounted filesystem | 120 | the files on the mounted filesystem |
121 | any = v9fs does single attach and performs all | 121 | any = v9fs does single attach and performs all |
122 | operations as one user | 122 | operations as one user |
123 | client = ACL based access check on the 9p client | ||
124 | side for access validation | ||
123 | 125 | ||
124 | cachetag cache tag to use the specified persistent cache. | 126 | cachetag cache tag to use the specified persistent cache. |
125 | cache tags for existing cache sessions can be listed at | 127 | cache tags for existing cache sessions can be listed at |
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt index e1def1786e50..6ab9442d7eeb 100644 --- a/Documentation/filesystems/ext4.txt +++ b/Documentation/filesystems/ext4.txt | |||
@@ -353,6 +353,20 @@ noauto_da_alloc replacing existing files via patterns such as | |||
353 | system crashes before the delayed allocation | 353 | system crashes before the delayed allocation |
354 | blocks are forced to disk. | 354 | blocks are forced to disk. |
355 | 355 | ||
356 | noinit_itable Do not initialize any uninitialized inode table | ||
357 | blocks in the background. This feature may be | ||
358 | used by installation CD's so that the install | ||
359 | process can complete as quickly as possible; the | ||
360 | inode table initialization process would then be | ||
361 | deferred until the next time the file system | ||
362 | is unmounted. | ||
363 | |||
364 | init_itable=n The lazy itable init code will wait n times the | ||
365 | number of milliseconds it took to zero out the | ||
366 | previous block group's inode table. This | ||
367 | minimizes the impact on the systme performance | ||
368 | while file system's inode table is being initialized. | ||
369 | |||
356 | discard Controls whether ext4 should issue discard/TRIM | 370 | discard Controls whether ext4 should issue discard/TRIM |
357 | nodiscard(*) commands to the underlying block device when | 371 | nodiscard(*) commands to the underlying block device when |
358 | blocks are freed. This is useful for SSD devices | 372 | blocks are freed. This is useful for SSD devices |
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index a563b74c7aef..e73df2722ff3 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -136,6 +136,7 @@ Table 1-1: Process specific entries in /proc | |||
136 | statm Process memory status information | 136 | statm Process memory status information |
137 | status Process status in human readable form | 137 | status Process status in human readable form |
138 | wchan If CONFIG_KALLSYMS is set, a pre-decoded wchan | 138 | wchan If CONFIG_KALLSYMS is set, a pre-decoded wchan |
139 | pagemap Page table | ||
139 | stack Report full stack trace, enable via CONFIG_STACKTRACE | 140 | stack Report full stack trace, enable via CONFIG_STACKTRACE |
140 | smaps a extension based on maps, showing the memory consumption of | 141 | smaps a extension based on maps, showing the memory consumption of |
141 | each mapping | 142 | each mapping |
@@ -370,6 +371,7 @@ Shared_Dirty: 0 kB | |||
370 | Private_Clean: 0 kB | 371 | Private_Clean: 0 kB |
371 | Private_Dirty: 0 kB | 372 | Private_Dirty: 0 kB |
372 | Referenced: 892 kB | 373 | Referenced: 892 kB |
374 | Anonymous: 0 kB | ||
373 | Swap: 0 kB | 375 | Swap: 0 kB |
374 | KernelPageSize: 4 kB | 376 | KernelPageSize: 4 kB |
375 | MMUPageSize: 4 kB | 377 | MMUPageSize: 4 kB |
@@ -378,9 +380,15 @@ The first of these lines shows the same information as is displayed for the | |||
378 | mapping in /proc/PID/maps. The remaining lines show the size of the mapping | 380 | mapping in /proc/PID/maps. The remaining lines show the size of the mapping |
379 | (size), the amount of the mapping that is currently resident in RAM (RSS), the | 381 | (size), the amount of the mapping that is currently resident in RAM (RSS), the |
380 | process' proportional share of this mapping (PSS), the number of clean and | 382 | process' proportional share of this mapping (PSS), the number of clean and |
381 | dirty shared pages in the mapping, and the number of clean and dirty private | 383 | dirty private pages in the mapping. Note that even a page which is part of a |
382 | pages in the mapping. The "Referenced" indicates the amount of memory | 384 | MAP_SHARED mapping, but has only a single pte mapped, i.e. is currently used |
383 | currently marked as referenced or accessed. | 385 | by only one process, is accounted as private and not as shared. "Referenced" |
386 | indicates the amount of memory currently marked as referenced or accessed. | ||
387 | "Anonymous" shows the amount of memory that does not belong to any file. Even | ||
388 | a mapping associated with a file may contain anonymous pages: when MAP_PRIVATE | ||
389 | and a page is modified, the file page is replaced by a private anonymous copy. | ||
390 | "Swap" shows how much would-be-anonymous memory is also used, but out on | ||
391 | swap. | ||
384 | 392 | ||
385 | This file is only present if the CONFIG_MMU kernel configuration option is | 393 | This file is only present if the CONFIG_MMU kernel configuration option is |
386 | enabled. | 394 | enabled. |
@@ -397,6 +405,9 @@ To clear the bits for the file mapped pages associated with the process | |||
397 | > echo 3 > /proc/PID/clear_refs | 405 | > echo 3 > /proc/PID/clear_refs |
398 | Any other value written to /proc/PID/clear_refs will have no effect. | 406 | Any other value written to /proc/PID/clear_refs will have no effect. |
399 | 407 | ||
408 | The /proc/pid/pagemap gives the PFN, which can be used to find the pageflags | ||
409 | using /proc/kpageflags and number of times a page is mapped using | ||
410 | /proc/kpagecount. For detailed explanation, see Documentation/vm/pagemap.txt. | ||
400 | 411 | ||
401 | 1.2 Kernel data | 412 | 1.2 Kernel data |
402 | --------------- | 413 | --------------- |
diff --git a/Documentation/filesystems/smbfs.txt b/Documentation/filesystems/smbfs.txt deleted file mode 100644 index 194fb0decd2c..000000000000 --- a/Documentation/filesystems/smbfs.txt +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | Smbfs is a filesystem that implements the SMB protocol, which is the | ||
2 | protocol used by Windows for Workgroups, Windows 95 and Windows NT. | ||
3 | Smbfs was inspired by Samba, the program written by Andrew Tridgell | ||
4 | that turns any Unix host into a file server for DOS or Windows clients. | ||
5 | |||
6 | Smbfs is a SMB client, but uses parts of samba for its operation. For | ||
7 | more info on samba, including documentation, please go to | ||
8 | http://www.samba.org/ and then on to your nearest mirror. | ||
diff --git a/Documentation/hwmon/it87 b/Documentation/hwmon/it87 index 8d08bf0d38ed..38425f0f2645 100644 --- a/Documentation/hwmon/it87 +++ b/Documentation/hwmon/it87 | |||
@@ -22,6 +22,10 @@ Supported chips: | |||
22 | Prefix: 'it8720' | 22 | Prefix: 'it8720' |
23 | Addresses scanned: from Super I/O config space (8 I/O ports) | 23 | Addresses scanned: from Super I/O config space (8 I/O ports) |
24 | Datasheet: Not publicly available | 24 | Datasheet: Not publicly available |
25 | * IT8721F/IT8758E | ||
26 | Prefix: 'it8721' | ||
27 | Addresses scanned: from Super I/O config space (8 I/O ports) | ||
28 | Datasheet: Not publicly available | ||
25 | * SiS950 [clone of IT8705F] | 29 | * SiS950 [clone of IT8705F] |
26 | Prefix: 'it87' | 30 | Prefix: 'it87' |
27 | Addresses scanned: from Super I/O config space (8 I/O ports) | 31 | Addresses scanned: from Super I/O config space (8 I/O ports) |
@@ -67,7 +71,7 @@ Description | |||
67 | ----------- | 71 | ----------- |
68 | 72 | ||
69 | This driver implements support for the IT8705F, IT8712F, IT8716F, | 73 | This driver implements support for the IT8705F, IT8712F, IT8716F, |
70 | IT8718F, IT8720F, IT8726F and SiS950 chips. | 74 | IT8718F, IT8720F, IT8721F, IT8726F, IT8758E and SiS950 chips. |
71 | 75 | ||
72 | These chips are 'Super I/O chips', supporting floppy disks, infrared ports, | 76 | These chips are 'Super I/O chips', supporting floppy disks, infrared ports, |
73 | joysticks and other miscellaneous stuff. For hardware monitoring, they | 77 | joysticks and other miscellaneous stuff. For hardware monitoring, they |
@@ -86,14 +90,15 @@ the driver won't notice and report changes in the VID value. The two | |||
86 | upper VID bits share their pins with voltage inputs (in5 and in6) so you | 90 | upper VID bits share their pins with voltage inputs (in5 and in6) so you |
87 | can't have both on a given board. | 91 | can't have both on a given board. |
88 | 92 | ||
89 | The IT8716F, IT8718F, IT8720F and later IT8712F revisions have support for | 93 | The IT8716F, IT8718F, IT8720F, IT8721F/IT8758E and later IT8712F revisions |
90 | 2 additional fans. The additional fans are supported by the driver. | 94 | have support for 2 additional fans. The additional fans are supported by the |
95 | driver. | ||
91 | 96 | ||
92 | The IT8716F, IT8718F and IT8720F, and late IT8712F and IT8705F also have | 97 | The IT8716F, IT8718F, IT8720F and IT8721F/IT8758E, and late IT8712F and |
93 | optional 16-bit tachometer counters for fans 1 to 3. This is better (no more | 98 | IT8705F also have optional 16-bit tachometer counters for fans 1 to 3. This |
94 | fan clock divider mess) but not compatible with the older chips and | 99 | is better (no more fan clock divider mess) but not compatible with the older |
95 | revisions. The 16-bit tachometer mode is enabled by the driver when one | 100 | chips and revisions. The 16-bit tachometer mode is enabled by the driver when |
96 | of the above chips is detected. | 101 | one of the above chips is detected. |
97 | 102 | ||
98 | The IT8726F is just bit enhanced IT8716F with additional hardware | 103 | The IT8726F is just bit enhanced IT8716F with additional hardware |
99 | for AMD power sequencing. Therefore the chip will appear as IT8716F | 104 | for AMD power sequencing. Therefore the chip will appear as IT8716F |
@@ -115,7 +120,12 @@ alarm is triggered if the voltage has crossed a programmable minimum or | |||
115 | maximum limit. Note that minimum in this case always means 'closest to | 120 | maximum limit. Note that minimum in this case always means 'closest to |
116 | zero'; this is important for negative voltage measurements. All voltage | 121 | zero'; this is important for negative voltage measurements. All voltage |
117 | inputs can measure voltages between 0 and 4.08 volts, with a resolution of | 122 | inputs can measure voltages between 0 and 4.08 volts, with a resolution of |
118 | 0.016 volt. The battery voltage in8 does not have limit registers. | 123 | 0.016 volt (except IT8721F/IT8758E: 0.012 volt.) The battery voltage in8 does |
124 | not have limit registers. | ||
125 | |||
126 | On the IT8721F/IT8758E, some voltage inputs are internal and scaled inside | ||
127 | the chip (in7, in8 and optionally in3). The driver handles this transparently | ||
128 | so user-space doesn't have to care. | ||
119 | 129 | ||
120 | The VID lines (IT8712F/IT8716F/IT8718F/IT8720F) encode the core voltage value: | 130 | The VID lines (IT8712F/IT8716F/IT8718F/IT8720F) encode the core voltage value: |
121 | the voltage level your processor should work with. This is hardcoded by | 131 | the voltage level your processor should work with. This is hardcoded by |
diff --git a/Documentation/hwmon/lm85 b/Documentation/hwmon/lm85 index b98e0e0d1910..239258a63c81 100644 --- a/Documentation/hwmon/lm85 +++ b/Documentation/hwmon/lm85 | |||
@@ -14,6 +14,10 @@ Supported chips: | |||
14 | Prefix: 'adt7463' | 14 | Prefix: 'adt7463' |
15 | Addresses scanned: I2C 0x2c, 0x2d, 0x2e | 15 | Addresses scanned: I2C 0x2c, 0x2d, 0x2e |
16 | Datasheet: http://www.onsemi.com/PowerSolutions/product.do?id=ADT7463 | 16 | Datasheet: http://www.onsemi.com/PowerSolutions/product.do?id=ADT7463 |
17 | * Analog Devices ADT7468 | ||
18 | Prefix: 'adt7468' | ||
19 | Addresses scanned: I2C 0x2c, 0x2d, 0x2e | ||
20 | Datasheet: http://www.onsemi.com/PowerSolutions/product.do?id=ADT7468 | ||
17 | * SMSC EMC6D100, SMSC EMC6D101 | 21 | * SMSC EMC6D100, SMSC EMC6D101 |
18 | Prefix: 'emc6d100' | 22 | Prefix: 'emc6d100' |
19 | Addresses scanned: I2C 0x2c, 0x2d, 0x2e | 23 | Addresses scanned: I2C 0x2c, 0x2d, 0x2e |
@@ -34,7 +38,7 @@ Description | |||
34 | ----------- | 38 | ----------- |
35 | 39 | ||
36 | This driver implements support for the National Semiconductor LM85 and | 40 | This driver implements support for the National Semiconductor LM85 and |
37 | compatible chips including the Analog Devices ADM1027, ADT7463 and | 41 | compatible chips including the Analog Devices ADM1027, ADT7463, ADT7468 and |
38 | SMSC EMC6D10x chips family. | 42 | SMSC EMC6D10x chips family. |
39 | 43 | ||
40 | The LM85 uses the 2-wire interface compatible with the SMBUS 2.0 | 44 | The LM85 uses the 2-wire interface compatible with the SMBUS 2.0 |
@@ -87,14 +91,22 @@ To smooth the response of fans to changes in temperature, the LM85 has an | |||
87 | optional filter for smoothing temperatures. The ADM1027 has the same | 91 | optional filter for smoothing temperatures. The ADM1027 has the same |
88 | config option but uses it to rate limit the changes to fan speed instead. | 92 | config option but uses it to rate limit the changes to fan speed instead. |
89 | 93 | ||
90 | The ADM1027 and ADT7463 have a 10-bit ADC and can therefore measure | 94 | The ADM1027, ADT7463 and ADT7468 have a 10-bit ADC and can therefore |
91 | temperatures with 0.25 degC resolution. They also provide an offset to the | 95 | measure temperatures with 0.25 degC resolution. They also provide an offset |
92 | temperature readings that is automatically applied during measurement. | 96 | to the temperature readings that is automatically applied during |
93 | This offset can be used to zero out any errors due to traces and placement. | 97 | measurement. This offset can be used to zero out any errors due to traces |
94 | The documentation says that the offset is in 0.25 degC steps, but in | 98 | and placement. The documentation says that the offset is in 0.25 degC |
95 | initial testing of the ADM1027 it was 1.00 degC steps. Analog Devices has | 99 | steps, but in initial testing of the ADM1027 it was 1.00 degC steps. Analog |
96 | confirmed this "bug". The ADT7463 is reported to work as described in the | 100 | Devices has confirmed this "bug". The ADT7463 is reported to work as |
97 | documentation. The current lm85 driver does not show the offset register. | 101 | described in the documentation. The current lm85 driver does not show the |
102 | offset register. | ||
103 | |||
104 | The ADT7468 has a high-frequency PWM mode, where all PWM outputs are | ||
105 | driven by a 22.5 kHz clock. This is a global mode, not per-PWM output, | ||
106 | which means that setting any PWM frequency above 11.3 kHz will switch | ||
107 | all 3 PWM outputs to a 22.5 kHz frequency. Conversely, setting any PWM | ||
108 | frequency below 11.3 kHz will switch all 3 PWM outputs to a frequency | ||
109 | between 10 and 100 Hz, which can then be tuned separately. | ||
98 | 110 | ||
99 | See the vendor datasheets for more information. There is application note | 111 | See the vendor datasheets for more information. There is application note |
100 | from National (AN-1260) with some additional information about the LM85. | 112 | from National (AN-1260) with some additional information about the LM85. |
@@ -125,17 +137,17 @@ datasheet for a complete description of the differences. Other than | |||
125 | identifying the chip, the driver behaves no differently with regard to | 137 | identifying the chip, the driver behaves no differently with regard to |
126 | these two chips. The LM85B is recommended for new designs. | 138 | these two chips. The LM85B is recommended for new designs. |
127 | 139 | ||
128 | The ADM1027 and ADT7463 chips have an optional SMBALERT output that can be | 140 | The ADM1027, ADT7463 and ADT7468 chips have an optional SMBALERT output |
129 | used to signal the chipset in case a limit is exceeded or the temperature | 141 | that can be used to signal the chipset in case a limit is exceeded or the |
130 | sensors fail. Individual sensor interrupts can be masked so they won't | 142 | temperature sensors fail. Individual sensor interrupts can be masked so |
131 | trigger SMBALERT. The SMBALERT output if configured replaces one of the other | 143 | they won't trigger SMBALERT. The SMBALERT output if configured replaces one |
132 | functions (PWM2 or IN0). This functionality is not implemented in current | 144 | of the other functions (PWM2 or IN0). This functionality is not implemented |
133 | driver. | 145 | in current driver. |
134 | 146 | ||
135 | The ADT7463 also has an optional THERM output/input which can be connected | 147 | The ADT7463 and ADT7468 also have an optional THERM output/input which can |
136 | to the processor PROC_HOT output. If available, the autofan control | 148 | be connected to the processor PROC_HOT output. If available, the autofan |
137 | dynamic Tmin feature can be enabled to keep the system temperature within | 149 | control dynamic Tmin feature can be enabled to keep the system temperature |
138 | spec (just?!) with the least possible fan noise. | 150 | within spec (just?!) with the least possible fan noise. |
139 | 151 | ||
140 | Configuration Notes | 152 | Configuration Notes |
141 | ------------------- | 153 | ------------------- |
@@ -201,8 +213,8 @@ the temperatures to compensate for systemic errors in the | |||
201 | measurements. These features are not currently supported by the lm85 | 213 | measurements. These features are not currently supported by the lm85 |
202 | driver. | 214 | driver. |
203 | 215 | ||
204 | In addition to the ADM1027 features, the ADT7463 also has Tmin control | 216 | In addition to the ADM1027 features, the ADT7463 and ADT7468 also have |
205 | and THERM asserted counts. Automatic Tmin control acts to adjust the | 217 | Tmin control and THERM asserted counts. Automatic Tmin control acts to |
206 | Tmin value to maintain the measured temperature sensor at a specified | 218 | adjust the Tmin value to maintain the measured temperature sensor at a |
207 | temperature. There isn't much documentation on this feature in the | 219 | specified temperature. There isn't much documentation on this feature in |
208 | ADT7463 data sheet. This is not supported by current driver. | 220 | the ADT7463 data sheet. This is not supported by current driver. |
diff --git a/Documentation/hwmon/lm90 b/Documentation/hwmon/lm90 index 6a03dd4bcc94..fa475c0a48a3 100644 --- a/Documentation/hwmon/lm90 +++ b/Documentation/hwmon/lm90 | |||
@@ -63,8 +63,8 @@ Supported chips: | |||
63 | Datasheet: Publicly available at the Maxim website | 63 | Datasheet: Publicly available at the Maxim website |
64 | http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578 | 64 | http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578 |
65 | * Maxim MAX6659 | 65 | * Maxim MAX6659 |
66 | Prefix: 'max6657' | 66 | Prefix: 'max6659' |
67 | Addresses scanned: I2C 0x4c, 0x4d (unsupported 0x4e) | 67 | Addresses scanned: I2C 0x4c, 0x4d, 0x4e |
68 | Datasheet: Publicly available at the Maxim website | 68 | Datasheet: Publicly available at the Maxim website |
69 | http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578 | 69 | http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578 |
70 | * Maxim MAX6680 | 70 | * Maxim MAX6680 |
@@ -84,6 +84,21 @@ Supported chips: | |||
84 | Addresses scanned: I2C 0x4c | 84 | Addresses scanned: I2C 0x4c |
85 | Datasheet: Publicly available at the Maxim website | 85 | Datasheet: Publicly available at the Maxim website |
86 | http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3500 | 86 | http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3500 |
87 | * Maxim MAX6695 | ||
88 | Prefix: 'max6695' | ||
89 | Addresses scanned: I2C 0x18 | ||
90 | Datasheet: Publicly available at the Maxim website | ||
91 | http://www.maxim-ic.com/datasheet/index.mvp/id/4199 | ||
92 | * Maxim MAX6696 | ||
93 | Prefix: 'max6695' | ||
94 | Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, | ||
95 | 0x4c, 0x4d and 0x4e | ||
96 | Datasheet: Publicly available at the Maxim website | ||
97 | http://www.maxim-ic.com/datasheet/index.mvp/id/4199 | ||
98 | * Winbond/Nuvoton W83L771W/G | ||
99 | Prefix: 'w83l771' | ||
100 | Addresses scanned: I2C 0x4c | ||
101 | Datasheet: No longer available | ||
87 | * Winbond/Nuvoton W83L771AWG/ASG | 102 | * Winbond/Nuvoton W83L771AWG/ASG |
88 | Prefix: 'w83l771' | 103 | Prefix: 'w83l771' |
89 | Addresses scanned: I2C 0x4c | 104 | Addresses scanned: I2C 0x4c |
@@ -101,10 +116,11 @@ well as the temperature of up to one external diode. It is compatible | |||
101 | with many other devices, many of which are supported by this driver. | 116 | with many other devices, many of which are supported by this driver. |
102 | 117 | ||
103 | Note that there is no easy way to differentiate between the MAX6657, | 118 | Note that there is no easy way to differentiate between the MAX6657, |
104 | MAX6658 and MAX6659 variants. The extra address and features of the | 119 | MAX6658 and MAX6659 variants. The extra features of the MAX6659 are only |
105 | MAX6659 are not supported by this driver. The MAX6680 and MAX6681 only | 120 | supported by this driver if the chip is located at address 0x4d or 0x4e, |
106 | differ in their pinout, therefore they obviously can't (and don't need to) | 121 | or if the chip type is explicitly selected as max6659. |
107 | be distinguished. | 122 | The MAX6680 and MAX6681 only differ in their pinout, therefore they obviously |
123 | can't (and don't need to) be distinguished. | ||
108 | 124 | ||
109 | The specificity of this family of chipsets over the ADM1021/LM84 | 125 | The specificity of this family of chipsets over the ADM1021/LM84 |
110 | family is that it features critical limits with hysteresis, and an | 126 | family is that it features critical limits with hysteresis, and an |
@@ -151,11 +167,21 @@ MAX6680 and MAX6681: | |||
151 | * Selectable address | 167 | * Selectable address |
152 | * Remote sensor type selection | 168 | * Remote sensor type selection |
153 | 169 | ||
170 | MAX6695 and MAX6696: | ||
171 | * Better local resolution | ||
172 | * Selectable address (max6696) | ||
173 | * Second critical temperature limit | ||
174 | * Two remote sensors | ||
175 | |||
176 | W83L771W/G | ||
177 | * The G variant is lead-free, otherwise similar to the W. | ||
178 | * Filter and alert configuration register at 0xBF | ||
179 | * Moving average (depending on conversion rate) | ||
180 | |||
154 | W83L771AWG/ASG | 181 | W83L771AWG/ASG |
182 | * Successor of the W83L771W/G, same features. | ||
155 | * The AWG and ASG variants only differ in package format. | 183 | * The AWG and ASG variants only differ in package format. |
156 | * Filter and alert configuration register at 0xBF | ||
157 | * Diode ideality factor configuration (remote sensor) at 0xE3 | 184 | * Diode ideality factor configuration (remote sensor) at 0xE3 |
158 | * Moving average (depending on conversion rate) | ||
159 | 185 | ||
160 | All temperature values are given in degrees Celsius. Resolution | 186 | All temperature values are given in degrees Celsius. Resolution |
161 | is 1.0 degree for the local temperature, 0.125 degree for the remote | 187 | is 1.0 degree for the local temperature, 0.125 degree for the remote |
diff --git a/Documentation/hwmon/pcf8591 b/Documentation/hwmon/pcf8591 index e76a7892f68e..ac020b3bb7b3 100644 --- a/Documentation/hwmon/pcf8591 +++ b/Documentation/hwmon/pcf8591 | |||
@@ -4,7 +4,7 @@ Kernel driver pcf8591 | |||
4 | Supported chips: | 4 | Supported chips: |
5 | * Philips/NXP PCF8591 | 5 | * Philips/NXP PCF8591 |
6 | Prefix: 'pcf8591' | 6 | Prefix: 'pcf8591' |
7 | Addresses scanned: I2C 0x48 - 0x4f | 7 | Addresses scanned: none |
8 | Datasheet: Publicly available at the NXP website | 8 | Datasheet: Publicly available at the NXP website |
9 | http://www.nxp.com/pip/PCF8591_6.html | 9 | http://www.nxp.com/pip/PCF8591_6.html |
10 | 10 | ||
@@ -58,18 +58,16 @@ Module parameters | |||
58 | Accessing PCF8591 via /sys interface | 58 | Accessing PCF8591 via /sys interface |
59 | ------------------------------------- | 59 | ------------------------------------- |
60 | 60 | ||
61 | ! Be careful ! | 61 | The PCF8591 is plainly impossible to detect! Thus the driver won't even |
62 | The PCF8591 is plainly impossible to detect! Stupid chip. | 62 | try. You have to explicitly instantiate the device at the relevant |
63 | So every chip with address in the interval [0x48..0x4f] is | 63 | address (in the interval [0x48..0x4f]) either through platform data, or |
64 | detected as PCF8591. If you have other chips in this address | 64 | using the sysfs interface. See Documentation/i2c/instantiating-devices |
65 | range, the workaround is to load this module after the one | 65 | for details. |
66 | for your others chips. | ||
67 | 66 | ||
68 | On detection (i.e. insmod, modprobe et al.), directories are being | 67 | Directories are being created for each instantiated PCF8591: |
69 | created for each detected PCF8591: | ||
70 | 68 | ||
71 | /sys/bus/i2c/devices/<0>-<1>/ | 69 | /sys/bus/i2c/devices/<0>-<1>/ |
72 | where <0> is the bus the chip was detected on (e. g. i2c-0) | 70 | where <0> is the bus the chip is connected to (e. g. i2c-0) |
73 | and <1> the chip address ([48..4f]) | 71 | and <1> the chip address ([48..4f]) |
74 | 72 | ||
75 | Inside these directories, there are such files: | 73 | Inside these directories, there are such files: |
diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface index 48ceabedf55d..645699010551 100644 --- a/Documentation/hwmon/sysfs-interface +++ b/Documentation/hwmon/sysfs-interface | |||
@@ -309,6 +309,20 @@ temp[1-*]_crit_hyst | |||
309 | from the critical value. | 309 | from the critical value. |
310 | RW | 310 | RW |
311 | 311 | ||
312 | temp[1-*]_emergency | ||
313 | Temperature emergency max value, for chips supporting more than | ||
314 | two upper temperature limits. Must be equal or greater than | ||
315 | corresponding temp_crit values. | ||
316 | Unit: millidegree Celsius | ||
317 | RW | ||
318 | |||
319 | temp[1-*]_emergency_hyst | ||
320 | Temperature hysteresis value for emergency limit. | ||
321 | Unit: millidegree Celsius | ||
322 | Must be reported as an absolute temperature, NOT a delta | ||
323 | from the emergency value. | ||
324 | RW | ||
325 | |||
312 | temp[1-*]_lcrit Temperature critical min value, typically lower than | 326 | temp[1-*]_lcrit Temperature critical min value, typically lower than |
313 | corresponding temp_min values. | 327 | corresponding temp_min values. |
314 | Unit: millidegree Celsius | 328 | Unit: millidegree Celsius |
@@ -505,6 +519,7 @@ fan[1-*]_max_alarm | |||
505 | temp[1-*]_min_alarm | 519 | temp[1-*]_min_alarm |
506 | temp[1-*]_max_alarm | 520 | temp[1-*]_max_alarm |
507 | temp[1-*]_crit_alarm | 521 | temp[1-*]_crit_alarm |
522 | temp[1-*]_emergency_alarm | ||
508 | Limit alarm | 523 | Limit alarm |
509 | 0: no alarm | 524 | 0: no alarm |
510 | 1: alarm | 525 | 1: alarm |
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt index 33223ff121d8..63ffd78824d8 100644 --- a/Documentation/ioctl/ioctl-number.txt +++ b/Documentation/ioctl/ioctl-number.txt | |||
@@ -259,7 +259,7 @@ Code Seq#(hex) Include File Comments | |||
259 | 't' 00-7F linux/if_ppp.h | 259 | 't' 00-7F linux/if_ppp.h |
260 | 't' 80-8F linux/isdn_ppp.h | 260 | 't' 80-8F linux/isdn_ppp.h |
261 | 't' 90 linux/toshiba.h | 261 | 't' 90 linux/toshiba.h |
262 | 'u' 00-1F linux/smb_fs.h | 262 | 'u' 00-1F linux/smb_fs.h gone |
263 | 'v' all linux/videodev.h conflict! | 263 | 'v' all linux/videodev.h conflict! |
264 | 'v' 00-1F linux/ext2_fs.h conflict! | 264 | 'v' 00-1F linux/ext2_fs.h conflict! |
265 | 'v' 00-1F linux/fs.h conflict! | 265 | 'v' 00-1F linux/fs.h conflict! |
@@ -278,7 +278,6 @@ Code Seq#(hex) Include File Comments | |||
278 | <mailto:oe@port.de> | 278 | <mailto:oe@port.de> |
279 | 'z' 10-4F drivers/s390/crypto/zcrypt_api.h conflict! | 279 | 'z' 10-4F drivers/s390/crypto/zcrypt_api.h conflict! |
280 | 0x80 00-1F linux/fb.h | 280 | 0x80 00-1F linux/fb.h |
281 | 0x81 00-1F linux/videotext.h | ||
282 | 0x88 00-3F media/ovcamchip.h | 281 | 0x88 00-3F media/ovcamchip.h |
283 | 0x89 00-06 arch/x86/include/asm/sockios.h | 282 | 0x89 00-06 arch/x86/include/asm/sockios.h |
284 | 0x89 0B-DF linux/sockios.h | 283 | 0x89 0B-DF linux/sockios.h |
diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt index b472e4e0ba67..2fe93ca7c77c 100644 --- a/Documentation/kbuild/kconfig-language.txt +++ b/Documentation/kbuild/kconfig-language.txt | |||
@@ -322,7 +322,8 @@ mainmenu: | |||
322 | "mainmenu" <prompt> | 322 | "mainmenu" <prompt> |
323 | 323 | ||
324 | This sets the config program's title bar if the config program chooses | 324 | This sets the config program's title bar if the config program chooses |
325 | to use it. | 325 | to use it. It should be placed at the top of the configuration, before any |
326 | other statement. | ||
326 | 327 | ||
327 | 328 | ||
328 | Kconfig hints | 329 | Kconfig hints |
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index c787ae512120..0ef00bd6e54d 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt | |||
@@ -776,6 +776,13 @@ This will delete the directory debian, including all subdirectories. | |||
776 | Kbuild will assume the directories to be in the same relative path as the | 776 | Kbuild will assume the directories to be in the same relative path as the |
777 | Makefile if no absolute path is specified (path does not start with '/'). | 777 | Makefile if no absolute path is specified (path does not start with '/'). |
778 | 778 | ||
779 | To exclude certain files from make clean, use the $(no-clean-files) variable. | ||
780 | This is only a special case used in the top level Kbuild file: | ||
781 | |||
782 | Example: | ||
783 | #Kbuild | ||
784 | no-clean-files := $(bounds-file) $(offsets-file) | ||
785 | |||
779 | Usually kbuild descends down in subdirectories due to "obj-* := dir/", | 786 | Usually kbuild descends down in subdirectories due to "obj-* := dir/", |
780 | but in the architecture makefiles where the kbuild infrastructure | 787 | but in the architecture makefiles where the kbuild infrastructure |
781 | is not sufficient this sometimes needs to be explicit. | 788 | is not sufficient this sometimes needs to be explicit. |
diff --git a/Documentation/kbuild/modules.txt b/Documentation/kbuild/modules.txt index 0767cf69c69e..3fb39e0116b4 100644 --- a/Documentation/kbuild/modules.txt +++ b/Documentation/kbuild/modules.txt | |||
@@ -1,215 +1,185 @@ | |||
1 | Building External Modules | ||
1 | 2 | ||
2 | In this document you will find information about: | 3 | This document describes how to build an out-of-tree kernel module. |
3 | - how to build external modules | ||
4 | - how to make your module use the kbuild infrastructure | ||
5 | - how kbuild will install a kernel | ||
6 | - how to install modules in a non-standard location | ||
7 | 4 | ||
8 | === Table of Contents | 5 | === Table of Contents |
9 | 6 | ||
10 | === 1 Introduction | 7 | === 1 Introduction |
11 | === 2 How to build external modules | 8 | === 2 How to Build External Modules |
12 | --- 2.1 Building external modules | 9 | --- 2.1 Command Syntax |
13 | --- 2.2 Available targets | 10 | --- 2.2 Options |
14 | --- 2.3 Available options | 11 | --- 2.3 Targets |
15 | --- 2.4 Preparing the kernel tree for module build | 12 | --- 2.4 Building Separate Files |
16 | --- 2.5 Building separate files for a module | 13 | === 3. Creating a Kbuild File for an External Module |
17 | === 3. Example commands | 14 | --- 3.1 Shared Makefile |
18 | === 4. Creating a kbuild file for an external module | 15 | --- 3.2 Separate Kbuild file and Makefile |
19 | === 5. Include files | 16 | --- 3.3 Binary Blobs |
20 | --- 5.1 How to include files from the kernel include dir | 17 | --- 3.4 Building Multiple Modules |
21 | --- 5.2 External modules using an include/ dir | 18 | === 4. Include Files |
22 | --- 5.3 External modules using several directories | 19 | --- 4.1 Kernel Includes |
23 | === 6. Module installation | 20 | --- 4.2 Single Subdirectory |
24 | --- 6.1 INSTALL_MOD_PATH | 21 | --- 4.3 Several Subdirectories |
25 | --- 6.2 INSTALL_MOD_DIR | 22 | === 5. Module Installation |
26 | === 7. Module versioning & Module.symvers | 23 | --- 5.1 INSTALL_MOD_PATH |
27 | --- 7.1 Symbols from the kernel (vmlinux + modules) | 24 | --- 5.2 INSTALL_MOD_DIR |
28 | --- 7.2 Symbols and external modules | 25 | === 6. Module Versioning |
29 | --- 7.3 Symbols from another external module | 26 | --- 6.1 Symbols From the Kernel (vmlinux + modules) |
30 | === 8. Tips & Tricks | 27 | --- 6.2 Symbols and External Modules |
31 | --- 8.1 Testing for CONFIG_FOO_BAR | 28 | --- 6.3 Symbols From Another External Module |
29 | === 7. Tips & Tricks | ||
30 | --- 7.1 Testing for CONFIG_FOO_BAR | ||
32 | 31 | ||
33 | 32 | ||
34 | 33 | ||
35 | === 1. Introduction | 34 | === 1. Introduction |
36 | 35 | ||
37 | kbuild includes functionality for building modules both | 36 | "kbuild" is the build system used by the Linux kernel. Modules must use |
38 | within the kernel source tree and outside the kernel source tree. | 37 | kbuild to stay compatible with changes in the build infrastructure and |
39 | The latter is usually referred to as external or "out-of-tree" | 38 | to pick up the right flags to "gcc." Functionality for building modules |
40 | modules and is used both during development and for modules that | 39 | both in-tree and out-of-tree is provided. The method for building |
41 | are not planned to be included in the kernel tree. | 40 | either is similar, and all modules are initially developed and built |
41 | out-of-tree. | ||
42 | 42 | ||
43 | What is covered within this file is mainly information to authors | 43 | Covered in this document is information aimed at developers interested |
44 | of modules. The author of an external module should supply | 44 | in building out-of-tree (or "external") modules. The author of an |
45 | a makefile that hides most of the complexity, so one only has to type | 45 | external module should supply a makefile that hides most of the |
46 | 'make' to build the module. A complete example will be presented in | 46 | complexity, so one only has to type "make" to build the module. This is |
47 | chapter 4, "Creating a kbuild file for an external module". | 47 | easily accomplished, and a complete example will be presented in |
48 | section 3. | ||
48 | 49 | ||
49 | 50 | ||
50 | === 2. How to build external modules | 51 | === 2. How to Build External Modules |
51 | 52 | ||
52 | kbuild offers functionality to build external modules, with the | 53 | To build external modules, you must have a prebuilt kernel available |
53 | prerequisite that there is a pre-built kernel available with full source. | 54 | that contains the configuration and header files used in the build. |
54 | A subset of the targets available when building the kernel is available | 55 | Also, the kernel must have been built with modules enabled. If you are |
55 | when building an external module. | 56 | using a distribution kernel, there will be a package for the kernel you |
57 | are running provided by your distribution. | ||
56 | 58 | ||
57 | --- 2.1 Building external modules | 59 | An alternative is to use the "make" target "modules_prepare." This will |
60 | make sure the kernel contains the information required. The target | ||
61 | exists solely as a simple way to prepare a kernel source tree for | ||
62 | building external modules. | ||
58 | 63 | ||
59 | Use the following command to build an external module: | 64 | NOTE: "modules_prepare" will not build Module.symvers even if |
65 | CONFIG_MODVERSIONS is set; therefore, a full kernel build needs to be | ||
66 | executed to make module versioning work. | ||
60 | 67 | ||
61 | make -C <path-to-kernel> M=`pwd` | 68 | --- 2.1 Command Syntax |
62 | 69 | ||
63 | For the running kernel use: | 70 | The command to build an external module is: |
64 | 71 | ||
65 | make -C /lib/modules/`uname -r`/build M=`pwd` | 72 | $ make -C <path_to_kernel_src> M=$PWD |
66 | 73 | ||
67 | For the above command to succeed, the kernel must have been | 74 | The kbuild system knows that an external module is being built |
68 | built with modules enabled. | 75 | due to the "M=<dir>" option given in the command. |
69 | 76 | ||
70 | To install the modules that were just built: | 77 | To build against the running kernel use: |
71 | 78 | ||
72 | make -C <path-to-kernel> M=`pwd` modules_install | 79 | $ make -C /lib/modules/`uname -r`/build M=$PWD |
73 | 80 | ||
74 | More complex examples will be shown later, the above should | 81 | Then to install the module(s) just built, add the target |
75 | be enough to get you started. | 82 | "modules_install" to the command: |
76 | 83 | ||
77 | --- 2.2 Available targets | 84 | $ make -C /lib/modules/`uname -r`/build M=$PWD modules_install |
78 | 85 | ||
79 | $KDIR refers to the path to the kernel source top-level directory | 86 | --- 2.2 Options |
80 | 87 | ||
81 | make -C $KDIR M=`pwd` | 88 | ($KDIR refers to the path of the kernel source directory.) |
82 | Will build the module(s) located in current directory. | ||
83 | All output files will be located in the same directory | ||
84 | as the module source. | ||
85 | No attempts are made to update the kernel source, and it is | ||
86 | a precondition that a successful make has been executed | ||
87 | for the kernel. | ||
88 | 89 | ||
89 | make -C $KDIR M=`pwd` modules | 90 | make -C $KDIR M=$PWD |
90 | The modules target is implied when no target is given. | ||
91 | Same functionality as if no target was specified. | ||
92 | See description above. | ||
93 | 91 | ||
94 | make -C $KDIR M=`pwd` modules_install | 92 | -C $KDIR |
95 | Install the external module(s). | 93 | The directory where the kernel source is located. |
96 | Installation default is in /lib/modules/<kernel-version>/extra, | 94 | "make" will actually change to the specified directory |
97 | but may be prefixed with INSTALL_MOD_PATH - see separate | 95 | when executing and will change back when finished. |
98 | chapter. | ||
99 | 96 | ||
100 | make -C $KDIR M=`pwd` clean | 97 | M=$PWD |
101 | Remove all generated files for the module - the kernel | 98 | Informs kbuild that an external module is being built. |
102 | source directory is not modified. | 99 | The value given to "M" is the absolute path of the |
100 | directory where the external module (kbuild file) is | ||
101 | located. | ||
103 | 102 | ||
104 | make -C $KDIR M=`pwd` help | 103 | --- 2.3 Targets |
105 | help will list the available target when building external | ||
106 | modules. | ||
107 | 104 | ||
108 | --- 2.3 Available options: | 105 | When building an external module, only a subset of the "make" |
106 | targets are available. | ||
109 | 107 | ||
110 | $KDIR refers to the path to the kernel source top-level directory | 108 | make -C $KDIR M=$PWD [target] |
111 | 109 | ||
112 | make -C $KDIR | 110 | The default will build the module(s) located in the current |
113 | Used to specify where to find the kernel source. | 111 | directory, so a target does not need to be specified. All |
114 | '$KDIR' represent the directory where the kernel source is. | 112 | output files will also be generated in this directory. No |
115 | Make will actually change directory to the specified directory | 113 | attempts are made to update the kernel source, and it is a |
116 | when executed but change back when finished. | 114 | precondition that a successful "make" has been executed for the |
115 | kernel. | ||
117 | 116 | ||
118 | make -C $KDIR M=`pwd` | 117 | modules |
119 | M= is used to tell kbuild that an external module is | 118 | The default target for external modules. It has the |
120 | being built. | 119 | same functionality as if no target was specified. See |
121 | The option given to M= is the directory where the external | 120 | description above. |
122 | module (kbuild file) is located. | ||
123 | When an external module is being built only a subset of the | ||
124 | usual targets are available. | ||
125 | 121 | ||
126 | make -C $KDIR SUBDIRS=`pwd` | 122 | modules_install |
127 | Same as M=. The SUBDIRS= syntax is kept for backwards | 123 | Install the external module(s). The default location is |
128 | compatibility. | 124 | /lib/modules/<kernel_release>/extra/, but a prefix may |
125 | be added with INSTALL_MOD_PATH (discussed in section 5). | ||
129 | 126 | ||
130 | --- 2.4 Preparing the kernel tree for module build | 127 | clean |
128 | Remove all generated files in the module directory only. | ||
131 | 129 | ||
132 | To make sure the kernel contains the information required to | 130 | help |
133 | build external modules the target 'modules_prepare' must be used. | 131 | List the available targets for external modules. |
134 | 'modules_prepare' exists solely as a simple way to prepare | ||
135 | a kernel source tree for building external modules. | ||
136 | Note: modules_prepare will not build Module.symvers even if | ||
137 | CONFIG_MODVERSIONS is set. Therefore a full kernel build | ||
138 | needs to be executed to make module versioning work. | ||
139 | 132 | ||
140 | --- 2.5 Building separate files for a module | 133 | --- 2.4 Building Separate Files |
141 | It is possible to build single files which are part of a module. | ||
142 | This works equally well for the kernel, a module and even for | ||
143 | external modules. | ||
144 | Examples (module foo.ko, consist of bar.o, baz.o): | ||
145 | make -C $KDIR M=`pwd` bar.lst | ||
146 | make -C $KDIR M=`pwd` bar.o | ||
147 | make -C $KDIR M=`pwd` foo.ko | ||
148 | make -C $KDIR M=`pwd` / | ||
149 | |||
150 | |||
151 | === 3. Example commands | ||
152 | |||
153 | This example shows the actual commands to be executed when building | ||
154 | an external module for the currently running kernel. | ||
155 | In the example below, the distribution is supposed to use the | ||
156 | facility to locate output files for a kernel compile in a different | ||
157 | directory than the kernel source - but the examples will also work | ||
158 | when the source and the output files are mixed in the same directory. | ||
159 | 134 | ||
160 | # Kernel source | 135 | It is possible to build single files that are part of a module. |
161 | /lib/modules/<kernel-version>/source -> /usr/src/linux-<version> | 136 | This works equally well for the kernel, a module, and even for |
162 | 137 | external modules. | |
163 | # Output from kernel compile | ||
164 | /lib/modules/<kernel-version>/build -> /usr/src/linux-<version>-up | ||
165 | |||
166 | Change to the directory where the kbuild file is located and execute | ||
167 | the following commands to build the module: | ||
168 | 138 | ||
169 | cd /home/user/src/module | 139 | Example (The module foo.ko, consist of bar.o and baz.o): |
170 | make -C /usr/src/`uname -r`/source \ | 140 | make -C $KDIR M=$PWD bar.lst |
171 | O=/lib/modules/`uname-r`/build \ | 141 | make -C $KDIR M=$PWD baz.o |
172 | M=`pwd` | 142 | make -C $KDIR M=$PWD foo.ko |
143 | make -C $KDIR M=$PWD / | ||
173 | 144 | ||
174 | Then, to install the module use the following command: | ||
175 | 145 | ||
176 | make -C /usr/src/`uname -r`/source \ | 146 | === 3. Creating a Kbuild File for an External Module |
177 | O=/lib/modules/`uname-r`/build \ | ||
178 | M=`pwd` \ | ||
179 | modules_install | ||
180 | 147 | ||
181 | If you look closely you will see that this is the same command as | 148 | In the last section we saw the command to build a module for the |
182 | listed before - with the directories spelled out. | 149 | running kernel. The module is not actually built, however, because a |
150 | build file is required. Contained in this file will be the name of | ||
151 | the module(s) being built, along with the list of requisite source | ||
152 | files. The file may be as simple as a single line: | ||
183 | 153 | ||
184 | The above are rather long commands, and the following chapter | 154 | obj-m := <module_name>.o |
185 | lists a few tricks to make it all easier. | ||
186 | 155 | ||
156 | The kbuild system will build <module_name>.o from <module_name>.c, | ||
157 | and, after linking, will result in the kernel module <module_name>.ko. | ||
158 | The above line can be put in either a "Kbuild" file or a "Makefile." | ||
159 | When the module is built from multiple sources, an additional line is | ||
160 | needed listing the files: | ||
187 | 161 | ||
188 | === 4. Creating a kbuild file for an external module | 162 | <module_name>-y := <src1>.o <src2>.o ... |
189 | 163 | ||
190 | kbuild is the build system for the kernel, and external modules | 164 | NOTE: Further documentation describing the syntax used by kbuild is |
191 | must use kbuild to stay compatible with changes in the build system | 165 | located in Documentation/kbuild/makefiles.txt. |
192 | and to pick up the right flags to gcc etc. | ||
193 | 166 | ||
194 | The kbuild file used as input shall follow the syntax described | 167 | The examples below demonstrate how to create a build file for the |
195 | in Documentation/kbuild/makefiles.txt. This chapter will introduce a few | 168 | module 8123.ko, which is built from the following files: |
196 | more tricks to be used when dealing with external modules. | ||
197 | 169 | ||
198 | In the following a Makefile will be created for a module with the | ||
199 | following files: | ||
200 | 8123_if.c | 170 | 8123_if.c |
201 | 8123_if.h | 171 | 8123_if.h |
202 | 8123_pci.c | 172 | 8123_pci.c |
203 | 8123_bin.o_shipped <= Binary blob | 173 | 8123_bin.o_shipped <= Binary blob |
204 | 174 | ||
205 | --- 4.1 Shared Makefile for module and kernel | 175 | --- 3.1 Shared Makefile |
206 | 176 | ||
207 | An external module always includes a wrapper Makefile supporting | 177 | An external module always includes a wrapper makefile that |
208 | building the module using 'make' with no arguments. | 178 | supports building the module using "make" with no arguments. |
209 | The Makefile provided will most likely include additional | 179 | This target is not used by kbuild; it is only for convenience. |
210 | functionality such as test targets etc. and this part shall | 180 | Additional functionality, such as test targets, can be included |
211 | be filtered away from kbuild since it may impact kbuild if | 181 | but should be filtered out from kbuild due to possible name |
212 | name clashes occurs. | 182 | clashes. |
213 | 183 | ||
214 | Example 1: | 184 | Example 1: |
215 | --> filename: Makefile | 185 | --> filename: Makefile |
@@ -219,11 +189,11 @@ following files: | |||
219 | 8123-y := 8123_if.o 8123_pci.o 8123_bin.o | 189 | 8123-y := 8123_if.o 8123_pci.o 8123_bin.o |
220 | 190 | ||
221 | else | 191 | else |
222 | # Normal Makefile | 192 | # normal makefile |
193 | KDIR ?= /lib/modules/`uname -r`/build | ||
223 | 194 | ||
224 | KERNELDIR := /lib/modules/`uname -r`/build | 195 | default: |
225 | all:: | 196 | $(MAKE) -C $(KDIR) M=$$PWD |
226 | $(MAKE) -C $(KERNELDIR) M=`pwd` $@ | ||
227 | 197 | ||
228 | # Module specific targets | 198 | # Module specific targets |
229 | genbin: | 199 | genbin: |
@@ -231,15 +201,20 @@ following files: | |||
231 | 201 | ||
232 | endif | 202 | endif |
233 | 203 | ||
234 | In example 1, the check for KERNELRELEASE is used to separate | 204 | The check for KERNELRELEASE is used to separate the two parts |
235 | the two parts of the Makefile. kbuild will only see the two | 205 | of the makefile. In the example, kbuild will only see the two |
236 | assignments whereas make will see everything except the two | 206 | assignments, whereas "make" will see everything except these |
237 | kbuild assignments. | 207 | two assignments. This is due to two passes made on the file: |
208 | the first pass is by the "make" instance run on the command | ||
209 | line; the second pass is by the kbuild system, which is | ||
210 | initiated by the parameterized "make" in the default target. | ||
211 | |||
212 | --- 3.2 Separate Kbuild File and Makefile | ||
238 | 213 | ||
239 | In recent versions of the kernel, kbuild will look for a file named | 214 | In newer versions of the kernel, kbuild will first look for a |
240 | Kbuild and as second option look for a file named Makefile. | 215 | file named "Kbuild," and only if that is not found, will it |
241 | Utilising the Kbuild file makes us split up the Makefile in example 1 | 216 | then look for a makefile. Utilizing a "Kbuild" file allows us |
242 | into two files as shown in example 2: | 217 | to split up the makefile from example 1 into two files: |
243 | 218 | ||
244 | Example 2: | 219 | Example 2: |
245 | --> filename: Kbuild | 220 | --> filename: Kbuild |
@@ -247,20 +222,21 @@ following files: | |||
247 | 8123-y := 8123_if.o 8123_pci.o 8123_bin.o | 222 | 8123-y := 8123_if.o 8123_pci.o 8123_bin.o |
248 | 223 | ||
249 | --> filename: Makefile | 224 | --> filename: Makefile |
250 | KERNELDIR := /lib/modules/`uname -r`/build | 225 | KDIR ?= /lib/modules/`uname -r`/build |
251 | all:: | 226 | |
252 | $(MAKE) -C $(KERNELDIR) M=`pwd` $@ | 227 | default: |
228 | $(MAKE) -C $(KDIR) M=$$PWD | ||
253 | 229 | ||
254 | # Module specific targets | 230 | # Module specific targets |
255 | genbin: | 231 | genbin: |
256 | echo "X" > 8123_bin.o_shipped | 232 | echo "X" > 8123_bin.o_shipped |
257 | 233 | ||
234 | The split in example 2 is questionable due to the simplicity of | ||
235 | each file; however, some external modules use makefiles | ||
236 | consisting of several hundred lines, and here it really pays | ||
237 | off to separate the kbuild part from the rest. | ||
258 | 238 | ||
259 | In example 2, we are down to two fairly simple files and for simple | 239 | The next example shows a backward compatible version. |
260 | files as used in this example the split is questionable. But some | ||
261 | external modules use Makefiles of several hundred lines and here it | ||
262 | really pays off to separate the kbuild part from the rest. | ||
263 | Example 3 shows a backward compatible version. | ||
264 | 240 | ||
265 | Example 3: | 241 | Example 3: |
266 | --> filename: Kbuild | 242 | --> filename: Kbuild |
@@ -269,13 +245,15 @@ following files: | |||
269 | 245 | ||
270 | --> filename: Makefile | 246 | --> filename: Makefile |
271 | ifneq ($(KERNELRELEASE),) | 247 | ifneq ($(KERNELRELEASE),) |
248 | # kbuild part of makefile | ||
272 | include Kbuild | 249 | include Kbuild |
250 | |||
273 | else | 251 | else |
274 | # Normal Makefile | 252 | # normal makefile |
253 | KDIR ?= /lib/modules/`uname -r`/build | ||
275 | 254 | ||
276 | KERNELDIR := /lib/modules/`uname -r`/build | 255 | default: |
277 | all:: | 256 | $(MAKE) -C $(KDIR) M=$$PWD |
278 | $(MAKE) -C $(KERNELDIR) M=`pwd` $@ | ||
279 | 257 | ||
280 | # Module specific targets | 258 | # Module specific targets |
281 | genbin: | 259 | genbin: |
@@ -283,260 +261,271 @@ following files: | |||
283 | 261 | ||
284 | endif | 262 | endif |
285 | 263 | ||
286 | The trick here is to include the Kbuild file from Makefile, so | 264 | Here the "Kbuild" file is included from the makefile. This |
287 | if an older version of kbuild picks up the Makefile, the Kbuild | 265 | allows an older version of kbuild, which only knows of |
288 | file will be included. | 266 | makefiles, to be used when the "make" and kbuild parts are |
267 | split into separate files. | ||
289 | 268 | ||
290 | --- 4.2 Binary blobs included in a module | 269 | --- 3.3 Binary Blobs |
291 | 270 | ||
292 | Some external modules needs to include a .o as a blob. kbuild | 271 | Some external modules need to include an object file as a blob. |
293 | has support for this, but requires the blob file to be named | 272 | kbuild has support for this, but requires the blob file to be |
294 | <filename>_shipped. In our example the blob is named | 273 | named <filename>_shipped. When the kbuild rules kick in, a copy |
295 | 8123_bin.o_shipped and when the kbuild rules kick in the file | 274 | of <filename>_shipped is created with _shipped stripped off, |
296 | 8123_bin.o is created as a simple copy off the 8213_bin.o_shipped file | 275 | giving us <filename>. This shortened filename can be used in |
297 | with the _shipped part stripped of the filename. | 276 | the assignment to the module. |
298 | This allows the 8123_bin.o filename to be used in the assignment to | 277 | |
299 | the module. | 278 | Throughout this section, 8123_bin.o_shipped has been used to |
279 | build the kernel module 8123.ko; it has been included as | ||
280 | 8123_bin.o. | ||
300 | 281 | ||
301 | Example 4: | ||
302 | obj-m := 8123.o | ||
303 | 8123-y := 8123_if.o 8123_pci.o 8123_bin.o | 282 | 8123-y := 8123_if.o 8123_pci.o 8123_bin.o |
304 | 283 | ||
305 | In example 4, there is no distinction between the ordinary .c/.h files | 284 | Although there is no distinction between the ordinary source |
306 | and the binary file. But kbuild will pick up different rules to create | 285 | files and the binary file, kbuild will pick up different rules |
307 | the .o file. | 286 | when creating the object file for the module. |
287 | |||
288 | --- 3.4 Building Multiple Modules | ||
308 | 289 | ||
290 | kbuild supports building multiple modules with a single build | ||
291 | file. For example, if you wanted to build two modules, foo.ko | ||
292 | and bar.ko, the kbuild lines would be: | ||
309 | 293 | ||
310 | === 5. Include files | 294 | obj-m := foo.o bar.o |
295 | foo-y := <foo_srcs> | ||
296 | bar-y := <bar_srcs> | ||
311 | 297 | ||
312 | Include files are a necessity when a .c file uses something from other .c | 298 | It is that simple! |
313 | files (not strictly in the sense of C, but if good programming practice is | ||
314 | used). Any module that consists of more than one .c file will have a .h file | ||
315 | for one of the .c files. | ||
316 | 299 | ||
317 | - If the .h file only describes a module internal interface, then the .h file | ||
318 | shall be placed in the same directory as the .c files. | ||
319 | - If the .h files describe an interface used by other parts of the kernel | ||
320 | located in different directories, the .h files shall be located in | ||
321 | include/linux/ or other include/ directories as appropriate. | ||
322 | 300 | ||
323 | One exception for this rule is larger subsystems that have their own directory | 301 | === 4. Include Files |
324 | under include/ such as include/scsi. Another exception is arch-specific | ||
325 | .h files which are located under include/asm-$(ARCH)/*. | ||
326 | 302 | ||
327 | External modules have a tendency to locate include files in a separate include/ | 303 | Within the kernel, header files are kept in standard locations |
328 | directory and therefore need to deal with this in their kbuild file. | 304 | according to the following rule: |
329 | 305 | ||
330 | --- 5.1 How to include files from the kernel include dir | 306 | * If the header file only describes the internal interface of a |
307 | module, then the file is placed in the same directory as the | ||
308 | source files. | ||
309 | * If the header file describes an interface used by other parts | ||
310 | of the kernel that are located in different directories, then | ||
311 | the file is placed in include/linux/. | ||
331 | 312 | ||
332 | When a module needs to include a file from include/linux/, then one | 313 | NOTE: There are two notable exceptions to this rule: larger |
333 | just uses: | 314 | subsystems have their own directory under include/, such as |
315 | include/scsi; and architecture specific headers are located | ||
316 | under arch/$(ARCH)/include/. | ||
334 | 317 | ||
335 | #include <linux/modules.h> | 318 | --- 4.1 Kernel Includes |
336 | 319 | ||
337 | kbuild will make sure to add options to gcc so the relevant | 320 | To include a header file located under include/linux/, simply |
338 | directories are searched. | 321 | use: |
339 | Likewise for .h files placed in the same directory as the .c file. | ||
340 | 322 | ||
341 | #include "8123_if.h" | 323 | #include <linux/module.h> |
342 | 324 | ||
343 | will do the job. | 325 | kbuild will add options to "gcc" so the relevant directories |
326 | are searched. | ||
344 | 327 | ||
345 | --- 5.2 External modules using an include/ dir | 328 | --- 4.2 Single Subdirectory |
346 | 329 | ||
347 | External modules often locate their .h files in a separate include/ | 330 | External modules tend to place header files in a separate |
348 | directory although this is not usual kernel style. When an external | 331 | include/ directory where their source is located, although this |
349 | module uses an include/ dir then kbuild needs to be told so. | 332 | is not the usual kernel style. To inform kbuild of the |
350 | The trick here is to use either EXTRA_CFLAGS (take effect for all .c | 333 | directory, use either ccflags-y or CFLAGS_<filename>.o. |
351 | files) or CFLAGS_$F.o (take effect only for a single file). | ||
352 | 334 | ||
353 | In our example, if we move 8123_if.h to a subdirectory named include/ | 335 | Using the example from section 3, if we moved 8123_if.h to a |
354 | the resulting Kbuild file would look like: | 336 | subdirectory named include, the resulting kbuild file would |
337 | look like: | ||
355 | 338 | ||
356 | --> filename: Kbuild | 339 | --> filename: Kbuild |
357 | obj-m := 8123.o | 340 | obj-m := 8123.o |
358 | 341 | ||
359 | EXTRA_CFLAGS := -Iinclude | 342 | ccflags-y := -Iinclude |
360 | 8123-y := 8123_if.o 8123_pci.o 8123_bin.o | 343 | 8123-y := 8123_if.o 8123_pci.o 8123_bin.o |
361 | 344 | ||
362 | Note that in the assignment there is no space between -I and the path. | 345 | Note that in the assignment there is no space between -I and |
363 | This is a kbuild limitation: there must be no space present. | 346 | the path. This is a limitation of kbuild: there must be no |
347 | space present. | ||
364 | 348 | ||
365 | --- 5.3 External modules using several directories | 349 | --- 4.3 Several Subdirectories |
366 | |||
367 | If an external module does not follow the usual kernel style, but | ||
368 | decides to spread files over several directories, then kbuild can | ||
369 | handle this too. | ||
370 | 350 | ||
351 | kbuild can handle files that are spread over several directories. | ||
371 | Consider the following example: | 352 | Consider the following example: |
372 | 353 | ||
373 | | | 354 | . |
374 | +- src/complex_main.c | 355 | |__ src |
375 | | +- hal/hardwareif.c | 356 | | |__ complex_main.c |
376 | | +- hal/include/hardwareif.h | 357 | | |__ hal |
377 | +- include/complex.h | 358 | | |__ hardwareif.c |
378 | 359 | | |__ include | |
379 | To build a single module named complex.ko, we then need the following | 360 | | |__ hardwareif.h |
361 | |__ include | ||
362 | |__ complex.h | ||
363 | |||
364 | To build the module complex.ko, we then need the following | ||
380 | kbuild file: | 365 | kbuild file: |
381 | 366 | ||
382 | Kbuild: | 367 | --> filename: Kbuild |
383 | obj-m := complex.o | 368 | obj-m := complex.o |
384 | complex-y := src/complex_main.o | 369 | complex-y := src/complex_main.o |
385 | complex-y += src/hal/hardwareif.o | 370 | complex-y += src/hal/hardwareif.o |
386 | 371 | ||
387 | EXTRA_CFLAGS := -I$(src)/include | 372 | ccflags-y := -I$(src)/include |
388 | EXTRA_CFLAGS += -I$(src)src/hal/include | 373 | ccflags-y += -I$(src)/src/hal/include |
389 | 374 | ||
375 | As you can see, kbuild knows how to handle object files located | ||
376 | in other directories. The trick is to specify the directory | ||
377 | relative to the kbuild file's location. That being said, this | ||
378 | is NOT recommended practice. | ||
390 | 379 | ||
391 | kbuild knows how to handle .o files located in another directory - | 380 | For the header files, kbuild must be explicitly told where to |
392 | although this is NOT recommended practice. The syntax is to specify | 381 | look. When kbuild executes, the current directory is always the |
393 | the directory relative to the directory where the Kbuild file is | 382 | root of the kernel tree (the argument to "-C") and therefore an |
394 | located. | 383 | absolute path is needed. $(src) provides the absolute path by |
384 | pointing to the directory where the currently executing kbuild | ||
385 | file is located. | ||
395 | 386 | ||
396 | To find the .h files, we have to explicitly tell kbuild where to look | ||
397 | for the .h files. When kbuild executes, the current directory is always | ||
398 | the root of the kernel tree (argument to -C) and therefore we have to | ||
399 | tell kbuild how to find the .h files using absolute paths. | ||
400 | $(src) will specify the absolute path to the directory where the | ||
401 | Kbuild file are located when being build as an external module. | ||
402 | Therefore -I$(src)/ is used to point out the directory of the Kbuild | ||
403 | file and any additional path are just appended. | ||
404 | 387 | ||
405 | === 6. Module installation | 388 | === 5. Module Installation |
406 | 389 | ||
407 | Modules which are included in the kernel are installed in the directory: | 390 | Modules which are included in the kernel are installed in the |
391 | directory: | ||
408 | 392 | ||
409 | /lib/modules/$(KERNELRELEASE)/kernel | 393 | /lib/modules/$(KERNELRELEASE)/kernel/ |
410 | 394 | ||
411 | External modules are installed in the directory: | 395 | And external modules are installed in: |
412 | 396 | ||
413 | /lib/modules/$(KERNELRELEASE)/extra | 397 | /lib/modules/$(KERNELRELEASE)/extra/ |
414 | 398 | ||
415 | --- 6.1 INSTALL_MOD_PATH | 399 | --- 5.1 INSTALL_MOD_PATH |
416 | 400 | ||
417 | Above are the default directories, but as always, some level of | 401 | Above are the default directories but as always some level of |
418 | customization is possible. One can prefix the path using the variable | 402 | customization is possible. A prefix can be added to the |
419 | INSTALL_MOD_PATH: | 403 | installation path using the variable INSTALL_MOD_PATH: |
420 | 404 | ||
421 | $ make INSTALL_MOD_PATH=/frodo modules_install | 405 | $ make INSTALL_MOD_PATH=/frodo modules_install |
422 | => Install dir: /frodo/lib/modules/$(KERNELRELEASE)/kernel | 406 | => Install dir: /frodo/lib/modules/$(KERNELRELEASE)/kernel/ |
423 | |||
424 | INSTALL_MOD_PATH may be set as an ordinary shell variable or as in the | ||
425 | example above, can be specified on the command line when calling make. | ||
426 | INSTALL_MOD_PATH has effect both when installing modules included in | ||
427 | the kernel as well as when installing external modules. | ||
428 | 407 | ||
429 | --- 6.2 INSTALL_MOD_DIR | 408 | INSTALL_MOD_PATH may be set as an ordinary shell variable or, |
409 | as shown above, can be specified on the command line when | ||
410 | calling "make." This has effect when installing both in-tree | ||
411 | and out-of-tree modules. | ||
430 | 412 | ||
431 | When installing external modules they are by default installed to a | 413 | --- 5.2 INSTALL_MOD_DIR |
432 | directory under /lib/modules/$(KERNELRELEASE)/extra, but one may wish | ||
433 | to locate modules for a specific functionality in a separate | ||
434 | directory. For this purpose, one can use INSTALL_MOD_DIR to specify an | ||
435 | alternative name to 'extra'. | ||
436 | 414 | ||
437 | $ make INSTALL_MOD_DIR=gandalf -C KERNELDIR \ | 415 | External modules are by default installed to a directory under |
438 | M=`pwd` modules_install | 416 | /lib/modules/$(KERNELRELEASE)/extra/, but you may wish to |
439 | => Install dir: /lib/modules/$(KERNELRELEASE)/gandalf | 417 | locate modules for a specific functionality in a separate |
418 | directory. For this purpose, use INSTALL_MOD_DIR to specify an | ||
419 | alternative name to "extra." | ||
440 | 420 | ||
421 | $ make INSTALL_MOD_DIR=gandalf -C $KDIR \ | ||
422 | M=$PWD modules_install | ||
423 | => Install dir: /lib/modules/$(KERNELRELEASE)/gandalf/ | ||
441 | 424 | ||
442 | === 7. Module versioning & Module.symvers | ||
443 | 425 | ||
444 | Module versioning is enabled by the CONFIG_MODVERSIONS tag. | 426 | === 6. Module Versioning |
445 | 427 | ||
446 | Module versioning is used as a simple ABI consistency check. The Module | 428 | Module versioning is enabled by the CONFIG_MODVERSIONS tag, and is used |
447 | versioning creates a CRC value of the full prototype for an exported symbol and | 429 | as a simple ABI consistency check. A CRC value of the full prototype |
448 | when a module is loaded/used then the CRC values contained in the kernel are | 430 | for an exported symbol is created. When a module is loaded/used, the |
449 | compared with similar values in the module. If they are not equal, then the | 431 | CRC values contained in the kernel are compared with similar values in |
450 | kernel refuses to load the module. | 432 | the module; if they are not equal, the kernel refuses to load the |
433 | module. | ||
451 | 434 | ||
452 | Module.symvers contains a list of all exported symbols from a kernel build. | 435 | Module.symvers contains a list of all exported symbols from a kernel |
436 | build. | ||
453 | 437 | ||
454 | --- 7.1 Symbols from the kernel (vmlinux + modules) | 438 | --- 6.1 Symbols From the Kernel (vmlinux + modules) |
455 | 439 | ||
456 | During a kernel build, a file named Module.symvers will be generated. | 440 | During a kernel build, a file named Module.symvers will be |
457 | Module.symvers contains all exported symbols from the kernel and | 441 | generated. Module.symvers contains all exported symbols from |
458 | compiled modules. For each symbols, the corresponding CRC value | 442 | the kernel and compiled modules. For each symbol, the |
459 | is stored too. | 443 | corresponding CRC value is also stored. |
460 | 444 | ||
461 | The syntax of the Module.symvers file is: | 445 | The syntax of the Module.symvers file is: |
462 | <CRC> <Symbol> <module> | 446 | <CRC> <Symbol> <module> |
463 | Sample: | 447 | |
464 | 0x2d036834 scsi_remove_host drivers/scsi/scsi_mod | 448 | 0x2d036834 scsi_remove_host drivers/scsi/scsi_mod |
465 | 449 | ||
466 | For a kernel build without CONFIG_MODVERSIONS enabled, the crc | 450 | For a kernel build without CONFIG_MODVERSIONS enabled, the CRC |
467 | would read: 0x00000000 | 451 | would read 0x00000000. |
468 | 452 | ||
469 | Module.symvers serves two purposes: | 453 | Module.symvers serves two purposes: |
470 | 1) It lists all exported symbols both from vmlinux and all modules | 454 | 1) It lists all exported symbols from vmlinux and all modules. |
471 | 2) It lists the CRC if CONFIG_MODVERSIONS is enabled | 455 | 2) It lists the CRC if CONFIG_MODVERSIONS is enabled. |
472 | 456 | ||
473 | --- 7.2 Symbols and external modules | 457 | --- 6.2 Symbols and External Modules |
474 | 458 | ||
475 | When building an external module, the build system needs access to | 459 | When building an external module, the build system needs access |
476 | the symbols from the kernel to check if all external symbols are | 460 | to the symbols from the kernel to check if all external symbols |
477 | defined. This is done in the MODPOST step and to obtain all | 461 | are defined. This is done in the MODPOST step. modpost obtains |
478 | symbols, modpost reads Module.symvers from the kernel. | 462 | the symbols by reading Module.symvers from the kernel source |
479 | If a Module.symvers file is present in the directory where | 463 | tree. If a Module.symvers file is present in the directory |
480 | the external module is being built, this file will be read too. | 464 | where the external module is being built, this file will be |
481 | During the MODPOST step, a new Module.symvers file will be written | 465 | read too. During the MODPOST step, a new Module.symvers file |
482 | containing all exported symbols that were not defined in the kernel. | 466 | will be written containing all exported symbols that were not |
483 | 467 | defined in the kernel. | |
484 | --- 7.3 Symbols from another external module | 468 | |
485 | 469 | --- 6.3 Symbols From Another External Module | |
486 | Sometimes, an external module uses exported symbols from another | 470 | |
487 | external module. Kbuild needs to have full knowledge on all symbols | 471 | Sometimes, an external module uses exported symbols from |
488 | to avoid spitting out warnings about undefined symbols. | 472 | another external module. kbuild needs to have full knowledge of |
489 | Three solutions exist to let kbuild know all symbols of more than | 473 | all symbols to avoid spitting out warnings about undefined |
490 | one external module. | 474 | symbols. Three solutions exist for this situation. |
491 | The method with a top-level kbuild file is recommended but may be | 475 | |
492 | impractical in certain situations. | 476 | NOTE: The method with a top-level kbuild file is recommended |
493 | 477 | but may be impractical in certain situations. | |
494 | Use a top-level Kbuild file | 478 | |
495 | If you have two modules: 'foo' and 'bar', and 'foo' needs | 479 | Use a top-level kbuild file |
496 | symbols from 'bar', then one can use a common top-level kbuild | 480 | If you have two modules, foo.ko and bar.ko, where |
497 | file so both modules are compiled in same build. | 481 | foo.ko needs symbols from bar.ko, you can use a |
498 | 482 | common top-level kbuild file so both modules are | |
499 | Consider following directory layout: | 483 | compiled in the same build. Consider the following |
500 | ./foo/ <= contains the foo module | 484 | directory layout: |
501 | ./bar/ <= contains the bar module | 485 | |
502 | The top-level Kbuild file would then look like: | 486 | ./foo/ <= contains foo.ko |
503 | 487 | ./bar/ <= contains bar.ko | |
504 | #./Kbuild: (this file may also be named Makefile) | 488 | |
489 | The top-level kbuild file would then look like: | ||
490 | |||
491 | #./Kbuild (or ./Makefile): | ||
505 | obj-y := foo/ bar/ | 492 | obj-y := foo/ bar/ |
506 | 493 | ||
507 | Executing: | 494 | And executing |
508 | make -C $KDIR M=`pwd` | 495 | |
496 | $ make -C $KDIR M=$PWD | ||
509 | 497 | ||
510 | will then do the expected and compile both modules with full | 498 | will then do the expected and compile both modules with |
511 | knowledge on symbols from both modules. | 499 | full knowledge of symbols from either module. |
512 | 500 | ||
513 | Use an extra Module.symvers file | 501 | Use an extra Module.symvers file |
514 | When an external module is built, a Module.symvers file is | 502 | When an external module is built, a Module.symvers file |
515 | generated containing all exported symbols which are not | 503 | is generated containing all exported symbols which are |
516 | defined in the kernel. | 504 | not defined in the kernel. To get access to symbols |
517 | To get access to symbols from module 'bar', one can copy the | 505 | from bar.ko, copy the Module.symvers file from the |
518 | Module.symvers file from the compilation of the 'bar' module | 506 | compilation of bar.ko to the directory where foo.ko is |
519 | to the directory where the 'foo' module is built. | 507 | built. During the module build, kbuild will read the |
520 | During the module build, kbuild will read the Module.symvers | 508 | Module.symvers file in the directory of the external |
521 | file in the directory of the external module and when the | 509 | module, and when the build is finished, a new |
522 | build is finished, a new Module.symvers file is created | 510 | Module.symvers file is created containing the sum of |
523 | containing the sum of all symbols defined and not part of the | 511 | all symbols defined and not part of the kernel. |
524 | kernel. | 512 | |
525 | 513 | Use "make" variable KBUILD_EXTRA_SYMBOLS | |
526 | Use make variable KBUILD_EXTRA_SYMBOLS in the Makefile | 514 | If it is impractical to copy Module.symvers from |
527 | If it is impractical to copy Module.symvers from another | 515 | another module, you can assign a space separated list |
528 | module, you can assign a space separated list of files to | 516 | of files to KBUILD_EXTRA_SYMBOLS in your build file. |
529 | KBUILD_EXTRA_SYMBOLS in your Makfile. These files will be | 517 | These files will be loaded by modpost during the |
530 | loaded by modpost during the initialisation of its symbol | 518 | initialization of its symbol tables. |
531 | tables. | 519 | |
532 | 520 | ||
533 | === 8. Tips & Tricks | 521 | === 7. Tips & Tricks |
534 | 522 | ||
535 | --- 8.1 Testing for CONFIG_FOO_BAR | 523 | --- 7.1 Testing for CONFIG_FOO_BAR |
536 | 524 | ||
537 | Modules often need to check for certain CONFIG_ options to decide if | 525 | Modules often need to check for certain CONFIG_ options to |
538 | a specific feature shall be included in the module. When kbuild is used | 526 | decide if a specific feature is included in the module. In |
539 | this is done by referencing the CONFIG_ variable directly. | 527 | kbuild this is done by referencing the CONFIG_ variable |
528 | directly. | ||
540 | 529 | ||
541 | #fs/ext2/Makefile | 530 | #fs/ext2/Makefile |
542 | obj-$(CONFIG_EXT2_FS) += ext2.o | 531 | obj-$(CONFIG_EXT2_FS) += ext2.o |
@@ -544,9 +533,9 @@ Module.symvers contains a list of all exported symbols from a kernel build. | |||
544 | ext2-y := balloc.o bitmap.o dir.o | 533 | ext2-y := balloc.o bitmap.o dir.o |
545 | ext2-$(CONFIG_EXT2_FS_XATTR) += xattr.o | 534 | ext2-$(CONFIG_EXT2_FS_XATTR) += xattr.o |
546 | 535 | ||
547 | External modules have traditionally used grep to check for specific | 536 | External modules have traditionally used "grep" to check for |
548 | CONFIG_ settings directly in .config. This usage is broken. | 537 | specific CONFIG_ settings directly in .config. This usage is |
549 | As introduced before, external modules shall use kbuild when building | 538 | broken. As introduced before, external modules should use |
550 | and therefore can use the same methods as in-kernel modules when | 539 | kbuild for building and can therefore use the same methods as |
551 | testing for CONFIG_ definitions. | 540 | in-tree modules when testing for CONFIG_ definitions. |
552 | 541 | ||
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 4bc2f3c3da5b..ed45e9802aa8 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -2175,6 +2175,11 @@ and is between 256 and 4096 characters. It is defined in the file | |||
2175 | reset_devices [KNL] Force drivers to reset the underlying device | 2175 | reset_devices [KNL] Force drivers to reset the underlying device |
2176 | during initialization. | 2176 | during initialization. |
2177 | 2177 | ||
2178 | resource_alloc_from_bottom | ||
2179 | Allocate new resources from the beginning of available | ||
2180 | space, not the end. If you need to use this, please | ||
2181 | report a bug. | ||
2182 | |||
2178 | resume= [SWSUSP] | 2183 | resume= [SWSUSP] |
2179 | Specify the partition device for software suspend | 2184 | Specify the partition device for software suspend |
2180 | 2185 | ||
diff --git a/Documentation/networking/phy.txt b/Documentation/networking/phy.txt index 88bb71b46da4..9eb1ba52013d 100644 --- a/Documentation/networking/phy.txt +++ b/Documentation/networking/phy.txt | |||
@@ -177,18 +177,6 @@ Doing it all yourself | |||
177 | 177 | ||
178 | A convenience function to print out the PHY status neatly. | 178 | A convenience function to print out the PHY status neatly. |
179 | 179 | ||
180 | int phy_clear_interrupt(struct phy_device *phydev); | ||
181 | int phy_config_interrupt(struct phy_device *phydev, u32 interrupts); | ||
182 | |||
183 | Clear the PHY's interrupt, and configure which ones are allowed, | ||
184 | respectively. Currently only supports all on, or all off. | ||
185 | |||
186 | int phy_enable_interrupts(struct phy_device *phydev); | ||
187 | int phy_disable_interrupts(struct phy_device *phydev); | ||
188 | |||
189 | Functions which enable/disable PHY interrupts, clearing them | ||
190 | before and after, respectively. | ||
191 | |||
192 | int phy_start_interrupts(struct phy_device *phydev); | 180 | int phy_start_interrupts(struct phy_device *phydev); |
193 | int phy_stop_interrupts(struct phy_device *phydev); | 181 | int phy_stop_interrupts(struct phy_device *phydev); |
194 | 182 | ||
@@ -213,12 +201,6 @@ Doing it all yourself | |||
213 | Fills the phydev structure with up-to-date information about the current | 201 | Fills the phydev structure with up-to-date information about the current |
214 | settings in the PHY. | 202 | settings in the PHY. |
215 | 203 | ||
216 | void phy_sanitize_settings(struct phy_device *phydev) | ||
217 | |||
218 | Resolves differences between currently desired settings, and | ||
219 | supported settings for the given PHY device. Does not make | ||
220 | the changes in the hardware, though. | ||
221 | |||
222 | int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd); | 204 | int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd); |
223 | int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd); | 205 | int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd); |
224 | 206 | ||
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index b606c2c4dd37..30289fab86eb 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt | |||
@@ -80,8 +80,10 @@ dirty_background_bytes | |||
80 | Contains the amount of dirty memory at which the pdflush background writeback | 80 | Contains the amount of dirty memory at which the pdflush background writeback |
81 | daemon will start writeback. | 81 | daemon will start writeback. |
82 | 82 | ||
83 | If dirty_background_bytes is written, dirty_background_ratio becomes a function | 83 | Note: dirty_background_bytes is the counterpart of dirty_background_ratio. Only |
84 | of its value (dirty_background_bytes / the amount of dirtyable system memory). | 84 | one of them may be specified at a time. When one sysctl is written it is |
85 | immediately taken into account to evaluate the dirty memory limits and the | ||
86 | other appears as 0 when read. | ||
85 | 87 | ||
86 | ============================================================== | 88 | ============================================================== |
87 | 89 | ||
@@ -97,8 +99,10 @@ dirty_bytes | |||
97 | Contains the amount of dirty memory at which a process generating disk writes | 99 | Contains the amount of dirty memory at which a process generating disk writes |
98 | will itself start writeback. | 100 | will itself start writeback. |
99 | 101 | ||
100 | If dirty_bytes is written, dirty_ratio becomes a function of its value | 102 | Note: dirty_bytes is the counterpart of dirty_ratio. Only one of them may be |
101 | (dirty_bytes / the amount of dirtyable system memory). | 103 | specified at a time. When one sysctl is written it is immediately taken into |
104 | account to evaluate the dirty memory limits and the other appears as 0 when | ||
105 | read. | ||
102 | 106 | ||
103 | Note: the minimum value allowed for dirty_bytes is two pages (in bytes); any | 107 | Note: the minimum value allowed for dirty_bytes is two pages (in bytes); any |
104 | value lower than this limit will be ignored and the old configuration will be | 108 | value lower than this limit will be ignored and the old configuration will be |
diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88 index f2510541373b..42517d9121de 100644 --- a/Documentation/video4linux/CARDLIST.cx88 +++ b/Documentation/video4linux/CARDLIST.cx88 | |||
@@ -83,3 +83,4 @@ | |||
83 | 82 -> WinFast DTV2000 H rev. J [107d:6f2b] | 83 | 82 -> WinFast DTV2000 H rev. J [107d:6f2b] |
84 | 83 -> Prof 7301 DVB-S/S2 [b034:3034] | 84 | 83 -> Prof 7301 DVB-S/S2 [b034:3034] |
85 | 84 -> Samsung SMT 7020 DVB-S [18ac:dc00,18ac:dccd] | 85 | 84 -> Samsung SMT 7020 DVB-S [18ac:dc00,18ac:dccd] |
86 | 85 -> Twinhan VP-1027 DVB-S [1822:0023] | ||
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx index 5c568757c301..ac2616a62fc3 100644 --- a/Documentation/video4linux/CARDLIST.em28xx +++ b/Documentation/video4linux/CARDLIST.em28xx | |||
@@ -31,6 +31,7 @@ | |||
31 | 30 -> Videology 20K14XUSB USB2.0 (em2820/em2840) | 31 | 30 -> Videology 20K14XUSB USB2.0 (em2820/em2840) |
32 | 31 -> Usbgear VD204v9 (em2821) | 32 | 31 -> Usbgear VD204v9 (em2821) |
33 | 32 -> Supercomp USB 2.0 TV (em2821) | 33 | 32 -> Supercomp USB 2.0 TV (em2821) |
34 | 33 -> Elgato Video Capture (em2860) [0fd9:0033] | ||
34 | 34 -> Terratec Cinergy A Hybrid XS (em2860) [0ccd:004f] | 35 | 34 -> Terratec Cinergy A Hybrid XS (em2860) [0ccd:004f] |
35 | 35 -> Typhoon DVD Maker (em2860) | 36 | 35 -> Typhoon DVD Maker (em2860) |
36 | 36 -> NetGMBH Cam (em2860) | 37 | 36 -> NetGMBH Cam (em2860) |
@@ -45,7 +46,7 @@ | |||
45 | 45 -> Pinnacle PCTV DVB-T (em2870) | 46 | 45 -> Pinnacle PCTV DVB-T (em2870) |
46 | 46 -> Compro, VideoMate U3 (em2870) [185b:2870] | 47 | 46 -> Compro, VideoMate U3 (em2870) [185b:2870] |
47 | 47 -> KWorld DVB-T 305U (em2880) [eb1a:e305] | 48 | 47 -> KWorld DVB-T 305U (em2880) [eb1a:e305] |
48 | 48 -> KWorld DVB-T 310U (em2880) [eb1a:e310] | 49 | 48 -> KWorld DVB-T 310U (em2880) |
49 | 49 -> MSI DigiVox A/D (em2880) [eb1a:e310] | 50 | 49 -> MSI DigiVox A/D (em2880) [eb1a:e310] |
50 | 50 -> MSI DigiVox A/D II (em2880) [eb1a:e320] | 51 | 50 -> MSI DigiVox A/D II (em2880) [eb1a:e320] |
51 | 51 -> Terratec Hybrid XS Secam (em2880) [0ccd:004c] | 52 | 51 -> Terratec Hybrid XS Secam (em2880) [0ccd:004c] |
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134 index 4000c29fcfb6..8d9afc7d8014 100644 --- a/Documentation/video4linux/CARDLIST.saa7134 +++ b/Documentation/video4linux/CARDLIST.saa7134 | |||
@@ -126,7 +126,7 @@ | |||
126 | 125 -> Beholder BeholdTV 409 [0000:4090] | 126 | 125 -> Beholder BeholdTV 409 [0000:4090] |
127 | 126 -> Beholder BeholdTV 505 FM [5ace:5050] | 127 | 126 -> Beholder BeholdTV 505 FM [5ace:5050] |
128 | 127 -> Beholder BeholdTV 507 FM / BeholdTV 509 FM [5ace:5070,5ace:5090] | 128 | 127 -> Beholder BeholdTV 507 FM / BeholdTV 509 FM [5ace:5070,5ace:5090] |
129 | 128 -> Beholder BeholdTV Columbus TVFM [0000:5201] | 129 | 128 -> Beholder BeholdTV Columbus TV/FM [0000:5201] |
130 | 129 -> Beholder BeholdTV 607 FM [5ace:6070] | 130 | 129 -> Beholder BeholdTV 607 FM [5ace:6070] |
131 | 130 -> Beholder BeholdTV M6 [5ace:6190] | 131 | 130 -> Beholder BeholdTV M6 [5ace:6190] |
132 | 131 -> Twinhan Hybrid DTV-DVB 3056 PCI [1822:0022] | 132 | 131 -> Twinhan Hybrid DTV-DVB 3056 PCI [1822:0022] |
diff --git a/Documentation/video4linux/bttv/MAKEDEV b/Documentation/video4linux/bttv/MAKEDEV index 9d112f7fd5f7..093c0cd18042 100644 --- a/Documentation/video4linux/bttv/MAKEDEV +++ b/Documentation/video4linux/bttv/MAKEDEV | |||
@@ -19,7 +19,6 @@ function makedev () { | |||
19 | echo "*** new device names ***" | 19 | echo "*** new device names ***" |
20 | makedev video 0 | 20 | makedev video 0 |
21 | makedev radio 64 | 21 | makedev radio 64 |
22 | makedev vtx 192 | ||
23 | makedev vbi 224 | 22 | makedev vbi 224 |
24 | 23 | ||
25 | #echo "*** old device names (for compatibility only) ***" | 24 | #echo "*** old device names (for compatibility only) ***" |
diff --git a/Documentation/video4linux/gspca.txt b/Documentation/video4linux/gspca.txt index 56ba7bba7168..6a562eeeb4cd 100644 --- a/Documentation/video4linux/gspca.txt +++ b/Documentation/video4linux/gspca.txt | |||
@@ -302,12 +302,14 @@ sonixj 0c45:60fb Surfer NoName | |||
302 | sonixj 0c45:60fc LG-LIC300 | 302 | sonixj 0c45:60fc LG-LIC300 |
303 | sonixj 0c45:60fe Microdia Audio | 303 | sonixj 0c45:60fe Microdia Audio |
304 | sonixj 0c45:6100 PC Camera (SN9C128) | 304 | sonixj 0c45:6100 PC Camera (SN9C128) |
305 | sonixj 0c45:6102 PC Camera (SN9C128) | ||
305 | sonixj 0c45:610a PC Camera (SN9C128) | 306 | sonixj 0c45:610a PC Camera (SN9C128) |
306 | sonixj 0c45:610b PC Camera (SN9C128) | 307 | sonixj 0c45:610b PC Camera (SN9C128) |
307 | sonixj 0c45:610c PC Camera (SN9C128) | 308 | sonixj 0c45:610c PC Camera (SN9C128) |
308 | sonixj 0c45:610e PC Camera (SN9C128) | 309 | sonixj 0c45:610e PC Camera (SN9C128) |
309 | sonixj 0c45:6128 Microdia/Sonix SNP325 | 310 | sonixj 0c45:6128 Microdia/Sonix SNP325 |
310 | sonixj 0c45:612a Avant Camera | 311 | sonixj 0c45:612a Avant Camera |
312 | sonixj 0c45:612b Speed-Link REFLECT2 | ||
311 | sonixj 0c45:612c Typhoon Rasy Cam 1.3MPix | 313 | sonixj 0c45:612c Typhoon Rasy Cam 1.3MPix |
312 | sonixj 0c45:6130 Sonix Pccam | 314 | sonixj 0c45:6130 Sonix Pccam |
313 | sonixj 0c45:6138 Sn9c120 Mo4000 | 315 | sonixj 0c45:6138 Sn9c120 Mo4000 |
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt index e831aaca66f8..f22f35c271f3 100644 --- a/Documentation/video4linux/v4l2-framework.txt +++ b/Documentation/video4linux/v4l2-framework.txt | |||
@@ -44,8 +44,8 @@ All drivers have the following structure: | |||
44 | 44 | ||
45 | 2) A way of initializing and commanding sub-devices (if any). | 45 | 2) A way of initializing and commanding sub-devices (if any). |
46 | 46 | ||
47 | 3) Creating V4L2 device nodes (/dev/videoX, /dev/vbiX, /dev/radioX and | 47 | 3) Creating V4L2 device nodes (/dev/videoX, /dev/vbiX and /dev/radioX) |
48 | /dev/vtxX) and keeping track of device-node specific data. | 48 | and keeping track of device-node specific data. |
49 | 49 | ||
50 | 4) Filehandle-specific structs containing per-filehandle data; | 50 | 4) Filehandle-specific structs containing per-filehandle data; |
51 | 51 | ||
@@ -192,6 +192,11 @@ You also need a way to go from the low-level struct to v4l2_subdev. For the | |||
192 | common i2c_client struct the i2c_set_clientdata() call is used to store a | 192 | common i2c_client struct the i2c_set_clientdata() call is used to store a |
193 | v4l2_subdev pointer, for other busses you may have to use other methods. | 193 | v4l2_subdev pointer, for other busses you may have to use other methods. |
194 | 194 | ||
195 | Bridges might also need to store per-subdev private data, such as a pointer to | ||
196 | bridge-specific per-subdev private data. The v4l2_subdev structure provides | ||
197 | host private data for that purpose that can be accessed with | ||
198 | v4l2_get_subdev_hostdata() and v4l2_set_subdev_hostdata(). | ||
199 | |||
195 | From the bridge driver perspective you load the sub-device module and somehow | 200 | From the bridge driver perspective you load the sub-device module and somehow |
196 | obtain the v4l2_subdev pointer. For i2c devices this is easy: you call | 201 | obtain the v4l2_subdev pointer. For i2c devices this is easy: you call |
197 | i2c_get_clientdata(). For other busses something similar needs to be done. | 202 | i2c_get_clientdata(). For other busses something similar needs to be done. |
@@ -448,6 +453,10 @@ You should also set these fields: | |||
448 | - ioctl_ops: if you use the v4l2_ioctl_ops to simplify ioctl maintenance | 453 | - ioctl_ops: if you use the v4l2_ioctl_ops to simplify ioctl maintenance |
449 | (highly recommended to use this and it might become compulsory in the | 454 | (highly recommended to use this and it might become compulsory in the |
450 | future!), then set this to your v4l2_ioctl_ops struct. | 455 | future!), then set this to your v4l2_ioctl_ops struct. |
456 | - lock: leave to NULL if you want to do all the locking in the driver. | ||
457 | Otherwise you give it a pointer to a struct mutex_lock and before any | ||
458 | of the v4l2_file_operations is called this lock will be taken by the | ||
459 | core and released afterwards. | ||
451 | - parent: you only set this if v4l2_device was registered with NULL as | 460 | - parent: you only set this if v4l2_device was registered with NULL as |
452 | the parent device struct. This only happens in cases where one hardware | 461 | the parent device struct. This only happens in cases where one hardware |
453 | device has multiple PCI devices that all share the same v4l2_device core. | 462 | device has multiple PCI devices that all share the same v4l2_device core. |
@@ -464,6 +473,22 @@ If you use v4l2_ioctl_ops, then you should set either .unlocked_ioctl or | |||
464 | The v4l2_file_operations struct is a subset of file_operations. The main | 473 | The v4l2_file_operations struct is a subset of file_operations. The main |
465 | difference is that the inode argument is omitted since it is never used. | 474 | difference is that the inode argument is omitted since it is never used. |
466 | 475 | ||
476 | v4l2_file_operations and locking | ||
477 | -------------------------------- | ||
478 | |||
479 | You can set a pointer to a mutex_lock in struct video_device. Usually this | ||
480 | will be either a top-level mutex or a mutex per device node. If you want | ||
481 | finer-grained locking then you have to set it to NULL and do you own locking. | ||
482 | |||
483 | If a lock is specified then all file operations will be serialized on that | ||
484 | lock. If you use videobuf then you must pass the same lock to the videobuf | ||
485 | queue initialize function: if videobuf has to wait for a frame to arrive, then | ||
486 | it will temporarily unlock the lock and relock it afterwards. If your driver | ||
487 | also waits in the code, then you should do the same to allow other processes | ||
488 | to access the device node while the first process is waiting for something. | ||
489 | |||
490 | The implementation of a hotplug disconnect should also take the lock before | ||
491 | calling v4l2_device_disconnect. | ||
467 | 492 | ||
468 | video_device registration | 493 | video_device registration |
469 | ------------------------- | 494 | ------------------------- |
@@ -483,7 +508,6 @@ types exist: | |||
483 | VFL_TYPE_GRABBER: videoX for video input/output devices | 508 | VFL_TYPE_GRABBER: videoX for video input/output devices |
484 | VFL_TYPE_VBI: vbiX for vertical blank data (i.e. closed captions, teletext) | 509 | VFL_TYPE_VBI: vbiX for vertical blank data (i.e. closed captions, teletext) |
485 | VFL_TYPE_RADIO: radioX for radio tuners | 510 | VFL_TYPE_RADIO: radioX for radio tuners |
486 | VFL_TYPE_VTX: vtxX for teletext devices (deprecated, don't use) | ||
487 | 511 | ||
488 | The last argument gives you a certain amount of control over the device | 512 | The last argument gives you a certain amount of control over the device |
489 | device node number used (i.e. the X in videoX). Normally you will pass -1 | 513 | device node number used (i.e. the X in videoX). Normally you will pass -1 |
@@ -547,9 +571,8 @@ from /dev). | |||
547 | 571 | ||
548 | After video_unregister_device() returns no new opens can be done. However, | 572 | After video_unregister_device() returns no new opens can be done. However, |
549 | in the case of USB devices some application might still have one of these | 573 | in the case of USB devices some application might still have one of these |
550 | device nodes open. So after the unregister all file operations will return | 574 | device nodes open. So after the unregister all file operations (except |
551 | an error as well, except for the ioctl and unlocked_ioctl file operations: | 575 | release, of course) will return an error as well. |
552 | those will still be passed on since some buffer ioctls may still be needed. | ||
553 | 576 | ||
554 | When the last user of the video device node exits, then the vdev->release() | 577 | When the last user of the video device node exits, then the vdev->release() |
555 | callback is called and you can do the final cleanup there. | 578 | callback is called and you can do the final cleanup there. |