diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-06 12:48:31 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-06 12:48:31 -0400 |
commit | c87985a3ce723995fc7b25e598238d67154108a1 (patch) | |
tree | e60def1b77c25c1d74180f62e8a5603f9826f209 /Documentation | |
parent | d155255a344c417acad74156654295a2964e6b81 (diff) | |
parent | 0d7614f09c1ebdbaa1599a5aba7593f147bf96ee (diff) |
Merge tty-next into 3.6-rc1
This handles the merge issue in:
arch/um/drivers/line.c
arch/um/drivers/line.h
And resolves the duplicate patches that were in both trees do to the
tty-next branch not getting merged into 3.6-rc1.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation')
231 files changed, 6099 insertions, 1049 deletions
diff --git a/Documentation/ABI/obsolete/proc-sys-vm-nr_pdflush_threads b/Documentation/ABI/obsolete/proc-sys-vm-nr_pdflush_threads new file mode 100644 index 000000000000..b0b0eeb20fe3 --- /dev/null +++ b/Documentation/ABI/obsolete/proc-sys-vm-nr_pdflush_threads | |||
@@ -0,0 +1,5 @@ | |||
1 | What: /proc/sys/vm/nr_pdflush_threads | ||
2 | Date: June 2012 | ||
3 | Contact: Wanpeng Li <liwp@linux.vnet.ibm.com> | ||
4 | Description: Since pdflush is replaced by per-BDI flusher, the interface of old pdflush | ||
5 | exported in /proc/sys/vm/ should be removed. | ||
diff --git a/Documentation/ABI/stable/sysfs-bus-firewire b/Documentation/ABI/stable/sysfs-bus-firewire index 3d484e5dc846..41e5a0cd1e3e 100644 --- a/Documentation/ABI/stable/sysfs-bus-firewire +++ b/Documentation/ABI/stable/sysfs-bus-firewire | |||
@@ -39,6 +39,17 @@ Users: udev rules to set ownership and access permissions or ACLs of | |||
39 | /dev/fw[0-9]+ character device files | 39 | /dev/fw[0-9]+ character device files |
40 | 40 | ||
41 | 41 | ||
42 | What: /sys/bus/firewire/devices/fw[0-9]+/is_local | ||
43 | Date: July 2012 | ||
44 | KernelVersion: 3.6 | ||
45 | Contact: linux1394-devel@lists.sourceforge.net | ||
46 | Description: | ||
47 | IEEE 1394 node device attribute. | ||
48 | Read-only and immutable. | ||
49 | Values: 1: The sysfs entry represents a local node (a controller card). | ||
50 | 0: The sysfs entry represents a remote node. | ||
51 | |||
52 | |||
42 | What: /sys/bus/firewire/devices/fw[0-9]+[.][0-9]+/ | 53 | What: /sys/bus/firewire/devices/fw[0-9]+[.][0-9]+/ |
43 | Date: May 2007 | 54 | Date: May 2007 |
44 | KernelVersion: 2.6.22 | 55 | KernelVersion: 2.6.22 |
diff --git a/Documentation/ABI/stable/sysfs-driver-w1_ds28e04 b/Documentation/ABI/stable/sysfs-driver-w1_ds28e04 new file mode 100644 index 000000000000..26579ee868c9 --- /dev/null +++ b/Documentation/ABI/stable/sysfs-driver-w1_ds28e04 | |||
@@ -0,0 +1,15 @@ | |||
1 | What: /sys/bus/w1/devices/.../pio | ||
2 | Date: May 2012 | ||
3 | Contact: Markus Franke <franm@hrz.tu-chemnitz.de> | ||
4 | Description: read/write the contents of the two PIO's of the DS28E04-100 | ||
5 | see Documentation/w1/slaves/w1_ds28e04 for detailed information | ||
6 | Users: any user space application which wants to communicate with DS28E04-100 | ||
7 | |||
8 | |||
9 | |||
10 | What: /sys/bus/w1/devices/.../eeprom | ||
11 | Date: May 2012 | ||
12 | Contact: Markus Franke <franm@hrz.tu-chemnitz.de> | ||
13 | Description: read/write the contents of the EEPROM memory of the DS28E04-100 | ||
14 | see Documentation/w1/slaves/w1_ds28e04 for detailed information | ||
15 | Users: any user space application which wants to communicate with DS28E04-100 | ||
diff --git a/Documentation/ABI/stable/vdso b/Documentation/ABI/stable/vdso index 8a1cbb594497..7cdfc28cc2c6 100644 --- a/Documentation/ABI/stable/vdso +++ b/Documentation/ABI/stable/vdso | |||
@@ -24,4 +24,4 @@ though. | |||
24 | 24 | ||
25 | (As of this writing, this ABI documentation as been confirmed for x86_64. | 25 | (As of this writing, this ABI documentation as been confirmed for x86_64. |
26 | The maintainers of the other vDSO-using architectures should confirm | 26 | The maintainers of the other vDSO-using architectures should confirm |
27 | that it is correct for their architecture.) \ No newline at end of file | 27 | that it is correct for their architecture.) |
diff --git a/Documentation/ABI/testing/dev-kmsg b/Documentation/ABI/testing/dev-kmsg index 281ecc5f9709..7e7e07a82e0e 100644 --- a/Documentation/ABI/testing/dev-kmsg +++ b/Documentation/ABI/testing/dev-kmsg | |||
@@ -58,16 +58,18 @@ Description: The /dev/kmsg character device node provides userspace access | |||
58 | 58 | ||
59 | The output format consists of a prefix carrying the syslog | 59 | The output format consists of a prefix carrying the syslog |
60 | prefix including priority and facility, the 64 bit message | 60 | prefix including priority and facility, the 64 bit message |
61 | sequence number and the monotonic timestamp in microseconds. | 61 | sequence number and the monotonic timestamp in microseconds, |
62 | The values are separated by a ','. Future extensions might | 62 | and a flag field. All fields are separated by a ','. |
63 | add more comma separated values before the terminating ';'. | 63 | |
64 | Unknown values should be gracefully ignored. | 64 | Future extensions might add more comma separated values before |
65 | the terminating ';'. Unknown fields and values should be | ||
66 | gracefully ignored. | ||
65 | 67 | ||
66 | The human readable text string starts directly after the ';' | 68 | The human readable text string starts directly after the ';' |
67 | and is terminated by a '\n'. Untrusted values derived from | 69 | and is terminated by a '\n'. Untrusted values derived from |
68 | hardware or other facilities are printed, therefore | 70 | hardware or other facilities are printed, therefore |
69 | all non-printable characters in the log message are escaped | 71 | all non-printable characters and '\' itself in the log message |
70 | by "\x00" C-style hex encoding. | 72 | are escaped by "\x00" C-style hex encoding. |
71 | 73 | ||
72 | A line starting with ' ', is a continuation line, adding | 74 | A line starting with ' ', is a continuation line, adding |
73 | key/value pairs to the log message, which provide the machine | 75 | key/value pairs to the log message, which provide the machine |
@@ -75,11 +77,11 @@ Description: The /dev/kmsg character device node provides userspace access | |||
75 | userspace. | 77 | userspace. |
76 | 78 | ||
77 | Example: | 79 | Example: |
78 | 7,160,424069;pci_root PNP0A03:00: host bridge window [io 0x0000-0x0cf7] (ignored) | 80 | 7,160,424069,-;pci_root PNP0A03:00: host bridge window [io 0x0000-0x0cf7] (ignored) |
79 | SUBSYSTEM=acpi | 81 | SUBSYSTEM=acpi |
80 | DEVICE=+acpi:PNP0A03:00 | 82 | DEVICE=+acpi:PNP0A03:00 |
81 | 6,339,5140900;NET: Registered protocol family 10 | 83 | 6,339,5140900,-;NET: Registered protocol family 10 |
82 | 30,340,5690716;udevd[80]: starting version 181 | 84 | 30,340,5690716,-;udevd[80]: starting version 181 |
83 | 85 | ||
84 | The DEVICE= key uniquely identifies devices the following way: | 86 | The DEVICE= key uniquely identifies devices the following way: |
85 | b12:8 - block dev_t | 87 | b12:8 - block dev_t |
@@ -87,4 +89,13 @@ Description: The /dev/kmsg character device node provides userspace access | |||
87 | n8 - netdev ifindex | 89 | n8 - netdev ifindex |
88 | +sound:card0 - subsystem:devname | 90 | +sound:card0 - subsystem:devname |
89 | 91 | ||
92 | The flags field carries '-' by default. A 'c' indicates a | ||
93 | fragment of a line. All following fragments are flagged with | ||
94 | '+'. Note, that these hints about continuation lines are not | ||
95 | neccessarily correct, and the stream could be interleaved with | ||
96 | unrelated messages, but merging the lines in the output | ||
97 | usually produces better human readable results. A similar | ||
98 | logic is used internally when messages are printed to the | ||
99 | console, /proc/kmsg or the syslog() syscall. | ||
100 | |||
90 | Users: dmesg(1), userspace kernel log consumers | 101 | Users: dmesg(1), userspace kernel log consumers |
diff --git a/Documentation/ABI/testing/sysfs-block-zram b/Documentation/ABI/testing/sysfs-block-zram index c8b3b48ec62c..ec93fe33baa6 100644 --- a/Documentation/ABI/testing/sysfs-block-zram +++ b/Documentation/ABI/testing/sysfs-block-zram | |||
@@ -96,4 +96,4 @@ Description: | |||
96 | overhead, allocated for this disk. So, allocator space | 96 | overhead, allocated for this disk. So, allocator space |
97 | efficiency can be calculated using compr_data_size and this | 97 | efficiency can be calculated using compr_data_size and this |
98 | statistic. | 98 | statistic. |
99 | Unit: bytes \ No newline at end of file | 99 | Unit: bytes |
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio index cfedf63cce15..2f06d40fe07d 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio | |||
@@ -40,9 +40,9 @@ Contact: linux-iio@vger.kernel.org | |||
40 | Description: | 40 | Description: |
41 | Some devices have internal clocks. This parameter sets the | 41 | Some devices have internal clocks. This parameter sets the |
42 | resulting sampling frequency. In many devices this | 42 | resulting sampling frequency. In many devices this |
43 | parameter has an effect on input filters etc rather than | 43 | parameter has an effect on input filters etc. rather than |
44 | simply controlling when the input is sampled. As this | 44 | simply controlling when the input is sampled. As this |
45 | effects datardy triggers, hardware buffers and the sysfs | 45 | effects data ready triggers, hardware buffers and the sysfs |
46 | direct access interfaces, it may be found in any of the | 46 | direct access interfaces, it may be found in any of the |
47 | relevant directories. If it effects all of the above | 47 | relevant directories. If it effects all of the above |
48 | then it is to be found in the base device directory. | 48 | then it is to be found in the base device directory. |
@@ -74,7 +74,7 @@ What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_supply_raw | |||
74 | KernelVersion: 2.6.35 | 74 | KernelVersion: 2.6.35 |
75 | Contact: linux-iio@vger.kernel.org | 75 | Contact: linux-iio@vger.kernel.org |
76 | Description: | 76 | Description: |
77 | Raw (unscaled no bias removal etc) voltage measurement from | 77 | Raw (unscaled no bias removal etc.) voltage measurement from |
78 | channel Y. In special cases where the channel does not | 78 | channel Y. In special cases where the channel does not |
79 | correspond to externally available input one of the named | 79 | correspond to externally available input one of the named |
80 | versions may be used. The number must always be specified and | 80 | versions may be used. The number must always be specified and |
@@ -118,11 +118,11 @@ What: /sys/bus/iio/devices/iio:deviceX/in_temp_z_raw | |||
118 | KernelVersion: 2.6.35 | 118 | KernelVersion: 2.6.35 |
119 | Contact: linux-iio@vger.kernel.org | 119 | Contact: linux-iio@vger.kernel.org |
120 | Description: | 120 | Description: |
121 | Raw (unscaled no bias removal etc) temperature measurement. | 121 | Raw (unscaled no bias removal etc.) temperature measurement. |
122 | If an axis is specified it generally means that the temperature | 122 | If an axis is specified it generally means that the temperature |
123 | sensor is associated with one part of a compound device (e.g. | 123 | sensor is associated with one part of a compound device (e.g. |
124 | a gyroscope axis). Units after application of scale and offset | 124 | a gyroscope axis). Units after application of scale and offset |
125 | are milli degrees Celsuis. | 125 | are milli degrees Celsius. |
126 | 126 | ||
127 | What: /sys/bus/iio/devices/iio:deviceX/in_tempX_input | 127 | What: /sys/bus/iio/devices/iio:deviceX/in_tempX_input |
128 | KernelVersion: 2.6.38 | 128 | KernelVersion: 2.6.38 |
@@ -148,10 +148,9 @@ KernelVersion: 2.6.35 | |||
148 | Contact: linux-iio@vger.kernel.org | 148 | Contact: linux-iio@vger.kernel.org |
149 | Description: | 149 | Description: |
150 | Angular velocity about axis x, y or z (may be arbitrarily | 150 | Angular velocity about axis x, y or z (may be arbitrarily |
151 | assigned) Data converted by application of offset then scale to | 151 | assigned). Has all the equivalent parameters as per voltageY. |
152 | radians per second. Has all the equivalent parameters as | 152 | Units after application of scale and offset are radians per |
153 | per voltageY. Units after application of scale and offset are | 153 | second. |
154 | radians per second. | ||
155 | 154 | ||
156 | What: /sys/bus/iio/devices/iio:deviceX/in_incli_x_raw | 155 | What: /sys/bus/iio/devices/iio:deviceX/in_incli_x_raw |
157 | What: /sys/bus/iio/devices/iio:deviceX/in_incli_y_raw | 156 | What: /sys/bus/iio/devices/iio:deviceX/in_incli_y_raw |
@@ -161,7 +160,7 @@ Contact: linux-iio@vger.kernel.org | |||
161 | Description: | 160 | Description: |
162 | Inclination raw reading about axis x, y or z (may be | 161 | Inclination raw reading about axis x, y or z (may be |
163 | arbitrarily assigned). Data converted by application of offset | 162 | arbitrarily assigned). Data converted by application of offset |
164 | and scale to Degrees. | 163 | and scale to degrees. |
165 | 164 | ||
166 | What: /sys/bus/iio/devices/iio:deviceX/in_magn_x_raw | 165 | What: /sys/bus/iio/devices/iio:deviceX/in_magn_x_raw |
167 | What: /sys/bus/iio/devices/iio:deviceX/in_magn_y_raw | 166 | What: /sys/bus/iio/devices/iio:deviceX/in_magn_y_raw |
@@ -203,7 +202,7 @@ Contact: linux-iio@vger.kernel.org | |||
203 | Description: | 202 | Description: |
204 | If known for a device, offset to be added to <type>[Y]_raw prior | 203 | If known for a device, offset to be added to <type>[Y]_raw prior |
205 | to scaling by <type>[Y]_scale in order to obtain value in the | 204 | to scaling by <type>[Y]_scale in order to obtain value in the |
206 | <type> units as specified in <type>[y]_raw documentation. | 205 | <type> units as specified in <type>[Y]_raw documentation. |
207 | Not present if the offset is always 0 or unknown. If Y or | 206 | Not present if the offset is always 0 or unknown. If Y or |
208 | axis <x|y|z> is not present, then the offset applies to all | 207 | axis <x|y|z> is not present, then the offset applies to all |
209 | in channels of <type>. | 208 | in channels of <type>. |
@@ -249,7 +248,7 @@ What: /sys/bus/iio/devices/iio:deviceX/in_proximity0_calibbias | |||
249 | KernelVersion: 2.6.35 | 248 | KernelVersion: 2.6.35 |
250 | Contact: linux-iio@vger.kernel.org | 249 | Contact: linux-iio@vger.kernel.org |
251 | Description: | 250 | Description: |
252 | Hardware applied calibration offset. (assumed to fix production | 251 | Hardware applied calibration offset (assumed to fix production |
253 | inaccuracies). | 252 | inaccuracies). |
254 | 253 | ||
255 | What /sys/bus/iio/devices/iio:deviceX/in_voltageY_calibscale | 254 | What /sys/bus/iio/devices/iio:deviceX/in_voltageY_calibscale |
@@ -266,7 +265,7 @@ what /sys/bus/iio/devices/iio:deviceX/in_proximity0_calibscale | |||
266 | KernelVersion: 2.6.35 | 265 | KernelVersion: 2.6.35 |
267 | Contact: linux-iio@vger.kernel.org | 266 | Contact: linux-iio@vger.kernel.org |
268 | Description: | 267 | Description: |
269 | Hardware applied calibration scale factor. (assumed to fix | 268 | Hardware applied calibration scale factor (assumed to fix |
270 | production inaccuracies). If shared across all channels, | 269 | production inaccuracies). If shared across all channels, |
271 | <type>_calibscale is used. | 270 | <type>_calibscale is used. |
272 | 271 | ||
@@ -276,10 +275,10 @@ What: /sys/.../iio:deviceX/in_voltage-voltage_scale_available | |||
276 | What: /sys/.../iio:deviceX/out_voltageX_scale_available | 275 | What: /sys/.../iio:deviceX/out_voltageX_scale_available |
277 | What: /sys/.../iio:deviceX/out_altvoltageX_scale_available | 276 | What: /sys/.../iio:deviceX/out_altvoltageX_scale_available |
278 | What: /sys/.../iio:deviceX/in_capacitance_scale_available | 277 | What: /sys/.../iio:deviceX/in_capacitance_scale_available |
279 | KernelVersion: 2.635 | 278 | KernelVersion: 2.6.35 |
280 | Contact: linux-iio@vger.kernel.org | 279 | Contact: linux-iio@vger.kernel.org |
281 | Description: | 280 | Description: |
282 | If a discrete set of scale values are available, they | 281 | If a discrete set of scale values is available, they |
283 | are listed in this attribute. | 282 | are listed in this attribute. |
284 | 283 | ||
285 | What /sys/bus/iio/devices/iio:deviceX/out_voltageY_hardwaregain | 284 | What /sys/bus/iio/devices/iio:deviceX/out_voltageY_hardwaregain |
@@ -330,9 +329,11 @@ Contact: linux-iio@vger.kernel.org | |||
330 | Description: | 329 | Description: |
331 | Specifies the output powerdown mode. | 330 | Specifies the output powerdown mode. |
332 | DAC output stage is disconnected from the amplifier and | 331 | DAC output stage is disconnected from the amplifier and |
333 | 1kohm_to_gnd: connected to ground via an 1kOhm resistor | 332 | 1kohm_to_gnd: connected to ground via an 1kOhm resistor, |
334 | 100kohm_to_gnd: connected to ground via an 100kOhm resistor | 333 | 6kohm_to_gnd: connected to ground via a 6kOhm resistor, |
335 | three_state: left floating | 334 | 20kohm_to_gnd: connected to ground via a 20kOhm resistor, |
335 | 100kohm_to_gnd: connected to ground via an 100kOhm resistor, | ||
336 | three_state: left floating. | ||
336 | For a list of available output power down options read | 337 | For a list of available output power down options read |
337 | outX_powerdown_mode_available. If Y is not present the | 338 | outX_powerdown_mode_available. If Y is not present the |
338 | mode is shared across all outputs. | 339 | mode is shared across all outputs. |
@@ -355,9 +356,10 @@ KernelVersion: 2.6.38 | |||
355 | Contact: linux-iio@vger.kernel.org | 356 | Contact: linux-iio@vger.kernel.org |
356 | Description: | 357 | Description: |
357 | Writing 1 causes output Y to enter the power down mode specified | 358 | Writing 1 causes output Y to enter the power down mode specified |
358 | by the corresponding outY_powerdown_mode. Clearing returns to | 359 | by the corresponding outY_powerdown_mode. DAC output stage is |
359 | normal operation. Y may be suppressed if all outputs are | 360 | disconnected from the amplifier. Clearing returns to normal |
360 | controlled together. | 361 | operation. Y may be suppressed if all outputs are controlled |
362 | together. | ||
361 | 363 | ||
362 | What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_frequency | 364 | What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_frequency |
363 | KernelVersion: 3.4.0 | 365 | KernelVersion: 3.4.0 |
@@ -421,12 +423,12 @@ Description: | |||
421 | different values, but the device can only enable both thresholds | 423 | different values, but the device can only enable both thresholds |
422 | or neither. | 424 | or neither. |
423 | Note the driver will assume the last p events requested are | 425 | Note the driver will assume the last p events requested are |
424 | to be enabled where p is however many it supports (which may | 426 | to be enabled where p is how many it supports (which may vary |
425 | vary depending on the exact set requested. So if you want to be | 427 | depending on the exact set requested. So if you want to be |
426 | sure you have set what you think you have, check the contents of | 428 | sure you have set what you think you have, check the contents of |
427 | these attributes after everything is configured. Drivers may | 429 | these attributes after everything is configured. Drivers may |
428 | have to buffer any parameters so that they are consistent when | 430 | have to buffer any parameters so that they are consistent when |
429 | a given event type is enabled a future point (and not those for | 431 | a given event type is enabled at a future point (and not those for |
430 | whatever event was previously enabled). | 432 | whatever event was previously enabled). |
431 | 433 | ||
432 | What: /sys/.../iio:deviceX/events/in_accel_x_roc_rising_en | 434 | What: /sys/.../iio:deviceX/events/in_accel_x_roc_rising_en |
@@ -702,7 +704,7 @@ What: /sys/.../buffer/scan_elements/in_anglvel_type | |||
702 | What: /sys/.../buffer/scan_elements/in_magn_type | 704 | What: /sys/.../buffer/scan_elements/in_magn_type |
703 | What: /sys/.../buffer/scan_elements/in_incli_type | 705 | What: /sys/.../buffer/scan_elements/in_incli_type |
704 | What: /sys/.../buffer/scan_elements/in_voltageY_type | 706 | What: /sys/.../buffer/scan_elements/in_voltageY_type |
705 | What: /sys/.../buffer/scan_elements/in_voltage-in_type | 707 | What: /sys/.../buffer/scan_elements/in_voltage_type |
706 | What: /sys/.../buffer/scan_elements/in_voltageY_supply_type | 708 | What: /sys/.../buffer/scan_elements/in_voltageY_supply_type |
707 | What: /sys/.../buffer/scan_elements/in_timestamp_type | 709 | What: /sys/.../buffer/scan_elements/in_timestamp_type |
708 | KernelVersion: 2.6.37 | 710 | KernelVersion: 2.6.37 |
@@ -723,7 +725,7 @@ Description: | |||
723 | the buffer output value appropriately. The storagebits value | 725 | the buffer output value appropriately. The storagebits value |
724 | also specifies the data alignment. So s48/64>>2 will be a | 726 | also specifies the data alignment. So s48/64>>2 will be a |
725 | signed 48 bit integer stored in a 64 bit location aligned to | 727 | signed 48 bit integer stored in a 64 bit location aligned to |
726 | a a64 bit boundary. To obtain the clean value, shift right 2 | 728 | a 64 bit boundary. To obtain the clean value, shift right 2 |
727 | and apply a mask to zero the top 16 bits of the result. | 729 | and apply a mask to zero the top 16 bits of the result. |
728 | For other storage combinations this attribute will be extended | 730 | For other storage combinations this attribute will be extended |
729 | appropriately. | 731 | appropriately. |
diff --git a/Documentation/ABI/testing/sysfs-bus-iio-frequency-ad9523 b/Documentation/ABI/testing/sysfs-bus-iio-frequency-ad9523 new file mode 100644 index 000000000000..2ce9c3f68eee --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-iio-frequency-ad9523 | |||
@@ -0,0 +1,37 @@ | |||
1 | What: /sys/bus/iio/devices/iio:deviceX/pll2_feedback_clk_present | ||
2 | What: /sys/bus/iio/devices/iio:deviceX/pll2_reference_clk_present | ||
3 | What: /sys/bus/iio/devices/iio:deviceX/pll1_reference_clk_a_present | ||
4 | What: /sys/bus/iio/devices/iio:deviceX/pll1_reference_clk_b_present | ||
5 | What: /sys/bus/iio/devices/iio:deviceX/pll1_reference_clk_test_present | ||
6 | What: /sys/bus/iio/devices/iio:deviceX/vcxo_clk_present | ||
7 | KernelVersion: 3.4.0 | ||
8 | Contact: linux-iio@vger.kernel.org | ||
9 | Description: | ||
10 | Reading returns either '1' or '0'. | ||
11 | '1' means that the clock in question is present. | ||
12 | '0' means that the clock is missing. | ||
13 | |||
14 | What: /sys/bus/iio/devices/iio:deviceX/pllY_locked | ||
15 | KernelVersion: 3.4.0 | ||
16 | Contact: linux-iio@vger.kernel.org | ||
17 | Description: | ||
18 | Reading returns either '1' or '0'. '1' means that the | ||
19 | pllY is locked. | ||
20 | |||
21 | What: /sys/bus/iio/devices/iio:deviceX/store_eeprom | ||
22 | KernelVersion: 3.4.0 | ||
23 | Contact: linux-iio@vger.kernel.org | ||
24 | Description: | ||
25 | Writing '1' stores the current device configuration into | ||
26 | on-chip EEPROM. After power-up or chip reset the device will | ||
27 | automatically load the saved configuration. | ||
28 | |||
29 | What: /sys/bus/iio/devices/iio:deviceX/sync_dividers | ||
30 | KernelVersion: 3.4.0 | ||
31 | Contact: linux-iio@vger.kernel.org | ||
32 | Description: | ||
33 | Writing '1' triggers the clock distribution synchronization | ||
34 | functionality. All dividers are reset and the channels start | ||
35 | with their predefined phase offsets (out_altvoltageY_phase). | ||
36 | Writing this file has the effect as driving the external | ||
37 | /SYNC pin low. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-iio-frequency-adf4350 b/Documentation/ABI/testing/sysfs-bus-iio-frequency-adf4350 new file mode 100644 index 000000000000..d89aded01c5a --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-iio-frequency-adf4350 | |||
@@ -0,0 +1,21 @@ | |||
1 | What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_frequency_resolution | ||
2 | KernelVersion: 3.4.0 | ||
3 | Contact: linux-iio@vger.kernel.org | ||
4 | Description: | ||
5 | Stores channel Y frequency resolution/channel spacing in Hz. | ||
6 | The value given directly influences the MODULUS used by | ||
7 | the fractional-N PLL. It is assumed that the algorithm | ||
8 | that is used to compute the various dividers, is able to | ||
9 | generate proper values for multiples of channel spacing. | ||
10 | |||
11 | What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_refin_frequency | ||
12 | KernelVersion: 3.4.0 | ||
13 | Contact: linux-iio@vger.kernel.org | ||
14 | Description: | ||
15 | Sets channel Y REFin frequency in Hz. In some clock chained | ||
16 | applications, the reference frequency used by the PLL may | ||
17 | change during runtime. This attribute allows the user to | ||
18 | adjust the reference frequency accordingly. | ||
19 | The value written has no effect until out_altvoltageY_frequency | ||
20 | is updated. Consider to use out_altvoltageY_powerdown to power | ||
21 | down the PLL and it's RFOut buffers during REFin changes. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-iio-light-lm3533-als b/Documentation/ABI/testing/sysfs-bus-iio-light-lm3533-als new file mode 100644 index 000000000000..22c5ea670971 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-iio-light-lm3533-als | |||
@@ -0,0 +1,61 @@ | |||
1 | What: /sys/.../events/in_illuminance0_thresh_either_en | ||
2 | Date: April 2012 | ||
3 | KernelVersion: 3.5 | ||
4 | Contact: Johan Hovold <jhovold@gmail.com> | ||
5 | Description: | ||
6 | Event generated when channel passes one of the four thresholds | ||
7 | in each direction (rising|falling) and a zone change occurs. | ||
8 | The corresponding light zone can be read from | ||
9 | in_illuminance0_zone. | ||
10 | |||
11 | What: /sys/.../events/in_illuminance0_threshY_hysteresis | ||
12 | Date: May 2012 | ||
13 | KernelVersion: 3.5 | ||
14 | Contact: Johan Hovold <jhovold@gmail.com> | ||
15 | Description: | ||
16 | Get the hysteresis for thresholds Y, that is, | ||
17 | threshY_hysteresis = threshY_raising - threshY_falling | ||
18 | |||
19 | What: /sys/.../events/illuminance_threshY_falling_value | ||
20 | What: /sys/.../events/illuminance_threshY_raising_value | ||
21 | Date: April 2012 | ||
22 | KernelVersion: 3.5 | ||
23 | Contact: Johan Hovold <jhovold@gmail.com> | ||
24 | Description: | ||
25 | Specifies the value of threshold that the device is comparing | ||
26 | against for the events enabled by | ||
27 | in_illuminance0_thresh_either_en (0..255), where Y in 0..3. | ||
28 | |||
29 | Note that threshY_falling must be less than or equal to | ||
30 | threshY_raising. | ||
31 | |||
32 | These thresholds correspond to the eight zone-boundary | ||
33 | registers (boundaryY_{low,high}) and define the five light | ||
34 | zones. | ||
35 | |||
36 | What: /sys/bus/iio/devices/iio:deviceX/in_illuminance0_zone | ||
37 | Date: April 2012 | ||
38 | KernelVersion: 3.5 | ||
39 | Contact: Johan Hovold <jhovold@gmail.com> | ||
40 | Description: | ||
41 | Get the current light zone (0..4) as defined by the | ||
42 | in_illuminance0_threshY_{falling,rising} thresholds. | ||
43 | |||
44 | What: /sys/bus/iio/devices/iio:deviceX/out_currentY_raw | ||
45 | Date: May 2012 | ||
46 | KernelVersion: 3.5 | ||
47 | Contact: Johan Hovold <jhovold@gmail.com> | ||
48 | Description: | ||
49 | Get output current for channel Y (0..255), that is, | ||
50 | out_currentY_currentZ_raw, where Z is the current zone. | ||
51 | |||
52 | What: /sys/bus/iio/devices/iio:deviceX/out_currentY_currentZ_raw | ||
53 | Date: May 2012 | ||
54 | KernelVersion: 3.5 | ||
55 | Contact: Johan Hovold <jhovold@gmail.com> | ||
56 | Description: | ||
57 | Set the output current for channel out_currentY when in zone | ||
58 | Z (0..255), where Y in 0..2 and Z in 0..4. | ||
59 | |||
60 | These values correspond to the ALS-mapper target registers for | ||
61 | ALS-mapper Y + 1. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-rbd b/Documentation/ABI/testing/sysfs-bus-rbd index bcd88eb7ebcd..3c17b62899f6 100644 --- a/Documentation/ABI/testing/sysfs-bus-rbd +++ b/Documentation/ABI/testing/sysfs-bus-rbd | |||
@@ -35,8 +35,14 @@ name | |||
35 | 35 | ||
36 | pool | 36 | pool |
37 | 37 | ||
38 | The pool where this rbd image resides. The pool-name pair is unique | 38 | The name of the storage pool where this rbd image resides. |
39 | per rados system. | 39 | An rbd image name is unique within its pool. |
40 | |||
41 | pool_id | ||
42 | |||
43 | The unique identifier for the rbd image's pool. This is | ||
44 | a permanent attribute of the pool. A pool's id will never | ||
45 | change. | ||
40 | 46 | ||
41 | size | 47 | size |
42 | 48 | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb index 6df4e6f57560..5f75f8f7df34 100644 --- a/Documentation/ABI/testing/sysfs-bus-usb +++ b/Documentation/ABI/testing/sysfs-bus-usb | |||
@@ -208,3 +208,15 @@ Description: | |||
208 | such as ACPI. This file will read either "removable" or | 208 | such as ACPI. This file will read either "removable" or |
209 | "fixed" if the information is available, and "unknown" | 209 | "fixed" if the information is available, and "unknown" |
210 | otherwise. | 210 | otherwise. |
211 | |||
212 | What: /sys/bus/usb/devices/.../ltm_capable | ||
213 | Date: July 2012 | ||
214 | Contact: Sarah Sharp <sarah.a.sharp@linux.intel.com> | ||
215 | Description: | ||
216 | USB 3.0 devices may optionally support Latency Tolerance | ||
217 | Messaging (LTM). They indicate their support by setting a bit | ||
218 | in the bmAttributes field of their SuperSpeed BOS descriptors. | ||
219 | If that bit is set for the device, ltm_capable will read "yes". | ||
220 | If the device doesn't support LTM, the file will read "no". | ||
221 | The file will be present for all speeds of USB devices, and will | ||
222 | always read "no" for USB 1.1 and USB 2.0 devices. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-usb-devices-usbsevseg b/Documentation/ABI/testing/sysfs-bus-usb-devices-usbsevseg index cb830df8777c..70d00dfa443d 100644 --- a/Documentation/ABI/testing/sysfs-bus-usb-devices-usbsevseg +++ b/Documentation/ABI/testing/sysfs-bus-usb-devices-usbsevseg | |||
@@ -40,4 +40,4 @@ Description: Controls the decimal places on the device. | |||
40 | the value of 10 ** n. Assume this field has | 40 | the value of 10 ** n. Assume this field has |
41 | the value k and has 1 or more decimal places set, | 41 | the value k and has 1 or more decimal places set, |
42 | to set the mth place (where m is not already set), | 42 | to set the mth place (where m is not already set), |
43 | change this fields value to k + 10 ** m. \ No newline at end of file | 43 | change this fields value to k + 10 ** m. |
diff --git a/Documentation/ABI/testing/sysfs-class-backlight-driver-adp8870 b/Documentation/ABI/testing/sysfs-class-backlight-driver-adp8870 index 4a9c545bda4b..33e648808117 100644 --- a/Documentation/ABI/testing/sysfs-class-backlight-driver-adp8870 +++ b/Documentation/ABI/testing/sysfs-class-backlight-driver-adp8870 | |||
@@ -53,4 +53,4 @@ Description: | |||
53 | Documentation/ABI/stable/sysfs-class-backlight. | 53 | Documentation/ABI/stable/sysfs-class-backlight. |
54 | It can be enabled by writing the value stored in | 54 | It can be enabled by writing the value stored in |
55 | /sys/class/backlight/<backlight>/max_brightness to | 55 | /sys/class/backlight/<backlight>/max_brightness to |
56 | /sys/class/backlight/<backlight>/brightness. \ No newline at end of file | 56 | /sys/class/backlight/<backlight>/brightness. |
diff --git a/Documentation/ABI/testing/sysfs-devices-edac b/Documentation/ABI/testing/sysfs-devices-edac new file mode 100644 index 000000000000..30ee78aaed75 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-devices-edac | |||
@@ -0,0 +1,140 @@ | |||
1 | What: /sys/devices/system/edac/mc/mc*/reset_counters | ||
2 | Date: January 2006 | ||
3 | Contact: linux-edac@vger.kernel.org | ||
4 | Description: This write-only control file will zero all the statistical | ||
5 | counters for UE and CE errors on the given memory controller. | ||
6 | Zeroing the counters will also reset the timer indicating how | ||
7 | long since the last counter were reset. This is useful for | ||
8 | computing errors/time. Since the counters are always reset | ||
9 | at driver initialization time, no module/kernel parameter | ||
10 | is available. | ||
11 | |||
12 | What: /sys/devices/system/edac/mc/mc*/seconds_since_reset | ||
13 | Date: January 2006 | ||
14 | Contact: linux-edac@vger.kernel.org | ||
15 | Description: This attribute file displays how many seconds have elapsed | ||
16 | since the last counter reset. This can be used with the error | ||
17 | counters to measure error rates. | ||
18 | |||
19 | What: /sys/devices/system/edac/mc/mc*/mc_name | ||
20 | Date: January 2006 | ||
21 | Contact: linux-edac@vger.kernel.org | ||
22 | Description: This attribute file displays the type of memory controller | ||
23 | that is being utilized. | ||
24 | |||
25 | What: /sys/devices/system/edac/mc/mc*/size_mb | ||
26 | Date: January 2006 | ||
27 | Contact: linux-edac@vger.kernel.org | ||
28 | Description: This attribute file displays, in count of megabytes, of memory | ||
29 | that this memory controller manages. | ||
30 | |||
31 | What: /sys/devices/system/edac/mc/mc*/ue_count | ||
32 | Date: January 2006 | ||
33 | Contact: linux-edac@vger.kernel.org | ||
34 | Description: This attribute file displays the total count of uncorrectable | ||
35 | errors that have occurred on this memory controller. If | ||
36 | panic_on_ue is set, this counter will not have a chance to | ||
37 | increment, since EDAC will panic the system | ||
38 | |||
39 | What: /sys/devices/system/edac/mc/mc*/ue_noinfo_count | ||
40 | Date: January 2006 | ||
41 | Contact: linux-edac@vger.kernel.org | ||
42 | Description: This attribute file displays the number of UEs that have | ||
43 | occurred on this memory controller with no information as to | ||
44 | which DIMM slot is having errors. | ||
45 | |||
46 | What: /sys/devices/system/edac/mc/mc*/ce_count | ||
47 | Date: January 2006 | ||
48 | Contact: linux-edac@vger.kernel.org | ||
49 | Description: This attribute file displays the total count of correctable | ||
50 | errors that have occurred on this memory controller. This | ||
51 | count is very important to examine. CEs provide early | ||
52 | indications that a DIMM is beginning to fail. This count | ||
53 | field should be monitored for non-zero values and report | ||
54 | such information to the system administrator. | ||
55 | |||
56 | What: /sys/devices/system/edac/mc/mc*/ce_noinfo_count | ||
57 | Date: January 2006 | ||
58 | Contact: linux-edac@vger.kernel.org | ||
59 | Description: This attribute file displays the number of CEs that | ||
60 | have occurred on this memory controller wherewith no | ||
61 | information as to which DIMM slot is having errors. Memory is | ||
62 | handicapped, but operational, yet no information is available | ||
63 | to indicate which slot the failing memory is in. This count | ||
64 | field should be also be monitored for non-zero values. | ||
65 | |||
66 | What: /sys/devices/system/edac/mc/mc*/sdram_scrub_rate | ||
67 | Date: February 2007 | ||
68 | Contact: linux-edac@vger.kernel.org | ||
69 | Description: Read/Write attribute file that controls memory scrubbing. | ||
70 | The scrubbing rate used by the memory controller is set by | ||
71 | writing a minimum bandwidth in bytes/sec to the attribute file. | ||
72 | The rate will be translated to an internal value that gives at | ||
73 | least the specified rate. | ||
74 | Reading the file will return the actual scrubbing rate employed. | ||
75 | If configuration fails or memory scrubbing is not implemented, | ||
76 | the value of the attribute file will be -1. | ||
77 | |||
78 | What: /sys/devices/system/edac/mc/mc*/max_location | ||
79 | Date: April 2012 | ||
80 | Contact: Mauro Carvalho Chehab <mchehab@redhat.com> | ||
81 | linux-edac@vger.kernel.org | ||
82 | Description: This attribute file displays the information about the last | ||
83 | available memory slot in this memory controller. It is used by | ||
84 | userspace tools in order to display the memory filling layout. | ||
85 | |||
86 | What: /sys/devices/system/edac/mc/mc*/(dimm|rank)*/size | ||
87 | Date: April 2012 | ||
88 | Contact: Mauro Carvalho Chehab <mchehab@redhat.com> | ||
89 | linux-edac@vger.kernel.org | ||
90 | Description: This attribute file will display the size of dimm or rank. | ||
91 | For dimm*/size, this is the size, in MB of the DIMM memory | ||
92 | stick. For rank*/size, this is the size, in MB for one rank | ||
93 | of the DIMM memory stick. On single rank memories (1R), this | ||
94 | is also the total size of the dimm. On dual rank (2R) memories, | ||
95 | this is half the size of the total DIMM memories. | ||
96 | |||
97 | What: /sys/devices/system/edac/mc/mc*/(dimm|rank)*/dimm_dev_type | ||
98 | Date: April 2012 | ||
99 | Contact: Mauro Carvalho Chehab <mchehab@redhat.com> | ||
100 | linux-edac@vger.kernel.org | ||
101 | Description: This attribute file will display what type of DRAM device is | ||
102 | being utilized on this DIMM (x1, x2, x4, x8, ...). | ||
103 | |||
104 | What: /sys/devices/system/edac/mc/mc*/(dimm|rank)*/dimm_edac_mode | ||
105 | Date: April 2012 | ||
106 | Contact: Mauro Carvalho Chehab <mchehab@redhat.com> | ||
107 | linux-edac@vger.kernel.org | ||
108 | Description: This attribute file will display what type of Error detection | ||
109 | and correction is being utilized. For example: S4ECD4ED would | ||
110 | mean a Chipkill with x4 DRAM. | ||
111 | |||
112 | What: /sys/devices/system/edac/mc/mc*/(dimm|rank)*/dimm_label | ||
113 | Date: April 2012 | ||
114 | Contact: Mauro Carvalho Chehab <mchehab@redhat.com> | ||
115 | linux-edac@vger.kernel.org | ||
116 | Description: This control file allows this DIMM to have a label assigned | ||
117 | to it. With this label in the module, when errors occur | ||
118 | the output can provide the DIMM label in the system log. | ||
119 | This becomes vital for panic events to isolate the | ||
120 | cause of the UE event. | ||
121 | DIMM Labels must be assigned after booting, with information | ||
122 | that correctly identifies the physical slot with its | ||
123 | silk screen label. This information is currently very | ||
124 | motherboard specific and determination of this information | ||
125 | must occur in userland at this time. | ||
126 | |||
127 | What: /sys/devices/system/edac/mc/mc*/(dimm|rank)*/dimm_location | ||
128 | Date: April 2012 | ||
129 | Contact: Mauro Carvalho Chehab <mchehab@redhat.com> | ||
130 | linux-edac@vger.kernel.org | ||
131 | Description: This attribute file will display the location (csrow/channel, | ||
132 | branch/channel/slot or channel/slot) of the dimm or rank. | ||
133 | |||
134 | What: /sys/devices/system/edac/mc/mc*/(dimm|rank)*/dimm_mem_type | ||
135 | Date: April 2012 | ||
136 | Contact: Mauro Carvalho Chehab <mchehab@redhat.com> | ||
137 | linux-edac@vger.kernel.org | ||
138 | Description: This attribute file will display what type of memory is | ||
139 | currently on this csrow. Normally, either buffered or | ||
140 | unbuffered memory (for example, Unbuffered-DDR3). | ||
diff --git a/Documentation/ABI/testing/sysfs-devices-platform-sh_mobile_lcdc_fb b/Documentation/ABI/testing/sysfs-devices-platform-sh_mobile_lcdc_fb new file mode 100644 index 000000000000..2107082426da --- /dev/null +++ b/Documentation/ABI/testing/sysfs-devices-platform-sh_mobile_lcdc_fb | |||
@@ -0,0 +1,44 @@ | |||
1 | What: /sys/devices/platform/sh_mobile_lcdc_fb.[0-3]/graphics/fb[0-9]/ovl_alpha | ||
2 | Date: May 2012 | ||
3 | Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
4 | Description: | ||
5 | This file is only available on fb[0-9] devices corresponding | ||
6 | to overlay planes. | ||
7 | |||
8 | Stores the alpha blending value for the overlay. Values range | ||
9 | from 0 (transparent) to 255 (opaque). The value is ignored if | ||
10 | the mode is not set to Alpha Blending. | ||
11 | |||
12 | What: /sys/devices/platform/sh_mobile_lcdc_fb.[0-3]/graphics/fb[0-9]/ovl_mode | ||
13 | Date: May 2012 | ||
14 | Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
15 | Description: | ||
16 | This file is only available on fb[0-9] devices corresponding | ||
17 | to overlay planes. | ||
18 | |||
19 | Selects the composition mode for the overlay. Possible values | ||
20 | are | ||
21 | |||
22 | 0 - Alpha Blending | ||
23 | 1 - ROP3 | ||
24 | |||
25 | What: /sys/devices/platform/sh_mobile_lcdc_fb.[0-3]/graphics/fb[0-9]/ovl_position | ||
26 | Date: May 2012 | ||
27 | Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
28 | Description: | ||
29 | This file is only available on fb[0-9] devices corresponding | ||
30 | to overlay planes. | ||
31 | |||
32 | Stores the x,y overlay position on the display in pixels. The | ||
33 | position format is `[0-9]+,[0-9]+'. | ||
34 | |||
35 | What: /sys/devices/platform/sh_mobile_lcdc_fb.[0-3]/graphics/fb[0-9]/ovl_rop3 | ||
36 | Date: May 2012 | ||
37 | Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
38 | Description: | ||
39 | This file is only available on fb[0-9] devices corresponding | ||
40 | to overlay planes. | ||
41 | |||
42 | Stores the raster operation (ROP3) for the overlay. Values | ||
43 | range from 0 to 255. The value is ignored if the mode is not | ||
44 | set to ROP3. | ||
diff --git a/Documentation/ABI/testing/sysfs-devices-system-xen_cpu b/Documentation/ABI/testing/sysfs-devices-system-xen_cpu new file mode 100644 index 000000000000..9ca02fb2d498 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-devices-system-xen_cpu | |||
@@ -0,0 +1,20 @@ | |||
1 | What: /sys/devices/system/xen_cpu/ | ||
2 | Date: May 2012 | ||
3 | Contact: Liu, Jinsong <jinsong.liu@intel.com> | ||
4 | Description: | ||
5 | A collection of global/individual Xen physical cpu attributes | ||
6 | |||
7 | Individual physical cpu attributes are contained in | ||
8 | subdirectories named by the Xen's logical cpu number, e.g.: | ||
9 | /sys/devices/system/xen_cpu/xen_cpu#/ | ||
10 | |||
11 | |||
12 | What: /sys/devices/system/xen_cpu/xen_cpu#/online | ||
13 | Date: May 2012 | ||
14 | Contact: Liu, Jinsong <jinsong.liu@intel.com> | ||
15 | Description: | ||
16 | Interface to online/offline Xen physical cpus | ||
17 | |||
18 | When running under Xen platform, it provide user interface | ||
19 | to online/offline physical cpus, except cpu0 due to several | ||
20 | logic restrictions and assumptions. | ||
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-lenovo-tpkbd b/Documentation/ABI/testing/sysfs-driver-hid-lenovo-tpkbd new file mode 100644 index 000000000000..57b92cbdceae --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-hid-lenovo-tpkbd | |||
@@ -0,0 +1,38 @@ | |||
1 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/press_to_select | ||
2 | Date: July 2011 | ||
3 | Contact: linux-input@vger.kernel.org | ||
4 | Description: This controls if mouse clicks should be generated if the trackpoint is quickly pressed. How fast this press has to be | ||
5 | is being controlled by press_speed. | ||
6 | Values are 0 or 1. | ||
7 | |||
8 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/dragging | ||
9 | Date: July 2011 | ||
10 | Contact: linux-input@vger.kernel.org | ||
11 | Description: If this setting is enabled, it is possible to do dragging by pressing the trackpoint. This requires press_to_select to be enabled. | ||
12 | Values are 0 or 1. | ||
13 | |||
14 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/release_to_select | ||
15 | Date: July 2011 | ||
16 | Contact: linux-input@vger.kernel.org | ||
17 | Description: For details regarding this setting please refer to http://www.pc.ibm.com/ww/healthycomputing/trkpntb.html | ||
18 | Values are 0 or 1. | ||
19 | |||
20 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/select_right | ||
21 | Date: July 2011 | ||
22 | Contact: linux-input@vger.kernel.org | ||
23 | Description: This setting controls if the mouse click events generated by pressing the trackpoint (if press_to_select is enabled) generate | ||
24 | a left or right mouse button click. | ||
25 | Values are 0 or 1. | ||
26 | |||
27 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/sensitivity | ||
28 | Date: July 2011 | ||
29 | Contact: linux-input@vger.kernel.org | ||
30 | Description: This file contains the trackpoint sensitivity. | ||
31 | Values are decimal integers from 1 (lowest sensitivity) to 255 (highest sensitivity). | ||
32 | |||
33 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/press_speed | ||
34 | Date: July 2011 | ||
35 | Contact: linux-input@vger.kernel.org | ||
36 | Description: This setting controls how fast the trackpoint needs to be pressed to generate a mouse click if press_to_select is enabled. | ||
37 | Values are decimal integers from 1 (slowest) to 255 (fastest). | ||
38 | |||
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu b/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu new file mode 100644 index 000000000000..b42922cf6b1f --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu | |||
@@ -0,0 +1,77 @@ | |||
1 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/savu/roccatsavu<minor>/buttons | ||
2 | Date: Mai 2012 | ||
3 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
4 | Description: The mouse can store 5 profiles which can be switched by the | ||
5 | press of a button. A profile is split into general settings and | ||
6 | button settings. buttons holds informations about button layout. | ||
7 | When written, this file lets one write the respective profile | ||
8 | buttons to the mouse. The data has to be 47 bytes long. | ||
9 | The mouse will reject invalid data. | ||
10 | Which profile to write is determined by the profile number | ||
11 | contained in the data. | ||
12 | Before reading this file, control has to be written to select | ||
13 | which profile to read. | ||
14 | Users: http://roccat.sourceforge.net | ||
15 | |||
16 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/savu/roccatsavu<minor>/control | ||
17 | Date: Mai 2012 | ||
18 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
19 | Description: When written, this file lets one select which data from which | ||
20 | profile will be read next. The data has to be 3 bytes long. | ||
21 | This file is writeonly. | ||
22 | Users: http://roccat.sourceforge.net | ||
23 | |||
24 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/savu/roccatsavu<minor>/general | ||
25 | Date: Mai 2012 | ||
26 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
27 | Description: The mouse can store 5 profiles which can be switched by the | ||
28 | press of a button. A profile is split into general settings and | ||
29 | button settings. profile holds informations like resolution, sensitivity | ||
30 | and light effects. | ||
31 | When written, this file lets one write the respective profile | ||
32 | settings back to the mouse. The data has to be 43 bytes long. | ||
33 | The mouse will reject invalid data. | ||
34 | Which profile to write is determined by the profile number | ||
35 | contained in the data. | ||
36 | This file is writeonly. | ||
37 | Users: http://roccat.sourceforge.net | ||
38 | |||
39 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/savu/roccatsavu<minor>/info | ||
40 | Date: Mai 2012 | ||
41 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
42 | Description: When read, this file returns general data like firmware version. | ||
43 | The data is 8 bytes long. | ||
44 | This file is readonly. | ||
45 | Users: http://roccat.sourceforge.net | ||
46 | |||
47 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/savu/roccatsavu<minor>/macro | ||
48 | Date: Mai 2012 | ||
49 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
50 | Description: When written, this file lets one store macros with max 500 | ||
51 | keystrokes for a specific button for a specific profile. | ||
52 | Button and profile numbers are included in written data. | ||
53 | The data has to be 2083 bytes long. | ||
54 | Before reading this file, control has to be written to select | ||
55 | which profile and key to read. | ||
56 | Users: http://roccat.sourceforge.net | ||
57 | |||
58 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/savu/roccatsavu<minor>/profile | ||
59 | Date: Mai 2012 | ||
60 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
61 | Description: The mouse can store 5 profiles which can be switched by the | ||
62 | press of a button. profile holds number of actual profile. | ||
63 | This value is persistent, so its value determines the profile | ||
64 | that's active when the mouse is powered on next time. | ||
65 | When written, the mouse activates the set profile immediately. | ||
66 | The data has to be 3 bytes long. | ||
67 | The mouse will reject invalid data. | ||
68 | Users: http://roccat.sourceforge.net | ||
69 | |||
70 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/savu/roccatsavu<minor>/sensor | ||
71 | Date: July 2012 | ||
72 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
73 | Description: The mouse has a Avago ADNS-3090 sensor. | ||
74 | This file allows reading and writing of the mouse sensors registers. | ||
75 | The data has to be 4 bytes long. | ||
76 | Users: http://roccat.sourceforge.net | ||
77 | |||
diff --git a/Documentation/ABI/testing/sysfs-kernel-iommu_groups b/Documentation/ABI/testing/sysfs-kernel-iommu_groups new file mode 100644 index 000000000000..9b31556cfdda --- /dev/null +++ b/Documentation/ABI/testing/sysfs-kernel-iommu_groups | |||
@@ -0,0 +1,14 @@ | |||
1 | What: /sys/kernel/iommu_groups/ | ||
2 | Date: May 2012 | ||
3 | KernelVersion: v3.5 | ||
4 | Contact: Alex Williamson <alex.williamson@redhat.com> | ||
5 | Description: /sys/kernel/iommu_groups/ contains a number of sub- | ||
6 | directories, each representing an IOMMU group. The | ||
7 | name of the sub-directory matches the iommu_group_id() | ||
8 | for the group, which is an integer value. Within each | ||
9 | subdirectory is another directory named "devices" with | ||
10 | links to the sysfs devices contained in this group. | ||
11 | The group directory also optionally contains a "name" | ||
12 | file if the IOMMU driver has chosen to register a more | ||
13 | common name for the group. | ||
14 | Users: | ||
diff --git a/Documentation/ABI/testing/sysfs-platform-asus-wmi b/Documentation/ABI/testing/sysfs-platform-asus-wmi index 2e7df91620de..019e1e29370e 100644 --- a/Documentation/ABI/testing/sysfs-platform-asus-wmi +++ b/Documentation/ABI/testing/sysfs-platform-asus-wmi | |||
@@ -29,3 +29,10 @@ KernelVersion: 2.6.39 | |||
29 | Contact: "Corentin Chary" <corentincj@iksaif.net> | 29 | Contact: "Corentin Chary" <corentincj@iksaif.net> |
30 | Description: | 30 | Description: |
31 | Control the card touchpad. 1 means on, 0 means off. | 31 | Control the card touchpad. 1 means on, 0 means off. |
32 | |||
33 | What: /sys/devices/platform/<platform>/lid_resume | ||
34 | Date: May 2012 | ||
35 | KernelVersion: 3.5 | ||
36 | Contact: "AceLan Kao" <acelan.kao@canonical.com> | ||
37 | Description: | ||
38 | Resume on lid open. 1 means on, 0 means off. | ||
diff --git a/Documentation/ABI/testing/sysfs-power b/Documentation/ABI/testing/sysfs-power index 31725ffeeb3a..217772615d02 100644 --- a/Documentation/ABI/testing/sysfs-power +++ b/Documentation/ABI/testing/sysfs-power | |||
@@ -231,3 +231,16 @@ Description: | |||
231 | Reads from this file return a string consisting of the names of | 231 | Reads from this file return a string consisting of the names of |
232 | wakeup sources created with the help of /sys/power/wake_lock | 232 | wakeup sources created with the help of /sys/power/wake_lock |
233 | that are inactive at the moment, separated with spaces. | 233 | that are inactive at the moment, separated with spaces. |
234 | |||
235 | What: /sys/power/pm_print_times | ||
236 | Date: May 2012 | ||
237 | Contact: Sameer Nanda <snanda@chromium.org> | ||
238 | Description: | ||
239 | The /sys/power/pm_print_times file allows user space to | ||
240 | control whether the time taken by devices to suspend and | ||
241 | resume is printed. These prints are useful for hunting down | ||
242 | devices that take too long to suspend or resume. | ||
243 | |||
244 | Writing a "1" enables this printing while writing a "0" | ||
245 | disables it. The default value is "0". Reading from this file | ||
246 | will display the current value. | ||
diff --git a/Documentation/DMA-attributes.txt b/Documentation/DMA-attributes.txt index 5c72eed89563..f50309081ac7 100644 --- a/Documentation/DMA-attributes.txt +++ b/Documentation/DMA-attributes.txt | |||
@@ -49,3 +49,45 @@ DMA_ATTR_NON_CONSISTENT lets the platform to choose to return either | |||
49 | consistent or non-consistent memory as it sees fit. By using this API, | 49 | consistent or non-consistent memory as it sees fit. By using this API, |
50 | you are guaranteeing to the platform that you have all the correct and | 50 | you are guaranteeing to the platform that you have all the correct and |
51 | necessary sync points for this memory in the driver. | 51 | necessary sync points for this memory in the driver. |
52 | |||
53 | DMA_ATTR_NO_KERNEL_MAPPING | ||
54 | -------------------------- | ||
55 | |||
56 | DMA_ATTR_NO_KERNEL_MAPPING lets the platform to avoid creating a kernel | ||
57 | virtual mapping for the allocated buffer. On some architectures creating | ||
58 | such mapping is non-trivial task and consumes very limited resources | ||
59 | (like kernel virtual address space or dma consistent address space). | ||
60 | Buffers allocated with this attribute can be only passed to user space | ||
61 | by calling dma_mmap_attrs(). By using this API, you are guaranteeing | ||
62 | that you won't dereference the pointer returned by dma_alloc_attr(). You | ||
63 | can threat it as a cookie that must be passed to dma_mmap_attrs() and | ||
64 | dma_free_attrs(). Make sure that both of these also get this attribute | ||
65 | set on each call. | ||
66 | |||
67 | Since it is optional for platforms to implement | ||
68 | DMA_ATTR_NO_KERNEL_MAPPING, those that do not will simply ignore the | ||
69 | attribute and exhibit default behavior. | ||
70 | |||
71 | DMA_ATTR_SKIP_CPU_SYNC | ||
72 | ---------------------- | ||
73 | |||
74 | By default dma_map_{single,page,sg} functions family transfer a given | ||
75 | buffer from CPU domain to device domain. Some advanced use cases might | ||
76 | require sharing a buffer between more than one device. This requires | ||
77 | having a mapping created separately for each device and is usually | ||
78 | performed by calling dma_map_{single,page,sg} function more than once | ||
79 | for the given buffer with device pointer to each device taking part in | ||
80 | the buffer sharing. The first call transfers a buffer from 'CPU' domain | ||
81 | to 'device' domain, what synchronizes CPU caches for the given region | ||
82 | (usually it means that the cache has been flushed or invalidated | ||
83 | depending on the dma direction). However, next calls to | ||
84 | dma_map_{single,page,sg}() for other devices will perform exactly the | ||
85 | same sychronization operation on the CPU cache. CPU cache sychronization | ||
86 | might be a time consuming operation, especially if the buffers are | ||
87 | large, so it is highly recommended to avoid it if possible. | ||
88 | DMA_ATTR_SKIP_CPU_SYNC allows platform code to skip synchronization of | ||
89 | the CPU cache for the given buffer assuming that it has been already | ||
90 | transferred to 'device' domain. This attribute can be also used for | ||
91 | dma_unmap_{single,page,sg} functions family to force buffer to stay in | ||
92 | device domain after releasing a mapping for it. Use this attribute with | ||
93 | care! | ||
diff --git a/Documentation/DocBook/80211.tmpl b/Documentation/DocBook/80211.tmpl index f3e214f9e256..42e7f030cb16 100644 --- a/Documentation/DocBook/80211.tmpl +++ b/Documentation/DocBook/80211.tmpl | |||
@@ -404,7 +404,6 @@ | |||
404 | !Finclude/net/mac80211.h ieee80211_get_tkip_p1k | 404 | !Finclude/net/mac80211.h ieee80211_get_tkip_p1k |
405 | !Finclude/net/mac80211.h ieee80211_get_tkip_p1k_iv | 405 | !Finclude/net/mac80211.h ieee80211_get_tkip_p1k_iv |
406 | !Finclude/net/mac80211.h ieee80211_get_tkip_p2k | 406 | !Finclude/net/mac80211.h ieee80211_get_tkip_p2k |
407 | !Finclude/net/mac80211.h ieee80211_key_removed | ||
408 | </chapter> | 407 | </chapter> |
409 | 408 | ||
410 | <chapter id="powersave"> | 409 | <chapter id="powersave"> |
diff --git a/Documentation/DocBook/media/v4l/biblio.xml b/Documentation/DocBook/media/v4l/biblio.xml index 7c49facecd25..1078e45f189f 100644 --- a/Documentation/DocBook/media/v4l/biblio.xml +++ b/Documentation/DocBook/media/v4l/biblio.xml | |||
@@ -194,7 +194,7 @@ in the frequency range from 87,5 to 108,0 MHz</title> | |||
194 | <corpauthor>National Radio Systems Committee | 194 | <corpauthor>National Radio Systems Committee |
195 | (<ulink url="http://www.nrscstandards.org">http://www.nrscstandards.org</ulink>)</corpauthor> | 195 | (<ulink url="http://www.nrscstandards.org">http://www.nrscstandards.org</ulink>)</corpauthor> |
196 | </authorgroup> | 196 | </authorgroup> |
197 | <title>NTSC-4: United States RBDS Standard</title> | 197 | <title>NRSC-4: United States RBDS Standard</title> |
198 | </biblioentry> | 198 | </biblioentry> |
199 | 199 | ||
200 | <biblioentry id="iso12232"> | 200 | <biblioentry id="iso12232"> |
diff --git a/Documentation/DocBook/media/v4l/common.xml b/Documentation/DocBook/media/v4l/common.xml index 4101aeb56540..b91d25313b63 100644 --- a/Documentation/DocBook/media/v4l/common.xml +++ b/Documentation/DocBook/media/v4l/common.xml | |||
@@ -464,14 +464,14 @@ The <structfield>type</structfield> field of the respective | |||
464 | <structfield>tuner</structfield> field contains the index number of | 464 | <structfield>tuner</structfield> field contains the index number of |
465 | the tuner.</para> | 465 | the tuner.</para> |
466 | 466 | ||
467 | <para>Radio devices have exactly one tuner with index zero, no | 467 | <para>Radio input devices have exactly one tuner with index zero, no |
468 | video inputs.</para> | 468 | video inputs.</para> |
469 | 469 | ||
470 | <para>To query and change tuner properties applications use the | 470 | <para>To query and change tuner properties applications use the |
471 | &VIDIOC-G-TUNER; and &VIDIOC-S-TUNER; ioctl, respectively. The | 471 | &VIDIOC-G-TUNER; and &VIDIOC-S-TUNER; ioctl, respectively. The |
472 | &v4l2-tuner; returned by <constant>VIDIOC_G_TUNER</constant> also | 472 | &v4l2-tuner; returned by <constant>VIDIOC_G_TUNER</constant> also |
473 | contains signal status information applicable when the tuner of the | 473 | contains signal status information applicable when the tuner of the |
474 | current video input, or a radio tuner is queried. Note that | 474 | current video or radio input is queried. Note that |
475 | <constant>VIDIOC_S_TUNER</constant> does not switch the current tuner, | 475 | <constant>VIDIOC_S_TUNER</constant> does not switch the current tuner, |
476 | when there is more than one at all. The tuner is solely determined by | 476 | when there is more than one at all. The tuner is solely determined by |
477 | the current video input. Drivers must support both ioctls and set the | 477 | the current video input. Drivers must support both ioctls and set the |
@@ -491,8 +491,17 @@ the modulator. The <structfield>type</structfield> field of the | |||
491 | respective &v4l2-output; returned by the &VIDIOC-ENUMOUTPUT; ioctl is | 491 | respective &v4l2-output; returned by the &VIDIOC-ENUMOUTPUT; ioctl is |
492 | set to <constant>V4L2_OUTPUT_TYPE_MODULATOR</constant> and its | 492 | set to <constant>V4L2_OUTPUT_TYPE_MODULATOR</constant> and its |
493 | <structfield>modulator</structfield> field contains the index number | 493 | <structfield>modulator</structfield> field contains the index number |
494 | of the modulator. This specification does not define radio output | 494 | of the modulator.</para> |
495 | devices.</para> | 495 | |
496 | <para>Radio output devices have exactly one modulator with index | ||
497 | zero, no video outputs.</para> | ||
498 | |||
499 | <para>A video or radio device cannot support both a tuner and a | ||
500 | modulator. Two separate device nodes will have to be used for such | ||
501 | hardware, one that supports the tuner functionality and one that supports | ||
502 | the modulator functionality. The reason is a limitation with the | ||
503 | &VIDIOC-S-FREQUENCY; ioctl where you cannot specify whether the frequency | ||
504 | is for a tuner or a modulator.</para> | ||
496 | 505 | ||
497 | <para>To query and change modulator properties applications use | 506 | <para>To query and change modulator properties applications use |
498 | the &VIDIOC-G-MODULATOR; and &VIDIOC-S-MODULATOR; ioctl. Note that | 507 | the &VIDIOC-G-MODULATOR; and &VIDIOC-S-MODULATOR; ioctl. Note that |
diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml index ea42ef824948..faa0fd14666a 100644 --- a/Documentation/DocBook/media/v4l/compat.xml +++ b/Documentation/DocBook/media/v4l/compat.xml | |||
@@ -2377,10 +2377,11 @@ that used it. It was originally scheduled for removal in 2.6.35. | |||
2377 | <para>V4L2_CTRL_FLAG_VOLATILE was added to signal volatile controls to userspace.</para> | 2377 | <para>V4L2_CTRL_FLAG_VOLATILE was added to signal volatile controls to userspace.</para> |
2378 | </listitem> | 2378 | </listitem> |
2379 | <listitem> | 2379 | <listitem> |
2380 | <para>Add selection API for extended control over cropping and | 2380 | <para>Add selection API for extended control over cropping |
2381 | composing. Does not affect the compatibility of current drivers and | 2381 | and composing. Does not affect the compatibility of current |
2382 | applications. See <link linkend="selection-api"> selection API </link> for | 2382 | drivers and applications. See <link |
2383 | details.</para> | 2383 | linkend="selection-api"> selection API </link> for |
2384 | details.</para> | ||
2384 | </listitem> | 2385 | </listitem> |
2385 | </orderedlist> | 2386 | </orderedlist> |
2386 | </section> | 2387 | </section> |
@@ -2458,6 +2459,36 @@ details.</para> | |||
2458 | </orderedlist> | 2459 | </orderedlist> |
2459 | </section> | 2460 | </section> |
2460 | 2461 | ||
2462 | <section> | ||
2463 | <title>V4L2 in Linux 3.6</title> | ||
2464 | <orderedlist> | ||
2465 | <listitem> | ||
2466 | <para>Replaced <structfield>input</structfield> in | ||
2467 | <structname>v4l2_buffer</structname> by | ||
2468 | <structfield>reserved2</structfield> and removed | ||
2469 | <constant>V4L2_BUF_FLAG_INPUT</constant>.</para> | ||
2470 | </listitem> | ||
2471 | </orderedlist> | ||
2472 | </section> | ||
2473 | |||
2474 | <section> | ||
2475 | <title>V4L2 in Linux 3.6</title> | ||
2476 | <orderedlist> | ||
2477 | <listitem> | ||
2478 | <para>Added V4L2_CAP_VIDEO_M2M and V4L2_CAP_VIDEO_M2M_MPLANE capabilities.</para> | ||
2479 | </listitem> | ||
2480 | </orderedlist> | ||
2481 | </section> | ||
2482 | |||
2483 | <section> | ||
2484 | <title>V4L2 in Linux 3.6</title> | ||
2485 | <orderedlist> | ||
2486 | <listitem> | ||
2487 | <para>Added support for frequency band enumerations: &VIDIOC-ENUM-FREQ-BANDS;.</para> | ||
2488 | </listitem> | ||
2489 | </orderedlist> | ||
2490 | </section> | ||
2491 | |||
2461 | <section id="other"> | 2492 | <section id="other"> |
2462 | <title>Relation of V4L2 to other Linux multimedia APIs</title> | 2493 | <title>Relation of V4L2 to other Linux multimedia APIs</title> |
2463 | 2494 | ||
@@ -2587,6 +2618,9 @@ ioctls.</para> | |||
2587 | <para><link linkend="v4l2-auto-focus-area"><constant> | 2618 | <para><link linkend="v4l2-auto-focus-area"><constant> |
2588 | V4L2_CID_AUTO_FOCUS_AREA</constant></link> control.</para> | 2619 | V4L2_CID_AUTO_FOCUS_AREA</constant></link> control.</para> |
2589 | </listitem> | 2620 | </listitem> |
2621 | <listitem> | ||
2622 | <para>Support for frequency band enumeration: &VIDIOC-ENUM-FREQ-BANDS; ioctl.</para> | ||
2623 | </listitem> | ||
2590 | </itemizedlist> | 2624 | </itemizedlist> |
2591 | </section> | 2625 | </section> |
2592 | 2626 | ||
diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index cda0dfb6769a..b0964fb4e834 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml | |||
@@ -373,6 +373,11 @@ minimum value disables backlight compensation.</entry> | |||
373 | </entry> | 373 | </entry> |
374 | </row> | 374 | </row> |
375 | <row> | 375 | <row> |
376 | <entry><constant>V4L2_CID_AUTOBRIGHTNESS</constant></entry> | ||
377 | <entry>boolean</entry> | ||
378 | <entry>Enable Automatic Brightness.</entry> | ||
379 | </row> | ||
380 | <row> | ||
376 | <entry><constant>V4L2_CID_ROTATE</constant></entry> | 381 | <entry><constant>V4L2_CID_ROTATE</constant></entry> |
377 | <entry>integer</entry> | 382 | <entry>integer</entry> |
378 | <entry>Rotates the image by specified angle. Common angles are 90, | 383 | <entry>Rotates the image by specified angle. Common angles are 90, |
diff --git a/Documentation/DocBook/media/v4l/dev-subdev.xml b/Documentation/DocBook/media/v4l/dev-subdev.xml index 4afcbbec5eda..a3d9dd093268 100644 --- a/Documentation/DocBook/media/v4l/dev-subdev.xml +++ b/Documentation/DocBook/media/v4l/dev-subdev.xml | |||
@@ -276,7 +276,7 @@ | |||
276 | </para> | 276 | </para> |
277 | </section> | 277 | </section> |
278 | 278 | ||
279 | <section> | 279 | <section id="v4l2-subdev-selections"> |
280 | <title>Selections: cropping, scaling and composition</title> | 280 | <title>Selections: cropping, scaling and composition</title> |
281 | 281 | ||
282 | <para>Many sub-devices support cropping frames on their input or output | 282 | <para>Many sub-devices support cropping frames on their input or output |
@@ -290,8 +290,8 @@ | |||
290 | size. Both the coordinates and sizes are expressed in pixels.</para> | 290 | size. Both the coordinates and sizes are expressed in pixels.</para> |
291 | 291 | ||
292 | <para>As for pad formats, drivers store try and active | 292 | <para>As for pad formats, drivers store try and active |
293 | rectangles for the selection targets of ACTUAL type <xref | 293 | rectangles for the selection targets <xref |
294 | linkend="v4l2-subdev-selection-targets">.</xref></para> | 294 | linkend="v4l2-selections-common" />.</para> |
295 | 295 | ||
296 | <para>On sink pads, cropping is applied relative to the | 296 | <para>On sink pads, cropping is applied relative to the |
297 | current pad format. The pad format represents the image size as | 297 | current pad format. The pad format represents the image size as |
@@ -308,7 +308,7 @@ | |||
308 | <para>Scaling support is optional. When supported by a subdev, | 308 | <para>Scaling support is optional. When supported by a subdev, |
309 | the crop rectangle on the subdev's sink pad is scaled to the | 309 | the crop rectangle on the subdev's sink pad is scaled to the |
310 | size configured using the &VIDIOC-SUBDEV-S-SELECTION; IOCTL | 310 | size configured using the &VIDIOC-SUBDEV-S-SELECTION; IOCTL |
311 | using <constant>V4L2_SUBDEV_SEL_COMPOSE_ACTUAL</constant> | 311 | using <constant>V4L2_SEL_TGT_COMPOSE</constant> |
312 | selection target on the same pad. If the subdev supports scaling | 312 | selection target on the same pad. If the subdev supports scaling |
313 | but not composing, the top and left values are not used and must | 313 | but not composing, the top and left values are not used and must |
314 | always be set to zero.</para> | 314 | always be set to zero.</para> |
@@ -323,32 +323,32 @@ | |||
323 | <para>The drivers should always use the closest possible | 323 | <para>The drivers should always use the closest possible |
324 | rectangle the user requests on all selection targets, unless | 324 | rectangle the user requests on all selection targets, unless |
325 | specifically told otherwise. | 325 | specifically told otherwise. |
326 | <constant>V4L2_SUBDEV_SEL_FLAG_SIZE_GE</constant> and | 326 | <constant>V4L2_SEL_FLAG_GE</constant> and |
327 | <constant>V4L2_SUBDEV_SEL_FLAG_SIZE_LE</constant> flags may be | 327 | <constant>V4L2_SEL_FLAG_LE</constant> flags may be |
328 | used to round the image size either up or down. <xref | 328 | used to round the image size either up or down. <xref |
329 | linkend="v4l2-subdev-selection-flags"></xref></para> | 329 | linkend="v4l2-selection-flags" /></para> |
330 | </section> | 330 | </section> |
331 | 331 | ||
332 | <section> | 332 | <section> |
333 | <title>Types of selection targets</title> | 333 | <title>Types of selection targets</title> |
334 | 334 | ||
335 | <section> | 335 | <section> |
336 | <title>ACTUAL targets</title> | 336 | <title>Actual targets</title> |
337 | 337 | ||
338 | <para>ACTUAL targets reflect the actual hardware configuration | 338 | <para>Actual targets (without a postfix) reflect the actual |
339 | at any point of time. There is a BOUNDS target | 339 | hardware configuration at any point of time. There is a BOUNDS |
340 | corresponding to every ACTUAL.</para> | 340 | target corresponding to every actual target.</para> |
341 | </section> | 341 | </section> |
342 | 342 | ||
343 | <section> | 343 | <section> |
344 | <title>BOUNDS targets</title> | 344 | <title>BOUNDS targets</title> |
345 | 345 | ||
346 | <para>BOUNDS targets is the smallest rectangle that contains | 346 | <para>BOUNDS targets is the smallest rectangle that contains all |
347 | all valid ACTUAL rectangles. It may not be possible to set the | 347 | valid actual rectangles. It may not be possible to set the actual |
348 | ACTUAL rectangle as large as the BOUNDS rectangle, however. | 348 | rectangle as large as the BOUNDS rectangle, however. This may be |
349 | This may be because e.g. a sensor's pixel array is not | 349 | because e.g. a sensor's pixel array is not rectangular but |
350 | rectangular but cross-shaped or round. The maximum size may | 350 | cross-shaped or round. The maximum size may also be smaller than the |
351 | also be smaller than the BOUNDS rectangle.</para> | 351 | BOUNDS rectangle.</para> |
352 | </section> | 352 | </section> |
353 | 353 | ||
354 | </section> | 354 | </section> |
@@ -362,7 +362,7 @@ | |||
362 | performed by the user: the changes made will be propagated to | 362 | performed by the user: the changes made will be propagated to |
363 | any subsequent stages. If this behaviour is not desired, the | 363 | any subsequent stages. If this behaviour is not desired, the |
364 | user must set | 364 | user must set |
365 | <constant>V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG</constant> flag. This | 365 | <constant>V4L2_SEL_FLAG_KEEP_CONFIG</constant> flag. This |
366 | flag causes no propagation of the changes are allowed in any | 366 | flag causes no propagation of the changes are allowed in any |
367 | circumstances. This may also cause the accessed rectangle to be | 367 | circumstances. This may also cause the accessed rectangle to be |
368 | adjusted by the driver, depending on the properties of the | 368 | adjusted by the driver, depending on the properties of the |
diff --git a/Documentation/DocBook/media/v4l/io.xml b/Documentation/DocBook/media/v4l/io.xml index fd6aca2922b6..1885cc0755cb 100644 --- a/Documentation/DocBook/media/v4l/io.xml +++ b/Documentation/DocBook/media/v4l/io.xml | |||
@@ -683,14 +683,12 @@ memory, set by the application. See <xref linkend="userp" /> for details. | |||
683 | </row> | 683 | </row> |
684 | <row> | 684 | <row> |
685 | <entry>__u32</entry> | 685 | <entry>__u32</entry> |
686 | <entry><structfield>input</structfield></entry> | 686 | <entry><structfield>reserved2</structfield></entry> |
687 | <entry></entry> | 687 | <entry></entry> |
688 | <entry>Some video capture drivers support rapid and | 688 | <entry>A place holder for future extensions and custom |
689 | synchronous video input changes, a function useful for example in | 689 | (driver defined) buffer types |
690 | video surveillance applications. For this purpose applications set the | 690 | <constant>V4L2_BUF_TYPE_PRIVATE</constant> and higher. Applications |
691 | <constant>V4L2_BUF_FLAG_INPUT</constant> flag, and this field to the | 691 | should set this to 0.</entry> |
692 | number of a video input as in &v4l2-input; field | ||
693 | <structfield>index</structfield>.</entry> | ||
694 | </row> | 692 | </row> |
695 | <row> | 693 | <row> |
696 | <entry>__u32</entry> | 694 | <entry>__u32</entry> |
@@ -923,13 +921,6 @@ Drivers set or clear this flag when the <constant>VIDIOC_DQBUF</constant> | |||
923 | ioctl is called.</entry> | 921 | ioctl is called.</entry> |
924 | </row> | 922 | </row> |
925 | <row> | 923 | <row> |
926 | <entry><constant>V4L2_BUF_FLAG_INPUT</constant></entry> | ||
927 | <entry>0x0200</entry> | ||
928 | <entry>The <structfield>input</structfield> field is valid. | ||
929 | Applications set or clear this flag before calling the | ||
930 | <constant>VIDIOC_QBUF</constant> ioctl.</entry> | ||
931 | </row> | ||
932 | <row> | ||
933 | <entry><constant>V4L2_BUF_FLAG_PREPARED</constant></entry> | 924 | <entry><constant>V4L2_BUF_FLAG_PREPARED</constant></entry> |
934 | <entry>0x0400</entry> | 925 | <entry>0x0400</entry> |
935 | <entry>The buffer has been prepared for I/O and can be queued by the | 926 | <entry>The buffer has been prepared for I/O and can be queued by the |
diff --git a/Documentation/DocBook/media/v4l/selection-api.xml b/Documentation/DocBook/media/v4l/selection-api.xml index b299e4779354..e7ed5077834d 100644 --- a/Documentation/DocBook/media/v4l/selection-api.xml +++ b/Documentation/DocBook/media/v4l/selection-api.xml | |||
@@ -53,11 +53,11 @@ cropping and composing rectangles have the same size.</para> | |||
53 | </mediaobject> | 53 | </mediaobject> |
54 | </figure> | 54 | </figure> |
55 | 55 | ||
56 | For complete list of the available selection targets see table <xref | ||
57 | linkend="v4l2-sel-target"/> | ||
58 | |||
59 | </section> | 56 | </section> |
60 | 57 | ||
58 | See <xref linkend="v4l2-selection-targets" /> for more | ||
59 | information. | ||
60 | |||
61 | <section> | 61 | <section> |
62 | 62 | ||
63 | <title>Configuration</title> | 63 | <title>Configuration</title> |
@@ -74,7 +74,7 @@ cropping/composing rectangles may have to be aligned, and both the source and | |||
74 | the sink may have arbitrary upper and lower size limits. Therefore, as usual, | 74 | the sink may have arbitrary upper and lower size limits. Therefore, as usual, |
75 | drivers are expected to adjust the requested parameters and return the actual | 75 | drivers are expected to adjust the requested parameters and return the actual |
76 | values selected. An application can control the rounding behaviour using <link | 76 | values selected. An application can control the rounding behaviour using <link |
77 | linkend="v4l2-sel-flags"> constraint flags </link>.</para> | 77 | linkend="v4l2-selection-flags"> constraint flags </link>.</para> |
78 | 78 | ||
79 | <section> | 79 | <section> |
80 | 80 | ||
@@ -91,7 +91,7 @@ top/left corner at position <constant> (0,0) </constant>. The rectangle's | |||
91 | coordinates are expressed in pixels.</para> | 91 | coordinates are expressed in pixels.</para> |
92 | 92 | ||
93 | <para>The top left corner, width and height of the source rectangle, that is | 93 | <para>The top left corner, width and height of the source rectangle, that is |
94 | the area actually sampled, is given by the <constant> V4L2_SEL_TGT_CROP_ACTIVE | 94 | the area actually sampled, is given by the <constant> V4L2_SEL_TGT_CROP |
95 | </constant> target. It uses the same coordinate system as <constant> | 95 | </constant> target. It uses the same coordinate system as <constant> |
96 | V4L2_SEL_TGT_CROP_BOUNDS </constant>. The active cropping area must lie | 96 | V4L2_SEL_TGT_CROP_BOUNDS </constant>. The active cropping area must lie |
97 | completely inside the capture boundaries. The driver may further adjust the | 97 | completely inside the capture boundaries. The driver may further adjust the |
@@ -111,13 +111,13 @@ height are equal to the image size set by <constant> VIDIOC_S_FMT </constant>. | |||
111 | </para> | 111 | </para> |
112 | 112 | ||
113 | <para>The part of a buffer into which the image is inserted by the hardware is | 113 | <para>The part of a buffer into which the image is inserted by the hardware is |
114 | controlled by the <constant> V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> target. | 114 | controlled by the <constant> V4L2_SEL_TGT_COMPOSE </constant> target. |
115 | The rectangle's coordinates are also expressed in the same coordinate system as | 115 | The rectangle's coordinates are also expressed in the same coordinate system as |
116 | the bounds rectangle. The composing rectangle must lie completely inside bounds | 116 | the bounds rectangle. The composing rectangle must lie completely inside bounds |
117 | rectangle. The driver must adjust the composing rectangle to fit to the | 117 | rectangle. The driver must adjust the composing rectangle to fit to the |
118 | bounding limits. Moreover, the driver can perform other adjustments according | 118 | bounding limits. Moreover, the driver can perform other adjustments according |
119 | to hardware limitations. The application can control rounding behaviour using | 119 | to hardware limitations. The application can control rounding behaviour using |
120 | <link linkend="v4l2-sel-flags"> constraint flags </link>.</para> | 120 | <link linkend="v4l2-selection-flags"> constraint flags </link>.</para> |
121 | 121 | ||
122 | <para>For capture devices the default composing rectangle is queried using | 122 | <para>For capture devices the default composing rectangle is queried using |
123 | <constant> V4L2_SEL_TGT_COMPOSE_DEFAULT </constant>. It is usually equal to the | 123 | <constant> V4L2_SEL_TGT_COMPOSE_DEFAULT </constant>. It is usually equal to the |
@@ -125,7 +125,7 @@ bounding rectangle.</para> | |||
125 | 125 | ||
126 | <para>The part of a buffer that is modified by the hardware is given by | 126 | <para>The part of a buffer that is modified by the hardware is given by |
127 | <constant> V4L2_SEL_TGT_COMPOSE_PADDED </constant>. It contains all pixels | 127 | <constant> V4L2_SEL_TGT_COMPOSE_PADDED </constant>. It contains all pixels |
128 | defined using <constant> V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> plus all | 128 | defined using <constant> V4L2_SEL_TGT_COMPOSE </constant> plus all |
129 | padding data modified by hardware during insertion process. All pixels outside | 129 | padding data modified by hardware during insertion process. All pixels outside |
130 | this rectangle <emphasis>must not</emphasis> be changed by the hardware. The | 130 | this rectangle <emphasis>must not</emphasis> be changed by the hardware. The |
131 | content of pixels that lie inside the padded area but outside active area is | 131 | content of pixels that lie inside the padded area but outside active area is |
@@ -153,7 +153,7 @@ specified using <constant> VIDIOC_S_FMT </constant> ioctl.</para> | |||
153 | 153 | ||
154 | <para>The top left corner, width and height of the source rectangle, that is | 154 | <para>The top left corner, width and height of the source rectangle, that is |
155 | the area from which image date are processed by the hardware, is given by the | 155 | the area from which image date are processed by the hardware, is given by the |
156 | <constant> V4L2_SEL_TGT_CROP_ACTIVE </constant>. Its coordinates are expressed | 156 | <constant> V4L2_SEL_TGT_CROP </constant>. Its coordinates are expressed |
157 | in in the same coordinate system as the bounds rectangle. The active cropping | 157 | in in the same coordinate system as the bounds rectangle. The active cropping |
158 | area must lie completely inside the crop boundaries and the driver may further | 158 | area must lie completely inside the crop boundaries and the driver may further |
159 | adjust the requested size and/or position according to hardware | 159 | adjust the requested size and/or position according to hardware |
@@ -165,7 +165,7 @@ bounding rectangle.</para> | |||
165 | 165 | ||
166 | <para>The part of a video signal or graphics display where the image is | 166 | <para>The part of a video signal or graphics display where the image is |
167 | inserted by the hardware is controlled by <constant> | 167 | inserted by the hardware is controlled by <constant> |
168 | V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> target. The rectangle's coordinates | 168 | V4L2_SEL_TGT_COMPOSE </constant> target. The rectangle's coordinates |
169 | are expressed in pixels. The composing rectangle must lie completely inside the | 169 | are expressed in pixels. The composing rectangle must lie completely inside the |
170 | bounds rectangle. The driver must adjust the area to fit to the bounding | 170 | bounds rectangle. The driver must adjust the area to fit to the bounding |
171 | limits. Moreover, the driver can perform other adjustments according to | 171 | limits. Moreover, the driver can perform other adjustments according to |
@@ -184,7 +184,7 @@ such a padded area is driver-dependent feature not covered by this document. | |||
184 | Driver developers are encouraged to keep padded rectangle equal to active one. | 184 | Driver developers are encouraged to keep padded rectangle equal to active one. |
185 | The padded target is accessed by the <constant> V4L2_SEL_TGT_COMPOSE_PADDED | 185 | The padded target is accessed by the <constant> V4L2_SEL_TGT_COMPOSE_PADDED |
186 | </constant> identifier. It must contain all pixels from the <constant> | 186 | </constant> identifier. It must contain all pixels from the <constant> |
187 | V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> target.</para> | 187 | V4L2_SEL_TGT_COMPOSE </constant> target.</para> |
188 | 188 | ||
189 | </section> | 189 | </section> |
190 | 190 | ||
@@ -193,8 +193,8 @@ V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> target.</para> | |||
193 | <title>Scaling control</title> | 193 | <title>Scaling control</title> |
194 | 194 | ||
195 | <para>An application can detect if scaling is performed by comparing the width | 195 | <para>An application can detect if scaling is performed by comparing the width |
196 | and the height of rectangles obtained using <constant> V4L2_SEL_TGT_CROP_ACTIVE | 196 | and the height of rectangles obtained using <constant> V4L2_SEL_TGT_CROP |
197 | </constant> and <constant> V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> targets. If | 197 | </constant> and <constant> V4L2_SEL_TGT_COMPOSE </constant> targets. If |
198 | these are not equal then the scaling is applied. The application can compute | 198 | these are not equal then the scaling is applied. The application can compute |
199 | the scaling ratios using these values.</para> | 199 | the scaling ratios using these values.</para> |
200 | 200 | ||
@@ -252,7 +252,7 @@ area)</para> | |||
252 | ret = ioctl(fd, &VIDIOC-G-SELECTION;, &sel); | 252 | ret = ioctl(fd, &VIDIOC-G-SELECTION;, &sel); |
253 | if (ret) | 253 | if (ret) |
254 | exit(-1); | 254 | exit(-1); |
255 | sel.target = V4L2_SEL_TGT_CROP_ACTIVE; | 255 | sel.target = V4L2_SEL_TGT_CROP; |
256 | ret = ioctl(fd, &VIDIOC-S-SELECTION;, &sel); | 256 | ret = ioctl(fd, &VIDIOC-S-SELECTION;, &sel); |
257 | if (ret) | 257 | if (ret) |
258 | exit(-1); | 258 | exit(-1); |
@@ -281,7 +281,7 @@ area)</para> | |||
281 | r.left = sel.r.width / 4; | 281 | r.left = sel.r.width / 4; |
282 | r.top = sel.r.height / 4; | 282 | r.top = sel.r.height / 4; |
283 | sel.r = r; | 283 | sel.r = r; |
284 | sel.target = V4L2_SEL_TGT_COMPOSE_ACTIVE; | 284 | sel.target = V4L2_SEL_TGT_COMPOSE; |
285 | sel.flags = V4L2_SEL_FLAG_LE; | 285 | sel.flags = V4L2_SEL_FLAG_LE; |
286 | ret = ioctl(fd, &VIDIOC-S-SELECTION;, &sel); | 286 | ret = ioctl(fd, &VIDIOC-S-SELECTION;, &sel); |
287 | if (ret) | 287 | if (ret) |
@@ -298,11 +298,11 @@ V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> for other devices</para> | |||
298 | 298 | ||
299 | &v4l2-selection; compose = { | 299 | &v4l2-selection; compose = { |
300 | .type = V4L2_BUF_TYPE_VIDEO_OUTPUT, | 300 | .type = V4L2_BUF_TYPE_VIDEO_OUTPUT, |
301 | .target = V4L2_SEL_TGT_COMPOSE_ACTIVE, | 301 | .target = V4L2_SEL_TGT_COMPOSE, |
302 | }; | 302 | }; |
303 | &v4l2-selection; crop = { | 303 | &v4l2-selection; crop = { |
304 | .type = V4L2_BUF_TYPE_VIDEO_OUTPUT, | 304 | .type = V4L2_BUF_TYPE_VIDEO_OUTPUT, |
305 | .target = V4L2_SEL_TGT_CROP_ACTIVE, | 305 | .target = V4L2_SEL_TGT_CROP, |
306 | }; | 306 | }; |
307 | double hscale, vscale; | 307 | double hscale, vscale; |
308 | 308 | ||
diff --git a/Documentation/DocBook/media/v4l/selections-common.xml b/Documentation/DocBook/media/v4l/selections-common.xml new file mode 100644 index 000000000000..7502f784b8cc --- /dev/null +++ b/Documentation/DocBook/media/v4l/selections-common.xml | |||
@@ -0,0 +1,164 @@ | |||
1 | <section id="v4l2-selections-common"> | ||
2 | |||
3 | <title>Common selection definitions</title> | ||
4 | |||
5 | <para>While the <link linkend="selection-api">V4L2 selection | ||
6 | API</link> and <link linkend="v4l2-subdev-selections">V4L2 subdev | ||
7 | selection APIs</link> are very similar, there's one fundamental | ||
8 | difference between the two. On sub-device API, the selection | ||
9 | rectangle refers to the media bus format, and is bound to a | ||
10 | sub-device's pad. On the V4L2 interface the selection rectangles | ||
11 | refer to the in-memory pixel format.</para> | ||
12 | |||
13 | <para>This section defines the common definitions of the | ||
14 | selection interfaces on the two APIs.</para> | ||
15 | |||
16 | <section id="v4l2-selection-targets"> | ||
17 | |||
18 | <title>Selection targets</title> | ||
19 | |||
20 | <para>The precise meaning of the selection targets may be | ||
21 | dependent on which of the two interfaces they are used.</para> | ||
22 | |||
23 | <table pgwide="1" frame="none" id="v4l2-selection-targets-table"> | ||
24 | <title>Selection target definitions</title> | ||
25 | <tgroup cols="5"> | ||
26 | <colspec colname="c1" /> | ||
27 | <colspec colname="c2" /> | ||
28 | <colspec colname="c3" /> | ||
29 | <colspec colname="c4" /> | ||
30 | <colspec colname="c5" /> | ||
31 | &cs-def; | ||
32 | <thead> | ||
33 | <row rowsep="1"> | ||
34 | <entry align="left">Target name</entry> | ||
35 | <entry align="left">id</entry> | ||
36 | <entry align="left">Definition</entry> | ||
37 | <entry align="left">Valid for V4L2</entry> | ||
38 | <entry align="left">Valid for V4L2 subdev</entry> | ||
39 | </row> | ||
40 | </thead> | ||
41 | <tbody valign="top"> | ||
42 | <row> | ||
43 | <entry><constant>V4L2_SEL_TGT_CROP</constant></entry> | ||
44 | <entry>0x0000</entry> | ||
45 | <entry>Crop rectangle. Defines the cropped area.</entry> | ||
46 | <entry>Yes</entry> | ||
47 | <entry>Yes</entry> | ||
48 | </row> | ||
49 | <row> | ||
50 | <entry><constant>V4L2_SEL_TGT_CROP_DEFAULT</constant></entry> | ||
51 | <entry>0x0001</entry> | ||
52 | <entry>Suggested cropping rectangle that covers the "whole picture".</entry> | ||
53 | <entry>Yes</entry> | ||
54 | <entry>No</entry> | ||
55 | </row> | ||
56 | <row> | ||
57 | <entry><constant>V4L2_SEL_TGT_CROP_BOUNDS</constant></entry> | ||
58 | <entry>0x0002</entry> | ||
59 | <entry>Bounds of the crop rectangle. All valid crop | ||
60 | rectangles fit inside the crop bounds rectangle. | ||
61 | </entry> | ||
62 | <entry>Yes</entry> | ||
63 | <entry>Yes</entry> | ||
64 | </row> | ||
65 | <row> | ||
66 | <entry><constant>V4L2_SEL_TGT_COMPOSE</constant></entry> | ||
67 | <entry>0x0100</entry> | ||
68 | <entry>Compose rectangle. Used to configure scaling | ||
69 | and composition.</entry> | ||
70 | <entry>Yes</entry> | ||
71 | <entry>Yes</entry> | ||
72 | </row> | ||
73 | <row> | ||
74 | <entry><constant>V4L2_SEL_TGT_COMPOSE_DEFAULT</constant></entry> | ||
75 | <entry>0x0101</entry> | ||
76 | <entry>Suggested composition rectangle that covers the "whole picture".</entry> | ||
77 | <entry>Yes</entry> | ||
78 | <entry>No</entry> | ||
79 | </row> | ||
80 | <row> | ||
81 | <entry><constant>V4L2_SEL_TGT_COMPOSE_BOUNDS</constant></entry> | ||
82 | <entry>0x0102</entry> | ||
83 | <entry>Bounds of the compose rectangle. All valid compose | ||
84 | rectangles fit inside the compose bounds rectangle.</entry> | ||
85 | <entry>Yes</entry> | ||
86 | <entry>Yes</entry> | ||
87 | </row> | ||
88 | <row> | ||
89 | <entry><constant>V4L2_SEL_TGT_COMPOSE_PADDED</constant></entry> | ||
90 | <entry>0x0103</entry> | ||
91 | <entry>The active area and all padding pixels that are inserted or | ||
92 | modified by hardware.</entry> | ||
93 | <entry>Yes</entry> | ||
94 | <entry>No</entry> | ||
95 | </row> | ||
96 | </tbody> | ||
97 | </tgroup> | ||
98 | </table> | ||
99 | |||
100 | </section> | ||
101 | |||
102 | <section id="v4l2-selection-flags"> | ||
103 | |||
104 | <title>Selection flags</title> | ||
105 | |||
106 | <table pgwide="1" frame="none" id="v4l2-selection-flags-table"> | ||
107 | <title>Selection flag definitions</title> | ||
108 | <tgroup cols="5"> | ||
109 | <colspec colname="c1" /> | ||
110 | <colspec colname="c2" /> | ||
111 | <colspec colname="c3" /> | ||
112 | <colspec colname="c4" /> | ||
113 | <colspec colname="c5" /> | ||
114 | &cs-def; | ||
115 | <thead> | ||
116 | <row rowsep="1"> | ||
117 | <entry align="left">Flag name</entry> | ||
118 | <entry align="left">id</entry> | ||
119 | <entry align="left">Definition</entry> | ||
120 | <entry align="left">Valid for V4L2</entry> | ||
121 | <entry align="left">Valid for V4L2 subdev</entry> | ||
122 | </row> | ||
123 | </thead> | ||
124 | <tbody valign="top"> | ||
125 | <row> | ||
126 | <entry><constant>V4L2_SEL_FLAG_GE</constant></entry> | ||
127 | <entry>(1 << 0)</entry> | ||
128 | <entry>Suggest the driver it should choose greater or | ||
129 | equal rectangle (in size) than was requested. Albeit the | ||
130 | driver may choose a lesser size, it will only do so due to | ||
131 | hardware limitations. Without this flag (and | ||
132 | <constant>V4L2_SEL_FLAG_LE</constant>) the | ||
133 | behaviour is to choose the closest possible | ||
134 | rectangle.</entry> | ||
135 | <entry>Yes</entry> | ||
136 | <entry>Yes</entry> | ||
137 | </row> | ||
138 | <row> | ||
139 | <entry><constant>V4L2_SEL_FLAG_LE</constant></entry> | ||
140 | <entry>(1 << 1)</entry> | ||
141 | <entry>Suggest the driver it | ||
142 | should choose lesser or equal rectangle (in size) than was | ||
143 | requested. Albeit the driver may choose a greater size, it | ||
144 | will only do so due to hardware limitations.</entry> | ||
145 | <entry>Yes</entry> | ||
146 | <entry>Yes</entry> | ||
147 | </row> | ||
148 | <row> | ||
149 | <entry><constant>V4L2_SEL_FLAG_KEEP_CONFIG</constant></entry> | ||
150 | <entry>(1 << 2)</entry> | ||
151 | <entry>The configuration must not be propagated to any | ||
152 | further processing steps. If this flag is not given, the | ||
153 | configuration is propagated inside the subdevice to all | ||
154 | further processing steps.</entry> | ||
155 | <entry>No</entry> | ||
156 | <entry>Yes</entry> | ||
157 | </row> | ||
158 | </tbody> | ||
159 | </tgroup> | ||
160 | </table> | ||
161 | |||
162 | </section> | ||
163 | |||
164 | </section> | ||
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml index 008c2d73a484..eee6908c749f 100644 --- a/Documentation/DocBook/media/v4l/v4l2.xml +++ b/Documentation/DocBook/media/v4l/v4l2.xml | |||
@@ -140,6 +140,11 @@ structs, ioctls) must be noted in more detail in the history chapter | |||
140 | applications. --> | 140 | applications. --> |
141 | 141 | ||
142 | <revision> | 142 | <revision> |
143 | <revnumber>3.6</revnumber> | ||
144 | <date>2012-07-02</date> | ||
145 | <authorinitials>hv</authorinitials> | ||
146 | <revremark>Added VIDIOC_ENUM_FREQ_BANDS. | ||
147 | </revremark> | ||
143 | <revnumber>3.5</revnumber> | 148 | <revnumber>3.5</revnumber> |
144 | <date>2012-05-07</date> | 149 | <date>2012-05-07</date> |
145 | <authorinitials>sa, sn</authorinitials> | 150 | <authorinitials>sa, sn</authorinitials> |
@@ -534,6 +539,7 @@ and discussions on the V4L mailing list.</revremark> | |||
534 | &sub-enum-fmt; | 539 | &sub-enum-fmt; |
535 | &sub-enum-framesizes; | 540 | &sub-enum-framesizes; |
536 | &sub-enum-frameintervals; | 541 | &sub-enum-frameintervals; |
542 | &sub-enum-freq-bands; | ||
537 | &sub-enuminput; | 543 | &sub-enuminput; |
538 | &sub-enumoutput; | 544 | &sub-enumoutput; |
539 | &sub-enumstd; | 545 | &sub-enumstd; |
@@ -589,6 +595,11 @@ and discussions on the V4L mailing list.</revremark> | |||
589 | &sub-write; | 595 | &sub-write; |
590 | </appendix> | 596 | </appendix> |
591 | 597 | ||
598 | <appendix> | ||
599 | <title>Common definitions for V4L2 and V4L2 subdev interfaces</title> | ||
600 | &sub-selections-common; | ||
601 | </appendix> | ||
602 | |||
592 | <appendix id="videodev"> | 603 | <appendix id="videodev"> |
593 | <title>Video For Linux Two Header File</title> | 604 | <title>Video For Linux Two Header File</title> |
594 | &sub-videodev2-h; | 605 | &sub-videodev2-h; |
diff --git a/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml b/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml index a2474ecb574a..a8cda1acacd9 100644 --- a/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml +++ b/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml | |||
@@ -64,7 +64,7 @@ different sizes.</para> | |||
64 | <para>To allocate device buffers applications initialize relevant fields of | 64 | <para>To allocate device buffers applications initialize relevant fields of |
65 | the <structname>v4l2_create_buffers</structname> structure. They set the | 65 | the <structname>v4l2_create_buffers</structname> structure. They set the |
66 | <structfield>type</structfield> field in the | 66 | <structfield>type</structfield> field in the |
67 | <structname>v4l2_format</structname> structure, embedded in this | 67 | &v4l2-format; structure, embedded in this |
68 | structure, to the respective stream or buffer type. | 68 | structure, to the respective stream or buffer type. |
69 | <structfield>count</structfield> must be set to the number of required buffers. | 69 | <structfield>count</structfield> must be set to the number of required buffers. |
70 | <structfield>memory</structfield> specifies the required I/O method. The | 70 | <structfield>memory</structfield> specifies the required I/O method. The |
@@ -97,7 +97,13 @@ information.</para> | |||
97 | <row> | 97 | <row> |
98 | <entry>__u32</entry> | 98 | <entry>__u32</entry> |
99 | <entry><structfield>count</structfield></entry> | 99 | <entry><structfield>count</structfield></entry> |
100 | <entry>The number of buffers requested or granted.</entry> | 100 | <entry>The number of buffers requested or granted. If count == 0, then |
101 | <constant>VIDIOC_CREATE_BUFS</constant> will set <structfield>index</structfield> | ||
102 | to the current number of created buffers, and it will check the validity of | ||
103 | <structfield>memory</structfield> and <structfield>format.type</structfield>. | ||
104 | If those are invalid -1 is returned and errno is set to &EINVAL;, | ||
105 | otherwise <constant>VIDIOC_CREATE_BUFS</constant> returns 0. It will | ||
106 | never set errno to &EBUSY; in this particular case.</entry> | ||
101 | </row> | 107 | </row> |
102 | <row> | 108 | <row> |
103 | <entry>__u32</entry> | 109 | <entry>__u32</entry> |
@@ -108,7 +114,7 @@ information.</para> | |||
108 | /></entry> | 114 | /></entry> |
109 | </row> | 115 | </row> |
110 | <row> | 116 | <row> |
111 | <entry>struct v4l2_format</entry> | 117 | <entry>&v4l2-format;</entry> |
112 | <entry><structfield>format</structfield></entry> | 118 | <entry><structfield>format</structfield></entry> |
113 | <entry>Filled in by the application, preserved by the driver.</entry> | 119 | <entry>Filled in by the application, preserved by the driver.</entry> |
114 | </row> | 120 | </row> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-dv-timings-cap.xml b/Documentation/DocBook/media/v4l/vidioc-dv-timings-cap.xml index 6673ce582050..cd7720d404ea 100644 --- a/Documentation/DocBook/media/v4l/vidioc-dv-timings-cap.xml +++ b/Documentation/DocBook/media/v4l/vidioc-dv-timings-cap.xml | |||
@@ -54,15 +54,9 @@ | |||
54 | interface and may change in the future.</para> | 54 | interface and may change in the future.</para> |
55 | </note> | 55 | </note> |
56 | 56 | ||
57 | <para>To query the available timings, applications initialize the | 57 | <para>To query the capabilities of the DV receiver/transmitter applications can call |
58 | <structfield>index</structfield> field and zero the reserved array of &v4l2-dv-timings-cap; | 58 | this ioctl and the driver will fill in the structure. Note that drivers may return |
59 | and call the <constant>VIDIOC_DV_TIMINGS_CAP</constant> ioctl with a pointer to this | 59 | different values after switching the video input or output.</para> |
60 | structure. Drivers fill the rest of the structure or return an | ||
61 | &EINVAL; when the index is out of bounds. To enumerate all supported DV timings, | ||
62 | applications shall begin at index zero, incrementing by one until the | ||
63 | driver returns <errorcode>EINVAL</errorcode>. Note that drivers may enumerate a | ||
64 | different set of DV timings after switching the video input or | ||
65 | output.</para> | ||
66 | 60 | ||
67 | <table pgwide="1" frame="none" id="v4l2-bt-timings-cap"> | 61 | <table pgwide="1" frame="none" id="v4l2-bt-timings-cap"> |
68 | <title>struct <structname>v4l2_bt_timings_cap</structname></title> | 62 | <title>struct <structname>v4l2_bt_timings_cap</structname></title> |
@@ -115,7 +109,7 @@ output.</para> | |||
115 | <row> | 109 | <row> |
116 | <entry>__u32</entry> | 110 | <entry>__u32</entry> |
117 | <entry><structfield>reserved</structfield>[16]</entry> | 111 | <entry><structfield>reserved</structfield>[16]</entry> |
118 | <entry></entry> | 112 | <entry>Reserved for future extensions. Drivers must set the array to zero.</entry> |
119 | </row> | 113 | </row> |
120 | </tbody> | 114 | </tbody> |
121 | </tgroup> | 115 | </tgroup> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-enum-freq-bands.xml b/Documentation/DocBook/media/v4l/vidioc-enum-freq-bands.xml new file mode 100644 index 000000000000..6541ba0175ed --- /dev/null +++ b/Documentation/DocBook/media/v4l/vidioc-enum-freq-bands.xml | |||
@@ -0,0 +1,179 @@ | |||
1 | <refentry id="vidioc-enum-freq-bands"> | ||
2 | <refmeta> | ||
3 | <refentrytitle>ioctl VIDIOC_ENUM_FREQ_BANDS</refentrytitle> | ||
4 | &manvol; | ||
5 | </refmeta> | ||
6 | |||
7 | <refnamediv> | ||
8 | <refname>VIDIOC_ENUM_FREQ_BANDS</refname> | ||
9 | <refpurpose>Enumerate supported frequency bands</refpurpose> | ||
10 | </refnamediv> | ||
11 | |||
12 | <refsynopsisdiv> | ||
13 | <funcsynopsis> | ||
14 | <funcprototype> | ||
15 | <funcdef>int <function>ioctl</function></funcdef> | ||
16 | <paramdef>int <parameter>fd</parameter></paramdef> | ||
17 | <paramdef>int <parameter>request</parameter></paramdef> | ||
18 | <paramdef>struct v4l2_frequency_band | ||
19 | *<parameter>argp</parameter></paramdef> | ||
20 | </funcprototype> | ||
21 | </funcsynopsis> | ||
22 | </refsynopsisdiv> | ||
23 | |||
24 | <refsect1> | ||
25 | <title>Arguments</title> | ||
26 | |||
27 | <variablelist> | ||
28 | <varlistentry> | ||
29 | <term><parameter>fd</parameter></term> | ||
30 | <listitem> | ||
31 | <para>&fd;</para> | ||
32 | </listitem> | ||
33 | </varlistentry> | ||
34 | <varlistentry> | ||
35 | <term><parameter>request</parameter></term> | ||
36 | <listitem> | ||
37 | <para>VIDIOC_ENUM_FREQ_BANDS</para> | ||
38 | </listitem> | ||
39 | </varlistentry> | ||
40 | <varlistentry> | ||
41 | <term><parameter>argp</parameter></term> | ||
42 | <listitem> | ||
43 | <para></para> | ||
44 | </listitem> | ||
45 | </varlistentry> | ||
46 | </variablelist> | ||
47 | </refsect1> | ||
48 | |||
49 | <refsect1> | ||
50 | <title>Description</title> | ||
51 | |||
52 | <note> | ||
53 | <title>Experimental</title> | ||
54 | <para>This is an <link linkend="experimental"> experimental </link> | ||
55 | interface and may change in the future.</para> | ||
56 | </note> | ||
57 | |||
58 | <para>Enumerates the frequency bands that a tuner or modulator supports. | ||
59 | To do this applications initialize the <structfield>tuner</structfield>, | ||
60 | <structfield>type</structfield> and <structfield>index</structfield> fields, | ||
61 | and zero out the <structfield>reserved</structfield> array of a &v4l2-frequency-band; and | ||
62 | call the <constant>VIDIOC_ENUM_FREQ_BANDS</constant> ioctl with a pointer | ||
63 | to this structure.</para> | ||
64 | |||
65 | <para>This ioctl is supported if the <constant>V4L2_TUNER_CAP_FREQ_BANDS</constant> capability | ||
66 | of the corresponding tuner/modulator is set.</para> | ||
67 | |||
68 | <table pgwide="1" frame="none" id="v4l2-frequency-band"> | ||
69 | <title>struct <structname>v4l2_frequency_band</structname></title> | ||
70 | <tgroup cols="3"> | ||
71 | &cs-str; | ||
72 | <tbody valign="top"> | ||
73 | <row> | ||
74 | <entry>__u32</entry> | ||
75 | <entry><structfield>tuner</structfield></entry> | ||
76 | <entry>The tuner or modulator index number. This is the | ||
77 | same value as in the &v4l2-input; <structfield>tuner</structfield> | ||
78 | field and the &v4l2-tuner; <structfield>index</structfield> field, or | ||
79 | the &v4l2-output; <structfield>modulator</structfield> field and the | ||
80 | &v4l2-modulator; <structfield>index</structfield> field.</entry> | ||
81 | </row> | ||
82 | <row> | ||
83 | <entry>__u32</entry> | ||
84 | <entry><structfield>type</structfield></entry> | ||
85 | <entry>The tuner type. This is the same value as in the | ||
86 | &v4l2-tuner; <structfield>type</structfield> field. The type must be set | ||
87 | to <constant>V4L2_TUNER_RADIO</constant> for <filename>/dev/radioX</filename> | ||
88 | device nodes, and to <constant>V4L2_TUNER_ANALOG_TV</constant> | ||
89 | for all others. Set this field to <constant>V4L2_TUNER_RADIO</constant> for | ||
90 | modulators (currently only radio modulators are supported). | ||
91 | See <xref linkend="v4l2-tuner-type" /></entry> | ||
92 | </row> | ||
93 | <row> | ||
94 | <entry>__u32</entry> | ||
95 | <entry><structfield>index</structfield></entry> | ||
96 | <entry>Identifies the frequency band, set by the application.</entry> | ||
97 | </row> | ||
98 | <row> | ||
99 | <entry>__u32</entry> | ||
100 | <entry><structfield>capability</structfield></entry> | ||
101 | <entry spanname="hspan">The tuner/modulator capability flags for | ||
102 | this frequency band, see <xref linkend="tuner-capability" />. The <constant>V4L2_TUNER_CAP_LOW</constant> | ||
103 | capability must be the same for all frequency bands of the selected tuner/modulator. | ||
104 | So either all bands have that capability set, or none of them have that capability.</entry> | ||
105 | </row> | ||
106 | <row> | ||
107 | <entry>__u32</entry> | ||
108 | <entry><structfield>rangelow</structfield></entry> | ||
109 | <entry spanname="hspan">The lowest tunable frequency in | ||
110 | units of 62.5 kHz, or if the <structfield>capability</structfield> | ||
111 | flag <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5 | ||
112 | Hz, for this frequency band.</entry> | ||
113 | </row> | ||
114 | <row> | ||
115 | <entry>__u32</entry> | ||
116 | <entry><structfield>rangehigh</structfield></entry> | ||
117 | <entry spanname="hspan">The highest tunable frequency in | ||
118 | units of 62.5 kHz, or if the <structfield>capability</structfield> | ||
119 | flag <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5 | ||
120 | Hz, for this frequency band.</entry> | ||
121 | </row> | ||
122 | <row> | ||
123 | <entry>__u32</entry> | ||
124 | <entry><structfield>modulation</structfield></entry> | ||
125 | <entry spanname="hspan">The supported modulation systems of this frequency band. | ||
126 | See <xref linkend="band-modulation" />. Note that currently only one | ||
127 | modulation system per frequency band is supported. More work will need to | ||
128 | be done if multiple modulation systems are possible. Contact the | ||
129 | linux-media mailing list (&v4l-ml;) if you need that functionality.</entry> | ||
130 | </row> | ||
131 | <row> | ||
132 | <entry>__u32</entry> | ||
133 | <entry><structfield>reserved</structfield>[9]</entry> | ||
134 | <entry>Reserved for future extensions. Applications and drivers | ||
135 | must set the array to zero.</entry> | ||
136 | </row> | ||
137 | </tbody> | ||
138 | </tgroup> | ||
139 | </table> | ||
140 | |||
141 | <table pgwide="1" frame="none" id="band-modulation"> | ||
142 | <title>Band Modulation Systems</title> | ||
143 | <tgroup cols="3"> | ||
144 | &cs-def; | ||
145 | <tbody valign="top"> | ||
146 | <row> | ||
147 | <entry><constant>V4L2_BAND_MODULATION_VSB</constant></entry> | ||
148 | <entry>0x02</entry> | ||
149 | <entry>Vestigial Sideband modulation, used for analog TV.</entry> | ||
150 | </row> | ||
151 | <row> | ||
152 | <entry><constant>V4L2_BAND_MODULATION_FM</constant></entry> | ||
153 | <entry>0x04</entry> | ||
154 | <entry>Frequency Modulation, commonly used for analog radio.</entry> | ||
155 | </row> | ||
156 | <row> | ||
157 | <entry><constant>V4L2_BAND_MODULATION_AM</constant></entry> | ||
158 | <entry>0x08</entry> | ||
159 | <entry>Amplitude Modulation, commonly used for analog radio.</entry> | ||
160 | </row> | ||
161 | </tbody> | ||
162 | </tgroup> | ||
163 | </table> | ||
164 | </refsect1> | ||
165 | |||
166 | <refsect1> | ||
167 | &return-value; | ||
168 | |||
169 | <variablelist> | ||
170 | <varlistentry> | ||
171 | <term><errorcode>EINVAL</errorcode></term> | ||
172 | <listitem> | ||
173 | <para>The <structfield>tuner</structfield> or <structfield>index</structfield> | ||
174 | is out of bounds or the <structfield>type</structfield> field is wrong.</para> | ||
175 | </listitem> | ||
176 | </varlistentry> | ||
177 | </variablelist> | ||
178 | </refsect1> | ||
179 | </refentry> | ||
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-frequency.xml b/Documentation/DocBook/media/v4l/vidioc-g-frequency.xml index 69c178a4d205..c7a1c462e724 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-frequency.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-frequency.xml | |||
@@ -98,11 +98,12 @@ the &v4l2-output; <structfield>modulator</structfield> field and the | |||
98 | <entry>__u32</entry> | 98 | <entry>__u32</entry> |
99 | <entry><structfield>type</structfield></entry> | 99 | <entry><structfield>type</structfield></entry> |
100 | <entry>The tuner type. This is the same value as in the | 100 | <entry>The tuner type. This is the same value as in the |
101 | &v4l2-tuner; <structfield>type</structfield> field. See The type must be set | 101 | &v4l2-tuner; <structfield>type</structfield> field. The type must be set |
102 | to <constant>V4L2_TUNER_RADIO</constant> for <filename>/dev/radioX</filename> | 102 | to <constant>V4L2_TUNER_RADIO</constant> for <filename>/dev/radioX</filename> |
103 | device nodes, and to <constant>V4L2_TUNER_ANALOG_TV</constant> | 103 | device nodes, and to <constant>V4L2_TUNER_ANALOG_TV</constant> |
104 | for all others. The field is not applicable to modulators, &ie; ignored | 104 | for all others. Set this field to <constant>V4L2_TUNER_RADIO</constant> for |
105 | by drivers. See <xref linkend="v4l2-tuner-type" /></entry> | 105 | modulators (currently only radio modulators are supported). |
106 | See <xref linkend="v4l2-tuner-type" /></entry> | ||
106 | </row> | 107 | </row> |
107 | <row> | 108 | <row> |
108 | <entry>__u32</entry> | 109 | <entry>__u32</entry> |
@@ -135,6 +136,12 @@ bounds or the value in the <structfield>type</structfield> field is | |||
135 | wrong.</para> | 136 | wrong.</para> |
136 | </listitem> | 137 | </listitem> |
137 | </varlistentry> | 138 | </varlistentry> |
139 | <varlistentry> | ||
140 | <term><errorcode>EBUSY</errorcode></term> | ||
141 | <listitem> | ||
142 | <para>A hardware seek is in progress.</para> | ||
143 | </listitem> | ||
144 | </varlistentry> | ||
138 | </variablelist> | 145 | </variablelist> |
139 | </refsect1> | 146 | </refsect1> |
140 | </refentry> | 147 | </refentry> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml index bb04eff75f45..f76d8a6d9b92 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml | |||
@@ -65,9 +65,9 @@ Do not use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE | |||
65 | </constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of | 65 | </constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of |
66 | <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is | 66 | <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is |
67 | setting the value of &v4l2-selection; <structfield>target</structfield> field | 67 | setting the value of &v4l2-selection; <structfield>target</structfield> field |
68 | to <constant> V4L2_SEL_TGT_CROP_ACTIVE </constant> (<constant> | 68 | to <constant> V4L2_SEL_TGT_CROP </constant> (<constant> |
69 | V4L2_SEL_TGT_COMPOSE_ACTIVE </constant>). Please refer to table <xref | 69 | V4L2_SEL_TGT_COMPOSE </constant>). Please refer to table <xref |
70 | linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional | 70 | linkend="v4l2-selections-common" /> or <xref linkend="selection-api" /> for additional |
71 | targets. The <structfield>flags</structfield> and <structfield>reserved | 71 | targets. The <structfield>flags</structfield> and <structfield>reserved |
72 | </structfield> fields of &v4l2-selection; are ignored and they must be filled | 72 | </structfield> fields of &v4l2-selection; are ignored and they must be filled |
73 | with zeros. The driver fills the rest of the structure or | 73 | with zeros. The driver fills the rest of the structure or |
@@ -86,9 +86,9 @@ use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE | |||
86 | </constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of | 86 | </constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of |
87 | <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is | 87 | <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is |
88 | setting the value of &v4l2-selection; <structfield>target</structfield> to | 88 | setting the value of &v4l2-selection; <structfield>target</structfield> to |
89 | <constant>V4L2_SEL_TGT_CROP_ACTIVE</constant> (<constant> | 89 | <constant>V4L2_SEL_TGT_CROP</constant> (<constant> |
90 | V4L2_SEL_TGT_COMPOSE_ACTIVE </constant>). Please refer to table <xref | 90 | V4L2_SEL_TGT_COMPOSE </constant>). Please refer to table <xref |
91 | linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional | 91 | linkend="v4l2-selections-common" /> or <xref linkend="selection-api" /> for additional |
92 | targets. The &v4l2-rect; <structfield>r</structfield> rectangle need to be | 92 | targets. The &v4l2-rect; <structfield>r</structfield> rectangle need to be |
93 | set to the desired active area. Field &v4l2-selection; <structfield> reserved | 93 | set to the desired active area. Field &v4l2-selection; <structfield> reserved |
94 | </structfield> is ignored and must be filled with zeros. The driver may adjust | 94 | </structfield> is ignored and must be filled with zeros. The driver may adjust |
@@ -154,74 +154,8 @@ exist no rectangle </emphasis> that satisfies the constraints.</para> | |||
154 | 154 | ||
155 | </refsect1> | 155 | </refsect1> |
156 | 156 | ||
157 | <refsect1> | 157 | <para>Selection targets and flags are documented in <xref |
158 | <table frame="none" pgwide="1" id="v4l2-sel-target"> | 158 | linkend="v4l2-selections-common"/>.</para> |
159 | <title>Selection targets.</title> | ||
160 | <tgroup cols="3"> | ||
161 | &cs-def; | ||
162 | <tbody valign="top"> | ||
163 | <row> | ||
164 | <entry><constant>V4L2_SEL_TGT_CROP_ACTIVE</constant></entry> | ||
165 | <entry>0x0000</entry> | ||
166 | <entry>The area that is currently cropped by hardware.</entry> | ||
167 | </row> | ||
168 | <row> | ||
169 | <entry><constant>V4L2_SEL_TGT_CROP_DEFAULT</constant></entry> | ||
170 | <entry>0x0001</entry> | ||
171 | <entry>Suggested cropping rectangle that covers the "whole picture".</entry> | ||
172 | </row> | ||
173 | <row> | ||
174 | <entry><constant>V4L2_SEL_TGT_CROP_BOUNDS</constant></entry> | ||
175 | <entry>0x0002</entry> | ||
176 | <entry>Limits for the cropping rectangle.</entry> | ||
177 | </row> | ||
178 | <row> | ||
179 | <entry><constant>V4L2_SEL_TGT_COMPOSE_ACTIVE</constant></entry> | ||
180 | <entry>0x0100</entry> | ||
181 | <entry>The area to which data is composed by hardware.</entry> | ||
182 | </row> | ||
183 | <row> | ||
184 | <entry><constant>V4L2_SEL_TGT_COMPOSE_DEFAULT</constant></entry> | ||
185 | <entry>0x0101</entry> | ||
186 | <entry>Suggested composing rectangle that covers the "whole picture".</entry> | ||
187 | </row> | ||
188 | <row> | ||
189 | <entry><constant>V4L2_SEL_TGT_COMPOSE_BOUNDS</constant></entry> | ||
190 | <entry>0x0102</entry> | ||
191 | <entry>Limits for the composing rectangle.</entry> | ||
192 | </row> | ||
193 | <row> | ||
194 | <entry><constant>V4L2_SEL_TGT_COMPOSE_PADDED</constant></entry> | ||
195 | <entry>0x0103</entry> | ||
196 | <entry>The active area and all padding pixels that are inserted or modified by hardware.</entry> | ||
197 | </row> | ||
198 | </tbody> | ||
199 | </tgroup> | ||
200 | </table> | ||
201 | </refsect1> | ||
202 | |||
203 | <refsect1> | ||
204 | <table frame="none" pgwide="1" id="v4l2-sel-flags"> | ||
205 | <title>Selection constraint flags</title> | ||
206 | <tgroup cols="3"> | ||
207 | &cs-def; | ||
208 | <tbody valign="top"> | ||
209 | <row> | ||
210 | <entry><constant>V4L2_SEL_FLAG_GE</constant></entry> | ||
211 | <entry>0x00000001</entry> | ||
212 | <entry>Indicates that the adjusted rectangle must contain the original | ||
213 | &v4l2-selection; <structfield>r</structfield> rectangle.</entry> | ||
214 | </row> | ||
215 | <row> | ||
216 | <entry><constant>V4L2_SEL_FLAG_LE</constant></entry> | ||
217 | <entry>0x00000002</entry> | ||
218 | <entry>Indicates that the adjusted rectangle must be inside the original | ||
219 | &v4l2-rect; <structfield>r</structfield> rectangle.</entry> | ||
220 | </row> | ||
221 | </tbody> | ||
222 | </tgroup> | ||
223 | </table> | ||
224 | </refsect1> | ||
225 | 159 | ||
226 | <section> | 160 | <section> |
227 | <figure id="sel-const-adjust"> | 161 | <figure id="sel-const-adjust"> |
@@ -252,14 +186,14 @@ exist no rectangle </emphasis> that satisfies the constraints.</para> | |||
252 | <row> | 186 | <row> |
253 | <entry>__u32</entry> | 187 | <entry>__u32</entry> |
254 | <entry><structfield>target</structfield></entry> | 188 | <entry><structfield>target</structfield></entry> |
255 | <entry>Used to select between <link linkend="v4l2-sel-target"> cropping | 189 | <entry>Used to select between <link linkend="v4l2-selections-common"> cropping |
256 | and composing rectangles</link>.</entry> | 190 | and composing rectangles</link>.</entry> |
257 | </row> | 191 | </row> |
258 | <row> | 192 | <row> |
259 | <entry>__u32</entry> | 193 | <entry>__u32</entry> |
260 | <entry><structfield>flags</structfield></entry> | 194 | <entry><structfield>flags</structfield></entry> |
261 | <entry>Flags controlling the selection rectangle adjustments, refer to | 195 | <entry>Flags controlling the selection rectangle adjustments, refer to |
262 | <link linkend="v4l2-sel-flags">selection flags</link>.</entry> | 196 | <link linkend="v4l2-selection-flags">selection flags</link>.</entry> |
263 | </row> | 197 | </row> |
264 | <row> | 198 | <row> |
265 | <entry>&v4l2-rect;</entry> | 199 | <entry>&v4l2-rect;</entry> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml b/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml index 62a1aa200a36..720395127904 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml | |||
@@ -119,10 +119,14 @@ field is not quite clear.--></para></entry> | |||
119 | <xref linkend="tuner-capability" />. Audio flags indicate the ability | 119 | <xref linkend="tuner-capability" />. Audio flags indicate the ability |
120 | to decode audio subprograms. They will <emphasis>not</emphasis> | 120 | to decode audio subprograms. They will <emphasis>not</emphasis> |
121 | change, for example with the current video standard.</para><para>When | 121 | change, for example with the current video standard.</para><para>When |
122 | the structure refers to a radio tuner only the | 122 | the structure refers to a radio tuner the |
123 | <constant>V4L2_TUNER_CAP_LOW</constant>, | 123 | <constant>V4L2_TUNER_CAP_LANG1</constant>, |
124 | <constant>V4L2_TUNER_CAP_STEREO</constant> and | 124 | <constant>V4L2_TUNER_CAP_LANG2</constant> and |
125 | <constant>V4L2_TUNER_CAP_RDS</constant> flags can be set.</para></entry> | 125 | <constant>V4L2_TUNER_CAP_NORM</constant> flags can't be used.</para> |
126 | <para>If multiple frequency bands are supported, then | ||
127 | <structfield>capability</structfield> is the union of all | ||
128 | <structfield>capability></structfield> fields of each &v4l2-frequency-band;. | ||
129 | </para></entry> | ||
126 | </row> | 130 | </row> |
127 | <row> | 131 | <row> |
128 | <entry>__u32</entry> | 132 | <entry>__u32</entry> |
@@ -130,7 +134,9 @@ the structure refers to a radio tuner only the | |||
130 | <entry spanname="hspan">The lowest tunable frequency in | 134 | <entry spanname="hspan">The lowest tunable frequency in |
131 | units of 62.5 kHz, or if the <structfield>capability</structfield> | 135 | units of 62.5 kHz, or if the <structfield>capability</structfield> |
132 | flag <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5 | 136 | flag <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5 |
133 | Hz.</entry> | 137 | Hz. If multiple frequency bands are supported, then |
138 | <structfield>rangelow</structfield> is the lowest frequency | ||
139 | of all the frequency bands.</entry> | ||
134 | </row> | 140 | </row> |
135 | <row> | 141 | <row> |
136 | <entry>__u32</entry> | 142 | <entry>__u32</entry> |
@@ -138,7 +144,9 @@ Hz.</entry> | |||
138 | <entry spanname="hspan">The highest tunable frequency in | 144 | <entry spanname="hspan">The highest tunable frequency in |
139 | units of 62.5 kHz, or if the <structfield>capability</structfield> | 145 | units of 62.5 kHz, or if the <structfield>capability</structfield> |
140 | flag <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5 | 146 | flag <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5 |
141 | Hz.</entry> | 147 | Hz. If multiple frequency bands are supported, then |
148 | <structfield>rangehigh</structfield> is the highest frequency | ||
149 | of all the frequency bands.</entry> | ||
142 | </row> | 150 | </row> |
143 | <row> | 151 | <row> |
144 | <entry>__u32</entry> | 152 | <entry>__u32</entry> |
@@ -276,6 +284,18 @@ can or must be switched. (B/G PAL tuners for example are typically not | |||
276 | <constant>V4L2_TUNER_ANALOG_TV</constant> tuners can have this capability.</entry> | 284 | <constant>V4L2_TUNER_ANALOG_TV</constant> tuners can have this capability.</entry> |
277 | </row> | 285 | </row> |
278 | <row> | 286 | <row> |
287 | <entry><constant>V4L2_TUNER_CAP_HWSEEK_BOUNDED</constant></entry> | ||
288 | <entry>0x0004</entry> | ||
289 | <entry>If set, then this tuner supports the hardware seek functionality | ||
290 | where the seek stops when it reaches the end of the frequency range.</entry> | ||
291 | </row> | ||
292 | <row> | ||
293 | <entry><constant>V4L2_TUNER_CAP_HWSEEK_WRAP</constant></entry> | ||
294 | <entry>0x0008</entry> | ||
295 | <entry>If set, then this tuner supports the hardware seek functionality | ||
296 | where the seek wraps around when it reaches the end of the frequency range.</entry> | ||
297 | </row> | ||
298 | <row> | ||
279 | <entry><constant>V4L2_TUNER_CAP_STEREO</constant></entry> | 299 | <entry><constant>V4L2_TUNER_CAP_STEREO</constant></entry> |
280 | <entry>0x0010</entry> | 300 | <entry>0x0010</entry> |
281 | <entry>Stereo audio reception is supported.</entry> | 301 | <entry>Stereo audio reception is supported.</entry> |
@@ -328,6 +348,12 @@ radio tuners.</entry> | |||
328 | <entry>0x0200</entry> | 348 | <entry>0x0200</entry> |
329 | <entry>The RDS data is parsed by the hardware and set via controls.</entry> | 349 | <entry>The RDS data is parsed by the hardware and set via controls.</entry> |
330 | </row> | 350 | </row> |
351 | <row> | ||
352 | <entry><constant>V4L2_TUNER_CAP_FREQ_BANDS</constant></entry> | ||
353 | <entry>0x0400</entry> | ||
354 | <entry>The &VIDIOC-ENUM-FREQ-BANDS; ioctl can be used to enumerate | ||
355 | the available frequency bands.</entry> | ||
356 | </row> | ||
331 | </tbody> | 357 | </tbody> |
332 | </tgroup> | 358 | </tgroup> |
333 | </table> | 359 | </table> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-qbuf.xml b/Documentation/DocBook/media/v4l/vidioc-qbuf.xml index 9caa49af580f..77ff5be0809d 100644 --- a/Documentation/DocBook/media/v4l/vidioc-qbuf.xml +++ b/Documentation/DocBook/media/v4l/vidioc-qbuf.xml | |||
@@ -71,12 +71,9 @@ initialize the <structfield>bytesused</structfield>, | |||
71 | <structfield>field</structfield> and | 71 | <structfield>field</structfield> and |
72 | <structfield>timestamp</structfield> fields, see <xref | 72 | <structfield>timestamp</structfield> fields, see <xref |
73 | linkend="buffer" /> for details. | 73 | linkend="buffer" /> for details. |
74 | Applications must also set <structfield>flags</structfield> to 0. If a driver | 74 | Applications must also set <structfield>flags</structfield> to 0. |
75 | supports capturing from specific video inputs and you want to specify a video | 75 | The <structfield>reserved2</structfield> and |
76 | input, then <structfield>flags</structfield> should be set to | 76 | <structfield>reserved</structfield> fields must be set to 0. When using |
77 | <constant>V4L2_BUF_FLAG_INPUT</constant> and the field | ||
78 | <structfield>input</structfield> must be initialized to the desired input. | ||
79 | The <structfield>reserved</structfield> field must be set to 0. When using | ||
80 | the <link linkend="planar-apis">multi-planar API</link>, the | 77 | the <link linkend="planar-apis">multi-planar API</link>, the |
81 | <structfield>m.planes</structfield> field must contain a userspace pointer | 78 | <structfield>m.planes</structfield> field must contain a userspace pointer |
82 | to a filled-in array of &v4l2-plane; and the <structfield>length</structfield> | 79 | to a filled-in array of &v4l2-plane; and the <structfield>length</structfield> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-querycap.xml b/Documentation/DocBook/media/v4l/vidioc-querycap.xml index 4643505cd4ca..f33dd746b66b 100644 --- a/Documentation/DocBook/media/v4l/vidioc-querycap.xml +++ b/Documentation/DocBook/media/v4l/vidioc-querycap.xml | |||
@@ -192,6 +192,19 @@ linkend="output">Video Output</link> interface.</entry> | |||
192 | <link linkend="output">Video Output</link> interface.</entry> | 192 | <link linkend="output">Video Output</link> interface.</entry> |
193 | </row> | 193 | </row> |
194 | <row> | 194 | <row> |
195 | <entry><constant>V4L2_CAP_VIDEO_M2M</constant></entry> | ||
196 | <entry>0x00004000</entry> | ||
197 | <entry>The device supports the single-planar API through the | ||
198 | Video Memory-To-Memory interface.</entry> | ||
199 | </row> | ||
200 | <row> | ||
201 | <entry><constant>V4L2_CAP_VIDEO_M2M_MPLANE</constant></entry> | ||
202 | <entry>0x00008000</entry> | ||
203 | <entry>The device supports the | ||
204 | <link linkend="planar-apis">multi-planar API</link> through the | ||
205 | Video Memory-To-Memory interface.</entry> | ||
206 | </row> | ||
207 | <row> | ||
195 | <entry><constant>V4L2_CAP_VIDEO_OVERLAY</constant></entry> | 208 | <entry><constant>V4L2_CAP_VIDEO_OVERLAY</constant></entry> |
196 | <entry>0x00000004</entry> | 209 | <entry>0x00000004</entry> |
197 | <entry>The device supports the <link | 210 | <entry>The device supports the <link |
diff --git a/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml b/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml index 407dfceb71f0..3dd1bec6d3c7 100644 --- a/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml +++ b/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml | |||
@@ -52,11 +52,26 @@ | |||
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>, | 54 | <structfield>type</structfield>, <structfield>seek_upward</structfield>, |
55 | <structfield>spacing</structfield> and | 55 | <structfield>wrap_around</structfield>, <structfield>spacing</structfield>, |
56 | <structfield>wrap_around</structfield> fields, and zero out the | 56 | <structfield>rangelow</structfield> and <structfield>rangehigh</structfield> |
57 | <structfield>reserved</structfield> array of a &v4l2-hw-freq-seek; and | 57 | fields, and zero out the <structfield>reserved</structfield> array of a |
58 | call the <constant>VIDIOC_S_HW_FREQ_SEEK</constant> ioctl with a pointer | 58 | &v4l2-hw-freq-seek; and call the <constant>VIDIOC_S_HW_FREQ_SEEK</constant> |
59 | to this structure.</para> | 59 | ioctl with a pointer to this structure.</para> |
60 | |||
61 | <para>The <structfield>rangelow</structfield> and | ||
62 | <structfield>rangehigh</structfield> fields can be set to a non-zero value to | ||
63 | tell the driver to search a specific band. If the &v4l2-tuner; | ||
64 | <structfield>capability</structfield> field has the | ||
65 | <constant>V4L2_TUNER_CAP_HWSEEK_PROG_LIM</constant> flag set, these values | ||
66 | must fall within one of the bands returned by &VIDIOC-ENUM-FREQ-BANDS;. If | ||
67 | the <constant>V4L2_TUNER_CAP_HWSEEK_PROG_LIM</constant> flag is not set, | ||
68 | then these values must exactly match those of one of the bands returned by | ||
69 | &VIDIOC-ENUM-FREQ-BANDS;. If the current frequency of the tuner does not fall | ||
70 | within the selected band it will be clamped to fit in the band before the | ||
71 | seek is started.</para> | ||
72 | |||
73 | <para>If an error is returned, then the original frequency will | ||
74 | be restored.</para> | ||
60 | 75 | ||
61 | <para>This ioctl is supported if the <constant>V4L2_CAP_HW_FREQ_SEEK</constant> capability is set.</para> | 76 | <para>This ioctl is supported if the <constant>V4L2_CAP_HW_FREQ_SEEK</constant> capability is set.</para> |
62 | 77 | ||
@@ -87,7 +102,10 @@ field and the &v4l2-tuner; <structfield>index</structfield> field.</entry> | |||
87 | <row> | 102 | <row> |
88 | <entry>__u32</entry> | 103 | <entry>__u32</entry> |
89 | <entry><structfield>wrap_around</structfield></entry> | 104 | <entry><structfield>wrap_around</structfield></entry> |
90 | <entry>If non-zero, wrap around when at the end of the frequency range, else stop seeking.</entry> | 105 | <entry>If non-zero, wrap around when at the end of the frequency range, else stop seeking. |
106 | The &v4l2-tuner; <structfield>capability</structfield> field will tell you what the | ||
107 | hardware supports. | ||
108 | </entry> | ||
91 | </row> | 109 | </row> |
92 | <row> | 110 | <row> |
93 | <entry>__u32</entry> | 111 | <entry>__u32</entry> |
@@ -96,7 +114,27 @@ field and the &v4l2-tuner; <structfield>index</structfield> field.</entry> | |||
96 | </row> | 114 | </row> |
97 | <row> | 115 | <row> |
98 | <entry>__u32</entry> | 116 | <entry>__u32</entry> |
99 | <entry><structfield>reserved</structfield>[7]</entry> | 117 | <entry><structfield>rangelow</structfield></entry> |
118 | <entry>If non-zero, the lowest tunable frequency of the band to | ||
119 | search in units of 62.5 kHz, or if the &v4l2-tuner; | ||
120 | <structfield>capability</structfield> field has the | ||
121 | <constant>V4L2_TUNER_CAP_LOW</constant> flag set, in units of 62.5 Hz. | ||
122 | If <structfield>rangelow</structfield> is zero a reasonable default value | ||
123 | is used.</entry> | ||
124 | </row> | ||
125 | <row> | ||
126 | <entry>__u32</entry> | ||
127 | <entry><structfield>rangehigh</structfield></entry> | ||
128 | <entry>If non-zero, the highest tunable frequency of the band to | ||
129 | search in units of 62.5 kHz, or if the &v4l2-tuner; | ||
130 | <structfield>capability</structfield> field has the | ||
131 | <constant>V4L2_TUNER_CAP_LOW</constant> flag set, in units of 62.5 Hz. | ||
132 | If <structfield>rangehigh</structfield> is zero a reasonable default value | ||
133 | is used.</entry> | ||
134 | </row> | ||
135 | <row> | ||
136 | <entry>__u32</entry> | ||
137 | <entry><structfield>reserved</structfield>[5]</entry> | ||
100 | <entry>Reserved for future extensions. Applications | 138 | <entry>Reserved for future extensions. Applications |
101 | must set the array to zero.</entry> | 139 | must set the array to zero.</entry> |
102 | </row> | 140 | </row> |
@@ -113,14 +151,22 @@ field and the &v4l2-tuner; <structfield>index</structfield> field.</entry> | |||
113 | <term><errorcode>EINVAL</errorcode></term> | 151 | <term><errorcode>EINVAL</errorcode></term> |
114 | <listitem> | 152 | <listitem> |
115 | <para>The <structfield>tuner</structfield> index is out of | 153 | <para>The <structfield>tuner</structfield> index is out of |
116 | bounds, the wrap_around value is not supported or the value in the <structfield>type</structfield> field is | 154 | bounds, the <structfield>wrap_around</structfield> value is not supported or |
117 | wrong.</para> | 155 | one of the values in the <structfield>type</structfield>, |
156 | <structfield>rangelow</structfield> or <structfield>rangehigh</structfield> | ||
157 | fields is wrong.</para> | ||
158 | </listitem> | ||
159 | </varlistentry> | ||
160 | <varlistentry> | ||
161 | <term><errorcode>ENODATA</errorcode></term> | ||
162 | <listitem> | ||
163 | <para>The hardware seek found no channels.</para> | ||
118 | </listitem> | 164 | </listitem> |
119 | </varlistentry> | 165 | </varlistentry> |
120 | <varlistentry> | 166 | <varlistentry> |
121 | <term><errorcode>EAGAIN</errorcode></term> | 167 | <term><errorcode>EBUSY</errorcode></term> |
122 | <listitem> | 168 | <listitem> |
123 | <para>The ioctl timed-out. Try again.</para> | 169 | <para>Another hardware seek is already in progress.</para> |
124 | </listitem> | 170 | </listitem> |
125 | </varlistentry> | 171 | </varlistentry> |
126 | </variablelist> | 172 | </variablelist> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml b/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml index 208e9f0da3f3..f33cc814a01d 100644 --- a/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml +++ b/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml | |||
@@ -72,10 +72,10 @@ | |||
72 | <section> | 72 | <section> |
73 | <title>Types of selection targets</title> | 73 | <title>Types of selection targets</title> |
74 | 74 | ||
75 | <para>There are two types of selection targets: actual and bounds. | 75 | <para>There are two types of selection targets: actual and bounds. The |
76 | The ACTUAL targets are the targets which configure the hardware. | 76 | actual targets are the targets which configure the hardware. The BOUNDS |
77 | The BOUNDS target will return a rectangle that contain all | 77 | target will return a rectangle that contain all possible actual |
78 | possible ACTUAL rectangles.</para> | 78 | rectangles.</para> |
79 | </section> | 79 | </section> |
80 | 80 | ||
81 | <section> | 81 | <section> |
@@ -87,71 +87,8 @@ | |||
87 | <constant>EINVAL</constant>.</para> | 87 | <constant>EINVAL</constant>.</para> |
88 | </section> | 88 | </section> |
89 | 89 | ||
90 | <table pgwide="1" frame="none" id="v4l2-subdev-selection-targets"> | 90 | <para>Selection targets and flags are documented in <xref |
91 | <title>V4L2 subdev selection targets</title> | 91 | linkend="v4l2-selections-common"/>.</para> |
92 | <tgroup cols="3"> | ||
93 | &cs-def; | ||
94 | <tbody valign="top"> | ||
95 | <row> | ||
96 | <entry><constant>V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL</constant></entry> | ||
97 | <entry>0x0000</entry> | ||
98 | <entry>Actual crop. Defines the cropping | ||
99 | performed by the processing step.</entry> | ||
100 | </row> | ||
101 | <row> | ||
102 | <entry><constant>V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS</constant></entry> | ||
103 | <entry>0x0002</entry> | ||
104 | <entry>Bounds of the crop rectangle.</entry> | ||
105 | </row> | ||
106 | <row> | ||
107 | <entry><constant>V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL</constant></entry> | ||
108 | <entry>0x0100</entry> | ||
109 | <entry>Actual compose rectangle. Used to configure scaling | ||
110 | on sink pads and composition on source pads.</entry> | ||
111 | </row> | ||
112 | <row> | ||
113 | <entry><constant>V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS</constant></entry> | ||
114 | <entry>0x0102</entry> | ||
115 | <entry>Bounds of the compose rectangle.</entry> | ||
116 | </row> | ||
117 | </tbody> | ||
118 | </tgroup> | ||
119 | </table> | ||
120 | |||
121 | <table pgwide="1" frame="none" id="v4l2-subdev-selection-flags"> | ||
122 | <title>V4L2 subdev selection flags</title> | ||
123 | <tgroup cols="3"> | ||
124 | &cs-def; | ||
125 | <tbody valign="top"> | ||
126 | <row> | ||
127 | <entry><constant>V4L2_SUBDEV_SEL_FLAG_SIZE_GE</constant></entry> | ||
128 | <entry>(1 << 0)</entry> <entry>Suggest the driver it | ||
129 | should choose greater or equal rectangle (in size) than | ||
130 | was requested. Albeit the driver may choose a lesser size, | ||
131 | it will only do so due to hardware limitations. Without | ||
132 | this flag (and | ||
133 | <constant>V4L2_SUBDEV_SEL_FLAG_SIZE_LE</constant>) the | ||
134 | behaviour is to choose the closest possible | ||
135 | rectangle.</entry> | ||
136 | </row> | ||
137 | <row> | ||
138 | <entry><constant>V4L2_SUBDEV_SEL_FLAG_SIZE_LE</constant></entry> | ||
139 | <entry>(1 << 1)</entry> <entry>Suggest the driver it | ||
140 | should choose lesser or equal rectangle (in size) than was | ||
141 | requested. Albeit the driver may choose a greater size, it | ||
142 | will only do so due to hardware limitations.</entry> | ||
143 | </row> | ||
144 | <row> | ||
145 | <entry><constant>V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG</constant></entry> | ||
146 | <entry>(1 << 2)</entry> | ||
147 | <entry>The configuration should not be propagated to any | ||
148 | further processing steps. If this flag is not given, the | ||
149 | configuration is propagated inside the subdevice to all | ||
150 | further processing steps.</entry> | ||
151 | </row> | ||
152 | </tbody> | ||
153 | </tgroup> | ||
154 | </table> | ||
155 | 92 | ||
156 | <table pgwide="1" frame="none" id="v4l2-subdev-selection"> | 93 | <table pgwide="1" frame="none" id="v4l2-subdev-selection"> |
157 | <title>struct <structname>v4l2_subdev_selection</structname></title> | 94 | <title>struct <structname>v4l2_subdev_selection</structname></title> |
@@ -173,13 +110,13 @@ | |||
173 | <entry>__u32</entry> | 110 | <entry>__u32</entry> |
174 | <entry><structfield>target</structfield></entry> | 111 | <entry><structfield>target</structfield></entry> |
175 | <entry>Target selection rectangle. See | 112 | <entry>Target selection rectangle. See |
176 | <xref linkend="v4l2-subdev-selection-targets">.</xref>.</entry> | 113 | <xref linkend="v4l2-selections-common" />.</entry> |
177 | </row> | 114 | </row> |
178 | <row> | 115 | <row> |
179 | <entry>__u32</entry> | 116 | <entry>__u32</entry> |
180 | <entry><structfield>flags</structfield></entry> | 117 | <entry><structfield>flags</structfield></entry> |
181 | <entry>Flags. See | 118 | <entry>Flags. See |
182 | <xref linkend="v4l2-subdev-selection-flags">.</xref></entry> | 119 | <xref linkend="v4l2-selection-flags" />.</entry> |
183 | </row> | 120 | </row> |
184 | <row> | 121 | <row> |
185 | <entry>&v4l2-rect;</entry> | 122 | <entry>&v4l2-rect;</entry> |
diff --git a/Documentation/IRQ-domain.txt b/Documentation/IRQ-domain.txt index 27dcaabfb4db..1401cece745a 100644 --- a/Documentation/IRQ-domain.txt +++ b/Documentation/IRQ-domain.txt | |||
@@ -93,6 +93,7 @@ Linux IRQ number into the hardware. | |||
93 | Most drivers cannot use this mapping. | 93 | Most drivers cannot use this mapping. |
94 | 94 | ||
95 | ==== Legacy ==== | 95 | ==== Legacy ==== |
96 | irq_domain_add_simple() | ||
96 | irq_domain_add_legacy() | 97 | irq_domain_add_legacy() |
97 | irq_domain_add_legacy_isa() | 98 | irq_domain_add_legacy_isa() |
98 | 99 | ||
@@ -115,3 +116,7 @@ The legacy map should only be used if fixed IRQ mappings must be | |||
115 | supported. For example, ISA controllers would use the legacy map for | 116 | supported. For example, ISA controllers would use the legacy map for |
116 | mapping Linux IRQs 0-15 so that existing ISA drivers get the correct IRQ | 117 | mapping Linux IRQs 0-15 so that existing ISA drivers get the correct IRQ |
117 | numbers. | 118 | numbers. |
119 | |||
120 | Most users of legacy mappings should use irq_domain_add_simple() which | ||
121 | will use a legacy domain only if an IRQ range is supplied by the | ||
122 | system and will otherwise use a linear domain mapping. | ||
diff --git a/Documentation/ManagementStyle b/Documentation/ManagementStyle index a5f0ea58c788..a211ee8d8b44 100644 --- a/Documentation/ManagementStyle +++ b/Documentation/ManagementStyle | |||
@@ -178,7 +178,7 @@ sadly that you are one too, and that while we can all bask in the secure | |||
178 | knowledge that we're better than the average person (let's face it, | 178 | knowledge that we're better than the average person (let's face it, |
179 | nobody ever believes that they're average or below-average), we should | 179 | nobody ever believes that they're average or below-average), we should |
180 | also admit that we're not the sharpest knife around, and there will be | 180 | also admit that we're not the sharpest knife around, and there will be |
181 | other people that are less of an idiot that you are. | 181 | other people that are less of an idiot than you are. |
182 | 182 | ||
183 | Some people react badly to smart people. Others take advantage of them. | 183 | Some people react badly to smart people. Others take advantage of them. |
184 | 184 | ||
diff --git a/Documentation/RCU/checklist.txt b/Documentation/RCU/checklist.txt index 5c8d74968090..fc103d7a0474 100644 --- a/Documentation/RCU/checklist.txt +++ b/Documentation/RCU/checklist.txt | |||
@@ -162,9 +162,9 @@ over a rather long period of time, but improvements are always welcome! | |||
162 | when publicizing a pointer to a structure that can | 162 | when publicizing a pointer to a structure that can |
163 | be traversed by an RCU read-side critical section. | 163 | be traversed by an RCU read-side critical section. |
164 | 164 | ||
165 | 5. If call_rcu(), or a related primitive such as call_rcu_bh() or | 165 | 5. If call_rcu(), or a related primitive such as call_rcu_bh(), |
166 | call_rcu_sched(), is used, the callback function must be | 166 | call_rcu_sched(), or call_srcu() is used, the callback function |
167 | written to be called from softirq context. In particular, | 167 | must be written to be called from softirq context. In particular, |
168 | it cannot block. | 168 | it cannot block. |
169 | 169 | ||
170 | 6. Since synchronize_rcu() can block, it cannot be called from | 170 | 6. Since synchronize_rcu() can block, it cannot be called from |
@@ -202,11 +202,12 @@ over a rather long period of time, but improvements are always welcome! | |||
202 | updater uses call_rcu_sched() or synchronize_sched(), then | 202 | updater uses call_rcu_sched() or synchronize_sched(), then |
203 | the corresponding readers must disable preemption, possibly | 203 | the corresponding readers must disable preemption, possibly |
204 | by calling rcu_read_lock_sched() and rcu_read_unlock_sched(). | 204 | by calling rcu_read_lock_sched() and rcu_read_unlock_sched(). |
205 | If the updater uses synchronize_srcu(), the the corresponding | 205 | If the updater uses synchronize_srcu() or call_srcu(), |
206 | readers must use srcu_read_lock() and srcu_read_unlock(), | 206 | the the corresponding readers must use srcu_read_lock() and |
207 | and with the same srcu_struct. The rules for the expedited | 207 | srcu_read_unlock(), and with the same srcu_struct. The rules for |
208 | primitives are the same as for their non-expedited counterparts. | 208 | the expedited primitives are the same as for their non-expedited |
209 | Mixing things up will result in confusion and broken kernels. | 209 | counterparts. Mixing things up will result in confusion and |
210 | broken kernels. | ||
210 | 211 | ||
211 | One exception to this rule: rcu_read_lock() and rcu_read_unlock() | 212 | One exception to this rule: rcu_read_lock() and rcu_read_unlock() |
212 | may be substituted for rcu_read_lock_bh() and rcu_read_unlock_bh() | 213 | may be substituted for rcu_read_lock_bh() and rcu_read_unlock_bh() |
@@ -333,14 +334,14 @@ over a rather long period of time, but improvements are always welcome! | |||
333 | victim CPU from ever going offline.) | 334 | victim CPU from ever going offline.) |
334 | 335 | ||
335 | 14. SRCU (srcu_read_lock(), srcu_read_unlock(), srcu_dereference(), | 336 | 14. SRCU (srcu_read_lock(), srcu_read_unlock(), srcu_dereference(), |
336 | synchronize_srcu(), and synchronize_srcu_expedited()) may only | 337 | synchronize_srcu(), synchronize_srcu_expedited(), and call_srcu()) |
337 | be invoked from process context. Unlike other forms of RCU, it | 338 | may only be invoked from process context. Unlike other forms of |
338 | -is- permissible to block in an SRCU read-side critical section | 339 | RCU, it -is- permissible to block in an SRCU read-side critical |
339 | (demarked by srcu_read_lock() and srcu_read_unlock()), hence the | 340 | section (demarked by srcu_read_lock() and srcu_read_unlock()), |
340 | "SRCU": "sleepable RCU". Please note that if you don't need | 341 | hence the "SRCU": "sleepable RCU". Please note that if you |
341 | to sleep in read-side critical sections, you should be using | 342 | don't need to sleep in read-side critical sections, you should be |
342 | RCU rather than SRCU, because RCU is almost always faster and | 343 | using RCU rather than SRCU, because RCU is almost always faster |
343 | easier to use than is SRCU. | 344 | and easier to use than is SRCU. |
344 | 345 | ||
345 | If you need to enter your read-side critical section in a | 346 | If you need to enter your read-side critical section in a |
346 | hardirq or exception handler, and then exit that same read-side | 347 | hardirq or exception handler, and then exit that same read-side |
@@ -353,8 +354,8 @@ over a rather long period of time, but improvements are always welcome! | |||
353 | cleanup_srcu_struct(). These are passed a "struct srcu_struct" | 354 | cleanup_srcu_struct(). These are passed a "struct srcu_struct" |
354 | that defines the scope of a given SRCU domain. Once initialized, | 355 | that defines the scope of a given SRCU domain. Once initialized, |
355 | the srcu_struct is passed to srcu_read_lock(), srcu_read_unlock() | 356 | the srcu_struct is passed to srcu_read_lock(), srcu_read_unlock() |
356 | synchronize_srcu(), and synchronize_srcu_expedited(). A given | 357 | synchronize_srcu(), synchronize_srcu_expedited(), and call_srcu(). |
357 | synchronize_srcu() waits only for SRCU read-side critical | 358 | A given synchronize_srcu() waits only for SRCU read-side critical |
358 | sections governed by srcu_read_lock() and srcu_read_unlock() | 359 | sections governed by srcu_read_lock() and srcu_read_unlock() |
359 | calls that have been passed the same srcu_struct. This property | 360 | calls that have been passed the same srcu_struct. This property |
360 | is what makes sleeping read-side critical sections tolerable -- | 361 | is what makes sleeping read-side critical sections tolerable -- |
@@ -374,7 +375,7 @@ over a rather long period of time, but improvements are always welcome! | |||
374 | requiring SRCU's read-side deadlock immunity or low read-side | 375 | requiring SRCU's read-side deadlock immunity or low read-side |
375 | realtime latency. | 376 | realtime latency. |
376 | 377 | ||
377 | Note that, rcu_assign_pointer() relates to SRCU just as they do | 378 | Note that, rcu_assign_pointer() relates to SRCU just as it does |
378 | to other forms of RCU. | 379 | to other forms of RCU. |
379 | 380 | ||
380 | 15. The whole point of call_rcu(), synchronize_rcu(), and friends | 381 | 15. The whole point of call_rcu(), synchronize_rcu(), and friends |
diff --git a/Documentation/RCU/rcubarrier.txt b/Documentation/RCU/rcubarrier.txt index e439a0edee22..38428c125135 100644 --- a/Documentation/RCU/rcubarrier.txt +++ b/Documentation/RCU/rcubarrier.txt | |||
@@ -79,8 +79,6 @@ complete. Pseudo-code using rcu_barrier() is as follows: | |||
79 | 2. Execute rcu_barrier(). | 79 | 2. Execute rcu_barrier(). |
80 | 3. Allow the module to be unloaded. | 80 | 3. Allow the module to be unloaded. |
81 | 81 | ||
82 | Quick Quiz #1: Why is there no srcu_barrier()? | ||
83 | |||
84 | The rcutorture module makes use of rcu_barrier in its exit function | 82 | The rcutorture module makes use of rcu_barrier in its exit function |
85 | as follows: | 83 | as follows: |
86 | 84 | ||
@@ -162,7 +160,7 @@ for any pre-existing callbacks to complete. | |||
162 | Then lines 55-62 print status and do operation-specific cleanup, and | 160 | Then lines 55-62 print status and do operation-specific cleanup, and |
163 | then return, permitting the module-unload operation to be completed. | 161 | then return, permitting the module-unload operation to be completed. |
164 | 162 | ||
165 | Quick Quiz #2: Is there any other situation where rcu_barrier() might | 163 | Quick Quiz #1: Is there any other situation where rcu_barrier() might |
166 | be required? | 164 | be required? |
167 | 165 | ||
168 | Your module might have additional complications. For example, if your | 166 | Your module might have additional complications. For example, if your |
@@ -242,7 +240,7 @@ reaches zero, as follows: | |||
242 | 4 complete(&rcu_barrier_completion); | 240 | 4 complete(&rcu_barrier_completion); |
243 | 5 } | 241 | 5 } |
244 | 242 | ||
245 | Quick Quiz #3: What happens if CPU 0's rcu_barrier_func() executes | 243 | Quick Quiz #2: What happens if CPU 0's rcu_barrier_func() executes |
246 | immediately (thus incrementing rcu_barrier_cpu_count to the | 244 | immediately (thus incrementing rcu_barrier_cpu_count to the |
247 | value one), but the other CPU's rcu_barrier_func() invocations | 245 | value one), but the other CPU's rcu_barrier_func() invocations |
248 | are delayed for a full grace period? Couldn't this result in | 246 | are delayed for a full grace period? Couldn't this result in |
@@ -259,12 +257,7 @@ so that your module may be safely unloaded. | |||
259 | 257 | ||
260 | Answers to Quick Quizzes | 258 | Answers to Quick Quizzes |
261 | 259 | ||
262 | Quick Quiz #1: Why is there no srcu_barrier()? | 260 | Quick Quiz #1: Is there any other situation where rcu_barrier() might |
263 | |||
264 | Answer: Since there is no call_srcu(), there can be no outstanding SRCU | ||
265 | callbacks. Therefore, there is no need to wait for them. | ||
266 | |||
267 | Quick Quiz #2: Is there any other situation where rcu_barrier() might | ||
268 | be required? | 261 | be required? |
269 | 262 | ||
270 | Answer: Interestingly enough, rcu_barrier() was not originally | 263 | Answer: Interestingly enough, rcu_barrier() was not originally |
@@ -278,7 +271,7 @@ Answer: Interestingly enough, rcu_barrier() was not originally | |||
278 | implementing rcutorture, and found that rcu_barrier() solves | 271 | implementing rcutorture, and found that rcu_barrier() solves |
279 | this problem as well. | 272 | this problem as well. |
280 | 273 | ||
281 | Quick Quiz #3: What happens if CPU 0's rcu_barrier_func() executes | 274 | Quick Quiz #2: What happens if CPU 0's rcu_barrier_func() executes |
282 | immediately (thus incrementing rcu_barrier_cpu_count to the | 275 | immediately (thus incrementing rcu_barrier_cpu_count to the |
283 | value one), but the other CPU's rcu_barrier_func() invocations | 276 | value one), but the other CPU's rcu_barrier_func() invocations |
284 | are delayed for a full grace period? Couldn't this result in | 277 | are delayed for a full grace period? Couldn't this result in |
diff --git a/Documentation/RCU/torture.txt b/Documentation/RCU/torture.txt index 4ddf3913fd8c..7dce8a17eac2 100644 --- a/Documentation/RCU/torture.txt +++ b/Documentation/RCU/torture.txt | |||
@@ -174,11 +174,20 @@ torture_type The type of RCU to test, with string values as follows: | |||
174 | and synchronize_rcu_bh_expedited(). | 174 | and synchronize_rcu_bh_expedited(). |
175 | 175 | ||
176 | "srcu": srcu_read_lock(), srcu_read_unlock() and | 176 | "srcu": srcu_read_lock(), srcu_read_unlock() and |
177 | call_srcu(). | ||
178 | |||
179 | "srcu_sync": srcu_read_lock(), srcu_read_unlock() and | ||
177 | synchronize_srcu(). | 180 | synchronize_srcu(). |
178 | 181 | ||
179 | "srcu_expedited": srcu_read_lock(), srcu_read_unlock() and | 182 | "srcu_expedited": srcu_read_lock(), srcu_read_unlock() and |
180 | synchronize_srcu_expedited(). | 183 | synchronize_srcu_expedited(). |
181 | 184 | ||
185 | "srcu_raw": srcu_read_lock_raw(), srcu_read_unlock_raw(), | ||
186 | and call_srcu(). | ||
187 | |||
188 | "srcu_raw_sync": srcu_read_lock_raw(), srcu_read_unlock_raw(), | ||
189 | and synchronize_srcu(). | ||
190 | |||
182 | "sched": preempt_disable(), preempt_enable(), and | 191 | "sched": preempt_disable(), preempt_enable(), and |
183 | call_rcu_sched(). | 192 | call_rcu_sched(). |
184 | 193 | ||
diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt index 6bbe8dcdc3da..69ee188515e7 100644 --- a/Documentation/RCU/whatisRCU.txt +++ b/Documentation/RCU/whatisRCU.txt | |||
@@ -833,9 +833,9 @@ sched: Critical sections Grace period Barrier | |||
833 | 833 | ||
834 | SRCU: Critical sections Grace period Barrier | 834 | SRCU: Critical sections Grace period Barrier |
835 | 835 | ||
836 | srcu_read_lock synchronize_srcu N/A | 836 | srcu_read_lock synchronize_srcu srcu_barrier |
837 | srcu_read_unlock synchronize_srcu_expedited | 837 | srcu_read_unlock call_srcu |
838 | srcu_read_lock_raw | 838 | srcu_read_lock_raw synchronize_srcu_expedited |
839 | srcu_read_unlock_raw | 839 | srcu_read_unlock_raw |
840 | srcu_dereference | 840 | srcu_dereference |
841 | 841 | ||
diff --git a/Documentation/arm/Samsung-S3C24XX/H1940.txt b/Documentation/arm/Samsung-S3C24XX/H1940.txt index f4a7b22c8664..b738859b1fc0 100644 --- a/Documentation/arm/Samsung-S3C24XX/H1940.txt +++ b/Documentation/arm/Samsung-S3C24XX/H1940.txt | |||
@@ -37,4 +37,4 @@ Maintainers | |||
37 | Thanks to the many others who have also provided support. | 37 | Thanks to the many others who have also provided support. |
38 | 38 | ||
39 | 39 | ||
40 | (c) 2005 Ben Dooks \ No newline at end of file | 40 | (c) 2005 Ben Dooks |
diff --git a/Documentation/arm/Samsung-S3C24XX/SMDK2440.txt b/Documentation/arm/Samsung-S3C24XX/SMDK2440.txt index 32e1eae6a25f..429390bd4684 100644 --- a/Documentation/arm/Samsung-S3C24XX/SMDK2440.txt +++ b/Documentation/arm/Samsung-S3C24XX/SMDK2440.txt | |||
@@ -53,4 +53,4 @@ Maintainers | |||
53 | and to Simtec Electronics for allowing me time to work on this. | 53 | and to Simtec Electronics for allowing me time to work on this. |
54 | 54 | ||
55 | 55 | ||
56 | (c) 2004 Ben Dooks \ No newline at end of file | 56 | (c) 2004 Ben Dooks |
diff --git a/Documentation/block/queue-sysfs.txt b/Documentation/block/queue-sysfs.txt index d8147b336c35..6518a55273e7 100644 --- a/Documentation/block/queue-sysfs.txt +++ b/Documentation/block/queue-sysfs.txt | |||
@@ -38,6 +38,13 @@ read or write requests. Note that the total allocated number may be twice | |||
38 | this amount, since it applies only to reads or writes (not the accumulated | 38 | this amount, since it applies only to reads or writes (not the accumulated |
39 | sum). | 39 | sum). |
40 | 40 | ||
41 | To avoid priority inversion through request starvation, a request | ||
42 | queue maintains a separate request pool per each cgroup when | ||
43 | CONFIG_BLK_CGROUP is enabled, and this parameter applies to each such | ||
44 | per-block-cgroup request pool. IOW, if there are N block cgroups, | ||
45 | each request queue may have upto N request pools, each independently | ||
46 | regulated by nr_requests. | ||
47 | |||
41 | read_ahead_kb (RW) | 48 | read_ahead_kb (RW) |
42 | ------------------ | 49 | ------------------ |
43 | Maximum number of kilobytes to read-ahead for filesystems on this block | 50 | Maximum number of kilobytes to read-ahead for filesystems on this block |
diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt index 8e74980ab385..4a0b64c605fc 100644 --- a/Documentation/cgroups/cgroups.txt +++ b/Documentation/cgroups/cgroups.txt | |||
@@ -370,15 +370,12 @@ To mount a cgroup hierarchy with just the cpuset and memory | |||
370 | subsystems, type: | 370 | subsystems, type: |
371 | # mount -t cgroup -o cpuset,memory hier1 /sys/fs/cgroup/rg1 | 371 | # mount -t cgroup -o cpuset,memory hier1 /sys/fs/cgroup/rg1 |
372 | 372 | ||
373 | To change the set of subsystems bound to a mounted hierarchy, just | 373 | While remounting cgroups is currently supported, it is not recommend |
374 | remount with different options: | 374 | to use it. Remounting allows changing bound subsystems and |
375 | # mount -o remount,cpuset,blkio hier1 /sys/fs/cgroup/rg1 | 375 | release_agent. Rebinding is hardly useful as it only works when the |
376 | 376 | hierarchy is empty and release_agent itself should be replaced with | |
377 | Now memory is removed from the hierarchy and blkio is added. | 377 | conventional fsnotify. The support for remounting will be removed in |
378 | 378 | the future. | |
379 | Note this will add blkio to the hierarchy but won't remove memory or | ||
380 | cpuset, because the new options are appended to the old ones: | ||
381 | # mount -o remount,blkio /sys/fs/cgroup/rg1 | ||
382 | 379 | ||
383 | To Specify a hierarchy's release_agent: | 380 | To Specify a hierarchy's release_agent: |
384 | # mount -t cgroup -o cpuset,release_agent="/sbin/cpuset_release_agent" \ | 381 | # mount -t cgroup -o cpuset,release_agent="/sbin/cpuset_release_agent" \ |
@@ -637,16 +634,6 @@ void exit(struct task_struct *task) | |||
637 | 634 | ||
638 | Called during task exit. | 635 | Called during task exit. |
639 | 636 | ||
640 | int populate(struct cgroup *cgrp) | ||
641 | (cgroup_mutex held by caller) | ||
642 | |||
643 | Called after creation of a cgroup to allow a subsystem to populate | ||
644 | the cgroup directory with file entries. The subsystem should make | ||
645 | calls to cgroup_add_file() with objects of type cftype (see | ||
646 | include/linux/cgroup.h for details). Note that although this | ||
647 | method can return an error code, the error code is currently not | ||
648 | always handled well. | ||
649 | |||
650 | void post_clone(struct cgroup *cgrp) | 637 | void post_clone(struct cgroup *cgrp) |
651 | (cgroup_mutex held by caller) | 638 | (cgroup_mutex held by caller) |
652 | 639 | ||
@@ -656,7 +643,7 @@ example in cpusets, no task may attach before 'cpus' and 'mems' are set | |||
656 | up. | 643 | up. |
657 | 644 | ||
658 | void bind(struct cgroup *root) | 645 | void bind(struct cgroup *root) |
659 | (cgroup_mutex and ss->hierarchy_mutex held by caller) | 646 | (cgroup_mutex held by caller) |
660 | 647 | ||
661 | Called when a cgroup subsystem is rebound to a different hierarchy | 648 | Called when a cgroup subsystem is rebound to a different hierarchy |
662 | and root cgroup. Currently this will only involve movement between | 649 | and root cgroup. Currently this will only involve movement between |
diff --git a/Documentation/cgroups/hugetlb.txt b/Documentation/cgroups/hugetlb.txt new file mode 100644 index 000000000000..a9faaca1f029 --- /dev/null +++ b/Documentation/cgroups/hugetlb.txt | |||
@@ -0,0 +1,45 @@ | |||
1 | HugeTLB Controller | ||
2 | ------------------- | ||
3 | |||
4 | The HugeTLB controller allows to limit the HugeTLB usage per control group and | ||
5 | enforces the controller limit during page fault. Since HugeTLB doesn't | ||
6 | support page reclaim, enforcing the limit at page fault time implies that, | ||
7 | the application will get SIGBUS signal if it tries to access HugeTLB pages | ||
8 | beyond its limit. This requires the application to know beforehand how much | ||
9 | HugeTLB pages it would require for its use. | ||
10 | |||
11 | HugeTLB controller can be created by first mounting the cgroup filesystem. | ||
12 | |||
13 | # mount -t cgroup -o hugetlb none /sys/fs/cgroup | ||
14 | |||
15 | With the above step, the initial or the parent HugeTLB group becomes | ||
16 | visible at /sys/fs/cgroup. At bootup, this group includes all the tasks in | ||
17 | the system. /sys/fs/cgroup/tasks lists the tasks in this cgroup. | ||
18 | |||
19 | New groups can be created under the parent group /sys/fs/cgroup. | ||
20 | |||
21 | # cd /sys/fs/cgroup | ||
22 | # mkdir g1 | ||
23 | # echo $$ > g1/tasks | ||
24 | |||
25 | The above steps create a new group g1 and move the current shell | ||
26 | process (bash) into it. | ||
27 | |||
28 | Brief summary of control files | ||
29 | |||
30 | hugetlb.<hugepagesize>.limit_in_bytes # set/show limit of "hugepagesize" hugetlb usage | ||
31 | hugetlb.<hugepagesize>.max_usage_in_bytes # show max "hugepagesize" hugetlb usage recorded | ||
32 | hugetlb.<hugepagesize>.usage_in_bytes # show current res_counter usage for "hugepagesize" hugetlb | ||
33 | hugetlb.<hugepagesize>.failcnt # show the number of allocation failure due to HugeTLB limit | ||
34 | |||
35 | For a system supporting two hugepage size (16M and 16G) the control | ||
36 | files include: | ||
37 | |||
38 | hugetlb.16GB.limit_in_bytes | ||
39 | hugetlb.16GB.max_usage_in_bytes | ||
40 | hugetlb.16GB.usage_in_bytes | ||
41 | hugetlb.16GB.failcnt | ||
42 | hugetlb.16MB.limit_in_bytes | ||
43 | hugetlb.16MB.max_usage_in_bytes | ||
44 | hugetlb.16MB.usage_in_bytes | ||
45 | hugetlb.16MB.failcnt | ||
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt index dd88540bb995..4372e6b8a353 100644 --- a/Documentation/cgroups/memory.txt +++ b/Documentation/cgroups/memory.txt | |||
@@ -73,6 +73,8 @@ Brief summary of control files. | |||
73 | 73 | ||
74 | memory.kmem.tcp.limit_in_bytes # set/show hard limit for tcp buf memory | 74 | memory.kmem.tcp.limit_in_bytes # set/show hard limit for tcp buf memory |
75 | memory.kmem.tcp.usage_in_bytes # show current tcp buf memory allocation | 75 | memory.kmem.tcp.usage_in_bytes # show current tcp buf memory allocation |
76 | memory.kmem.tcp.failcnt # show the number of tcp buf memory usage hits limits | ||
77 | memory.kmem.tcp.max_usage_in_bytes # show max tcp buf memory usage recorded | ||
76 | 78 | ||
77 | 1. History | 79 | 1. History |
78 | 80 | ||
@@ -187,12 +189,12 @@ the cgroup that brought it in -- this will happen on memory pressure). | |||
187 | But see section 8.2: when moving a task to another cgroup, its pages may | 189 | But see section 8.2: when moving a task to another cgroup, its pages may |
188 | be recharged to the new cgroup, if move_charge_at_immigrate has been chosen. | 190 | be recharged to the new cgroup, if move_charge_at_immigrate has been chosen. |
189 | 191 | ||
190 | Exception: If CONFIG_CGROUP_CGROUP_MEM_RES_CTLR_SWAP is not used. | 192 | Exception: If CONFIG_CGROUP_CGROUP_MEMCG_SWAP is not used. |
191 | When you do swapoff and make swapped-out pages of shmem(tmpfs) to | 193 | When you do swapoff and make swapped-out pages of shmem(tmpfs) to |
192 | be backed into memory in force, charges for pages are accounted against the | 194 | be backed into memory in force, charges for pages are accounted against the |
193 | caller of swapoff rather than the users of shmem. | 195 | caller of swapoff rather than the users of shmem. |
194 | 196 | ||
195 | 2.4 Swap Extension (CONFIG_CGROUP_MEM_RES_CTLR_SWAP) | 197 | 2.4 Swap Extension (CONFIG_MEMCG_SWAP) |
196 | 198 | ||
197 | Swap Extension allows you to record charge for swap. A swapped-in page is | 199 | Swap Extension allows you to record charge for swap. A swapped-in page is |
198 | charged back to original page allocator if possible. | 200 | charged back to original page allocator if possible. |
@@ -259,7 +261,7 @@ When oom event notifier is registered, event will be delivered. | |||
259 | per-zone-per-cgroup LRU (cgroup's private LRU) is just guarded by | 261 | per-zone-per-cgroup LRU (cgroup's private LRU) is just guarded by |
260 | zone->lru_lock, it has no lock of its own. | 262 | zone->lru_lock, it has no lock of its own. |
261 | 263 | ||
262 | 2.7 Kernel Memory Extension (CONFIG_CGROUP_MEM_RES_CTLR_KMEM) | 264 | 2.7 Kernel Memory Extension (CONFIG_MEMCG_KMEM) |
263 | 265 | ||
264 | With the Kernel memory extension, the Memory Controller is able to limit | 266 | With the Kernel memory extension, the Memory Controller is able to limit |
265 | the amount of kernel memory used by the system. Kernel memory is fundamentally | 267 | the amount of kernel memory used by the system. Kernel memory is fundamentally |
@@ -286,8 +288,8 @@ per cgroup, instead of globally. | |||
286 | 288 | ||
287 | a. Enable CONFIG_CGROUPS | 289 | a. Enable CONFIG_CGROUPS |
288 | b. Enable CONFIG_RESOURCE_COUNTERS | 290 | b. Enable CONFIG_RESOURCE_COUNTERS |
289 | c. Enable CONFIG_CGROUP_MEM_RES_CTLR | 291 | c. Enable CONFIG_MEMCG |
290 | d. Enable CONFIG_CGROUP_MEM_RES_CTLR_SWAP (to use swap extension) | 292 | d. Enable CONFIG_MEMCG_SWAP (to use swap extension) |
291 | 293 | ||
292 | 1. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?) | 294 | 1. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?) |
293 | # mount -t tmpfs none /sys/fs/cgroup | 295 | # mount -t tmpfs none /sys/fs/cgroup |
diff --git a/Documentation/connector/cn_test.c b/Documentation/connector/cn_test.c index 7764594778d4..adcca0368d60 100644 --- a/Documentation/connector/cn_test.c +++ b/Documentation/connector/cn_test.c | |||
@@ -69,9 +69,13 @@ static int cn_test_want_notify(void) | |||
69 | return -ENOMEM; | 69 | return -ENOMEM; |
70 | } | 70 | } |
71 | 71 | ||
72 | nlh = NLMSG_PUT(skb, 0, 0x123, NLMSG_DONE, size - sizeof(*nlh)); | 72 | nlh = nlmsg_put(skb, 0, 0x123, NLMSG_DONE, size - sizeof(*nlh), 0); |
73 | if (!nlh) { | ||
74 | kfree_skb(skb); | ||
75 | return -EMSGSIZE; | ||
76 | } | ||
73 | 77 | ||
74 | msg = (struct cn_msg *)NLMSG_DATA(nlh); | 78 | msg = nlmsg_data(nlh); |
75 | 79 | ||
76 | memset(msg, 0, size0); | 80 | memset(msg, 0, size0); |
77 | 81 | ||
@@ -117,11 +121,6 @@ static int cn_test_want_notify(void) | |||
117 | pr_info("request was sent: group=0x%x\n", ctl->group); | 121 | pr_info("request was sent: group=0x%x\n", ctl->group); |
118 | 122 | ||
119 | return 0; | 123 | return 0; |
120 | |||
121 | nlmsg_failure: | ||
122 | pr_err("failed to send %u.%u\n", msg->seq, msg->ack); | ||
123 | kfree_skb(skb); | ||
124 | return -EINVAL; | ||
125 | } | 124 | } |
126 | #endif | 125 | #endif |
127 | 126 | ||
diff --git a/Documentation/device-mapper/dm-raid.txt b/Documentation/device-mapper/dm-raid.txt index 946c73342cde..1c1844957166 100644 --- a/Documentation/device-mapper/dm-raid.txt +++ b/Documentation/device-mapper/dm-raid.txt | |||
@@ -27,6 +27,10 @@ The target is named "raid" and it accepts the following parameters: | |||
27 | - rotating parity N (right-to-left) with data restart | 27 | - rotating parity N (right-to-left) with data restart |
28 | raid6_nc RAID6 N continue | 28 | raid6_nc RAID6 N continue |
29 | - rotating parity N (right-to-left) with data continuation | 29 | - rotating parity N (right-to-left) with data continuation |
30 | raid10 Various RAID10 inspired algorithms chosen by additional params | ||
31 | - RAID10: Striped Mirrors (aka 'Striping on top of mirrors') | ||
32 | - RAID1E: Integrated Adjacent Stripe Mirroring | ||
33 | - and other similar RAID10 variants | ||
30 | 34 | ||
31 | Reference: Chapter 4 of | 35 | Reference: Chapter 4 of |
32 | http://www.snia.org/sites/default/files/SNIA_DDF_Technical_Position_v2.0.pdf | 36 | http://www.snia.org/sites/default/files/SNIA_DDF_Technical_Position_v2.0.pdf |
@@ -59,6 +63,28 @@ The target is named "raid" and it accepts the following parameters: | |||
59 | logical size of the array. The bitmap records the device | 63 | logical size of the array. The bitmap records the device |
60 | synchronisation state for each region. | 64 | synchronisation state for each region. |
61 | 65 | ||
66 | [raid10_copies <# copies>] | ||
67 | [raid10_format near] | ||
68 | These two options are used to alter the default layout of | ||
69 | a RAID10 configuration. The number of copies is can be | ||
70 | specified, but the default is 2. There are other variations | ||
71 | to how the copies are laid down - the default and only current | ||
72 | option is "near". Near copies are what most people think of | ||
73 | with respect to mirroring. If these options are left | ||
74 | unspecified, or 'raid10_copies 2' and/or 'raid10_format near' | ||
75 | are given, then the layouts for 2, 3 and 4 devices are: | ||
76 | 2 drives 3 drives 4 drives | ||
77 | -------- ---------- -------------- | ||
78 | A1 A1 A1 A1 A2 A1 A1 A2 A2 | ||
79 | A2 A2 A2 A3 A3 A3 A3 A4 A4 | ||
80 | A3 A3 A4 A4 A5 A5 A5 A6 A6 | ||
81 | A4 A4 A5 A6 A6 A7 A7 A8 A8 | ||
82 | .. .. .. .. .. .. .. .. .. | ||
83 | The 2-device layout is equivalent 2-way RAID1. The 4-device | ||
84 | layout is what a traditional RAID10 would look like. The | ||
85 | 3-device layout is what might be called a 'RAID1E - Integrated | ||
86 | Adjacent Stripe Mirroring'. | ||
87 | |||
62 | <#raid_devs>: The number of devices composing the array. | 88 | <#raid_devs>: The number of devices composing the array. |
63 | Each device consists of two entries. The first is the device | 89 | Each device consists of two entries. The first is the device |
64 | containing the metadata (if any); the second is the one containing the | 90 | containing the metadata (if any); the second is the one containing the |
diff --git a/Documentation/device-mapper/striped.txt b/Documentation/device-mapper/striped.txt index f34d3236b9da..45f3b91ea4c3 100644 --- a/Documentation/device-mapper/striped.txt +++ b/Documentation/device-mapper/striped.txt | |||
@@ -9,15 +9,14 @@ devices in parallel. | |||
9 | 9 | ||
10 | Parameters: <num devs> <chunk size> [<dev path> <offset>]+ | 10 | Parameters: <num devs> <chunk size> [<dev path> <offset>]+ |
11 | <num devs>: Number of underlying devices. | 11 | <num devs>: Number of underlying devices. |
12 | <chunk size>: Size of each chunk of data. Must be a power-of-2 and at | 12 | <chunk size>: Size of each chunk of data. Must be at least as |
13 | least as large as the system's PAGE_SIZE. | 13 | large as the system's PAGE_SIZE. |
14 | <dev path>: Full pathname to the underlying block-device, or a | 14 | <dev path>: Full pathname to the underlying block-device, or a |
15 | "major:minor" device-number. | 15 | "major:minor" device-number. |
16 | <offset>: Starting sector within the device. | 16 | <offset>: Starting sector within the device. |
17 | 17 | ||
18 | One or more underlying devices can be specified. The striped device size must | 18 | One or more underlying devices can be specified. The striped device size must |
19 | be a multiple of the chunk size and a multiple of the number of underlying | 19 | be a multiple of the chunk size multiplied by the number of underlying devices. |
20 | devices. | ||
21 | 20 | ||
22 | 21 | ||
23 | Example scripts | 22 | Example scripts |
diff --git a/Documentation/device-mapper/thin-provisioning.txt b/Documentation/device-mapper/thin-provisioning.txt index f5cfc62b7ad3..30b8b83bd333 100644 --- a/Documentation/device-mapper/thin-provisioning.txt +++ b/Documentation/device-mapper/thin-provisioning.txt | |||
@@ -231,6 +231,9 @@ i) Constructor | |||
231 | no_discard_passdown: Don't pass discards down to the underlying | 231 | no_discard_passdown: Don't pass discards down to the underlying |
232 | data device, but just remove the mapping. | 232 | data device, but just remove the mapping. |
233 | 233 | ||
234 | read_only: Don't allow any changes to be made to the pool | ||
235 | metadata. | ||
236 | |||
234 | Data block size must be between 64KB (128 sectors) and 1GB | 237 | Data block size must be between 64KB (128 sectors) and 1GB |
235 | (2097152 sectors) inclusive. | 238 | (2097152 sectors) inclusive. |
236 | 239 | ||
@@ -239,7 +242,7 @@ ii) Status | |||
239 | 242 | ||
240 | <transaction id> <used metadata blocks>/<total metadata blocks> | 243 | <transaction id> <used metadata blocks>/<total metadata blocks> |
241 | <used data blocks>/<total data blocks> <held metadata root> | 244 | <used data blocks>/<total data blocks> <held metadata root> |
242 | 245 | [no_]discard_passdown ro|rw | |
243 | 246 | ||
244 | transaction id: | 247 | transaction id: |
245 | A 64-bit number used by userspace to help synchronise with metadata | 248 | A 64-bit number used by userspace to help synchronise with metadata |
@@ -257,6 +260,21 @@ ii) Status | |||
257 | held root. This feature is not yet implemented so '-' is | 260 | held root. This feature is not yet implemented so '-' is |
258 | always returned. | 261 | always returned. |
259 | 262 | ||
263 | discard_passdown|no_discard_passdown | ||
264 | Whether or not discards are actually being passed down to the | ||
265 | underlying device. When this is enabled when loading the table, | ||
266 | it can get disabled if the underlying device doesn't support it. | ||
267 | |||
268 | ro|rw | ||
269 | If the pool encounters certain types of device failures it will | ||
270 | drop into a read-only metadata mode in which no changes to | ||
271 | the pool metadata (like allocating new blocks) are permitted. | ||
272 | |||
273 | In serious cases where even a read-only mode is deemed unsafe | ||
274 | no further I/O will be permitted and the status will just | ||
275 | contain the string 'Fail'. The userspace recovery tools | ||
276 | should then be used. | ||
277 | |||
260 | iii) Messages | 278 | iii) Messages |
261 | 279 | ||
262 | create_thin <dev id> | 280 | create_thin <dev id> |
@@ -329,3 +347,7 @@ regain some space then send the 'trim' message to the pool. | |||
329 | ii) Status | 347 | ii) Status |
330 | 348 | ||
331 | <nr mapped sectors> <highest mapped sector> | 349 | <nr mapped sectors> <highest mapped sector> |
350 | |||
351 | If the pool has encountered device errors and failed, the status | ||
352 | will just contain the string 'Fail'. The userspace recovery | ||
353 | tools should then be used. | ||
diff --git a/Documentation/devices.txt b/Documentation/devices.txt index 47a154f30290..b6251cca9263 100644 --- a/Documentation/devices.txt +++ b/Documentation/devices.txt | |||
@@ -2416,6 +2416,8 @@ Your cooperation is appreciated. | |||
2416 | 1 = /dev/raw/raw1 First raw I/O device | 2416 | 1 = /dev/raw/raw1 First raw I/O device |
2417 | 2 = /dev/raw/raw2 Second raw I/O device | 2417 | 2 = /dev/raw/raw2 Second raw I/O device |
2418 | ... | 2418 | ... |
2419 | max minor number of raw device is set by kernel config | ||
2420 | MAX_RAW_DEVS or raw module parameter 'max_raw_devs' | ||
2419 | 2421 | ||
2420 | 163 char | 2422 | 163 char |
2421 | 2423 | ||
diff --git a/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt b/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt new file mode 100644 index 000000000000..70c0dc5f00ed --- /dev/null +++ b/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | Marvell Armada 370 and Armada XP Interrupt Controller | ||
2 | ----------------------------------------------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible: Should be "marvell,mpic" | ||
6 | - interrupt-controller: Identifies the node as an interrupt controller. | ||
7 | - #interrupt-cells: The number of cells to define the interrupts. Should be 1. | ||
8 | The cell is the IRQ number | ||
9 | - reg: Should contain PMIC registers location and length. First pair | ||
10 | for the main interrupt registers, second pair for the per-CPU | ||
11 | interrupt registers | ||
12 | |||
13 | Example: | ||
14 | |||
15 | mpic: interrupt-controller@d0020000 { | ||
16 | compatible = "marvell,mpic"; | ||
17 | #interrupt-cells = <1>; | ||
18 | #address-cells = <1>; | ||
19 | #size-cells = <1>; | ||
20 | interrupt-controller; | ||
21 | reg = <0xd0020000 0x1000>, | ||
22 | <0xd0021000 0x1000>; | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/armada-370-xp-timer.txt b/Documentation/devicetree/bindings/arm/armada-370-xp-timer.txt new file mode 100644 index 000000000000..8b6ea2267c94 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/armada-370-xp-timer.txt | |||
@@ -0,0 +1,11 @@ | |||
1 | Marvell Armada 370 and Armada XP Global Timers | ||
2 | ---------------------------------------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible: Should be "marvell,armada-370-xp-timer" | ||
6 | - interrupts: Should contain the list of Global Timer interrupts | ||
7 | - reg: Should contain the base address of the Global Timer registers | ||
8 | |||
9 | Optional properties: | ||
10 | - marvell,timer-25Mhz: Tells whether the Global timer supports the 25 | ||
11 | Mhz fixed mode (available on Armada XP and not on Armada 370) | ||
diff --git a/Documentation/devicetree/bindings/arm/armada-370-xp.txt b/Documentation/devicetree/bindings/arm/armada-370-xp.txt new file mode 100644 index 000000000000..c6ed90ea6e17 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/armada-370-xp.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | Marvell Armada 370 and Armada XP Platforms Device Tree Bindings | ||
2 | --------------------------------------------------------------- | ||
3 | |||
4 | Boards with a SoC of the Marvell Armada 370 and Armada XP families | ||
5 | shall have the following property: | ||
6 | |||
7 | Required root node property: | ||
8 | |||
9 | compatible: must contain "marvell,armada-370-xp" | ||
10 | |||
11 | In addition, boards using the Marvell Armada 370 SoC shall have the | ||
12 | following property: | ||
13 | |||
14 | Required root node property: | ||
15 | |||
16 | compatible: must contain "marvell,armada370" | ||
17 | |||
18 | In addition, boards using the Marvell Armada XP SoC shall have the | ||
19 | following property: | ||
20 | |||
21 | Required root node property: | ||
22 | |||
23 | compatible: must contain "marvell,armadaxp" | ||
24 | |||
diff --git a/Documentation/devicetree/bindings/arm/atmel-aic.txt b/Documentation/devicetree/bindings/arm/atmel-aic.txt index aabca4f83402..19078bf5cca8 100644 --- a/Documentation/devicetree/bindings/arm/atmel-aic.txt +++ b/Documentation/devicetree/bindings/arm/atmel-aic.txt | |||
@@ -4,7 +4,7 @@ Required properties: | |||
4 | - compatible: Should be "atmel,<chip>-aic" | 4 | - compatible: Should be "atmel,<chip>-aic" |
5 | - interrupt-controller: Identifies the node as an interrupt controller. | 5 | - interrupt-controller: Identifies the node as an interrupt controller. |
6 | - interrupt-parent: For single AIC system, it is an empty property. | 6 | - interrupt-parent: For single AIC system, it is an empty property. |
7 | - #interrupt-cells: The number of cells to define the interrupts. It sould be 2. | 7 | - #interrupt-cells: The number of cells to define the interrupts. It sould be 3. |
8 | The first cell is the IRQ number (aka "Peripheral IDentifier" on datasheet). | 8 | The first cell is the IRQ number (aka "Peripheral IDentifier" on datasheet). |
9 | The second cell is used to specify flags: | 9 | The second cell is used to specify flags: |
10 | bits[3:0] trigger type and level flags: | 10 | bits[3:0] trigger type and level flags: |
@@ -14,7 +14,10 @@ Required properties: | |||
14 | 8 = active low level-sensitive. | 14 | 8 = active low level-sensitive. |
15 | Valid combinations are 1, 2, 3, 4, 8. | 15 | Valid combinations are 1, 2, 3, 4, 8. |
16 | Default flag for internal sources should be set to 4 (active high). | 16 | Default flag for internal sources should be set to 4 (active high). |
17 | The third cell is used to specify the irq priority from 0 (lowest) to 7 | ||
18 | (highest). | ||
17 | - reg: Should contain AIC registers location and length | 19 | - reg: Should contain AIC registers location and length |
20 | - atmel,external-irqs: u32 array of external irqs. | ||
18 | 21 | ||
19 | Examples: | 22 | Examples: |
20 | /* | 23 | /* |
@@ -24,7 +27,7 @@ Examples: | |||
24 | compatible = "atmel,at91rm9200-aic"; | 27 | compatible = "atmel,at91rm9200-aic"; |
25 | interrupt-controller; | 28 | interrupt-controller; |
26 | interrupt-parent; | 29 | interrupt-parent; |
27 | #interrupt-cells = <2>; | 30 | #interrupt-cells = <3>; |
28 | reg = <0xfffff000 0x200>; | 31 | reg = <0xfffff000 0x200>; |
29 | }; | 32 | }; |
30 | 33 | ||
@@ -34,5 +37,5 @@ Examples: | |||
34 | dma: dma-controller@ffffec00 { | 37 | dma: dma-controller@ffffec00 { |
35 | compatible = "atmel,at91sam9g45-dma"; | 38 | compatible = "atmel,at91sam9g45-dma"; |
36 | reg = <0xffffec00 0x200>; | 39 | reg = <0xffffec00 0x200>; |
37 | interrupts = <21 4>; | 40 | interrupts = <21 4 5>; |
38 | }; | 41 | }; |
diff --git a/Documentation/devicetree/bindings/arm/calxeda/l2ecc.txt b/Documentation/devicetree/bindings/arm/calxeda/l2ecc.txt new file mode 100644 index 000000000000..94e642a33db0 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/calxeda/l2ecc.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | Calxeda Highbank L2 cache ECC | ||
2 | |||
3 | Properties: | ||
4 | - compatible : Should be "calxeda,hb-sregs-l2-ecc" | ||
5 | - reg : Address and size for ECC error interrupt clear registers. | ||
6 | - interrupts : Should be single bit error interrupt, then double bit error | ||
7 | interrupt. | ||
8 | |||
9 | Example: | ||
10 | |||
11 | sregs@fff3c200 { | ||
12 | compatible = "calxeda,hb-sregs-l2-ecc"; | ||
13 | reg = <0xfff3c200 0x100>; | ||
14 | interrupts = <0 71 4 0 72 4>; | ||
15 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/calxeda/mem-ctrlr.txt b/Documentation/devicetree/bindings/arm/calxeda/mem-ctrlr.txt new file mode 100644 index 000000000000..f770ac0893d4 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/calxeda/mem-ctrlr.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | Calxeda DDR memory controller | ||
2 | |||
3 | Properties: | ||
4 | - compatible : Should be "calxeda,hb-ddr-ctrl" | ||
5 | - reg : Address and size for DDR controller registers. | ||
6 | - interrupts : Interrupt for DDR controller. | ||
7 | |||
8 | Example: | ||
9 | |||
10 | memory-controller@fff00000 { | ||
11 | compatible = "calxeda,hb-ddr-ctrl"; | ||
12 | reg = <0xfff00000 0x1000>; | ||
13 | interrupts = <0 91 4>; | ||
14 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/davinci/cp-intc.txt b/Documentation/devicetree/bindings/arm/davinci/cp-intc.txt new file mode 100644 index 000000000000..597e8a089fe4 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/davinci/cp-intc.txt | |||
@@ -0,0 +1,27 @@ | |||
1 | * TI Common Platform Interrupt Controller | ||
2 | |||
3 | Common Platform Interrupt Controller (cp_intc) is used on | ||
4 | OMAP-L1x SoCs and can support several configurable number | ||
5 | of interrupts. | ||
6 | |||
7 | Main node required properties: | ||
8 | |||
9 | - compatible : should be: | ||
10 | "ti,cp-intc" | ||
11 | - interrupt-controller : Identifies the node as an interrupt controller | ||
12 | - #interrupt-cells : Specifies the number of cells needed to encode an | ||
13 | interrupt source. The type shall be a <u32> and the value shall be 1. | ||
14 | |||
15 | The cell contains the interrupt number in the range [0-128]. | ||
16 | - ti,intc-size: Number of interrupts handled by the interrupt controller. | ||
17 | - reg: physical base address and size of the intc registers map. | ||
18 | |||
19 | Example: | ||
20 | |||
21 | intc: interrupt-controller@1 { | ||
22 | compatible = "ti,cp-intc"; | ||
23 | interrupt-controller; | ||
24 | #interrupt-cells = <1>; | ||
25 | ti,intc-size = <101>; | ||
26 | reg = <0xfffee000 0x2000>; | ||
27 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/mrvl/intc.txt b/Documentation/devicetree/bindings/arm/mrvl/intc.txt index 80b9a94d9a23..8b53273cb22f 100644 --- a/Documentation/devicetree/bindings/arm/mrvl/intc.txt +++ b/Documentation/devicetree/bindings/arm/mrvl/intc.txt | |||
@@ -38,3 +38,23 @@ Example: | |||
38 | reg-names = "mux status", "mux mask"; | 38 | reg-names = "mux status", "mux mask"; |
39 | mrvl,intc-nr-irqs = <2>; | 39 | mrvl,intc-nr-irqs = <2>; |
40 | }; | 40 | }; |
41 | |||
42 | * Marvell Orion Interrupt controller | ||
43 | |||
44 | Required properties | ||
45 | - compatible : Should be "marvell,orion-intc". | ||
46 | - #interrupt-cells: Specifies the number of cells needed to encode an | ||
47 | interrupt source. Supported value is <1>. | ||
48 | - interrupt-controller : Declare this node to be an interrupt controller. | ||
49 | - reg : Interrupt mask address. A list of 4 byte ranges, one per controller. | ||
50 | One entry in the list represents 32 interrupts. | ||
51 | |||
52 | Example: | ||
53 | |||
54 | intc: interrupt-controller { | ||
55 | compatible = "marvell,orion-intc", "marvell,intc"; | ||
56 | interrupt-controller; | ||
57 | #interrupt-cells = <1>; | ||
58 | reg = <0xfed20204 0x04>, | ||
59 | <0xfed20214 0x04>; | ||
60 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/mvebu-system-controller.txt b/Documentation/devicetree/bindings/arm/mvebu-system-controller.txt new file mode 100644 index 000000000000..081c6a786c8a --- /dev/null +++ b/Documentation/devicetree/bindings/arm/mvebu-system-controller.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | MVEBU System Controller | ||
2 | ----------------------- | ||
3 | MVEBU (Marvell SOCs: Armada 370/XP, Dove, mv78xx0, Kirkwood, Orion5x) | ||
4 | |||
5 | Required properties: | ||
6 | |||
7 | - compatible: one of: | ||
8 | - "marvell,orion-system-controller" | ||
9 | - "marvell,armada-370-xp-system-controller" | ||
10 | - reg: Should contain system controller registers location and length. | ||
11 | |||
12 | Example: | ||
13 | |||
14 | system-controller@d0018200 { | ||
15 | compatible = "marvell,armada-370-xp-system-controller"; | ||
16 | reg = <0xd0018200 0x500>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/olimex.txt b/Documentation/devicetree/bindings/arm/olimex.txt new file mode 100644 index 000000000000..007fb5c685a1 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/olimex.txt | |||
@@ -0,0 +1,6 @@ | |||
1 | Olimex i.MX Platforms Device Tree Bindings | ||
2 | ------------------------------------------ | ||
3 | |||
4 | i.MX23 Olinuxino Low Cost Board | ||
5 | Required root node properties: | ||
6 | - compatible = "olimex,imx23-olinuxino", "fsl,imx23"; | ||
diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt index e78e8bccac30..ccdd0e53451f 100644 --- a/Documentation/devicetree/bindings/arm/omap/omap.txt +++ b/Documentation/devicetree/bindings/arm/omap/omap.txt | |||
@@ -47,3 +47,9 @@ Boards: | |||
47 | 47 | ||
48 | - AM335X EVM : Software Developement Board for AM335x | 48 | - AM335X EVM : Software Developement Board for AM335x |
49 | compatible = "ti,am335x-evm", "ti,am33xx", "ti,omap3" | 49 | compatible = "ti,am335x-evm", "ti,am33xx", "ti,omap3" |
50 | |||
51 | - AM335X Bone : Low cost community board | ||
52 | compatible = "ti,am335x-bone", "ti,am33xx", "ti,omap3" | ||
53 | |||
54 | - OMAP5 EVM : Evaluation Module | ||
55 | compatible = "ti,omap5-evm", "ti,omap5" | ||
diff --git a/Documentation/devicetree/bindings/arm/primecell.txt b/Documentation/devicetree/bindings/arm/primecell.txt index 951ca46789d4..64fc82bc8928 100644 --- a/Documentation/devicetree/bindings/arm/primecell.txt +++ b/Documentation/devicetree/bindings/arm/primecell.txt | |||
@@ -13,11 +13,17 @@ Required properties: | |||
13 | Optional properties: | 13 | Optional properties: |
14 | 14 | ||
15 | - arm,primecell-periphid : Value to override the h/w value with | 15 | - arm,primecell-periphid : Value to override the h/w value with |
16 | - clocks : From common clock binding. First clock is phandle to clock for apb | ||
17 | pclk. Additional clocks are optional and specific to those peripherals. | ||
18 | - clock-names : From common clock binding. Shall be "apb_pclk" for first clock. | ||
16 | 19 | ||
17 | Example: | 20 | Example: |
18 | 21 | ||
19 | serial@fff36000 { | 22 | serial@fff36000 { |
20 | compatible = "arm,pl011", "arm,primecell"; | 23 | compatible = "arm,pl011", "arm,primecell"; |
21 | arm,primecell-periphid = <0x00341011>; | 24 | arm,primecell-periphid = <0x00341011>; |
25 | clocks = <&pclk>; | ||
26 | clock-names = "apb_pclk"; | ||
27 | |||
22 | }; | 28 | }; |
23 | 29 | ||
diff --git a/Documentation/devicetree/bindings/arm/tegra/emc.txt b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-emc.txt index 09335f8eee00..4c33b29dc660 100644 --- a/Documentation/devicetree/bindings/arm/tegra/emc.txt +++ b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-emc.txt | |||
@@ -15,7 +15,7 @@ Child device nodes describe the memory settings for different configurations and | |||
15 | 15 | ||
16 | Example: | 16 | Example: |
17 | 17 | ||
18 | emc@7000f400 { | 18 | memory-controller@7000f400 { |
19 | #address-cells = < 1 >; | 19 | #address-cells = < 1 >; |
20 | #size-cells = < 0 >; | 20 | #size-cells = < 0 >; |
21 | compatible = "nvidia,tegra20-emc"; | 21 | compatible = "nvidia,tegra20-emc"; |
diff --git a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-mc.txt b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-mc.txt index c25a0a55151d..866d93421eba 100644 --- a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-mc.txt +++ b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-mc.txt | |||
@@ -8,7 +8,7 @@ Required properties: | |||
8 | - interrupts : Should contain MC General interrupt. | 8 | - interrupts : Should contain MC General interrupt. |
9 | 9 | ||
10 | Example: | 10 | Example: |
11 | mc { | 11 | memory-controller@0x7000f000 { |
12 | compatible = "nvidia,tegra20-mc"; | 12 | compatible = "nvidia,tegra20-mc"; |
13 | reg = <0x7000f000 0x024 | 13 | reg = <0x7000f000 0x024 |
14 | 0x7000f03c 0x3c4>; | 14 | 0x7000f03c 0x3c4>; |
diff --git a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra30-mc.txt b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra30-mc.txt index e47e73f612f4..bdf1a612422b 100644 --- a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra30-mc.txt +++ b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra30-mc.txt | |||
@@ -8,7 +8,7 @@ Required properties: | |||
8 | - interrupts : Should contain MC General interrupt. | 8 | - interrupts : Should contain MC General interrupt. |
9 | 9 | ||
10 | Example: | 10 | Example: |
11 | mc { | 11 | memory-controller { |
12 | compatible = "nvidia,tegra30-mc"; | 12 | compatible = "nvidia,tegra30-mc"; |
13 | reg = <0x7000f000 0x010 | 13 | reg = <0x7000f000 0x010 |
14 | 0x7000f03c 0x1b4 | 14 | 0x7000f03c 0x1b4 |
diff --git a/Documentation/devicetree/bindings/ata/cavium-compact-flash.txt b/Documentation/devicetree/bindings/ata/cavium-compact-flash.txt new file mode 100644 index 000000000000..93986a5a8018 --- /dev/null +++ b/Documentation/devicetree/bindings/ata/cavium-compact-flash.txt | |||
@@ -0,0 +1,30 @@ | |||
1 | * Compact Flash | ||
2 | |||
3 | The Cavium Compact Flash device is connected to the Octeon Boot Bus, | ||
4 | and is thus a child of the Boot Bus device. It can read and write | ||
5 | industry standard compact flash devices. | ||
6 | |||
7 | Properties: | ||
8 | - compatible: "cavium,ebt3000-compact-flash"; | ||
9 | |||
10 | Compatibility with many Cavium evaluation boards. | ||
11 | |||
12 | - reg: The base address of the the CF chip select banks. Depending on | ||
13 | the device configuration, there may be one or two banks. | ||
14 | |||
15 | - cavium,bus-width: The width of the connection to the CF devices. Valid | ||
16 | values are 8 and 16. | ||
17 | |||
18 | - cavium,true-ide: Optional, if present the CF connection is in True IDE mode. | ||
19 | |||
20 | - cavium,dma-engine-handle: Optional, a phandle for the DMA Engine connected | ||
21 | to this device. | ||
22 | |||
23 | Example: | ||
24 | compact-flash@5,0 { | ||
25 | compatible = "cavium,ebt3000-compact-flash"; | ||
26 | reg = <5 0 0x10000>, <6 0 0x10000>; | ||
27 | cavium,bus-width = <16>; | ||
28 | cavium,true-ide; | ||
29 | cavium,dma-engine-handle = <&dma0>; | ||
30 | }; | ||
diff --git a/Documentation/devicetree/bindings/ata/marvell.txt b/Documentation/devicetree/bindings/ata/marvell.txt new file mode 100644 index 000000000000..b5cdd20cde9c --- /dev/null +++ b/Documentation/devicetree/bindings/ata/marvell.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | * Marvell Orion SATA | ||
2 | |||
3 | Required Properties: | ||
4 | - compatibility : "marvell,orion-sata" | ||
5 | - reg : Address range of controller | ||
6 | - interrupts : Interrupt controller is using | ||
7 | - nr-ports : Number of SATA ports in use. | ||
8 | |||
9 | Example: | ||
10 | |||
11 | sata@80000 { | ||
12 | compatible = "marvell,orion-sata"; | ||
13 | reg = <0x80000 0x5000>; | ||
14 | interrupts = <21>; | ||
15 | nr-ports = <2>; | ||
16 | } | ||
diff --git a/Documentation/devicetree/bindings/clock/calxeda.txt b/Documentation/devicetree/bindings/clock/calxeda.txt new file mode 100644 index 000000000000..0a6ac1bdcda1 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/calxeda.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | Device Tree Clock bindings for Calxeda highbank platform | ||
2 | |||
3 | This binding uses the common clock binding[1]. | ||
4 | |||
5 | [1] Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
6 | |||
7 | Required properties: | ||
8 | - compatible : shall be one of the following: | ||
9 | "calxeda,hb-pll-clock" - for a PLL clock | ||
10 | "calxeda,hb-a9periph-clock" - The A9 peripheral clock divided from the | ||
11 | A9 clock. | ||
12 | "calxeda,hb-a9bus-clock" - The A9 bus clock divided from the A9 clock. | ||
13 | "calxeda,hb-emmc-clock" - Divided clock for MMC/SD controller. | ||
14 | - reg : shall be the control register offset from SYSREGs base for the clock. | ||
15 | - clocks : shall be the input parent clock phandle for the clock. This is | ||
16 | either an oscillator or a pll output. | ||
17 | - #clock-cells : from common clock binding; shall be set to 0. | ||
diff --git a/Documentation/devicetree/bindings/clock/clock-bindings.txt b/Documentation/devicetree/bindings/clock/clock-bindings.txt new file mode 100644 index 000000000000..eb65d417f8c4 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/clock-bindings.txt | |||
@@ -0,0 +1,117 @@ | |||
1 | This binding is a work-in-progress, and are based on some experimental | ||
2 | work by benh[1]. | ||
3 | |||
4 | Sources of clock signal can be represented by any node in the device | ||
5 | tree. Those nodes are designated as clock providers. Clock consumer | ||
6 | nodes use a phandle and clock specifier pair to connect clock provider | ||
7 | outputs to clock inputs. Similar to the gpio specifiers, a clock | ||
8 | specifier is an array of one more more cells identifying the clock | ||
9 | output on a device. The length of a clock specifier is defined by the | ||
10 | value of a #clock-cells property in the clock provider node. | ||
11 | |||
12 | [1] http://patchwork.ozlabs.org/patch/31551/ | ||
13 | |||
14 | ==Clock providers== | ||
15 | |||
16 | Required properties: | ||
17 | #clock-cells: Number of cells in a clock specifier; Typically 0 for nodes | ||
18 | with a single clock output and 1 for nodes with multiple | ||
19 | clock outputs. | ||
20 | |||
21 | Optional properties: | ||
22 | clock-output-names: Recommended to be a list of strings of clock output signal | ||
23 | names indexed by the first cell in the clock specifier. | ||
24 | However, the meaning of clock-output-names is domain | ||
25 | specific to the clock provider, and is only provided to | ||
26 | encourage using the same meaning for the majority of clock | ||
27 | providers. This format may not work for clock providers | ||
28 | using a complex clock specifier format. In those cases it | ||
29 | is recommended to omit this property and create a binding | ||
30 | specific names property. | ||
31 | |||
32 | Clock consumer nodes must never directly reference | ||
33 | the provider's clock-output-names property. | ||
34 | |||
35 | For example: | ||
36 | |||
37 | oscillator { | ||
38 | #clock-cells = <1>; | ||
39 | clock-output-names = "ckil", "ckih"; | ||
40 | }; | ||
41 | |||
42 | - this node defines a device with two clock outputs, the first named | ||
43 | "ckil" and the second named "ckih". Consumer nodes always reference | ||
44 | clocks by index. The names should reflect the clock output signal | ||
45 | names for the device. | ||
46 | |||
47 | ==Clock consumers== | ||
48 | |||
49 | Required properties: | ||
50 | clocks: List of phandle and clock specifier pairs, one pair | ||
51 | for each clock input to the device. Note: if the | ||
52 | clock provider specifies '0' for #clock-cells, then | ||
53 | only the phandle portion of the pair will appear. | ||
54 | |||
55 | Optional properties: | ||
56 | clock-names: List of clock input name strings sorted in the same | ||
57 | order as the clocks property. Consumers drivers | ||
58 | will use clock-names to match clock input names | ||
59 | with clocks specifiers. | ||
60 | clock-ranges: Empty property indicating that child nodes can inherit named | ||
61 | clocks from this node. Useful for bus nodes to provide a | ||
62 | clock to their children. | ||
63 | |||
64 | For example: | ||
65 | |||
66 | device { | ||
67 | clocks = <&osc 1>, <&ref 0>; | ||
68 | clock-names = "baud", "register"; | ||
69 | }; | ||
70 | |||
71 | |||
72 | This represents a device with two clock inputs, named "baud" and "register". | ||
73 | The baud clock is connected to output 1 of the &osc device, and the register | ||
74 | clock is connected to output 0 of the &ref. | ||
75 | |||
76 | ==Example== | ||
77 | |||
78 | /* external oscillator */ | ||
79 | osc: oscillator { | ||
80 | compatible = "fixed-clock"; | ||
81 | #clock-cells = <1>; | ||
82 | clock-frequency = <32678>; | ||
83 | clock-output-names = "osc"; | ||
84 | }; | ||
85 | |||
86 | /* phase-locked-loop device, generates a higher frequency clock | ||
87 | * from the external oscillator reference */ | ||
88 | pll: pll@4c000 { | ||
89 | compatible = "vendor,some-pll-interface" | ||
90 | #clock-cells = <1>; | ||
91 | clocks = <&osc 0>; | ||
92 | clock-names = "ref"; | ||
93 | reg = <0x4c000 0x1000>; | ||
94 | clock-output-names = "pll", "pll-switched"; | ||
95 | }; | ||
96 | |||
97 | /* UART, using the low frequency oscillator for the baud clock, | ||
98 | * and the high frequency switched PLL output for register | ||
99 | * clocking */ | ||
100 | uart@a000 { | ||
101 | compatible = "fsl,imx-uart"; | ||
102 | reg = <0xa000 0x1000>; | ||
103 | interrupts = <33>; | ||
104 | clocks = <&osc 0>, <&pll 1>; | ||
105 | clock-names = "baud", "register"; | ||
106 | }; | ||
107 | |||
108 | This DT fragment defines three devices: an external oscillator to provide a | ||
109 | low-frequency reference clock, a PLL device to generate a higher frequency | ||
110 | clock signal, and a UART. | ||
111 | |||
112 | * The oscillator is fixed-frequency, and provides one clock output, named "osc". | ||
113 | * The PLL is both a clock provider and a clock consumer. It uses the clock | ||
114 | signal generated by the external oscillator, and provides two output signals | ||
115 | ("pll" and "pll-switched"). | ||
116 | * The UART has its baud clock connected the external oscillator and its | ||
117 | register clock connected to the PLL clock (the "pll-switched" signal) | ||
diff --git a/Documentation/devicetree/bindings/clock/fixed-clock.txt b/Documentation/devicetree/bindings/clock/fixed-clock.txt new file mode 100644 index 000000000000..0b1fe7824093 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/fixed-clock.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | Binding for simple fixed-rate clock sources. | ||
2 | |||
3 | This binding uses the common clock binding[1]. | ||
4 | |||
5 | [1] Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
6 | |||
7 | Required properties: | ||
8 | - compatible : shall be "fixed-clock". | ||
9 | - #clock-cells : from common clock binding; shall be set to 0. | ||
10 | - clock-frequency : frequency of clock in Hz. Should be a single cell. | ||
11 | |||
12 | Optional properties: | ||
13 | - gpios : From common gpio binding; gpio connection to clock enable pin. | ||
14 | - clock-output-names : From common clock binding. | ||
15 | |||
16 | Example: | ||
17 | clock { | ||
18 | compatible = "fixed-clock"; | ||
19 | #clock-cells = <0>; | ||
20 | clock-frequency = <1000000000>; | ||
21 | }; | ||
diff --git a/Documentation/devicetree/bindings/fb/mxsfb.txt b/Documentation/devicetree/bindings/fb/mxsfb.txt new file mode 100644 index 000000000000..b41e5e52a676 --- /dev/null +++ b/Documentation/devicetree/bindings/fb/mxsfb.txt | |||
@@ -0,0 +1,19 @@ | |||
1 | * Freescale MXS LCD Interface (LCDIF) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "fsl,<chip>-lcdif". Supported chips include | ||
5 | imx23 and imx28. | ||
6 | - reg: Address and length of the register set for lcdif | ||
7 | - interrupts: Should contain lcdif interrupts | ||
8 | |||
9 | Optional properties: | ||
10 | - panel-enable-gpios : Should specify the gpio for panel enable | ||
11 | |||
12 | Examples: | ||
13 | |||
14 | lcdif@80030000 { | ||
15 | compatible = "fsl,imx28-lcdif"; | ||
16 | reg = <0x80030000 2000>; | ||
17 | interrupts = <38 86>; | ||
18 | panel-enable-gpios = <&gpio3 30 0>; | ||
19 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/cavium-octeon-gpio.txt b/Documentation/devicetree/bindings/gpio/cavium-octeon-gpio.txt new file mode 100644 index 000000000000..9d6dcd3fe7f9 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/cavium-octeon-gpio.txt | |||
@@ -0,0 +1,49 @@ | |||
1 | * General Purpose Input Output (GPIO) bus. | ||
2 | |||
3 | Properties: | ||
4 | - compatible: "cavium,octeon-3860-gpio" | ||
5 | |||
6 | Compatibility with all cn3XXX, cn5XXX and cn6XXX SOCs. | ||
7 | |||
8 | - reg: The base address of the GPIO unit's register bank. | ||
9 | |||
10 | - gpio-controller: This is a GPIO controller. | ||
11 | |||
12 | - #gpio-cells: Must be <2>. The first cell is the GPIO pin. | ||
13 | |||
14 | - interrupt-controller: The GPIO controller is also an interrupt | ||
15 | controller, many of its pins may be configured as an interrupt | ||
16 | source. | ||
17 | |||
18 | - #interrupt-cells: Must be <2>. The first cell is the GPIO pin | ||
19 | connected to the interrupt source. The second cell is the interrupt | ||
20 | triggering protocol and may have one of four values: | ||
21 | 1 - edge triggered on the rising edge. | ||
22 | 2 - edge triggered on the falling edge | ||
23 | 4 - level triggered active high. | ||
24 | 8 - level triggered active low. | ||
25 | |||
26 | - interrupts: Interrupt routing for each pin. | ||
27 | |||
28 | Example: | ||
29 | |||
30 | gpio-controller@1070000000800 { | ||
31 | #gpio-cells = <2>; | ||
32 | compatible = "cavium,octeon-3860-gpio"; | ||
33 | reg = <0x10700 0x00000800 0x0 0x100>; | ||
34 | gpio-controller; | ||
35 | /* Interrupts are specified by two parts: | ||
36 | * 1) GPIO pin number (0..15) | ||
37 | * 2) Triggering (1 - edge rising | ||
38 | * 2 - edge falling | ||
39 | * 4 - level active high | ||
40 | * 8 - level active low) | ||
41 | */ | ||
42 | interrupt-controller; | ||
43 | #interrupt-cells = <2>; | ||
44 | /* The GPIO pin connect to 16 consecutive CUI bits */ | ||
45 | interrupts = <0 16>, <0 17>, <0 18>, <0 19>, | ||
46 | <0 20>, <0 21>, <0 22>, <0 23>, | ||
47 | <0 24>, <0 25>, <0 26>, <0 27>, | ||
48 | <0 28>, <0 29>, <0 30>, <0 31>; | ||
49 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt index 4363ae4b3c14..dbd22e0df21e 100644 --- a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt +++ b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt | |||
@@ -8,15 +8,25 @@ Required properties: | |||
8 | by low 16 pins and the second one is for high 16 pins. | 8 | by low 16 pins and the second one is for high 16 pins. |
9 | - gpio-controller : Marks the device node as a gpio controller. | 9 | - gpio-controller : Marks the device node as a gpio controller. |
10 | - #gpio-cells : Should be two. The first cell is the pin number and | 10 | - #gpio-cells : Should be two. The first cell is the pin number and |
11 | the second cell is used to specify optional parameters (currently | 11 | the second cell is used to specify the gpio polarity: |
12 | unused). | 12 | 0 = active high |
13 | 1 = active low | ||
14 | - interrupt-controller: Marks the device node as an interrupt controller. | ||
15 | - #interrupt-cells : Should be 2. The first cell is the GPIO number. | ||
16 | The second cell bits[3:0] is used to specify trigger type and level flags: | ||
17 | 1 = low-to-high edge triggered. | ||
18 | 2 = high-to-low edge triggered. | ||
19 | 4 = active high level-sensitive. | ||
20 | 8 = active low level-sensitive. | ||
13 | 21 | ||
14 | Example: | 22 | Example: |
15 | 23 | ||
16 | gpio0: gpio@73f84000 { | 24 | gpio0: gpio@73f84000 { |
17 | compatible = "fsl,imx51-gpio", "fsl,imx31-gpio"; | 25 | compatible = "fsl,imx51-gpio", "fsl,imx35-gpio"; |
18 | reg = <0x73f84000 0x4000>; | 26 | reg = <0x73f84000 0x4000>; |
19 | interrupts = <50 51>; | 27 | interrupts = <50 51>; |
20 | gpio-controller; | 28 | gpio-controller; |
21 | #gpio-cells = <2>; | 29 | #gpio-cells = <2>; |
30 | interrupt-controller; | ||
31 | #interrupt-cells = <2>; | ||
22 | }; | 32 | }; |
diff --git a/Documentation/devicetree/bindings/gpio/gpio-mxs.txt b/Documentation/devicetree/bindings/gpio/gpio-mxs.txt index 0c35673f7a3e..1e677a47b836 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-mxs.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-mxs.txt | |||
@@ -13,8 +13,9 @@ Required properties for GPIO node: | |||
13 | - interrupts : Should be the port interrupt shared by all 32 pins. | 13 | - interrupts : Should be the port interrupt shared by all 32 pins. |
14 | - gpio-controller : Marks the device node as a gpio controller. | 14 | - gpio-controller : Marks the device node as a gpio controller. |
15 | - #gpio-cells : Should be two. The first cell is the pin number and | 15 | - #gpio-cells : Should be two. The first cell is the pin number and |
16 | the second cell is used to specify optional parameters (currently | 16 | the second cell is used to specify the gpio polarity: |
17 | unused). | 17 | 0 = active high |
18 | 1 = active low | ||
18 | - interrupt-controller: Marks the device node as an interrupt controller. | 19 | - interrupt-controller: Marks the device node as an interrupt controller. |
19 | - #interrupt-cells : Should be 2. The first cell is the GPIO number. | 20 | - #interrupt-cells : Should be 2. The first cell is the GPIO number. |
20 | The second cell bits[3:0] is used to specify trigger type and level flags: | 21 | The second cell bits[3:0] is used to specify trigger type and level flags: |
diff --git a/Documentation/devicetree/bindings/gpio/gpio-nmk.txt b/Documentation/devicetree/bindings/gpio/gpio-nmk.txt index ee87467ad8d6..8315ac7780ef 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-nmk.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-nmk.txt | |||
@@ -26,6 +26,6 @@ Example: | |||
26 | #gpio-cells = <2>; | 26 | #gpio-cells = <2>; |
27 | gpio-controller; | 27 | gpio-controller; |
28 | interrupt-controller; | 28 | interrupt-controller; |
29 | supports-sleepmode; | 29 | st,supports-sleepmode; |
30 | gpio-bank = <1>; | 30 | gpio-bank = <1>; |
31 | }; | 31 | }; |
diff --git a/Documentation/devicetree/bindings/gpio/gpio-samsung.txt b/Documentation/devicetree/bindings/gpio/gpio-samsung.txt index 8f50fe5e6c42..5375625e8cd2 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-samsung.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-samsung.txt | |||
@@ -11,14 +11,15 @@ Required properties: | |||
11 | <[phandle of the gpio controller node] | 11 | <[phandle of the gpio controller node] |
12 | [pin number within the gpio controller] | 12 | [pin number within the gpio controller] |
13 | [mux function] | 13 | [mux function] |
14 | [pull up/down] | 14 | [flags and pull up/down] |
15 | [drive strength]> | 15 | [drive strength]> |
16 | 16 | ||
17 | Values for gpio specifier: | 17 | Values for gpio specifier: |
18 | - Pin number: is a value between 0 to 7. | 18 | - Pin number: is a value between 0 to 7. |
19 | - Pull Up/Down: 0 - Pull Up/Down Disabled. | 19 | - Flags and Pull Up/Down: 0 - Pull Up/Down Disabled. |
20 | 1 - Pull Down Enabled. | 20 | 1 - Pull Down Enabled. |
21 | 3 - Pull Up Enabled. | 21 | 3 - Pull Up Enabled. |
22 | Bit 16 (0x00010000) - Input is active low. | ||
22 | - Drive Strength: 0 - 1x, | 23 | - Drive Strength: 0 - 1x, |
23 | 1 - 3x, | 24 | 1 - 3x, |
24 | 2 - 2x, | 25 | 2 - 2x, |
diff --git a/Documentation/devicetree/bindings/gpio/led.txt b/Documentation/devicetree/bindings/gpio/led.txt index fd2bd56e7195..9bb308abd221 100644 --- a/Documentation/devicetree/bindings/gpio/led.txt +++ b/Documentation/devicetree/bindings/gpio/led.txt | |||
@@ -55,4 +55,4 @@ run-control { | |||
55 | gpios = <&mpc8572 7 0>; | 55 | gpios = <&mpc8572 7 0>; |
56 | default-state = "on"; | 56 | default-state = "on"; |
57 | }; | 57 | }; |
58 | } | 58 | }; |
diff --git a/Documentation/devicetree/bindings/gpio/mrvl-gpio.txt b/Documentation/devicetree/bindings/gpio/mrvl-gpio.txt index 05428f39d9ac..e13787498bcf 100644 --- a/Documentation/devicetree/bindings/gpio/mrvl-gpio.txt +++ b/Documentation/devicetree/bindings/gpio/mrvl-gpio.txt | |||
@@ -27,3 +27,26 @@ Example: | |||
27 | interrupt-controller; | 27 | interrupt-controller; |
28 | #interrupt-cells = <1>; | 28 | #interrupt-cells = <1>; |
29 | }; | 29 | }; |
30 | |||
31 | * Marvell Orion GPIO Controller | ||
32 | |||
33 | Required properties: | ||
34 | - compatible : Should be "marvell,orion-gpio" | ||
35 | - reg : Address and length of the register set for controller. | ||
36 | - gpio-controller : So we know this is a gpio controller. | ||
37 | - ngpio : How many gpios this controller has. | ||
38 | - interrupts : Up to 4 Interrupts for the controller. | ||
39 | |||
40 | Optional properties: | ||
41 | - mask-offset : For SMP Orions, offset for Nth CPU | ||
42 | |||
43 | Example: | ||
44 | |||
45 | gpio0: gpio@10100 { | ||
46 | compatible = "marvell,orion-gpio"; | ||
47 | #gpio-cells = <2>; | ||
48 | gpio-controller; | ||
49 | reg = <0x10100 0x40>; | ||
50 | ngpio = <32>; | ||
51 | interrupts = <35>, <36>, <37>, <38>; | ||
52 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt b/Documentation/devicetree/bindings/gpio/nvidia,tegra20-gpio.txt index 023c9526e5f8..023c9526e5f8 100644 --- a/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt +++ b/Documentation/devicetree/bindings/gpio/nvidia,tegra20-gpio.txt | |||
diff --git a/Documentation/devicetree/bindings/i2c/cavium-i2c.txt b/Documentation/devicetree/bindings/i2c/cavium-i2c.txt new file mode 100644 index 000000000000..dced82ebe31d --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/cavium-i2c.txt | |||
@@ -0,0 +1,34 @@ | |||
1 | * Two Wire Serial Interface (TWSI) / I2C | ||
2 | |||
3 | - compatible: "cavium,octeon-3860-twsi" | ||
4 | |||
5 | Compatibility with all cn3XXX, cn5XXX and cn6XXX SOCs. | ||
6 | |||
7 | - reg: The base address of the TWSI/I2C bus controller register bank. | ||
8 | |||
9 | - #address-cells: Must be <1>. | ||
10 | |||
11 | - #size-cells: Must be <0>. I2C addresses have no size component. | ||
12 | |||
13 | - interrupts: A single interrupt specifier. | ||
14 | |||
15 | - clock-frequency: The I2C bus clock rate in Hz. | ||
16 | |||
17 | Example: | ||
18 | twsi0: i2c@1180000001000 { | ||
19 | #address-cells = <1>; | ||
20 | #size-cells = <0>; | ||
21 | compatible = "cavium,octeon-3860-twsi"; | ||
22 | reg = <0x11800 0x00001000 0x0 0x200>; | ||
23 | interrupts = <0 45>; | ||
24 | clock-frequency = <100000>; | ||
25 | |||
26 | rtc@68 { | ||
27 | compatible = "dallas,ds1337"; | ||
28 | reg = <0x68>; | ||
29 | }; | ||
30 | tmp@4c { | ||
31 | compatible = "ti,tmp421"; | ||
32 | reg = <0x4c>; | ||
33 | }; | ||
34 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio_i2c.txt b/Documentation/devicetree/bindings/i2c/gpio-i2c.txt index 4f8ec947c6bd..4f8ec947c6bd 100644 --- a/Documentation/devicetree/bindings/gpio/gpio_i2c.txt +++ b/Documentation/devicetree/bindings/i2c/gpio-i2c.txt | |||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-mxs.txt b/Documentation/devicetree/bindings/i2c/i2c-mxs.txt index 1bfc02de1b0c..30ac3a0557f7 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-mxs.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-mxs.txt | |||
@@ -4,6 +4,8 @@ Required properties: | |||
4 | - compatible: Should be "fsl,<chip>-i2c" | 4 | - compatible: Should be "fsl,<chip>-i2c" |
5 | - reg: Should contain registers location and length | 5 | - reg: Should contain registers location and length |
6 | - interrupts: Should contain ERROR and DMA interrupts | 6 | - interrupts: Should contain ERROR and DMA interrupts |
7 | - clock-frequency: Desired I2C bus clock frequency in Hz. | ||
8 | Only 100000Hz and 400000Hz modes are supported. | ||
7 | 9 | ||
8 | Examples: | 10 | Examples: |
9 | 11 | ||
@@ -13,4 +15,5 @@ i2c0: i2c@80058000 { | |||
13 | compatible = "fsl,imx28-i2c"; | 15 | compatible = "fsl,imx28-i2c"; |
14 | reg = <0x80058000 2000>; | 16 | reg = <0x80058000 2000>; |
15 | interrupts = <111 68>; | 17 | interrupts = <111 68>; |
18 | clock-frequency = <100000>; | ||
16 | }; | 19 | }; |
diff --git a/Documentation/devicetree/bindings/i2c/i2c-ocores.txt b/Documentation/devicetree/bindings/i2c/i2c-ocores.txt new file mode 100644 index 000000000000..c15781f4dc8c --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-ocores.txt | |||
@@ -0,0 +1,33 @@ | |||
1 | Device tree configuration for i2c-ocores | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "opencores,i2c-ocores" | ||
5 | - reg : bus address start and address range size of device | ||
6 | - interrupts : interrupt number | ||
7 | - clock-frequency : frequency of bus clock in Hz | ||
8 | - #address-cells : should be <1> | ||
9 | - #size-cells : should be <0> | ||
10 | |||
11 | Optional properties: | ||
12 | - reg-shift : device register offsets are shifted by this value | ||
13 | - reg-io-width : io register width in bytes (1, 2 or 4) | ||
14 | - regstep : deprecated, use reg-shift above | ||
15 | |||
16 | Example: | ||
17 | |||
18 | i2c0: ocores@a0000000 { | ||
19 | #address-cells = <1>; | ||
20 | #size-cells = <0>; | ||
21 | compatible = "opencores,i2c-ocores"; | ||
22 | reg = <0xa0000000 0x8>; | ||
23 | interrupts = <10>; | ||
24 | clock-frequency = <20000000>; | ||
25 | |||
26 | reg-shift = <0>; /* 8 bit registers */ | ||
27 | reg-io-width = <1>; /* 8 bit read/write */ | ||
28 | |||
29 | dummy@60 { | ||
30 | compatible = "dummy"; | ||
31 | reg = <0x60>; | ||
32 | }; | ||
33 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt b/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt index b891ee218354..0f7945019f6f 100644 --- a/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt +++ b/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt | |||
@@ -1,4 +1,4 @@ | |||
1 | * I2C | 1 | * Marvell MMP I2C controller |
2 | 2 | ||
3 | Required properties : | 3 | Required properties : |
4 | 4 | ||
@@ -32,3 +32,20 @@ Examples: | |||
32 | interrupts = <58>; | 32 | interrupts = <58>; |
33 | }; | 33 | }; |
34 | 34 | ||
35 | * Marvell MV64XXX I2C controller | ||
36 | |||
37 | Required properties : | ||
38 | |||
39 | - reg : Offset and length of the register set for the device | ||
40 | - compatible : Should be "marvell,mv64xxx-i2c" | ||
41 | - interrupts : The interrupt number | ||
42 | - clock-frequency : Desired I2C bus clock frequency in Hz. | ||
43 | |||
44 | Examples: | ||
45 | |||
46 | i2c@11000 { | ||
47 | compatible = "marvell,mv64xxx-i2c"; | ||
48 | reg = <0x11000 0x20>; | ||
49 | interrupts = <29>; | ||
50 | clock-frequency = <100000>; | ||
51 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/lpc32xx-key.txt b/Documentation/devicetree/bindings/input/lpc32xx-key.txt new file mode 100644 index 000000000000..31afd5014c48 --- /dev/null +++ b/Documentation/devicetree/bindings/input/lpc32xx-key.txt | |||
@@ -0,0 +1,28 @@ | |||
1 | NXP LPC32xx Key Scan Interface | ||
2 | |||
3 | Required Properties: | ||
4 | - compatible: Should be "nxp,lpc3220-key" | ||
5 | - reg: Physical base address of the controller and length of memory mapped | ||
6 | region. | ||
7 | - interrupts: The interrupt number to the cpu. | ||
8 | - keypad,num-rows: Number of rows and columns, e.g. 1: 1x1, 6: 6x6 | ||
9 | - keypad,num-columns: Must be equal to keypad,num-rows since LPC32xx only | ||
10 | supports square matrices | ||
11 | - nxp,debounce-delay-ms: Debounce delay in ms | ||
12 | - nxp,scan-delay-ms: Repeated scan period in ms | ||
13 | - linux,keymap: the key-code to be reported when the key is pressed | ||
14 | and released, see also | ||
15 | Documentation/devicetree/bindings/input/matrix-keymap.txt | ||
16 | |||
17 | Example: | ||
18 | |||
19 | key@40050000 { | ||
20 | compatible = "nxp,lpc3220-key"; | ||
21 | reg = <0x40050000 0x1000>; | ||
22 | interrupts = <54 0>; | ||
23 | keypad,num-rows = <1>; | ||
24 | keypad,num-columns = <1>; | ||
25 | nxp,debounce-delay-ms = <3>; | ||
26 | nxp,scan-delay-ms = <34>; | ||
27 | linux,keymap = <0x00000002>; | ||
28 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/tegra-kbc.txt b/Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt index 72683be6de35..72683be6de35 100644 --- a/Documentation/devicetree/bindings/input/tegra-kbc.txt +++ b/Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt | |||
diff --git a/Documentation/devicetree/bindings/input/omap-keypad.txt b/Documentation/devicetree/bindings/input/omap-keypad.txt new file mode 100644 index 000000000000..f2fa5e10493d --- /dev/null +++ b/Documentation/devicetree/bindings/input/omap-keypad.txt | |||
@@ -0,0 +1,31 @@ | |||
1 | * TI's Keypad Controller device tree bindings | ||
2 | |||
3 | TI's Keypad controller is used to interface a SoC with a matrix-type | ||
4 | keypad device. The keypad controller supports multiple row and column lines. | ||
5 | A key can be placed at each intersection of a unique row and a unique column. | ||
6 | The keypad controller can sense a key-press and key-release and report the | ||
7 | event using a interrupt to the cpu. | ||
8 | |||
9 | Required SoC Specific Properties: | ||
10 | - compatible: should be one of the following | ||
11 | - "ti,omap4-keypad": For controllers compatible with omap4 keypad | ||
12 | controller. | ||
13 | |||
14 | Required Board Specific Properties, in addition to those specified by | ||
15 | the shared matrix-keyboard bindings: | ||
16 | - keypad,num-rows: Number of row lines connected to the keypad | ||
17 | controller. | ||
18 | |||
19 | - keypad,num-columns: Number of column lines connected to the | ||
20 | keypad controller. | ||
21 | |||
22 | Optional Properties specific to linux: | ||
23 | - linux,keypad-no-autorepeat: do no enable autorepeat feature. | ||
24 | |||
25 | Example: | ||
26 | keypad@4ae1c000{ | ||
27 | compatible = "ti,omap4-keypad"; | ||
28 | keypad,num-rows = <2>; | ||
29 | keypad,num-columns = <8>; | ||
30 | linux,keypad-no-autorepeat; | ||
31 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/twl6040-vibra.txt b/Documentation/devicetree/bindings/input/twl6040-vibra.txt deleted file mode 100644 index 5b1918b818fb..000000000000 --- a/Documentation/devicetree/bindings/input/twl6040-vibra.txt +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | Vibra driver for the twl6040 family | ||
2 | |||
3 | The vibra driver is a child of the twl6040 MFD dirver. | ||
4 | Documentation/devicetree/bindings/mfd/twl6040.txt | ||
5 | |||
6 | Required properties: | ||
7 | - compatible : Must be "ti,twl6040-vibra"; | ||
8 | - interrupts: 4, Vibra overcurrent interrupt | ||
9 | - vddvibl-supply: Regulator supplying the left vibra motor | ||
10 | - vddvibr-supply: Regulator supplying the right vibra motor | ||
11 | - vibldrv_res: Board specific left driver resistance | ||
12 | - vibrdrv_res: Board specific right driver resistance | ||
13 | - viblmotor_res: Board specific left motor resistance | ||
14 | - vibrmotor_res: Board specific right motor resistance | ||
15 | |||
16 | Optional properties: | ||
17 | - vddvibl_uV: If the vddvibl default voltage need to be changed | ||
18 | - vddvibr_uV: If the vddvibr default voltage need to be changed | ||
19 | |||
20 | Example: | ||
21 | /* | ||
22 | * 8-channel high quality low-power audio codec | ||
23 | * http://www.ti.com/lit/ds/symlink/twl6040.pdf | ||
24 | */ | ||
25 | twl6040: twl6040@4b { | ||
26 | ... | ||
27 | twl6040_vibra: twl6040@1 { | ||
28 | compatible = "ti,twl6040-vibra"; | ||
29 | interrupts = <4>; | ||
30 | vddvibl-supply = <&vbat>; | ||
31 | vddvibr-supply = <&vbat>; | ||
32 | vibldrv_res = <8>; | ||
33 | vibrdrv_res = <3>; | ||
34 | viblmotor_res = <10>; | ||
35 | vibrmotor_res = <10>; | ||
36 | }; | ||
37 | }; | ||
diff --git a/Documentation/devicetree/bindings/iommu/nvidia,tegra30-smmu.txt b/Documentation/devicetree/bindings/iommu/nvidia,tegra30-smmu.txt new file mode 100644 index 000000000000..89fb5434b730 --- /dev/null +++ b/Documentation/devicetree/bindings/iommu/nvidia,tegra30-smmu.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | NVIDIA Tegra 30 IOMMU H/W, SMMU (System Memory Management Unit) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "nvidia,tegra30-smmu" | ||
5 | - reg : Should contain 3 register banks(address and length) for each | ||
6 | of the SMMU register blocks. | ||
7 | - interrupts : Should contain MC General interrupt. | ||
8 | - nvidia,#asids : # of ASIDs | ||
9 | - dma-window : IOVA start address and length. | ||
10 | - nvidia,ahb : phandle to the ahb bus connected to SMMU. | ||
11 | |||
12 | Example: | ||
13 | smmu { | ||
14 | compatible = "nvidia,tegra30-smmu"; | ||
15 | reg = <0x7000f010 0x02c | ||
16 | 0x7000f1f0 0x010 | ||
17 | 0x7000f228 0x05c>; | ||
18 | nvidia,#asids = <4>; /* # of ASIDs */ | ||
19 | dma-window = <0 0x40000000>; /* IOVA start & length */ | ||
20 | nvidia,ahb = <&ahb>; | ||
21 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/ab8500.txt b/Documentation/devicetree/bindings/mfd/ab8500.txt new file mode 100644 index 000000000000..69e757a657a0 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/ab8500.txt | |||
@@ -0,0 +1,123 @@ | |||
1 | * AB8500 Multi-Functional Device (MFD) | ||
2 | |||
3 | Required parent device properties: | ||
4 | - compatible : contains "stericsson,ab8500"; | ||
5 | - interrupts : contains the IRQ line for the AB8500 | ||
6 | - interrupt-controller : describes the AB8500 as an Interrupt Controller (has its own domain) | ||
7 | - #interrupt-cells : should be 2, for 2-cell format | ||
8 | - The first cell is the AB8500 local IRQ number | ||
9 | - The second cell is used to specify optional parameters | ||
10 | - bits[3:0] trigger type and level flags: | ||
11 | 1 = low-to-high edge triggered | ||
12 | 2 = high-to-low edge triggered | ||
13 | 4 = active high level-sensitive | ||
14 | 8 = active low level-sensitive | ||
15 | |||
16 | Optional parent device properties: | ||
17 | - reg : contains the PRCMU mailbox address for the AB8500 i2c port | ||
18 | |||
19 | The AB8500 consists of a large and varied group of sub-devices: | ||
20 | |||
21 | Device IRQ Names Supply Names Description | ||
22 | ------ --------- ------------ ----------- | ||
23 | ab8500-bm : : : Battery Manager | ||
24 | ab8500-btemp : : : Battery Temperature | ||
25 | ab8500-charger : : : Battery Charger | ||
26 | ab8500-fg : : : Fuel Gauge | ||
27 | ab8500-gpadc : HW_CONV_END : vddadc : Analogue to Digital Converter | ||
28 | SW_CONV_END : : | ||
29 | ab8500-gpio : : : GPIO Controller | ||
30 | ab8500-ponkey : ONKEY_DBF : : Power-on Key | ||
31 | ONKEY_DBR : : | ||
32 | ab8500-pwm : : : Pulse Width Modulator | ||
33 | ab8500-regulator : : : Regulators | ||
34 | ab8500-rtc : 60S : : Real Time Clock | ||
35 | : ALARM : : | ||
36 | ab8500-sysctrl : : : System Control | ||
37 | ab8500-usb : ID_WAKEUP_R : vddulpivio18 : Universal Serial Bus | ||
38 | : ID_WAKEUP_F : v-ape : | ||
39 | : VBUS_DET_F : musb_1v8 : | ||
40 | : VBUS_DET_R : : | ||
41 | : USB_LINK_STATUS : : | ||
42 | : USB_ADP_PROBE_PLUG : : | ||
43 | : USB_ADP_PROBE_UNPLUG : : | ||
44 | |||
45 | Required child device properties: | ||
46 | - compatible : "stericsson,ab8500-[bm|btemp|charger|fg|gpadc|gpio|ponkey| | ||
47 | pwm|regulator|rtc|sysctrl|usb]"; | ||
48 | |||
49 | Optional child device properties: | ||
50 | - interrupts : contains the device IRQ(s) using the 2-cell format (see above) | ||
51 | - interrupt-names : contains names of IRQ resource in the order in which they were | ||
52 | supplied in the interrupts property | ||
53 | - <supply_name>-supply : contains a phandle to the regulator supply node in Device Tree | ||
54 | |||
55 | ab8500@5 { | ||
56 | compatible = "stericsson,ab8500"; | ||
57 | reg = <5>; /* mailbox 5 is i2c */ | ||
58 | interrupts = <0 40 0x4>; | ||
59 | interrupt-controller; | ||
60 | #interrupt-cells = <2>; | ||
61 | |||
62 | ab8500-rtc { | ||
63 | compatible = "stericsson,ab8500-rtc"; | ||
64 | interrupts = <17 0x4 | ||
65 | 18 0x4>; | ||
66 | interrupt-names = "60S", "ALARM"; | ||
67 | }; | ||
68 | |||
69 | ab8500-gpadc { | ||
70 | compatible = "stericsson,ab8500-gpadc"; | ||
71 | interrupts = <32 0x4 | ||
72 | 39 0x4>; | ||
73 | interrupt-names = "HW_CONV_END", "SW_CONV_END"; | ||
74 | vddadc-supply = <&ab8500_ldo_tvout_reg>; | ||
75 | }; | ||
76 | |||
77 | ab8500-usb { | ||
78 | compatible = "stericsson,ab8500-usb"; | ||
79 | interrupts = < 90 0x4 | ||
80 | 96 0x4 | ||
81 | 14 0x4 | ||
82 | 15 0x4 | ||
83 | 79 0x4 | ||
84 | 74 0x4 | ||
85 | 75 0x4>; | ||
86 | interrupt-names = "ID_WAKEUP_R", | ||
87 | "ID_WAKEUP_F", | ||
88 | "VBUS_DET_F", | ||
89 | "VBUS_DET_R", | ||
90 | "USB_LINK_STATUS", | ||
91 | "USB_ADP_PROBE_PLUG", | ||
92 | "USB_ADP_PROBE_UNPLUG"; | ||
93 | vddulpivio18-supply = <&ab8500_ldo_initcore_reg>; | ||
94 | v-ape-supply = <&db8500_vape_reg>; | ||
95 | musb_1v8-supply = <&db8500_vsmps2_reg>; | ||
96 | }; | ||
97 | |||
98 | ab8500-ponkey { | ||
99 | compatible = "stericsson,ab8500-ponkey"; | ||
100 | interrupts = <6 0x4 | ||
101 | 7 0x4>; | ||
102 | interrupt-names = "ONKEY_DBF", "ONKEY_DBR"; | ||
103 | }; | ||
104 | |||
105 | ab8500-sysctrl { | ||
106 | compatible = "stericsson,ab8500-sysctrl"; | ||
107 | }; | ||
108 | |||
109 | ab8500-pwm { | ||
110 | compatible = "stericsson,ab8500-pwm"; | ||
111 | }; | ||
112 | |||
113 | ab8500-regulators { | ||
114 | compatible = "stericsson,ab8500-regulator"; | ||
115 | |||
116 | ab8500_ldo_aux1_reg: ab8500_ldo_aux1 { | ||
117 | /* | ||
118 | * See: Documentation/devicetree/bindings/regulator/regulator.txt | ||
119 | * for more information on regulators | ||
120 | */ | ||
121 | }; | ||
122 | }; | ||
123 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/max77686.txt b/Documentation/devicetree/bindings/mfd/max77686.txt new file mode 100644 index 000000000000..c6a3469d3436 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/max77686.txt | |||
@@ -0,0 +1,59 @@ | |||
1 | Maxim MAX77686 multi-function device | ||
2 | |||
3 | MAX77686 is a Mulitifunction device with PMIC, RTC and Charger on chip. It is | ||
4 | interfaced to host controller using i2c interface. PMIC and Charger submodules | ||
5 | are addressed using same i2c slave address whereas RTC submodule uses | ||
6 | different i2c slave address,presently for which we are statically creating i2c | ||
7 | client while probing.This document describes the binding for mfd device and | ||
8 | PMIC submodule. | ||
9 | |||
10 | Required properties: | ||
11 | - compatible : Must be "maxim,max77686"; | ||
12 | - reg : Specifies the i2c slave address of PMIC block. | ||
13 | - interrupts : This i2c device has an IRQ line connected to the main SoC. | ||
14 | - interrupt-parent : The parent interrupt controller. | ||
15 | |||
16 | Optional node: | ||
17 | - voltage-regulators : The regulators of max77686 have to be instantiated | ||
18 | under subnode named "voltage-regulators" using the following format. | ||
19 | |||
20 | regulator_name { | ||
21 | regulator-compatible = LDOn/BUCKn | ||
22 | standard regulator constraints.... | ||
23 | }; | ||
24 | refer Documentation/devicetree/bindings/regulator/regulator.txt | ||
25 | |||
26 | The regulator-compatible property of regulator should initialized with string | ||
27 | to get matched with their hardware counterparts as follow: | ||
28 | |||
29 | -LDOn : for LDOs, where n can lie in range 1 to 26. | ||
30 | example: LDO1, LDO2, LDO26. | ||
31 | -BUCKn : for BUCKs, where n can lie in range 1 to 9. | ||
32 | example: BUCK1, BUCK5, BUCK9. | ||
33 | |||
34 | Example: | ||
35 | |||
36 | max77686@09 { | ||
37 | compatible = "maxim,max77686"; | ||
38 | interrupt-parent = <&wakeup_eint>; | ||
39 | interrupts = <26 0>; | ||
40 | reg = <0x09>; | ||
41 | |||
42 | voltage-regulators { | ||
43 | ldo11_reg { | ||
44 | regulator-compatible = "LDO11"; | ||
45 | regulator-name = "vdd_ldo11"; | ||
46 | regulator-min-microvolt = <1900000>; | ||
47 | regulator-max-microvolt = <1900000>; | ||
48 | regulator-always-on; | ||
49 | }; | ||
50 | |||
51 | buck1_reg { | ||
52 | regulator-compatible = "BUCK1"; | ||
53 | regulator-name = "vdd_mif"; | ||
54 | regulator-min-microvolt = <950000>; | ||
55 | regulator-max-microvolt = <1300000>; | ||
56 | regulator-always-on; | ||
57 | regulator-boot-on; | ||
58 | }; | ||
59 | } | ||
diff --git a/Documentation/devicetree/bindings/mfd/tps65910.txt b/Documentation/devicetree/bindings/mfd/tps65910.txt index 645f5eaadb3f..db03599ae4dc 100644 --- a/Documentation/devicetree/bindings/mfd/tps65910.txt +++ b/Documentation/devicetree/bindings/mfd/tps65910.txt | |||
@@ -17,18 +17,46 @@ Required properties: | |||
17 | device need to be present. The definition for each of these nodes is defined | 17 | device need to be present. The definition for each of these nodes is defined |
18 | using the standard binding for regulators found at | 18 | using the standard binding for regulators found at |
19 | Documentation/devicetree/bindings/regulator/regulator.txt. | 19 | Documentation/devicetree/bindings/regulator/regulator.txt. |
20 | The regulator is matched with the regulator-compatible. | ||
20 | 21 | ||
21 | The valid names for regulators are: | 22 | The valid regulator-compatible values are: |
22 | tps65910: vrtc, vio, vdd1, vdd2, vdd3, vdig1, vdig2, vpll, vdac, vaux1, | 23 | tps65910: vrtc, vio, vdd1, vdd2, vdd3, vdig1, vdig2, vpll, vdac, vaux1, |
23 | vaux2, vaux33, vmmc | 24 | vaux2, vaux33, vmmc |
24 | tps65911: vrtc, vio, vdd1, vdd3, vddctrl, ldo1, ldo2, ldo3, ldo4, ldo5, | 25 | tps65911: vrtc, vio, vdd1, vdd3, vddctrl, ldo1, ldo2, ldo3, ldo4, ldo5, |
25 | ldo6, ldo7, ldo8 | 26 | ldo6, ldo7, ldo8 |
26 | 27 | ||
28 | - xxx-supply: Input voltage supply regulator. | ||
29 | These entries are require if regulators are enabled for a device. Missing of these | ||
30 | properties can cause the regulator registration fails. | ||
31 | If some of input supply is powered through battery or always-on supply then | ||
32 | also it is require to have these parameters with proper node handle of always | ||
33 | on power supply. | ||
34 | tps65910: | ||
35 | vcc1-supply: VDD1 input. | ||
36 | vcc2-supply: VDD2 input. | ||
37 | vcc3-supply: VAUX33 and VMMC input. | ||
38 | vcc4-supply: VAUX1 and VAUX2 input. | ||
39 | vcc5-supply: VPLL and VDAC input. | ||
40 | vcc6-supply: VDIG1 and VDIG2 input. | ||
41 | vcc7-supply: VRTC input. | ||
42 | vccio-supply: VIO input. | ||
43 | tps65911: | ||
44 | vcc1-supply: VDD1 input. | ||
45 | vcc2-supply: VDD2 input. | ||
46 | vcc3-supply: LDO6, LDO7 and LDO8 input. | ||
47 | vcc4-supply: LDO5 input. | ||
48 | vcc5-supply: LDO3 and LDO4 input. | ||
49 | vcc6-supply: LDO1 and LDO2 input. | ||
50 | vcc7-supply: VRTC input. | ||
51 | vccio-supply: VIO input. | ||
52 | |||
27 | Optional properties: | 53 | Optional properties: |
28 | - ti,vmbch-threshold: (tps65911) main battery charged threshold | 54 | - ti,vmbch-threshold: (tps65911) main battery charged threshold |
29 | comparator. (see VMBCH_VSEL in TPS65910 datasheet) | 55 | comparator. (see VMBCH_VSEL in TPS65910 datasheet) |
30 | - ti,vmbch2-threshold: (tps65911) main battery discharged threshold | 56 | - ti,vmbch2-threshold: (tps65911) main battery discharged threshold |
31 | comparator. (see VMBCH_VSEL in TPS65910 datasheet) | 57 | comparator. (see VMBCH_VSEL in TPS65910 datasheet) |
58 | - ti,en-ck32k-xtal: enable external 32-kHz crystal oscillator (see CK32K_CTRL | ||
59 | in TPS6591X datasheet) | ||
32 | - ti,en-gpio-sleep: enable sleep control for gpios | 60 | - ti,en-gpio-sleep: enable sleep control for gpios |
33 | There should be 9 entries here, one for each gpio. | 61 | There should be 9 entries here, one for each gpio. |
34 | 62 | ||
@@ -53,77 +81,113 @@ Example: | |||
53 | 81 | ||
54 | ti,vmbch-threshold = 0; | 82 | ti,vmbch-threshold = 0; |
55 | ti,vmbch2-threshold = 0; | 83 | ti,vmbch2-threshold = 0; |
56 | 84 | ti,en-ck32k-xtal; | |
57 | ti,en-gpio-sleep = <0 0 1 0 0 0 0 0 0>; | 85 | ti,en-gpio-sleep = <0 0 1 0 0 0 0 0 0>; |
58 | 86 | ||
87 | vcc1-supply = <®_parent>; | ||
88 | vcc2-supply = <&some_reg>; | ||
89 | vcc3-supply = <...>; | ||
90 | vcc4-supply = <...>; | ||
91 | vcc5-supply = <...>; | ||
92 | vcc6-supply = <...>; | ||
93 | vcc7-supply = <...>; | ||
94 | vccio-supply = <...>; | ||
95 | |||
59 | regulators { | 96 | regulators { |
60 | vdd1_reg: vdd1 { | 97 | #address-cells = <1>; |
98 | #size-cells = <0>; | ||
99 | |||
100 | vdd1_reg: regulator@0 { | ||
101 | regulator-compatible = "vdd1"; | ||
102 | reg = <0>; | ||
61 | regulator-min-microvolt = < 600000>; | 103 | regulator-min-microvolt = < 600000>; |
62 | regulator-max-microvolt = <1500000>; | 104 | regulator-max-microvolt = <1500000>; |
63 | regulator-always-on; | 105 | regulator-always-on; |
64 | regulator-boot-on; | 106 | regulator-boot-on; |
65 | ti,regulator-ext-sleep-control = <0>; | 107 | ti,regulator-ext-sleep-control = <0>; |
66 | }; | 108 | }; |
67 | vdd2_reg: vdd2 { | 109 | vdd2_reg: regulator@1 { |
110 | regulator-compatible = "vdd2"; | ||
111 | reg = <1>; | ||
68 | regulator-min-microvolt = < 600000>; | 112 | regulator-min-microvolt = < 600000>; |
69 | regulator-max-microvolt = <1500000>; | 113 | regulator-max-microvolt = <1500000>; |
70 | regulator-always-on; | 114 | regulator-always-on; |
71 | regulator-boot-on; | 115 | regulator-boot-on; |
72 | ti,regulator-ext-sleep-control = <4>; | 116 | ti,regulator-ext-sleep-control = <4>; |
73 | }; | 117 | }; |
74 | vddctrl_reg: vddctrl { | 118 | vddctrl_reg: regulator@2 { |
119 | regulator-compatible = "vddctrl"; | ||
120 | reg = <2>; | ||
75 | regulator-min-microvolt = < 600000>; | 121 | regulator-min-microvolt = < 600000>; |
76 | regulator-max-microvolt = <1400000>; | 122 | regulator-max-microvolt = <1400000>; |
77 | regulator-always-on; | 123 | regulator-always-on; |
78 | regulator-boot-on; | 124 | regulator-boot-on; |
79 | ti,regulator-ext-sleep-control = <0>; | 125 | ti,regulator-ext-sleep-control = <0>; |
80 | }; | 126 | }; |
81 | vio_reg: vio { | 127 | vio_reg: regulator@3 { |
128 | regulator-compatible = "vio"; | ||
129 | reg = <3>; | ||
82 | regulator-min-microvolt = <1500000>; | 130 | regulator-min-microvolt = <1500000>; |
83 | regulator-max-microvolt = <1800000>; | 131 | regulator-max-microvolt = <1800000>; |
84 | regulator-always-on; | 132 | regulator-always-on; |
85 | regulator-boot-on; | 133 | regulator-boot-on; |
86 | ti,regulator-ext-sleep-control = <1>; | 134 | ti,regulator-ext-sleep-control = <1>; |
87 | }; | 135 | }; |
88 | ldo1_reg: ldo1 { | 136 | ldo1_reg: regulator@4 { |
137 | regulator-compatible = "ldo1"; | ||
138 | reg = <4>; | ||
89 | regulator-min-microvolt = <1000000>; | 139 | regulator-min-microvolt = <1000000>; |
90 | regulator-max-microvolt = <3300000>; | 140 | regulator-max-microvolt = <3300000>; |
91 | ti,regulator-ext-sleep-control = <0>; | 141 | ti,regulator-ext-sleep-control = <0>; |
92 | }; | 142 | }; |
93 | ldo2_reg: ldo2 { | 143 | ldo2_reg: regulator@5 { |
144 | regulator-compatible = "ldo2"; | ||
145 | reg = <5>; | ||
94 | regulator-min-microvolt = <1050000>; | 146 | regulator-min-microvolt = <1050000>; |
95 | regulator-max-microvolt = <1050000>; | 147 | regulator-max-microvolt = <1050000>; |
96 | ti,regulator-ext-sleep-control = <0>; | 148 | ti,regulator-ext-sleep-control = <0>; |
97 | }; | 149 | }; |
98 | ldo3_reg: ldo3 { | 150 | ldo3_reg: regulator@6 { |
151 | regulator-compatible = "ldo3"; | ||
152 | reg = <6>; | ||
99 | regulator-min-microvolt = <1000000>; | 153 | regulator-min-microvolt = <1000000>; |
100 | regulator-max-microvolt = <3300000>; | 154 | regulator-max-microvolt = <3300000>; |
101 | ti,regulator-ext-sleep-control = <0>; | 155 | ti,regulator-ext-sleep-control = <0>; |
102 | }; | 156 | }; |
103 | ldo4_reg: ldo4 { | 157 | ldo4_reg: regulator@7 { |
158 | regulator-compatible = "ldo4"; | ||
159 | reg = <7>; | ||
104 | regulator-min-microvolt = <1000000>; | 160 | regulator-min-microvolt = <1000000>; |
105 | regulator-max-microvolt = <3300000>; | 161 | regulator-max-microvolt = <3300000>; |
106 | regulator-always-on; | 162 | regulator-always-on; |
107 | ti,regulator-ext-sleep-control = <0>; | 163 | ti,regulator-ext-sleep-control = <0>; |
108 | }; | 164 | }; |
109 | ldo5_reg: ldo5 { | 165 | ldo5_reg: regulator@8 { |
166 | regulator-compatible = "ldo5"; | ||
167 | reg = <8>; | ||
110 | regulator-min-microvolt = <1000000>; | 168 | regulator-min-microvolt = <1000000>; |
111 | regulator-max-microvolt = <3300000>; | 169 | regulator-max-microvolt = <3300000>; |
112 | ti,regulator-ext-sleep-control = <0>; | 170 | ti,regulator-ext-sleep-control = <0>; |
113 | }; | 171 | }; |
114 | ldo6_reg: ldo6 { | 172 | ldo6_reg: regulator@9 { |
173 | regulator-compatible = "ldo6"; | ||
174 | reg = <9>; | ||
115 | regulator-min-microvolt = <1200000>; | 175 | regulator-min-microvolt = <1200000>; |
116 | regulator-max-microvolt = <1200000>; | 176 | regulator-max-microvolt = <1200000>; |
117 | ti,regulator-ext-sleep-control = <0>; | 177 | ti,regulator-ext-sleep-control = <0>; |
118 | }; | 178 | }; |
119 | ldo7_reg: ldo7 { | 179 | ldo7_reg: regulator@10 { |
180 | regulator-compatible = "ldo7"; | ||
181 | reg = <10>; | ||
120 | regulator-min-microvolt = <1200000>; | 182 | regulator-min-microvolt = <1200000>; |
121 | regulator-max-microvolt = <1200000>; | 183 | regulator-max-microvolt = <1200000>; |
122 | regulator-always-on; | 184 | regulator-always-on; |
123 | regulator-boot-on; | 185 | regulator-boot-on; |
124 | ti,regulator-ext-sleep-control = <1>; | 186 | ti,regulator-ext-sleep-control = <1>; |
125 | }; | 187 | }; |
126 | ldo8_reg: ldo8 { | 188 | ldo8_reg: regulator@11 { |
189 | regulator-compatible = "ldo8"; | ||
190 | reg = <11>; | ||
127 | regulator-min-microvolt = <1000000>; | 191 | regulator-min-microvolt = <1000000>; |
128 | regulator-max-microvolt = <3300000>; | 192 | regulator-max-microvolt = <3300000>; |
129 | regulator-always-on; | 193 | regulator-always-on; |
diff --git a/Documentation/devicetree/bindings/mfd/twl6040.txt b/Documentation/devicetree/bindings/mfd/twl6040.txt index bc67c6f424aa..c855240f3a0e 100644 --- a/Documentation/devicetree/bindings/mfd/twl6040.txt +++ b/Documentation/devicetree/bindings/mfd/twl6040.txt | |||
@@ -6,7 +6,7 @@ They are connected ot the host processor via i2c for commands, McPDM for audio | |||
6 | data and commands. | 6 | data and commands. |
7 | 7 | ||
8 | Required properties: | 8 | Required properties: |
9 | - compatible : Must be "ti,twl6040"; | 9 | - compatible : "ti,twl6040" for twl6040, "ti,twl6041" for twl6041 |
10 | - reg: must be 0x4b for i2c address | 10 | - reg: must be 0x4b for i2c address |
11 | - interrupts: twl6040 has one interrupt line connecteded to the main SoC | 11 | - interrupts: twl6040 has one interrupt line connecteded to the main SoC |
12 | - interrupt-parent: The parent interrupt controller | 12 | - interrupt-parent: The parent interrupt controller |
diff --git a/Documentation/devicetree/bindings/mips/cavium/bootbus.txt b/Documentation/devicetree/bindings/mips/cavium/bootbus.txt new file mode 100644 index 000000000000..6581478225a2 --- /dev/null +++ b/Documentation/devicetree/bindings/mips/cavium/bootbus.txt | |||
@@ -0,0 +1,126 @@ | |||
1 | * Boot Bus | ||
2 | |||
3 | The Octeon Boot Bus is a configurable parallel bus with 8 chip | ||
4 | selects. Each chip select is independently configurable. | ||
5 | |||
6 | Properties: | ||
7 | - compatible: "cavium,octeon-3860-bootbus" | ||
8 | |||
9 | Compatibility with all cn3XXX, cn5XXX and cn6XXX SOCs. | ||
10 | |||
11 | - reg: The base address of the Boot Bus' register bank. | ||
12 | |||
13 | - #address-cells: Must be <2>. The first cell is the chip select | ||
14 | within the bootbus. The second cell is the offset from the chip select. | ||
15 | |||
16 | - #size-cells: Must be <1>. | ||
17 | |||
18 | - ranges: There must be one one triplet of (child-bus-address, | ||
19 | parent-bus-address, length) for each active chip select. If the | ||
20 | length element for any triplet is zero, the chip select is disabled, | ||
21 | making it inactive. | ||
22 | |||
23 | The configuration parameters for each chip select are stored in child | ||
24 | nodes. | ||
25 | |||
26 | Configuration Properties: | ||
27 | - compatible: "cavium,octeon-3860-bootbus-config" | ||
28 | |||
29 | - cavium,cs-index: A single cell indicating the chip select that | ||
30 | corresponds to this configuration. | ||
31 | |||
32 | - cavium,t-adr: A cell specifying the ADR timing (in nS). | ||
33 | |||
34 | - cavium,t-ce: A cell specifying the CE timing (in nS). | ||
35 | |||
36 | - cavium,t-oe: A cell specifying the OE timing (in nS). | ||
37 | |||
38 | - cavium,t-we: A cell specifying the WE timing (in nS). | ||
39 | |||
40 | - cavium,t-rd-hld: A cell specifying the RD_HLD timing (in nS). | ||
41 | |||
42 | - cavium,t-wr-hld: A cell specifying the WR_HLD timing (in nS). | ||
43 | |||
44 | - cavium,t-pause: A cell specifying the PAUSE timing (in nS). | ||
45 | |||
46 | - cavium,t-wait: A cell specifying the WAIT timing (in nS). | ||
47 | |||
48 | - cavium,t-page: A cell specifying the PAGE timing (in nS). | ||
49 | |||
50 | - cavium,t-rd-dly: A cell specifying the RD_DLY timing (in nS). | ||
51 | |||
52 | - cavium,pages: A cell specifying the PAGES parameter (0 = 8 bytes, 1 | ||
53 | = 2 bytes, 2 = 4 bytes, 3 = 8 bytes). | ||
54 | |||
55 | - cavium,wait-mode: Optional. If present, wait mode (WAITM) is selected. | ||
56 | |||
57 | - cavium,page-mode: Optional. If present, page mode (PAGEM) is selected. | ||
58 | |||
59 | - cavium,bus-width: A cell specifying the WIDTH parameter (in bits) of | ||
60 | the bus for this chip select. | ||
61 | |||
62 | - cavium,ale-mode: Optional. If present, ALE mode is selected. | ||
63 | |||
64 | - cavium,sam-mode: Optional. If present, SAM mode is selected. | ||
65 | |||
66 | - cavium,or-mode: Optional. If present, OR mode is selected. | ||
67 | |||
68 | Example: | ||
69 | bootbus: bootbus@1180000000000 { | ||
70 | compatible = "cavium,octeon-3860-bootbus"; | ||
71 | reg = <0x11800 0x00000000 0x0 0x200>; | ||
72 | /* The chip select number and offset */ | ||
73 | #address-cells = <2>; | ||
74 | /* The size of the chip select region */ | ||
75 | #size-cells = <1>; | ||
76 | ranges = <0 0 0x0 0x1f400000 0xc00000>, | ||
77 | <1 0 0x10000 0x30000000 0>, | ||
78 | <2 0 0x10000 0x40000000 0>, | ||
79 | <3 0 0x10000 0x50000000 0>, | ||
80 | <4 0 0x0 0x1d020000 0x10000>, | ||
81 | <5 0 0x0 0x1d040000 0x10000>, | ||
82 | <6 0 0x0 0x1d050000 0x10000>, | ||
83 | <7 0 0x10000 0x90000000 0>; | ||
84 | |||
85 | cavium,cs-config@0 { | ||
86 | compatible = "cavium,octeon-3860-bootbus-config"; | ||
87 | cavium,cs-index = <0>; | ||
88 | cavium,t-adr = <20>; | ||
89 | cavium,t-ce = <60>; | ||
90 | cavium,t-oe = <60>; | ||
91 | cavium,t-we = <45>; | ||
92 | cavium,t-rd-hld = <35>; | ||
93 | cavium,t-wr-hld = <45>; | ||
94 | cavium,t-pause = <0>; | ||
95 | cavium,t-wait = <0>; | ||
96 | cavium,t-page = <35>; | ||
97 | cavium,t-rd-dly = <0>; | ||
98 | |||
99 | cavium,pages = <0>; | ||
100 | cavium,bus-width = <8>; | ||
101 | }; | ||
102 | . | ||
103 | . | ||
104 | . | ||
105 | cavium,cs-config@6 { | ||
106 | compatible = "cavium,octeon-3860-bootbus-config"; | ||
107 | cavium,cs-index = <6>; | ||
108 | cavium,t-adr = <5>; | ||
109 | cavium,t-ce = <300>; | ||
110 | cavium,t-oe = <270>; | ||
111 | cavium,t-we = <150>; | ||
112 | cavium,t-rd-hld = <100>; | ||
113 | cavium,t-wr-hld = <70>; | ||
114 | cavium,t-pause = <0>; | ||
115 | cavium,t-wait = <0>; | ||
116 | cavium,t-page = <320>; | ||
117 | cavium,t-rd-dly = <0>; | ||
118 | |||
119 | cavium,pages = <0>; | ||
120 | cavium,wait-mode; | ||
121 | cavium,bus-width = <16>; | ||
122 | }; | ||
123 | . | ||
124 | . | ||
125 | . | ||
126 | }; | ||
diff --git a/Documentation/devicetree/bindings/mips/cavium/ciu.txt b/Documentation/devicetree/bindings/mips/cavium/ciu.txt new file mode 100644 index 000000000000..2c2d0746b43d --- /dev/null +++ b/Documentation/devicetree/bindings/mips/cavium/ciu.txt | |||
@@ -0,0 +1,26 @@ | |||
1 | * Central Interrupt Unit | ||
2 | |||
3 | Properties: | ||
4 | - compatible: "cavium,octeon-3860-ciu" | ||
5 | |||
6 | Compatibility with all cn3XXX, cn5XXX and cn63XX SOCs. | ||
7 | |||
8 | - interrupt-controller: This is an interrupt controller. | ||
9 | |||
10 | - reg: The base address of the CIU's register bank. | ||
11 | |||
12 | - #interrupt-cells: Must be <2>. The first cell is the bank within | ||
13 | the CIU and may have a value of 0 or 1. The second cell is the bit | ||
14 | within the bank and may have a value between 0 and 63. | ||
15 | |||
16 | Example: | ||
17 | interrupt-controller@1070000000000 { | ||
18 | compatible = "cavium,octeon-3860-ciu"; | ||
19 | interrupt-controller; | ||
20 | /* Interrupts are specified by two parts: | ||
21 | * 1) Controller register (0 or 1) | ||
22 | * 2) Bit within the register (0..63) | ||
23 | */ | ||
24 | #interrupt-cells = <2>; | ||
25 | reg = <0x10700 0x00000000 0x0 0x7000>; | ||
26 | }; | ||
diff --git a/Documentation/devicetree/bindings/mips/cavium/ciu2.txt b/Documentation/devicetree/bindings/mips/cavium/ciu2.txt new file mode 100644 index 000000000000..0ec7ba8bbbcb --- /dev/null +++ b/Documentation/devicetree/bindings/mips/cavium/ciu2.txt | |||
@@ -0,0 +1,27 @@ | |||
1 | * Central Interrupt Unit | ||
2 | |||
3 | Properties: | ||
4 | - compatible: "cavium,octeon-6880-ciu2" | ||
5 | |||
6 | Compatibility with 68XX SOCs. | ||
7 | |||
8 | - interrupt-controller: This is an interrupt controller. | ||
9 | |||
10 | - reg: The base address of the CIU's register bank. | ||
11 | |||
12 | - #interrupt-cells: Must be <2>. The first cell is the bank within | ||
13 | the CIU and may have a value between 0 and 63. The second cell is | ||
14 | the bit within the bank and may also have a value between 0 and 63. | ||
15 | |||
16 | Example: | ||
17 | interrupt-controller@1070100000000 { | ||
18 | compatible = "cavium,octeon-6880-ciu2"; | ||
19 | interrupt-controller; | ||
20 | /* Interrupts are specified by two parts: | ||
21 | * 1) Controller register (0..63) | ||
22 | * 2) Bit within the register (0..63) | ||
23 | */ | ||
24 | #address-cells = <0>; | ||
25 | #interrupt-cells = <2>; | ||
26 | reg = <0x10701 0x00000000 0x0 0x4000000>; | ||
27 | }; | ||
diff --git a/Documentation/devicetree/bindings/mips/cavium/dma-engine.txt b/Documentation/devicetree/bindings/mips/cavium/dma-engine.txt new file mode 100644 index 000000000000..cb4291e3b1d1 --- /dev/null +++ b/Documentation/devicetree/bindings/mips/cavium/dma-engine.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | * DMA Engine. | ||
2 | |||
3 | The Octeon DMA Engine transfers between the Boot Bus and main memory. | ||
4 | The DMA Engine will be refered to by phandle by any device that is | ||
5 | connected to it. | ||
6 | |||
7 | Properties: | ||
8 | - compatible: "cavium,octeon-5750-bootbus-dma" | ||
9 | |||
10 | Compatibility with all cn52XX, cn56XX and cn6XXX SOCs. | ||
11 | |||
12 | - reg: The base address of the DMA Engine's register bank. | ||
13 | |||
14 | - interrupts: A single interrupt specifier. | ||
15 | |||
16 | Example: | ||
17 | dma0: dma-engine@1180000000100 { | ||
18 | compatible = "cavium,octeon-5750-bootbus-dma"; | ||
19 | reg = <0x11800 0x00000100 0x0 0x8>; | ||
20 | interrupts = <0 63>; | ||
21 | }; | ||
diff --git a/Documentation/devicetree/bindings/mips/cavium/uctl.txt b/Documentation/devicetree/bindings/mips/cavium/uctl.txt new file mode 100644 index 000000000000..aa66b9b8d801 --- /dev/null +++ b/Documentation/devicetree/bindings/mips/cavium/uctl.txt | |||
@@ -0,0 +1,46 @@ | |||
1 | * UCTL USB controller glue | ||
2 | |||
3 | Properties: | ||
4 | - compatible: "cavium,octeon-6335-uctl" | ||
5 | |||
6 | Compatibility with all cn6XXX SOCs. | ||
7 | |||
8 | - reg: The base address of the UCTL register bank. | ||
9 | |||
10 | - #address-cells: Must be <2>. | ||
11 | |||
12 | - #size-cells: Must be <2>. | ||
13 | |||
14 | - ranges: Empty to signify direct mapping of the children. | ||
15 | |||
16 | - refclk-frequency: A single cell containing the reference clock | ||
17 | frequency in Hz. | ||
18 | |||
19 | - refclk-type: A string describing the reference clock connection | ||
20 | either "crystal" or "external". | ||
21 | |||
22 | Example: | ||
23 | uctl@118006f000000 { | ||
24 | compatible = "cavium,octeon-6335-uctl"; | ||
25 | reg = <0x11800 0x6f000000 0x0 0x100>; | ||
26 | ranges; /* Direct mapping */ | ||
27 | #address-cells = <2>; | ||
28 | #size-cells = <2>; | ||
29 | /* 12MHz, 24MHz and 48MHz allowed */ | ||
30 | refclk-frequency = <24000000>; | ||
31 | /* Either "crystal" or "external" */ | ||
32 | refclk-type = "crystal"; | ||
33 | |||
34 | ehci@16f0000000000 { | ||
35 | compatible = "cavium,octeon-6335-ehci","usb-ehci"; | ||
36 | reg = <0x16f00 0x00000000 0x0 0x100>; | ||
37 | interrupts = <0 56>; | ||
38 | big-endian-regs; | ||
39 | }; | ||
40 | ohci@16f0000000400 { | ||
41 | compatible = "cavium,octeon-6335-ohci","usb-ohci"; | ||
42 | reg = <0x16f00 0x00000400 0x0 0x100>; | ||
43 | interrupts = <0 56>; | ||
44 | big-endian-regs; | ||
45 | }; | ||
46 | }; | ||
diff --git a/Documentation/devicetree/bindings/misc/at25.txt b/Documentation/devicetree/bindings/misc/at25.txt new file mode 100644 index 000000000000..ab3c327929dd --- /dev/null +++ b/Documentation/devicetree/bindings/misc/at25.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | Atmel AT25 eeprom | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "atmel,at25". | ||
5 | - reg : chip select number | ||
6 | - spi-max-frequency : max spi frequency to use | ||
7 | |||
8 | - at25,byte-len : total eeprom size in bytes | ||
9 | - at25,addr-mode : addr-mode flags, as defined in include/linux/spi/eeprom.h | ||
10 | - at25,page-size : size of the eeprom page | ||
11 | |||
12 | Examples: | ||
13 | at25@0 { | ||
14 | compatible = "atmel,at25"; | ||
15 | reg = <0> | ||
16 | spi-max-frequency = <5000000>; | ||
17 | |||
18 | at25,byte-len = <0x8000>; | ||
19 | at25,addr-mode = <2>; | ||
20 | at25,page-size = <64>; | ||
21 | }; | ||
diff --git a/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt index 0d93b4b0e0e3..bd9be0b5bc20 100644 --- a/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt +++ b/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt | |||
@@ -3,21 +3,22 @@ | |||
3 | The Enhanced Secure Digital Host Controller provides an interface | 3 | The Enhanced Secure Digital Host Controller provides an interface |
4 | for MMC, SD, and SDIO types of memory cards. | 4 | for MMC, SD, and SDIO types of memory cards. |
5 | 5 | ||
6 | This file documents differences between the core properties described | ||
7 | by mmc.txt and the properties used by the sdhci-esdhc driver. | ||
8 | |||
6 | Required properties: | 9 | Required properties: |
7 | - compatible : should be | ||
8 | "fsl,<chip>-esdhc", "fsl,esdhc" | ||
9 | - reg : should contain eSDHC registers location and length. | ||
10 | - interrupts : should contain eSDHC interrupt. | ||
11 | - interrupt-parent : interrupt source phandle. | 10 | - interrupt-parent : interrupt source phandle. |
12 | - clock-frequency : specifies eSDHC base clock frequency. | 11 | - clock-frequency : specifies eSDHC base clock frequency. |
13 | - sdhci,wp-inverted : (optional) specifies that eSDHC controller | 12 | |
14 | reports inverted write-protect state; New devices should use | 13 | Optional properties: |
15 | the generic "wp-inverted" property. | 14 | - sdhci,wp-inverted : specifies that eSDHC controller reports |
16 | - sdhci,1-bit-only : (optional) specifies that a controller can | 15 | inverted write-protect state; New devices should use the generic |
17 | only handle 1-bit data transfers. New devices should use the | 16 | "wp-inverted" property. |
18 | generic "bus-width = <1>" property. | 17 | - sdhci,1-bit-only : specifies that a controller can only handle |
19 | - sdhci,auto-cmd12: (optional) specifies that a controller can | 18 | 1-bit data transfers. New devices should use the generic |
20 | only handle auto CMD12. | 19 | "bus-width = <1>" property. |
20 | - sdhci,auto-cmd12: specifies that a controller can only handle auto | ||
21 | CMD12. | ||
21 | 22 | ||
22 | Example: | 23 | Example: |
23 | 24 | ||
diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt index fea541ee8b34..70cd49b1caa8 100644 --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt | |||
@@ -3,17 +3,15 @@ | |||
3 | The Enhanced Secure Digital Host Controller on Freescale i.MX family | 3 | The Enhanced Secure Digital Host Controller on Freescale i.MX family |
4 | provides an interface for MMC, SD, and SDIO types of memory cards. | 4 | provides an interface for MMC, SD, and SDIO types of memory cards. |
5 | 5 | ||
6 | This file documents differences between the core properties described | ||
7 | by mmc.txt and the properties used by the sdhci-esdhc-imx driver. | ||
8 | |||
6 | Required properties: | 9 | Required properties: |
7 | - compatible : Should be "fsl,<chip>-esdhc" | 10 | - compatible : Should be "fsl,<chip>-esdhc" |
8 | - reg : Should contain eSDHC registers location and length | ||
9 | - interrupts : Should contain eSDHC interrupt | ||
10 | 11 | ||
11 | Optional properties: | 12 | Optional properties: |
12 | - non-removable : Indicate the card is wired to host permanently | ||
13 | - fsl,cd-internal : Indicate to use controller internal card detection | 13 | - fsl,cd-internal : Indicate to use controller internal card detection |
14 | - fsl,wp-internal : Indicate to use controller internal write protection | 14 | - fsl,wp-internal : Indicate to use controller internal write protection |
15 | - cd-gpios : Specify GPIOs for card detection | ||
16 | - wp-gpios : Specify GPIOs for write protection | ||
17 | 15 | ||
18 | Examples: | 16 | Examples: |
19 | 17 | ||
diff --git a/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt b/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt index d64aea5a4203..0e5e2ec4001d 100644 --- a/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt +++ b/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt | |||
@@ -1,8 +1,9 @@ | |||
1 | MMC/SD/SDIO slot directly connected to a SPI bus | 1 | MMC/SD/SDIO slot directly connected to a SPI bus |
2 | 2 | ||
3 | This file documents differences between the core properties described | ||
4 | by mmc.txt and the properties used by the mmc_spi driver. | ||
5 | |||
3 | Required properties: | 6 | Required properties: |
4 | - compatible : should be "mmc-spi-slot". | ||
5 | - reg : should specify SPI address (chip-select number). | ||
6 | - spi-max-frequency : maximum frequency for this device (Hz). | 7 | - spi-max-frequency : maximum frequency for this device (Hz). |
7 | - voltage-ranges : two cells are required, first cell specifies minimum | 8 | - voltage-ranges : two cells are required, first cell specifies minimum |
8 | slot voltage (mV), second cell specifies maximum slot voltage (mV). | 9 | slot voltage (mV), second cell specifies maximum slot voltage (mV). |
@@ -11,8 +12,7 @@ Required properties: | |||
11 | Optional properties: | 12 | Optional properties: |
12 | - gpios : may specify GPIOs in this order: Card-Detect GPIO, | 13 | - gpios : may specify GPIOs in this order: Card-Detect GPIO, |
13 | Write-Protect GPIO. Note that this does not follow the | 14 | Write-Protect GPIO. Note that this does not follow the |
14 | binding from mmc.txt, for historic reasons. | 15 | binding from mmc.txt, for historical reasons. |
15 | - interrupts : the interrupt of a card detect interrupt. | ||
16 | - interrupt-parent : the phandle for the interrupt controller that | 16 | - interrupt-parent : the phandle for the interrupt controller that |
17 | services interrupts for this device. | 17 | services interrupts for this device. |
18 | 18 | ||
diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt index 6e70dcde0a71..8a6811f4a02f 100644 --- a/Documentation/devicetree/bindings/mmc/mmc.txt +++ b/Documentation/devicetree/bindings/mmc/mmc.txt | |||
@@ -2,13 +2,17 @@ These properties are common to multiple MMC host controllers. Any host | |||
2 | that requires the respective functionality should implement them using | 2 | that requires the respective functionality should implement them using |
3 | these definitions. | 3 | these definitions. |
4 | 4 | ||
5 | Interpreted by the OF core: | ||
6 | - reg: Registers location and length. | ||
7 | - interrupts: Interrupts used by the MMC controller. | ||
8 | |||
5 | Required properties: | 9 | Required properties: |
6 | - bus-width: Number of data lines, can be <1>, <4>, or <8> | 10 | - bus-width: Number of data lines, can be <1>, <4>, or <8> |
7 | 11 | ||
8 | Optional properties: | 12 | Optional properties: |
9 | - cd-gpios : Specify GPIOs for card detection, see gpio binding | 13 | - cd-gpios: Specify GPIOs for card detection, see gpio binding |
10 | - wp-gpios : Specify GPIOs for write protection, see gpio binding | 14 | - wp-gpios: Specify GPIOs for write protection, see gpio binding |
11 | - cd-inverted: when present, polarity on the wp gpio line is inverted | 15 | - cd-inverted: when present, polarity on the cd gpio line is inverted |
12 | - wp-inverted: when present, polarity on the wp gpio line is inverted | 16 | - wp-inverted: when present, polarity on the wp gpio line is inverted |
13 | - non-removable: non-removable slot (like eMMC) | 17 | - non-removable: non-removable slot (like eMMC) |
14 | - max-frequency: maximum operating clock frequency | 18 | - max-frequency: maximum operating clock frequency |
diff --git a/Documentation/devicetree/bindings/mmc/mmci.txt b/Documentation/devicetree/bindings/mmc/mmci.txt index 14a81d526118..2b584cae352a 100644 --- a/Documentation/devicetree/bindings/mmc/mmci.txt +++ b/Documentation/devicetree/bindings/mmc/mmci.txt | |||
@@ -1,19 +1,15 @@ | |||
1 | * ARM PrimeCell MultiMedia Card Interface (MMCI) PL180/1 | 1 | * ARM PrimeCell MultiMedia Card Interface (MMCI) PL180/1 |
2 | 2 | ||
3 | The ARM PrimeCell MMCI PL180 and PL181 provides and interface for | 3 | The ARM PrimeCell MMCI PL180 and PL181 provides an interface for |
4 | reading and writing to MultiMedia and SD cards alike. | 4 | reading and writing to MultiMedia and SD cards alike. |
5 | 5 | ||
6 | This file documents differences between the core properties described | ||
7 | by mmc.txt and the properties used by the mmci driver. | ||
8 | |||
6 | Required properties: | 9 | Required properties: |
7 | - compatible : contains "arm,pl18x", "arm,primecell". | 10 | - compatible : contains "arm,pl18x", "arm,primecell". |
8 | - reg : contains pl18x registers and length. | ||
9 | - interrupts : contains the device IRQ(s). | ||
10 | - arm,primecell-periphid : contains the PrimeCell Peripheral ID. | 11 | - arm,primecell-periphid : contains the PrimeCell Peripheral ID. |
11 | 12 | ||
12 | Optional properties: | 13 | Optional properties: |
13 | - wp-gpios : contains any write protect (ro) gpios | ||
14 | - cd-gpios : contains any card detection gpios | ||
15 | - cd-inverted : indicates whether the cd gpio is inverted | ||
16 | - max-frequency : contains the maximum operating frequency | ||
17 | - bus-width : number of data lines, can be <1>, <4>, or <8> | ||
18 | - mmc-cap-mmc-highspeed : indicates whether MMC is high speed capable | 14 | - mmc-cap-mmc-highspeed : indicates whether MMC is high speed capable |
19 | - mmc-cap-sd-highspeed : indicates whether SD is high speed capable | 15 | - mmc-cap-sd-highspeed : indicates whether SD is high speed capable |
diff --git a/Documentation/devicetree/bindings/mmc/mxs-mmc.txt b/Documentation/devicetree/bindings/mmc/mxs-mmc.txt index 14d870a9e3db..54949f6faede 100644 --- a/Documentation/devicetree/bindings/mmc/mxs-mmc.txt +++ b/Documentation/devicetree/bindings/mmc/mxs-mmc.txt | |||
@@ -3,16 +3,14 @@ | |||
3 | The Freescale MXS Synchronous Serial Ports (SSP) can act as a MMC controller | 3 | The Freescale MXS Synchronous Serial Ports (SSP) can act as a MMC controller |
4 | to support MMC, SD, and SDIO types of memory cards. | 4 | to support MMC, SD, and SDIO types of memory cards. |
5 | 5 | ||
6 | This file documents differences between the core properties in mmc.txt | ||
7 | and the properties used by the mxsmmc driver. | ||
8 | |||
6 | Required properties: | 9 | Required properties: |
7 | - compatible: Should be "fsl,<chip>-mmc". The supported chips include | 10 | - compatible: Should be "fsl,<chip>-mmc". The supported chips include |
8 | imx23 and imx28. | 11 | imx23 and imx28. |
9 | - reg: Should contain registers location and length | ||
10 | - interrupts: Should contain ERROR and DMA interrupts | 12 | - interrupts: Should contain ERROR and DMA interrupts |
11 | - fsl,ssp-dma-channel: APBH DMA channel for the SSP | 13 | - fsl,ssp-dma-channel: APBH DMA channel for the SSP |
12 | - bus-width: Number of data lines, can be <1>, <4>, or <8> | ||
13 | |||
14 | Optional properties: | ||
15 | - wp-gpios: Specify GPIOs for write protection | ||
16 | 14 | ||
17 | Examples: | 15 | Examples: |
18 | 16 | ||
diff --git a/Documentation/devicetree/bindings/mmc/nvidia-sdhci.txt b/Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.txt index f77c3031607f..c6d7b11db9eb 100644 --- a/Documentation/devicetree/bindings/mmc/nvidia-sdhci.txt +++ b/Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.txt | |||
@@ -3,15 +3,13 @@ | |||
3 | This controller on Tegra family SoCs provides an interface for MMC, SD, | 3 | This controller on Tegra family SoCs provides an interface for MMC, SD, |
4 | and SDIO types of memory cards. | 4 | and SDIO types of memory cards. |
5 | 5 | ||
6 | This file documents differences between the core properties described | ||
7 | by mmc.txt and the properties used by the sdhci-tegra driver. | ||
8 | |||
6 | Required properties: | 9 | Required properties: |
7 | - compatible : Should be "nvidia,<chip>-sdhci" | 10 | - compatible : Should be "nvidia,<chip>-sdhci" |
8 | - reg : Should contain SD/MMC registers location and length | ||
9 | - interrupts : Should contain SD/MMC interrupt | ||
10 | - bus-width : Number of data lines, can be <1>, <4>, or <8> | ||
11 | 11 | ||
12 | Optional properties: | 12 | Optional properties: |
13 | - cd-gpios : Specify GPIOs for card detection | ||
14 | - wp-gpios : Specify GPIOs for write protection | ||
15 | - power-gpios : Specify GPIOs for power control | 13 | - power-gpios : Specify GPIOs for power control |
16 | 14 | ||
17 | Example: | 15 | Example: |
diff --git a/Documentation/devicetree/bindings/mmc/sdhci-pxa.txt b/Documentation/devicetree/bindings/mmc/sdhci-pxa.txt new file mode 100644 index 000000000000..dbe98a3c183a --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/sdhci-pxa.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | * Marvell sdhci-pxa v2/v3 controller | ||
2 | |||
3 | This file documents differences between the core properties in mmc.txt | ||
4 | and the properties used by the sdhci-pxav2 and sdhci-pxav3 drivers. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: Should be "mrvl,pxav2-mmc" or "mrvl,pxav3-mmc". | ||
8 | |||
9 | Optional properties: | ||
10 | - mrvl,clk-delay-cycles: Specify a number of cycles to delay for tuning. | ||
11 | |||
12 | Example: | ||
13 | |||
14 | sdhci@d4280800 { | ||
15 | compatible = "mrvl,pxav3-mmc"; | ||
16 | reg = <0xd4280800 0x800>; | ||
17 | bus-width = <8>; | ||
18 | interrupts = <27>; | ||
19 | non-removable; | ||
20 | mrvl,clk-delay-cycles = <31>; | ||
21 | }; | ||
diff --git a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt index 8a53958c9a9f..be76a23b34c4 100644 --- a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt +++ b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt | |||
@@ -3,21 +3,20 @@ | |||
3 | The Highspeed MMC Host Controller on TI OMAP family | 3 | The Highspeed MMC Host Controller on TI OMAP family |
4 | provides an interface for MMC, SD, and SDIO types of memory cards. | 4 | provides an interface for MMC, SD, and SDIO types of memory cards. |
5 | 5 | ||
6 | This file documents differences between the core properties described | ||
7 | by mmc.txt and the properties used by the omap_hsmmc driver. | ||
8 | |||
6 | Required properties: | 9 | Required properties: |
7 | - compatible: | 10 | - compatible: |
8 | Should be "ti,omap2-hsmmc", for OMAP2 controllers | 11 | Should be "ti,omap2-hsmmc", for OMAP2 controllers |
9 | Should be "ti,omap3-hsmmc", for OMAP3 controllers | 12 | Should be "ti,omap3-hsmmc", for OMAP3 controllers |
10 | Should be "ti,omap4-hsmmc", for OMAP4 controllers | 13 | Should be "ti,omap4-hsmmc", for OMAP4 controllers |
11 | - ti,hwmods: Must be "mmc<n>", n is controller instance starting 1 | 14 | - ti,hwmods: Must be "mmc<n>", n is controller instance starting 1 |
12 | - reg : should contain hsmmc registers location and length | ||
13 | 15 | ||
14 | Optional properties: | 16 | Optional properties: |
15 | ti,dual-volt: boolean, supports dual voltage cards | 17 | ti,dual-volt: boolean, supports dual voltage cards |
16 | <supply-name>-supply: phandle to the regulator device tree node | 18 | <supply-name>-supply: phandle to the regulator device tree node |
17 | "supply-name" examples are "vmmc", "vmmc_aux" etc | 19 | "supply-name" examples are "vmmc", "vmmc_aux" etc |
18 | bus-width: Number of data lines, default assumed is 1 if the property is missing. | ||
19 | cd-gpios: GPIOs for card detection | ||
20 | wp-gpios: GPIOs for write protection | ||
21 | ti,non-removable: non-removable slot (like eMMC) | 20 | ti,non-removable: non-removable slot (like eMMC) |
22 | ti,needs-special-reset: Requires a special softreset sequence | 21 | ti,needs-special-reset: Requires a special softreset sequence |
23 | 22 | ||
diff --git a/Documentation/devicetree/bindings/mtd/orion-nand.txt b/Documentation/devicetree/bindings/mtd/orion-nand.txt index b2356b7d2fa4..2d6ab660e603 100644 --- a/Documentation/devicetree/bindings/mtd/orion-nand.txt +++ b/Documentation/devicetree/bindings/mtd/orion-nand.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | NAND support for Marvell Orion SoC platforms | 1 | NAND support for Marvell Orion SoC platforms |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "mrvl,orion-nand". | 4 | - compatible : "marvell,orion-nand". |
5 | - reg : Base physical address of the NAND and length of memory mapped | 5 | - reg : Base physical address of the NAND and length of memory mapped |
6 | region | 6 | region |
7 | 7 | ||
@@ -24,7 +24,7 @@ nand@f4000000 { | |||
24 | ale = <1>; | 24 | ale = <1>; |
25 | bank-width = <1>; | 25 | bank-width = <1>; |
26 | chip-delay = <25>; | 26 | chip-delay = <25>; |
27 | compatible = "mrvl,orion-nand"; | 27 | compatible = "marvell,orion-nand"; |
28 | reg = <0xf4000000 0x400>; | 28 | reg = <0xf4000000 0x400>; |
29 | 29 | ||
30 | partition@0 { | 30 | partition@0 { |
diff --git a/Documentation/devicetree/bindings/mtd/partition.txt b/Documentation/devicetree/bindings/mtd/partition.txt index f114ce1657c2..6e1f61f1e789 100644 --- a/Documentation/devicetree/bindings/mtd/partition.txt +++ b/Documentation/devicetree/bindings/mtd/partition.txt | |||
@@ -35,4 +35,4 @@ flash@0 { | |||
35 | uimage@100000 { | 35 | uimage@100000 { |
36 | reg = <0x0100000 0x200000>; | 36 | reg = <0x0100000 0x200000>; |
37 | }; | 37 | }; |
38 | ]; | 38 | }; |
diff --git a/Documentation/devicetree/bindings/net/broadcom-bcm87xx.txt b/Documentation/devicetree/bindings/net/broadcom-bcm87xx.txt new file mode 100644 index 000000000000..7c86d5e28a0e --- /dev/null +++ b/Documentation/devicetree/bindings/net/broadcom-bcm87xx.txt | |||
@@ -0,0 +1,29 @@ | |||
1 | The Broadcom BCM87XX devices are a family of 10G Ethernet PHYs. They | ||
2 | have these bindings in addition to the standard PHY bindings. | ||
3 | |||
4 | Compatible: Should contain "broadcom,bcm8706" or "broadcom,bcm8727" and | ||
5 | "ethernet-phy-ieee802.3-c45" | ||
6 | |||
7 | Optional Properties: | ||
8 | |||
9 | - broadcom,c45-reg-init : one of more sets of 4 cells. The first cell | ||
10 | is the MDIO Manageable Device (MMD) address, the second a register | ||
11 | address within the MMD, the third cell contains a mask to be ANDed | ||
12 | with the existing register value, and the fourth cell is ORed with | ||
13 | he result to yield the new register value. If the third cell has a | ||
14 | value of zero, no read of the existing value is performed. | ||
15 | |||
16 | Example: | ||
17 | |||
18 | ethernet-phy@5 { | ||
19 | reg = <5>; | ||
20 | compatible = "broadcom,bcm8706", "ethernet-phy-ieee802.3-c45"; | ||
21 | interrupt-parent = <&gpio>; | ||
22 | interrupts = <12 8>; /* Pin 12, active low */ | ||
23 | /* | ||
24 | * Set PMD Digital Control Register for | ||
25 | * GPIO[1] Tx/Rx | ||
26 | * GPIO[0] R64 Sync Acquired | ||
27 | */ | ||
28 | broadcom,c45-reg-init = <1 0xc808 0xff8f 0x70>; | ||
29 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt b/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt index f31b686d4556..8ff324eaa889 100644 --- a/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt +++ b/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt | |||
@@ -11,6 +11,9 @@ Required properties: | |||
11 | 11 | ||
12 | - reg : Offset and length of the register set for this device | 12 | - reg : Offset and length of the register set for this device |
13 | - interrupts : Interrupt tuple for this device | 13 | - interrupts : Interrupt tuple for this device |
14 | |||
15 | Optional properties: | ||
16 | |||
14 | - clock-frequency : The oscillator frequency driving the flexcan device | 17 | - clock-frequency : The oscillator frequency driving the flexcan device |
15 | 18 | ||
16 | Example: | 19 | Example: |
diff --git a/Documentation/devicetree/bindings/net/cavium-mdio.txt b/Documentation/devicetree/bindings/net/cavium-mdio.txt new file mode 100644 index 000000000000..04cb7491d232 --- /dev/null +++ b/Documentation/devicetree/bindings/net/cavium-mdio.txt | |||
@@ -0,0 +1,27 @@ | |||
1 | * System Management Interface (SMI) / MDIO | ||
2 | |||
3 | Properties: | ||
4 | - compatible: "cavium,octeon-3860-mdio" | ||
5 | |||
6 | Compatibility with all cn3XXX, cn5XXX and cn6XXX SOCs. | ||
7 | |||
8 | - reg: The base address of the MDIO bus controller register bank. | ||
9 | |||
10 | - #address-cells: Must be <1>. | ||
11 | |||
12 | - #size-cells: Must be <0>. MDIO addresses have no size component. | ||
13 | |||
14 | Typically an MDIO bus might have several children. | ||
15 | |||
16 | Example: | ||
17 | mdio@1180000001800 { | ||
18 | compatible = "cavium,octeon-3860-mdio"; | ||
19 | #address-cells = <1>; | ||
20 | #size-cells = <0>; | ||
21 | reg = <0x11800 0x00001800 0x0 0x40>; | ||
22 | |||
23 | ethernet-phy@0 { | ||
24 | ... | ||
25 | reg = <0>; | ||
26 | }; | ||
27 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/cavium-mix.txt b/Documentation/devicetree/bindings/net/cavium-mix.txt new file mode 100644 index 000000000000..5da628db68bf --- /dev/null +++ b/Documentation/devicetree/bindings/net/cavium-mix.txt | |||
@@ -0,0 +1,39 @@ | |||
1 | * MIX Ethernet controller. | ||
2 | |||
3 | Properties: | ||
4 | - compatible: "cavium,octeon-5750-mix" | ||
5 | |||
6 | Compatibility with all cn5XXX and cn6XXX SOCs populated with MIX | ||
7 | devices. | ||
8 | |||
9 | - reg: The base addresses of four separate register banks. The first | ||
10 | bank contains the MIX registers. The second bank the corresponding | ||
11 | AGL registers. The third bank are the AGL registers shared by all | ||
12 | MIX devices present. The fourth bank is the AGL_PRT_CTL shared by | ||
13 | all MIX devices present. | ||
14 | |||
15 | - cell-index: A single cell specifying which portion of the shared | ||
16 | register banks corresponds to this MIX device. | ||
17 | |||
18 | - interrupts: Two interrupt specifiers. The first is the MIX | ||
19 | interrupt routing and the second the routing for the AGL interrupts. | ||
20 | |||
21 | - mac-address: Optional, the MAC address to assign to the device. | ||
22 | |||
23 | - local-mac-address: Optional, the MAC address to assign to the device | ||
24 | if mac-address is not specified. | ||
25 | |||
26 | - phy-handle: Optional, a phandle for the PHY device connected to this device. | ||
27 | |||
28 | Example: | ||
29 | ethernet@1070000100800 { | ||
30 | compatible = "cavium,octeon-5750-mix"; | ||
31 | reg = <0x10700 0x00100800 0x0 0x100>, /* MIX */ | ||
32 | <0x11800 0xE0000800 0x0 0x300>, /* AGL */ | ||
33 | <0x11800 0xE0000400 0x0 0x400>, /* AGL_SHARED */ | ||
34 | <0x11800 0xE0002008 0x0 0x8>; /* AGL_PRT_CTL */ | ||
35 | cell-index = <1>; | ||
36 | interrupts = <1 18>, < 1 46>; | ||
37 | local-mac-address = [ 00 0f b7 10 63 54 ]; | ||
38 | phy-handle = <&phy1>; | ||
39 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/cavium-pip.txt b/Documentation/devicetree/bindings/net/cavium-pip.txt new file mode 100644 index 000000000000..d4c53ba04b3b --- /dev/null +++ b/Documentation/devicetree/bindings/net/cavium-pip.txt | |||
@@ -0,0 +1,98 @@ | |||
1 | * PIP Ethernet nexus. | ||
2 | |||
3 | The PIP Ethernet nexus can control several data packet input/output | ||
4 | devices. The devices have a two level grouping scheme. There may be | ||
5 | several interfaces, and each interface may have several ports. These | ||
6 | ports might be an individual Ethernet PHY. | ||
7 | |||
8 | |||
9 | Properties for the PIP nexus: | ||
10 | - compatible: "cavium,octeon-3860-pip" | ||
11 | |||
12 | Compatibility with all cn3XXX, cn5XXX and cn6XXX SOCs. | ||
13 | |||
14 | - reg: The base address of the PIP's register bank. | ||
15 | |||
16 | - #address-cells: Must be <1>. | ||
17 | |||
18 | - #size-cells: Must be <0>. | ||
19 | |||
20 | Properties for PIP interfaces which is a child the PIP nexus: | ||
21 | - compatible: "cavium,octeon-3860-pip-interface" | ||
22 | |||
23 | Compatibility with all cn3XXX, cn5XXX and cn6XXX SOCs. | ||
24 | |||
25 | - reg: The interface number. | ||
26 | |||
27 | - #address-cells: Must be <1>. | ||
28 | |||
29 | - #size-cells: Must be <0>. | ||
30 | |||
31 | Properties for PIP port which is a child the PIP interface: | ||
32 | - compatible: "cavium,octeon-3860-pip-port" | ||
33 | |||
34 | Compatibility with all cn3XXX, cn5XXX and cn6XXX SOCs. | ||
35 | |||
36 | - reg: The port number within the interface group. | ||
37 | |||
38 | - mac-address: Optional, the MAC address to assign to the device. | ||
39 | |||
40 | - local-mac-address: Optional, the MAC address to assign to the device | ||
41 | if mac-address is not specified. | ||
42 | |||
43 | - phy-handle: Optional, a phandle for the PHY device connected to this device. | ||
44 | |||
45 | Example: | ||
46 | |||
47 | pip@11800a0000000 { | ||
48 | compatible = "cavium,octeon-3860-pip"; | ||
49 | #address-cells = <1>; | ||
50 | #size-cells = <0>; | ||
51 | reg = <0x11800 0xa0000000 0x0 0x2000>; | ||
52 | |||
53 | interface@0 { | ||
54 | compatible = "cavium,octeon-3860-pip-interface"; | ||
55 | #address-cells = <1>; | ||
56 | #size-cells = <0>; | ||
57 | reg = <0>; /* interface */ | ||
58 | |||
59 | ethernet@0 { | ||
60 | compatible = "cavium,octeon-3860-pip-port"; | ||
61 | reg = <0x0>; /* Port */ | ||
62 | local-mac-address = [ 00 0f b7 10 63 60 ]; | ||
63 | phy-handle = <&phy2>; | ||
64 | }; | ||
65 | ethernet@1 { | ||
66 | compatible = "cavium,octeon-3860-pip-port"; | ||
67 | reg = <0x1>; /* Port */ | ||
68 | local-mac-address = [ 00 0f b7 10 63 61 ]; | ||
69 | phy-handle = <&phy3>; | ||
70 | }; | ||
71 | ethernet@2 { | ||
72 | compatible = "cavium,octeon-3860-pip-port"; | ||
73 | reg = <0x2>; /* Port */ | ||
74 | local-mac-address = [ 00 0f b7 10 63 62 ]; | ||
75 | phy-handle = <&phy4>; | ||
76 | }; | ||
77 | ethernet@3 { | ||
78 | compatible = "cavium,octeon-3860-pip-port"; | ||
79 | reg = <0x3>; /* Port */ | ||
80 | local-mac-address = [ 00 0f b7 10 63 63 ]; | ||
81 | phy-handle = <&phy5>; | ||
82 | }; | ||
83 | }; | ||
84 | |||
85 | interface@1 { | ||
86 | compatible = "cavium,octeon-3860-pip-interface"; | ||
87 | #address-cells = <1>; | ||
88 | #size-cells = <0>; | ||
89 | reg = <1>; /* interface */ | ||
90 | |||
91 | ethernet@0 { | ||
92 | compatible = "cavium,octeon-3860-pip-port"; | ||
93 | reg = <0x0>; /* Port */ | ||
94 | local-mac-address = [ 00 0f b7 10 63 64 ]; | ||
95 | phy-handle = <&phy6>; | ||
96 | }; | ||
97 | }; | ||
98 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/davinci_emac.txt b/Documentation/devicetree/bindings/net/davinci_emac.txt new file mode 100644 index 000000000000..48b259e29e87 --- /dev/null +++ b/Documentation/devicetree/bindings/net/davinci_emac.txt | |||
@@ -0,0 +1,41 @@ | |||
1 | * Texas Instruments Davinci EMAC | ||
2 | |||
3 | This file provides information, what the device node | ||
4 | for the davinci_emac interface contains. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: "ti,davinci-dm6467-emac"; | ||
8 | - reg: Offset and length of the register set for the device | ||
9 | - ti,davinci-ctrl-reg-offset: offset to control register | ||
10 | - ti,davinci-ctrl-mod-reg-offset: offset to control module register | ||
11 | - ti,davinci-ctrl-ram-offset: offset to control module ram | ||
12 | - ti,davinci-ctrl-ram-size: size of control module ram | ||
13 | - ti,davinci-rmii-en: use RMII | ||
14 | - ti,davinci-no-bd-ram: has the emac controller BD RAM | ||
15 | - phy-handle: Contains a phandle to an Ethernet PHY. | ||
16 | if not, davinci_emac driver defaults to 100/FULL | ||
17 | - interrupts: interrupt mapping for the davinci emac interrupts sources: | ||
18 | 4 sources: <Receive Threshold Interrupt | ||
19 | Receive Interrupt | ||
20 | Transmit Interrupt | ||
21 | Miscellaneous Interrupt> | ||
22 | |||
23 | Optional properties: | ||
24 | - local-mac-address : 6 bytes, mac address | ||
25 | |||
26 | Example (enbw_cmc board): | ||
27 | eth0: emac@1e20000 { | ||
28 | compatible = "ti,davinci-dm6467-emac"; | ||
29 | reg = <0x220000 0x4000>; | ||
30 | ti,davinci-ctrl-reg-offset = <0x3000>; | ||
31 | ti,davinci-ctrl-mod-reg-offset = <0x2000>; | ||
32 | ti,davinci-ctrl-ram-offset = <0>; | ||
33 | ti,davinci-ctrl-ram-size = <0x2000>; | ||
34 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
35 | interrupts = <33 | ||
36 | 34 | ||
37 | 35 | ||
38 | 36 | ||
39 | >; | ||
40 | interrupt-parent = <&intc>; | ||
41 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/fsl-fec.txt b/Documentation/devicetree/bindings/net/fsl-fec.txt index 4616fc28ee86..d53639221403 100644 --- a/Documentation/devicetree/bindings/net/fsl-fec.txt +++ b/Documentation/devicetree/bindings/net/fsl-fec.txt | |||
@@ -7,10 +7,14 @@ Required properties: | |||
7 | - phy-mode : String, operation mode of the PHY interface. | 7 | - phy-mode : String, operation mode of the PHY interface. |
8 | Supported values are: "mii", "gmii", "sgmii", "tbi", "rmii", | 8 | Supported values are: "mii", "gmii", "sgmii", "tbi", "rmii", |
9 | "rgmii", "rgmii-id", "rgmii-rxid", "rgmii-txid", "rtbi", "smii". | 9 | "rgmii", "rgmii-id", "rgmii-rxid", "rgmii-txid", "rtbi", "smii". |
10 | - phy-reset-gpios : Should specify the gpio for phy reset | ||
11 | 10 | ||
12 | Optional properties: | 11 | Optional properties: |
13 | - local-mac-address : 6 bytes, mac address | 12 | - local-mac-address : 6 bytes, mac address |
13 | - phy-reset-gpios : Should specify the gpio for phy reset | ||
14 | - phy-reset-duration : Reset duration in milliseconds. Should present | ||
15 | only if property "phy-reset-gpios" is available. Missing the property | ||
16 | will have the duration be 1 millisecond. Numbers greater than 1000 are | ||
17 | invalid and 1 millisecond will be used instead. | ||
14 | 18 | ||
15 | Example: | 19 | Example: |
16 | 20 | ||
diff --git a/Documentation/devicetree/bindings/net/phy.txt b/Documentation/devicetree/bindings/net/phy.txt index bb8c742eb8c5..7cd18fbfcf71 100644 --- a/Documentation/devicetree/bindings/net/phy.txt +++ b/Documentation/devicetree/bindings/net/phy.txt | |||
@@ -14,10 +14,20 @@ Required properties: | |||
14 | - linux,phandle : phandle for this node; likely referenced by an | 14 | - linux,phandle : phandle for this node; likely referenced by an |
15 | ethernet controller node. | 15 | ethernet controller node. |
16 | 16 | ||
17 | Optional Properties: | ||
18 | |||
19 | - compatible: Compatible list, may contain | ||
20 | "ethernet-phy-ieee802.3-c22" or "ethernet-phy-ieee802.3-c45" for | ||
21 | PHYs that implement IEEE802.3 clause 22 or IEEE802.3 clause 45 | ||
22 | specifications. If neither of these are specified, the default is to | ||
23 | assume clause 22. The compatible list may also contain other | ||
24 | elements. | ||
25 | |||
17 | Example: | 26 | Example: |
18 | 27 | ||
19 | ethernet-phy@0 { | 28 | ethernet-phy@0 { |
20 | linux,phandle = <2452000> | 29 | compatible = "ethernet-phy-ieee802.3-c22"; |
30 | linux,phandle = <2452000>; | ||
21 | interrupt-parent = <40000>; | 31 | interrupt-parent = <40000>; |
22 | interrupts = <35 1>; | 32 | interrupts = <35 1>; |
23 | reg = <0>; | 33 | reg = <0>; |
diff --git a/Documentation/devicetree/bindings/net/stmmac.txt b/Documentation/devicetree/bindings/net/stmmac.txt index 1f62623f8c3f..060bbf098ef3 100644 --- a/Documentation/devicetree/bindings/net/stmmac.txt +++ b/Documentation/devicetree/bindings/net/stmmac.txt | |||
@@ -1,7 +1,8 @@ | |||
1 | * STMicroelectronics 10/100/1000 Ethernet driver (GMAC) | 1 | * STMicroelectronics 10/100/1000 Ethernet driver (GMAC) |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: Should be "st,spear600-gmac" | 4 | - compatible: Should be "snps,dwmac-<ip_version>" "snps,dwmac" |
5 | For backwards compatibility: "st,spear600-gmac" is also supported. | ||
5 | - reg: Address and length of the register set for the device | 6 | - reg: Address and length of the register set for the device |
6 | - interrupt-parent: Should be the phandle for the interrupt controller | 7 | - interrupt-parent: Should be the phandle for the interrupt controller |
7 | that services interrupts for this device | 8 | that services interrupts for this device |
diff --git a/Documentation/devicetree/bindings/nvec/nvec_nvidia.txt b/Documentation/devicetree/bindings/nvec/nvidia,nvec.txt index 5aeee53ff9f4..5aeee53ff9f4 100644 --- a/Documentation/devicetree/bindings/nvec/nvec_nvidia.txt +++ b/Documentation/devicetree/bindings/nvec/nvidia,nvec.txt | |||
diff --git a/Documentation/devicetree/bindings/pinctrl/fsl,imx6q-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/fsl,imx6q-pinctrl.txt index 82b43f915857..a4119f6422d9 100644 --- a/Documentation/devicetree/bindings/pinctrl/fsl,imx6q-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/fsl,imx6q-pinctrl.txt | |||
@@ -1626,3 +1626,5 @@ MX6Q_PAD_SD2_DAT3__PCIE_CTRL_MUX_11 1587 | |||
1626 | MX6Q_PAD_SD2_DAT3__GPIO_1_12 1588 | 1626 | MX6Q_PAD_SD2_DAT3__GPIO_1_12 1588 |
1627 | MX6Q_PAD_SD2_DAT3__SJC_DONE 1589 | 1627 | MX6Q_PAD_SD2_DAT3__SJC_DONE 1589 |
1628 | MX6Q_PAD_SD2_DAT3__ANATOP_TESTO_3 1590 | 1628 | MX6Q_PAD_SD2_DAT3__ANATOP_TESTO_3 1590 |
1629 | MX6Q_PAD_ENET_RX_ER__ANATOP_USBOTG_ID 1591 | ||
1630 | MX6Q_PAD_GPIO_1__ANATOP_USBOTG_ID 1592 | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt new file mode 100644 index 000000000000..5187f0dd8b28 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt | |||
@@ -0,0 +1,93 @@ | |||
1 | One-register-per-pin type device tree based pinctrl driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "pinctrl-single" | ||
5 | |||
6 | - reg : offset and length of the register set for the mux registers | ||
7 | |||
8 | - pinctrl-single,register-width : pinmux register access width in bits | ||
9 | |||
10 | - pinctrl-single,function-mask : mask of allowed pinmux function bits | ||
11 | in the pinmux register | ||
12 | |||
13 | Optional properties: | ||
14 | - pinctrl-single,function-off : function off mode for disabled state if | ||
15 | available and same for all registers; if not specified, disabling of | ||
16 | pin functions is ignored | ||
17 | |||
18 | This driver assumes that there is only one register for each pin, | ||
19 | and uses the common pinctrl bindings as specified in the pinctrl-bindings.txt | ||
20 | document in this directory. | ||
21 | |||
22 | The pin configuration nodes for pinctrl-single are specified as pinctrl | ||
23 | register offset and value pairs using pinctrl-single,pins. Only the bits | ||
24 | specified in pinctrl-single,function-mask are updated. For example, setting | ||
25 | a pin for a device could be done with: | ||
26 | |||
27 | pinctrl-single,pins = <0xdc 0x118>; | ||
28 | |||
29 | Where 0xdc is the offset from the pinctrl register base address for the | ||
30 | device pinctrl register, and 0x118 contains the desired value of the | ||
31 | pinctrl register. See the device example and static board pins example | ||
32 | below for more information. | ||
33 | |||
34 | Example: | ||
35 | |||
36 | /* SoC common file */ | ||
37 | |||
38 | /* first controller instance for pins in core domain */ | ||
39 | pmx_core: pinmux@4a100040 { | ||
40 | compatible = "pinctrl-single"; | ||
41 | reg = <0x4a100040 0x0196>; | ||
42 | #address-cells = <1>; | ||
43 | #size-cells = <0>; | ||
44 | pinctrl-single,register-width = <16>; | ||
45 | pinctrl-single,function-mask = <0xffff>; | ||
46 | }; | ||
47 | |||
48 | /* second controller instance for pins in wkup domain */ | ||
49 | pmx_wkup: pinmux@4a31e040 { | ||
50 | compatible = "pinctrl-single; | ||
51 | reg = <0x4a31e040 0x0038>; | ||
52 | #address-cells = <1>; | ||
53 | #size-cells = <0>; | ||
54 | pinctrl-single,register-width = <16>; | ||
55 | pinctrl-single,function-mask = <0xffff>; | ||
56 | }; | ||
57 | |||
58 | |||
59 | /* board specific .dts file */ | ||
60 | |||
61 | &pmx_core { | ||
62 | |||
63 | /* | ||
64 | * map all board specific static pins enabled by the pinctrl driver | ||
65 | * itself during the boot (or just set them up in the bootloader) | ||
66 | */ | ||
67 | pinctrl-names = "default"; | ||
68 | pinctrl-0 = <&board_pins>; | ||
69 | |||
70 | board_pins: pinmux_board_pins { | ||
71 | pinctrl-single,pins = < | ||
72 | 0x6c 0xf | ||
73 | 0x6e 0xf | ||
74 | 0x70 0xf | ||
75 | 0x72 0xf | ||
76 | >; | ||
77 | }; | ||
78 | |||
79 | /* map uart2 pins */ | ||
80 | uart2_pins: pinmux_uart2_pins { | ||
81 | pinctrl-single,pins = < | ||
82 | 0xd8 0x118 | ||
83 | 0xda 0 | ||
84 | 0xdc 0x118 | ||
85 | 0xde 0 | ||
86 | >; | ||
87 | }; | ||
88 | }; | ||
89 | |||
90 | &uart2 { | ||
91 | pinctrl-names = "default"; | ||
92 | pinctrl-0 = <&uart2_pins>; | ||
93 | }; | ||
diff --git a/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt b/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt new file mode 100644 index 000000000000..cfe1db3bb6e9 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt | |||
@@ -0,0 +1,12 @@ | |||
1 | LPC32XX PWM controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "nxp,lpc3220-pwm" | ||
5 | - reg: physical base address and length of the controller's registers | ||
6 | |||
7 | Examples: | ||
8 | |||
9 | pwm@0x4005C000 { | ||
10 | compatible = "nxp,lpc3220-pwm"; | ||
11 | reg = <0x4005C000 0x8>; | ||
12 | }; | ||
diff --git a/Documentation/devicetree/bindings/pwm/mxs-pwm.txt b/Documentation/devicetree/bindings/pwm/mxs-pwm.txt new file mode 100644 index 000000000000..b16f4a57d111 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/mxs-pwm.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | Freescale MXS PWM controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "fsl,imx23-pwm" | ||
5 | - reg: physical base address and length of the controller's registers | ||
6 | - #pwm-cells: should be 2. The first cell specifies the per-chip index | ||
7 | of the PWM to use and the second cell is the duty cycle in nanoseconds. | ||
8 | - fsl,pwm-number: the number of PWM devices | ||
9 | |||
10 | Example: | ||
11 | |||
12 | pwm: pwm@80064000 { | ||
13 | compatible = "fsl,imx28-pwm", "fsl,imx23-pwm"; | ||
14 | reg = <0x80064000 2000>; | ||
15 | #pwm-cells = <2>; | ||
16 | fsl,pwm-number = <8>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt b/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt new file mode 100644 index 000000000000..bbbeedb4ec05 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt | |||
@@ -0,0 +1,18 @@ | |||
1 | Tegra SoC PWFM controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be one of: | ||
5 | - "nvidia,tegra20-pwm" | ||
6 | - "nvidia,tegra30-pwm" | ||
7 | - reg: physical base address and length of the controller's registers | ||
8 | - #pwm-cells: On Tegra the number of cells used to specify a PWM is 2. The | ||
9 | first cell specifies the per-chip index of the PWM to use and the second | ||
10 | cell is the duty cycle in nanoseconds. | ||
11 | |||
12 | Example: | ||
13 | |||
14 | pwm: pwm@7000a000 { | ||
15 | compatible = "nvidia,tegra20-pwm"; | ||
16 | reg = <0x7000a000 0x100>; | ||
17 | #pwm-cells = <2>; | ||
18 | }; | ||
diff --git a/Documentation/devicetree/bindings/pwm/pwm.txt b/Documentation/devicetree/bindings/pwm/pwm.txt new file mode 100644 index 000000000000..73ec962bfe8c --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/pwm.txt | |||
@@ -0,0 +1,57 @@ | |||
1 | Specifying PWM information for devices | ||
2 | ====================================== | ||
3 | |||
4 | 1) PWM user nodes | ||
5 | ----------------- | ||
6 | |||
7 | PWM users should specify a list of PWM devices that they want to use | ||
8 | with a property containing a 'pwm-list': | ||
9 | |||
10 | pwm-list ::= <single-pwm> [pwm-list] | ||
11 | single-pwm ::= <pwm-phandle> <pwm-specifier> | ||
12 | pwm-phandle : phandle to PWM controller node | ||
13 | pwm-specifier : array of #pwm-cells specifying the given PWM | ||
14 | (controller specific) | ||
15 | |||
16 | PWM properties should be named "pwms". The exact meaning of each pwms | ||
17 | property must be documented in the device tree binding for each device. | ||
18 | An optional property "pwm-names" may contain a list of strings to label | ||
19 | each of the PWM devices listed in the "pwms" property. If no "pwm-names" | ||
20 | property is given, the name of the user node will be used as fallback. | ||
21 | |||
22 | Drivers for devices that use more than a single PWM device can use the | ||
23 | "pwm-names" property to map the name of the PWM device requested by the | ||
24 | pwm_get() call to an index into the list given by the "pwms" property. | ||
25 | |||
26 | The following example could be used to describe a PWM-based backlight | ||
27 | device: | ||
28 | |||
29 | pwm: pwm { | ||
30 | #pwm-cells = <2>; | ||
31 | }; | ||
32 | |||
33 | [...] | ||
34 | |||
35 | bl: backlight { | ||
36 | pwms = <&pwm 0 5000000>; | ||
37 | pwm-names = "backlight"; | ||
38 | }; | ||
39 | |||
40 | pwm-specifier typically encodes the chip-relative PWM number and the PWM | ||
41 | period in nanoseconds. Note that in the example above, specifying the | ||
42 | "pwm-names" is redundant because the name "backlight" would be used as | ||
43 | fallback anyway. | ||
44 | |||
45 | 2) PWM controller nodes | ||
46 | ----------------------- | ||
47 | |||
48 | PWM controller nodes must specify the number of cells used for the | ||
49 | specifier using the '#pwm-cells' property. | ||
50 | |||
51 | An example PWM controller might look like this: | ||
52 | |||
53 | pwm: pwm@7000a000 { | ||
54 | compatible = "nvidia,tegra20-pwm"; | ||
55 | reg = <0x7000a000 0x100>; | ||
56 | #pwm-cells = <2>; | ||
57 | }; | ||
diff --git a/Documentation/devicetree/bindings/regulator/fixed-regulator.txt b/Documentation/devicetree/bindings/regulator/fixed-regulator.txt index 2f5b6b1ba15f..4fae41d54798 100644 --- a/Documentation/devicetree/bindings/regulator/fixed-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/fixed-regulator.txt | |||
@@ -10,6 +10,7 @@ Optional properties: | |||
10 | If this property is missing, the default assumed is Active low. | 10 | If this property is missing, the default assumed is Active low. |
11 | - gpio-open-drain: GPIO is open drain type. | 11 | - gpio-open-drain: GPIO is open drain type. |
12 | If this property is missing then default assumption is false. | 12 | If this property is missing then default assumption is false. |
13 | -vin-supply: Input supply name. | ||
13 | 14 | ||
14 | Any property defined as part of the core regulator | 15 | Any property defined as part of the core regulator |
15 | binding, defined in regulator.txt, can also be used. | 16 | binding, defined in regulator.txt, can also be used. |
@@ -29,4 +30,5 @@ Example: | |||
29 | enable-active-high; | 30 | enable-active-high; |
30 | regulator-boot-on; | 31 | regulator-boot-on; |
31 | gpio-open-drain; | 32 | gpio-open-drain; |
33 | vin-supply = <&parent_reg>; | ||
32 | }; | 34 | }; |
diff --git a/Documentation/devicetree/bindings/regulator/regulator.txt b/Documentation/devicetree/bindings/regulator/regulator.txt index 5b7a408acdaa..66ece3f87bbc 100644 --- a/Documentation/devicetree/bindings/regulator/regulator.txt +++ b/Documentation/devicetree/bindings/regulator/regulator.txt | |||
@@ -10,6 +10,11 @@ Optional properties: | |||
10 | - regulator-always-on: boolean, regulator should never be disabled | 10 | - regulator-always-on: boolean, regulator should never be disabled |
11 | - regulator-boot-on: bootloader/firmware enabled regulator | 11 | - regulator-boot-on: bootloader/firmware enabled regulator |
12 | - <name>-supply: phandle to the parent supply/regulator node | 12 | - <name>-supply: phandle to the parent supply/regulator node |
13 | - regulator-ramp-delay: ramp delay for regulator(in uV/uS) | ||
14 | - regulator-compatible: If a regulator chip contains multiple | ||
15 | regulators, and if the chip's binding contains a child node that | ||
16 | describes each regulator, then this property indicates which regulator | ||
17 | this child node is intended to configure. | ||
13 | 18 | ||
14 | Example: | 19 | Example: |
15 | 20 | ||
diff --git a/Documentation/devicetree/bindings/regulator/tps65217.txt b/Documentation/devicetree/bindings/regulator/tps65217.txt new file mode 100644 index 000000000000..0487e9675ba0 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/tps65217.txt | |||
@@ -0,0 +1,91 @@ | |||
1 | TPS65217 family of regulators | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "ti,tps65217" | ||
5 | - reg: I2C slave address | ||
6 | - regulators: list of regulators provided by this controller, must be named | ||
7 | after their hardware counterparts: dcdc[1-3] and ldo[1-4] | ||
8 | - regulators: This is the list of child nodes that specify the regulator | ||
9 | initialization data for defined regulators. Not all regulators for the given | ||
10 | device need to be present. The definition for each of these nodes is defined | ||
11 | using the standard binding for regulators found at | ||
12 | Documentation/devicetree/bindings/regulator/regulator.txt. | ||
13 | |||
14 | The valid names for regulators are: | ||
15 | tps65217: dcdc1, dcdc2, dcdc3, ldo1, ldo2, ldo3 and ldo4 | ||
16 | |||
17 | Each regulator is defined using the standard binding for regulators. | ||
18 | |||
19 | Example: | ||
20 | |||
21 | tps: tps@24 { | ||
22 | compatible = "ti,tps65217"; | ||
23 | |||
24 | regulators { | ||
25 | #address-cells = <1>; | ||
26 | #size-cells = <0>; | ||
27 | |||
28 | dcdc1_reg: regulator@0 { | ||
29 | reg = <0>; | ||
30 | regulator-compatible = "dcdc1"; | ||
31 | regulator-min-microvolt = <900000>; | ||
32 | regulator-max-microvolt = <1800000>; | ||
33 | regulator-boot-on; | ||
34 | regulator-always-on; | ||
35 | }; | ||
36 | |||
37 | dcdc2_reg: regulator@1 { | ||
38 | reg = <1>; | ||
39 | regulator-compatible = "dcdc2"; | ||
40 | regulator-min-microvolt = <900000>; | ||
41 | regulator-max-microvolt = <3300000>; | ||
42 | regulator-boot-on; | ||
43 | regulator-always-on; | ||
44 | }; | ||
45 | |||
46 | dcdc3_reg: regulator@2 { | ||
47 | reg = <2>; | ||
48 | regulator-compatible = "dcdc3"; | ||
49 | regulator-min-microvolt = <900000>; | ||
50 | regulator-max-microvolt = <1500000>; | ||
51 | regulator-boot-on; | ||
52 | regulator-always-on; | ||
53 | }; | ||
54 | |||
55 | ldo1_reg: regulator@3 { | ||
56 | reg = <3>; | ||
57 | regulator-compatible = "ldo1"; | ||
58 | regulator-min-microvolt = <1000000>; | ||
59 | regulator-max-microvolt = <3300000>; | ||
60 | regulator-boot-on; | ||
61 | regulator-always-on; | ||
62 | }; | ||
63 | |||
64 | ldo2_reg: regulator@4 { | ||
65 | reg = <4>; | ||
66 | regulator-compatible = "ldo2"; | ||
67 | regulator-min-microvolt = <900000>; | ||
68 | regulator-max-microvolt = <3300000>; | ||
69 | regulator-boot-on; | ||
70 | regulator-always-on; | ||
71 | }; | ||
72 | |||
73 | ldo3_reg: regulator@5 { | ||
74 | reg = <5>; | ||
75 | regulator-compatible = "ldo3"; | ||
76 | regulator-min-microvolt = <1800000>; | ||
77 | regulator-max-microvolt = <3300000>; | ||
78 | regulator-boot-on; | ||
79 | regulator-always-on; | ||
80 | }; | ||
81 | |||
82 | ldo4_reg: regulator@6 { | ||
83 | reg = <6>; | ||
84 | regulator-compatible = "ldo4"; | ||
85 | regulator-min-microvolt = <1800000>; | ||
86 | regulator-max-microvolt = <3300000>; | ||
87 | regulator-boot-on; | ||
88 | regulator-always-on; | ||
89 | }; | ||
90 | }; | ||
91 | }; | ||
diff --git a/Documentation/devicetree/bindings/regulator/tps6586x.txt b/Documentation/devicetree/bindings/regulator/tps6586x.txt index 0fcabaa3baa3..d156e1b5db12 100644 --- a/Documentation/devicetree/bindings/regulator/tps6586x.txt +++ b/Documentation/devicetree/bindings/regulator/tps6586x.txt | |||
@@ -6,8 +6,17 @@ Required properties: | |||
6 | - interrupts: the interrupt outputs of the controller | 6 | - interrupts: the interrupt outputs of the controller |
7 | - #gpio-cells: number of cells to describe a GPIO | 7 | - #gpio-cells: number of cells to describe a GPIO |
8 | - gpio-controller: mark the device as a GPIO controller | 8 | - gpio-controller: mark the device as a GPIO controller |
9 | - regulators: list of regulators provided by this controller, must be named | 9 | - regulators: list of regulators provided by this controller, must have |
10 | after their hardware counterparts: sm[0-2], ldo[0-9] and ldo_rtc | 10 | property "regulator-compatible" to match their hardware counterparts: |
11 | sm[0-2], ldo[0-9] and ldo_rtc | ||
12 | - sm0-supply: The input supply for the SM0. | ||
13 | - sm1-supply: The input supply for the SM1. | ||
14 | - sm2-supply: The input supply for the SM2. | ||
15 | - vinldo01-supply: The input supply for the LDO1 and LDO2 | ||
16 | - vinldo23-supply: The input supply for the LDO2 and LDO3 | ||
17 | - vinldo4-supply: The input supply for the LDO4 | ||
18 | - vinldo678-supply: The input supply for the LDO6, LDO7 and LDO8 | ||
19 | - vinldo9-supply: The input supply for the LDO9 | ||
11 | 20 | ||
12 | Each regulator is defined using the standard binding for regulators. | 21 | Each regulator is defined using the standard binding for regulators. |
13 | 22 | ||
@@ -21,75 +30,113 @@ Example: | |||
21 | #gpio-cells = <2>; | 30 | #gpio-cells = <2>; |
22 | gpio-controller; | 31 | gpio-controller; |
23 | 32 | ||
33 | sm0-supply = <&some_reg>; | ||
34 | sm1-supply = <&some_reg>; | ||
35 | sm2-supply = <&some_reg>; | ||
36 | vinldo01-supply = <...>; | ||
37 | vinldo23-supply = <...>; | ||
38 | vinldo4-supply = <...>; | ||
39 | vinldo678-supply = <...>; | ||
40 | vinldo9-supply = <...>; | ||
41 | |||
24 | regulators { | 42 | regulators { |
25 | sm0_reg: sm0 { | 43 | #address-cells = <1>; |
44 | #size-cells = <0>; | ||
45 | |||
46 | sm0_reg: regulator@0 { | ||
47 | reg = <0>; | ||
48 | regulator-compatible = "sm0"; | ||
26 | regulator-min-microvolt = < 725000>; | 49 | regulator-min-microvolt = < 725000>; |
27 | regulator-max-microvolt = <1500000>; | 50 | regulator-max-microvolt = <1500000>; |
28 | regulator-boot-on; | 51 | regulator-boot-on; |
29 | regulator-always-on; | 52 | regulator-always-on; |
30 | }; | 53 | }; |
31 | 54 | ||
32 | sm1_reg: sm1 { | 55 | sm1_reg: regulator@1 { |
56 | reg = <1>; | ||
57 | regulator-compatible = "sm1"; | ||
33 | regulator-min-microvolt = < 725000>; | 58 | regulator-min-microvolt = < 725000>; |
34 | regulator-max-microvolt = <1500000>; | 59 | regulator-max-microvolt = <1500000>; |
35 | regulator-boot-on; | 60 | regulator-boot-on; |
36 | regulator-always-on; | 61 | regulator-always-on; |
37 | }; | 62 | }; |
38 | 63 | ||
39 | sm2_reg: sm2 { | 64 | sm2_reg: regulator@2 { |
65 | reg = <2>; | ||
66 | regulator-compatible = "sm2"; | ||
40 | regulator-min-microvolt = <3000000>; | 67 | regulator-min-microvolt = <3000000>; |
41 | regulator-max-microvolt = <4550000>; | 68 | regulator-max-microvolt = <4550000>; |
42 | regulator-boot-on; | 69 | regulator-boot-on; |
43 | regulator-always-on; | 70 | regulator-always-on; |
44 | }; | 71 | }; |
45 | 72 | ||
46 | ldo0_reg: ldo0 { | 73 | ldo0_reg: regulator@3 { |
74 | reg = <3>; | ||
75 | regulator-compatible = "ldo0"; | ||
47 | regulator-name = "PCIE CLK"; | 76 | regulator-name = "PCIE CLK"; |
48 | regulator-min-microvolt = <3300000>; | 77 | regulator-min-microvolt = <3300000>; |
49 | regulator-max-microvolt = <3300000>; | 78 | regulator-max-microvolt = <3300000>; |
50 | }; | 79 | }; |
51 | 80 | ||
52 | ldo1_reg: ldo1 { | 81 | ldo1_reg: regulator@4 { |
82 | reg = <4>; | ||
83 | regulator-compatible = "ldo1"; | ||
53 | regulator-min-microvolt = < 725000>; | 84 | regulator-min-microvolt = < 725000>; |
54 | regulator-max-microvolt = <1500000>; | 85 | regulator-max-microvolt = <1500000>; |
55 | }; | 86 | }; |
56 | 87 | ||
57 | ldo2_reg: ldo2 { | 88 | ldo2_reg: regulator@5 { |
89 | reg = <5>; | ||
90 | regulator-compatible = "ldo2"; | ||
58 | regulator-min-microvolt = < 725000>; | 91 | regulator-min-microvolt = < 725000>; |
59 | regulator-max-microvolt = <1500000>; | 92 | regulator-max-microvolt = <1500000>; |
60 | }; | 93 | }; |
61 | 94 | ||
62 | ldo3_reg: ldo3 { | 95 | ldo3_reg: regulator@6 { |
96 | reg = <6>; | ||
97 | regulator-compatible = "ldo3"; | ||
63 | regulator-min-microvolt = <1250000>; | 98 | regulator-min-microvolt = <1250000>; |
64 | regulator-max-microvolt = <3300000>; | 99 | regulator-max-microvolt = <3300000>; |
65 | }; | 100 | }; |
66 | 101 | ||
67 | ldo4_reg: ldo4 { | 102 | ldo4_reg: regulator@7 { |
103 | reg = <7>; | ||
104 | regulator-compatible = "ldo4"; | ||
68 | regulator-min-microvolt = <1700000>; | 105 | regulator-min-microvolt = <1700000>; |
69 | regulator-max-microvolt = <2475000>; | 106 | regulator-max-microvolt = <2475000>; |
70 | }; | 107 | }; |
71 | 108 | ||
72 | ldo5_reg: ldo5 { | 109 | ldo5_reg: regulator@8 { |
110 | reg = <8>; | ||
111 | regulator-compatible = "ldo5"; | ||
73 | regulator-min-microvolt = <1250000>; | 112 | regulator-min-microvolt = <1250000>; |
74 | regulator-max-microvolt = <3300000>; | 113 | regulator-max-microvolt = <3300000>; |
75 | }; | 114 | }; |
76 | 115 | ||
77 | ldo6_reg: ldo6 { | 116 | ldo6_reg: regulator@9 { |
117 | reg = <9>; | ||
118 | regulator-compatible = "ldo6"; | ||
78 | regulator-min-microvolt = <1250000>; | 119 | regulator-min-microvolt = <1250000>; |
79 | regulator-max-microvolt = <3300000>; | 120 | regulator-max-microvolt = <3300000>; |
80 | }; | 121 | }; |
81 | 122 | ||
82 | ldo7_reg: ldo7 { | 123 | ldo7_reg: regulator@10 { |
124 | reg = <10>; | ||
125 | regulator-compatible = "ldo7"; | ||
83 | regulator-min-microvolt = <1250000>; | 126 | regulator-min-microvolt = <1250000>; |
84 | regulator-max-microvolt = <3300000>; | 127 | regulator-max-microvolt = <3300000>; |
85 | }; | 128 | }; |
86 | 129 | ||
87 | ldo8_reg: ldo8 { | 130 | ldo8_reg: regulator@11 { |
131 | reg = <11>; | ||
132 | regulator-compatible = "ldo8"; | ||
88 | regulator-min-microvolt = <1250000>; | 133 | regulator-min-microvolt = <1250000>; |
89 | regulator-max-microvolt = <3300000>; | 134 | regulator-max-microvolt = <3300000>; |
90 | }; | 135 | }; |
91 | 136 | ||
92 | ldo9_reg: ldo9 { | 137 | ldo9_reg: regulator@12 { |
138 | reg = <12>; | ||
139 | regulator-compatible = "ldo9"; | ||
93 | regulator-min-microvolt = <1250000>; | 140 | regulator-min-microvolt = <1250000>; |
94 | regulator-max-microvolt = <3300000>; | 141 | regulator-max-microvolt = <3300000>; |
95 | }; | 142 | }; |
diff --git a/Documentation/devicetree/bindings/regulator/twl-regulator.txt b/Documentation/devicetree/bindings/regulator/twl-regulator.txt index 0c3395d55ac1..658749b90b97 100644 --- a/Documentation/devicetree/bindings/regulator/twl-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/twl-regulator.txt | |||
@@ -15,7 +15,6 @@ For twl6030 regulators/LDOs | |||
15 | - "ti,twl6030-vusb" for VUSB LDO | 15 | - "ti,twl6030-vusb" for VUSB LDO |
16 | - "ti,twl6030-v1v8" for V1V8 LDO | 16 | - "ti,twl6030-v1v8" for V1V8 LDO |
17 | - "ti,twl6030-v2v1" for V2V1 LDO | 17 | - "ti,twl6030-v2v1" for V2V1 LDO |
18 | - "ti,twl6030-clk32kg" for CLK32KG RESOURCE | ||
19 | - "ti,twl6030-vdd1" for VDD1 SMPS | 18 | - "ti,twl6030-vdd1" for VDD1 SMPS |
20 | - "ti,twl6030-vdd2" for VDD2 SMPS | 19 | - "ti,twl6030-vdd2" for VDD2 SMPS |
21 | - "ti,twl6030-vdd3" for VDD3 SMPS | 20 | - "ti,twl6030-vdd3" for VDD3 SMPS |
diff --git a/Documentation/devicetree/bindings/rtc/dw-apb.txt b/Documentation/devicetree/bindings/rtc/dw-apb.txt new file mode 100644 index 000000000000..93e2b0f048e6 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/dw-apb.txt | |||
@@ -0,0 +1,25 @@ | |||
1 | * Designware APB timer | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "snps,dw-apb-timer-sp" or "snps,dw-apb-timer-osc" | ||
5 | - reg: physical base address of the controller and length of memory mapped | ||
6 | region. | ||
7 | - interrupts: IRQ line for the timer. | ||
8 | - clock-frequency: The frequency in HZ of the timer. | ||
9 | - clock-freq: For backwards compatibility with picoxcell | ||
10 | |||
11 | Example: | ||
12 | |||
13 | timer1: timer@ffc09000 { | ||
14 | compatible = "snps,dw-apb-timer-sp"; | ||
15 | interrupts = <0 168 4>; | ||
16 | clock-frequency = <200000000>; | ||
17 | reg = <0xffc09000 0x1000>; | ||
18 | }; | ||
19 | |||
20 | timer2: timer@ffd00000 { | ||
21 | compatible = "snps,dw-apb-timer-osc"; | ||
22 | interrupts = <0 169 4>; | ||
23 | clock-frequency = <200000000>; | ||
24 | reg = <0xffd00000 0x1000>; | ||
25 | }; | ||
diff --git a/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt b/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt new file mode 100644 index 000000000000..b800070fe6e9 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | * STMP3xxx/i.MX28 Time Clock controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be one of the following. | ||
5 | * "fsl,stmp3xxx-rtc" | ||
6 | - reg: physical base address of the controller and length of memory mapped | ||
7 | region. | ||
8 | - interrupts: rtc alarm interrupt | ||
9 | |||
10 | Example: | ||
11 | |||
12 | rtc@80056000 { | ||
13 | compatible = "fsl,imx28-rtc", "fsl,stmp3xxx-rtc"; | ||
14 | reg = <0x80056000 2000>; | ||
15 | interrupts = <29>; | ||
16 | }; | ||
diff --git a/Documentation/devicetree/bindings/serial/cavium-uart.txt b/Documentation/devicetree/bindings/serial/cavium-uart.txt new file mode 100644 index 000000000000..87a6c375cd44 --- /dev/null +++ b/Documentation/devicetree/bindings/serial/cavium-uart.txt | |||
@@ -0,0 +1,19 @@ | |||
1 | * Universal Asynchronous Receiver/Transmitter (UART) | ||
2 | |||
3 | - compatible: "cavium,octeon-3860-uart" | ||
4 | |||
5 | Compatibility with all cn3XXX, cn5XXX and cn6XXX SOCs. | ||
6 | |||
7 | - reg: The base address of the UART register bank. | ||
8 | |||
9 | - interrupts: A single interrupt specifier. | ||
10 | |||
11 | - current-speed: Optional, the current bit rate in bits per second. | ||
12 | |||
13 | Example: | ||
14 | uart1: serial@1180000000c00 { | ||
15 | compatible = "cavium,octeon-3860-uart","ns16550"; | ||
16 | reg = <0x11800 0x00000c00 0x0 0x400>; | ||
17 | current-speed = <115200>; | ||
18 | interrupts = <0 35>; | ||
19 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/tegra-audio-alc5632.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-alc5632.txt index b77a97c9101e..b77a97c9101e 100644 --- a/Documentation/devicetree/bindings/sound/tegra-audio-alc5632.txt +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-alc5632.txt | |||
diff --git a/Documentation/devicetree/bindings/sound/tegra-audio-trimslice.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-trimslice.txt index 04b14cfb1f16..04b14cfb1f16 100644 --- a/Documentation/devicetree/bindings/sound/tegra-audio-trimslice.txt +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-trimslice.txt | |||
diff --git a/Documentation/devicetree/bindings/sound/tegra-audio-wm8753.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8753.txt index c4dd39ce6165..c4dd39ce6165 100644 --- a/Documentation/devicetree/bindings/sound/tegra-audio-wm8753.txt +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8753.txt | |||
diff --git a/Documentation/devicetree/bindings/sound/tegra-audio-wm8903.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8903.txt index d5b0da8bf1d8..d5b0da8bf1d8 100644 --- a/Documentation/devicetree/bindings/sound/tegra-audio-wm8903.txt +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8903.txt | |||
diff --git a/Documentation/devicetree/bindings/sound/tegra20-das.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra20-das.txt index 6de3a7ee4efb..6de3a7ee4efb 100644 --- a/Documentation/devicetree/bindings/sound/tegra20-das.txt +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra20-das.txt | |||
diff --git a/Documentation/devicetree/bindings/sound/tegra20-i2s.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra20-i2s.txt index 0df2b5c816e3..0df2b5c816e3 100644 --- a/Documentation/devicetree/bindings/sound/tegra20-i2s.txt +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra20-i2s.txt | |||
diff --git a/Documentation/devicetree/bindings/spi/spi_nvidia.txt b/Documentation/devicetree/bindings/spi/nvidia,tegra20-spi.txt index 6b9e51896693..6b9e51896693 100644 --- a/Documentation/devicetree/bindings/spi/spi_nvidia.txt +++ b/Documentation/devicetree/bindings/spi/nvidia,tegra20-spi.txt | |||
diff --git a/Documentation/devicetree/bindings/spi/spi-orion.txt b/Documentation/devicetree/bindings/spi/spi-orion.txt new file mode 100644 index 000000000000..a3ff50fc76fb --- /dev/null +++ b/Documentation/devicetree/bindings/spi/spi-orion.txt | |||
@@ -0,0 +1,19 @@ | |||
1 | Marvell Orion SPI device | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : should be "marvell,orion-spi". | ||
5 | - reg : offset and length of the register set for the device | ||
6 | - cell-index : Which of multiple SPI controllers is this. | ||
7 | Optional properties: | ||
8 | - interrupts : Is currently not used. | ||
9 | |||
10 | Example: | ||
11 | spi@10600 { | ||
12 | compatible = "marvell,orion-spi"; | ||
13 | #address-cells = <1>; | ||
14 | #size-cells = <0>; | ||
15 | cell-index = <0>; | ||
16 | reg = <0x10600 0x28>; | ||
17 | interrupts = <23>; | ||
18 | status = "disabled"; | ||
19 | }; | ||
diff --git a/Documentation/devicetree/bindings/spi/spi-samsung.txt b/Documentation/devicetree/bindings/spi/spi-samsung.txt new file mode 100644 index 000000000000..a15ffeddfba4 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/spi-samsung.txt | |||
@@ -0,0 +1,116 @@ | |||
1 | * Samsung SPI Controller | ||
2 | |||
3 | The Samsung SPI controller is used to interface with various devices such as flash | ||
4 | and display controllers using the SPI communication interface. | ||
5 | |||
6 | Required SoC Specific Properties: | ||
7 | |||
8 | - compatible: should be one of the following. | ||
9 | - samsung,s3c2443-spi: for s3c2443, s3c2416 and s3c2450 platforms | ||
10 | - samsung,s3c6410-spi: for s3c6410 platforms | ||
11 | - samsung,s5p6440-spi: for s5p6440 and s5p6450 platforms | ||
12 | - samsung,s5pv210-spi: for s5pv210 and s5pc110 platforms | ||
13 | - samsung,exynos4210-spi: for exynos4 and exynos5 platforms | ||
14 | |||
15 | - reg: physical base address of the controller and length of memory mapped | ||
16 | region. | ||
17 | |||
18 | - interrupts: The interrupt number to the cpu. The interrupt specifier format | ||
19 | depends on the interrupt controller. | ||
20 | |||
21 | [PRELIMINARY: the dma channel allocation will change once there are | ||
22 | official DMA bindings] | ||
23 | |||
24 | - tx-dma-channel: The dma channel specifier for tx operations. The format of | ||
25 | the dma specifier depends on the dma controller. | ||
26 | |||
27 | - rx-dma-channel: The dma channel specifier for rx operations. The format of | ||
28 | the dma specifier depends on the dma controller. | ||
29 | |||
30 | Required Board Specific Properties: | ||
31 | |||
32 | - #address-cells: should be 1. | ||
33 | - #size-cells: should be 0. | ||
34 | - gpios: The gpio specifier for clock, mosi and miso interface lines (in the | ||
35 | order specified). The format of the gpio specifier depends on the gpio | ||
36 | controller. | ||
37 | |||
38 | Optional Board Specific Properties: | ||
39 | |||
40 | - samsung,spi-src-clk: If the spi controller includes a internal clock mux to | ||
41 | select the clock source for the spi bus clock, this property can be used to | ||
42 | indicate the clock to be used for driving the spi bus clock. If not specified, | ||
43 | the clock number 0 is used as default. | ||
44 | |||
45 | - num-cs: Specifies the number of chip select lines supported. If | ||
46 | not specified, the default number of chip select lines is set to 1. | ||
47 | |||
48 | SPI Controller specific data in SPI slave nodes: | ||
49 | |||
50 | - The spi slave nodes should provide the following information which is required | ||
51 | by the spi controller. | ||
52 | |||
53 | - cs-gpio: A gpio specifier that specifies the gpio line used as | ||
54 | the slave select line by the spi controller. The format of the gpio | ||
55 | specifier depends on the gpio controller. | ||
56 | |||
57 | - samsung,spi-feedback-delay: The sampling phase shift to be applied on the | ||
58 | miso line (to account for any lag in the miso line). The following are the | ||
59 | valid values. | ||
60 | |||
61 | - 0: No phase shift. | ||
62 | - 1: 90 degree phase shift sampling. | ||
63 | - 2: 180 degree phase shift sampling. | ||
64 | - 3: 270 degree phase shift sampling. | ||
65 | |||
66 | Aliases: | ||
67 | |||
68 | - All the SPI controller nodes should be represented in the aliases node using | ||
69 | the following format 'spi{n}' where n is a unique number for the alias. | ||
70 | |||
71 | |||
72 | Example: | ||
73 | |||
74 | - SoC Specific Portion: | ||
75 | |||
76 | spi_0: spi@12d20000 { | ||
77 | compatible = "samsung,exynos4210-spi"; | ||
78 | reg = <0x12d20000 0x100>; | ||
79 | interrupts = <0 66 0>; | ||
80 | tx-dma-channel = <&pdma0 5>; | ||
81 | rx-dma-channel = <&pdma0 4>; | ||
82 | }; | ||
83 | |||
84 | - Board Specific Portion: | ||
85 | |||
86 | spi_0: spi@12d20000 { | ||
87 | #address-cells = <1>; | ||
88 | #size-cells = <0>; | ||
89 | gpios = <&gpa2 4 2 3 0>, | ||
90 | <&gpa2 6 2 3 0>, | ||
91 | <&gpa2 7 2 3 0>; | ||
92 | |||
93 | w25q80bw@0 { | ||
94 | #address-cells = <1>; | ||
95 | #size-cells = <1>; | ||
96 | compatible = "w25x80"; | ||
97 | reg = <0>; | ||
98 | spi-max-frequency = <10000>; | ||
99 | |||
100 | controller-data { | ||
101 | cs-gpio = <&gpa2 5 1 0 3>; | ||
102 | samsung,spi-feedback-delay = <0>; | ||
103 | }; | ||
104 | |||
105 | partition@0 { | ||
106 | label = "U-Boot"; | ||
107 | reg = <0x0 0x40000>; | ||
108 | read-only; | ||
109 | }; | ||
110 | |||
111 | partition@40000 { | ||
112 | label = "Kernel"; | ||
113 | reg = <0x40000 0xc0000>; | ||
114 | }; | ||
115 | }; | ||
116 | }; | ||
diff --git a/Documentation/devicetree/bindings/thermal/spear-thermal.txt b/Documentation/devicetree/bindings/thermal/spear-thermal.txt new file mode 100644 index 000000000000..93e3b67c102d --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/spear-thermal.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | * SPEAr Thermal | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "st,thermal-spear1340" | ||
5 | - reg : Address range of the thermal registers | ||
6 | - st,thermal-flags: flags used to enable thermal sensor | ||
7 | |||
8 | Example: | ||
9 | |||
10 | thermal@fc000000 { | ||
11 | compatible = "st,thermal-spear1340"; | ||
12 | reg = <0xfc000000 0x1000>; | ||
13 | st,thermal-flags = <0x7000>; | ||
14 | }; | ||
diff --git a/Documentation/devicetree/bindings/tty/serial/fsl-mxs-auart.txt b/Documentation/devicetree/bindings/tty/serial/fsl-mxs-auart.txt new file mode 100644 index 000000000000..2ee903fad25c --- /dev/null +++ b/Documentation/devicetree/bindings/tty/serial/fsl-mxs-auart.txt | |||
@@ -0,0 +1,27 @@ | |||
1 | * Freescale MXS Application UART (AUART) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should be "fsl,<soc>-auart". The supported SoCs include | ||
5 | imx23 and imx28. | ||
6 | - reg : Address and length of the register set for the device | ||
7 | - interrupts : Should contain the auart interrupt numbers | ||
8 | |||
9 | Example: | ||
10 | auart0: serial@8006a000 { | ||
11 | compatible = "fsl,imx28-auart", "fsl,imx23-auart"; | ||
12 | reg = <0x8006a000 0x2000>; | ||
13 | interrupts = <112 70 71>; | ||
14 | }; | ||
15 | |||
16 | Note: Each auart port should have an alias correctly numbered in "aliases" | ||
17 | node. | ||
18 | |||
19 | Example: | ||
20 | |||
21 | aliases { | ||
22 | serial0 = &auart0; | ||
23 | serial1 = &auart1; | ||
24 | serial2 = &auart2; | ||
25 | serial3 = &auart3; | ||
26 | serial4 = &auart4; | ||
27 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt b/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt new file mode 100644 index 000000000000..2c290418bb2d --- /dev/null +++ b/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt | |||
@@ -0,0 +1,18 @@ | |||
1 | * Freescale i.MX ci13xxx usb controllers | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "fsl,imx27-usb" | ||
5 | - reg: Should contain registers location and length | ||
6 | - interrupts: Should contain controller interrupt | ||
7 | |||
8 | Optional properties: | ||
9 | - fsl,usbphy: phandler of usb phy that connects to the only one port | ||
10 | - vbus-supply: regulator for vbus | ||
11 | |||
12 | Examples: | ||
13 | usb@02184000 { /* USB OTG */ | ||
14 | compatible = "fsl,imx6q-usb", "fsl,imx27-usb"; | ||
15 | reg = <0x02184000 0x200>; | ||
16 | interrupts = <0 43 0x04>; | ||
17 | fsl,usbphy = <&usbphy1>; | ||
18 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/mxs-phy.txt b/Documentation/devicetree/bindings/usb/mxs-phy.txt new file mode 100644 index 000000000000..5835b27146ea --- /dev/null +++ b/Documentation/devicetree/bindings/usb/mxs-phy.txt | |||
@@ -0,0 +1,13 @@ | |||
1 | * Freescale MXS USB Phy Device | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "fsl,imx23-usbphy" | ||
5 | - reg: Should contain registers location and length | ||
6 | - interrupts: Should contain phy interrupt | ||
7 | |||
8 | Example: | ||
9 | usbphy1: usbphy@020c9000 { | ||
10 | compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; | ||
11 | reg = <0x020c9000 0x1000>; | ||
12 | interrupts = <0 44 0x04>; | ||
13 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/tegra-usb.txt b/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt index e9b005dc7625..e9b005dc7625 100644 --- a/Documentation/devicetree/bindings/usb/tegra-usb.txt +++ b/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt | |||
diff --git a/Documentation/devicetree/bindings/video/backlight/pwm-backlight.txt b/Documentation/devicetree/bindings/video/backlight/pwm-backlight.txt new file mode 100644 index 000000000000..1e4fc727f3b1 --- /dev/null +++ b/Documentation/devicetree/bindings/video/backlight/pwm-backlight.txt | |||
@@ -0,0 +1,28 @@ | |||
1 | pwm-backlight bindings | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "pwm-backlight" | ||
5 | - pwms: OF device-tree PWM specification (see PWM binding[0]) | ||
6 | - brightness-levels: Array of distinct brightness levels. Typically these | ||
7 | are in the range from 0 to 255, but any range starting at 0 will do. | ||
8 | The actual brightness level (PWM duty cycle) will be interpolated | ||
9 | from these values. 0 means a 0% duty cycle (darkest/off), while the | ||
10 | last value in the array represents a 100% duty cycle (brightest). | ||
11 | - default-brightness-level: the default brightness level (index into the | ||
12 | array defined by the "brightness-levels" property) | ||
13 | |||
14 | Optional properties: | ||
15 | - pwm-names: a list of names for the PWM devices specified in the | ||
16 | "pwms" property (see PWM binding[0]) | ||
17 | |||
18 | [0]: Documentation/devicetree/bindings/pwm/pwm.txt | ||
19 | |||
20 | Example: | ||
21 | |||
22 | backlight { | ||
23 | compatible = "pwm-backlight"; | ||
24 | pwms = <&pwm 0 5000000>; | ||
25 | |||
26 | brightness-levels = <0 4 8 16 32 64 128 255>; | ||
27 | default-brightness-level = <6>; | ||
28 | }; | ||
diff --git a/Documentation/devicetree/bindings/watchdog/marvel.txt b/Documentation/devicetree/bindings/watchdog/marvel.txt new file mode 100644 index 000000000000..0b2503ab0a05 --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/marvel.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | * Marvell Orion Watchdog Time | ||
2 | |||
3 | Required Properties: | ||
4 | |||
5 | - Compatibility : "marvell,orion-wdt" | ||
6 | - reg : Address of the timer registers | ||
7 | |||
8 | Example: | ||
9 | |||
10 | wdt@20300 { | ||
11 | compatible = "marvell,orion-wdt"; | ||
12 | reg = <0x20300 0x28>; | ||
13 | status = "okay"; | ||
14 | }; | ||
diff --git a/Documentation/devicetree/bindings/watchdog/omap-wdt.txt b/Documentation/devicetree/bindings/watchdog/omap-wdt.txt new file mode 100644 index 000000000000..c227970671ea --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/omap-wdt.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | TI Watchdog Timer (WDT) Controller for OMAP | ||
2 | |||
3 | Required properties: | ||
4 | compatible: | ||
5 | - "ti,omap3-wdt" for OMAP3 | ||
6 | - "ti,omap4-wdt" for OMAP4 | ||
7 | - ti,hwmods: Name of the hwmod associated to the WDT | ||
8 | |||
9 | Examples: | ||
10 | |||
11 | wdt2: wdt@4a314000 { | ||
12 | compatible = "ti,omap4-wdt", "ti,omap3-wdt"; | ||
13 | ti,hwmods = "wd_timer2"; | ||
14 | }; | ||
diff --git a/Documentation/devicetree/usage-model.txt b/Documentation/devicetree/usage-model.txt index c5a80099b71c..dca90fe22a90 100644 --- a/Documentation/devicetree/usage-model.txt +++ b/Documentation/devicetree/usage-model.txt | |||
@@ -312,7 +312,7 @@ device tree for the NVIDIA Tegra board. | |||
312 | }; | 312 | }; |
313 | }; | 313 | }; |
314 | 314 | ||
315 | At .machine_init() time, Tegra board support code will need to look at | 315 | At .init_machine() time, Tegra board support code will need to look at |
316 | this DT and decide which nodes to create platform_devices for. | 316 | this DT and decide which nodes to create platform_devices for. |
317 | However, looking at the tree, it is not immediately obvious what kind | 317 | However, looking at the tree, it is not immediately obvious what kind |
318 | of device each node represents, or even if a node represents a device | 318 | of device each node represents, or even if a node represents a device |
diff --git a/Documentation/dontdiff b/Documentation/dontdiff index b4a898f43c37..39462cf35cd4 100644 --- a/Documentation/dontdiff +++ b/Documentation/dontdiff | |||
@@ -150,7 +150,6 @@ keywords.c | |||
150 | ksym.c* | 150 | ksym.c* |
151 | ksym.h* | 151 | ksym.h* |
152 | kxgettext | 152 | kxgettext |
153 | lkc_defs.h | ||
154 | lex.c | 153 | lex.c |
155 | lex.*.c | 154 | lex.*.c |
156 | linux | 155 | linux |
diff --git a/Documentation/dvb/get_dvb_firmware b/Documentation/dvb/get_dvb_firmware index fbb241174486..12d3952e83d5 100755 --- a/Documentation/dvb/get_dvb_firmware +++ b/Documentation/dvb/get_dvb_firmware | |||
@@ -29,7 +29,7 @@ use IO::Handle; | |||
29 | "af9015", "ngene", "az6027", "lme2510_lg", "lme2510c_s7395", | 29 | "af9015", "ngene", "az6027", "lme2510_lg", "lme2510c_s7395", |
30 | "lme2510c_s7395_old", "drxk", "drxk_terratec_h5", | 30 | "lme2510c_s7395_old", "drxk", "drxk_terratec_h5", |
31 | "drxk_hauppauge_hvr930c", "tda10071", "it9135", "it9137", | 31 | "drxk_hauppauge_hvr930c", "tda10071", "it9135", "it9137", |
32 | "drxk_pctv"); | 32 | "drxk_pctv", "drxk_terratec_htc_stick", "sms1xxx_hcw"); |
33 | 33 | ||
34 | # Check args | 34 | # Check args |
35 | syntax() if (scalar(@ARGV) != 1); | 35 | syntax() if (scalar(@ARGV) != 1); |
@@ -676,6 +676,24 @@ sub drxk_terratec_h5 { | |||
676 | "$fwfile" | 676 | "$fwfile" |
677 | } | 677 | } |
678 | 678 | ||
679 | sub drxk_terratec_htc_stick { | ||
680 | my $url = "http://ftp.terratec.de/Receiver/Cinergy_HTC_Stick/Updates/"; | ||
681 | my $zipfile = "Cinergy_HTC_Stick_Drv_5.09.1202.00_XP_Vista_7.exe"; | ||
682 | my $hash = "6722a2442a05423b781721fbc069ed5e"; | ||
683 | my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 0); | ||
684 | my $drvfile = "Cinergy HTC Stick/BDA Driver 5.09.1202.00/Windows 32 Bit/emOEM.sys"; | ||
685 | my $fwfile = "dvb-usb-terratec-htc-stick-drxk.fw"; | ||
686 | |||
687 | checkstandard(); | ||
688 | |||
689 | wgetfile($zipfile, $url . $zipfile); | ||
690 | verify($zipfile, $hash); | ||
691 | unzip($zipfile, $tmpdir); | ||
692 | extract("$tmpdir/$drvfile", 0x4e5c0, 42692, "$fwfile"); | ||
693 | |||
694 | "$fwfile" | ||
695 | } | ||
696 | |||
679 | sub it9135 { | 697 | sub it9135 { |
680 | my $sourcefile = "dvb-usb-it9135.zip"; | 698 | my $sourcefile = "dvb-usb-it9135.zip"; |
681 | my $url = "http://www.ite.com.tw/uploads/firmware/v3.6.0.0/$sourcefile"; | 699 | my $url = "http://www.ite.com.tw/uploads/firmware/v3.6.0.0/$sourcefile"; |
@@ -748,6 +766,28 @@ sub drxk_pctv { | |||
748 | "$fwfile"; | 766 | "$fwfile"; |
749 | } | 767 | } |
750 | 768 | ||
769 | sub sms1xxx_hcw { | ||
770 | my $url = "http://steventoth.net/linux/sms1xxx/"; | ||
771 | my %files = ( | ||
772 | 'sms1xxx-hcw-55xxx-dvbt-01.fw' => "afb6f9fb9a71d64392e8564ef9577e5a", | ||
773 | 'sms1xxx-hcw-55xxx-dvbt-02.fw' => "b44807098ba26e52cbedeadc052ba58f", | ||
774 | 'sms1xxx-hcw-55xxx-isdbt-02.fw' => "dae934eeea85225acbd63ce6cfe1c9e4", | ||
775 | ); | ||
776 | |||
777 | checkstandard(); | ||
778 | |||
779 | my $allfiles; | ||
780 | foreach my $fwfile (keys %files) { | ||
781 | wgetfile($fwfile, "$url/$fwfile"); | ||
782 | verify($fwfile, $files{$fwfile}); | ||
783 | $allfiles .= " $fwfile"; | ||
784 | } | ||
785 | |||
786 | $allfiles =~ s/^\s//; | ||
787 | |||
788 | $allfiles; | ||
789 | } | ||
790 | |||
751 | # --------------------------------------------------------------- | 791 | # --------------------------------------------------------------- |
752 | # Utilities | 792 | # Utilities |
753 | 793 | ||
diff --git a/Documentation/edac.txt b/Documentation/edac.txt index 03df2b020332..56c7e936430f 100644 --- a/Documentation/edac.txt +++ b/Documentation/edac.txt | |||
@@ -232,116 +232,20 @@ EDAC control and attribute files. | |||
232 | 232 | ||
233 | 233 | ||
234 | In 'mcX' directories are EDAC control and attribute files for | 234 | In 'mcX' directories are EDAC control and attribute files for |
235 | this 'X' instance of the memory controllers: | 235 | this 'X' instance of the memory controllers. |
236 | |||
237 | |||
238 | Counter reset control file: | ||
239 | |||
240 | 'reset_counters' | ||
241 | |||
242 | This write-only control file will zero all the statistical counters | ||
243 | for UE and CE errors. Zeroing the counters will also reset the timer | ||
244 | indicating how long since the last counter zero. This is useful | ||
245 | for computing errors/time. Since the counters are always reset at | ||
246 | driver initialization time, no module/kernel parameter is available. | ||
247 | |||
248 | RUN TIME: echo "anything" >/sys/devices/system/edac/mc/mc0/counter_reset | ||
249 | |||
250 | This resets the counters on memory controller 0 | ||
251 | |||
252 | |||
253 | Seconds since last counter reset control file: | ||
254 | |||
255 | 'seconds_since_reset' | ||
256 | |||
257 | This attribute file displays how many seconds have elapsed since the | ||
258 | last counter reset. This can be used with the error counters to | ||
259 | measure error rates. | ||
260 | |||
261 | |||
262 | |||
263 | Memory Controller name attribute file: | ||
264 | |||
265 | 'mc_name' | ||
266 | |||
267 | This attribute file displays the type of memory controller | ||
268 | that is being utilized. | ||
269 | |||
270 | |||
271 | Total memory managed by this memory controller attribute file: | ||
272 | |||
273 | 'size_mb' | ||
274 | |||
275 | This attribute file displays, in count of megabytes, of memory | ||
276 | that this instance of memory controller manages. | ||
277 | |||
278 | |||
279 | Total Uncorrectable Errors count attribute file: | ||
280 | |||
281 | 'ue_count' | ||
282 | |||
283 | This attribute file displays the total count of uncorrectable | ||
284 | errors that have occurred on this memory controller. If panic_on_ue | ||
285 | is set this counter will not have a chance to increment, | ||
286 | since EDAC will panic the system. | ||
287 | |||
288 | |||
289 | Total UE count that had no information attribute fileY: | ||
290 | |||
291 | 'ue_noinfo_count' | ||
292 | |||
293 | This attribute file displays the number of UEs that have occurred | ||
294 | with no information as to which DIMM slot is having errors. | ||
295 | |||
296 | |||
297 | Total Correctable Errors count attribute file: | ||
298 | |||
299 | 'ce_count' | ||
300 | |||
301 | This attribute file displays the total count of correctable | ||
302 | errors that have occurred on this memory controller. This | ||
303 | count is very important to examine. CEs provide early | ||
304 | indications that a DIMM is beginning to fail. This count | ||
305 | field should be monitored for non-zero values and report | ||
306 | such information to the system administrator. | ||
307 | |||
308 | |||
309 | Total Correctable Errors count attribute file: | ||
310 | |||
311 | 'ce_noinfo_count' | ||
312 | |||
313 | This attribute file displays the number of CEs that | ||
314 | have occurred wherewith no information as to which DIMM slot | ||
315 | is having errors. Memory is handicapped, but operational, | ||
316 | yet no information is available to indicate which slot | ||
317 | the failing memory is in. This count field should be also | ||
318 | be monitored for non-zero values. | ||
319 | |||
320 | Device Symlink: | ||
321 | |||
322 | 'device' | ||
323 | |||
324 | Symlink to the memory controller device. | ||
325 | |||
326 | Sdram memory scrubbing rate: | ||
327 | |||
328 | 'sdram_scrub_rate' | ||
329 | |||
330 | Read/Write attribute file that controls memory scrubbing. The scrubbing | ||
331 | rate is set by writing a minimum bandwidth in bytes/sec to the attribute | ||
332 | file. The rate will be translated to an internal value that gives at | ||
333 | least the specified rate. | ||
334 | |||
335 | Reading the file will return the actual scrubbing rate employed. | ||
336 | |||
337 | If configuration fails or memory scrubbing is not implemented, accessing | ||
338 | that attribute will fail. | ||
339 | 236 | ||
237 | For a description of the sysfs API, please see: | ||
238 | Documentation/ABI/testing/sysfs/devices-edac | ||
340 | 239 | ||
341 | 240 | ||
342 | ============================================================================ | 241 | ============================================================================ |
343 | 'csrowX' DIRECTORIES | 242 | 'csrowX' DIRECTORIES |
344 | 243 | ||
244 | When CONFIG_EDAC_LEGACY_SYSFS is enabled, the sysfs will contain the | ||
245 | csrowX directories. As this API doesn't work properly for Rambus, FB-DIMMs | ||
246 | and modern Intel Memory Controllers, this is being deprecated in favor | ||
247 | of dimmX directories. | ||
248 | |||
345 | In the 'csrowX' directories are EDAC control and attribute files for | 249 | In the 'csrowX' directories are EDAC control and attribute files for |
346 | this 'X' instance of csrow: | 250 | this 'X' instance of csrow: |
347 | 251 | ||
diff --git a/Documentation/fault-injection/fault-injection.txt b/Documentation/fault-injection/fault-injection.txt index ba4be8b77093..4cf1a2a6bd72 100644 --- a/Documentation/fault-injection/fault-injection.txt +++ b/Documentation/fault-injection/fault-injection.txt | |||
@@ -240,3 +240,30 @@ trap "echo 0 > /sys/kernel/debug/$FAILTYPE/probability" SIGINT SIGTERM EXIT | |||
240 | echo "Injecting errors into the module $module... (interrupt to stop)" | 240 | echo "Injecting errors into the module $module... (interrupt to stop)" |
241 | sleep 1000000 | 241 | sleep 1000000 |
242 | 242 | ||
243 | Tool to run command with failslab or fail_page_alloc | ||
244 | ---------------------------------------------------- | ||
245 | In order to make it easier to accomplish the tasks mentioned above, we can use | ||
246 | tools/testing/fault-injection/failcmd.sh. Please run a command | ||
247 | "./tools/testing/fault-injection/failcmd.sh --help" for more information and | ||
248 | see the following examples. | ||
249 | |||
250 | Examples: | ||
251 | |||
252 | Run a command "make -C tools/testing/selftests/ run_tests" with injecting slab | ||
253 | allocation failure. | ||
254 | |||
255 | # ./tools/testing/fault-injection/failcmd.sh \ | ||
256 | -- make -C tools/testing/selftests/ run_tests | ||
257 | |||
258 | Same as above except to specify 100 times failures at most instead of one time | ||
259 | at most by default. | ||
260 | |||
261 | # ./tools/testing/fault-injection/failcmd.sh --times=100 \ | ||
262 | -- make -C tools/testing/selftests/ run_tests | ||
263 | |||
264 | Same as above except to inject page allocation failure instead of slab | ||
265 | allocation failure. | ||
266 | |||
267 | # env FAILCMD_TYPE=fail_page_alloc \ | ||
268 | ./tools/testing/fault-injection/failcmd.sh --times=100 \ | ||
269 | -- make -C tools/testing/selftests/ run_tests | ||
diff --git a/Documentation/fault-injection/notifier-error-inject.txt b/Documentation/fault-injection/notifier-error-inject.txt new file mode 100644 index 000000000000..c83526c364e5 --- /dev/null +++ b/Documentation/fault-injection/notifier-error-inject.txt | |||
@@ -0,0 +1,99 @@ | |||
1 | Notifier error injection | ||
2 | ======================== | ||
3 | |||
4 | Notifier error injection provides the ability to inject artifical errors to | ||
5 | specified notifier chain callbacks. It is useful to test the error handling of | ||
6 | notifier call chain failures which is rarely executed. There are kernel | ||
7 | modules that can be used to test the following notifiers. | ||
8 | |||
9 | * CPU notifier | ||
10 | * PM notifier | ||
11 | * Memory hotplug notifier | ||
12 | * powerpc pSeries reconfig notifier | ||
13 | |||
14 | CPU notifier error injection module | ||
15 | ----------------------------------- | ||
16 | This feature can be used to test the error handling of the CPU notifiers by | ||
17 | injecting artifical errors to CPU notifier chain callbacks. | ||
18 | |||
19 | If the notifier call chain should be failed with some events notified, write | ||
20 | the error code to debugfs interface | ||
21 | /sys/kernel/debug/notifier-error-inject/cpu/actions/<notifier event>/error | ||
22 | |||
23 | Possible CPU notifier events to be failed are: | ||
24 | |||
25 | * CPU_UP_PREPARE | ||
26 | * CPU_UP_PREPARE_FROZEN | ||
27 | * CPU_DOWN_PREPARE | ||
28 | * CPU_DOWN_PREPARE_FROZEN | ||
29 | |||
30 | Example1: Inject CPU offline error (-1 == -EPERM) | ||
31 | |||
32 | # cd /sys/kernel/debug/notifier-error-inject/cpu | ||
33 | # echo -1 > actions/CPU_DOWN_PREPARE/error | ||
34 | # echo 0 > /sys/devices/system/cpu/cpu1/online | ||
35 | bash: echo: write error: Operation not permitted | ||
36 | |||
37 | Example2: inject CPU online error (-2 == -ENOENT) | ||
38 | |||
39 | # echo -2 > actions/CPU_UP_PREPARE/error | ||
40 | # echo 1 > /sys/devices/system/cpu/cpu1/online | ||
41 | bash: echo: write error: No such file or directory | ||
42 | |||
43 | PM notifier error injection module | ||
44 | ---------------------------------- | ||
45 | This feature is controlled through debugfs interface | ||
46 | /sys/kernel/debug/notifier-error-inject/pm/actions/<notifier event>/error | ||
47 | |||
48 | Possible PM notifier events to be failed are: | ||
49 | |||
50 | * PM_HIBERNATION_PREPARE | ||
51 | * PM_SUSPEND_PREPARE | ||
52 | * PM_RESTORE_PREPARE | ||
53 | |||
54 | Example: Inject PM suspend error (-12 = -ENOMEM) | ||
55 | |||
56 | # cd /sys/kernel/debug/notifier-error-inject/pm/ | ||
57 | # echo -12 > actions/PM_SUSPEND_PREPARE/error | ||
58 | # echo mem > /sys/power/state | ||
59 | bash: echo: write error: Cannot allocate memory | ||
60 | |||
61 | Memory hotplug notifier error injection module | ||
62 | ---------------------------------------------- | ||
63 | This feature is controlled through debugfs interface | ||
64 | /sys/kernel/debug/notifier-error-inject/memory/actions/<notifier event>/error | ||
65 | |||
66 | Possible memory notifier events to be failed are: | ||
67 | |||
68 | * MEM_GOING_ONLINE | ||
69 | * MEM_GOING_OFFLINE | ||
70 | |||
71 | Example: Inject memory hotplug offline error (-12 == -ENOMEM) | ||
72 | |||
73 | # cd /sys/kernel/debug/notifier-error-inject/memory | ||
74 | # echo -12 > actions/MEM_GOING_OFFLINE/error | ||
75 | # echo offline > /sys/devices/system/memory/memoryXXX/state | ||
76 | bash: echo: write error: Cannot allocate memory | ||
77 | |||
78 | powerpc pSeries reconfig notifier error injection module | ||
79 | -------------------------------------------------------- | ||
80 | This feature is controlled through debugfs interface | ||
81 | /sys/kernel/debug/notifier-error-inject/pSeries-reconfig/actions/<notifier event>/error | ||
82 | |||
83 | Possible pSeries reconfig notifier events to be failed are: | ||
84 | |||
85 | * PSERIES_RECONFIG_ADD | ||
86 | * PSERIES_RECONFIG_REMOVE | ||
87 | * PSERIES_DRCONF_MEM_ADD | ||
88 | * PSERIES_DRCONF_MEM_REMOVE | ||
89 | |||
90 | For more usage examples | ||
91 | ----------------------- | ||
92 | There are tools/testing/selftests using the notifier error injection features | ||
93 | for CPU and memory notifiers. | ||
94 | |||
95 | * tools/testing/selftests/cpu-hotplug/on-off-test.sh | ||
96 | * tools/testing/selftests/memory-hotplug/on-off-test.sh | ||
97 | |||
98 | These scripts first do simple online and offline tests and then do fault | ||
99 | injection tests if notifier error injection module is available. | ||
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 56000b33340b..afaff312bf41 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -13,6 +13,14 @@ Who: Jim Cromie <jim.cromie@gmail.com>, Jason Baron <jbaron@redhat.com> | |||
13 | 13 | ||
14 | --------------------------- | 14 | --------------------------- |
15 | 15 | ||
16 | What: /proc/sys/vm/nr_pdflush_threads | ||
17 | When: 2012 | ||
18 | Why: Since pdflush is deprecated, the interface exported in /proc/sys/vm/ | ||
19 | should be removed. | ||
20 | Who: Wanpeng Li <liwp@linux.vnet.ibm.com> | ||
21 | |||
22 | --------------------------- | ||
23 | |||
16 | What: CONFIG_APM_CPU_IDLE, and its ability to call APM BIOS in idle | 24 | What: CONFIG_APM_CPU_IDLE, and its ability to call APM BIOS in idle |
17 | When: 2012 | 25 | When: 2012 |
18 | Why: This optional sub-feature of APM is of dubious reliability, | 26 | Why: This optional sub-feature of APM is of dubious reliability, |
@@ -70,20 +78,6 @@ Who: Luis R. Rodriguez <lrodriguez@atheros.com> | |||
70 | 78 | ||
71 | --------------------------- | 79 | --------------------------- |
72 | 80 | ||
73 | What: IRQF_SAMPLE_RANDOM | ||
74 | Check: IRQF_SAMPLE_RANDOM | ||
75 | When: July 2009 | ||
76 | |||
77 | Why: Many of IRQF_SAMPLE_RANDOM users are technically bogus as entropy | ||
78 | sources in the kernel's current entropy model. To resolve this, every | ||
79 | input point to the kernel's entropy pool needs to better document the | ||
80 | type of entropy source it actually is. This will be replaced with | ||
81 | additional add_*_randomness functions in drivers/char/random.c | ||
82 | |||
83 | Who: Robin Getz <rgetz@blackfin.uclinux.org> & Matt Mackall <mpm@selenic.com> | ||
84 | |||
85 | --------------------------- | ||
86 | |||
87 | What: The ieee80211_regdom module parameter | 81 | What: The ieee80211_regdom module parameter |
88 | When: March 2010 / desktop catchup | 82 | When: March 2010 / desktop catchup |
89 | 83 | ||
@@ -249,15 +243,6 @@ Who: Ravikiran Thirumalai <kiran@scalex86.org> | |||
249 | 243 | ||
250 | --------------------------- | 244 | --------------------------- |
251 | 245 | ||
252 | What: Code that is now under CONFIG_WIRELESS_EXT_SYSFS | ||
253 | (in net/core/net-sysfs.c) | ||
254 | When: 3.5 | ||
255 | Why: Over 1K .text/.data size reduction, data is available in other | ||
256 | ways (ioctls) | ||
257 | Who: Johannes Berg <johannes@sipsolutions.net> | ||
258 | |||
259 | --------------------------- | ||
260 | |||
261 | What: sysfs ui for changing p4-clockmod parameters | 246 | What: sysfs ui for changing p4-clockmod parameters |
262 | When: September 2009 | 247 | When: September 2009 |
263 | Why: See commits 129f8ae9b1b5be94517da76009ea956e89104ce8 and | 248 | Why: See commits 129f8ae9b1b5be94517da76009ea956e89104ce8 and |
@@ -414,21 +399,6 @@ Who: Jean Delvare <khali@linux-fr.org> | |||
414 | 399 | ||
415 | ---------------------------- | 400 | ---------------------------- |
416 | 401 | ||
417 | What: xt_connlimit rev 0 | ||
418 | When: 2012 | ||
419 | Who: Jan Engelhardt <jengelh@medozas.de> | ||
420 | Files: net/netfilter/xt_connlimit.c | ||
421 | |||
422 | ---------------------------- | ||
423 | |||
424 | What: ipt_addrtype match include file | ||
425 | When: 2012 | ||
426 | Why: superseded by xt_addrtype | ||
427 | Who: Florian Westphal <fw@strlen.de> | ||
428 | Files: include/linux/netfilter_ipv4/ipt_addrtype.h | ||
429 | |||
430 | ---------------------------- | ||
431 | |||
432 | What: i2c_driver.attach_adapter | 402 | What: i2c_driver.attach_adapter |
433 | i2c_driver.detach_adapter | 403 | i2c_driver.detach_adapter |
434 | When: September 2011 | 404 | When: September 2011 |
@@ -449,6 +419,19 @@ Who: Hans Verkuil <hans.verkuil@cisco.com> | |||
449 | 419 | ||
450 | ---------------------------- | 420 | ---------------------------- |
451 | 421 | ||
422 | What: CONFIG_CFG80211_WEXT | ||
423 | When: as soon as distributions ship new wireless tools, ie. wpa_supplicant 1.0 | ||
424 | and NetworkManager/connman/etc. that are able to use nl80211 | ||
425 | Why: Wireless extensions are deprecated, and userland tools are moving to | ||
426 | using nl80211. New drivers are no longer using wireless extensions, | ||
427 | and while there might still be old drivers, both new drivers and new | ||
428 | userland no longer needs them and they can't be used for an feature | ||
429 | developed in the past couple of years. As such, compatibility with | ||
430 | wireless extensions in new drivers will be removed. | ||
431 | Who: Johannes Berg <johannes@sipsolutions.net> | ||
432 | |||
433 | ---------------------------- | ||
434 | |||
452 | What: g_file_storage driver | 435 | What: g_file_storage driver |
453 | When: 3.8 | 436 | When: 3.8 |
454 | Why: This driver has been superseded by g_mass_storage. | 437 | Why: This driver has been superseded by g_mass_storage. |
@@ -523,14 +506,6 @@ Who: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> | |||
523 | 506 | ||
524 | ---------------------------- | 507 | ---------------------------- |
525 | 508 | ||
526 | What: kmap_atomic(page, km_type) | ||
527 | When: 3.5 | ||
528 | Why: The old kmap_atomic() with two arguments is deprecated, we only | ||
529 | keep it for backward compatibility for few cycles and then drop it. | ||
530 | Who: Cong Wang <amwang@redhat.com> | ||
531 | |||
532 | ---------------------------- | ||
533 | |||
534 | What: get_robust_list syscall | 509 | What: get_robust_list syscall |
535 | When: 2013 | 510 | When: 2013 |
536 | Why: There appear to be no production users of the get_robust_list syscall, | 511 | Why: There appear to be no production users of the get_robust_list syscall, |
@@ -589,6 +564,13 @@ Why: Remount currently allows changing bound subsystems and | |||
589 | 564 | ||
590 | ---------------------------- | 565 | ---------------------------- |
591 | 566 | ||
567 | What: xt_recent rev 0 | ||
568 | When: 2013 | ||
569 | Who: Pablo Neira Ayuso <pablo@netfilter.org> | ||
570 | Files: net/netfilter/xt_recent.c | ||
571 | |||
572 | ---------------------------- | ||
573 | |||
592 | What: KVM debugfs statistics | 574 | What: KVM debugfs statistics |
593 | When: 2013 | 575 | When: 2013 |
594 | Why: KVM tracepoints provide mostly equivalent information in a much more | 576 | Why: KVM tracepoints provide mostly equivalent information in a much more |
@@ -612,3 +594,46 @@ When: June 2013 | |||
612 | Why: Unsupported/unmaintained/unused since 2.6 | 594 | Why: Unsupported/unmaintained/unused since 2.6 |
613 | 595 | ||
614 | ---------------------------- | 596 | ---------------------------- |
597 | |||
598 | What: V4L2 selections API target rectangle and flags unification, the | ||
599 | following definitions will be removed: V4L2_SEL_TGT_CROP_ACTIVE, | ||
600 | V4L2_SEL_TGT_COMPOSE_ACTIVE, V4L2_SUBDEV_SEL_*, V4L2_SUBDEV_SEL_FLAG_* | ||
601 | in favor of common V4L2_SEL_TGT_* and V4L2_SEL_FLAG_* definitions. | ||
602 | For more details see include/linux/v4l2-common.h. | ||
603 | When: 3.8 | ||
604 | Why: The regular V4L2 selections and the subdev selection API originally | ||
605 | defined distinct names for the target rectangles and flags - V4L2_SEL_* | ||
606 | and V4L2_SUBDEV_SEL_*. Although, it turned out that the meaning of these | ||
607 | target rectangles is virtually identical and the APIs were consolidated | ||
608 | to use single set of names - V4L2_SEL_*. This didn't involve any ABI | ||
609 | changes. Alias definitions were created for the original ones to avoid | ||
610 | any instabilities in the user space interface. After few cycles these | ||
611 | backward compatibility definitions will be removed. | ||
612 | Who: Sylwester Nawrocki <sylvester.nawrocki@gmail.com> | ||
613 | |||
614 | ---------------------------- | ||
615 | |||
616 | What: Using V4L2_CAP_VIDEO_CAPTURE and V4L2_CAP_VIDEO_OUTPUT flags | ||
617 | to indicate a V4L2 memory-to-memory device capability | ||
618 | When: 3.8 | ||
619 | Why: New drivers should use new V4L2_CAP_VIDEO_M2M capability flag | ||
620 | to indicate a V4L2 video memory-to-memory (M2M) device and | ||
621 | applications can now identify a M2M video device by checking | ||
622 | for V4L2_CAP_VIDEO_M2M, with VIDIOC_QUERYCAP ioctl. Using ORed | ||
623 | V4L2_CAP_VIDEO_CAPTURE and V4L2_CAP_VIDEO_OUTPUT flags for M2M | ||
624 | devices is ambiguous and may lead, for example, to identifying | ||
625 | a M2M device as a video capture or output device. | ||
626 | Who: Sylwester Nawrocki <s.nawrocki@samsung.com> | ||
627 | |||
628 | ---------------------------- | ||
629 | |||
630 | What: OMAP private DMA implementation | ||
631 | When: 2013 | ||
632 | Why: We have a DMA engine implementation; all users should be updated | ||
633 | to use this rather than persisting with the old APIs. The old APIs | ||
634 | block merging the old DMA engine implementation into the DMA | ||
635 | engine driver. | ||
636 | Who: Russell King <linux@arm.linux.org.uk>, | ||
637 | Santosh Shilimkar <santosh.shilimkar@ti.com> | ||
638 | |||
639 | ---------------------------- | ||
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 8e2da1e06e3b..0f103e39b4f6 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -9,7 +9,7 @@ be able to use diff(1). | |||
9 | 9 | ||
10 | --------------------------- dentry_operations -------------------------- | 10 | --------------------------- dentry_operations -------------------------- |
11 | prototypes: | 11 | prototypes: |
12 | int (*d_revalidate)(struct dentry *, struct nameidata *); | 12 | int (*d_revalidate)(struct dentry *, unsigned int); |
13 | int (*d_hash)(const struct dentry *, const struct inode *, | 13 | int (*d_hash)(const struct dentry *, const struct inode *, |
14 | struct qstr *); | 14 | struct qstr *); |
15 | int (*d_compare)(const struct dentry *, const struct inode *, | 15 | int (*d_compare)(const struct dentry *, const struct inode *, |
@@ -37,9 +37,8 @@ d_manage: no no yes (ref-walk) maybe | |||
37 | 37 | ||
38 | --------------------------- inode_operations --------------------------- | 38 | --------------------------- inode_operations --------------------------- |
39 | prototypes: | 39 | prototypes: |
40 | int (*create) (struct inode *,struct dentry *,umode_t, struct nameidata *); | 40 | int (*create) (struct inode *,struct dentry *,umode_t, bool); |
41 | struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameid | 41 | struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int); |
42 | ata *); | ||
43 | int (*link) (struct dentry *,struct inode *,struct dentry *); | 42 | int (*link) (struct dentry *,struct inode *,struct dentry *); |
44 | int (*unlink) (struct inode *,struct dentry *); | 43 | int (*unlink) (struct inode *,struct dentry *); |
45 | int (*symlink) (struct inode *,struct dentry *,const char *); | 44 | int (*symlink) (struct inode *,struct dentry *,const char *); |
@@ -62,6 +61,9 @@ ata *); | |||
62 | int (*removexattr) (struct dentry *, const char *); | 61 | int (*removexattr) (struct dentry *, const char *); |
63 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len); | 62 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len); |
64 | void (*update_time)(struct inode *, struct timespec *, int); | 63 | void (*update_time)(struct inode *, struct timespec *, int); |
64 | int (*atomic_open)(struct inode *, struct dentry *, | ||
65 | struct file *, unsigned open_flag, | ||
66 | umode_t create_mode, int *opened); | ||
65 | 67 | ||
66 | locking rules: | 68 | locking rules: |
67 | all may block | 69 | all may block |
@@ -89,6 +91,7 @@ listxattr: no | |||
89 | removexattr: yes | 91 | removexattr: yes |
90 | fiemap: no | 92 | fiemap: no |
91 | update_time: no | 93 | update_time: no |
94 | atomic_open: yes | ||
92 | 95 | ||
93 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on | 96 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on |
94 | victim. | 97 | victim. |
@@ -135,8 +138,8 @@ evict_inode: | |||
135 | put_super: write | 138 | put_super: write |
136 | write_super: read | 139 | write_super: read |
137 | sync_fs: read | 140 | sync_fs: read |
138 | freeze_fs: read | 141 | freeze_fs: write |
139 | unfreeze_fs: read | 142 | unfreeze_fs: write |
140 | statfs: maybe(read) (see below) | 143 | statfs: maybe(read) (see below) |
141 | remount_fs: write | 144 | remount_fs: write |
142 | umount_begin: no | 145 | umount_begin: no |
@@ -203,6 +206,8 @@ prototypes: | |||
203 | int (*launder_page)(struct page *); | 206 | int (*launder_page)(struct page *); |
204 | int (*is_partially_uptodate)(struct page *, read_descriptor_t *, unsigned long); | 207 | int (*is_partially_uptodate)(struct page *, read_descriptor_t *, unsigned long); |
205 | int (*error_remove_page)(struct address_space *, struct page *); | 208 | int (*error_remove_page)(struct address_space *, struct page *); |
209 | int (*swap_activate)(struct file *); | ||
210 | int (*swap_deactivate)(struct file *); | ||
206 | 211 | ||
207 | locking rules: | 212 | locking rules: |
208 | All except set_page_dirty and freepage may block | 213 | All except set_page_dirty and freepage may block |
@@ -226,6 +231,8 @@ migratepage: yes (both) | |||
226 | launder_page: yes | 231 | launder_page: yes |
227 | is_partially_uptodate: yes | 232 | is_partially_uptodate: yes |
228 | error_remove_page: yes | 233 | error_remove_page: yes |
234 | swap_activate: no | ||
235 | swap_deactivate: no | ||
229 | 236 | ||
230 | ->write_begin(), ->write_end(), ->sync_page() and ->readpage() | 237 | ->write_begin(), ->write_end(), ->sync_page() and ->readpage() |
231 | may be called from the request handler (/dev/loop). | 238 | may be called from the request handler (/dev/loop). |
@@ -327,6 +334,15 @@ cleaned, or an error value if not. Note that in order to prevent the page | |||
327 | getting mapped back in and redirtied, it needs to be kept locked | 334 | getting mapped back in and redirtied, it needs to be kept locked |
328 | across the entire operation. | 335 | across the entire operation. |
329 | 336 | ||
337 | ->swap_activate will be called with a non-zero argument on | ||
338 | files backing (non block device backed) swapfiles. A return value | ||
339 | of zero indicates success, in which case this file can be used for | ||
340 | backing swapspace. The swapspace operations will be proxied to the | ||
341 | address space operations. | ||
342 | |||
343 | ->swap_deactivate() will be called in the sys_swapoff() | ||
344 | path after ->swap_activate() returned success. | ||
345 | |||
330 | ----------------------- file_lock_operations ------------------------------ | 346 | ----------------------- file_lock_operations ------------------------------ |
331 | prototypes: | 347 | prototypes: |
332 | void (*fl_copy_lock)(struct file_lock *, struct file_lock *); | 348 | void (*fl_copy_lock)(struct file_lock *, struct file_lock *); |
@@ -343,7 +359,6 @@ prototypes: | |||
343 | int (*lm_compare_owner)(struct file_lock *, struct file_lock *); | 359 | int (*lm_compare_owner)(struct file_lock *, struct file_lock *); |
344 | void (*lm_notify)(struct file_lock *); /* unblock callback */ | 360 | void (*lm_notify)(struct file_lock *); /* unblock callback */ |
345 | int (*lm_grant)(struct file_lock *, struct file_lock *, int); | 361 | int (*lm_grant)(struct file_lock *, struct file_lock *, int); |
346 | void (*lm_release_private)(struct file_lock *); | ||
347 | void (*lm_break)(struct file_lock *); /* break_lease callback */ | 362 | void (*lm_break)(struct file_lock *); /* break_lease callback */ |
348 | int (*lm_change)(struct file_lock **, int); | 363 | int (*lm_change)(struct file_lock **, int); |
349 | 364 | ||
@@ -352,7 +367,6 @@ locking rules: | |||
352 | lm_compare_owner: yes no | 367 | lm_compare_owner: yes no |
353 | lm_notify: yes no | 368 | lm_notify: yes no |
354 | lm_grant: no no | 369 | lm_grant: no no |
355 | lm_release_private: maybe no | ||
356 | lm_break: yes no | 370 | lm_break: yes no |
357 | lm_change yes no | 371 | lm_change yes no |
358 | 372 | ||
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index 8c91d1057d9a..2bef2b3843d1 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting | |||
@@ -355,12 +355,10 @@ protects *all* the dcache state of a given dentry. | |||
355 | via rcu-walk path walk (basically, if the file can have had a path name in the | 355 | via rcu-walk path walk (basically, if the file can have had a path name in the |
356 | vfs namespace). | 356 | vfs namespace). |
357 | 357 | ||
358 | i_dentry and i_rcu share storage in a union, and the vfs expects | 358 | Even though i_dentry and i_rcu share storage in a union, we will |
359 | i_dentry to be reinitialized before it is freed, so an: | 359 | initialize the former in inode_init_always(), so just leave it alone in |
360 | 360 | the callback. It used to be necessary to clean it there, but not anymore | |
361 | INIT_LIST_HEAD(&inode->i_dentry); | 361 | (starting at 3.2). |
362 | |||
363 | must be done in the RCU callback. | ||
364 | 362 | ||
365 | -- | 363 | -- |
366 | [recommended] | 364 | [recommended] |
@@ -433,3 +431,14 @@ release it yourself. | |||
433 | d_alloc_root() is gone, along with a lot of bugs caused by code | 431 | d_alloc_root() is gone, along with a lot of bugs caused by code |
434 | misusing it. Replacement: d_make_root(inode). The difference is, | 432 | misusing it. Replacement: d_make_root(inode). The difference is, |
435 | d_make_root() drops the reference to inode if dentry allocation fails. | 433 | d_make_root() drops the reference to inode if dentry allocation fails. |
434 | |||
435 | -- | ||
436 | [mandatory] | ||
437 | The witch is dead! Well, 2/3 of it, anyway. ->d_revalidate() and | ||
438 | ->lookup() do *not* take struct nameidata anymore; just the flags. | ||
439 | -- | ||
440 | [mandatory] | ||
441 | ->create() doesn't take struct nameidata *; unlike the previous | ||
442 | two, it gets "is it an O_EXCL or equivalent?" boolean argument. Note that | ||
443 | local filesystems can ignore tha argument - they are guaranteed that the | ||
444 | object doesn't exist. It's remote/distributed ones that might care... | ||
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index efd23f481704..065aa2dc0835 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -341,8 +341,8 @@ This describes how the VFS can manipulate an inode in your | |||
341 | filesystem. As of kernel 2.6.22, the following members are defined: | 341 | filesystem. As of kernel 2.6.22, the following members are defined: |
342 | 342 | ||
343 | struct inode_operations { | 343 | struct inode_operations { |
344 | int (*create) (struct inode *,struct dentry *, umode_t, struct nameidata *); | 344 | int (*create) (struct inode *,struct dentry *, umode_t, bool); |
345 | struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *); | 345 | struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int); |
346 | int (*link) (struct dentry *,struct inode *,struct dentry *); | 346 | int (*link) (struct dentry *,struct inode *,struct dentry *); |
347 | int (*unlink) (struct inode *,struct dentry *); | 347 | int (*unlink) (struct inode *,struct dentry *); |
348 | int (*symlink) (struct inode *,struct dentry *,const char *); | 348 | int (*symlink) (struct inode *,struct dentry *,const char *); |
@@ -364,6 +364,9 @@ struct inode_operations { | |||
364 | ssize_t (*listxattr) (struct dentry *, char *, size_t); | 364 | ssize_t (*listxattr) (struct dentry *, char *, size_t); |
365 | int (*removexattr) (struct dentry *, const char *); | 365 | int (*removexattr) (struct dentry *, const char *); |
366 | void (*update_time)(struct inode *, struct timespec *, int); | 366 | void (*update_time)(struct inode *, struct timespec *, int); |
367 | int (*atomic_open)(struct inode *, struct dentry *, | ||
368 | struct file *, unsigned open_flag, | ||
369 | umode_t create_mode, int *opened); | ||
367 | }; | 370 | }; |
368 | 371 | ||
369 | Again, all methods are called without any locks being held, unless | 372 | Again, all methods are called without any locks being held, unless |
@@ -476,6 +479,14 @@ otherwise noted. | |||
476 | an inode. If this is not defined the VFS will update the inode itself | 479 | an inode. If this is not defined the VFS will update the inode itself |
477 | and call mark_inode_dirty_sync. | 480 | and call mark_inode_dirty_sync. |
478 | 481 | ||
482 | atomic_open: called on the last component of an open. Using this optional | ||
483 | method the filesystem can look up, possibly create and open the file in | ||
484 | one atomic operation. If it cannot perform this (e.g. the file type | ||
485 | turned out to be wrong) it may signal this by returning 1 instead of | ||
486 | usual 0 or -ve . This method is only called if the last | ||
487 | component is negative or needs lookup. Cached positive dentries are | ||
488 | still handled by f_op->open(). | ||
489 | |||
479 | The Address Space Object | 490 | The Address Space Object |
480 | ======================== | 491 | ======================== |
481 | 492 | ||
@@ -581,6 +592,8 @@ struct address_space_operations { | |||
581 | int (*migratepage) (struct page *, struct page *); | 592 | int (*migratepage) (struct page *, struct page *); |
582 | int (*launder_page) (struct page *); | 593 | int (*launder_page) (struct page *); |
583 | int (*error_remove_page) (struct mapping *mapping, struct page *page); | 594 | int (*error_remove_page) (struct mapping *mapping, struct page *page); |
595 | int (*swap_activate)(struct file *); | ||
596 | int (*swap_deactivate)(struct file *); | ||
584 | }; | 597 | }; |
585 | 598 | ||
586 | writepage: called by the VM to write a dirty page to backing store. | 599 | writepage: called by the VM to write a dirty page to backing store. |
@@ -749,6 +762,16 @@ struct address_space_operations { | |||
749 | Setting this implies you deal with pages going away under you, | 762 | Setting this implies you deal with pages going away under you, |
750 | unless you have them locked or reference counts increased. | 763 | unless you have them locked or reference counts increased. |
751 | 764 | ||
765 | swap_activate: Called when swapon is used on a file to allocate | ||
766 | space if necessary and pin the block lookup information in | ||
767 | memory. A return value of zero indicates success, | ||
768 | in which case this file can be used to back swapspace. The | ||
769 | swapspace operations will be proxied to this address space's | ||
770 | ->swap_{out,in} methods. | ||
771 | |||
772 | swap_deactivate: Called during swapoff on files where swap_activate | ||
773 | was successful. | ||
774 | |||
752 | 775 | ||
753 | The File Object | 776 | The File Object |
754 | =============== | 777 | =============== |
@@ -891,7 +914,7 @@ the VFS uses a default. As of kernel 2.6.22, the following members are | |||
891 | defined: | 914 | defined: |
892 | 915 | ||
893 | struct dentry_operations { | 916 | struct dentry_operations { |
894 | int (*d_revalidate)(struct dentry *, struct nameidata *); | 917 | int (*d_revalidate)(struct dentry *, unsigned int); |
895 | int (*d_hash)(const struct dentry *, const struct inode *, | 918 | int (*d_hash)(const struct dentry *, const struct inode *, |
896 | struct qstr *); | 919 | struct qstr *); |
897 | int (*d_compare)(const struct dentry *, const struct inode *, | 920 | int (*d_compare)(const struct dentry *, const struct inode *, |
@@ -910,11 +933,11 @@ struct dentry_operations { | |||
910 | dcache. Most filesystems leave this as NULL, because all their | 933 | dcache. Most filesystems leave this as NULL, because all their |
911 | dentries in the dcache are valid | 934 | dentries in the dcache are valid |
912 | 935 | ||
913 | d_revalidate may be called in rcu-walk mode (nd->flags & LOOKUP_RCU). | 936 | d_revalidate may be called in rcu-walk mode (flags & LOOKUP_RCU). |
914 | If in rcu-walk mode, the filesystem must revalidate the dentry without | 937 | If in rcu-walk mode, the filesystem must revalidate the dentry without |
915 | blocking or storing to the dentry, d_parent and d_inode should not be | 938 | blocking or storing to the dentry, d_parent and d_inode should not be |
916 | used without care (because they can go NULL), instead nd->inode should | 939 | used without care (because they can change and, in d_inode case, even |
917 | be used. | 940 | become NULL under us). |
918 | 941 | ||
919 | If a situation is encountered that rcu-walk cannot handle, return | 942 | If a situation is encountered that rcu-walk cannot handle, return |
920 | -ECHILD and it will be called again in ref-walk mode. | 943 | -ECHILD and it will be called again in ref-walk mode. |
diff --git a/Documentation/hid/uhid.txt b/Documentation/hid/uhid.txt new file mode 100644 index 000000000000..4627c4241ece --- /dev/null +++ b/Documentation/hid/uhid.txt | |||
@@ -0,0 +1,169 @@ | |||
1 | UHID - User-space I/O driver support for HID subsystem | ||
2 | ======================================================== | ||
3 | |||
4 | The HID subsystem needs two kinds of drivers. In this document we call them: | ||
5 | |||
6 | 1. The "HID I/O Driver" is the driver that performs raw data I/O to the | ||
7 | low-level device. Internally, they register an hid_ll_driver structure with | ||
8 | the HID core. They perform device setup, read raw data from the device and | ||
9 | push it into the HID subsystem and they provide a callback so the HID | ||
10 | subsystem can send data to the device. | ||
11 | |||
12 | 2. The "HID Device Driver" is the driver that parses HID reports and reacts on | ||
13 | them. There are generic drivers like "generic-usb" and "generic-bluetooth" | ||
14 | which adhere to the HID specification and provide the standardizes features. | ||
15 | But there may be special drivers and quirks for each non-standard device out | ||
16 | there. Internally, they use the hid_driver structure. | ||
17 | |||
18 | Historically, the USB stack was the first subsystem to provide an HID I/O | ||
19 | Driver. However, other standards like Bluetooth have adopted the HID specs and | ||
20 | may provide HID I/O Drivers, too. The UHID driver allows to implement HID I/O | ||
21 | Drivers in user-space and feed the data into the kernel HID-subsystem. | ||
22 | |||
23 | This allows user-space to operate on the same level as USB-HID, Bluetooth-HID | ||
24 | and similar. It does not provide a way to write HID Device Drivers, though. Use | ||
25 | hidraw for this purpose. | ||
26 | |||
27 | There is an example user-space application in ./samples/uhid/uhid-example.c | ||
28 | |||
29 | The UHID API | ||
30 | ------------ | ||
31 | |||
32 | UHID is accessed through a character misc-device. The minor-number is allocated | ||
33 | dynamically so you need to rely on udev (or similar) to create the device node. | ||
34 | This is /dev/uhid by default. | ||
35 | |||
36 | If a new device is detected by your HID I/O Driver and you want to register this | ||
37 | device with the HID subsystem, then you need to open /dev/uhid once for each | ||
38 | device you want to register. All further communication is done by read()'ing or | ||
39 | write()'ing "struct uhid_event" objects. Non-blocking operations are supported | ||
40 | by setting O_NONBLOCK. | ||
41 | |||
42 | struct uhid_event { | ||
43 | __u32 type; | ||
44 | union { | ||
45 | struct uhid_create_req create; | ||
46 | struct uhid_data_req data; | ||
47 | ... | ||
48 | } u; | ||
49 | }; | ||
50 | |||
51 | The "type" field contains the ID of the event. Depending on the ID different | ||
52 | payloads are sent. You must not split a single event across multiple read()'s or | ||
53 | multiple write()'s. A single event must always be sent as a whole. Furthermore, | ||
54 | only a single event can be sent per read() or write(). Pending data is ignored. | ||
55 | If you want to handle multiple events in a single syscall, then use vectored | ||
56 | I/O with readv()/writev(). | ||
57 | |||
58 | The first thing you should do is sending an UHID_CREATE event. This will | ||
59 | register the device. UHID will respond with an UHID_START event. You can now | ||
60 | start sending data to and reading data from UHID. However, unless UHID sends the | ||
61 | UHID_OPEN event, the internally attached HID Device Driver has no user attached. | ||
62 | That is, you might put your device asleep unless you receive the UHID_OPEN | ||
63 | event. If you receive the UHID_OPEN event, you should start I/O. If the last | ||
64 | user closes the HID device, you will receive an UHID_CLOSE event. This may be | ||
65 | followed by an UHID_OPEN event again and so on. There is no need to perform | ||
66 | reference-counting in user-space. That is, you will never receive multiple | ||
67 | UHID_OPEN events without an UHID_CLOSE event. The HID subsystem performs | ||
68 | ref-counting for you. | ||
69 | You may decide to ignore UHID_OPEN/UHID_CLOSE, though. I/O is allowed even | ||
70 | though the device may have no users. | ||
71 | |||
72 | If you want to send data to the HID subsystem, you send an HID_INPUT event with | ||
73 | your raw data payload. If the kernel wants to send data to the device, you will | ||
74 | read an UHID_OUTPUT or UHID_OUTPUT_EV event. | ||
75 | |||
76 | If your device disconnects, you should send an UHID_DESTROY event. This will | ||
77 | unregister the device. You can now send UHID_CREATE again to register a new | ||
78 | device. | ||
79 | If you close() the fd, the device is automatically unregistered and destroyed | ||
80 | internally. | ||
81 | |||
82 | write() | ||
83 | ------- | ||
84 | write() allows you to modify the state of the device and feed input data into | ||
85 | the kernel. The following types are supported: UHID_CREATE, UHID_DESTROY and | ||
86 | UHID_INPUT. The kernel will parse the event immediately and if the event ID is | ||
87 | not supported, it will return -EOPNOTSUPP. If the payload is invalid, then | ||
88 | -EINVAL is returned, otherwise, the amount of data that was read is returned and | ||
89 | the request was handled successfully. | ||
90 | |||
91 | UHID_CREATE: | ||
92 | This creates the internal HID device. No I/O is possible until you send this | ||
93 | event to the kernel. The payload is of type struct uhid_create_req and | ||
94 | contains information about your device. You can start I/O now. | ||
95 | |||
96 | UHID_DESTROY: | ||
97 | This destroys the internal HID device. No further I/O will be accepted. There | ||
98 | may still be pending messages that you can receive with read() but no further | ||
99 | UHID_INPUT events can be sent to the kernel. | ||
100 | You can create a new device by sending UHID_CREATE again. There is no need to | ||
101 | reopen the character device. | ||
102 | |||
103 | UHID_INPUT: | ||
104 | You must send UHID_CREATE before sending input to the kernel! This event | ||
105 | contains a data-payload. This is the raw data that you read from your device. | ||
106 | The kernel will parse the HID reports and react on it. | ||
107 | |||
108 | UHID_FEATURE_ANSWER: | ||
109 | If you receive a UHID_FEATURE request you must answer with this request. You | ||
110 | must copy the "id" field from the request into the answer. Set the "err" field | ||
111 | to 0 if no error occured or to EIO if an I/O error occurred. | ||
112 | If "err" is 0 then you should fill the buffer of the answer with the results | ||
113 | of the feature request and set "size" correspondingly. | ||
114 | |||
115 | read() | ||
116 | ------ | ||
117 | read() will return a queued ouput report. These output reports can be of type | ||
118 | UHID_START, UHID_STOP, UHID_OPEN, UHID_CLOSE, UHID_OUTPUT or UHID_OUTPUT_EV. No | ||
119 | reaction is required to any of them but you should handle them according to your | ||
120 | needs. Only UHID_OUTPUT and UHID_OUTPUT_EV have payloads. | ||
121 | |||
122 | UHID_START: | ||
123 | This is sent when the HID device is started. Consider this as an answer to | ||
124 | UHID_CREATE. This is always the first event that is sent. | ||
125 | |||
126 | UHID_STOP: | ||
127 | This is sent when the HID device is stopped. Consider this as an answer to | ||
128 | UHID_DESTROY. | ||
129 | If the kernel HID device driver closes the device manually (that is, you | ||
130 | didn't send UHID_DESTROY) then you should consider this device closed and send | ||
131 | an UHID_DESTROY event. You may want to reregister your device, though. This is | ||
132 | always the last message that is sent to you unless you reopen the device with | ||
133 | UHID_CREATE. | ||
134 | |||
135 | UHID_OPEN: | ||
136 | This is sent when the HID device is opened. That is, the data that the HID | ||
137 | device provides is read by some other process. You may ignore this event but | ||
138 | it is useful for power-management. As long as you haven't received this event | ||
139 | there is actually no other process that reads your data so there is no need to | ||
140 | send UHID_INPUT events to the kernel. | ||
141 | |||
142 | UHID_CLOSE: | ||
143 | This is sent when there are no more processes which read the HID data. It is | ||
144 | the counterpart of UHID_OPEN and you may as well ignore this event. | ||
145 | |||
146 | UHID_OUTPUT: | ||
147 | This is sent if the HID device driver wants to send raw data to the I/O | ||
148 | device. You should read the payload and forward it to the device. The payload | ||
149 | is of type "struct uhid_data_req". | ||
150 | This may be received even though you haven't received UHID_OPEN, yet. | ||
151 | |||
152 | UHID_OUTPUT_EV: | ||
153 | Same as UHID_OUTPUT but this contains a "struct input_event" as payload. This | ||
154 | is called for force-feedback, LED or similar events which are received through | ||
155 | an input device by the HID subsystem. You should convert this into raw reports | ||
156 | and send them to your device similar to events of type UHID_OUTPUT. | ||
157 | |||
158 | UHID_FEATURE: | ||
159 | This event is sent if the kernel driver wants to perform a feature request as | ||
160 | described in the HID specs. The report-type and report-number are available in | ||
161 | the payload. | ||
162 | The kernel serializes feature requests so there will never be two in parallel. | ||
163 | However, if you fail to respond with a UHID_FEATURE_ANSWER in a time-span of 5 | ||
164 | seconds, then the requests will be dropped and a new one might be sent. | ||
165 | Therefore, the payload also contains an "id" field that identifies every | ||
166 | request. | ||
167 | |||
168 | Document by: | ||
169 | David Herrmann <dh.herrmann@googlemail.com> | ||
diff --git a/Documentation/hwmon/da9052 b/Documentation/hwmon/da9052 new file mode 100644 index 000000000000..ef898553638e --- /dev/null +++ b/Documentation/hwmon/da9052 | |||
@@ -0,0 +1,61 @@ | |||
1 | Supported chips: | ||
2 | * Dialog Semiconductors DA9052-BC and DA9053-AA/Bx PMICs | ||
3 | Prefix: 'da9052' | ||
4 | Datasheet: Datasheet is not publicly available. | ||
5 | |||
6 | Authors: David Dajun Chen <dchen@diasemi.com> | ||
7 | |||
8 | Description | ||
9 | ----------- | ||
10 | |||
11 | The DA9052/53 provides an Analogue to Digital Converter (ADC) with 10 bits | ||
12 | resolution and track and hold circuitry combined with an analogue input | ||
13 | multiplexer. The analogue input multiplexer will allow conversion of up to 10 | ||
14 | different inputs. The track and hold circuit ensures stable input voltages at | ||
15 | the input of the ADC during the conversion. | ||
16 | |||
17 | The ADC is used to measure the following inputs: | ||
18 | Channel 0: VDDOUT - measurement of the system voltage | ||
19 | Channel 1: ICH - internal battery charger current measurement | ||
20 | Channel 2: TBAT - output from the battery NTC | ||
21 | Channel 3: VBAT - measurement of the battery voltage | ||
22 | Channel 4: ADC_IN4 - high impedance input (0 - 2.5V) | ||
23 | Channel 5: ADC_IN5 - high impedance input (0 - 2.5V) | ||
24 | Channel 6: ADC_IN6 - high impedance input (0 - 2.5V) | ||
25 | Channel 7: XY - TSI interface to measure the X and Y voltage of the touch | ||
26 | screen resistive potentiometers | ||
27 | Channel 8: Internal Tjunc. - sense (internal temp. sensor) | ||
28 | Channel 9: VBBAT - measurement of the backup battery voltage | ||
29 | |||
30 | By using sysfs attributes we can measure the system voltage VDDOUT, the battery | ||
31 | charging current ICH, battery temperature TBAT, battery junction temperature | ||
32 | TJUNC, battery voltage VBAT and the back up battery voltage VBBAT. | ||
33 | |||
34 | Voltage Monitoring | ||
35 | ------------------ | ||
36 | |||
37 | Voltages are sampled by a 10 bit ADC. | ||
38 | |||
39 | The battery voltage is calculated as: | ||
40 | Milli volt = ((ADC value * 1000) / 512) + 2500 | ||
41 | |||
42 | The backup battery voltage is calculated as: | ||
43 | Milli volt = (ADC value * 2500) / 512; | ||
44 | |||
45 | The voltages on ADC channels 4, 5 and 6 are calculated as: | ||
46 | Milli volt = (ADC value * 2500) / 1023 | ||
47 | |||
48 | Temperature Monitoring | ||
49 | ---------------------- | ||
50 | |||
51 | Temperatures are sampled by a 10 bit ADC. Junction and battery temperatures | ||
52 | are monitored by the ADC channels. | ||
53 | |||
54 | The junction temperature is calculated: | ||
55 | Degrees celsius = 1.708 * (TJUNC_RES - T_OFFSET) - 108.8 | ||
56 | The junction temperature attribute is supported by the driver. | ||
57 | |||
58 | The battery temperature is calculated: | ||
59 | Degree Celcius = 1 / (t1 + 1/298)- 273 | ||
60 | where t1 = (1/B)* ln(( ADCval * 2.5)/(R25*ITBAT*255)) | ||
61 | Default values of R25, B, ITBAT are 10e3, 3380 and 50e-6 respectively. | ||
diff --git a/Documentation/hwmon/hih6130 b/Documentation/hwmon/hih6130 new file mode 100644 index 000000000000..73dae918ea7b --- /dev/null +++ b/Documentation/hwmon/hih6130 | |||
@@ -0,0 +1,37 @@ | |||
1 | Kernel driver hih6130 | ||
2 | ===================== | ||
3 | |||
4 | Supported chips: | ||
5 | * Honeywell HIH-6130 / HIH-6131 | ||
6 | Prefix: 'hih6130' | ||
7 | Addresses scanned: none | ||
8 | Datasheet: Publicly available at the Honeywell website | ||
9 | http://sensing.honeywell.com/index.php?ci_id=3106&la_id=1&defId=44872 | ||
10 | |||
11 | Author: | ||
12 | Iain Paton <ipaton0@gmail.com> | ||
13 | |||
14 | Description | ||
15 | ----------- | ||
16 | |||
17 | The HIH-6130 & HIH-6131 are humidity and temperature sensors in a SO8 package. | ||
18 | The difference between the two devices is that the HIH-6131 has a condensation | ||
19 | filter. | ||
20 | |||
21 | The devices communicate with the I2C protocol. All sensors are set to the same | ||
22 | I2C address 0x27 by default, so an entry with I2C_BOARD_INFO("hih6130", 0x27) | ||
23 | can be used in the board setup code. | ||
24 | |||
25 | Please see Documentation/i2c/instantiating-devices for details on how to | ||
26 | instantiate I2C devices. | ||
27 | |||
28 | sysfs-Interface | ||
29 | --------------- | ||
30 | |||
31 | temp1_input - temperature input | ||
32 | humidity1_input - humidity input | ||
33 | |||
34 | Notes | ||
35 | ----- | ||
36 | |||
37 | Command mode and alarms are not currently supported. | ||
diff --git a/Documentation/hwmon/submitting-patches b/Documentation/hwmon/submitting-patches index 86f42e8e9e49..790f774a3032 100644 --- a/Documentation/hwmon/submitting-patches +++ b/Documentation/hwmon/submitting-patches | |||
@@ -70,6 +70,9 @@ increase the chances of your change being accepted. | |||
70 | review more difficult. It may also result in code which is more complicated | 70 | review more difficult. It may also result in code which is more complicated |
71 | than necessary. Use inline functions or just regular functions instead. | 71 | than necessary. Use inline functions or just regular functions instead. |
72 | 72 | ||
73 | * Use devres functions whenever possible to allocate resources. For rationale | ||
74 | and supported functions, please see Documentation/driver-model/devres.txt. | ||
75 | |||
73 | * If the driver has a detect function, make sure it is silent. Debug messages | 76 | * If the driver has a detect function, make sure it is silent. Debug messages |
74 | and messages printed after a successful detection are acceptable, but it | 77 | and messages printed after a successful detection are acceptable, but it |
75 | must not print messages such as "Chip XXX not found/supported". | 78 | must not print messages such as "Chip XXX not found/supported". |
diff --git a/Documentation/i2c/busses/i2c-i801 b/Documentation/i2c/busses/i2c-i801 index 71f55bbcefc8..615142da4ef6 100644 --- a/Documentation/i2c/busses/i2c-i801 +++ b/Documentation/i2c/busses/i2c-i801 | |||
@@ -38,9 +38,10 @@ Module Parameters | |||
38 | Disable selected features normally supported by the device. This makes it | 38 | Disable selected features normally supported by the device. This makes it |
39 | possible to work around possible driver or hardware bugs if the feature in | 39 | possible to work around possible driver or hardware bugs if the feature in |
40 | question doesn't work as intended for whatever reason. Bit values: | 40 | question doesn't work as intended for whatever reason. Bit values: |
41 | 1 disable SMBus PEC | 41 | 0x01 disable SMBus PEC |
42 | 2 disable the block buffer | 42 | 0x02 disable the block buffer |
43 | 8 disable the I2C block read functionality | 43 | 0x08 disable the I2C block read functionality |
44 | 0x10 don't use interrupts | ||
44 | 45 | ||
45 | 46 | ||
46 | Description | 47 | Description |
@@ -86,6 +87,12 @@ SMBus 2.0 Support | |||
86 | The 82801DB (ICH4) and later chips support several SMBus 2.0 features. | 87 | The 82801DB (ICH4) and later chips support several SMBus 2.0 features. |
87 | 88 | ||
88 | 89 | ||
90 | Interrupt Support | ||
91 | ----------------- | ||
92 | |||
93 | PCI interrupt support is supported on the 82801EB (ICH5) and later chips. | ||
94 | |||
95 | |||
89 | Hidden ICH SMBus | 96 | Hidden ICH SMBus |
90 | ---------------- | 97 | ---------------- |
91 | 98 | ||
diff --git a/Documentation/i2c/busses/i2c-piix4 b/Documentation/i2c/busses/i2c-piix4 index 475bb4ae0720..1e6634f54c50 100644 --- a/Documentation/i2c/busses/i2c-piix4 +++ b/Documentation/i2c/busses/i2c-piix4 | |||
@@ -8,6 +8,11 @@ Supported adapters: | |||
8 | Datasheet: Only available via NDA from ServerWorks | 8 | Datasheet: Only available via NDA from ServerWorks |
9 | * ATI IXP200, IXP300, IXP400, SB600, SB700 and SB800 southbridges | 9 | * ATI IXP200, IXP300, IXP400, SB600, SB700 and SB800 southbridges |
10 | Datasheet: Not publicly available | 10 | Datasheet: Not publicly available |
11 | SB700 register reference available at: | ||
12 | http://support.amd.com/us/Embedded_TechDocs/43009_sb7xx_rrg_pub_1.00.pdf | ||
13 | * AMD SP5100 (SB700 derivative found on some server mainboards) | ||
14 | Datasheet: Publicly available at the AMD website | ||
15 | http://support.amd.com/us/Embedded_TechDocs/44413.pdf | ||
11 | * AMD Hudson-2 | 16 | * AMD Hudson-2 |
12 | Datasheet: Not publicly available | 17 | Datasheet: Not publicly available |
13 | * Standard Microsystems (SMSC) SLC90E66 (Victory66) southbridge | 18 | * Standard Microsystems (SMSC) SLC90E66 (Victory66) southbridge |
@@ -68,6 +73,10 @@ this driver on those mainboards. | |||
68 | The ServerWorks Southbridges, the Intel 440MX, and the Victory66 are | 73 | The ServerWorks Southbridges, the Intel 440MX, and the Victory66 are |
69 | identical to the PIIX4 in I2C/SMBus support. | 74 | identical to the PIIX4 in I2C/SMBus support. |
70 | 75 | ||
76 | The AMD SB700 and SP5100 chipsets implement two PIIX4-compatible SMBus | ||
77 | controllers. If your BIOS initializes the secondary controller, it will | ||
78 | be detected by this driver as an "Auxiliary SMBus Host Controller". | ||
79 | |||
71 | If you own Force CPCI735 motherboard or other OSB4 based systems you may need | 80 | If you own Force CPCI735 motherboard or other OSB4 based systems you may need |
72 | to change the SMBus Interrupt Select register so the SMBus controller uses | 81 | to change the SMBus Interrupt Select register so the SMBus controller uses |
73 | the SMI mode. | 82 | the SMI mode. |
diff --git a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients index 5aa53374ea2a..3a94b0e6f601 100644 --- a/Documentation/i2c/writing-clients +++ b/Documentation/i2c/writing-clients | |||
@@ -245,21 +245,17 @@ static int __init foo_init(void) | |||
245 | { | 245 | { |
246 | return i2c_add_driver(&foo_driver); | 246 | return i2c_add_driver(&foo_driver); |
247 | } | 247 | } |
248 | module_init(foo_init); | ||
248 | 249 | ||
249 | static void __exit foo_cleanup(void) | 250 | static void __exit foo_cleanup(void) |
250 | { | 251 | { |
251 | i2c_del_driver(&foo_driver); | 252 | i2c_del_driver(&foo_driver); |
252 | } | 253 | } |
254 | module_exit(foo_cleanup); | ||
253 | 255 | ||
254 | /* Substitute your own name and email address */ | 256 | The module_i2c_driver() macro can be used to reduce above code. |
255 | MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>" | ||
256 | MODULE_DESCRIPTION("Driver for Barf Inc. Foo I2C devices"); | ||
257 | |||
258 | /* a few non-GPL license types are also allowed */ | ||
259 | MODULE_LICENSE("GPL"); | ||
260 | 257 | ||
261 | module_init(foo_init); | 258 | module_i2c_driver(foo_driver); |
262 | module_exit(foo_cleanup); | ||
263 | 259 | ||
264 | Note that some functions are marked by `__init'. These functions can | 260 | Note that some functions are marked by `__init'. These functions can |
265 | be removed after kernel booting (or module loading) is completed. | 261 | be removed after kernel booting (or module loading) is completed. |
@@ -267,6 +263,17 @@ Likewise, functions marked by `__exit' are dropped by the compiler when | |||
267 | the code is built into the kernel, as they would never be called. | 263 | the code is built into the kernel, as they would never be called. |
268 | 264 | ||
269 | 265 | ||
266 | Driver Information | ||
267 | ================== | ||
268 | |||
269 | /* Substitute your own name and email address */ | ||
270 | MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>" | ||
271 | MODULE_DESCRIPTION("Driver for Barf Inc. Foo I2C devices"); | ||
272 | |||
273 | /* a few non-GPL license types are also allowed */ | ||
274 | MODULE_LICENSE("GPL"); | ||
275 | |||
276 | |||
270 | Power Management | 277 | Power Management |
271 | ================ | 278 | ================ |
272 | 279 | ||
diff --git a/Documentation/input/edt-ft5x06.txt b/Documentation/input/edt-ft5x06.txt new file mode 100644 index 000000000000..2032f0b7a8fa --- /dev/null +++ b/Documentation/input/edt-ft5x06.txt | |||
@@ -0,0 +1,54 @@ | |||
1 | EDT ft5x06 based Polytouch devices | ||
2 | ---------------------------------- | ||
3 | |||
4 | The edt-ft5x06 driver is useful for the EDT "Polytouch" family of capacitive | ||
5 | touch screens. Note that it is *not* suitable for other devices based on the | ||
6 | focaltec ft5x06 devices, since they contain vendor-specific firmware. In | ||
7 | particular this driver is not suitable for the Nook tablet. | ||
8 | |||
9 | It has been tested with the following devices: | ||
10 | * EP0350M06 | ||
11 | * EP0430M06 | ||
12 | * EP0570M06 | ||
13 | * EP0700M06 | ||
14 | |||
15 | The driver allows configuration of the touch screen via a set of sysfs files: | ||
16 | |||
17 | /sys/class/input/eventX/device/device/threshold: | ||
18 | allows setting the "click"-threshold in the range from 20 to 80. | ||
19 | |||
20 | /sys/class/input/eventX/device/device/gain: | ||
21 | allows setting the sensitivity in the range from 0 to 31. Note that | ||
22 | lower values indicate higher sensitivity. | ||
23 | |||
24 | /sys/class/input/eventX/device/device/offset: | ||
25 | allows setting the edge compensation in the range from 0 to 31. | ||
26 | |||
27 | /sys/class/input/eventX/device/device/report_rate: | ||
28 | allows setting the report rate in the range from 3 to 14. | ||
29 | |||
30 | |||
31 | For debugging purposes the driver provides a few files in the debug | ||
32 | filesystem (if available in the kernel). In /sys/kernel/debug/edt_ft5x06 | ||
33 | you'll find the following files: | ||
34 | |||
35 | num_x, num_y: | ||
36 | (readonly) contains the number of sensor fields in X- and | ||
37 | Y-direction. | ||
38 | |||
39 | mode: | ||
40 | allows switching the sensor between "factory mode" and "operation | ||
41 | mode" by writing "1" or "0" to it. In factory mode (1) it is | ||
42 | possible to get the raw data from the sensor. Note that in factory | ||
43 | mode regular events don't get delivered and the options described | ||
44 | above are unavailable. | ||
45 | |||
46 | raw_data: | ||
47 | contains num_x * num_y big endian 16 bit values describing the raw | ||
48 | values for each sensor field. Note that each read() call on this | ||
49 | files triggers a new readout. It is recommended to provide a buffer | ||
50 | big enough to contain num_x * num_y * 2 bytes. | ||
51 | |||
52 | Note that reading raw_data gives a I/O error when the device is not in factory | ||
53 | mode. The same happens when reading/writing to the parameter files when the | ||
54 | device is not in regular operation mode. | ||
diff --git a/Documentation/input/multi-touch-protocol.txt b/Documentation/input/multi-touch-protocol.txt index 543101c5bf26..2c179613f81b 100644 --- a/Documentation/input/multi-touch-protocol.txt +++ b/Documentation/input/multi-touch-protocol.txt | |||
@@ -162,26 +162,48 @@ are divided into categories, to allow for partial implementation. The | |||
162 | minimum set consists of ABS_MT_POSITION_X and ABS_MT_POSITION_Y, which | 162 | minimum set consists of ABS_MT_POSITION_X and ABS_MT_POSITION_Y, which |
163 | allows for multiple contacts to be tracked. If the device supports it, the | 163 | allows for multiple contacts to be tracked. If the device supports it, the |
164 | ABS_MT_TOUCH_MAJOR and ABS_MT_WIDTH_MAJOR may be used to provide the size | 164 | ABS_MT_TOUCH_MAJOR and ABS_MT_WIDTH_MAJOR may be used to provide the size |
165 | of the contact area and approaching contact, respectively. | 165 | of the contact area and approaching tool, respectively. |
166 | 166 | ||
167 | The TOUCH and WIDTH parameters have a geometrical interpretation; imagine | 167 | The TOUCH and WIDTH parameters have a geometrical interpretation; imagine |
168 | looking through a window at someone gently holding a finger against the | 168 | looking through a window at someone gently holding a finger against the |
169 | glass. You will see two regions, one inner region consisting of the part | 169 | glass. You will see two regions, one inner region consisting of the part |
170 | of the finger actually touching the glass, and one outer region formed by | 170 | of the finger actually touching the glass, and one outer region formed by |
171 | the perimeter of the finger. The diameter of the inner region is the | 171 | the perimeter of the finger. The center of the touching region (a) is |
172 | ABS_MT_TOUCH_MAJOR, the diameter of the outer region is | 172 | ABS_MT_POSITION_X/Y and the center of the approaching finger (b) is |
173 | ABS_MT_WIDTH_MAJOR. Now imagine the person pressing the finger harder | 173 | ABS_MT_TOOL_X/Y. The touch diameter is ABS_MT_TOUCH_MAJOR and the finger |
174 | against the glass. The inner region will increase, and in general, the | 174 | diameter is ABS_MT_WIDTH_MAJOR. Now imagine the person pressing the finger |
175 | ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR, which is always smaller than | 175 | harder against the glass. The touch region will increase, and in general, |
176 | unity, is related to the contact pressure. For pressure-based devices, | 176 | the ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR, which is always smaller |
177 | than unity, is related to the contact pressure. For pressure-based devices, | ||
177 | ABS_MT_PRESSURE may be used to provide the pressure on the contact area | 178 | ABS_MT_PRESSURE may be used to provide the pressure on the contact area |
178 | instead. Devices capable of contact hovering can use ABS_MT_DISTANCE to | 179 | instead. Devices capable of contact hovering can use ABS_MT_DISTANCE to |
179 | indicate the distance between the contact and the surface. | 180 | indicate the distance between the contact and the surface. |
180 | 181 | ||
181 | In addition to the MAJOR parameters, the oval shape of the contact can be | 182 | |
182 | described by adding the MINOR parameters, such that MAJOR and MINOR are the | 183 | Linux MT Win8 |
183 | major and minor axis of an ellipse. Finally, the orientation of the oval | 184 | __________ _______________________ |
184 | shape can be describe with the ORIENTATION parameter. | 185 | / \ | | |
186 | / \ | | | ||
187 | / ____ \ | | | ||
188 | / / \ \ | | | ||
189 | \ \ a \ \ | a | | ||
190 | \ \____/ \ | | | ||
191 | \ \ | | | ||
192 | \ b \ | b | | ||
193 | \ \ | | | ||
194 | \ \ | | | ||
195 | \ \ | | | ||
196 | \ / | | | ||
197 | \ / | | | ||
198 | \ / | | | ||
199 | \__________/ |_______________________| | ||
200 | |||
201 | |||
202 | In addition to the MAJOR parameters, the oval shape of the touch and finger | ||
203 | regions can be described by adding the MINOR parameters, such that MAJOR | ||
204 | and MINOR are the major and minor axis of an ellipse. The orientation of | ||
205 | the touch ellipse can be described with the ORIENTATION parameter, and the | ||
206 | direction of the finger ellipse is given by the vector (a - b). | ||
185 | 207 | ||
186 | For type A devices, further specification of the touch shape is possible | 208 | For type A devices, further specification of the touch shape is possible |
187 | via ABS_MT_BLOB_ID. | 209 | via ABS_MT_BLOB_ID. |
@@ -224,7 +246,7 @@ tool. Omit if circular [4]. | |||
224 | The above four values can be used to derive additional information about | 246 | The above four values can be used to derive additional information about |
225 | the contact. The ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR approximates | 247 | the contact. The ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR approximates |
226 | the notion of pressure. The fingers of the hand and the palm all have | 248 | the notion of pressure. The fingers of the hand and the palm all have |
227 | different characteristic widths [1]. | 249 | different characteristic widths. |
228 | 250 | ||
229 | ABS_MT_PRESSURE | 251 | ABS_MT_PRESSURE |
230 | 252 | ||
@@ -240,17 +262,24 @@ the contact is hovering above the surface. | |||
240 | 262 | ||
241 | ABS_MT_ORIENTATION | 263 | ABS_MT_ORIENTATION |
242 | 264 | ||
243 | The orientation of the ellipse. The value should describe a signed quarter | 265 | The orientation of the touching ellipse. The value should describe a signed |
244 | of a revolution clockwise around the touch center. The signed value range | 266 | quarter of a revolution clockwise around the touch center. The signed value |
245 | is arbitrary, but zero should be returned for a finger aligned along the Y | 267 | range is arbitrary, but zero should be returned for an ellipse aligned with |
246 | axis of the surface, a negative value when finger is turned to the left, and | 268 | the Y axis of the surface, a negative value when the ellipse is turned to |
247 | a positive value when finger turned to the right. When completely aligned with | 269 | the left, and a positive value when the ellipse is turned to the |
248 | the X axis, the range max should be returned. Orientation can be omitted | 270 | right. When completely aligned with the X axis, the range max should be |
249 | if the touching object is circular, or if the information is not available | 271 | returned. |
250 | in the kernel driver. Partial orientation support is possible if the device | 272 | |
251 | can distinguish between the two axis, but not (uniquely) any values in | 273 | Touch ellipsis are symmetrical by default. For devices capable of true 360 |
252 | between. In such cases, the range of ABS_MT_ORIENTATION should be [0, 1] | 274 | degree orientation, the reported orientation must exceed the range max to |
253 | [4]. | 275 | indicate more than a quarter of a revolution. For an upside-down finger, |
276 | range max * 2 should be returned. | ||
277 | |||
278 | Orientation can be omitted if the touch area is circular, or if the | ||
279 | information is not available in the kernel driver. Partial orientation | ||
280 | support is possible if the device can distinguish between the two axis, but | ||
281 | not (uniquely) any values in between. In such cases, the range of | ||
282 | ABS_MT_ORIENTATION should be [0, 1] [4]. | ||
254 | 283 | ||
255 | ABS_MT_POSITION_X | 284 | ABS_MT_POSITION_X |
256 | 285 | ||
@@ -260,6 +289,23 @@ ABS_MT_POSITION_Y | |||
260 | 289 | ||
261 | The surface Y coordinate of the center of the touching ellipse. | 290 | The surface Y coordinate of the center of the touching ellipse. |
262 | 291 | ||
292 | ABS_MT_TOOL_X | ||
293 | |||
294 | The surface X coordinate of the center of the approaching tool. Omit if | ||
295 | the device cannot distinguish between the intended touch point and the | ||
296 | tool itself. | ||
297 | |||
298 | ABS_MT_TOOL_Y | ||
299 | |||
300 | The surface Y coordinate of the center of the approaching tool. Omit if the | ||
301 | device cannot distinguish between the intended touch point and the tool | ||
302 | itself. | ||
303 | |||
304 | The four position values can be used to separate the position of the touch | ||
305 | from the position of the tool. If both positions are present, the major | ||
306 | tool axis points towards the touch point [1]. Otherwise, the tool axes are | ||
307 | aligned with the touch axes. | ||
308 | |||
263 | ABS_MT_TOOL_TYPE | 309 | ABS_MT_TOOL_TYPE |
264 | 310 | ||
265 | The type of approaching tool. A lot of kernel drivers cannot distinguish | 311 | The type of approaching tool. A lot of kernel drivers cannot distinguish |
@@ -305,6 +351,28 @@ The range of ABS_MT_ORIENTATION should be set to [0, 1], to indicate that | |||
305 | the device can distinguish between a finger along the Y axis (0) and a | 351 | the device can distinguish between a finger along the Y axis (0) and a |
306 | finger along the X axis (1). | 352 | finger along the X axis (1). |
307 | 353 | ||
354 | For win8 devices with both T and C coordinates, the position mapping is | ||
355 | |||
356 | ABS_MT_POSITION_X := T_X | ||
357 | ABS_MT_POSITION_Y := T_Y | ||
358 | ABS_MT_TOOL_X := C_X | ||
359 | ABS_MT_TOOL_X := C_Y | ||
360 | |||
361 | Unfortunately, there is not enough information to specify both the touching | ||
362 | ellipse and the tool ellipse, so one has to resort to approximations. One | ||
363 | simple scheme, which is compatible with earlier usage, is: | ||
364 | |||
365 | ABS_MT_TOUCH_MAJOR := min(X, Y) | ||
366 | ABS_MT_TOUCH_MINOR := <not used> | ||
367 | ABS_MT_ORIENTATION := <not used> | ||
368 | ABS_MT_WIDTH_MAJOR := min(X, Y) + distance(T, C) | ||
369 | ABS_MT_WIDTH_MINOR := min(X, Y) | ||
370 | |||
371 | Rationale: We have no information about the orientation of the touching | ||
372 | ellipse, so approximate it with an inscribed circle instead. The tool | ||
373 | ellipse should align with the the vector (T - C), so the diameter must | ||
374 | increase with distance(T, C). Finally, assume that the touch diameter is | ||
375 | equal to the tool thickness, and we arrive at the formulas above. | ||
308 | 376 | ||
309 | Finger Tracking | 377 | Finger Tracking |
310 | --------------- | 378 | --------------- |
@@ -338,9 +406,7 @@ subsequent events of the same type refer to different fingers. | |||
338 | For example usage of the type A protocol, see the bcm5974 driver. For | 406 | For example usage of the type A protocol, see the bcm5974 driver. For |
339 | example usage of the type B protocol, see the hid-egalax driver. | 407 | example usage of the type B protocol, see the hid-egalax driver. |
340 | 408 | ||
341 | [1] With the extension ABS_MT_APPROACH_X and ABS_MT_APPROACH_Y, the | 409 | [1] Also, the difference (TOOL_X - POSITION_X) can be used to model tilt. |
342 | difference between the contact position and the approaching tool position | ||
343 | could be used to derive tilt. | ||
344 | [2] The list can of course be extended. | 410 | [2] The list can of course be extended. |
345 | [3] The mtdev project: http://bitmath.org/code/mtdev/. | 411 | [3] The mtdev project: http://bitmath.org/code/mtdev/. |
346 | [4] See the section on event computation. | 412 | [4] See the section on event computation. |
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt index 915f28c470e9..849b771c5e03 100644 --- a/Documentation/ioctl/ioctl-number.txt +++ b/Documentation/ioctl/ioctl-number.txt | |||
@@ -88,6 +88,7 @@ Code Seq#(hex) Include File Comments | |||
88 | and kernel/power/user.c | 88 | and kernel/power/user.c |
89 | '8' all SNP8023 advanced NIC card | 89 | '8' all SNP8023 advanced NIC card |
90 | <mailto:mcr@solidum.com> | 90 | <mailto:mcr@solidum.com> |
91 | ';' 64-7F linux/vfio.h | ||
91 | '@' 00-0F linux/radeonfb.h conflict! | 92 | '@' 00-0F linux/radeonfb.h conflict! |
92 | '@' 00-0F drivers/video/aty/aty128fb.c conflict! | 93 | '@' 00-0F drivers/video/aty/aty128fb.c conflict! |
93 | 'A' 00-1F linux/apm_bios.h conflict! | 94 | 'A' 00-1F linux/apm_bios.h conflict! |
diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt index 506c7390c2b9..13f1aa09b938 100644 --- a/Documentation/kdump/kdump.txt +++ b/Documentation/kdump/kdump.txt | |||
@@ -86,7 +86,7 @@ There is also a gitweb interface available at | |||
86 | http://www.kernel.org/git/?p=utils/kernel/kexec/kexec-tools.git | 86 | http://www.kernel.org/git/?p=utils/kernel/kexec/kexec-tools.git |
87 | 87 | ||
88 | More information about kexec-tools can be found at | 88 | More information about kexec-tools can be found at |
89 | http://www.kernel.org/pub/linux/utils/kernel/kexec/README.html | 89 | http://horms.net/projects/kexec/ |
90 | 90 | ||
91 | 3) Unpack the tarball with the tar command, as follows: | 91 | 3) Unpack the tarball with the tar command, as follows: |
92 | 92 | ||
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index a92c5ebf373e..ad7e2e5088c1 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -526,7 +526,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
526 | 526 | ||
527 | coherent_pool=nn[KMG] [ARM,KNL] | 527 | coherent_pool=nn[KMG] [ARM,KNL] |
528 | Sets the size of memory pool for coherent, atomic dma | 528 | Sets the size of memory pool for coherent, atomic dma |
529 | allocations if Contiguous Memory Allocator (CMA) is used. | 529 | allocations, by default set to 256K. |
530 | 530 | ||
531 | code_bytes [X86] How many bytes of object code to print | 531 | code_bytes [X86] How many bytes of object code to print |
532 | in an oops report. | 532 | in an oops report. |
@@ -1134,7 +1134,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1134 | forcesac | 1134 | forcesac |
1135 | soft | 1135 | soft |
1136 | pt [x86, IA-64] | 1136 | pt [x86, IA-64] |
1137 | group_mf [x86, IA-64] | ||
1138 | 1137 | ||
1139 | 1138 | ||
1140 | io7= [HW] IO7 for Marvel based alpha systems | 1139 | io7= [HW] IO7 for Marvel based alpha systems |
@@ -2367,6 +2366,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2367 | Set maximum number of finished RCU callbacks to process | 2366 | Set maximum number of finished RCU callbacks to process |
2368 | in one batch. | 2367 | in one batch. |
2369 | 2368 | ||
2369 | rcutree.fanout_leaf= [KNL,BOOT] | ||
2370 | Increase the number of CPUs assigned to each | ||
2371 | leaf rcu_node structure. Useful for very large | ||
2372 | systems. | ||
2373 | |||
2370 | rcutree.qhimark= [KNL,BOOT] | 2374 | rcutree.qhimark= [KNL,BOOT] |
2371 | Set threshold of queued | 2375 | Set threshold of queued |
2372 | RCU callbacks over which batch limiting is disabled. | 2376 | RCU callbacks over which batch limiting is disabled. |
@@ -2932,6 +2936,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2932 | initial READ(10) command); | 2936 | initial READ(10) command); |
2933 | o = CAPACITY_OK (accept the capacity | 2937 | o = CAPACITY_OK (accept the capacity |
2934 | reported by the device); | 2938 | reported by the device); |
2939 | p = WRITE_CACHE (the device cache is ON | ||
2940 | by default); | ||
2935 | r = IGNORE_RESIDUE (the device reports | 2941 | r = IGNORE_RESIDUE (the device reports |
2936 | bogus residue values); | 2942 | bogus residue values); |
2937 | s = SINGLE_LUN (the device has only one | 2943 | s = SINGLE_LUN (the device has only one |
diff --git a/Documentation/laptops/asus-laptop.txt b/Documentation/laptops/asus-laptop.txt index a1e04d679289..69f9fb3701e0 100644 --- a/Documentation/laptops/asus-laptop.txt +++ b/Documentation/laptops/asus-laptop.txt | |||
@@ -151,8 +151,7 @@ Display switching | |||
151 | 151 | ||
152 | Debugging: | 152 | Debugging: |
153 | 1) Check whether the Fn+F8 key: | 153 | 1) Check whether the Fn+F8 key: |
154 | a) does not lock the laptop (try disabling CONFIG_X86_UP_APIC or boot with | 154 | a) does not lock the laptop (try a boot with noapic / nolapic if it does) |
155 | noapic / nolapic if it does) | ||
156 | b) generates events (0x6n, where n is the value corresponding to the | 155 | b) generates events (0x6n, where n is the value corresponding to the |
157 | configuration above) | 156 | configuration above) |
158 | c) actually works | 157 | c) actually works |
diff --git a/Documentation/leds/00-INDEX b/Documentation/leds/00-INDEX index 29f481df32c7..5fefe374892f 100644 --- a/Documentation/leds/00-INDEX +++ b/Documentation/leds/00-INDEX | |||
@@ -6,3 +6,5 @@ leds-lp5521.txt | |||
6 | - notes on how to use the leds-lp5521 driver. | 6 | - notes on how to use the leds-lp5521 driver. |
7 | leds-lp5523.txt | 7 | leds-lp5523.txt |
8 | - notes on how to use the leds-lp5523 driver. | 8 | - notes on how to use the leds-lp5523 driver. |
9 | leds-lm3556.txt | ||
10 | - notes on how to use the leds-lm3556 driver. | ||
diff --git a/Documentation/leds/leds-blinkm.txt b/Documentation/leds/leds-blinkm.txt new file mode 100644 index 000000000000..9dd92f4cf4e1 --- /dev/null +++ b/Documentation/leds/leds-blinkm.txt | |||
@@ -0,0 +1,80 @@ | |||
1 | The leds-blinkm driver supports the devices of the BlinkM family. | ||
2 | |||
3 | They are RGB-LED modules driven by a (AT)tiny microcontroller and | ||
4 | communicate through I2C. The default address of these modules is | ||
5 | 0x09 but this can be changed through a command. By this you could | ||
6 | dasy-chain up to 127 BlinkMs on an I2C bus. | ||
7 | |||
8 | The device accepts RGB and HSB color values through separate commands. | ||
9 | Also you can store blinking sequences as "scripts" in | ||
10 | the controller and run them. Also fading is an option. | ||
11 | |||
12 | The interface this driver provides is 2-fold: | ||
13 | |||
14 | a) LED class interface for use with triggers | ||
15 | ############################################ | ||
16 | |||
17 | The registration follows the scheme: | ||
18 | blinkm-<i2c-bus-nr>-<i2c-device-nr>-<color> | ||
19 | |||
20 | $ ls -h /sys/class/leds/blinkm-6-* | ||
21 | /sys/class/leds/blinkm-6-9-blue: | ||
22 | brightness device max_brightness power subsystem trigger uevent | ||
23 | |||
24 | /sys/class/leds/blinkm-6-9-green: | ||
25 | brightness device max_brightness power subsystem trigger uevent | ||
26 | |||
27 | /sys/class/leds/blinkm-6-9-red: | ||
28 | brightness device max_brightness power subsystem trigger uevent | ||
29 | |||
30 | (same is /sys/bus/i2c/devices/6-0009/leds) | ||
31 | |||
32 | We can control the colors separated into red, green and blue and | ||
33 | assign triggers on each color. | ||
34 | |||
35 | E.g.: | ||
36 | |||
37 | $ cat blinkm-6-9-blue/brightness | ||
38 | 05 | ||
39 | |||
40 | $ echo 200 > blinkm-6-9-blue/brightness | ||
41 | $ | ||
42 | |||
43 | $ modprobe ledtrig-heartbeat | ||
44 | $ echo heartbeat > blinkm-6-9-green/trigger | ||
45 | $ | ||
46 | |||
47 | |||
48 | b) Sysfs group to control rgb, fade, hsb, scripts ... | ||
49 | ##################################################### | ||
50 | |||
51 | This extended interface is available as folder blinkm | ||
52 | in the sysfs folder of the I2C device. | ||
53 | E.g. below /sys/bus/i2c/devices/6-0009/blinkm | ||
54 | |||
55 | $ ls -h /sys/bus/i2c/devices/6-0009/blinkm/ | ||
56 | blue green red test | ||
57 | |||
58 | Currently supported is just setting red, green, blue | ||
59 | and a test sequence. | ||
60 | |||
61 | E.g.: | ||
62 | |||
63 | $ cat * | ||
64 | 00 | ||
65 | 00 | ||
66 | 00 | ||
67 | #Write into test to start test sequence!# | ||
68 | |||
69 | $ echo 1 > test | ||
70 | $ | ||
71 | |||
72 | $ echo 255 > red | ||
73 | $ | ||
74 | |||
75 | |||
76 | |||
77 | as of 6/2012 | ||
78 | |||
79 | dl9pf <at> gmx <dot> de | ||
80 | |||
diff --git a/Documentation/leds/leds-lm3556.txt b/Documentation/leds/leds-lm3556.txt new file mode 100644 index 000000000000..d9eb91b51913 --- /dev/null +++ b/Documentation/leds/leds-lm3556.txt | |||
@@ -0,0 +1,85 @@ | |||
1 | Kernel driver for lm3556 | ||
2 | ======================== | ||
3 | |||
4 | *Texas Instrument: | ||
5 | 1.5 A Synchronous Boost LED Flash Driver w/ High-Side Current Source | ||
6 | * Datasheet: http://www.national.com/ds/LM/LM3556.pdf | ||
7 | |||
8 | Authors: | ||
9 | Daniel Jeong | ||
10 | Contact:Daniel Jeong(daniel.jeong-at-ti.com, gshark.jeong-at-gmail.com) | ||
11 | |||
12 | Description | ||
13 | ----------- | ||
14 | There are 3 functions in LM3556, Flash, Torch and Indicator. | ||
15 | |||
16 | FLASH MODE | ||
17 | In Flash Mode, the LED current source(LED) provides 16 target current levels | ||
18 | from 93.75 mA to 1500 mA.The Flash currents are adjusted via the CURRENT | ||
19 | CONTROL REGISTER(0x09).Flash mode is activated by the ENABLE REGISTER(0x0A), | ||
20 | or by pulling the STROBE pin HIGH. | ||
21 | LM3556 Flash can be controlled through sys/class/leds/flash/brightness file | ||
22 | * if STROBE pin is enabled, below example control brightness only, and | ||
23 | ON / OFF will be controlled by STROBE pin. | ||
24 | |||
25 | Flash Example: | ||
26 | OFF : #echo 0 > sys/class/leds/flash/brightness | ||
27 | 93.75 mA: #echo 1 > sys/class/leds/flash/brightness | ||
28 | ... ..... | ||
29 | 1500 mA: #echo 16 > sys/class/leds/flash/brightness | ||
30 | |||
31 | TORCH MODE | ||
32 | In Torch Mode, the current source(LED) is programmed via the CURRENT CONTROL | ||
33 | REGISTER(0x09).Torch Mode is activated by the ENABLE REGISTER(0x0A) or by the | ||
34 | hardware TORCH input. | ||
35 | LM3556 torch can be controlled through sys/class/leds/torch/brightness file. | ||
36 | * if TORCH pin is enabled, below example control brightness only, | ||
37 | and ON / OFF will be controlled by TORCH pin. | ||
38 | |||
39 | Torch Example: | ||
40 | OFF : #echo 0 > sys/class/leds/torch/brightness | ||
41 | 46.88 mA: #echo 1 > sys/class/leds/torch/brightness | ||
42 | ... ..... | ||
43 | 375 mA : #echo 8 > sys/class/leds/torch/brightness | ||
44 | |||
45 | INDICATOR MODE | ||
46 | Indicator pattern can be set through sys/class/leds/indicator/pattern file, | ||
47 | and 4 patterns are pre-defined in indicator_pattern array. | ||
48 | According to N-lank, Pulse time and N Period values, different pattern wiill | ||
49 | be generated.If you want new patterns for your own device, change | ||
50 | indicator_pattern array with your own values and INDIC_PATTERN_SIZE. | ||
51 | Please refer datasheet for more detail about N-Blank, Pulse time and N Period. | ||
52 | |||
53 | Indicator pattern example: | ||
54 | pattern 0: #echo 0 > sys/class/leds/indicator/pattern | ||
55 | .... | ||
56 | pattern 3: #echo 3 > sys/class/leds/indicator/pattern | ||
57 | |||
58 | Indicator brightness can be controlled through | ||
59 | sys/class/leds/indicator/brightness file. | ||
60 | |||
61 | Example: | ||
62 | OFF : #echo 0 > sys/class/leds/indicator/brightness | ||
63 | 5.86 mA : #echo 1 > sys/class/leds/indicator/brightness | ||
64 | ........ | ||
65 | 46.875mA : #echo 8 > sys/class/leds/indicator/brightness | ||
66 | |||
67 | Notes | ||
68 | ----- | ||
69 | Driver expects it is registered using the i2c_board_info mechanism. | ||
70 | To register the chip at address 0x63 on specific adapter, set the platform data | ||
71 | according to include/linux/platform_data/leds-lm3556.h, set the i2c board info | ||
72 | |||
73 | Example: | ||
74 | static struct i2c_board_info __initdata board_i2c_ch4[] = { | ||
75 | { | ||
76 | I2C_BOARD_INFO(LM3556_NAME, 0x63), | ||
77 | .platform_data = &lm3556_pdata, | ||
78 | }, | ||
79 | }; | ||
80 | |||
81 | and register it in the platform init function | ||
82 | |||
83 | Example: | ||
84 | board_register_i2c_bus(4, 400, | ||
85 | board_i2c_ch4, ARRAY_SIZE(board_i2c_ch4)); | ||
diff --git a/Documentation/leds/ledtrig-oneshot.txt b/Documentation/leds/ledtrig-oneshot.txt new file mode 100644 index 000000000000..07cd1fa41a3a --- /dev/null +++ b/Documentation/leds/ledtrig-oneshot.txt | |||
@@ -0,0 +1,59 @@ | |||
1 | One-shot LED Trigger | ||
2 | ==================== | ||
3 | |||
4 | This is a LED trigger useful for signaling the user of an event where there are | ||
5 | no clear trap points to put standard led-on and led-off settings. Using this | ||
6 | trigger, the application needs only to signal the trigger when an event has | ||
7 | happened, than the trigger turns the LED on and than keeps it off for a | ||
8 | specified amount of time. | ||
9 | |||
10 | This trigger is meant to be usable both for sporadic and dense events. In the | ||
11 | first case, the trigger produces a clear single controlled blink for each | ||
12 | event, while in the latter it keeps blinking at constant rate, as to signal | ||
13 | that the events are arriving continuously. | ||
14 | |||
15 | A one-shot LED only stays in a constant state when there are no events. An | ||
16 | additional "invert" property specifies if the LED has to stay off (normal) or | ||
17 | on (inverted) when not rearmed. | ||
18 | |||
19 | The trigger can be activated from user space on led class devices as shown | ||
20 | below: | ||
21 | |||
22 | echo oneshot > trigger | ||
23 | |||
24 | This adds the following sysfs attributes to the LED: | ||
25 | |||
26 | delay_on - specifies for how many milliseconds the LED has to stay at | ||
27 | LED_FULL brightness after it has been armed. | ||
28 | Default to 100 ms. | ||
29 | |||
30 | delay_off - specifies for how many milliseconds the LED has to stay at | ||
31 | LED_OFF brightness after it has been armed. | ||
32 | Default to 100 ms. | ||
33 | |||
34 | invert - reverse the blink logic. If set to 0 (default) blink on for delay_on | ||
35 | ms, then blink off for delay_off ms, leaving the LED normally off. If | ||
36 | set to 1, blink off for delay_off ms, then blink on for delay_on ms, | ||
37 | leaving the LED normally on. | ||
38 | Setting this value also immediately change the LED state. | ||
39 | |||
40 | shot - write any non-empty string to signal an events, this starts a blink | ||
41 | sequence if not already running. | ||
42 | |||
43 | Example use-case: network devices, initialization: | ||
44 | |||
45 | echo oneshot > trigger # set trigger for this led | ||
46 | echo 33 > delay_on # blink at 1 / (33 + 33) Hz on continuous traffic | ||
47 | echo 33 > delay_off | ||
48 | |||
49 | interface goes up: | ||
50 | |||
51 | echo 1 > invert # set led as normally-on, turn the led on | ||
52 | |||
53 | packet received/transmitted: | ||
54 | |||
55 | echo 1 > shot # led starts blinking, ignored if already blinking | ||
56 | |||
57 | interface goes down | ||
58 | |||
59 | echo 0 > invert # set led as normally-off, turn the led off | ||
diff --git a/Documentation/misc-devices/mei/mei.txt b/Documentation/misc-devices/mei/mei.txt index 2785697da59d..6ec702950719 100644 --- a/Documentation/misc-devices/mei/mei.txt +++ b/Documentation/misc-devices/mei/mei.txt | |||
@@ -50,25 +50,25 @@ Intel MEI Driver | |||
50 | The driver exposes a misc device called /dev/mei. | 50 | The driver exposes a misc device called /dev/mei. |
51 | 51 | ||
52 | An application maintains communication with an Intel ME feature while | 52 | An application maintains communication with an Intel ME feature while |
53 | /dev/mei is open. The binding to a specific features is performed by calling | 53 | /dev/mei is open. The binding to a specific feature is performed by calling |
54 | MEI_CONNECT_CLIENT_IOCTL, which passes the desired UUID. | 54 | MEI_CONNECT_CLIENT_IOCTL, which passes the desired UUID. |
55 | The number of instances of an Intel ME feature that can be opened | 55 | The number of instances of an Intel ME feature that can be opened |
56 | at the same time depends on the Intel ME feature, but most of the | 56 | at the same time depends on the Intel ME feature, but most of the |
57 | features allow only a single instance. | 57 | features allow only a single instance. |
58 | 58 | ||
59 | The Intel AMT Host Interface (Intel AMTHI) feature supports multiple | 59 | The Intel AMT Host Interface (Intel AMTHI) feature supports multiple |
60 | simultaneous user applications. Therefore, the Intel MEI driver handles | 60 | simultaneous user connected applications. The Intel MEI driver |
61 | this internally by maintaining request queues for the applications. | 61 | handles this internally by maintaining request queues for the applications. |
62 | 62 | ||
63 | The driver is oblivious to data that is passed between firmware feature | 63 | The driver is transparent to data that are passed between firmware feature |
64 | and host application. | 64 | and host application. |
65 | 65 | ||
66 | Because some of the Intel ME features can change the system | 66 | Because some of the Intel ME features can change the system |
67 | configuration, the driver by default allows only a privileged | 67 | configuration, the driver by default allows only a privileged |
68 | user to access it. | 68 | user to access it. |
69 | 69 | ||
70 | A code snippet for an application communicating with | 70 | A code snippet for an application communicating with Intel AMTHI client: |
71 | Intel AMTHI client: | 71 | |
72 | struct mei_connect_client_data data; | 72 | struct mei_connect_client_data data; |
73 | fd = open(MEI_DEVICE); | 73 | fd = open(MEI_DEVICE); |
74 | 74 | ||
@@ -185,7 +185,7 @@ The Intel AMT Watchdog is composed of two parts: | |||
185 | 2) Intel MEI driver - connects to the watchdog feature, configures the | 185 | 2) Intel MEI driver - connects to the watchdog feature, configures the |
186 | watchdog and sends the heartbeats. | 186 | watchdog and sends the heartbeats. |
187 | 187 | ||
188 | The Intel MEI driver uses the kernel watchdog to configure the Intel AMT | 188 | The Intel MEI driver uses the kernel watchdog API to configure the Intel AMT |
189 | Watchdog and to send heartbeats to it. The default timeout of the | 189 | Watchdog and to send heartbeats to it. The default timeout of the |
190 | watchdog is 120 seconds. | 190 | watchdog is 120 seconds. |
191 | 191 | ||
diff --git a/Documentation/networking/batman-adv.txt b/Documentation/networking/batman-adv.txt index 75a592365af9..8f3ae4a6147e 100644 --- a/Documentation/networking/batman-adv.txt +++ b/Documentation/networking/batman-adv.txt | |||
@@ -211,6 +211,11 @@ The debug output can be changed at runtime using the file | |||
211 | 211 | ||
212 | will enable debug messages for when routes change. | 212 | will enable debug messages for when routes change. |
213 | 213 | ||
214 | Counters for different types of packets entering and leaving the | ||
215 | batman-adv module are available through ethtool: | ||
216 | |||
217 | # ethtool --statistics bat0 | ||
218 | |||
214 | 219 | ||
215 | BATCTL | 220 | BATCTL |
216 | ------ | 221 | ------ |
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt index bfea8a338901..6b1c7110534e 100644 --- a/Documentation/networking/bonding.txt +++ b/Documentation/networking/bonding.txt | |||
@@ -1210,7 +1210,7 @@ options, you may wish to use the "max_bonds" module parameter, | |||
1210 | documented above. | 1210 | documented above. |
1211 | 1211 | ||
1212 | To create multiple bonding devices with differing options, it is | 1212 | To create multiple bonding devices with differing options, it is |
1213 | preferrable to use bonding parameters exported by sysfs, documented in the | 1213 | preferable to use bonding parameters exported by sysfs, documented in the |
1214 | section below. | 1214 | section below. |
1215 | 1215 | ||
1216 | For versions of bonding without sysfs support, the only means to | 1216 | For versions of bonding without sysfs support, the only means to |
@@ -1950,7 +1950,7 @@ access to fail over to. Additionally, the bonding load balance modes | |||
1950 | support link monitoring of their members, so if individual links fail, | 1950 | support link monitoring of their members, so if individual links fail, |
1951 | the load will be rebalanced across the remaining devices. | 1951 | the load will be rebalanced across the remaining devices. |
1952 | 1952 | ||
1953 | See Section 13, "Configuring Bonding for Maximum Throughput" | 1953 | See Section 12, "Configuring Bonding for Maximum Throughput" |
1954 | for information on configuring bonding with one peer device. | 1954 | for information on configuring bonding with one peer device. |
1955 | 1955 | ||
1956 | 11.2 High Availability in a Multiple Switch Topology | 1956 | 11.2 High Availability in a Multiple Switch Topology |
@@ -2620,7 +2620,7 @@ be found at: | |||
2620 | 2620 | ||
2621 | https://lists.sourceforge.net/lists/listinfo/bonding-devel | 2621 | https://lists.sourceforge.net/lists/listinfo/bonding-devel |
2622 | 2622 | ||
2623 | Discussions regarding the developpement of the bonding driver take place | 2623 | Discussions regarding the development of the bonding driver take place |
2624 | on the main Linux network mailing list, hosted at vger.kernel.org. The list | 2624 | on the main Linux network mailing list, hosted at vger.kernel.org. The list |
2625 | address is: | 2625 | address is: |
2626 | 2626 | ||
diff --git a/Documentation/networking/bridge.txt b/Documentation/networking/bridge.txt index a7ba5e4e2c91..a27cb6214ed7 100644 --- a/Documentation/networking/bridge.txt +++ b/Documentation/networking/bridge.txt | |||
@@ -1,7 +1,14 @@ | |||
1 | In order to use the Ethernet bridging functionality, you'll need the | 1 | In order to use the Ethernet bridging functionality, you'll need the |
2 | userspace tools. These programs and documentation are available | 2 | userspace tools. |
3 | at http://www.linuxfoundation.org/en/Net:Bridge. The download page is | 3 | |
4 | http://prdownloads.sourceforge.net/bridge. | 4 | Documentation for Linux bridging is on: |
5 | http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge | ||
6 | |||
7 | The bridge-utilities are maintained at: | ||
8 | git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/bridge-utils.git | ||
9 | |||
10 | Additionally, the iproute2 utilities can be used to configure | ||
11 | bridge devices. | ||
5 | 12 | ||
6 | If you still have questions, don't hesitate to post to the mailing list | 13 | If you still have questions, don't hesitate to post to the mailing list |
7 | (more info https://lists.linux-foundation.org/mailman/listinfo/bridge). | 14 | (more info https://lists.linux-foundation.org/mailman/listinfo/bridge). |
diff --git a/Documentation/networking/caif/Linux-CAIF.txt b/Documentation/networking/caif/Linux-CAIF.txt index e52fd62bef3a..0aa4bd381bec 100644 --- a/Documentation/networking/caif/Linux-CAIF.txt +++ b/Documentation/networking/caif/Linux-CAIF.txt | |||
@@ -19,60 +19,36 @@ and host. Currently, UART and Loopback are available for Linux. | |||
19 | Architecture: | 19 | Architecture: |
20 | ------------ | 20 | ------------ |
21 | The implementation of CAIF is divided into: | 21 | The implementation of CAIF is divided into: |
22 | * CAIF Socket Layer, Kernel API, and Net Device. | 22 | * CAIF Socket Layer and GPRS IP Interface. |
23 | * CAIF Core Protocol Implementation | 23 | * CAIF Core Protocol Implementation |
24 | * CAIF Link Layer, implemented as NET devices. | 24 | * CAIF Link Layer, implemented as NET devices. |
25 | 25 | ||
26 | 26 | ||
27 | RTNL | 27 | RTNL |
28 | ! | 28 | ! |
29 | ! +------+ +------+ +------+ | 29 | ! +------+ +------+ |
30 | ! +------+! +------+! +------+! | 30 | ! +------+! +------+! |
31 | ! ! Sock !! !Kernel!! ! Net !! | 31 | ! ! IP !! !Socket!! |
32 | ! ! API !+ ! API !+ ! Dev !+ <- CAIF Client APIs | 32 | +-------> !interf!+ ! API !+ <- CAIF Client APIs |
33 | ! +------+ +------! +------+ | 33 | ! +------+ +------! |
34 | ! ! ! ! | 34 | ! ! ! |
35 | ! +----------!----------+ | 35 | ! +-----------+ |
36 | ! +------+ <- CAIF Protocol Implementation | 36 | ! ! |
37 | +-------> ! CAIF ! | 37 | ! +------+ <- CAIF Core Protocol |
38 | ! Core ! | 38 | ! ! CAIF ! |
39 | +------+ | 39 | ! ! Core ! |
40 | +--------!--------+ | 40 | ! +------+ |
41 | ! ! | 41 | ! +----------!---------+ |
42 | +------+ +-----+ | 42 | ! ! ! ! |
43 | ! ! ! TTY ! <- Link Layer (Net Devices) | 43 | ! +------+ +-----+ +------+ |
44 | +------+ +-----+ | 44 | +--> ! HSI ! ! TTY ! ! USB ! <- Link Layer (Net Devices) |
45 | 45 | +------+ +-----+ +------+ | |
46 | 46 | ||
47 | Using the Kernel API | ||
48 | ---------------------- | ||
49 | The Kernel API is used for accessing CAIF channels from the | ||
50 | kernel. | ||
51 | The user of the API has to implement two callbacks for receive | ||
52 | and control. | ||
53 | The receive callback gives a CAIF packet as a SKB. The control | ||
54 | callback will | ||
55 | notify of channel initialization complete, and flow-on/flow- | ||
56 | off. | ||
57 | |||
58 | |||
59 | struct caif_device caif_dev = { | ||
60 | .caif_config = { | ||
61 | .name = "MYDEV" | ||
62 | .type = CAIF_CHTY_AT | ||
63 | } | ||
64 | .receive_cb = my_receive, | ||
65 | .control_cb = my_control, | ||
66 | }; | ||
67 | caif_add_device(&caif_dev); | ||
68 | caif_transmit(&caif_dev, skb); | ||
69 | |||
70 | See the caif_kernel.h for details about the CAIF kernel API. | ||
71 | 47 | ||
72 | 48 | ||
73 | I M P L E M E N T A T I O N | 49 | I M P L E M E N T A T I O N |
74 | =========================== | 50 | =========================== |
75 | =========================== | 51 | |
76 | 52 | ||
77 | CAIF Core Protocol Layer | 53 | CAIF Core Protocol Layer |
78 | ========================================= | 54 | ========================================= |
@@ -88,17 +64,13 @@ The Core CAIF implementation contains: | |||
88 | - Simple implementation of CAIF. | 64 | - Simple implementation of CAIF. |
89 | - Layered architecture (a la Streams), each layer in the CAIF | 65 | - Layered architecture (a la Streams), each layer in the CAIF |
90 | specification is implemented in a separate c-file. | 66 | specification is implemented in a separate c-file. |
91 | - Clients must implement PHY layer to access physical HW | ||
92 | with receive and transmit functions. | ||
93 | - Clients must call configuration function to add PHY layer. | 67 | - Clients must call configuration function to add PHY layer. |
94 | - Clients must implement CAIF layer to consume/produce | 68 | - Clients must implement CAIF layer to consume/produce |
95 | CAIF payload with receive and transmit functions. | 69 | CAIF payload with receive and transmit functions. |
96 | - Clients must call configuration function to add and connect the | 70 | - Clients must call configuration function to add and connect the |
97 | Client layer. | 71 | Client layer. |
98 | - When receiving / transmitting CAIF Packets (cfpkt), ownership is passed | 72 | - When receiving / transmitting CAIF Packets (cfpkt), ownership is passed |
99 | to the called function (except for framing layers' receive functions | 73 | to the called function (except for framing layers' receive function) |
100 | or if a transmit function returns an error, in which case the caller | ||
101 | must free the packet). | ||
102 | 74 | ||
103 | Layered Architecture | 75 | Layered Architecture |
104 | -------------------- | 76 | -------------------- |
@@ -109,11 +81,6 @@ Implementation. The support functions include: | |||
109 | CAIF Packet has functions for creating, destroying and adding content | 81 | CAIF Packet has functions for creating, destroying and adding content |
110 | and for adding/extracting header and trailers to protocol packets. | 82 | and for adding/extracting header and trailers to protocol packets. |
111 | 83 | ||
112 | - CFLST CAIF list implementation. | ||
113 | |||
114 | - CFGLUE CAIF Glue. Contains OS Specifics, such as memory | ||
115 | allocation, endianness, etc. | ||
116 | |||
117 | The CAIF Protocol implementation contains: | 84 | The CAIF Protocol implementation contains: |
118 | 85 | ||
119 | - CFCNFG CAIF Configuration layer. Configures the CAIF Protocol | 86 | - CFCNFG CAIF Configuration layer. Configures the CAIF Protocol |
@@ -128,7 +95,7 @@ The CAIF Protocol implementation contains: | |||
128 | control and remote shutdown requests. | 95 | control and remote shutdown requests. |
129 | 96 | ||
130 | - CFVEI CAIF VEI layer. Handles CAIF AT Channels on VEI (Virtual | 97 | - CFVEI CAIF VEI layer. Handles CAIF AT Channels on VEI (Virtual |
131 | External Interface). This layer encodes/decodes VEI frames. | 98 | External Interface). This layer encodes/decodes VEI frames. |
132 | 99 | ||
133 | - CFDGML CAIF Datagram layer. Handles CAIF Datagram layer (IP | 100 | - CFDGML CAIF Datagram layer. Handles CAIF Datagram layer (IP |
134 | traffic), encodes/decodes Datagram frames. | 101 | traffic), encodes/decodes Datagram frames. |
@@ -170,7 +137,7 @@ The CAIF Protocol implementation contains: | |||
170 | +---------+ +---------+ | 137 | +---------+ +---------+ |
171 | ! ! | 138 | ! ! |
172 | +---------+ +---------+ | 139 | +---------+ +---------+ |
173 | | | | Serial | | 140 | | | | Serial | |
174 | | | | CFSERL | | 141 | | | | CFSERL | |
175 | +---------+ +---------+ | 142 | +---------+ +---------+ |
176 | 143 | ||
@@ -186,24 +153,20 @@ In this layered approach the following "rules" apply. | |||
186 | layer->dn->transmit(layer->dn, packet); | 153 | layer->dn->transmit(layer->dn, packet); |
187 | 154 | ||
188 | 155 | ||
189 | Linux Driver Implementation | 156 | CAIF Socket and IP interface |
190 | =========================== | 157 | =========================== |
191 | 158 | ||
192 | Linux GPRS Net Device and CAIF socket are implemented on top of the | 159 | The IP interface and CAIF socket API are implemented on top of the |
193 | CAIF Core protocol. The Net device and CAIF socket have an instance of | 160 | CAIF Core protocol. The IP Interface and CAIF socket have an instance of |
194 | 'struct cflayer', just like the CAIF Core protocol stack. | 161 | 'struct cflayer', just like the CAIF Core protocol stack. |
195 | Net device and Socket implement the 'receive()' function defined by | 162 | Net device and Socket implement the 'receive()' function defined by |
196 | 'struct cflayer', just like the rest of the CAIF stack. In this way, transmit and | 163 | 'struct cflayer', just like the rest of the CAIF stack. In this way, transmit and |
197 | receive of packets is handled as by the rest of the layers: the 'dn->transmit()' | 164 | receive of packets is handled as by the rest of the layers: the 'dn->transmit()' |
198 | function is called in order to transmit data. | 165 | function is called in order to transmit data. |
199 | 166 | ||
200 | The layer on top of the CAIF Core implementation is | ||
201 | sometimes referred to as the "Client layer". | ||
202 | |||
203 | |||
204 | Configuration of Link Layer | 167 | Configuration of Link Layer |
205 | --------------------------- | 168 | --------------------------- |
206 | The Link Layer is implemented as Linux net devices (struct net_device). | 169 | The Link Layer is implemented as Linux network devices (struct net_device). |
207 | Payload handling and registration is done using standard Linux mechanisms. | 170 | Payload handling and registration is done using standard Linux mechanisms. |
208 | 171 | ||
209 | The CAIF Protocol relies on a loss-less link layer without implementing | 172 | The CAIF Protocol relies on a loss-less link layer without implementing |
diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt index ac295399f0d4..820f55344edc 100644 --- a/Documentation/networking/can.txt +++ b/Documentation/networking/can.txt | |||
@@ -22,7 +22,8 @@ This file contains | |||
22 | 4.1.2 RAW socket option CAN_RAW_ERR_FILTER | 22 | 4.1.2 RAW socket option CAN_RAW_ERR_FILTER |
23 | 4.1.3 RAW socket option CAN_RAW_LOOPBACK | 23 | 4.1.3 RAW socket option CAN_RAW_LOOPBACK |
24 | 4.1.4 RAW socket option CAN_RAW_RECV_OWN_MSGS | 24 | 4.1.4 RAW socket option CAN_RAW_RECV_OWN_MSGS |
25 | 4.1.5 RAW socket returned message flags | 25 | 4.1.5 RAW socket option CAN_RAW_FD_FRAMES |
26 | 4.1.6 RAW socket returned message flags | ||
26 | 4.2 Broadcast Manager protocol sockets (SOCK_DGRAM) | 27 | 4.2 Broadcast Manager protocol sockets (SOCK_DGRAM) |
27 | 4.3 connected transport protocols (SOCK_SEQPACKET) | 28 | 4.3 connected transport protocols (SOCK_SEQPACKET) |
28 | 4.4 unconnected transport protocols (SOCK_DGRAM) | 29 | 4.4 unconnected transport protocols (SOCK_DGRAM) |
@@ -41,7 +42,8 @@ This file contains | |||
41 | 6.5.1 Netlink interface to set/get devices properties | 42 | 6.5.1 Netlink interface to set/get devices properties |
42 | 6.5.2 Setting the CAN bit-timing | 43 | 6.5.2 Setting the CAN bit-timing |
43 | 6.5.3 Starting and stopping the CAN network device | 44 | 6.5.3 Starting and stopping the CAN network device |
44 | 6.6 supported CAN hardware | 45 | 6.6 CAN FD (flexible data rate) driver support |
46 | 6.7 supported CAN hardware | ||
45 | 47 | ||
46 | 7 Socket CAN resources | 48 | 7 Socket CAN resources |
47 | 49 | ||
@@ -232,16 +234,16 @@ solution for a couple of reasons: | |||
232 | arbitration problems and error frames caused by the different | 234 | arbitration problems and error frames caused by the different |
233 | ECUs. The occurrence of detected errors are important for diagnosis | 235 | ECUs. The occurrence of detected errors are important for diagnosis |
234 | and have to be logged together with the exact timestamp. For this | 236 | and have to be logged together with the exact timestamp. For this |
235 | reason the CAN interface driver can generate so called Error Frames | 237 | reason the CAN interface driver can generate so called Error Message |
236 | that can optionally be passed to the user application in the same | 238 | Frames that can optionally be passed to the user application in the |
237 | way as other CAN frames. Whenever an error on the physical layer | 239 | same way as other CAN frames. Whenever an error on the physical layer |
238 | or the MAC layer is detected (e.g. by the CAN controller) the driver | 240 | or the MAC layer is detected (e.g. by the CAN controller) the driver |
239 | creates an appropriate error frame. Error frames can be requested by | 241 | creates an appropriate error message frame. Error messages frames can |
240 | the user application using the common CAN filter mechanisms. Inside | 242 | be requested by the user application using the common CAN filter |
241 | this filter definition the (interested) type of errors may be | 243 | mechanisms. Inside this filter definition the (interested) type of |
242 | selected. The reception of error frames is disabled by default. | 244 | errors may be selected. The reception of error messages is disabled |
243 | The format of the CAN error frame is briefly described in the Linux | 245 | by default. The format of the CAN error message frame is briefly |
244 | header file "include/linux/can/error.h". | 246 | described in the Linux header file "include/linux/can/error.h". |
245 | 247 | ||
246 | 4. How to use Socket CAN | 248 | 4. How to use Socket CAN |
247 | ------------------------ | 249 | ------------------------ |
@@ -273,7 +275,7 @@ solution for a couple of reasons: | |||
273 | 275 | ||
274 | struct can_frame { | 276 | struct can_frame { |
275 | canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */ | 277 | canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */ |
276 | __u8 can_dlc; /* data length code: 0 .. 8 */ | 278 | __u8 can_dlc; /* frame payload length in byte (0 .. 8) */ |
277 | __u8 data[8] __attribute__((aligned(8))); | 279 | __u8 data[8] __attribute__((aligned(8))); |
278 | }; | 280 | }; |
279 | 281 | ||
@@ -375,6 +377,51 @@ solution for a couple of reasons: | |||
375 | nbytes = sendto(s, &frame, sizeof(struct can_frame), | 377 | nbytes = sendto(s, &frame, sizeof(struct can_frame), |
376 | 0, (struct sockaddr*)&addr, sizeof(addr)); | 378 | 0, (struct sockaddr*)&addr, sizeof(addr)); |
377 | 379 | ||
380 | Remark about CAN FD (flexible data rate) support: | ||
381 | |||
382 | Generally the handling of CAN FD is very similar to the formerly described | ||
383 | examples. The new CAN FD capable CAN controllers support two different | ||
384 | bitrates for the arbitration phase and the payload phase of the CAN FD frame | ||
385 | and up to 64 bytes of payload. This extended payload length breaks all the | ||
386 | kernel interfaces (ABI) which heavily rely on the CAN frame with fixed eight | ||
387 | bytes of payload (struct can_frame) like the CAN_RAW socket. Therefore e.g. | ||
388 | the CAN_RAW socket supports a new socket option CAN_RAW_FD_FRAMES that | ||
389 | switches the socket into a mode that allows the handling of CAN FD frames | ||
390 | and (legacy) CAN frames simultaneously (see section 4.1.5). | ||
391 | |||
392 | The struct canfd_frame is defined in include/linux/can.h: | ||
393 | |||
394 | struct canfd_frame { | ||
395 | canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */ | ||
396 | __u8 len; /* frame payload length in byte (0 .. 64) */ | ||
397 | __u8 flags; /* additional flags for CAN FD */ | ||
398 | __u8 __res0; /* reserved / padding */ | ||
399 | __u8 __res1; /* reserved / padding */ | ||
400 | __u8 data[64] __attribute__((aligned(8))); | ||
401 | }; | ||
402 | |||
403 | The struct canfd_frame and the existing struct can_frame have the can_id, | ||
404 | the payload length and the payload data at the same offset inside their | ||
405 | structures. This allows to handle the different structures very similar. | ||
406 | When the content of a struct can_frame is copied into a struct canfd_frame | ||
407 | all structure elements can be used as-is - only the data[] becomes extended. | ||
408 | |||
409 | When introducing the struct canfd_frame it turned out that the data length | ||
410 | code (DLC) of the struct can_frame was used as a length information as the | ||
411 | length and the DLC has a 1:1 mapping in the range of 0 .. 8. To preserve | ||
412 | the easy handling of the length information the canfd_frame.len element | ||
413 | contains a plain length value from 0 .. 64. So both canfd_frame.len and | ||
414 | can_frame.can_dlc are equal and contain a length information and no DLC. | ||
415 | For details about the distinction of CAN and CAN FD capable devices and | ||
416 | the mapping to the bus-relevant data length code (DLC), see chapter 6.6. | ||
417 | |||
418 | The length of the two CAN(FD) frame structures define the maximum transfer | ||
419 | unit (MTU) of the CAN(FD) network interface and skbuff data length. Two | ||
420 | definitions are specified for CAN specific MTUs in include/linux/can.h : | ||
421 | |||
422 | #define CAN_MTU (sizeof(struct can_frame)) == 16 => 'legacy' CAN frame | ||
423 | #define CANFD_MTU (sizeof(struct canfd_frame)) == 72 => CAN FD frame | ||
424 | |||
378 | 4.1 RAW protocol sockets with can_filters (SOCK_RAW) | 425 | 4.1 RAW protocol sockets with can_filters (SOCK_RAW) |
379 | 426 | ||
380 | Using CAN_RAW sockets is extensively comparable to the commonly | 427 | Using CAN_RAW sockets is extensively comparable to the commonly |
@@ -383,7 +430,7 @@ solution for a couple of reasons: | |||
383 | defaults are set at RAW socket binding time: | 430 | defaults are set at RAW socket binding time: |
384 | 431 | ||
385 | - The filters are set to exactly one filter receiving everything | 432 | - The filters are set to exactly one filter receiving everything |
386 | - The socket only receives valid data frames (=> no error frames) | 433 | - The socket only receives valid data frames (=> no error message frames) |
387 | - The loopback of sent CAN frames is enabled (see chapter 3.2) | 434 | - The loopback of sent CAN frames is enabled (see chapter 3.2) |
388 | - The socket does not receive its own sent frames (in loopback mode) | 435 | - The socket does not receive its own sent frames (in loopback mode) |
389 | 436 | ||
@@ -434,7 +481,7 @@ solution for a couple of reasons: | |||
434 | 4.1.2 RAW socket option CAN_RAW_ERR_FILTER | 481 | 4.1.2 RAW socket option CAN_RAW_ERR_FILTER |
435 | 482 | ||
436 | As described in chapter 3.4 the CAN interface driver can generate so | 483 | As described in chapter 3.4 the CAN interface driver can generate so |
437 | called Error Frames that can optionally be passed to the user | 484 | called Error Message Frames that can optionally be passed to the user |
438 | application in the same way as other CAN frames. The possible | 485 | application in the same way as other CAN frames. The possible |
439 | errors are divided into different error classes that may be filtered | 486 | errors are divided into different error classes that may be filtered |
440 | using the appropriate error mask. To register for every possible | 487 | using the appropriate error mask. To register for every possible |
@@ -472,7 +519,69 @@ solution for a couple of reasons: | |||
472 | setsockopt(s, SOL_CAN_RAW, CAN_RAW_RECV_OWN_MSGS, | 519 | setsockopt(s, SOL_CAN_RAW, CAN_RAW_RECV_OWN_MSGS, |
473 | &recv_own_msgs, sizeof(recv_own_msgs)); | 520 | &recv_own_msgs, sizeof(recv_own_msgs)); |
474 | 521 | ||
475 | 4.1.5 RAW socket returned message flags | 522 | 4.1.5 RAW socket option CAN_RAW_FD_FRAMES |
523 | |||
524 | CAN FD support in CAN_RAW sockets can be enabled with a new socket option | ||
525 | CAN_RAW_FD_FRAMES which is off by default. When the new socket option is | ||
526 | not supported by the CAN_RAW socket (e.g. on older kernels), switching the | ||
527 | CAN_RAW_FD_FRAMES option returns the error -ENOPROTOOPT. | ||
528 | |||
529 | Once CAN_RAW_FD_FRAMES is enabled the application can send both CAN frames | ||
530 | and CAN FD frames. OTOH the application has to handle CAN and CAN FD frames | ||
531 | when reading from the socket. | ||
532 | |||
533 | CAN_RAW_FD_FRAMES enabled: CAN_MTU and CANFD_MTU are allowed | ||
534 | CAN_RAW_FD_FRAMES disabled: only CAN_MTU is allowed (default) | ||
535 | |||
536 | Example: | ||
537 | [ remember: CANFD_MTU == sizeof(struct canfd_frame) ] | ||
538 | |||
539 | struct canfd_frame cfd; | ||
540 | |||
541 | nbytes = read(s, &cfd, CANFD_MTU); | ||
542 | |||
543 | if (nbytes == CANFD_MTU) { | ||
544 | printf("got CAN FD frame with length %d\n", cfd.len); | ||
545 | /* cfd.flags contains valid data */ | ||
546 | } else if (nbytes == CAN_MTU) { | ||
547 | printf("got legacy CAN frame with length %d\n", cfd.len); | ||
548 | /* cfd.flags is undefined */ | ||
549 | } else { | ||
550 | fprintf(stderr, "read: invalid CAN(FD) frame\n"); | ||
551 | return 1; | ||
552 | } | ||
553 | |||
554 | /* the content can be handled independently from the received MTU size */ | ||
555 | |||
556 | printf("can_id: %X data length: %d data: ", cfd.can_id, cfd.len); | ||
557 | for (i = 0; i < cfd.len; i++) | ||
558 | printf("%02X ", cfd.data[i]); | ||
559 | |||
560 | When reading with size CANFD_MTU only returns CAN_MTU bytes that have | ||
561 | been received from the socket a legacy CAN frame has been read into the | ||
562 | provided CAN FD structure. Note that the canfd_frame.flags data field is | ||
563 | not specified in the struct can_frame and therefore it is only valid in | ||
564 | CANFD_MTU sized CAN FD frames. | ||
565 | |||
566 | As long as the payload length is <=8 the received CAN frames from CAN FD | ||
567 | capable CAN devices can be received and read by legacy sockets too. When | ||
568 | user-generated CAN FD frames have a payload length <=8 these can be send | ||
569 | by legacy CAN network interfaces too. Sending CAN FD frames with payload | ||
570 | length > 8 to a legacy CAN network interface returns an -EMSGSIZE error. | ||
571 | |||
572 | Implementation hint for new CAN applications: | ||
573 | |||
574 | To build a CAN FD aware application use struct canfd_frame as basic CAN | ||
575 | data structure for CAN_RAW based applications. When the application is | ||
576 | executed on an older Linux kernel and switching the CAN_RAW_FD_FRAMES | ||
577 | socket option returns an error: No problem. You'll get legacy CAN frames | ||
578 | or CAN FD frames and can process them the same way. | ||
579 | |||
580 | When sending to CAN devices make sure that the device is capable to handle | ||
581 | CAN FD frames by checking if the device maximum transfer unit is CANFD_MTU. | ||
582 | The CAN device MTU can be retrieved e.g. with a SIOCGIFMTU ioctl() syscall. | ||
583 | |||
584 | 4.1.6 RAW socket returned message flags | ||
476 | 585 | ||
477 | When using recvmsg() call, the msg->msg_flags may contain following flags: | 586 | When using recvmsg() call, the msg->msg_flags may contain following flags: |
478 | 587 | ||
@@ -527,7 +636,7 @@ solution for a couple of reasons: | |||
527 | 636 | ||
528 | rcvlist_all - list for unfiltered entries (no filter operations) | 637 | rcvlist_all - list for unfiltered entries (no filter operations) |
529 | rcvlist_eff - list for single extended frame (EFF) entries | 638 | rcvlist_eff - list for single extended frame (EFF) entries |
530 | rcvlist_err - list for error frames masks | 639 | rcvlist_err - list for error message frames masks |
531 | rcvlist_fil - list for mask/value filters | 640 | rcvlist_fil - list for mask/value filters |
532 | rcvlist_inv - list for mask/value filters (inverse semantic) | 641 | rcvlist_inv - list for mask/value filters (inverse semantic) |
533 | rcvlist_sff - list for single standard frame (SFF) entries | 642 | rcvlist_sff - list for single standard frame (SFF) entries |
@@ -573,10 +682,13 @@ solution for a couple of reasons: | |||
573 | dev->type = ARPHRD_CAN; /* the netdevice hardware type */ | 682 | dev->type = ARPHRD_CAN; /* the netdevice hardware type */ |
574 | dev->flags = IFF_NOARP; /* CAN has no arp */ | 683 | dev->flags = IFF_NOARP; /* CAN has no arp */ |
575 | 684 | ||
576 | dev->mtu = sizeof(struct can_frame); | 685 | dev->mtu = CAN_MTU; /* sizeof(struct can_frame) -> legacy CAN interface */ |
577 | 686 | ||
578 | The struct can_frame is the payload of each socket buffer in the | 687 | or alternative, when the controller supports CAN with flexible data rate: |
579 | protocol family PF_CAN. | 688 | dev->mtu = CANFD_MTU; /* sizeof(struct canfd_frame) -> CAN FD interface */ |
689 | |||
690 | The struct can_frame or struct canfd_frame is the payload of each socket | ||
691 | buffer (skbuff) in the protocol family PF_CAN. | ||
580 | 692 | ||
581 | 6.2 local loopback of sent frames | 693 | 6.2 local loopback of sent frames |
582 | 694 | ||
@@ -784,15 +896,41 @@ solution for a couple of reasons: | |||
784 | $ ip link set canX type can restart-ms 100 | 896 | $ ip link set canX type can restart-ms 100 |
785 | 897 | ||
786 | Alternatively, the application may realize the "bus-off" condition | 898 | Alternatively, the application may realize the "bus-off" condition |
787 | by monitoring CAN error frames and do a restart when appropriate with | 899 | by monitoring CAN error message frames and do a restart when |
788 | the command: | 900 | appropriate with the command: |
789 | 901 | ||
790 | $ ip link set canX type can restart | 902 | $ ip link set canX type can restart |
791 | 903 | ||
792 | Note that a restart will also create a CAN error frame (see also | 904 | Note that a restart will also create a CAN error message frame (see |
793 | chapter 3.4). | 905 | also chapter 3.4). |
906 | |||
907 | 6.6 CAN FD (flexible data rate) driver support | ||
908 | |||
909 | CAN FD capable CAN controllers support two different bitrates for the | ||
910 | arbitration phase and the payload phase of the CAN FD frame. Therefore a | ||
911 | second bittiming has to be specified in order to enable the CAN FD bitrate. | ||
912 | |||
913 | Additionally CAN FD capable CAN controllers support up to 64 bytes of | ||
914 | payload. The representation of this length in can_frame.can_dlc and | ||
915 | canfd_frame.len for userspace applications and inside the Linux network | ||
916 | layer is a plain value from 0 .. 64 instead of the CAN 'data length code'. | ||
917 | The data length code was a 1:1 mapping to the payload length in the legacy | ||
918 | CAN frames anyway. The payload length to the bus-relevant DLC mapping is | ||
919 | only performed inside the CAN drivers, preferably with the helper | ||
920 | functions can_dlc2len() and can_len2dlc(). | ||
921 | |||
922 | The CAN netdevice driver capabilities can be distinguished by the network | ||
923 | devices maximum transfer unit (MTU): | ||
924 | |||
925 | MTU = 16 (CAN_MTU) => sizeof(struct can_frame) => 'legacy' CAN device | ||
926 | MTU = 72 (CANFD_MTU) => sizeof(struct canfd_frame) => CAN FD capable device | ||
927 | |||
928 | The CAN device MTU can be retrieved e.g. with a SIOCGIFMTU ioctl() syscall. | ||
929 | N.B. CAN FD capable devices can also handle and send legacy CAN frames. | ||
930 | |||
931 | FIXME: Add details about the CAN FD controller configuration when available. | ||
794 | 932 | ||
795 | 6.6 Supported CAN hardware | 933 | 6.7 Supported CAN hardware |
796 | 934 | ||
797 | Please check the "Kconfig" file in "drivers/net/can" to get an actual | 935 | Please check the "Kconfig" file in "drivers/net/can" to get an actual |
798 | list of the support CAN hardware. On the Socket CAN project website | 936 | list of the support CAN hardware. On the Socket CAN project website |
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index 6f896b94abdc..ca447b35b833 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -48,12 +48,6 @@ min_adv_mss - INTEGER | |||
48 | The advertised MSS depends on the first hop route MTU, but will | 48 | The advertised MSS depends on the first hop route MTU, but will |
49 | never be lower than this setting. | 49 | never be lower than this setting. |
50 | 50 | ||
51 | rt_cache_rebuild_count - INTEGER | ||
52 | The per net-namespace route cache emergency rebuild threshold. | ||
53 | Any net-namespace having its route cache rebuilt due to | ||
54 | a hash bucket chain being too long more than this many times | ||
55 | will have its route caching disabled | ||
56 | |||
57 | IP Fragmentation: | 51 | IP Fragmentation: |
58 | 52 | ||
59 | ipfrag_high_thresh - INTEGER | 53 | ipfrag_high_thresh - INTEGER |
@@ -468,6 +462,19 @@ tcp_syncookies - BOOLEAN | |||
468 | SYN flood warnings in logs not being really flooded, your server | 462 | SYN flood warnings in logs not being really flooded, your server |
469 | is seriously misconfigured. | 463 | is seriously misconfigured. |
470 | 464 | ||
465 | tcp_fastopen - INTEGER | ||
466 | Enable TCP Fast Open feature (draft-ietf-tcpm-fastopen) to send data | ||
467 | in the opening SYN packet. To use this feature, the client application | ||
468 | must not use connect(). Instead, it should use sendmsg() or sendto() | ||
469 | with MSG_FASTOPEN flag which performs a TCP handshake automatically. | ||
470 | |||
471 | The values (bitmap) are: | ||
472 | 1: Enables sending data in the opening SYN on the client | ||
473 | 5: Enables sending data in the opening SYN on the client regardless | ||
474 | of cookie availability. | ||
475 | |||
476 | Default: 0 | ||
477 | |||
471 | tcp_syn_retries - INTEGER | 478 | tcp_syn_retries - INTEGER |
472 | Number of times initial SYNs for an active TCP connection attempt | 479 | Number of times initial SYNs for an active TCP connection attempt |
473 | will be retransmitted. Should not be higher than 255. Default value | 480 | will be retransmitted. Should not be higher than 255. Default value |
@@ -551,6 +558,25 @@ tcp_thin_dupack - BOOLEAN | |||
551 | Documentation/networking/tcp-thin.txt | 558 | Documentation/networking/tcp-thin.txt |
552 | Default: 0 | 559 | Default: 0 |
553 | 560 | ||
561 | tcp_limit_output_bytes - INTEGER | ||
562 | Controls TCP Small Queue limit per tcp socket. | ||
563 | TCP bulk sender tends to increase packets in flight until it | ||
564 | gets losses notifications. With SNDBUF autotuning, this can | ||
565 | result in a large amount of packets queued in qdisc/device | ||
566 | on the local machine, hurting latency of other flows, for | ||
567 | typical pfifo_fast qdiscs. | ||
568 | tcp_limit_output_bytes limits the number of bytes on qdisc | ||
569 | or device to reduce artificial RTT/cwnd and reduce bufferbloat. | ||
570 | Note: For GSO/TSO enabled flows, we try to have at least two | ||
571 | packets in flight. Reducing tcp_limit_output_bytes might also | ||
572 | reduce the size of individual GSO packet (64KB being the max) | ||
573 | Default: 131072 | ||
574 | |||
575 | tcp_challenge_ack_limit - INTEGER | ||
576 | Limits number of Challenge ACK sent per second, as recommended | ||
577 | in RFC 5961 (Improving TCP's Robustness to Blind In-Window Attacks) | ||
578 | Default: 100 | ||
579 | |||
554 | UDP variables: | 580 | UDP variables: |
555 | 581 | ||
556 | udp_mem - vector of 3 INTEGERs: min, pressure, max | 582 | udp_mem - vector of 3 INTEGERs: min, pressure, max |
@@ -857,9 +883,19 @@ accept_source_route - BOOLEAN | |||
857 | FALSE (host) | 883 | FALSE (host) |
858 | 884 | ||
859 | accept_local - BOOLEAN | 885 | accept_local - BOOLEAN |
860 | Accept packets with local source addresses. In combination with | 886 | Accept packets with local source addresses. In combination |
861 | suitable routing, this can be used to direct packets between two | 887 | with suitable routing, this can be used to direct packets |
862 | local interfaces over the wire and have them accepted properly. | 888 | between two local interfaces over the wire and have them |
889 | accepted properly. | ||
890 | |||
891 | rp_filter must be set to a non-zero value in order for | ||
892 | accept_local to have an effect. | ||
893 | |||
894 | default FALSE | ||
895 | |||
896 | route_localnet - BOOLEAN | ||
897 | Do not consider loopback addresses as martian source or destination | ||
898 | while routing. This enables the use of 127/8 for local routing purposes. | ||
863 | default FALSE | 899 | default FALSE |
864 | 900 | ||
865 | rp_filter - INTEGER | 901 | rp_filter - INTEGER |
@@ -1398,6 +1434,20 @@ path_max_retrans - INTEGER | |||
1398 | 1434 | ||
1399 | Default: 5 | 1435 | Default: 5 |
1400 | 1436 | ||
1437 | pf_retrans - INTEGER | ||
1438 | The number of retransmissions that will be attempted on a given path | ||
1439 | before traffic is redirected to an alternate transport (should one | ||
1440 | exist). Note this is distinct from path_max_retrans, as a path that | ||
1441 | passes the pf_retrans threshold can still be used. Its only | ||
1442 | deprioritized when a transmission path is selected by the stack. This | ||
1443 | setting is primarily used to enable fast failover mechanisms without | ||
1444 | having to reduce path_max_retrans to a very low value. See: | ||
1445 | http://www.ietf.org/id/draft-nishida-tsvwg-sctp-failover-05.txt | ||
1446 | for details. Note also that a value of pf_retrans > path_max_retrans | ||
1447 | disables this feature | ||
1448 | |||
1449 | Default: 0 | ||
1450 | |||
1401 | rto_initial - INTEGER | 1451 | rto_initial - INTEGER |
1402 | The initial round trip timeout value in milliseconds that will be used | 1452 | The initial round trip timeout value in milliseconds that will be used |
1403 | in calculating round trip times. This is the initial time interval | 1453 | in calculating round trip times. This is the initial time interval |
diff --git a/Documentation/networking/openvswitch.txt b/Documentation/networking/openvswitch.txt index b8a048b8df3a..8fa2dd1e792e 100644 --- a/Documentation/networking/openvswitch.txt +++ b/Documentation/networking/openvswitch.txt | |||
@@ -118,7 +118,7 @@ essentially like this, ignoring metadata: | |||
118 | Naively, to add VLAN support, it makes sense to add a new "vlan" flow | 118 | Naively, to add VLAN support, it makes sense to add a new "vlan" flow |
119 | key attribute to contain the VLAN tag, then continue to decode the | 119 | key attribute to contain the VLAN tag, then continue to decode the |
120 | encapsulated headers beyond the VLAN tag using the existing field | 120 | encapsulated headers beyond the VLAN tag using the existing field |
121 | definitions. With this change, an TCP packet in VLAN 10 would have a | 121 | definitions. With this change, a TCP packet in VLAN 10 would have a |
122 | flow key much like this: | 122 | flow key much like this: |
123 | 123 | ||
124 | eth(...), vlan(vid=10, pcp=0), eth_type(0x0800), ip(proto=6, ...), tcp(...) | 124 | eth(...), vlan(vid=10, pcp=0), eth_type(0x0800), ip(proto=6, ...), tcp(...) |
diff --git a/Documentation/networking/s2io.txt b/Documentation/networking/s2io.txt index 4be0c039edbc..d2a9f43b5546 100644 --- a/Documentation/networking/s2io.txt +++ b/Documentation/networking/s2io.txt | |||
@@ -136,16 +136,6 @@ For more information, please review the AMD8131 errata at | |||
136 | http://vip.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/ | 136 | http://vip.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/ |
137 | 26310_AMD-8131_HyperTransport_PCI-X_Tunnel_Revision_Guide_rev_3_18.pdf | 137 | 26310_AMD-8131_HyperTransport_PCI-X_Tunnel_Revision_Guide_rev_3_18.pdf |
138 | 138 | ||
139 | 6. Available Downloads | 139 | 6. Support |
140 | Neterion "s2io" driver in Red Hat and Suse 2.6-based distributions is kept up | ||
141 | to date, also the latest "s2io" code (including support for 2.4 kernels) is | ||
142 | available via "Support" link on the Neterion site: http://www.neterion.com. | ||
143 | |||
144 | For Xframe User Guide (Programming manual), visit ftp site ns1.s2io.com, | ||
145 | user: linuxdocs password: HALdocs | ||
146 | |||
147 | 7. Support | ||
148 | For further support please contact either your 10GbE Xframe NIC vendor (IBM, | 140 | For further support please contact either your 10GbE Xframe NIC vendor (IBM, |
149 | HP, SGI etc.) or click on the "Support" link on the Neterion site: | 141 | HP, SGI etc.) |
150 | http://www.neterion.com. | ||
151 | |||
diff --git a/Documentation/networking/stmmac.txt b/Documentation/networking/stmmac.txt index 5cb9a1972460..c676b9cedbd0 100644 --- a/Documentation/networking/stmmac.txt +++ b/Documentation/networking/stmmac.txt | |||
@@ -257,9 +257,11 @@ reset procedure etc). | |||
257 | o Makefile | 257 | o Makefile |
258 | o stmmac_main.c: main network device driver; | 258 | o stmmac_main.c: main network device driver; |
259 | o stmmac_mdio.c: mdio functions; | 259 | o stmmac_mdio.c: mdio functions; |
260 | o stmmac_pci: PCI driver; | ||
261 | o stmmac_platform.c: platform driver | ||
260 | o stmmac_ethtool.c: ethtool support; | 262 | o stmmac_ethtool.c: ethtool support; |
261 | o stmmac_timer.[ch]: timer code used for mitigating the driver dma interrupts | 263 | o stmmac_timer.[ch]: timer code used for mitigating the driver dma interrupts |
262 | Only tested on ST40 platforms based. | 264 | (only tested on ST40 platforms based); |
263 | o stmmac.h: private driver structure; | 265 | o stmmac.h: private driver structure; |
264 | o common.h: common definitions and VFTs; | 266 | o common.h: common definitions and VFTs; |
265 | o descs.h: descriptor structure definitions; | 267 | o descs.h: descriptor structure definitions; |
@@ -269,9 +271,11 @@ reset procedure etc). | |||
269 | o dwmac100_core: MAC 100 core and dma code; | 271 | o dwmac100_core: MAC 100 core and dma code; |
270 | o dwmac100_dma.c: dma funtions for the MAC chip; | 272 | o dwmac100_dma.c: dma funtions for the MAC chip; |
271 | o dwmac1000.h: specific header file for the MAC; | 273 | o dwmac1000.h: specific header file for the MAC; |
272 | o dwmac_lib.c: generic DMA functions shared among chips | 274 | o dwmac_lib.c: generic DMA functions shared among chips; |
273 | o enh_desc.c: functions for handling enhanced descriptors | 275 | o enh_desc.c: functions for handling enhanced descriptors; |
274 | o norm_desc.c: functions for handling normal descriptors | 276 | o norm_desc.c: functions for handling normal descriptors; |
277 | o chain_mode.c/ring_mode.c:: functions to manage RING/CHAINED modes; | ||
278 | o mmc_core.c/mmc.h: Management MAC Counters; | ||
275 | 279 | ||
276 | 5) Debug Information | 280 | 5) Debug Information |
277 | 281 | ||
@@ -304,7 +308,27 @@ All these are only useful during the developing stage | |||
304 | and should never enabled inside the code for general usage. | 308 | and should never enabled inside the code for general usage. |
305 | In fact, these can generate an huge amount of debug messages. | 309 | In fact, these can generate an huge amount of debug messages. |
306 | 310 | ||
307 | 6) TODO: | 311 | 6) Energy Efficient Ethernet |
312 | |||
313 | Energy Efficient Ethernet(EEE) enables IEEE 802.3 MAC sublayer along | ||
314 | with a family of Physical layer to operate in the Low power Idle(LPI) | ||
315 | mode. The EEE mode supports the IEEE 802.3 MAC operation at 100Mbps, | ||
316 | 1000Mbps & 10Gbps. | ||
317 | |||
318 | The LPI mode allows power saving by switching off parts of the | ||
319 | communication device functionality when there is no data to be | ||
320 | transmitted & received. The system on both the side of the link can | ||
321 | disable some functionalities & save power during the period of low-link | ||
322 | utilization. The MAC controls whether the system should enter or exit | ||
323 | the LPI mode & communicate this to PHY. | ||
324 | |||
325 | As soon as the interface is opened, the driver verifies if the EEE can | ||
326 | be supported. This is done by looking at both the DMA HW capability | ||
327 | register and the PHY devices MCD registers. | ||
328 | To enter in Tx LPI mode the driver needs to have a software timer | ||
329 | that enable and disable the LPI mode when there is nothing to be | ||
330 | transmitted. | ||
331 | |||
332 | 7) TODO: | ||
308 | o XGMAC is not supported. | 333 | o XGMAC is not supported. |
309 | o Add the EEE - Energy Efficient Ethernet | ||
310 | o Add the PTP - precision time protocol | 334 | o Add the PTP - precision time protocol |
diff --git a/Documentation/networking/vxge.txt b/Documentation/networking/vxge.txt index d2e2997e6fa0..bb76c667a476 100644 --- a/Documentation/networking/vxge.txt +++ b/Documentation/networking/vxge.txt | |||
@@ -91,10 +91,3 @@ v) addr_learn_en | |||
91 | virtualization environment. | 91 | virtualization environment. |
92 | Valid range: 0,1 (disabled, enabled respectively) | 92 | Valid range: 0,1 (disabled, enabled respectively) |
93 | Default: 0 | 93 | Default: 0 |
94 | |||
95 | 4) Troubleshooting: | ||
96 | ------------------- | ||
97 | |||
98 | To resolve an issue with the source code or X3100 series adapter, please collect | ||
99 | the statistics, register dumps using ethool, relevant logs and email them to | ||
100 | support@neterion.com. | ||
diff --git a/Documentation/nfc/nfc-hci.txt b/Documentation/nfc/nfc-hci.txt index 320f9336c781..89a339c9b079 100644 --- a/Documentation/nfc/nfc-hci.txt +++ b/Documentation/nfc/nfc-hci.txt | |||
@@ -178,3 +178,36 @@ ANY_GET_PARAMETER to the reader A gate to get information on the target | |||
178 | that was discovered). | 178 | that was discovered). |
179 | 179 | ||
180 | Typically, such an event will be propagated to NFC Core from MSGRXWQ context. | 180 | Typically, such an event will be propagated to NFC Core from MSGRXWQ context. |
181 | |||
182 | Error management | ||
183 | ---------------- | ||
184 | |||
185 | Errors that occur synchronously with the execution of an NFC Core request are | ||
186 | simply returned as the execution result of the request. These are easy. | ||
187 | |||
188 | Errors that occur asynchronously (e.g. in a background protocol handling thread) | ||
189 | must be reported such that upper layers don't stay ignorant that something | ||
190 | went wrong below and know that expected events will probably never happen. | ||
191 | Handling of these errors is done as follows: | ||
192 | |||
193 | - driver (pn544) fails to deliver an incoming frame: it stores the error such | ||
194 | that any subsequent call to the driver will result in this error. Then it calls | ||
195 | the standard nfc_shdlc_recv_frame() with a NULL argument to report the problem | ||
196 | above. shdlc stores a EREMOTEIO sticky status, which will trigger SMW to | ||
197 | report above in turn. | ||
198 | |||
199 | - SMW is basically a background thread to handle incoming and outgoing shdlc | ||
200 | frames. This thread will also check the shdlc sticky status and report to HCI | ||
201 | when it discovers it is not able to run anymore because of an unrecoverable | ||
202 | error that happened within shdlc or below. If the problem occurs during shdlc | ||
203 | connection, the error is reported through the connect completion. | ||
204 | |||
205 | - HCI: if an internal HCI error happens (frame is lost), or HCI is reported an | ||
206 | error from a lower layer, HCI will either complete the currently executing | ||
207 | command with that error, or notify NFC Core directly if no command is executing. | ||
208 | |||
209 | - NFC Core: when NFC Core is notified of an error from below and polling is | ||
210 | active, it will send a tag discovered event with an empty tag list to the user | ||
211 | space to let it know that the poll operation will never be able to detect a tag. | ||
212 | If polling is not active and the error was sticky, lower levels will return it | ||
213 | at next invocation. | ||
diff --git a/Documentation/power/devices.txt b/Documentation/power/devices.txt index 872815cd41d3..504dfe4d52eb 100644 --- a/Documentation/power/devices.txt +++ b/Documentation/power/devices.txt | |||
@@ -583,9 +583,10 @@ for the given device during all power transitions, instead of the respective | |||
583 | subsystem-level callbacks. Specifically, if a device's pm_domain pointer is | 583 | subsystem-level callbacks. Specifically, if a device's pm_domain pointer is |
584 | not NULL, the ->suspend() callback from the object pointed to by it will be | 584 | not NULL, the ->suspend() callback from the object pointed to by it will be |
585 | executed instead of its subsystem's (e.g. bus type's) ->suspend() callback and | 585 | executed instead of its subsystem's (e.g. bus type's) ->suspend() callback and |
586 | anlogously for all of the remaining callbacks. In other words, power management | 586 | analogously for all of the remaining callbacks. In other words, power |
587 | domain callbacks, if defined for the given device, always take precedence over | 587 | management domain callbacks, if defined for the given device, always take |
588 | the callbacks provided by the device's subsystem (e.g. bus type). | 588 | precedence over the callbacks provided by the device's subsystem (e.g. bus |
589 | type). | ||
589 | 590 | ||
590 | The support for device power management domains is only relevant to platforms | 591 | The support for device power management domains is only relevant to platforms |
591 | needing to use the same device driver power management callbacks in many | 592 | needing to use the same device driver power management callbacks in many |
@@ -598,7 +599,7 @@ it into account in any way. | |||
598 | Device Low Power (suspend) States | 599 | Device Low Power (suspend) States |
599 | --------------------------------- | 600 | --------------------------------- |
600 | Device low-power states aren't standard. One device might only handle | 601 | Device low-power states aren't standard. One device might only handle |
601 | "on" and "off, while another might support a dozen different versions of | 602 | "on" and "off", while another might support a dozen different versions of |
602 | "on" (how many engines are active?), plus a state that gets back to "on" | 603 | "on" (how many engines are active?), plus a state that gets back to "on" |
603 | faster than from a full "off". | 604 | faster than from a full "off". |
604 | 605 | ||
diff --git a/Documentation/power/power_supply_class.txt b/Documentation/power/power_supply_class.txt index 211831d4095f..2f0ddc15b5ac 100644 --- a/Documentation/power/power_supply_class.txt +++ b/Documentation/power/power_supply_class.txt | |||
@@ -112,14 +112,24 @@ CHARGE_COUNTER - the current charge counter (in µAh). This could easily | |||
112 | be negative; there is no empty or full value. It is only useful for | 112 | be negative; there is no empty or full value. It is only useful for |
113 | relative, time-based measurements. | 113 | relative, time-based measurements. |
114 | 114 | ||
115 | CONSTANT_CHARGE_CURRENT - constant charge current programmed by charger. | ||
116 | |||
117 | CONSTANT_CHARGE_VOLTAGE - constant charge voltage programmed by charger. | ||
118 | |||
115 | ENERGY_FULL, ENERGY_EMPTY - same as above but for energy. | 119 | ENERGY_FULL, ENERGY_EMPTY - same as above but for energy. |
116 | 120 | ||
117 | CAPACITY - capacity in percents. | 121 | CAPACITY - capacity in percents. |
122 | CAPACITY_ALERT_MIN - minimum capacity alert value in percents. | ||
123 | CAPACITY_ALERT_MAX - maximum capacity alert value in percents. | ||
118 | CAPACITY_LEVEL - capacity level. This corresponds to | 124 | CAPACITY_LEVEL - capacity level. This corresponds to |
119 | POWER_SUPPLY_CAPACITY_LEVEL_*. | 125 | POWER_SUPPLY_CAPACITY_LEVEL_*. |
120 | 126 | ||
121 | TEMP - temperature of the power supply. | 127 | TEMP - temperature of the power supply. |
128 | TEMP_ALERT_MIN - minimum battery temperature alert value in milli centigrade. | ||
129 | TEMP_ALERT_MAX - maximum battery temperature alert value in milli centigrade. | ||
122 | TEMP_AMBIENT - ambient temperature. | 130 | TEMP_AMBIENT - ambient temperature. |
131 | TEMP_AMBIENT_ALERT_MIN - minimum ambient temperature alert value in milli centigrade. | ||
132 | TEMP_AMBIENT_ALERT_MAX - maximum ambient temperature alert value in milli centigrade. | ||
123 | 133 | ||
124 | TIME_TO_EMPTY - seconds left for battery to be considered empty (i.e. | 134 | TIME_TO_EMPTY - seconds left for battery to be considered empty (i.e. |
125 | while battery powers a load) | 135 | while battery powers a load) |
diff --git a/Documentation/power/swsusp.txt b/Documentation/power/swsusp.txt index ac190cf1963e..92341b84250d 100644 --- a/Documentation/power/swsusp.txt +++ b/Documentation/power/swsusp.txt | |||
@@ -33,6 +33,11 @@ echo shutdown > /sys/power/disk; echo disk > /sys/power/state | |||
33 | 33 | ||
34 | echo platform > /sys/power/disk; echo disk > /sys/power/state | 34 | echo platform > /sys/power/disk; echo disk > /sys/power/state |
35 | 35 | ||
36 | . If you would like to write hibernation image to swap and then suspend | ||
37 | to RAM (provided your platform supports it), you can try | ||
38 | |||
39 | echo suspend > /sys/power/disk; echo disk > /sys/power/state | ||
40 | |||
36 | . If you have SATA disks, you'll need recent kernels with SATA suspend | 41 | . If you have SATA disks, you'll need recent kernels with SATA suspend |
37 | support. For suspend and resume to work, make sure your disk drivers | 42 | support. For suspend and resume to work, make sure your disk drivers |
38 | are built into kernel -- not modules. [There's way to make | 43 | are built into kernel -- not modules. [There's way to make |
diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt index 5df176ed59b8..7561d7ed8e11 100644 --- a/Documentation/printk-formats.txt +++ b/Documentation/printk-formats.txt | |||
@@ -53,9 +53,20 @@ Struct Resources: | |||
53 | For printing struct resources. The 'R' and 'r' specifiers result in a | 53 | For printing struct resources. The 'R' and 'r' specifiers result in a |
54 | printed resource with ('R') or without ('r') a decoded flags member. | 54 | printed resource with ('R') or without ('r') a decoded flags member. |
55 | 55 | ||
56 | Raw buffer as a hex string: | ||
57 | %*ph 00 01 02 ... 3f | ||
58 | %*phC 00:01:02: ... :3f | ||
59 | %*phD 00-01-02- ... -3f | ||
60 | %*phN 000102 ... 3f | ||
61 | |||
62 | For printing a small buffers (up to 64 bytes long) as a hex string with | ||
63 | certain separator. For the larger buffers consider to use | ||
64 | print_hex_dump(). | ||
65 | |||
56 | MAC/FDDI addresses: | 66 | MAC/FDDI addresses: |
57 | 67 | ||
58 | %pM 00:01:02:03:04:05 | 68 | %pM 00:01:02:03:04:05 |
69 | %pMR 05:04:03:02:01:00 | ||
59 | %pMF 00-01-02-03-04-05 | 70 | %pMF 00-01-02-03-04-05 |
60 | %pm 000102030405 | 71 | %pm 000102030405 |
61 | 72 | ||
@@ -67,6 +78,10 @@ MAC/FDDI addresses: | |||
67 | the 'M' specifier to use dash ('-') separators instead of the default | 78 | the 'M' specifier to use dash ('-') separators instead of the default |
68 | separator. | 79 | separator. |
69 | 80 | ||
81 | For Bluetooth addresses the 'R' specifier shall be used after the 'M' | ||
82 | specifier to use reversed byte order suitable for visual interpretation | ||
83 | of Bluetooth addresses which are in the little endian order. | ||
84 | |||
70 | IPv4 addresses: | 85 | IPv4 addresses: |
71 | 86 | ||
72 | %pI4 1.2.3.4 | 87 | %pI4 1.2.3.4 |
diff --git a/Documentation/pwm.txt b/Documentation/pwm.txt new file mode 100644 index 000000000000..554290ebab94 --- /dev/null +++ b/Documentation/pwm.txt | |||
@@ -0,0 +1,76 @@ | |||
1 | Pulse Width Modulation (PWM) interface | ||
2 | |||
3 | This provides an overview about the Linux PWM interface | ||
4 | |||
5 | PWMs are commonly used for controlling LEDs, fans or vibrators in | ||
6 | cell phones. PWMs with a fixed purpose have no need implementing | ||
7 | the Linux PWM API (although they could). However, PWMs are often | ||
8 | found as discrete devices on SoCs which have no fixed purpose. It's | ||
9 | up to the board designer to connect them to LEDs or fans. To provide | ||
10 | this kind of flexibility the generic PWM API exists. | ||
11 | |||
12 | Identifying PWMs | ||
13 | ---------------- | ||
14 | |||
15 | Users of the legacy PWM API use unique IDs to refer to PWM devices. | ||
16 | |||
17 | Instead of referring to a PWM device via its unique ID, board setup code | ||
18 | should instead register a static mapping that can be used to match PWM | ||
19 | consumers to providers, as given in the following example: | ||
20 | |||
21 | static struct pwm_lookup board_pwm_lookup[] = { | ||
22 | PWM_LOOKUP("tegra-pwm", 0, "pwm-backlight", NULL), | ||
23 | }; | ||
24 | |||
25 | static void __init board_init(void) | ||
26 | { | ||
27 | ... | ||
28 | pwm_add_table(board_pwm_lookup, ARRAY_SIZE(board_pwm_lookup)); | ||
29 | ... | ||
30 | } | ||
31 | |||
32 | Using PWMs | ||
33 | ---------- | ||
34 | |||
35 | Legacy users can request a PWM device using pwm_request() and free it | ||
36 | after usage with pwm_free(). | ||
37 | |||
38 | New users should use the pwm_get() function and pass to it the consumer | ||
39 | device or a consumer name. pwm_put() is used to free the PWM device. | ||
40 | |||
41 | After being requested a PWM has to be configured using: | ||
42 | |||
43 | int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns); | ||
44 | |||
45 | To start/stop toggling the PWM output use pwm_enable()/pwm_disable(). | ||
46 | |||
47 | Implementing a PWM driver | ||
48 | ------------------------- | ||
49 | |||
50 | Currently there are two ways to implement pwm drivers. Traditionally | ||
51 | there only has been the barebone API meaning that each driver has | ||
52 | to implement the pwm_*() functions itself. This means that it's impossible | ||
53 | to have multiple PWM drivers in the system. For this reason it's mandatory | ||
54 | for new drivers to use the generic PWM framework. | ||
55 | |||
56 | A new PWM controller/chip can be added using pwmchip_add() and removed | ||
57 | again with pwmchip_remove(). pwmchip_add() takes a filled in struct | ||
58 | pwm_chip as argument which provides a description of the PWM chip, the | ||
59 | number of PWM devices provider by the chip and the chip-specific | ||
60 | implementation of the supported PWM operations to the framework. | ||
61 | |||
62 | Locking | ||
63 | ------- | ||
64 | |||
65 | The PWM core list manipulations are protected by a mutex, so pwm_request() | ||
66 | and pwm_free() may not be called from an atomic context. Currently the | ||
67 | PWM core does not enforce any locking to pwm_enable(), pwm_disable() and | ||
68 | pwm_config(), so the calling context is currently driver specific. This | ||
69 | is an issue derived from the former barebone API and should be fixed soon. | ||
70 | |||
71 | Helpers | ||
72 | ------- | ||
73 | |||
74 | Currently a PWM can only be configured with period_ns and duty_ns. For several | ||
75 | use cases freq_hz and duty_percent might be better. Instead of calculating | ||
76 | this in your driver please consider adding appropriate helpers to the framework. | ||
diff --git a/Documentation/ramoops.txt b/Documentation/ramoops.txt index 4ba7db231cb2..197ad59ab9bf 100644 --- a/Documentation/ramoops.txt +++ b/Documentation/ramoops.txt | |||
@@ -40,6 +40,12 @@ corrupt, but usually it is restorable. | |||
40 | Setting the ramoops parameters can be done in 2 different manners: | 40 | Setting the ramoops parameters can be done in 2 different manners: |
41 | 1. Use the module parameters (which have the names of the variables described | 41 | 1. Use the module parameters (which have the names of the variables described |
42 | as before). | 42 | as before). |
43 | For quick debugging, you can also reserve parts of memory during boot | ||
44 | and then use the reserved memory for ramoops. For example, assuming a machine | ||
45 | with > 128 MB of memory, the following kernel command line will tell the | ||
46 | kernel to use only the first 128 MB of memory, and place ECC-protected ramoops | ||
47 | region at 128 MB boundary: | ||
48 | "mem=128M ramoops.mem_address=0x8000000 ramoops.ecc=1" | ||
43 | 2. Use a platform device and set the platform data. The parameters can then | 49 | 2. Use a platform device and set the platform data. The parameters can then |
44 | be set through that platform data. An example of doing that is: | 50 | be set through that platform data. An example of doing that is: |
45 | 51 | ||
@@ -70,6 +76,14 @@ if (ret) { | |||
70 | return ret; | 76 | return ret; |
71 | } | 77 | } |
72 | 78 | ||
79 | You can specify either RAM memory or peripheral devices' memory. However, when | ||
80 | specifying RAM, be sure to reserve the memory by issuing memblock_reserve() | ||
81 | very early in the architecture code, e.g.: | ||
82 | |||
83 | #include <linux/memblock.h> | ||
84 | |||
85 | memblock_reserve(ramoops_data.mem_address, ramoops_data.mem_size); | ||
86 | |||
73 | 3. Dump format | 87 | 3. Dump format |
74 | 88 | ||
75 | The data dump begins with a header, currently defined as "====" followed by a | 89 | The data dump begins with a header, currently defined as "====" followed by a |
@@ -80,3 +94,28 @@ timestamp and a new line. The dump then continues with the actual data. | |||
80 | The dump data can be read from the pstore filesystem. The format for these | 94 | The dump data can be read from the pstore filesystem. The format for these |
81 | files is "dmesg-ramoops-N", where N is the record number in memory. To delete | 95 | files is "dmesg-ramoops-N", where N is the record number in memory. To delete |
82 | a stored record from RAM, simply unlink the respective pstore file. | 96 | a stored record from RAM, simply unlink the respective pstore file. |
97 | |||
98 | 5. Persistent function tracing | ||
99 | |||
100 | Persistent function tracing might be useful for debugging software or hardware | ||
101 | related hangs. The functions call chain log is stored in a "ftrace-ramoops" | ||
102 | file. Here is an example of usage: | ||
103 | |||
104 | # mount -t debugfs debugfs /sys/kernel/debug/ | ||
105 | # cd /sys/kernel/debug/tracing | ||
106 | # echo function > current_tracer | ||
107 | # echo 1 > options/func_pstore | ||
108 | # reboot -f | ||
109 | [...] | ||
110 | # mount -t pstore pstore /mnt/ | ||
111 | # tail /mnt/ftrace-ramoops | ||
112 | 0 ffffffff8101ea64 ffffffff8101bcda native_apic_mem_read <- disconnect_bsp_APIC+0x6a/0xc0 | ||
113 | 0 ffffffff8101ea44 ffffffff8101bcf6 native_apic_mem_write <- disconnect_bsp_APIC+0x86/0xc0 | ||
114 | 0 ffffffff81020084 ffffffff8101a4b5 hpet_disable <- native_machine_shutdown+0x75/0x90 | ||
115 | 0 ffffffff81005f94 ffffffff8101a4bb iommu_shutdown_noop <- native_machine_shutdown+0x7b/0x90 | ||
116 | 0 ffffffff8101a6a1 ffffffff8101a437 native_machine_emergency_restart <- native_machine_restart+0x37/0x40 | ||
117 | 0 ffffffff811f9876 ffffffff8101a73a acpi_reboot <- native_machine_emergency_restart+0xaa/0x1e0 | ||
118 | 0 ffffffff8101a514 ffffffff8101a772 mach_reboot_fixups <- native_machine_emergency_restart+0xe2/0x1e0 | ||
119 | 0 ffffffff811d9c54 ffffffff8101a7a0 __const_udelay <- native_machine_emergency_restart+0x110/0x1e0 | ||
120 | 0 ffffffff811d9c34 ffffffff811d9c80 __delay <- __const_udelay+0x30/0x40 | ||
121 | 0 ffffffff811d9d14 ffffffff811d9c3f delay_tsc <- __delay+0xf/0x20 | ||
diff --git a/Documentation/remoteproc.txt b/Documentation/remoteproc.txt index 70a048cd3fa3..23a09b884bc7 100644 --- a/Documentation/remoteproc.txt +++ b/Documentation/remoteproc.txt | |||
@@ -36,8 +36,7 @@ cost. | |||
36 | Note: to use this function you should already have a valid rproc | 36 | Note: to use this function you should already have a valid rproc |
37 | handle. There are several ways to achieve that cleanly (devres, pdata, | 37 | handle. There are several ways to achieve that cleanly (devres, pdata, |
38 | the way remoteproc_rpmsg.c does this, or, if this becomes prevalent, we | 38 | the way remoteproc_rpmsg.c does this, or, if this becomes prevalent, we |
39 | might also consider using dev_archdata for this). See also | 39 | might also consider using dev_archdata for this). |
40 | rproc_get_by_name() below. | ||
41 | 40 | ||
42 | void rproc_shutdown(struct rproc *rproc) | 41 | void rproc_shutdown(struct rproc *rproc) |
43 | - Power off a remote processor (previously booted with rproc_boot()). | 42 | - Power off a remote processor (previously booted with rproc_boot()). |
@@ -51,30 +50,6 @@ cost. | |||
51 | which means that the @rproc handle stays valid even after | 50 | which means that the @rproc handle stays valid even after |
52 | rproc_shutdown() returns, and users can still use it with a subsequent | 51 | rproc_shutdown() returns, and users can still use it with a subsequent |
53 | rproc_boot(), if needed. | 52 | rproc_boot(), if needed. |
54 | - don't call rproc_shutdown() to unroll rproc_get_by_name(), exactly | ||
55 | because rproc_shutdown() _does not_ decrement the refcount of @rproc. | ||
56 | To decrement the refcount of @rproc, use rproc_put() (but _only_ if | ||
57 | you acquired @rproc using rproc_get_by_name()). | ||
58 | |||
59 | struct rproc *rproc_get_by_name(const char *name) | ||
60 | - Find an rproc handle using the remote processor's name, and then | ||
61 | boot it. If it's already powered on, then just immediately return | ||
62 | (successfully). Returns the rproc handle on success, and NULL on failure. | ||
63 | This function increments the remote processor's refcount, so always | ||
64 | use rproc_put() to decrement it back once rproc isn't needed anymore. | ||
65 | Note: currently rproc_get_by_name() and rproc_put() are not used anymore | ||
66 | by the rpmsg bus and its drivers. We need to scrutinize the use cases | ||
67 | that still need them, and see if we can migrate them to use the non | ||
68 | name-based boot/shutdown interface. | ||
69 | |||
70 | void rproc_put(struct rproc *rproc) | ||
71 | - Decrement @rproc's power refcount and shut it down if it reaches zero | ||
72 | (essentially by just calling rproc_shutdown), and then decrement @rproc's | ||
73 | validity refcount too. | ||
74 | After this function returns, @rproc may _not_ be used anymore, and its | ||
75 | handle should be considered invalid. | ||
76 | This function should be called _iff_ the @rproc handle was grabbed by | ||
77 | calling rproc_get_by_name(). | ||
78 | 53 | ||
79 | 3. Typical usage | 54 | 3. Typical usage |
80 | 55 | ||
@@ -115,21 +90,21 @@ int dummy_rproc_example(struct rproc *my_rproc) | |||
115 | This function should be used by rproc implementations during | 90 | This function should be used by rproc implementations during |
116 | initialization of the remote processor. | 91 | initialization of the remote processor. |
117 | After creating an rproc handle using this function, and when ready, | 92 | After creating an rproc handle using this function, and when ready, |
118 | implementations should then call rproc_register() to complete | 93 | implementations should then call rproc_add() to complete |
119 | the registration of the remote processor. | 94 | the registration of the remote processor. |
120 | On success, the new rproc is returned, and on failure, NULL. | 95 | On success, the new rproc is returned, and on failure, NULL. |
121 | 96 | ||
122 | Note: _never_ directly deallocate @rproc, even if it was not registered | 97 | Note: _never_ directly deallocate @rproc, even if it was not registered |
123 | yet. Instead, if you just need to unroll rproc_alloc(), use rproc_free(). | 98 | yet. Instead, when you need to unroll rproc_alloc(), use rproc_put(). |
124 | 99 | ||
125 | void rproc_free(struct rproc *rproc) | 100 | void rproc_put(struct rproc *rproc) |
126 | - Free an rproc handle that was allocated by rproc_alloc. | 101 | - Free an rproc handle that was allocated by rproc_alloc. |
127 | This function should _only_ be used if @rproc was only allocated, | 102 | This function essentially unrolls rproc_alloc(), by decrementing the |
128 | but not registered yet. | 103 | rproc's refcount. It doesn't directly free rproc; that would happen |
129 | If @rproc was already successfully registered (by calling | 104 | only if there are no other references to rproc and its refcount now |
130 | rproc_register()), then use rproc_unregister() instead. | 105 | dropped to zero. |
131 | 106 | ||
132 | int rproc_register(struct rproc *rproc) | 107 | int rproc_add(struct rproc *rproc) |
133 | - Register @rproc with the remoteproc framework, after it has been | 108 | - Register @rproc with the remoteproc framework, after it has been |
134 | allocated with rproc_alloc(). | 109 | allocated with rproc_alloc(). |
135 | This is called by the platform-specific rproc implementation, whenever | 110 | This is called by the platform-specific rproc implementation, whenever |
@@ -142,20 +117,15 @@ int dummy_rproc_example(struct rproc *my_rproc) | |||
142 | of registering this remote processor, additional virtio drivers might get | 117 | of registering this remote processor, additional virtio drivers might get |
143 | probed. | 118 | probed. |
144 | 119 | ||
145 | int rproc_unregister(struct rproc *rproc) | 120 | int rproc_del(struct rproc *rproc) |
146 | - Unregister a remote processor, and decrement its refcount. | 121 | - Unroll rproc_add(). |
147 | If its refcount drops to zero, then @rproc will be freed. If not, | ||
148 | it will be freed later once the last reference is dropped. | ||
149 | |||
150 | This function should be called when the platform specific rproc | 122 | This function should be called when the platform specific rproc |
151 | implementation decides to remove the rproc device. it should | 123 | implementation decides to remove the rproc device. it should |
152 | _only_ be called if a previous invocation of rproc_register() | 124 | _only_ be called if a previous invocation of rproc_add() |
153 | has completed successfully. | 125 | has completed successfully. |
154 | 126 | ||
155 | After rproc_unregister() returns, @rproc is _not_ valid anymore and | 127 | After rproc_del() returns, @rproc is still valid, and its |
156 | it shouldn't be used. More specifically, don't call rproc_free() | 128 | last refcount should be decremented by calling rproc_put(). |
157 | or try to directly free @rproc after rproc_unregister() returns; | ||
158 | none of these are needed, and calling them is a bug. | ||
159 | 129 | ||
160 | Returns 0 on success and -EINVAL if @rproc isn't valid. | 130 | Returns 0 on success and -EINVAL if @rproc isn't valid. |
161 | 131 | ||
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index 221b81016dba..4e4d0bc9816f 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |||
@@ -875,8 +875,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
875 | setup before initializing the codecs. This option is | 875 | setup before initializing the codecs. This option is |
876 | available only when CONFIG_SND_HDA_PATCH_LOADER=y is set. | 876 | available only when CONFIG_SND_HDA_PATCH_LOADER=y is set. |
877 | See HD-Audio.txt for details. | 877 | See HD-Audio.txt for details. |
878 | beep_mode - Selects the beep registration mode (0=off, 1=on, 2= | 878 | beep_mode - Selects the beep registration mode (0=off, 1=on); default |
879 | dynamic registration via mute switch on/off); the default | ||
880 | value is set via CONFIG_SND_HDA_INPUT_BEEP_MODE kconfig. | 879 | value is set via CONFIG_SND_HDA_INPUT_BEEP_MODE kconfig. |
881 | 880 | ||
882 | [Single (global) options] | 881 | [Single (global) options] |
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt index 03f7897c6414..a92bba816843 100644 --- a/Documentation/sound/alsa/HD-Audio-Models.txt +++ b/Documentation/sound/alsa/HD-Audio-Models.txt | |||
@@ -15,19 +15,24 @@ ALC260 | |||
15 | 15 | ||
16 | ALC262 | 16 | ALC262 |
17 | ====== | 17 | ====== |
18 | N/A | 18 | inv-dmic Inverted internal mic workaround |
19 | 19 | ||
20 | ALC267/268 | 20 | ALC267/268 |
21 | ========== | 21 | ========== |
22 | N/A | 22 | inv-dmic Inverted internal mic workaround |
23 | 23 | ||
24 | ALC269 | 24 | ALC269/270/275/276/280/282 |
25 | ====== | 25 | ====== |
26 | laptop-amic Laptops with analog-mic input | 26 | laptop-amic Laptops with analog-mic input |
27 | laptop-dmic Laptops with digital-mic input | 27 | laptop-dmic Laptops with digital-mic input |
28 | alc269-dmic Enable ALC269(VA) digital mic workaround | ||
29 | alc271-dmic Enable ALC271X digital mic workaround | ||
30 | inv-dmic Inverted internal mic workaround | ||
31 | lenovo-dock Enables docking station I/O for some Lenovos | ||
28 | 32 | ||
29 | ALC662/663/272 | 33 | ALC662/663/272 |
30 | ============== | 34 | ============== |
35 | mario Chromebook mario model fixup | ||
31 | asus-mode1 ASUS | 36 | asus-mode1 ASUS |
32 | asus-mode2 ASUS | 37 | asus-mode2 ASUS |
33 | asus-mode3 ASUS | 38 | asus-mode3 ASUS |
@@ -36,6 +41,7 @@ ALC662/663/272 | |||
36 | asus-mode6 ASUS | 41 | asus-mode6 ASUS |
37 | asus-mode7 ASUS | 42 | asus-mode7 ASUS |
38 | asus-mode8 ASUS | 43 | asus-mode8 ASUS |
44 | inv-dmic Inverted internal mic workaround | ||
39 | 45 | ||
40 | ALC680 | 46 | ALC680 |
41 | ====== | 47 | ====== |
@@ -46,6 +52,8 @@ ALC882/883/885/888/889 | |||
46 | acer-aspire-4930g Acer Aspire 4930G/5930G/6530G/6930G/7730G | 52 | acer-aspire-4930g Acer Aspire 4930G/5930G/6530G/6930G/7730G |
47 | acer-aspire-8930g Acer Aspire 8330G/6935G | 53 | acer-aspire-8930g Acer Aspire 8330G/6935G |
48 | acer-aspire Acer Aspire others | 54 | acer-aspire Acer Aspire others |
55 | inv-dmic Inverted internal mic workaround | ||
56 | no-primary-hp VAIO Z workaround (for fixed speaker DAC) | ||
49 | 57 | ||
50 | ALC861/660 | 58 | ALC861/660 |
51 | ========== | 59 | ========== |
@@ -266,6 +274,10 @@ STAC92HD83* | |||
266 | dell-s14 Dell laptop | 274 | dell-s14 Dell laptop |
267 | dell-vostro-3500 Dell Vostro 3500 laptop | 275 | dell-vostro-3500 Dell Vostro 3500 laptop |
268 | hp-dv7-4000 HP dv-7 4000 | 276 | hp-dv7-4000 HP dv-7 4000 |
277 | hp_cNB11_intquad HP CNB models with 4 speakers | ||
278 | hp-zephyr HP Zephyr | ||
279 | hp-led HP with broken BIOS for mute LED | ||
280 | hp-inv-led HP with broken BIOS for inverted mute LED | ||
269 | auto BIOS setup (default) | 281 | auto BIOS setup (default) |
270 | 282 | ||
271 | STAC9872 | 283 | STAC9872 |
diff --git a/Documentation/sound/alsa/hdspm.txt b/Documentation/sound/alsa/hdspm.txt index 7a67ff71a9f8..7ba31948dea7 100644 --- a/Documentation/sound/alsa/hdspm.txt +++ b/Documentation/sound/alsa/hdspm.txt | |||
@@ -359,4 +359,4 @@ Calling Parameter: | |||
359 | enable_monitor int array (min = 1, max = 8), | 359 | enable_monitor int array (min = 1, max = 8), |
360 | "Enable Analog Out on Channel 63/64 by default." | 360 | "Enable Analog Out on Channel 63/64 by default." |
361 | 361 | ||
362 | note: here the analog output is enabled (but not routed). \ No newline at end of file | 362 | note: here the analog output is enabled (but not routed). |
diff --git a/Documentation/stable_kernel_rules.txt b/Documentation/stable_kernel_rules.txt index 4a7b54bd37e8..b0714d8f678a 100644 --- a/Documentation/stable_kernel_rules.txt +++ b/Documentation/stable_kernel_rules.txt | |||
@@ -1,4 +1,4 @@ | |||
1 | Everything you ever wanted to know about Linux 2.6 -stable releases. | 1 | Everything you ever wanted to know about Linux -stable releases. |
2 | 2 | ||
3 | Rules on what kind of patches are accepted, and which ones are not, into the | 3 | Rules on what kind of patches are accepted, and which ones are not, into the |
4 | "-stable" tree: | 4 | "-stable" tree: |
@@ -42,10 +42,10 @@ Procedure for submitting patches to the -stable tree: | |||
42 | cherry-picked than this can be specified in the following format in | 42 | cherry-picked than this can be specified in the following format in |
43 | the sign-off area: | 43 | the sign-off area: |
44 | 44 | ||
45 | Cc: <stable@vger.kernel.org> # .32.x: a1f84a3: sched: Check for idle | 45 | Cc: <stable@vger.kernel.org> # 3.3.x: a1f84a3: sched: Check for idle |
46 | Cc: <stable@vger.kernel.org> # .32.x: 1b9508f: sched: Rate-limit newidle | 46 | Cc: <stable@vger.kernel.org> # 3.3.x: 1b9508f: sched: Rate-limit newidle |
47 | Cc: <stable@vger.kernel.org> # .32.x: fd21073: sched: Fix affinity logic | 47 | Cc: <stable@vger.kernel.org> # 3.3.x: fd21073: sched: Fix affinity logic |
48 | Cc: <stable@vger.kernel.org> # .32.x | 48 | Cc: <stable@vger.kernel.org> # 3.3.x |
49 | Signed-off-by: Ingo Molnar <mingo@elte.hu> | 49 | Signed-off-by: Ingo Molnar <mingo@elte.hu> |
50 | 50 | ||
51 | The tag sequence has the meaning of: | 51 | The tag sequence has the meaning of: |
@@ -79,6 +79,15 @@ Review cycle: | |||
79 | security kernel team, and not go through the normal review cycle. | 79 | security kernel team, and not go through the normal review cycle. |
80 | Contact the kernel security team for more details on this procedure. | 80 | Contact the kernel security team for more details on this procedure. |
81 | 81 | ||
82 | Trees: | ||
83 | |||
84 | - The queues of patches, for both completed versions and in progress | ||
85 | versions can be found at: | ||
86 | http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git | ||
87 | - The finalized and tagged releases of all stable kernels can be found | ||
88 | in separate branches per version at: | ||
89 | http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git | ||
90 | |||
82 | 91 | ||
83 | Review committee: | 92 | Review committee: |
84 | 93 | ||
diff --git a/Documentation/sysctl/fs.txt b/Documentation/sysctl/fs.txt index 13d6166d7a27..88152f214f48 100644 --- a/Documentation/sysctl/fs.txt +++ b/Documentation/sysctl/fs.txt | |||
@@ -32,6 +32,8 @@ Currently, these files are in /proc/sys/fs: | |||
32 | - nr_open | 32 | - nr_open |
33 | - overflowuid | 33 | - overflowuid |
34 | - overflowgid | 34 | - overflowgid |
35 | - protected_hardlinks | ||
36 | - protected_symlinks | ||
35 | - suid_dumpable | 37 | - suid_dumpable |
36 | - super-max | 38 | - super-max |
37 | - super-nr | 39 | - super-nr |
@@ -157,22 +159,68 @@ The default is 65534. | |||
157 | 159 | ||
158 | ============================================================== | 160 | ============================================================== |
159 | 161 | ||
162 | protected_hardlinks: | ||
163 | |||
164 | A long-standing class of security issues is the hardlink-based | ||
165 | time-of-check-time-of-use race, most commonly seen in world-writable | ||
166 | directories like /tmp. The common method of exploitation of this flaw | ||
167 | is to cross privilege boundaries when following a given hardlink (i.e. a | ||
168 | root process follows a hardlink created by another user). Additionally, | ||
169 | on systems without separated partitions, this stops unauthorized users | ||
170 | from "pinning" vulnerable setuid/setgid files against being upgraded by | ||
171 | the administrator, or linking to special files. | ||
172 | |||
173 | When set to "0", hardlink creation behavior is unrestricted. | ||
174 | |||
175 | When set to "1" hardlinks cannot be created by users if they do not | ||
176 | already own the source file, or do not have read/write access to it. | ||
177 | |||
178 | This protection is based on the restrictions in Openwall and grsecurity. | ||
179 | |||
180 | ============================================================== | ||
181 | |||
182 | protected_symlinks: | ||
183 | |||
184 | A long-standing class of security issues is the symlink-based | ||
185 | time-of-check-time-of-use race, most commonly seen in world-writable | ||
186 | directories like /tmp. The common method of exploitation of this flaw | ||
187 | is to cross privilege boundaries when following a given symlink (i.e. a | ||
188 | root process follows a symlink belonging to another user). For a likely | ||
189 | incomplete list of hundreds of examples across the years, please see: | ||
190 | http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=/tmp | ||
191 | |||
192 | When set to "0", symlink following behavior is unrestricted. | ||
193 | |||
194 | When set to "1" symlinks are permitted to be followed only when outside | ||
195 | a sticky world-writable directory, or when the uid of the symlink and | ||
196 | follower match, or when the directory owner matches the symlink's owner. | ||
197 | |||
198 | This protection is based on the restrictions in Openwall and grsecurity. | ||
199 | |||
200 | ============================================================== | ||
201 | |||
160 | suid_dumpable: | 202 | suid_dumpable: |
161 | 203 | ||
162 | This value can be used to query and set the core dump mode for setuid | 204 | This value can be used to query and set the core dump mode for setuid |
163 | or otherwise protected/tainted binaries. The modes are | 205 | or otherwise protected/tainted binaries. The modes are |
164 | 206 | ||
165 | 0 - (default) - traditional behaviour. Any process which has changed | 207 | 0 - (default) - traditional behaviour. Any process which has changed |
166 | privilege levels or is execute only will not be dumped | 208 | privilege levels or is execute only will not be dumped. |
167 | 1 - (debug) - all processes dump core when possible. The core dump is | 209 | 1 - (debug) - all processes dump core when possible. The core dump is |
168 | owned by the current user and no security is applied. This is | 210 | owned by the current user and no security is applied. This is |
169 | intended for system debugging situations only. Ptrace is unchecked. | 211 | intended for system debugging situations only. Ptrace is unchecked. |
212 | This is insecure as it allows regular users to examine the memory | ||
213 | contents of privileged processes. | ||
170 | 2 - (suidsafe) - any binary which normally would not be dumped is dumped | 214 | 2 - (suidsafe) - any binary which normally would not be dumped is dumped |
171 | readable by root only. This allows the end user to remove | 215 | anyway, but only if the "core_pattern" kernel sysctl is set to |
172 | such a dump but not access it directly. For security reasons | 216 | either a pipe handler or a fully qualified path. (For more details |
173 | core dumps in this mode will not overwrite one another or | 217 | on this limitation, see CVE-2006-2451.) This mode is appropriate |
174 | other files. This mode is appropriate when administrators are | 218 | when administrators are attempting to debug problems in a normal |
175 | attempting to debug problems in a normal environment. | 219 | environment, and either have a core dump pipe handler that knows |
220 | to treat privileged core dumps with care, or specific directory | ||
221 | defined for catching core dumps. If a core dump happens without | ||
222 | a pipe handler or fully qualifid path, a message will be emitted | ||
223 | to syslog warning about the lack of a correct setting. | ||
176 | 224 | ||
177 | ============================================================== | 225 | ============================================================== |
178 | 226 | ||
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index 96f0ee825bed..dcc2a94ae34e 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt | |||
@@ -42,7 +42,6 @@ Currently, these files are in /proc/sys/vm: | |||
42 | - mmap_min_addr | 42 | - mmap_min_addr |
43 | - nr_hugepages | 43 | - nr_hugepages |
44 | - nr_overcommit_hugepages | 44 | - nr_overcommit_hugepages |
45 | - nr_pdflush_threads | ||
46 | - nr_trim_pages (only if CONFIG_MMU=n) | 45 | - nr_trim_pages (only if CONFIG_MMU=n) |
47 | - numa_zonelist_order | 46 | - numa_zonelist_order |
48 | - oom_dump_tasks | 47 | - oom_dump_tasks |
@@ -426,16 +425,6 @@ See Documentation/vm/hugetlbpage.txt | |||
426 | 425 | ||
427 | ============================================================== | 426 | ============================================================== |
428 | 427 | ||
429 | nr_pdflush_threads | ||
430 | |||
431 | The current number of pdflush threads. This value is read-only. | ||
432 | The value changes according to the number of dirty pages in the system. | ||
433 | |||
434 | When necessary, additional pdflush threads are created, one per second, up to | ||
435 | nr_pdflush_threads_max. | ||
436 | |||
437 | ============================================================== | ||
438 | |||
439 | nr_trim_pages | 428 | nr_trim_pages |
440 | 429 | ||
441 | This is available only on NOMMU kernels. | 430 | This is available only on NOMMU kernels. |
@@ -502,9 +491,10 @@ oom_dump_tasks | |||
502 | 491 | ||
503 | Enables a system-wide task dump (excluding kernel threads) to be | 492 | Enables a system-wide task dump (excluding kernel threads) to be |
504 | produced when the kernel performs an OOM-killing and includes such | 493 | produced when the kernel performs an OOM-killing and includes such |
505 | information as pid, uid, tgid, vm size, rss, cpu, oom_adj score, and | 494 | information as pid, uid, tgid, vm size, rss, nr_ptes, swapents, |
506 | name. This is helpful to determine why the OOM killer was invoked | 495 | oom_score_adj score, and name. This is helpful to determine why the |
507 | and to identify the rogue task that caused it. | 496 | OOM killer was invoked, to identify the rogue task that caused it, |
497 | and to determine why the OOM killer chose the task it did to kill. | ||
508 | 498 | ||
509 | If this is set to zero, this information is suppressed. On very | 499 | If this is set to zero, this information is suppressed. On very |
510 | large systems with thousands of tasks it may not be feasible to dump | 500 | large systems with thousands of tasks it may not be feasible to dump |
@@ -574,16 +564,24 @@ of physical RAM. See above. | |||
574 | 564 | ||
575 | page-cluster | 565 | page-cluster |
576 | 566 | ||
577 | page-cluster controls the number of pages which are written to swap in | 567 | page-cluster controls the number of pages up to which consecutive pages |
578 | a single attempt. The swap I/O size. | 568 | are read in from swap in a single attempt. This is the swap counterpart |
569 | to page cache readahead. | ||
570 | The mentioned consecutivity is not in terms of virtual/physical addresses, | ||
571 | but consecutive on swap space - that means they were swapped out together. | ||
579 | 572 | ||
580 | It is a logarithmic value - setting it to zero means "1 page", setting | 573 | It is a logarithmic value - setting it to zero means "1 page", setting |
581 | it to 1 means "2 pages", setting it to 2 means "4 pages", etc. | 574 | it to 1 means "2 pages", setting it to 2 means "4 pages", etc. |
575 | Zero disables swap readahead completely. | ||
582 | 576 | ||
583 | The default value is three (eight pages at a time). There may be some | 577 | The default value is three (eight pages at a time). There may be some |
584 | small benefits in tuning this to a different value if your workload is | 578 | small benefits in tuning this to a different value if your workload is |
585 | swap-intensive. | 579 | swap-intensive. |
586 | 580 | ||
581 | Lower values mean lower latencies for initial faults, but at the same time | ||
582 | extra faults and I/O delays for following faults if they would have been part of | ||
583 | that consecutive pages readahead would have brought in. | ||
584 | |||
587 | ============================================================= | 585 | ============================================================= |
588 | 586 | ||
589 | panic_on_oom | 587 | panic_on_oom |
diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt index 1733ab947a95..c087dbcf3535 100644 --- a/Documentation/thermal/sysfs-api.txt +++ b/Documentation/thermal/sysfs-api.txt | |||
@@ -32,7 +32,8 @@ temperature) and throttle appropriate devices. | |||
32 | 32 | ||
33 | 1.1 thermal zone device interface | 33 | 1.1 thermal zone device interface |
34 | 1.1.1 struct thermal_zone_device *thermal_zone_device_register(char *name, | 34 | 1.1.1 struct thermal_zone_device *thermal_zone_device_register(char *name, |
35 | int trips, void *devdata, struct thermal_zone_device_ops *ops) | 35 | int trips, int mask, void *devdata, |
36 | struct thermal_zone_device_ops *ops) | ||
36 | 37 | ||
37 | This interface function adds a new thermal zone device (sensor) to | 38 | This interface function adds a new thermal zone device (sensor) to |
38 | /sys/class/thermal folder as thermal_zone[0-*]. It tries to bind all the | 39 | /sys/class/thermal folder as thermal_zone[0-*]. It tries to bind all the |
@@ -40,16 +41,17 @@ temperature) and throttle appropriate devices. | |||
40 | 41 | ||
41 | name: the thermal zone name. | 42 | name: the thermal zone name. |
42 | trips: the total number of trip points this thermal zone supports. | 43 | trips: the total number of trip points this thermal zone supports. |
44 | mask: Bit string: If 'n'th bit is set, then trip point 'n' is writeable. | ||
43 | devdata: device private data | 45 | devdata: device private data |
44 | ops: thermal zone device call-backs. | 46 | ops: thermal zone device call-backs. |
45 | .bind: bind the thermal zone device with a thermal cooling device. | 47 | .bind: bind the thermal zone device with a thermal cooling device. |
46 | .unbind: unbind the thermal zone device with a thermal cooling device. | 48 | .unbind: unbind the thermal zone device with a thermal cooling device. |
47 | .get_temp: get the current temperature of the thermal zone. | 49 | .get_temp: get the current temperature of the thermal zone. |
48 | .get_mode: get the current mode (user/kernel) of the thermal zone. | 50 | .get_mode: get the current mode (enabled/disabled) of the thermal zone. |
49 | - "kernel" means thermal management is done in kernel. | 51 | - "enabled" means the kernel thermal management is enabled. |
50 | - "user" will prevent kernel thermal driver actions upon trip points | 52 | - "disabled" will prevent kernel thermal driver action upon trip points |
51 | so that user applications can take charge of thermal management. | 53 | so that user applications can take charge of thermal management. |
52 | .set_mode: set the mode (user/kernel) of the thermal zone. | 54 | .set_mode: set the mode (enabled/disabled) of the thermal zone. |
53 | .get_trip_type: get the type of certain trip point. | 55 | .get_trip_type: get the type of certain trip point. |
54 | .get_trip_temp: get the temperature above which the certain trip point | 56 | .get_trip_temp: get the temperature above which the certain trip point |
55 | will be fired. | 57 | will be fired. |
@@ -119,6 +121,7 @@ Thermal zone device sys I/F, created once it's registered: | |||
119 | |---mode: Working mode of the thermal zone | 121 | |---mode: Working mode of the thermal zone |
120 | |---trip_point_[0-*]_temp: Trip point temperature | 122 | |---trip_point_[0-*]_temp: Trip point temperature |
121 | |---trip_point_[0-*]_type: Trip point type | 123 | |---trip_point_[0-*]_type: Trip point type |
124 | |---trip_point_[0-*]_hyst: Hysteresis value for this trip point | ||
122 | 125 | ||
123 | Thermal cooling device sys I/F, created once it's registered: | 126 | Thermal cooling device sys I/F, created once it's registered: |
124 | /sys/class/thermal/cooling_device[0-*]: | 127 | /sys/class/thermal/cooling_device[0-*]: |
@@ -167,14 +170,14 @@ temp | |||
167 | RO, Required | 170 | RO, Required |
168 | 171 | ||
169 | mode | 172 | mode |
170 | One of the predefined values in [kernel, user]. | 173 | One of the predefined values in [enabled, disabled]. |
171 | This file gives information about the algorithm that is currently | 174 | This file gives information about the algorithm that is currently |
172 | managing the thermal zone. It can be either default kernel based | 175 | managing the thermal zone. It can be either default kernel based |
173 | algorithm or user space application. | 176 | algorithm or user space application. |
174 | kernel = Thermal management in kernel thermal zone driver. | 177 | enabled = enable Kernel Thermal management. |
175 | user = Preventing kernel thermal zone driver actions upon | 178 | disabled = Preventing kernel thermal zone driver actions upon |
176 | trip points so that user application can take full | 179 | trip points so that user application can take full |
177 | charge of the thermal management. | 180 | charge of the thermal management. |
178 | RW, Optional | 181 | RW, Optional |
179 | 182 | ||
180 | trip_point_[0-*]_temp | 183 | trip_point_[0-*]_temp |
@@ -188,6 +191,11 @@ trip_point_[0-*]_type | |||
188 | thermal zone. | 191 | thermal zone. |
189 | RO, Optional | 192 | RO, Optional |
190 | 193 | ||
194 | trip_point_[0-*]_hyst | ||
195 | The hysteresis value for a trip point, represented as an integer | ||
196 | Unit: Celsius | ||
197 | RW, Optional | ||
198 | |||
191 | cdev[0-*] | 199 | cdev[0-*] |
192 | Sysfs link to the thermal cooling device node where the sys I/F | 200 | Sysfs link to the thermal cooling device node where the sys I/F |
193 | for cooling device throttling control represents. | 201 | for cooling device throttling control represents. |
@@ -248,7 +256,7 @@ method, the sys I/F structure will be built like this: | |||
248 | |thermal_zone1: | 256 | |thermal_zone1: |
249 | |---type: acpitz | 257 | |---type: acpitz |
250 | |---temp: 37000 | 258 | |---temp: 37000 |
251 | |---mode: kernel | 259 | |---mode: enabled |
252 | |---trip_point_0_temp: 100000 | 260 | |---trip_point_0_temp: 100000 |
253 | |---trip_point_0_type: critical | 261 | |---trip_point_0_type: critical |
254 | |---trip_point_1_temp: 80000 | 262 | |---trip_point_1_temp: 80000 |
diff --git a/Documentation/usb/mass-storage.txt b/Documentation/usb/mass-storage.txt new file mode 100644 index 000000000000..e9b9334627bf --- /dev/null +++ b/Documentation/usb/mass-storage.txt | |||
@@ -0,0 +1,226 @@ | |||
1 | * Overview | ||
2 | |||
3 | Mass Storage Gadget (or MSG) acts as a USB Mass Storage device, | ||
4 | appearing to the host as a disk or a CD-ROM drive. It supports | ||
5 | multiple logical units (LUNs). Backing storage for each LUN is | ||
6 | provided by a regular file or a block device, access can be limited | ||
7 | to read-only, and gadget can indicate that it is removable and/or | ||
8 | CD-ROM (the latter implies read-only access). | ||
9 | |||
10 | Its requirements are modest; only a bulk-in and a bulk-out endpoint | ||
11 | are needed. The memory requirement amounts to two 16K buffers. | ||
12 | Support is included for full-speed, high-speed and SuperSpeed | ||
13 | operation. | ||
14 | |||
15 | Note that the driver is slightly non-portable in that it assumes | ||
16 | a single memory/DMA buffer will be useable for bulk-in and bulk-out | ||
17 | endpoints. With most device controllers this is not an issue, but | ||
18 | there may be some with hardware restrictions that prevent a buffer | ||
19 | from being used by more than one endpoint. | ||
20 | |||
21 | This document describes how to use the gadget from user space, its | ||
22 | relation to mass storage function (or MSF) and different gadgets | ||
23 | using it, and how it differs from File Storage Gadget (or FSG). It | ||
24 | will talk only briefly about how to use MSF within composite | ||
25 | gadgets. | ||
26 | |||
27 | * Module parameters | ||
28 | |||
29 | The mass storage gadget accepts the following mass storage specific | ||
30 | module parameters: | ||
31 | |||
32 | - file=filename[,filename...] | ||
33 | |||
34 | This parameter lists paths to files or block devices used for | ||
35 | backing storage for each logical unit. There may be at most | ||
36 | FSG_MAX_LUNS (8) LUNs set. If more files are specified, they will | ||
37 | be silently ignored. See also “luns” parameter. | ||
38 | |||
39 | *BEWARE* that if a file is used as a backing storage, it may not | ||
40 | be modified by any other process. This is because the host | ||
41 | assumes the data does not change without its knowledge. It may be | ||
42 | read, but (if the logical unit is writable) due to buffering on | ||
43 | the host side, the contents are not well defined. | ||
44 | |||
45 | The size of the logical unit will be rounded down to a full | ||
46 | logical block. The logical block size is 2048 bytes for LUNs | ||
47 | simulating CD-ROM, block size of the device if the backing file is | ||
48 | a block device, or 512 bytes otherwise. | ||
49 | |||
50 | - removable=b[,b...] | ||
51 | |||
52 | This parameter specifies whether each logical unit should be | ||
53 | removable. “b” here is either “y”, “Y” or “1” for true or “n”, | ||
54 | “N” or “0” for false. | ||
55 | |||
56 | If this option is set for a logical unit, gadget will accept an | ||
57 | “eject” SCSI request (Start/Stop Unit). When it is sent, the | ||
58 | backing file will be closed to simulate ejection and the logical | ||
59 | unit will not be mountable by the host until a new backing file is | ||
60 | specified by userspace on the device (see “sysfs entries” | ||
61 | section). | ||
62 | |||
63 | If a logical unit is not removable (the default), a backing file | ||
64 | must be specified for it with the “file” parameter as the module | ||
65 | is loaded. The same applies if the module is built in, no | ||
66 | exceptions. | ||
67 | |||
68 | The default value of the flag is false, *HOWEVER* it used to be | ||
69 | true. This has been changed to better match File Storage Gadget | ||
70 | and because it seems like a saner default after all. Thus to | ||
71 | maintain compatibility with older kernels, it's best to specify | ||
72 | the default values. Also, if one relied on old default, explicit | ||
73 | “n” needs to be specified now. | ||
74 | |||
75 | Note that “removable” means the logical unit's media can be | ||
76 | ejected or removed (as is true for a CD-ROM drive or a card | ||
77 | reader). It does *not* mean that the entire gadget can be | ||
78 | unplugged from the host; the proper term for that is | ||
79 | “hot-unpluggable”. | ||
80 | |||
81 | - cdrom=b[,b...] | ||
82 | |||
83 | This parameter specifies whether each logical unit should simulate | ||
84 | CD-ROM. The default is false. | ||
85 | |||
86 | - ro=b[,b...] | ||
87 | |||
88 | This parameter specifies whether each logical unit should be | ||
89 | reported as read only. This will prevent host from modifying the | ||
90 | backing files. | ||
91 | |||
92 | Note that if this flag for given logical unit is false but the | ||
93 | backing file could not be opened in read/write mode, the gadget | ||
94 | will fall back to read only mode anyway. | ||
95 | |||
96 | The default value for non-CD-ROM logical units is false; for | ||
97 | logical units simulating CD-ROM it is forced to true. | ||
98 | |||
99 | - nofua=b[,b...] | ||
100 | |||
101 | This parameter specifies whether FUA flag should be ignored in SCSI | ||
102 | Write10 and Write12 commands sent to given logical units. | ||
103 | |||
104 | MS Windows mounts removable storage in “Removal optimised mode” by | ||
105 | default. All the writes to the media are synchronous, which is | ||
106 | achieved by setting the FUA (Force Unit Access) bit in SCSI | ||
107 | Write(10,12) commands. This forces each write to wait until the | ||
108 | data has actually been written out and prevents I/O requests | ||
109 | aggregation in block layer dramatically decreasing performance. | ||
110 | |||
111 | Note that this may mean that if the device is powered from USB and | ||
112 | the user unplugs the device without unmounting it first (which at | ||
113 | least some Windows users do), the data may be lost. | ||
114 | |||
115 | The default value is false. | ||
116 | |||
117 | - luns=N | ||
118 | |||
119 | This parameter specifies number of logical units the gadget will | ||
120 | have. It is limited by FSG_MAX_LUNS (8) and higher value will be | ||
121 | capped. | ||
122 | |||
123 | If this parameter is provided, and the number of files specified | ||
124 | in “file” argument is greater then the value of “luns”, all excess | ||
125 | files will be ignored. | ||
126 | |||
127 | If this parameter is not present, the number of logical units will | ||
128 | be deduced from the number of files specified in the “file” | ||
129 | parameter. If the file parameter is missing as well, one is | ||
130 | assumed. | ||
131 | |||
132 | - stall=b | ||
133 | |||
134 | Specifies whether the gadget is allowed to halt bulk endpoints. | ||
135 | The default is determined according to the type of USB device | ||
136 | controller, but usually true. | ||
137 | |||
138 | In addition to the above, the gadget also accepts the following | ||
139 | parameters defined by the composite framework (they are common to | ||
140 | all composite gadgets so just a quick listing): | ||
141 | |||
142 | - idVendor -- USB Vendor ID (16 bit integer) | ||
143 | - idProduct -- USB Product ID (16 bit integer) | ||
144 | - bcdDevice -- USB Device version (BCD) (16 bit integer) | ||
145 | - iManufacturer -- USB Manufacturer string (string) | ||
146 | - iProduct -- USB Product string (string) | ||
147 | - iSerialNumber -- SerialNumber string (sting) | ||
148 | |||
149 | * sysfs entries | ||
150 | |||
151 | For each logical unit, the gadget creates a directory in the sysfs | ||
152 | hierarchy. Inside of it the following three files are created: | ||
153 | |||
154 | - file | ||
155 | |||
156 | When read it returns the path to the backing file for the given | ||
157 | logical unit. If there is no backing file (possible only if the | ||
158 | logical unit is removable), the content is empty. | ||
159 | |||
160 | When written into, it changes the backing file for given logical | ||
161 | unit. This change can be performed even if given logical unit is | ||
162 | not specified as removable (but that may look strange to the | ||
163 | host). It may fail, however, if host disallowed medium removal | ||
164 | with the Prevent-Allow Medium Removal SCSI command. | ||
165 | |||
166 | - ro | ||
167 | |||
168 | Reflects the state of ro flag for the given logical unit. It can | ||
169 | be read any time, and written to when there is no backing file | ||
170 | open for given logical unit. | ||
171 | |||
172 | - nofua | ||
173 | |||
174 | Reflects the state of nofua flag for given logical unit. It can | ||
175 | be read and written. | ||
176 | |||
177 | Other then those, as usual, the values of module parameters can be | ||
178 | read from /sys/module/g_mass_storage/parameters/* files. | ||
179 | |||
180 | * Other gadgets using mass storage function | ||
181 | |||
182 | The Mass Storage Gadget uses the Mass Storage Function to handle | ||
183 | mass storage protocol. As a composite function, MSF may be used by | ||
184 | other gadgets as well (eg. g_multi and acm_ms). | ||
185 | |||
186 | All of the information in previous sections are valid for other | ||
187 | gadgets using MSF, except that support for mass storage related | ||
188 | module parameters may be missing, or the parameters may have | ||
189 | a prefix. To figure out whether any of this is true one needs to | ||
190 | consult the gadget's documentation or its source code. | ||
191 | |||
192 | For examples of how to include mass storage function in gadgets, one | ||
193 | may take a look at mass_storage.c, acm_ms.c and multi.c (sorted by | ||
194 | complexity). | ||
195 | |||
196 | * Relation to file storage gadget | ||
197 | |||
198 | The Mass Storage Function and thus the Mass Storage Gadget has been | ||
199 | based on the File Storage Gadget. The difference between the two is | ||
200 | that MSG is a composite gadget (ie. uses the composite framework) | ||
201 | while file storage gadget is a traditional gadget. From userspace | ||
202 | point of view this distinction does not really matter, but from | ||
203 | kernel hacker's point of view, this means that (i) MSG does not | ||
204 | duplicate code needed for handling basic USB protocol commands and | ||
205 | (ii) MSF can be used in any other composite gadget. | ||
206 | |||
207 | Because of that, File Storage Gadget has been deprecated and | ||
208 | scheduled to be removed in Linux 3.8. All users need to transition | ||
209 | to the Mass Storage Gadget by that time. The two gadgets behave | ||
210 | mostly the same from the outside except: | ||
211 | |||
212 | 1. In FSG the “removable” and “cdrom” module parameters set the flag | ||
213 | for all logical units whereas in MSG they accept a list of y/n | ||
214 | values for each logical unit. If one uses only a single logical | ||
215 | unit this does not matter, but if there are more, the y/n value | ||
216 | needs to be repeated for each logical unit. | ||
217 | |||
218 | 2. FSG's “serial”, “vendor”, “product” and “release” module | ||
219 | parameters are handled in MSG by the composite layer's parameters | ||
220 | named respectively: “iSerialnumber”, “idVendor”, “idProduct” and | ||
221 | “bcdDevice”. | ||
222 | |||
223 | 3. MSG does not support FSG's test mode, thus “transport”, | ||
224 | “protocol” and “buflen” FSG's module parameters are not | ||
225 | supported. MSG always uses SCSI protocol with bulk only | ||
226 | transport mode and 16 KiB buffers. | ||
diff --git a/Documentation/vfio.txt b/Documentation/vfio.txt new file mode 100644 index 000000000000..0cb6685c8029 --- /dev/null +++ b/Documentation/vfio.txt | |||
@@ -0,0 +1,314 @@ | |||
1 | VFIO - "Virtual Function I/O"[1] | ||
2 | ------------------------------------------------------------------------------- | ||
3 | Many modern system now provide DMA and interrupt remapping facilities | ||
4 | to help ensure I/O devices behave within the boundaries they've been | ||
5 | allotted. This includes x86 hardware with AMD-Vi and Intel VT-d, | ||
6 | POWER systems with Partitionable Endpoints (PEs) and embedded PowerPC | ||
7 | systems such as Freescale PAMU. The VFIO driver is an IOMMU/device | ||
8 | agnostic framework for exposing direct device access to userspace, in | ||
9 | a secure, IOMMU protected environment. In other words, this allows | ||
10 | safe[2], non-privileged, userspace drivers. | ||
11 | |||
12 | Why do we want that? Virtual machines often make use of direct device | ||
13 | access ("device assignment") when configured for the highest possible | ||
14 | I/O performance. From a device and host perspective, this simply | ||
15 | turns the VM into a userspace driver, with the benefits of | ||
16 | significantly reduced latency, higher bandwidth, and direct use of | ||
17 | bare-metal device drivers[3]. | ||
18 | |||
19 | Some applications, particularly in the high performance computing | ||
20 | field, also benefit from low-overhead, direct device access from | ||
21 | userspace. Examples include network adapters (often non-TCP/IP based) | ||
22 | and compute accelerators. Prior to VFIO, these drivers had to either | ||
23 | go through the full development cycle to become proper upstream | ||
24 | driver, be maintained out of tree, or make use of the UIO framework, | ||
25 | which has no notion of IOMMU protection, limited interrupt support, | ||
26 | and requires root privileges to access things like PCI configuration | ||
27 | space. | ||
28 | |||
29 | The VFIO driver framework intends to unify these, replacing both the | ||
30 | KVM PCI specific device assignment code as well as provide a more | ||
31 | secure, more featureful userspace driver environment than UIO. | ||
32 | |||
33 | Groups, Devices, and IOMMUs | ||
34 | ------------------------------------------------------------------------------- | ||
35 | |||
36 | Devices are the main target of any I/O driver. Devices typically | ||
37 | create a programming interface made up of I/O access, interrupts, | ||
38 | and DMA. Without going into the details of each of these, DMA is | ||
39 | by far the most critical aspect for maintaining a secure environment | ||
40 | as allowing a device read-write access to system memory imposes the | ||
41 | greatest risk to the overall system integrity. | ||
42 | |||
43 | To help mitigate this risk, many modern IOMMUs now incorporate | ||
44 | isolation properties into what was, in many cases, an interface only | ||
45 | meant for translation (ie. solving the addressing problems of devices | ||
46 | with limited address spaces). With this, devices can now be isolated | ||
47 | from each other and from arbitrary memory access, thus allowing | ||
48 | things like secure direct assignment of devices into virtual machines. | ||
49 | |||
50 | This isolation is not always at the granularity of a single device | ||
51 | though. Even when an IOMMU is capable of this, properties of devices, | ||
52 | interconnects, and IOMMU topologies can each reduce this isolation. | ||
53 | For instance, an individual device may be part of a larger multi- | ||
54 | function enclosure. While the IOMMU may be able to distinguish | ||
55 | between devices within the enclosure, the enclosure may not require | ||
56 | transactions between devices to reach the IOMMU. Examples of this | ||
57 | could be anything from a multi-function PCI device with backdoors | ||
58 | between functions to a non-PCI-ACS (Access Control Services) capable | ||
59 | bridge allowing redirection without reaching the IOMMU. Topology | ||
60 | can also play a factor in terms of hiding devices. A PCIe-to-PCI | ||
61 | bridge masks the devices behind it, making transaction appear as if | ||
62 | from the bridge itself. Obviously IOMMU design plays a major factor | ||
63 | as well. | ||
64 | |||
65 | Therefore, while for the most part an IOMMU may have device level | ||
66 | granularity, any system is susceptible to reduced granularity. The | ||
67 | IOMMU API therefore supports a notion of IOMMU groups. A group is | ||
68 | a set of devices which is isolatable from all other devices in the | ||
69 | system. Groups are therefore the unit of ownership used by VFIO. | ||
70 | |||
71 | While the group is the minimum granularity that must be used to | ||
72 | ensure secure user access, it's not necessarily the preferred | ||
73 | granularity. In IOMMUs which make use of page tables, it may be | ||
74 | possible to share a set of page tables between different groups, | ||
75 | reducing the overhead both to the platform (reduced TLB thrashing, | ||
76 | reduced duplicate page tables), and to the user (programming only | ||
77 | a single set of translations). For this reason, VFIO makes use of | ||
78 | a container class, which may hold one or more groups. A container | ||
79 | is created by simply opening the /dev/vfio/vfio character device. | ||
80 | |||
81 | On its own, the container provides little functionality, with all | ||
82 | but a couple version and extension query interfaces locked away. | ||
83 | The user needs to add a group into the container for the next level | ||
84 | of functionality. To do this, the user first needs to identify the | ||
85 | group associated with the desired device. This can be done using | ||
86 | the sysfs links described in the example below. By unbinding the | ||
87 | device from the host driver and binding it to a VFIO driver, a new | ||
88 | VFIO group will appear for the group as /dev/vfio/$GROUP, where | ||
89 | $GROUP is the IOMMU group number of which the device is a member. | ||
90 | If the IOMMU group contains multiple devices, each will need to | ||
91 | be bound to a VFIO driver before operations on the VFIO group | ||
92 | are allowed (it's also sufficient to only unbind the device from | ||
93 | host drivers if a VFIO driver is unavailable; this will make the | ||
94 | group available, but not that particular device). TBD - interface | ||
95 | for disabling driver probing/locking a device. | ||
96 | |||
97 | Once the group is ready, it may be added to the container by opening | ||
98 | the VFIO group character device (/dev/vfio/$GROUP) and using the | ||
99 | VFIO_GROUP_SET_CONTAINER ioctl, passing the file descriptor of the | ||
100 | previously opened container file. If desired and if the IOMMU driver | ||
101 | supports sharing the IOMMU context between groups, multiple groups may | ||
102 | be set to the same container. If a group fails to set to a container | ||
103 | with existing groups, a new empty container will need to be used | ||
104 | instead. | ||
105 | |||
106 | With a group (or groups) attached to a container, the remaining | ||
107 | ioctls become available, enabling access to the VFIO IOMMU interfaces. | ||
108 | Additionally, it now becomes possible to get file descriptors for each | ||
109 | device within a group using an ioctl on the VFIO group file descriptor. | ||
110 | |||
111 | The VFIO device API includes ioctls for describing the device, the I/O | ||
112 | regions and their read/write/mmap offsets on the device descriptor, as | ||
113 | well as mechanisms for describing and registering interrupt | ||
114 | notifications. | ||
115 | |||
116 | VFIO Usage Example | ||
117 | ------------------------------------------------------------------------------- | ||
118 | |||
119 | Assume user wants to access PCI device 0000:06:0d.0 | ||
120 | |||
121 | $ readlink /sys/bus/pci/devices/0000:06:0d.0/iommu_group | ||
122 | ../../../../kernel/iommu_groups/26 | ||
123 | |||
124 | This device is therefore in IOMMU group 26. This device is on the | ||
125 | pci bus, therefore the user will make use of vfio-pci to manage the | ||
126 | group: | ||
127 | |||
128 | # modprobe vfio-pci | ||
129 | |||
130 | Binding this device to the vfio-pci driver creates the VFIO group | ||
131 | character devices for this group: | ||
132 | |||
133 | $ lspci -n -s 0000:06:0d.0 | ||
134 | 06:0d.0 0401: 1102:0002 (rev 08) | ||
135 | # echo 0000:06:0d.0 > /sys/bus/pci/devices/0000:06:0d.0/driver/unbind | ||
136 | # echo 1102 0002 > /sys/bus/pci/drivers/vfio/new_id | ||
137 | |||
138 | Now we need to look at what other devices are in the group to free | ||
139 | it for use by VFIO: | ||
140 | |||
141 | $ ls -l /sys/bus/pci/devices/0000:06:0d.0/iommu_group/devices | ||
142 | total 0 | ||
143 | lrwxrwxrwx. 1 root root 0 Apr 23 16:13 0000:00:1e.0 -> | ||
144 | ../../../../devices/pci0000:00/0000:00:1e.0 | ||
145 | lrwxrwxrwx. 1 root root 0 Apr 23 16:13 0000:06:0d.0 -> | ||
146 | ../../../../devices/pci0000:00/0000:00:1e.0/0000:06:0d.0 | ||
147 | lrwxrwxrwx. 1 root root 0 Apr 23 16:13 0000:06:0d.1 -> | ||
148 | ../../../../devices/pci0000:00/0000:00:1e.0/0000:06:0d.1 | ||
149 | |||
150 | This device is behind a PCIe-to-PCI bridge[4], therefore we also | ||
151 | need to add device 0000:06:0d.1 to the group following the same | ||
152 | procedure as above. Device 0000:00:1e.0 is a bridge that does | ||
153 | not currently have a host driver, therefore it's not required to | ||
154 | bind this device to the vfio-pci driver (vfio-pci does not currently | ||
155 | support PCI bridges). | ||
156 | |||
157 | The final step is to provide the user with access to the group if | ||
158 | unprivileged operation is desired (note that /dev/vfio/vfio provides | ||
159 | no capabilities on its own and is therefore expected to be set to | ||
160 | mode 0666 by the system). | ||
161 | |||
162 | # chown user:user /dev/vfio/26 | ||
163 | |||
164 | The user now has full access to all the devices and the iommu for this | ||
165 | group and can access them as follows: | ||
166 | |||
167 | int container, group, device, i; | ||
168 | struct vfio_group_status group_status = | ||
169 | { .argsz = sizeof(group_status) }; | ||
170 | struct vfio_iommu_x86_info iommu_info = { .argsz = sizeof(iommu_info) }; | ||
171 | struct vfio_iommu_x86_dma_map dma_map = { .argsz = sizeof(dma_map) }; | ||
172 | struct vfio_device_info device_info = { .argsz = sizeof(device_info) }; | ||
173 | |||
174 | /* Create a new container */ | ||
175 | container = open("/dev/vfio/vfio, O_RDWR); | ||
176 | |||
177 | if (ioctl(container, VFIO_GET_API_VERSION) != VFIO_API_VERSION) | ||
178 | /* Unknown API version */ | ||
179 | |||
180 | if (!ioctl(container, VFIO_CHECK_EXTENSION, VFIO_X86_IOMMU)) | ||
181 | /* Doesn't support the IOMMU driver we want. */ | ||
182 | |||
183 | /* Open the group */ | ||
184 | group = open("/dev/vfio/26", O_RDWR); | ||
185 | |||
186 | /* Test the group is viable and available */ | ||
187 | ioctl(group, VFIO_GROUP_GET_STATUS, &group_status); | ||
188 | |||
189 | if (!(group_status.flags & VFIO_GROUP_FLAGS_VIABLE)) | ||
190 | /* Group is not viable (ie, not all devices bound for vfio) */ | ||
191 | |||
192 | /* Add the group to the container */ | ||
193 | ioctl(group, VFIO_GROUP_SET_CONTAINER, &container); | ||
194 | |||
195 | /* Enable the IOMMU model we want */ | ||
196 | ioctl(container, VFIO_SET_IOMMU, VFIO_X86_IOMMU) | ||
197 | |||
198 | /* Get addition IOMMU info */ | ||
199 | ioctl(container, VFIO_IOMMU_GET_INFO, &iommu_info); | ||
200 | |||
201 | /* Allocate some space and setup a DMA mapping */ | ||
202 | dma_map.vaddr = mmap(0, 1024 * 1024, PROT_READ | PROT_WRITE, | ||
203 | MAP_PRIVATE | MAP_ANONYMOUS, 0, 0); | ||
204 | dma_map.size = 1024 * 1024; | ||
205 | dma_map.iova = 0; /* 1MB starting at 0x0 from device view */ | ||
206 | dma_map.flags = VFIO_DMA_MAP_FLAG_READ | VFIO_DMA_MAP_FLAG_WRITE; | ||
207 | |||
208 | ioctl(container, VFIO_IOMMU_MAP_DMA, &dma_map); | ||
209 | |||
210 | /* Get a file descriptor for the device */ | ||
211 | device = ioctl(group, VFIO_GROUP_GET_DEVICE_FD, "0000:06:0d.0"); | ||
212 | |||
213 | /* Test and setup the device */ | ||
214 | ioctl(device, VFIO_DEVICE_GET_INFO, &device_info); | ||
215 | |||
216 | for (i = 0; i < device_info.num_regions; i++) { | ||
217 | struct vfio_region_info reg = { .argsz = sizeof(reg) }; | ||
218 | |||
219 | reg.index = i; | ||
220 | |||
221 | ioctl(device, VFIO_DEVICE_GET_REGION_INFO, ®); | ||
222 | |||
223 | /* Setup mappings... read/write offsets, mmaps | ||
224 | * For PCI devices, config space is a region */ | ||
225 | } | ||
226 | |||
227 | for (i = 0; i < device_info.num_irqs; i++) { | ||
228 | struct vfio_irq_info irq = { .argsz = sizeof(irq) }; | ||
229 | |||
230 | irq.index = i; | ||
231 | |||
232 | ioctl(device, VFIO_DEVICE_GET_IRQ_INFO, ®); | ||
233 | |||
234 | /* Setup IRQs... eventfds, VFIO_DEVICE_SET_IRQS */ | ||
235 | } | ||
236 | |||
237 | /* Gratuitous device reset and go... */ | ||
238 | ioctl(device, VFIO_DEVICE_RESET); | ||
239 | |||
240 | VFIO User API | ||
241 | ------------------------------------------------------------------------------- | ||
242 | |||
243 | Please see include/linux/vfio.h for complete API documentation. | ||
244 | |||
245 | VFIO bus driver API | ||
246 | ------------------------------------------------------------------------------- | ||
247 | |||
248 | VFIO bus drivers, such as vfio-pci make use of only a few interfaces | ||
249 | into VFIO core. When devices are bound and unbound to the driver, | ||
250 | the driver should call vfio_add_group_dev() and vfio_del_group_dev() | ||
251 | respectively: | ||
252 | |||
253 | extern int vfio_add_group_dev(struct iommu_group *iommu_group, | ||
254 | struct device *dev, | ||
255 | const struct vfio_device_ops *ops, | ||
256 | void *device_data); | ||
257 | |||
258 | extern void *vfio_del_group_dev(struct device *dev); | ||
259 | |||
260 | vfio_add_group_dev() indicates to the core to begin tracking the | ||
261 | specified iommu_group and register the specified dev as owned by | ||
262 | a VFIO bus driver. The driver provides an ops structure for callbacks | ||
263 | similar to a file operations structure: | ||
264 | |||
265 | struct vfio_device_ops { | ||
266 | int (*open)(void *device_data); | ||
267 | void (*release)(void *device_data); | ||
268 | ssize_t (*read)(void *device_data, char __user *buf, | ||
269 | size_t count, loff_t *ppos); | ||
270 | ssize_t (*write)(void *device_data, const char __user *buf, | ||
271 | size_t size, loff_t *ppos); | ||
272 | long (*ioctl)(void *device_data, unsigned int cmd, | ||
273 | unsigned long arg); | ||
274 | int (*mmap)(void *device_data, struct vm_area_struct *vma); | ||
275 | }; | ||
276 | |||
277 | Each function is passed the device_data that was originally registered | ||
278 | in the vfio_add_group_dev() call above. This allows the bus driver | ||
279 | an easy place to store its opaque, private data. The open/release | ||
280 | callbacks are issued when a new file descriptor is created for a | ||
281 | device (via VFIO_GROUP_GET_DEVICE_FD). The ioctl interface provides | ||
282 | a direct pass through for VFIO_DEVICE_* ioctls. The read/write/mmap | ||
283 | interfaces implement the device region access defined by the device's | ||
284 | own VFIO_DEVICE_GET_REGION_INFO ioctl. | ||
285 | |||
286 | ------------------------------------------------------------------------------- | ||
287 | |||
288 | [1] VFIO was originally an acronym for "Virtual Function I/O" in its | ||
289 | initial implementation by Tom Lyon while as Cisco. We've since | ||
290 | outgrown the acronym, but it's catchy. | ||
291 | |||
292 | [2] "safe" also depends upon a device being "well behaved". It's | ||
293 | possible for multi-function devices to have backdoors between | ||
294 | functions and even for single function devices to have alternative | ||
295 | access to things like PCI config space through MMIO registers. To | ||
296 | guard against the former we can include additional precautions in the | ||
297 | IOMMU driver to group multi-function PCI devices together | ||
298 | (iommu=group_mf). The latter we can't prevent, but the IOMMU should | ||
299 | still provide isolation. For PCI, SR-IOV Virtual Functions are the | ||
300 | best indicator of "well behaved", as these are designed for | ||
301 | virtualization usage models. | ||
302 | |||
303 | [3] As always there are trade-offs to virtual machine device | ||
304 | assignment that are beyond the scope of VFIO. It's expected that | ||
305 | future IOMMU technologies will reduce some, but maybe not all, of | ||
306 | these trade-offs. | ||
307 | |||
308 | [4] In this case the device is below a PCI bridge, so transactions | ||
309 | from either function of the device are indistinguishable to the iommu: | ||
310 | |||
311 | -[0000:00]-+-1e.0-[06]--+-0d.0 | ||
312 | \-0d.1 | ||
313 | |||
314 | 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 90) | ||
diff --git a/Documentation/video4linux/CARDLIST.au0828 b/Documentation/video4linux/CARDLIST.au0828 index 7b59e953c4bf..a8a65753e544 100644 --- a/Documentation/video4linux/CARDLIST.au0828 +++ b/Documentation/video4linux/CARDLIST.au0828 | |||
@@ -3,4 +3,4 @@ | |||
3 | 2 -> Hauppauge HVR850 (au0828) [2040:7240] | 3 | 2 -> Hauppauge HVR850 (au0828) [2040:7240] |
4 | 3 -> DViCO FusionHDTV USB (au0828) [0fe9:d620] | 4 | 3 -> DViCO FusionHDTV USB (au0828) [0fe9:d620] |
5 | 4 -> Hauppauge HVR950Q rev xxF8 (au0828) [2040:7201,2040:7211,2040:7281] | 5 | 4 -> Hauppauge HVR950Q rev xxF8 (au0828) [2040:7201,2040:7211,2040:7281] |
6 | 5 -> Hauppauge Woodbury (au0828) [2040:8200] | 6 | 5 -> Hauppauge Woodbury (au0828) [05e1:0480,2040:8200] |
diff --git a/Documentation/video4linux/CARDLIST.bttv b/Documentation/video4linux/CARDLIST.bttv index b753906c7183..581f666a76cf 100644 --- a/Documentation/video4linux/CARDLIST.bttv +++ b/Documentation/video4linux/CARDLIST.bttv | |||
@@ -159,3 +159,4 @@ | |||
159 | 158 -> Geovision GV-800(S) (slave) [800b:763d,800c:763d,800d:763d] | 159 | 158 -> Geovision GV-800(S) (slave) [800b:763d,800c:763d,800d:763d] |
160 | 159 -> ProVideo PV183 [1830:1540,1831:1540,1832:1540,1833:1540,1834:1540,1835:1540,1836:1540,1837:1540] | 160 | 159 -> ProVideo PV183 [1830:1540,1831:1540,1832:1540,1833:1540,1834:1540,1835:1540,1836:1540,1837:1540] |
161 | 160 -> Tongwei Video Technology TD-3116 [f200:3116] | 161 | 160 -> Tongwei Video Technology TD-3116 [f200:3116] |
162 | 161 -> Aposonic W-DVR [0279:0228] | ||
diff --git a/Documentation/video4linux/CARDLIST.cx23885 b/Documentation/video4linux/CARDLIST.cx23885 index f316d1816fcd..652aecd13199 100644 --- a/Documentation/video4linux/CARDLIST.cx23885 +++ b/Documentation/video4linux/CARDLIST.cx23885 | |||
@@ -18,7 +18,7 @@ | |||
18 | 17 -> NetUP Dual DVB-S2 CI [1b55:2a2c] | 18 | 17 -> NetUP Dual DVB-S2 CI [1b55:2a2c] |
19 | 18 -> Hauppauge WinTV-HVR1270 [0070:2211] | 19 | 18 -> Hauppauge WinTV-HVR1270 [0070:2211] |
20 | 19 -> Hauppauge WinTV-HVR1275 [0070:2215,0070:221d,0070:22f2] | 20 | 19 -> Hauppauge WinTV-HVR1275 [0070:2215,0070:221d,0070:22f2] |
21 | 20 -> Hauppauge WinTV-HVR1255 [0070:2251,0070:2259,0070:22f1] | 21 | 20 -> Hauppauge WinTV-HVR1255 [0070:2251,0070:22f1] |
22 | 21 -> Hauppauge WinTV-HVR1210 [0070:2291,0070:2295,0070:2299,0070:229d,0070:22f0,0070:22f3,0070:22f4,0070:22f5] | 22 | 21 -> Hauppauge WinTV-HVR1210 [0070:2291,0070:2295,0070:2299,0070:229d,0070:22f0,0070:22f3,0070:22f4,0070:22f5] |
23 | 22 -> Mygica X8506 DMB-TH [14f1:8651] | 23 | 22 -> Mygica X8506 DMB-TH [14f1:8651] |
24 | 23 -> Magic-Pro ProHDTV Extreme 2 [14f1:8657] | 24 | 23 -> Magic-Pro ProHDTV Extreme 2 [14f1:8657] |
@@ -33,3 +33,5 @@ | |||
33 | 32 -> MPX-885 | 33 | 32 -> MPX-885 |
34 | 33 -> Mygica X8507 [14f1:8502] | 34 | 33 -> Mygica X8507 [14f1:8502] |
35 | 34 -> TerraTec Cinergy T PCIe Dual [153b:117e] | 35 | 34 -> TerraTec Cinergy T PCIe Dual [153b:117e] |
36 | 35 -> TeVii S471 [d471:9022] | ||
37 | 36 -> Hauppauge WinTV-HVR1255 [0070:2259] | ||
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134 index 34f3b330e5f4..94d9025aa82d 100644 --- a/Documentation/video4linux/CARDLIST.saa7134 +++ b/Documentation/video4linux/CARDLIST.saa7134 | |||
@@ -188,3 +188,4 @@ | |||
188 | 187 -> Beholder BeholdTV 503 FM [5ace:5030] | 188 | 187 -> Beholder BeholdTV 503 FM [5ace:5030] |
189 | 188 -> Sensoray 811/911 [6000:0811,6000:0911] | 189 | 188 -> Sensoray 811/911 [6000:0811,6000:0911] |
190 | 189 -> Kworld PC150-U [17de:a134] | 190 | 189 -> Kworld PC150-U [17de:a134] |
191 | 190 -> Asus My Cinema PS3-100 [1043:48cd] | ||
diff --git a/Documentation/video4linux/cpia2_overview.txt b/Documentation/video4linux/cpia2_overview.txt index a6e53665216b..ad6adbedfe50 100644 --- a/Documentation/video4linux/cpia2_overview.txt +++ b/Documentation/video4linux/cpia2_overview.txt | |||
@@ -35,4 +35,4 @@ the camera. There are three modes for this. Block mode requests a number | |||
35 | of contiguous registers. Random mode reads or writes random registers with | 35 | of contiguous registers. Random mode reads or writes random registers with |
36 | a tuple structure containing address/value pairs. The repeat mode is only | 36 | a tuple structure containing address/value pairs. The repeat mode is only |
37 | used by VP4 to load a firmware patch. It contains a starting address and | 37 | used by VP4 to load a firmware patch. It contains a starting address and |
38 | a sequence of bytes to be written into a gpio port. \ No newline at end of file | 38 | a sequence of bytes to be written into a gpio port. |
diff --git a/Documentation/video4linux/stv680.txt b/Documentation/video4linux/stv680.txt index 4f8946f32f51..e3de33645308 100644 --- a/Documentation/video4linux/stv680.txt +++ b/Documentation/video4linux/stv680.txt | |||
@@ -50,4 +50,4 @@ The latest info on this driver can be found at: | |||
50 | http://personal.clt.bellsouth.net/~kjsisson or at | 50 | http://personal.clt.bellsouth.net/~kjsisson or at |
51 | http://stv0680-usb.sourceforge.net | 51 | http://stv0680-usb.sourceforge.net |
52 | 52 | ||
53 | Any questions to me can be send to: kjsisson@bellsouth.net \ No newline at end of file | 53 | Any questions to me can be send to: kjsisson@bellsouth.net |
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt index 1f5905270050..89318be6c1d2 100644 --- a/Documentation/video4linux/v4l2-framework.txt +++ b/Documentation/video4linux/v4l2-framework.txt | |||
@@ -594,6 +594,15 @@ You should also set these fields: | |||
594 | unlocked_ioctl file operation is called this lock will be taken by the | 594 | unlocked_ioctl file operation is called this lock will be taken by the |
595 | core and released afterwards. See the next section for more details. | 595 | core and released afterwards. See the next section for more details. |
596 | 596 | ||
597 | - queue: a pointer to the struct vb2_queue associated with this device node. | ||
598 | If queue is non-NULL, and queue->lock is non-NULL, then queue->lock is | ||
599 | used for the queuing ioctls (VIDIOC_REQBUFS, CREATE_BUFS, QBUF, DQBUF, | ||
600 | QUERYBUF, PREPARE_BUF, STREAMON and STREAMOFF) instead of the lock above. | ||
601 | That way the vb2 queuing framework does not have to wait for other ioctls. | ||
602 | This queue pointer is also used by the vb2 helper functions to check for | ||
603 | queuing ownership (i.e. is the filehandle calling it allowed to do the | ||
604 | operation). | ||
605 | |||
597 | - prio: keeps track of the priorities. Used to implement VIDIOC_G/S_PRIORITY. | 606 | - prio: keeps track of the priorities. Used to implement VIDIOC_G/S_PRIORITY. |
598 | If left to NULL, then it will use the struct v4l2_prio_state in v4l2_device. | 607 | If left to NULL, then it will use the struct v4l2_prio_state in v4l2_device. |
599 | If you want to have a separate priority state per (group of) device node(s), | 608 | If you want to have a separate priority state per (group of) device node(s), |
@@ -647,47 +656,43 @@ manually set the struct media_entity type and name fields. | |||
647 | A reference to the entity will be automatically acquired/released when the | 656 | A reference to the entity will be automatically acquired/released when the |
648 | video device is opened/closed. | 657 | video device is opened/closed. |
649 | 658 | ||
650 | v4l2_file_operations and locking | 659 | ioctls and locking |
651 | -------------------------------- | 660 | ------------------ |
652 | |||
653 | You can set a pointer to a mutex_lock in struct video_device. Usually this | ||
654 | will be either a top-level mutex or a mutex per device node. By default this | ||
655 | lock will be used for unlocked_ioctl, but you can disable locking for | ||
656 | selected ioctls by calling: | ||
657 | |||
658 | void v4l2_disable_ioctl_locking(struct video_device *vdev, unsigned int cmd); | ||
659 | |||
660 | E.g.: v4l2_disable_ioctl_locking(vdev, VIDIOC_DQBUF); | ||
661 | 661 | ||
662 | You have to call this before you register the video_device. | 662 | The V4L core provides optional locking services. The main service is the |
663 | lock field in struct video_device, which is a pointer to a mutex. If you set | ||
664 | this pointer, then that will be used by unlocked_ioctl to serialize all ioctls. | ||
663 | 665 | ||
664 | Particularly with USB drivers where certain commands such as setting controls | 666 | If you are using the videobuf2 framework, then there is a second lock that you |
665 | can take a long time you may want to do your own locking for the buffer queuing | 667 | can set: video_device->queue->lock. If set, then this lock will be used instead |
666 | ioctls. | 668 | of video_device->lock to serialize all queuing ioctls (see the previous section |
669 | for the full list of those ioctls). | ||
667 | 670 | ||
668 | If you want still finer-grained locking then you have to set mutex_lock to NULL | 671 | The advantage of using a different lock for the queuing ioctls is that for some |
669 | and do you own locking completely. | 672 | drivers (particularly USB drivers) certain commands such as setting controls |
673 | can take a long time, so you want to use a separate lock for the buffer queuing | ||
674 | ioctls. That way your VIDIOC_DQBUF doesn't stall because the driver is busy | ||
675 | changing the e.g. exposure of the webcam. | ||
670 | 676 | ||
671 | It is up to the driver developer to decide which method to use. However, if | 677 | Of course, you can always do all the locking yourself by leaving both lock |
672 | your driver has high-latency operations (for example, changing the exposure | 678 | pointers at NULL. |
673 | of a USB webcam might take a long time), then you might be better off with | ||
674 | doing your own locking if you want to allow the user to do other things with | ||
675 | the device while waiting for the high-latency command to finish. | ||
676 | 679 | ||
677 | If a lock is specified then all ioctl commands will be serialized on that | 680 | If you use the old videobuf then you must pass the video_device lock to the |
678 | lock. If you use videobuf then you must pass the same lock to the videobuf | 681 | videobuf queue initialize function: if videobuf has to wait for a frame to |
679 | queue initialize function: if videobuf has to wait for a frame to arrive, then | 682 | arrive, then it will temporarily unlock the lock and relock it afterwards. If |
680 | it will temporarily unlock the lock and relock it afterwards. If your driver | 683 | your driver also waits in the code, then you should do the same to allow other |
681 | also waits in the code, then you should do the same to allow other processes | 684 | processes to access the device node while the first process is waiting for |
682 | to access the device node while the first process is waiting for something. | 685 | something. |
683 | 686 | ||
684 | In the case of videobuf2 you will need to implement the wait_prepare and | 687 | In the case of videobuf2 you will need to implement the wait_prepare and |
685 | wait_finish callbacks to unlock/lock if applicable. In particular, if you use | 688 | wait_finish callbacks to unlock/lock if applicable. If you use the queue->lock |
686 | the lock in struct video_device then you must unlock/lock this mutex in | 689 | pointer, then you can use the helper functions vb2_ops_wait_prepare/finish. |
687 | wait_prepare and wait_finish. | 690 | |
688 | 691 | The implementation of a hotplug disconnect should also take the lock from | |
689 | The implementation of a hotplug disconnect should also take the lock before | 692 | video_device before calling v4l2_device_disconnect. If you are also using |
690 | calling v4l2_device_disconnect. | 693 | video_device->queue->lock, then you have to first lock video_device->queue->lock |
694 | followed by video_device->lock. That way you can be sure no ioctl is running | ||
695 | when you call v4l2_device_disconnect. | ||
691 | 696 | ||
692 | video_device registration | 697 | video_device registration |
693 | ------------------------- | 698 | ------------------------- |
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index 2c9948379469..bf33aaa4c59f 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt | |||
@@ -1946,6 +1946,40 @@ the guest using the specified gsi pin. The irqfd is removed using | |||
1946 | the KVM_IRQFD_FLAG_DEASSIGN flag, specifying both kvm_irqfd.fd | 1946 | the KVM_IRQFD_FLAG_DEASSIGN flag, specifying both kvm_irqfd.fd |
1947 | and kvm_irqfd.gsi. | 1947 | and kvm_irqfd.gsi. |
1948 | 1948 | ||
1949 | 4.76 KVM_PPC_ALLOCATE_HTAB | ||
1950 | |||
1951 | Capability: KVM_CAP_PPC_ALLOC_HTAB | ||
1952 | Architectures: powerpc | ||
1953 | Type: vm ioctl | ||
1954 | Parameters: Pointer to u32 containing hash table order (in/out) | ||
1955 | Returns: 0 on success, -1 on error | ||
1956 | |||
1957 | This requests the host kernel to allocate an MMU hash table for a | ||
1958 | guest using the PAPR paravirtualization interface. This only does | ||
1959 | anything if the kernel is configured to use the Book 3S HV style of | ||
1960 | virtualization. Otherwise the capability doesn't exist and the ioctl | ||
1961 | returns an ENOTTY error. The rest of this description assumes Book 3S | ||
1962 | HV. | ||
1963 | |||
1964 | There must be no vcpus running when this ioctl is called; if there | ||
1965 | are, it will do nothing and return an EBUSY error. | ||
1966 | |||
1967 | The parameter is a pointer to a 32-bit unsigned integer variable | ||
1968 | containing the order (log base 2) of the desired size of the hash | ||
1969 | table, which must be between 18 and 46. On successful return from the | ||
1970 | ioctl, it will have been updated with the order of the hash table that | ||
1971 | was allocated. | ||
1972 | |||
1973 | If no hash table has been allocated when any vcpu is asked to run | ||
1974 | (with the KVM_RUN ioctl), the host kernel will allocate a | ||
1975 | default-sized hash table (16 MB). | ||
1976 | |||
1977 | If this ioctl is called when a hash table has already been allocated, | ||
1978 | the kernel will clear out the existing hash table (zero all HPTEs) and | ||
1979 | return the hash table order in the parameter. (If the guest is using | ||
1980 | the virtualized real-mode area (VRMA) facility, the kernel will | ||
1981 | re-create the VMRA HPTEs on the next KVM_RUN of any vcpu.) | ||
1982 | |||
1949 | 1983 | ||
1950 | 5. The kvm_run structure | 1984 | 5. The kvm_run structure |
1951 | ------------------------ | 1985 | ------------------------ |
diff --git a/Documentation/virtual/kvm/locking.txt b/Documentation/virtual/kvm/locking.txt index 3b4cd3bf5631..41b7ac9884b5 100644 --- a/Documentation/virtual/kvm/locking.txt +++ b/Documentation/virtual/kvm/locking.txt | |||
@@ -6,7 +6,129 @@ KVM Lock Overview | |||
6 | 6 | ||
7 | (to be written) | 7 | (to be written) |
8 | 8 | ||
9 | 2. Reference | 9 | 2: Exception |
10 | ------------ | ||
11 | |||
12 | Fast page fault: | ||
13 | |||
14 | Fast page fault is the fast path which fixes the guest page fault out of | ||
15 | the mmu-lock on x86. Currently, the page fault can be fast only if the | ||
16 | shadow page table is present and it is caused by write-protect, that means | ||
17 | we just need change the W bit of the spte. | ||
18 | |||
19 | What we use to avoid all the race is the SPTE_HOST_WRITEABLE bit and | ||
20 | SPTE_MMU_WRITEABLE bit on the spte: | ||
21 | - SPTE_HOST_WRITEABLE means the gfn is writable on host. | ||
22 | - SPTE_MMU_WRITEABLE means the gfn is writable on mmu. The bit is set when | ||
23 | the gfn is writable on guest mmu and it is not write-protected by shadow | ||
24 | page write-protection. | ||
25 | |||
26 | On fast page fault path, we will use cmpxchg to atomically set the spte W | ||
27 | bit if spte.SPTE_HOST_WRITEABLE = 1 and spte.SPTE_WRITE_PROTECT = 1, this | ||
28 | is safe because whenever changing these bits can be detected by cmpxchg. | ||
29 | |||
30 | But we need carefully check these cases: | ||
31 | 1): The mapping from gfn to pfn | ||
32 | The mapping from gfn to pfn may be changed since we can only ensure the pfn | ||
33 | is not changed during cmpxchg. This is a ABA problem, for example, below case | ||
34 | will happen: | ||
35 | |||
36 | At the beginning: | ||
37 | gpte = gfn1 | ||
38 | gfn1 is mapped to pfn1 on host | ||
39 | spte is the shadow page table entry corresponding with gpte and | ||
40 | spte = pfn1 | ||
41 | |||
42 | VCPU 0 VCPU0 | ||
43 | on fast page fault path: | ||
44 | |||
45 | old_spte = *spte; | ||
46 | pfn1 is swapped out: | ||
47 | spte = 0; | ||
48 | |||
49 | pfn1 is re-alloced for gfn2. | ||
50 | |||
51 | gpte is changed to point to | ||
52 | gfn2 by the guest: | ||
53 | spte = pfn1; | ||
54 | |||
55 | if (cmpxchg(spte, old_spte, old_spte+W) | ||
56 | mark_page_dirty(vcpu->kvm, gfn1) | ||
57 | OOPS!!! | ||
58 | |||
59 | We dirty-log for gfn1, that means gfn2 is lost in dirty-bitmap. | ||
60 | |||
61 | For direct sp, we can easily avoid it since the spte of direct sp is fixed | ||
62 | to gfn. For indirect sp, before we do cmpxchg, we call gfn_to_pfn_atomic() | ||
63 | to pin gfn to pfn, because after gfn_to_pfn_atomic(): | ||
64 | - We have held the refcount of pfn that means the pfn can not be freed and | ||
65 | be reused for another gfn. | ||
66 | - The pfn is writable that means it can not be shared between different gfns | ||
67 | by KSM. | ||
68 | |||
69 | Then, we can ensure the dirty bitmaps is correctly set for a gfn. | ||
70 | |||
71 | Currently, to simplify the whole things, we disable fast page fault for | ||
72 | indirect shadow page. | ||
73 | |||
74 | 2): Dirty bit tracking | ||
75 | In the origin code, the spte can be fast updated (non-atomically) if the | ||
76 | spte is read-only and the Accessed bit has already been set since the | ||
77 | Accessed bit and Dirty bit can not be lost. | ||
78 | |||
79 | But it is not true after fast page fault since the spte can be marked | ||
80 | writable between reading spte and updating spte. Like below case: | ||
81 | |||
82 | At the beginning: | ||
83 | spte.W = 0 | ||
84 | spte.Accessed = 1 | ||
85 | |||
86 | VCPU 0 VCPU0 | ||
87 | In mmu_spte_clear_track_bits(): | ||
88 | |||
89 | old_spte = *spte; | ||
90 | |||
91 | /* 'if' condition is satisfied. */ | ||
92 | if (old_spte.Accssed == 1 && | ||
93 | old_spte.W == 0) | ||
94 | spte = 0ull; | ||
95 | on fast page fault path: | ||
96 | spte.W = 1 | ||
97 | memory write on the spte: | ||
98 | spte.Dirty = 1 | ||
99 | |||
100 | |||
101 | else | ||
102 | old_spte = xchg(spte, 0ull) | ||
103 | |||
104 | |||
105 | if (old_spte.Accssed == 1) | ||
106 | kvm_set_pfn_accessed(spte.pfn); | ||
107 | if (old_spte.Dirty == 1) | ||
108 | kvm_set_pfn_dirty(spte.pfn); | ||
109 | OOPS!!! | ||
110 | |||
111 | The Dirty bit is lost in this case. | ||
112 | |||
113 | In order to avoid this kind of issue, we always treat the spte as "volatile" | ||
114 | if it can be updated out of mmu-lock, see spte_has_volatile_bits(), it means, | ||
115 | the spte is always atomicly updated in this case. | ||
116 | |||
117 | 3): flush tlbs due to spte updated | ||
118 | If the spte is updated from writable to readonly, we should flush all TLBs, | ||
119 | otherwise rmap_write_protect will find a read-only spte, even though the | ||
120 | writable spte might be cached on a CPU's TLB. | ||
121 | |||
122 | As mentioned before, the spte can be updated to writable out of mmu-lock on | ||
123 | fast page fault path, in order to easily audit the path, we see if TLBs need | ||
124 | be flushed caused by this reason in mmu_spte_update() since this is a common | ||
125 | function to update spte (present -> present). | ||
126 | |||
127 | Since the spte is "volatile" if it can be updated out of mmu-lock, we always | ||
128 | atomicly update the spte, the race caused by fast page fault can be avoided, | ||
129 | See the comments in spte_has_volatile_bits() and mmu_spte_update(). | ||
130 | |||
131 | 3. Reference | ||
10 | ------------ | 132 | ------------ |
11 | 133 | ||
12 | Name: kvm_lock | 134 | Name: kvm_lock |
@@ -23,3 +145,9 @@ Arch: x86 | |||
23 | Protects: - kvm_arch::{last_tsc_write,last_tsc_nsec,last_tsc_offset} | 145 | Protects: - kvm_arch::{last_tsc_write,last_tsc_nsec,last_tsc_offset} |
24 | - tsc offset in vmcb | 146 | - tsc offset in vmcb |
25 | Comment: 'raw' because updating the tsc offsets must not be preempted. | 147 | Comment: 'raw' because updating the tsc offsets must not be preempted. |
148 | |||
149 | Name: kvm->mmu_lock | ||
150 | Type: spinlock_t | ||
151 | Arch: any | ||
152 | Protects: -shadow page/shadow tlb entry | ||
153 | Comment: it is a spinlock since it is used in mmu notifier. | ||
diff --git a/Documentation/virtual/kvm/msr.txt b/Documentation/virtual/kvm/msr.txt index 96b41bd97523..730471048583 100644 --- a/Documentation/virtual/kvm/msr.txt +++ b/Documentation/virtual/kvm/msr.txt | |||
@@ -223,3 +223,36 @@ MSR_KVM_STEAL_TIME: 0x4b564d03 | |||
223 | steal: the amount of time in which this vCPU did not run, in | 223 | steal: the amount of time in which this vCPU did not run, in |
224 | nanoseconds. Time during which the vcpu is idle, will not be | 224 | nanoseconds. Time during which the vcpu is idle, will not be |
225 | reported as steal time. | 225 | reported as steal time. |
226 | |||
227 | MSR_KVM_EOI_EN: 0x4b564d04 | ||
228 | data: Bit 0 is 1 when PV end of interrupt is enabled on the vcpu; 0 | ||
229 | when disabled. Bit 1 is reserved and must be zero. When PV end of | ||
230 | interrupt is enabled (bit 0 set), bits 63-2 hold a 4-byte aligned | ||
231 | physical address of a 4 byte memory area which must be in guest RAM and | ||
232 | must be zeroed. | ||
233 | |||
234 | The first, least significant bit of 4 byte memory location will be | ||
235 | written to by the hypervisor, typically at the time of interrupt | ||
236 | injection. Value of 1 means that guest can skip writing EOI to the apic | ||
237 | (using MSR or MMIO write); instead, it is sufficient to signal | ||
238 | EOI by clearing the bit in guest memory - this location will | ||
239 | later be polled by the hypervisor. | ||
240 | Value of 0 means that the EOI write is required. | ||
241 | |||
242 | It is always safe for the guest to ignore the optimization and perform | ||
243 | the APIC EOI write anyway. | ||
244 | |||
245 | Hypervisor is guaranteed to only modify this least | ||
246 | significant bit while in the current VCPU context, this means that | ||
247 | guest does not need to use either lock prefix or memory ordering | ||
248 | primitives to synchronise with the hypervisor. | ||
249 | |||
250 | However, hypervisor can set and clear this memory bit at any time: | ||
251 | therefore to make sure hypervisor does not interrupt the | ||
252 | guest and clear the least significant bit in the memory area | ||
253 | in the window between guest testing it to detect | ||
254 | whether it can skip EOI apic write and between guest | ||
255 | clearing it to signal EOI to the hypervisor, | ||
256 | guest must both read the least significant bit in the memory area and | ||
257 | clear it using a single CPU instruction, such as test and clear, or | ||
258 | compare and exchange. | ||
diff --git a/Documentation/virtual/kvm/ppc-pv.txt b/Documentation/virtual/kvm/ppc-pv.txt index 6e7c37050930..4911cf95c67e 100644 --- a/Documentation/virtual/kvm/ppc-pv.txt +++ b/Documentation/virtual/kvm/ppc-pv.txt | |||
@@ -109,8 +109,6 @@ The following bits are safe to be set inside the guest: | |||
109 | 109 | ||
110 | MSR_EE | 110 | MSR_EE |
111 | MSR_RI | 111 | MSR_RI |
112 | MSR_CR | ||
113 | MSR_ME | ||
114 | 112 | ||
115 | If any other bit changes in the MSR, please still use mtmsr(d). | 113 | If any other bit changes in the MSR, please still use mtmsr(d). |
116 | 114 | ||
diff --git a/Documentation/vm/frontswap.txt b/Documentation/vm/frontswap.txt index 37067cf455f4..5ef2d1366425 100644 --- a/Documentation/vm/frontswap.txt +++ b/Documentation/vm/frontswap.txt | |||
@@ -25,7 +25,7 @@ with the specified swap device number (aka "type"). A "store" will | |||
25 | copy the page to transcendent memory and associate it with the type and | 25 | copy the page to transcendent memory and associate it with the type and |
26 | offset associated with the page. A "load" will copy the page, if found, | 26 | offset associated with the page. A "load" will copy the page, if found, |
27 | from transcendent memory into kernel memory, but will NOT remove the page | 27 | from transcendent memory into kernel memory, but will NOT remove the page |
28 | from from transcendent memory. An "invalidate_page" will remove the page | 28 | from transcendent memory. An "invalidate_page" will remove the page |
29 | from transcendent memory and an "invalidate_area" will remove ALL pages | 29 | from transcendent memory and an "invalidate_area" will remove ALL pages |
30 | associated with the swap type (e.g., like swapoff) and notify the "device" | 30 | associated with the swap type (e.g., like swapoff) and notify the "device" |
31 | to refuse further stores with that swap type. | 31 | to refuse further stores with that swap type. |
@@ -99,7 +99,7 @@ server configured with a large amount of RAM... without pre-configuring | |||
99 | how much of the RAM is available for each of the clients! | 99 | how much of the RAM is available for each of the clients! |
100 | 100 | ||
101 | In the virtual case, the whole point of virtualization is to statistically | 101 | In the virtual case, the whole point of virtualization is to statistically |
102 | multiplex physical resources acrosst the varying demands of multiple | 102 | multiplex physical resources across the varying demands of multiple |
103 | virtual machines. This is really hard to do with RAM and efforts to do | 103 | virtual machines. This is really hard to do with RAM and efforts to do |
104 | it well with no kernel changes have essentially failed (except in some | 104 | it well with no kernel changes have essentially failed (except in some |
105 | well-publicized special-case workloads). | 105 | well-publicized special-case workloads). |
diff --git a/Documentation/w1/slaves/w1_ds28e04 b/Documentation/w1/slaves/w1_ds28e04 new file mode 100644 index 000000000000..85bc9a7e02fe --- /dev/null +++ b/Documentation/w1/slaves/w1_ds28e04 | |||
@@ -0,0 +1,36 @@ | |||
1 | Kernel driver w1_ds28e04 | ||
2 | ======================== | ||
3 | |||
4 | Supported chips: | ||
5 | * Maxim DS28E04-100 4096-Bit Addressable 1-Wire EEPROM with PIO | ||
6 | |||
7 | supported family codes: | ||
8 | W1_FAMILY_DS28E04 0x1C | ||
9 | |||
10 | Author: Markus Franke, <franke.m@sebakmt.com> <franm@hrz.tu-chemnitz.de> | ||
11 | |||
12 | Description | ||
13 | ----------- | ||
14 | |||
15 | Support is provided through the sysfs files "eeprom" and "pio". CRC checking | ||
16 | during memory accesses can optionally be enabled/disabled via the device | ||
17 | attribute "crccheck". The strong pull-up can optionally be enabled/disabled | ||
18 | via the module parameter "w1_strong_pullup". | ||
19 | |||
20 | Memory Access | ||
21 | |||
22 | A read operation on the "eeprom" file reads the given amount of bytes | ||
23 | from the EEPROM of the DS28E04. | ||
24 | |||
25 | A write operation on the "eeprom" file writes the given byte sequence | ||
26 | to the EEPROM of the DS28E04. If CRC checking mode is enabled only | ||
27 | fully alligned blocks of 32 bytes with valid CRC16 values (in bytes 30 | ||
28 | and 31) are allowed to be written. | ||
29 | |||
30 | PIO Access | ||
31 | |||
32 | The 2 PIOs of the DS28E04-100 are accessible via the "pio" sysfs file. | ||
33 | |||
34 | The current status of the PIO's is returned as an 8 bit value. Bit 0/1 | ||
35 | represent the state of PIO_0/PIO_1. Bits 2..7 do not care. The PIO's are | ||
36 | driven low-active, i.e. the driver delivers/expects low-active values. | ||
diff --git a/Documentation/workqueue.txt b/Documentation/workqueue.txt index a0b577de918f..a6ab4b62d926 100644 --- a/Documentation/workqueue.txt +++ b/Documentation/workqueue.txt | |||
@@ -89,25 +89,28 @@ called thread-pools. | |||
89 | 89 | ||
90 | The cmwq design differentiates between the user-facing workqueues that | 90 | The cmwq design differentiates between the user-facing workqueues that |
91 | subsystems and drivers queue work items on and the backend mechanism | 91 | subsystems and drivers queue work items on and the backend mechanism |
92 | which manages thread-pool and processes the queued work items. | 92 | which manages thread-pools and processes the queued work items. |
93 | 93 | ||
94 | The backend is called gcwq. There is one gcwq for each possible CPU | 94 | The backend is called gcwq. There is one gcwq for each possible CPU |
95 | and one gcwq to serve work items queued on unbound workqueues. | 95 | and one gcwq to serve work items queued on unbound workqueues. Each |
96 | gcwq has two thread-pools - one for normal work items and the other | ||
97 | for high priority ones. | ||
96 | 98 | ||
97 | Subsystems and drivers can create and queue work items through special | 99 | Subsystems and drivers can create and queue work items through special |
98 | workqueue API functions as they see fit. They can influence some | 100 | workqueue API functions as they see fit. They can influence some |
99 | aspects of the way the work items are executed by setting flags on the | 101 | aspects of the way the work items are executed by setting flags on the |
100 | workqueue they are putting the work item on. These flags include | 102 | workqueue they are putting the work item on. These flags include |
101 | things like CPU locality, reentrancy, concurrency limits and more. To | 103 | things like CPU locality, reentrancy, concurrency limits, priority and |
102 | get a detailed overview refer to the API description of | 104 | more. To get a detailed overview refer to the API description of |
103 | alloc_workqueue() below. | 105 | alloc_workqueue() below. |
104 | 106 | ||
105 | When a work item is queued to a workqueue, the target gcwq is | 107 | When a work item is queued to a workqueue, the target gcwq and |
106 | determined according to the queue parameters and workqueue attributes | 108 | thread-pool is determined according to the queue parameters and |
107 | and appended on the shared worklist of the gcwq. For example, unless | 109 | workqueue attributes and appended on the shared worklist of the |
108 | specifically overridden, a work item of a bound workqueue will be | 110 | thread-pool. For example, unless specifically overridden, a work item |
109 | queued on the worklist of exactly that gcwq that is associated to the | 111 | of a bound workqueue will be queued on the worklist of either normal |
110 | CPU the issuer is running on. | 112 | or highpri thread-pool of the gcwq that is associated to the CPU the |
113 | issuer is running on. | ||
111 | 114 | ||
112 | For any worker pool implementation, managing the concurrency level | 115 | For any worker pool implementation, managing the concurrency level |
113 | (how many execution contexts are active) is an important issue. cmwq | 116 | (how many execution contexts are active) is an important issue. cmwq |
@@ -115,26 +118,26 @@ tries to keep the concurrency at a minimal but sufficient level. | |||
115 | Minimal to save resources and sufficient in that the system is used at | 118 | Minimal to save resources and sufficient in that the system is used at |
116 | its full capacity. | 119 | its full capacity. |
117 | 120 | ||
118 | Each gcwq bound to an actual CPU implements concurrency management by | 121 | Each thread-pool bound to an actual CPU implements concurrency |
119 | hooking into the scheduler. The gcwq is notified whenever an active | 122 | management by hooking into the scheduler. The thread-pool is notified |
120 | worker wakes up or sleeps and keeps track of the number of the | 123 | whenever an active worker wakes up or sleeps and keeps track of the |
121 | currently runnable workers. Generally, work items are not expected to | 124 | number of the currently runnable workers. Generally, work items are |
122 | hog a CPU and consume many cycles. That means maintaining just enough | 125 | not expected to hog a CPU and consume many cycles. That means |
123 | concurrency to prevent work processing from stalling should be | 126 | maintaining just enough concurrency to prevent work processing from |
124 | optimal. As long as there are one or more runnable workers on the | 127 | stalling should be optimal. As long as there are one or more runnable |
125 | CPU, the gcwq doesn't start execution of a new work, but, when the | 128 | workers on the CPU, the thread-pool doesn't start execution of a new |
126 | last running worker goes to sleep, it immediately schedules a new | 129 | work, but, when the last running worker goes to sleep, it immediately |
127 | worker so that the CPU doesn't sit idle while there are pending work | 130 | schedules a new worker so that the CPU doesn't sit idle while there |
128 | items. This allows using a minimal number of workers without losing | 131 | are pending work items. This allows using a minimal number of workers |
129 | execution bandwidth. | 132 | without losing execution bandwidth. |
130 | 133 | ||
131 | Keeping idle workers around doesn't cost other than the memory space | 134 | Keeping idle workers around doesn't cost other than the memory space |
132 | for kthreads, so cmwq holds onto idle ones for a while before killing | 135 | for kthreads, so cmwq holds onto idle ones for a while before killing |
133 | them. | 136 | them. |
134 | 137 | ||
135 | For an unbound wq, the above concurrency management doesn't apply and | 138 | For an unbound wq, the above concurrency management doesn't apply and |
136 | the gcwq for the pseudo unbound CPU tries to start executing all work | 139 | the thread-pools for the pseudo unbound CPU try to start executing all |
137 | items as soon as possible. The responsibility of regulating | 140 | work items as soon as possible. The responsibility of regulating |
138 | concurrency level is on the users. There is also a flag to mark a | 141 | concurrency level is on the users. There is also a flag to mark a |
139 | bound wq to ignore the concurrency management. Please refer to the | 142 | bound wq to ignore the concurrency management. Please refer to the |
140 | API section for details. | 143 | API section for details. |
@@ -205,31 +208,22 @@ resources, scheduled and executed. | |||
205 | 208 | ||
206 | WQ_HIGHPRI | 209 | WQ_HIGHPRI |
207 | 210 | ||
208 | Work items of a highpri wq are queued at the head of the | 211 | Work items of a highpri wq are queued to the highpri |
209 | worklist of the target gcwq and start execution regardless of | 212 | thread-pool of the target gcwq. Highpri thread-pools are |
210 | the current concurrency level. In other words, highpri work | 213 | served by worker threads with elevated nice level. |
211 | items will always start execution as soon as execution | ||
212 | resource is available. | ||
213 | 214 | ||
214 | Ordering among highpri work items is preserved - a highpri | 215 | Note that normal and highpri thread-pools don't interact with |
215 | work item queued after another highpri work item will start | 216 | each other. Each maintain its separate pool of workers and |
216 | execution after the earlier highpri work item starts. | 217 | implements concurrency management among its workers. |
217 | |||
218 | Although highpri work items are not held back by other | ||
219 | runnable work items, they still contribute to the concurrency | ||
220 | level. Highpri work items in runnable state will prevent | ||
221 | non-highpri work items from starting execution. | ||
222 | |||
223 | This flag is meaningless for unbound wq. | ||
224 | 218 | ||
225 | WQ_CPU_INTENSIVE | 219 | WQ_CPU_INTENSIVE |
226 | 220 | ||
227 | Work items of a CPU intensive wq do not contribute to the | 221 | Work items of a CPU intensive wq do not contribute to the |
228 | concurrency level. In other words, runnable CPU intensive | 222 | concurrency level. In other words, runnable CPU intensive |
229 | work items will not prevent other work items from starting | 223 | work items will not prevent other work items in the same |
230 | execution. This is useful for bound work items which are | 224 | thread-pool from starting execution. This is useful for bound |
231 | expected to hog CPU cycles so that their execution is | 225 | work items which are expected to hog CPU cycles so that their |
232 | regulated by the system scheduler. | 226 | execution is regulated by the system scheduler. |
233 | 227 | ||
234 | Although CPU intensive work items don't contribute to the | 228 | Although CPU intensive work items don't contribute to the |
235 | concurrency level, start of their executions is still | 229 | concurrency level, start of their executions is still |
@@ -239,14 +233,6 @@ resources, scheduled and executed. | |||
239 | 233 | ||
240 | This flag is meaningless for unbound wq. | 234 | This flag is meaningless for unbound wq. |
241 | 235 | ||
242 | WQ_HIGHPRI | WQ_CPU_INTENSIVE | ||
243 | |||
244 | This combination makes the wq avoid interaction with | ||
245 | concurrency management completely and behave as a simple | ||
246 | per-CPU execution context provider. Work items queued on a | ||
247 | highpri CPU-intensive wq start execution as soon as resources | ||
248 | are available and don't affect execution of other work items. | ||
249 | |||
250 | @max_active: | 236 | @max_active: |
251 | 237 | ||
252 | @max_active determines the maximum number of execution contexts per | 238 | @max_active determines the maximum number of execution contexts per |
@@ -328,20 +314,7 @@ If @max_active == 2, | |||
328 | 35 w2 wakes up and finishes | 314 | 35 w2 wakes up and finishes |
329 | 315 | ||
330 | Now, let's assume w1 and w2 are queued to a different wq q1 which has | 316 | Now, let's assume w1 and w2 are queued to a different wq q1 which has |
331 | WQ_HIGHPRI set, | 317 | WQ_CPU_INTENSIVE set, |
332 | |||
333 | TIME IN MSECS EVENT | ||
334 | 0 w1 and w2 start and burn CPU | ||
335 | 5 w1 sleeps | ||
336 | 10 w2 sleeps | ||
337 | 10 w0 starts and burns CPU | ||
338 | 15 w0 sleeps | ||
339 | 15 w1 wakes up and finishes | ||
340 | 20 w2 wakes up and finishes | ||
341 | 25 w0 wakes up and burns CPU | ||
342 | 30 w0 finishes | ||
343 | |||
344 | If q1 has WQ_CPU_INTENSIVE set, | ||
345 | 318 | ||
346 | TIME IN MSECS EVENT | 319 | TIME IN MSECS EVENT |
347 | 0 w0 starts and burns CPU | 320 | 0 w0 starts and burns CPU |
diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt index 7c3a8801b7ce..9efceff51bfb 100644 --- a/Documentation/x86/boot.txt +++ b/Documentation/x86/boot.txt | |||
@@ -54,6 +54,9 @@ Protocol 2.10: (Kernel 2.6.31) Added a protocol for relaxed alignment | |||
54 | beyond the kernel_alignment added, new init_size and | 54 | beyond the kernel_alignment added, new init_size and |
55 | pref_address fields. Added extended boot loader IDs. | 55 | pref_address fields. Added extended boot loader IDs. |
56 | 56 | ||
57 | Protocol 2.11: (Kernel 3.6) Added a field for offset of EFI handover | ||
58 | protocol entry point. | ||
59 | |||
57 | **** MEMORY LAYOUT | 60 | **** MEMORY LAYOUT |
58 | 61 | ||
59 | The traditional memory map for the kernel loader, used for Image or | 62 | The traditional memory map for the kernel loader, used for Image or |
@@ -189,6 +192,7 @@ Offset Proto Name Meaning | |||
189 | of struct setup_data | 192 | of struct setup_data |
190 | 0258/8 2.10+ pref_address Preferred loading address | 193 | 0258/8 2.10+ pref_address Preferred loading address |
191 | 0260/4 2.10+ init_size Linear memory required during initialization | 194 | 0260/4 2.10+ init_size Linear memory required during initialization |
195 | 0264/4 2.11+ handover_offset Offset of handover entry point | ||
192 | 196 | ||
193 | (1) For backwards compatibility, if the setup_sects field contains 0, the | 197 | (1) For backwards compatibility, if the setup_sects field contains 0, the |
194 | real value is 4. | 198 | real value is 4. |
@@ -363,7 +367,8 @@ Protocol: 2.00+ | |||
363 | ext_loader_type <- 0x05 | 367 | ext_loader_type <- 0x05 |
364 | ext_loader_ver <- 0x23 | 368 | ext_loader_ver <- 0x23 |
365 | 369 | ||
366 | Assigned boot loader ids: | 370 | Assigned boot loader ids (hexadecimal): |
371 | |||
367 | 0 LILO (0x00 reserved for pre-2.00 bootloader) | 372 | 0 LILO (0x00 reserved for pre-2.00 bootloader) |
368 | 1 Loadlin | 373 | 1 Loadlin |
369 | 2 bootsect-loader (0x20, all other values reserved) | 374 | 2 bootsect-loader (0x20, all other values reserved) |
@@ -378,6 +383,8 @@ Protocol: 2.00+ | |||
378 | C Arcturus Networks uCbootloader | 383 | C Arcturus Networks uCbootloader |
379 | E Extended (see ext_loader_type) | 384 | E Extended (see ext_loader_type) |
380 | F Special (0xFF = undefined) | 385 | F Special (0xFF = undefined) |
386 | 10 Reserved | ||
387 | 11 Minimal Linux Bootloader <http://sebastian-plotz.blogspot.de> | ||
381 | 388 | ||
382 | Please contact <hpa@zytor.com> if you need a bootloader ID | 389 | Please contact <hpa@zytor.com> if you need a bootloader ID |
383 | value assigned. | 390 | value assigned. |
@@ -690,6 +697,16 @@ Offset/size: 0x260/4 | |||
690 | else | 697 | else |
691 | runtime_start = pref_address | 698 | runtime_start = pref_address |
692 | 699 | ||
700 | Field name: handover_offset | ||
701 | Type: read | ||
702 | Offset/size: 0x264/4 | ||
703 | |||
704 | This field is the offset from the beginning of the kernel image to | ||
705 | the EFI handover protocol entry point. Boot loaders using the EFI | ||
706 | handover protocol to boot the kernel should jump to this offset. | ||
707 | |||
708 | See EFI HANDOVER PROTOCOL below for more details. | ||
709 | |||
693 | 710 | ||
694 | **** THE IMAGE CHECKSUM | 711 | **** THE IMAGE CHECKSUM |
695 | 712 | ||
@@ -1010,3 +1027,30 @@ segment; __BOOS_CS must have execute/read permission, and __BOOT_DS | |||
1010 | must have read/write permission; CS must be __BOOT_CS and DS, ES, SS | 1027 | must have read/write permission; CS must be __BOOT_CS and DS, ES, SS |
1011 | must be __BOOT_DS; interrupt must be disabled; %esi must hold the base | 1028 | must be __BOOT_DS; interrupt must be disabled; %esi must hold the base |
1012 | address of the struct boot_params; %ebp, %edi and %ebx must be zero. | 1029 | address of the struct boot_params; %ebp, %edi and %ebx must be zero. |
1030 | |||
1031 | **** EFI HANDOVER PROTOCOL | ||
1032 | |||
1033 | This protocol allows boot loaders to defer initialisation to the EFI | ||
1034 | boot stub. The boot loader is required to load the kernel/initrd(s) | ||
1035 | from the boot media and jump to the EFI handover protocol entry point | ||
1036 | which is hdr->handover_offset bytes from the beginning of | ||
1037 | startup_{32,64}. | ||
1038 | |||
1039 | The function prototype for the handover entry point looks like this, | ||
1040 | |||
1041 | efi_main(void *handle, efi_system_table_t *table, struct boot_params *bp) | ||
1042 | |||
1043 | 'handle' is the EFI image handle passed to the boot loader by the EFI | ||
1044 | firmware, 'table' is the EFI system table - these are the first two | ||
1045 | arguments of the "handoff state" as described in section 2.3 of the | ||
1046 | UEFI specification. 'bp' is the boot loader-allocated boot params. | ||
1047 | |||
1048 | The boot loader *must* fill out the following fields in bp, | ||
1049 | |||
1050 | o hdr.code32_start | ||
1051 | o hdr.cmd_line_ptr | ||
1052 | o hdr.cmdline_size | ||
1053 | o hdr.ramdisk_image (if applicable) | ||
1054 | o hdr.ramdisk_size (if applicable) | ||
1055 | |||
1056 | All other fields should be zero. | ||