diff options
Diffstat (limited to 'Documentation')
139 files changed, 4491 insertions, 1921 deletions
diff --git a/Documentation/ABI/stable/sysfs-driver-qla2xxx b/Documentation/ABI/stable/sysfs-driver-qla2xxx new file mode 100644 index 000000000000..9a59d84497ed --- /dev/null +++ b/Documentation/ABI/stable/sysfs-driver-qla2xxx | |||
@@ -0,0 +1,8 @@ | |||
1 | What: /sys/bus/pci/drivers/qla2xxx/.../devices/* | ||
2 | Date: September 2009 | ||
3 | Contact: QLogic Linux Driver <linux-driver@qlogic.com> | ||
4 | Description: qla2xxx-udev.sh currently looks for uevent CHANGE events to | ||
5 | signal a firmware-dump has been generated by the driver and is | ||
6 | ready for retrieval. | ||
7 | Users: qla2xxx-udev.sh. Proposed changes should be mailed to | ||
8 | linux-driver@qlogic.com | ||
diff --git a/Documentation/ABI/testing/procfs-diskstats b/Documentation/ABI/testing/procfs-diskstats index 99233902e09e..f91a973a37fe 100644 --- a/Documentation/ABI/testing/procfs-diskstats +++ b/Documentation/ABI/testing/procfs-diskstats | |||
@@ -8,7 +8,7 @@ Description: | |||
8 | 1 - major number | 8 | 1 - major number |
9 | 2 - minor mumber | 9 | 2 - minor mumber |
10 | 3 - device name | 10 | 3 - device name |
11 | 4 - reads completed succesfully | 11 | 4 - reads completed successfully |
12 | 5 - reads merged | 12 | 5 - reads merged |
13 | 6 - sectors read | 13 | 6 - sectors read |
14 | 7 - time spent reading (ms) | 14 | 7 - time spent reading (ms) |
diff --git a/Documentation/ABI/testing/sysfs-block b/Documentation/ABI/testing/sysfs-block index 5f3bedaf8e35..d2f90334bb93 100644 --- a/Documentation/ABI/testing/sysfs-block +++ b/Documentation/ABI/testing/sysfs-block | |||
@@ -4,7 +4,7 @@ Contact: Jerome Marchand <jmarchan@redhat.com> | |||
4 | Description: | 4 | Description: |
5 | The /sys/block/<disk>/stat files displays the I/O | 5 | The /sys/block/<disk>/stat files displays the I/O |
6 | statistics of disk <disk>. They contain 11 fields: | 6 | statistics of disk <disk>. They contain 11 fields: |
7 | 1 - reads completed succesfully | 7 | 1 - reads completed successfully |
8 | 2 - reads merged | 8 | 2 - reads merged |
9 | 3 - sectors read | 9 | 3 - sectors read |
10 | 4 - time spent reading (ms) | 10 | 4 - time spent reading (ms) |
diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb index 7772928ee48f..a07c0f366f91 100644 --- a/Documentation/ABI/testing/sysfs-bus-usb +++ b/Documentation/ABI/testing/sysfs-bus-usb | |||
@@ -21,25 +21,27 @@ Contact: Alan Stern <stern@rowland.harvard.edu> | |||
21 | Description: | 21 | Description: |
22 | Each USB device directory will contain a file named | 22 | Each USB device directory will contain a file named |
23 | power/level. This file holds a power-level setting for | 23 | power/level. This file holds a power-level setting for |
24 | the device, one of "on", "auto", or "suspend". | 24 | the device, either "on" or "auto". |
25 | 25 | ||
26 | "on" means that the device is not allowed to autosuspend, | 26 | "on" means that the device is not allowed to autosuspend, |
27 | although normal suspends for system sleep will still | 27 | although normal suspends for system sleep will still |
28 | be honored. "auto" means the device will autosuspend | 28 | be honored. "auto" means the device will autosuspend |
29 | and autoresume in the usual manner, according to the | 29 | and autoresume in the usual manner, according to the |
30 | capabilities of its driver. "suspend" means the device | 30 | capabilities of its driver. |
31 | is forced into a suspended state and it will not autoresume | ||
32 | in response to I/O requests. However remote-wakeup requests | ||
33 | from the device may still be enabled (the remote-wakeup | ||
34 | setting is controlled separately by the power/wakeup | ||
35 | attribute). | ||
36 | 31 | ||
37 | During normal use, devices should be left in the "auto" | 32 | During normal use, devices should be left in the "auto" |
38 | level. The other levels are meant for administrative uses. | 33 | level. The "on" level is meant for administrative uses. |
39 | If you want to suspend a device immediately but leave it | 34 | If you want to suspend a device immediately but leave it |
40 | free to wake up in response to I/O requests, you should | 35 | free to wake up in response to I/O requests, you should |
41 | write "0" to power/autosuspend. | 36 | write "0" to power/autosuspend. |
42 | 37 | ||
38 | Device not capable of proper suspend and resume should be | ||
39 | left in the "on" level. Although the USB spec requires | ||
40 | devices to support suspend/resume, many of them do not. | ||
41 | In fact so many don't that by default, the USB core | ||
42 | initializes all non-hub devices in the "on" level. Some | ||
43 | drivers may change this setting when they are bound. | ||
44 | |||
43 | What: /sys/bus/usb/devices/.../power/persist | 45 | What: /sys/bus/usb/devices/.../power/persist |
44 | Date: May 2007 | 46 | Date: May 2007 |
45 | KernelVersion: 2.6.23 | 47 | KernelVersion: 2.6.23 |
@@ -144,3 +146,16 @@ Description: | |||
144 | 146 | ||
145 | Write a 1 to force the device to disconnect | 147 | Write a 1 to force the device to disconnect |
146 | (equivalent to unplugging a wired USB device). | 148 | (equivalent to unplugging a wired USB device). |
149 | |||
150 | What: /sys/bus/usb/drivers/.../remove_id | ||
151 | Date: November 2009 | ||
152 | Contact: CHENG Renquan <rqcheng@smu.edu.sg> | ||
153 | Description: | ||
154 | Writing a device ID to this file will remove an ID | ||
155 | that was dynamically added via the new_id sysfs entry. | ||
156 | The format for the device ID is: | ||
157 | idVendor idProduct. After successfully | ||
158 | removing an ID, the driver will no longer support the | ||
159 | device. This is useful to ensure auto probing won't | ||
160 | match the driver to the device. For example: | ||
161 | # echo "046d c315" > /sys/bus/usb/drivers/foo/remove_id | ||
diff --git a/Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc b/Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc index 4e8106f7cfd9..25b1e751b777 100644 --- a/Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc +++ b/Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc | |||
@@ -23,3 +23,16 @@ Description: | |||
23 | Since this relates to security (specifically, the | 23 | Since this relates to security (specifically, the |
24 | lifetime of PTKs and GTKs) it should not be changed | 24 | lifetime of PTKs and GTKs) it should not be changed |
25 | from the default. | 25 | from the default. |
26 | |||
27 | What: /sys/class/uwb_rc/uwbN/wusbhc/wusb_phy_rate | ||
28 | Date: August 2009 | ||
29 | KernelVersion: 2.6.32 | ||
30 | Contact: David Vrabel <david.vrabel@csr.com> | ||
31 | Description: | ||
32 | The maximum PHY rate to use for all connected devices. | ||
33 | This is only of limited use for testing and | ||
34 | development as the hardware's automatic rate | ||
35 | adaptation is better then this simple control. | ||
36 | |||
37 | Refer to [ECMA-368] section 10.3.1.1 for the value to | ||
38 | use. | ||
diff --git a/Documentation/ABI/testing/sysfs-devices-memory b/Documentation/ABI/testing/sysfs-devices-memory index 9fe91c02ee40..bf1627b02a03 100644 --- a/Documentation/ABI/testing/sysfs-devices-memory +++ b/Documentation/ABI/testing/sysfs-devices-memory | |||
@@ -60,6 +60,19 @@ Description: | |||
60 | Users: hotplug memory remove tools | 60 | Users: hotplug memory remove tools |
61 | https://w3.opensource.ibm.com/projects/powerpc-utils/ | 61 | https://w3.opensource.ibm.com/projects/powerpc-utils/ |
62 | 62 | ||
63 | |||
64 | What: /sys/devices/system/memoryX/nodeY | ||
65 | Date: October 2009 | ||
66 | Contact: Linux Memory Management list <linux-mm@kvack.org> | ||
67 | Description: | ||
68 | When CONFIG_NUMA is enabled, a symbolic link that | ||
69 | points to the corresponding NUMA node directory. | ||
70 | |||
71 | For example, the following symbolic link is created for | ||
72 | memory section 9 on node0: | ||
73 | /sys/devices/system/memory/memory9/node0 -> ../../node/node0 | ||
74 | |||
75 | |||
63 | What: /sys/devices/system/node/nodeX/memoryY | 76 | What: /sys/devices/system/node/nodeX/memoryY |
64 | Date: September 2008 | 77 | Date: September 2008 |
65 | Contact: Gary Hade <garyhade@us.ibm.com> | 78 | Contact: Gary Hade <garyhade@us.ibm.com> |
@@ -70,4 +83,3 @@ Description: | |||
70 | memory section directory. For example, the following symbolic | 83 | memory section directory. For example, the following symbolic |
71 | link is created for memory section 9 on node0. | 84 | link is created for memory section 9 on node0. |
72 | /sys/devices/system/node/node0/memory9 -> ../../memory/memory9 | 85 | /sys/devices/system/node/node0/memory9 -> ../../memory/memory9 |
73 | |||
diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu index a703b9e9aeb9..84a710f87c64 100644 --- a/Documentation/ABI/testing/sysfs-devices-system-cpu +++ b/Documentation/ABI/testing/sysfs-devices-system-cpu | |||
@@ -62,6 +62,35 @@ Description: CPU topology files that describe kernel limits related to | |||
62 | See Documentation/cputopology.txt for more information. | 62 | See Documentation/cputopology.txt for more information. |
63 | 63 | ||
64 | 64 | ||
65 | What: /sys/devices/system/cpu/probe | ||
66 | /sys/devices/system/cpu/release | ||
67 | Date: November 2009 | ||
68 | Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org> | ||
69 | Description: Dynamic addition and removal of CPU's. This is not hotplug | ||
70 | removal, this is meant complete removal/addition of the CPU | ||
71 | from the system. | ||
72 | |||
73 | probe: writes to this file will dynamically add a CPU to the | ||
74 | system. Information written to the file to add CPU's is | ||
75 | architecture specific. | ||
76 | |||
77 | release: writes to this file dynamically remove a CPU from | ||
78 | the system. Information writtento the file to remove CPU's | ||
79 | is architecture specific. | ||
80 | |||
81 | What: /sys/devices/system/cpu/cpu#/node | ||
82 | Date: October 2009 | ||
83 | Contact: Linux memory management mailing list <linux-mm@kvack.org> | ||
84 | Description: Discover NUMA node a CPU belongs to | ||
85 | |||
86 | When CONFIG_NUMA is enabled, a symbolic link that points | ||
87 | to the corresponding NUMA node directory. | ||
88 | |||
89 | For example, the following symlink is created for cpu42 | ||
90 | in NUMA node 2: | ||
91 | |||
92 | /sys/devices/system/cpu/cpu42/node2 -> ../../node/node2 | ||
93 | |||
65 | 94 | ||
66 | What: /sys/devices/system/cpu/cpu#/node | 95 | What: /sys/devices/system/cpu/cpu#/node |
67 | Date: October 2009 | 96 | Date: October 2009 |
@@ -136,6 +165,24 @@ Description: Discover cpuidle policy and mechanism | |||
136 | See files in Documentation/cpuidle/ for more information. | 165 | See files in Documentation/cpuidle/ for more information. |
137 | 166 | ||
138 | 167 | ||
168 | What: /sys/devices/system/cpu/cpu#/cpufreq/* | ||
169 | Date: pre-git history | ||
170 | Contact: cpufreq@vger.kernel.org | ||
171 | Description: Discover and change clock speed of CPUs | ||
172 | |||
173 | Clock scaling allows you to change the clock speed of the | ||
174 | CPUs on the fly. This is a nice method to save battery | ||
175 | power, because the lower the clock speed, the less power | ||
176 | the CPU consumes. | ||
177 | |||
178 | There are many knobs to tweak in this directory. | ||
179 | |||
180 | See files in Documentation/cpu-freq/ for more information. | ||
181 | |||
182 | In particular, read Documentation/cpu-freq/user-guide.txt | ||
183 | to learn how to control the knobs. | ||
184 | |||
185 | |||
139 | What: /sys/devices/system/cpu/cpu*/cache/index*/cache_disable_X | 186 | What: /sys/devices/system/cpu/cpu*/cache/index*/cache_disable_X |
140 | Date: August 2008 | 187 | Date: August 2008 |
141 | KernelVersion: 2.6.27 | 188 | KernelVersion: 2.6.27 |
diff --git a/Documentation/ABI/testing/sysfs-kernel-slab b/Documentation/ABI/testing/sysfs-kernel-slab index 6dcf75e594fb..8b093f8222d3 100644 --- a/Documentation/ABI/testing/sysfs-kernel-slab +++ b/Documentation/ABI/testing/sysfs-kernel-slab | |||
@@ -45,8 +45,9 @@ KernelVersion: 2.6.25 | |||
45 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, | 45 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, |
46 | Christoph Lameter <cl@linux-foundation.org> | 46 | Christoph Lameter <cl@linux-foundation.org> |
47 | Description: | 47 | Description: |
48 | The alloc_fastpath file is read-only and specifies how many | 48 | The alloc_fastpath file shows how many objects have been |
49 | objects have been allocated using the fast path. | 49 | allocated using the fast path. It can be written to clear the |
50 | current count. | ||
50 | Available when CONFIG_SLUB_STATS is enabled. | 51 | Available when CONFIG_SLUB_STATS is enabled. |
51 | 52 | ||
52 | What: /sys/kernel/slab/cache/alloc_from_partial | 53 | What: /sys/kernel/slab/cache/alloc_from_partial |
@@ -55,9 +56,10 @@ KernelVersion: 2.6.25 | |||
55 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, | 56 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, |
56 | Christoph Lameter <cl@linux-foundation.org> | 57 | Christoph Lameter <cl@linux-foundation.org> |
57 | Description: | 58 | Description: |
58 | The alloc_from_partial file is read-only and specifies how | 59 | The alloc_from_partial file shows how many times a cpu slab has |
59 | many times a cpu slab has been full and it has been refilled | 60 | been full and it has been refilled by using a slab from the list |
60 | by using a slab from the list of partially used slabs. | 61 | of partially used slabs. It can be written to clear the current |
62 | count. | ||
61 | Available when CONFIG_SLUB_STATS is enabled. | 63 | Available when CONFIG_SLUB_STATS is enabled. |
62 | 64 | ||
63 | What: /sys/kernel/slab/cache/alloc_refill | 65 | What: /sys/kernel/slab/cache/alloc_refill |
@@ -66,9 +68,9 @@ KernelVersion: 2.6.25 | |||
66 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, | 68 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, |
67 | Christoph Lameter <cl@linux-foundation.org> | 69 | Christoph Lameter <cl@linux-foundation.org> |
68 | Description: | 70 | Description: |
69 | The alloc_refill file is read-only and specifies how many | 71 | The alloc_refill file shows how many times the per-cpu freelist |
70 | times the per-cpu freelist was empty but there were objects | 72 | was empty but there were objects available as the result of |
71 | available as the result of remote cpu frees. | 73 | remote cpu frees. It can be written to clear the current count. |
72 | Available when CONFIG_SLUB_STATS is enabled. | 74 | Available when CONFIG_SLUB_STATS is enabled. |
73 | 75 | ||
74 | What: /sys/kernel/slab/cache/alloc_slab | 76 | What: /sys/kernel/slab/cache/alloc_slab |
@@ -77,8 +79,9 @@ KernelVersion: 2.6.25 | |||
77 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, | 79 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, |
78 | Christoph Lameter <cl@linux-foundation.org> | 80 | Christoph Lameter <cl@linux-foundation.org> |
79 | Description: | 81 | Description: |
80 | The alloc_slab file is read-only and specifies how many times | 82 | The alloc_slab file is shows how many times a new slab had to |
81 | a new slab had to be allocated from the page allocator. | 83 | be allocated from the page allocator. It can be written to |
84 | clear the current count. | ||
82 | Available when CONFIG_SLUB_STATS is enabled. | 85 | Available when CONFIG_SLUB_STATS is enabled. |
83 | 86 | ||
84 | What: /sys/kernel/slab/cache/alloc_slowpath | 87 | What: /sys/kernel/slab/cache/alloc_slowpath |
@@ -87,9 +90,10 @@ KernelVersion: 2.6.25 | |||
87 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, | 90 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, |
88 | Christoph Lameter <cl@linux-foundation.org> | 91 | Christoph Lameter <cl@linux-foundation.org> |
89 | Description: | 92 | Description: |
90 | The alloc_slowpath file is read-only and specifies how many | 93 | The alloc_slowpath file shows how many objects have been |
91 | objects have been allocated using the slow path because of a | 94 | allocated using the slow path because of a refill or |
92 | refill or allocation from a partial or new slab. | 95 | allocation from a partial or new slab. It can be written to |
96 | clear the current count. | ||
93 | Available when CONFIG_SLUB_STATS is enabled. | 97 | Available when CONFIG_SLUB_STATS is enabled. |
94 | 98 | ||
95 | What: /sys/kernel/slab/cache/cache_dma | 99 | What: /sys/kernel/slab/cache/cache_dma |
@@ -117,10 +121,11 @@ KernelVersion: 2.6.31 | |||
117 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, | 121 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, |
118 | Christoph Lameter <cl@linux-foundation.org> | 122 | Christoph Lameter <cl@linux-foundation.org> |
119 | Description: | 123 | Description: |
120 | The file cpuslab_flush is read-only and specifies how many | 124 | The file cpuslab_flush shows how many times a cache's cpu slabs |
121 | times a cache's cpu slabs have been flushed as the result of | 125 | have been flushed as the result of destroying or shrinking a |
122 | destroying or shrinking a cache, a cpu going offline, or as | 126 | cache, a cpu going offline, or as the result of forcing an |
123 | the result of forcing an allocation from a certain node. | 127 | allocation from a certain node. It can be written to clear the |
128 | current count. | ||
124 | Available when CONFIG_SLUB_STATS is enabled. | 129 | Available when CONFIG_SLUB_STATS is enabled. |
125 | 130 | ||
126 | What: /sys/kernel/slab/cache/ctor | 131 | What: /sys/kernel/slab/cache/ctor |
@@ -139,8 +144,8 @@ KernelVersion: 2.6.25 | |||
139 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, | 144 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, |
140 | Christoph Lameter <cl@linux-foundation.org> | 145 | Christoph Lameter <cl@linux-foundation.org> |
141 | Description: | 146 | Description: |
142 | The file deactivate_empty is read-only and specifies how many | 147 | The deactivate_empty file shows how many times an empty cpu slab |
143 | times an empty cpu slab was deactivated. | 148 | was deactivated. It can be written to clear the current count. |
144 | Available when CONFIG_SLUB_STATS is enabled. | 149 | Available when CONFIG_SLUB_STATS is enabled. |
145 | 150 | ||
146 | What: /sys/kernel/slab/cache/deactivate_full | 151 | What: /sys/kernel/slab/cache/deactivate_full |
@@ -149,8 +154,8 @@ KernelVersion: 2.6.25 | |||
149 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, | 154 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, |
150 | Christoph Lameter <cl@linux-foundation.org> | 155 | Christoph Lameter <cl@linux-foundation.org> |
151 | Description: | 156 | Description: |
152 | The file deactivate_full is read-only and specifies how many | 157 | The deactivate_full file shows how many times a full cpu slab |
153 | times a full cpu slab was deactivated. | 158 | was deactivated. It can be written to clear the current count. |
154 | Available when CONFIG_SLUB_STATS is enabled. | 159 | Available when CONFIG_SLUB_STATS is enabled. |
155 | 160 | ||
156 | What: /sys/kernel/slab/cache/deactivate_remote_frees | 161 | What: /sys/kernel/slab/cache/deactivate_remote_frees |
@@ -159,9 +164,9 @@ KernelVersion: 2.6.25 | |||
159 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, | 164 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, |
160 | Christoph Lameter <cl@linux-foundation.org> | 165 | Christoph Lameter <cl@linux-foundation.org> |
161 | Description: | 166 | Description: |
162 | The file deactivate_remote_frees is read-only and specifies how | 167 | The deactivate_remote_frees file shows how many times a cpu slab |
163 | many times a cpu slab has been deactivated and contained free | 168 | has been deactivated and contained free objects that were freed |
164 | objects that were freed remotely. | 169 | remotely. It can be written to clear the current count. |
165 | Available when CONFIG_SLUB_STATS is enabled. | 170 | Available when CONFIG_SLUB_STATS is enabled. |
166 | 171 | ||
167 | What: /sys/kernel/slab/cache/deactivate_to_head | 172 | What: /sys/kernel/slab/cache/deactivate_to_head |
@@ -170,9 +175,9 @@ KernelVersion: 2.6.25 | |||
170 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, | 175 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, |
171 | Christoph Lameter <cl@linux-foundation.org> | 176 | Christoph Lameter <cl@linux-foundation.org> |
172 | Description: | 177 | Description: |
173 | The file deactivate_to_head is read-only and specifies how | 178 | The deactivate_to_head file shows how many times a partial cpu |
174 | many times a partial cpu slab was deactivated and added to the | 179 | slab was deactivated and added to the head of its node's partial |
175 | head of its node's partial list. | 180 | list. It can be written to clear the current count. |
176 | Available when CONFIG_SLUB_STATS is enabled. | 181 | Available when CONFIG_SLUB_STATS is enabled. |
177 | 182 | ||
178 | What: /sys/kernel/slab/cache/deactivate_to_tail | 183 | What: /sys/kernel/slab/cache/deactivate_to_tail |
@@ -181,9 +186,9 @@ KernelVersion: 2.6.25 | |||
181 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, | 186 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, |
182 | Christoph Lameter <cl@linux-foundation.org> | 187 | Christoph Lameter <cl@linux-foundation.org> |
183 | Description: | 188 | Description: |
184 | The file deactivate_to_tail is read-only and specifies how | 189 | The deactivate_to_tail file shows how many times a partial cpu |
185 | many times a partial cpu slab was deactivated and added to the | 190 | slab was deactivated and added to the tail of its node's partial |
186 | tail of its node's partial list. | 191 | list. It can be written to clear the current count. |
187 | Available when CONFIG_SLUB_STATS is enabled. | 192 | Available when CONFIG_SLUB_STATS is enabled. |
188 | 193 | ||
189 | What: /sys/kernel/slab/cache/destroy_by_rcu | 194 | What: /sys/kernel/slab/cache/destroy_by_rcu |
@@ -201,9 +206,9 @@ KernelVersion: 2.6.25 | |||
201 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, | 206 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, |
202 | Christoph Lameter <cl@linux-foundation.org> | 207 | Christoph Lameter <cl@linux-foundation.org> |
203 | Description: | 208 | Description: |
204 | The file free_add_partial is read-only and specifies how many | 209 | The free_add_partial file shows how many times an object has |
205 | times an object has been freed in a full slab so that it had to | 210 | been freed in a full slab so that it had to added to its node's |
206 | added to its node's partial list. | 211 | partial list. It can be written to clear the current count. |
207 | Available when CONFIG_SLUB_STATS is enabled. | 212 | Available when CONFIG_SLUB_STATS is enabled. |
208 | 213 | ||
209 | What: /sys/kernel/slab/cache/free_calls | 214 | What: /sys/kernel/slab/cache/free_calls |
@@ -222,9 +227,9 @@ KernelVersion: 2.6.25 | |||
222 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, | 227 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, |
223 | Christoph Lameter <cl@linux-foundation.org> | 228 | Christoph Lameter <cl@linux-foundation.org> |
224 | Description: | 229 | Description: |
225 | The free_fastpath file is read-only and specifies how many | 230 | The free_fastpath file shows how many objects have been freed |
226 | objects have been freed using the fast path because it was an | 231 | using the fast path because it was an object from the cpu slab. |
227 | object from the cpu slab. | 232 | It can be written to clear the current count. |
228 | Available when CONFIG_SLUB_STATS is enabled. | 233 | Available when CONFIG_SLUB_STATS is enabled. |
229 | 234 | ||
230 | What: /sys/kernel/slab/cache/free_frozen | 235 | What: /sys/kernel/slab/cache/free_frozen |
@@ -233,9 +238,9 @@ KernelVersion: 2.6.25 | |||
233 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, | 238 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, |
234 | Christoph Lameter <cl@linux-foundation.org> | 239 | Christoph Lameter <cl@linux-foundation.org> |
235 | Description: | 240 | Description: |
236 | The free_frozen file is read-only and specifies how many | 241 | The free_frozen file shows how many objects have been freed to |
237 | objects have been freed to a frozen slab (i.e. a remote cpu | 242 | a frozen slab (i.e. a remote cpu slab). It can be written to |
238 | slab). | 243 | clear the current count. |
239 | Available when CONFIG_SLUB_STATS is enabled. | 244 | Available when CONFIG_SLUB_STATS is enabled. |
240 | 245 | ||
241 | What: /sys/kernel/slab/cache/free_remove_partial | 246 | What: /sys/kernel/slab/cache/free_remove_partial |
@@ -244,9 +249,10 @@ KernelVersion: 2.6.25 | |||
244 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, | 249 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, |
245 | Christoph Lameter <cl@linux-foundation.org> | 250 | Christoph Lameter <cl@linux-foundation.org> |
246 | Description: | 251 | Description: |
247 | The file free_remove_partial is read-only and specifies how | 252 | The free_remove_partial file shows how many times an object has |
248 | many times an object has been freed to a now-empty slab so | 253 | been freed to a now-empty slab so that it had to be removed from |
249 | that it had to be removed from its node's partial list. | 254 | its node's partial list. It can be written to clear the current |
255 | count. | ||
250 | Available when CONFIG_SLUB_STATS is enabled. | 256 | Available when CONFIG_SLUB_STATS is enabled. |
251 | 257 | ||
252 | What: /sys/kernel/slab/cache/free_slab | 258 | What: /sys/kernel/slab/cache/free_slab |
@@ -255,8 +261,9 @@ KernelVersion: 2.6.25 | |||
255 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, | 261 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, |
256 | Christoph Lameter <cl@linux-foundation.org> | 262 | Christoph Lameter <cl@linux-foundation.org> |
257 | Description: | 263 | Description: |
258 | The free_slab file is read-only and specifies how many times an | 264 | The free_slab file shows how many times an empty slab has been |
259 | empty slab has been freed back to the page allocator. | 265 | freed back to the page allocator. It can be written to clear |
266 | the current count. | ||
260 | Available when CONFIG_SLUB_STATS is enabled. | 267 | Available when CONFIG_SLUB_STATS is enabled. |
261 | 268 | ||
262 | What: /sys/kernel/slab/cache/free_slowpath | 269 | What: /sys/kernel/slab/cache/free_slowpath |
@@ -265,9 +272,9 @@ KernelVersion: 2.6.25 | |||
265 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, | 272 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, |
266 | Christoph Lameter <cl@linux-foundation.org> | 273 | Christoph Lameter <cl@linux-foundation.org> |
267 | Description: | 274 | Description: |
268 | The free_slowpath file is read-only and specifies how many | 275 | The free_slowpath file shows how many objects have been freed |
269 | objects have been freed using the slow path (i.e. to a full or | 276 | using the slow path (i.e. to a full or partial slab). It can |
270 | partial slab). | 277 | be written to clear the current count. |
271 | Available when CONFIG_SLUB_STATS is enabled. | 278 | Available when CONFIG_SLUB_STATS is enabled. |
272 | 279 | ||
273 | What: /sys/kernel/slab/cache/hwcache_align | 280 | What: /sys/kernel/slab/cache/hwcache_align |
@@ -346,10 +353,10 @@ KernelVersion: 2.6.26 | |||
346 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, | 353 | Contact: Pekka Enberg <penberg@cs.helsinki.fi>, |
347 | Christoph Lameter <cl@linux-foundation.org> | 354 | Christoph Lameter <cl@linux-foundation.org> |
348 | Description: | 355 | Description: |
349 | The file order_fallback is read-only and specifies how many | 356 | The order_fallback file shows how many times an allocation of a |
350 | times an allocation of a new slab has not been possible at the | 357 | new slab has not been possible at the cache's order and instead |
351 | cache's order and instead fallen back to its minimum possible | 358 | fallen back to its minimum possible order. It can be written to |
352 | order. | 359 | clear the current count. |
353 | Available when CONFIG_SLUB_STATS is enabled. | 360 | Available when CONFIG_SLUB_STATS is enabled. |
354 | 361 | ||
355 | What: /sys/kernel/slab/cache/partial | 362 | What: /sys/kernel/slab/cache/partial |
diff --git a/Documentation/ABI/testing/sysfs-memory-page-offline b/Documentation/ABI/testing/sysfs-memory-page-offline new file mode 100644 index 000000000000..e14703f12fdf --- /dev/null +++ b/Documentation/ABI/testing/sysfs-memory-page-offline | |||
@@ -0,0 +1,44 @@ | |||
1 | What: /sys/devices/system/memory/soft_offline_page | ||
2 | Date: Sep 2009 | ||
3 | KernelVersion: 2.6.33 | ||
4 | Contact: andi@firstfloor.org | ||
5 | Description: | ||
6 | Soft-offline the memory page containing the physical address | ||
7 | written into this file. Input is a hex number specifying the | ||
8 | physical address of the page. The kernel will then attempt | ||
9 | to soft-offline it, by moving the contents elsewhere or | ||
10 | dropping it if possible. The kernel will then be placed | ||
11 | on the bad page list and never be reused. | ||
12 | |||
13 | The offlining is done in kernel specific granuality. | ||
14 | Normally it's the base page size of the kernel, but | ||
15 | this might change. | ||
16 | |||
17 | The page must be still accessible, not poisoned. The | ||
18 | kernel will never kill anything for this, but rather | ||
19 | fail the offline. Return value is the size of the | ||
20 | number, or a error when the offlining failed. Reading | ||
21 | the file is not allowed. | ||
22 | |||
23 | What: /sys/devices/system/memory/hard_offline_page | ||
24 | Date: Sep 2009 | ||
25 | KernelVersion: 2.6.33 | ||
26 | Contact: andi@firstfloor.org | ||
27 | Description: | ||
28 | Hard-offline the memory page containing the physical | ||
29 | address written into this file. Input is a hex number | ||
30 | specifying the physical address of the page. The | ||
31 | kernel will then attempt to hard-offline the page, by | ||
32 | trying to drop the page or killing any owner or | ||
33 | triggering IO errors if needed. Note this may kill | ||
34 | any processes owning the page. The kernel will avoid | ||
35 | to access this page assuming it's poisoned by the | ||
36 | hardware. | ||
37 | |||
38 | The offlining is done in kernel specific granuality. | ||
39 | Normally it's the base page size of the kernel, but | ||
40 | this might change. | ||
41 | |||
42 | Return value is the size of the number, or a error when | ||
43 | the offlining failed. | ||
44 | Reading the file is not allowed. | ||
diff --git a/Documentation/Changes b/Documentation/Changes index 6d0f1efc5bf6..f08b313cd235 100644 --- a/Documentation/Changes +++ b/Documentation/Changes | |||
@@ -49,6 +49,8 @@ o oprofile 0.9 # oprofiled --version | |||
49 | o udev 081 # udevinfo -V | 49 | o udev 081 # udevinfo -V |
50 | o grub 0.93 # grub --version | 50 | o grub 0.93 # grub --version |
51 | o mcelog 0.6 | 51 | o mcelog 0.6 |
52 | o iptables 1.4.1 # iptables -V | ||
53 | |||
52 | 54 | ||
53 | Kernel compilation | 55 | Kernel compilation |
54 | ================== | 56 | ================== |
diff --git a/Documentation/DMA-mapping.txt b/Documentation/DMA-mapping.txt index 01f24e94bdb6..ecad88d9fe59 100644 --- a/Documentation/DMA-mapping.txt +++ b/Documentation/DMA-mapping.txt | |||
@@ -214,7 +214,7 @@ most specific mask. | |||
214 | Here is pseudo-code showing how this might be done: | 214 | Here is pseudo-code showing how this might be done: |
215 | 215 | ||
216 | #define PLAYBACK_ADDRESS_BITS DMA_BIT_MASK(32) | 216 | #define PLAYBACK_ADDRESS_BITS DMA_BIT_MASK(32) |
217 | #define RECORD_ADDRESS_BITS 0x00ffffff | 217 | #define RECORD_ADDRESS_BITS DMA_BIT_MASK(24) |
218 | 218 | ||
219 | struct my_sound_card *card; | 219 | struct my_sound_card *card; |
220 | struct pci_dev *pdev; | 220 | struct pci_dev *pdev; |
@@ -224,14 +224,14 @@ Here is pseudo-code showing how this might be done: | |||
224 | card->playback_enabled = 1; | 224 | card->playback_enabled = 1; |
225 | } else { | 225 | } else { |
226 | card->playback_enabled = 0; | 226 | card->playback_enabled = 0; |
227 | printk(KERN_WARN "%s: Playback disabled due to DMA limitations.\n", | 227 | printk(KERN_WARNING "%s: Playback disabled due to DMA limitations.\n", |
228 | card->name); | 228 | card->name); |
229 | } | 229 | } |
230 | if (!pci_set_dma_mask(pdev, RECORD_ADDRESS_BITS)) { | 230 | if (!pci_set_dma_mask(pdev, RECORD_ADDRESS_BITS)) { |
231 | card->record_enabled = 1; | 231 | card->record_enabled = 1; |
232 | } else { | 232 | } else { |
233 | card->record_enabled = 0; | 233 | card->record_enabled = 0; |
234 | printk(KERN_WARN "%s: Record disabled due to DMA limitations.\n", | 234 | printk(KERN_WARNING "%s: Record disabled due to DMA limitations.\n", |
235 | card->name); | 235 | card->name); |
236 | } | 236 | } |
237 | 237 | ||
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index ab8300f67182..325cfd1d6d99 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | DOCBOOKS := z8530book.xml mcabook.xml device-drivers.xml \ | 9 | DOCBOOKS := z8530book.xml mcabook.xml device-drivers.xml \ |
10 | kernel-hacking.xml kernel-locking.xml deviceiobook.xml \ | 10 | kernel-hacking.xml kernel-locking.xml deviceiobook.xml \ |
11 | procfs-guide.xml writing_usb_driver.xml networking.xml \ | 11 | writing_usb_driver.xml networking.xml \ |
12 | kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \ | 12 | kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \ |
13 | gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \ | 13 | gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \ |
14 | genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \ | 14 | genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \ |
@@ -32,10 +32,10 @@ PS_METHOD = $(prefer-db2x) | |||
32 | 32 | ||
33 | ### | 33 | ### |
34 | # The targets that may be used. | 34 | # The targets that may be used. |
35 | PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs media | 35 | PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs xmldoclinks |
36 | 36 | ||
37 | BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) | 37 | BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) |
38 | xmldocs: $(BOOKS) | 38 | xmldocs: $(BOOKS) xmldoclinks |
39 | sgmldocs: xmldocs | 39 | sgmldocs: xmldocs |
40 | 40 | ||
41 | PS := $(patsubst %.xml, %.ps, $(BOOKS)) | 41 | PS := $(patsubst %.xml, %.ps, $(BOOKS)) |
@@ -45,15 +45,24 @@ PDF := $(patsubst %.xml, %.pdf, $(BOOKS)) | |||
45 | pdfdocs: $(PDF) | 45 | pdfdocs: $(PDF) |
46 | 46 | ||
47 | HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS))) | 47 | HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS))) |
48 | htmldocs: media $(HTML) | 48 | htmldocs: $(HTML) |
49 | $(call build_main_index) | 49 | $(call build_main_index) |
50 | $(call build_images) | ||
50 | 51 | ||
51 | MAN := $(patsubst %.xml, %.9, $(BOOKS)) | 52 | MAN := $(patsubst %.xml, %.9, $(BOOKS)) |
52 | mandocs: $(MAN) | 53 | mandocs: $(MAN) |
53 | 54 | ||
54 | media: | 55 | build_images = mkdir -p $(objtree)/Documentation/DocBook/media/ && \ |
55 | mkdir -p $(srctree)/Documentation/DocBook/media/ | 56 | cp $(srctree)/Documentation/DocBook/dvb/*.png $(srctree)/Documentation/DocBook/v4l/*.gif $(objtree)/Documentation/DocBook/media/ |
56 | cp $(srctree)/Documentation/DocBook/dvb/*.png $(srctree)/Documentation/DocBook/v4l/*.gif $(srctree)/Documentation/DocBook/media/ | 57 | |
58 | xmldoclinks: | ||
59 | ifneq ($(objtree),$(srctree)) | ||
60 | for dep in dvb media-entities.tmpl media-indices.tmpl v4l; do \ | ||
61 | rm -f $(objtree)/Documentation/DocBook/$$dep \ | ||
62 | && ln -s $(srctree)/Documentation/DocBook/$$dep $(objtree)/Documentation/DocBook/ \ | ||
63 | || exit; \ | ||
64 | done | ||
65 | endif | ||
57 | 66 | ||
58 | installmandocs: mandocs | 67 | installmandocs: mandocs |
59 | mkdir -p /usr/local/man/man9/ | 68 | mkdir -p /usr/local/man/man9/ |
@@ -65,7 +74,7 @@ KERNELDOC = $(srctree)/scripts/kernel-doc | |||
65 | DOCPROC = $(objtree)/scripts/basic/docproc | 74 | DOCPROC = $(objtree)/scripts/basic/docproc |
66 | 75 | ||
67 | XMLTOFLAGS = -m $(srctree)/Documentation/DocBook/stylesheet.xsl | 76 | XMLTOFLAGS = -m $(srctree)/Documentation/DocBook/stylesheet.xsl |
68 | #XMLTOFLAGS += --skip-validation | 77 | XMLTOFLAGS += --skip-validation |
69 | 78 | ||
70 | ### | 79 | ### |
71 | # DOCPROC is used for two purposes: | 80 | # DOCPROC is used for two purposes: |
@@ -101,17 +110,6 @@ endif | |||
101 | # Changes in kernel-doc force a rebuild of all documentation | 110 | # Changes in kernel-doc force a rebuild of all documentation |
102 | $(BOOKS): $(KERNELDOC) | 111 | $(BOOKS): $(KERNELDOC) |
103 | 112 | ||
104 | ### | ||
105 | # procfs guide uses a .c file as example code. | ||
106 | # This requires an explicit dependency | ||
107 | C-procfs-example = procfs_example.xml | ||
108 | C-procfs-example2 = $(addprefix $(obj)/,$(C-procfs-example)) | ||
109 | $(obj)/procfs-guide.xml: $(C-procfs-example2) | ||
110 | |||
111 | # List of programs to build | ||
112 | ##oops, this is a kernel module::hostprogs-y := procfs_example | ||
113 | obj-m += procfs_example.o | ||
114 | |||
115 | # Tell kbuild to always build the programs | 113 | # Tell kbuild to always build the programs |
116 | always := $(hostprogs-y) | 114 | always := $(hostprogs-y) |
117 | 115 | ||
@@ -238,7 +236,7 @@ clean-files := $(DOCBOOKS) \ | |||
238 | $(patsubst %.xml, %.pdf, $(DOCBOOKS)) \ | 236 | $(patsubst %.xml, %.pdf, $(DOCBOOKS)) \ |
239 | $(patsubst %.xml, %.html, $(DOCBOOKS)) \ | 237 | $(patsubst %.xml, %.html, $(DOCBOOKS)) \ |
240 | $(patsubst %.xml, %.9, $(DOCBOOKS)) \ | 238 | $(patsubst %.xml, %.9, $(DOCBOOKS)) \ |
241 | $(C-procfs-example) $(index) | 239 | $(index) |
242 | 240 | ||
243 | clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man | 241 | clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man |
244 | 242 | ||
diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl index 94a20fe8fedf..f9a6e2c75f12 100644 --- a/Documentation/DocBook/device-drivers.tmpl +++ b/Documentation/DocBook/device-drivers.tmpl | |||
@@ -293,10 +293,23 @@ X!Idrivers/video/console/fonts.c | |||
293 | 293 | ||
294 | <chapter id="input_subsystem"> | 294 | <chapter id="input_subsystem"> |
295 | <title>Input Subsystem</title> | 295 | <title>Input Subsystem</title> |
296 | <sect1><title>Input core</title> | ||
296 | !Iinclude/linux/input.h | 297 | !Iinclude/linux/input.h |
297 | !Edrivers/input/input.c | 298 | !Edrivers/input/input.c |
298 | !Edrivers/input/ff-core.c | 299 | !Edrivers/input/ff-core.c |
299 | !Edrivers/input/ff-memless.c | 300 | !Edrivers/input/ff-memless.c |
301 | </sect1> | ||
302 | <sect1><title>Polled input devices</title> | ||
303 | !Iinclude/linux/input-polldev.h | ||
304 | !Edrivers/input/input-polldev.c | ||
305 | </sect1> | ||
306 | <sect1><title>Matrix keyboars/keypads</title> | ||
307 | !Iinclude/linux/input/matrix_keypad.h | ||
308 | </sect1> | ||
309 | <sect1><title>Sparse keymap support</title> | ||
310 | !Iinclude/linux/input/sparse-keymap.h | ||
311 | !Edrivers/input/sparse-keymap.c | ||
312 | </sect1> | ||
300 | </chapter> | 313 | </chapter> |
301 | 314 | ||
302 | <chapter id="spi"> | 315 | <chapter id="spi"> |
diff --git a/Documentation/DocBook/dvb/dvbapi.xml b/Documentation/DocBook/dvb/dvbapi.xml index 4fc5b23470a3..63c528fee624 100644 --- a/Documentation/DocBook/dvb/dvbapi.xml +++ b/Documentation/DocBook/dvb/dvbapi.xml | |||
@@ -30,6 +30,14 @@ | |||
30 | <revhistory> | 30 | <revhistory> |
31 | <!-- Put document revisions here, newest first. --> | 31 | <!-- Put document revisions here, newest first. --> |
32 | <revision> | 32 | <revision> |
33 | <revnumber>2.0.2</revnumber> | ||
34 | <date>2009-10-25</date> | ||
35 | <authorinitials>mcc</authorinitials> | ||
36 | <revremark> | ||
37 | documents FE_SET_FRONTEND_TUNE_MODE and FE_DISHETWORK_SEND_LEGACY_CMD ioctls. | ||
38 | </revremark> | ||
39 | </revision> | ||
40 | <revision> | ||
33 | <revnumber>2.0.1</revnumber> | 41 | <revnumber>2.0.1</revnumber> |
34 | <date>2009-09-16</date> | 42 | <date>2009-09-16</date> |
35 | <authorinitials>mcc</authorinitials> | 43 | <authorinitials>mcc</authorinitials> |
@@ -85,3 +93,8 @@ Added ISDB-T test originally written by Patrick Boettcher | |||
85 | &sub-examples; | 93 | &sub-examples; |
86 | </chapter> | 94 | </chapter> |
87 | <!-- END OF CHAPTERS --> | 95 | <!-- END OF CHAPTERS --> |
96 | <appendix id="frontend_h"> | ||
97 | <title>DVB Frontend Header File</title> | ||
98 | &sub-frontend-h; | ||
99 | </appendix> | ||
100 | |||
diff --git a/Documentation/DocBook/dvb/isdbt.xml b/Documentation/DocBook/dvb/dvbproperty.xml index 92855222fccb..5f57c7ccd4ba 100644 --- a/Documentation/DocBook/dvb/isdbt.xml +++ b/Documentation/DocBook/dvb/dvbproperty.xml | |||
@@ -1,3 +1,6 @@ | |||
1 | <section id="FE_GET_PROPERTY"> | ||
2 | <title>FE_GET_PROPERTY/FE_SET_PROPERTY</title> | ||
3 | |||
1 | <section id="isdbt"> | 4 | <section id="isdbt"> |
2 | <title>ISDB-T frontend</title> | 5 | <title>ISDB-T frontend</title> |
3 | <para>This section describes shortly what are the possible parameters in the Linux | 6 | <para>This section describes shortly what are the possible parameters in the Linux |
@@ -312,3 +315,4 @@ | |||
312 | </section> | 315 | </section> |
313 | </section> | 316 | </section> |
314 | </section> | 317 | </section> |
318 | </section> | ||
diff --git a/Documentation/DocBook/dvb/frontend.h.xml b/Documentation/DocBook/dvb/frontend.h.xml new file mode 100644 index 000000000000..b99644f5340a --- /dev/null +++ b/Documentation/DocBook/dvb/frontend.h.xml | |||
@@ -0,0 +1,415 @@ | |||
1 | <programlisting> | ||
2 | /* | ||
3 | * frontend.h | ||
4 | * | ||
5 | * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de> | ||
6 | * Ralph Metzler <ralph@convergence.de> | ||
7 | * Holger Waechtler <holger@convergence.de> | ||
8 | * Andre Draszik <ad@convergence.de> | ||
9 | * for convergence integrated media GmbH | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU Lesser General Public License | ||
13 | * as published by the Free Software Foundation; either version 2.1 | ||
14 | * of the License, or (at your option) any later version. | ||
15 | * | ||
16 | * This program is distributed in the hope that it will be useful, | ||
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
19 | * GNU General Public License for more details. | ||
20 | * | ||
21 | * You should have received a copy of the GNU Lesser General Public License | ||
22 | * along with this program; if not, write to the Free Software | ||
23 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
24 | * | ||
25 | */ | ||
26 | |||
27 | #ifndef _DVBFRONTEND_H_ | ||
28 | #define _DVBFRONTEND_H_ | ||
29 | |||
30 | #include <linux/types.h> | ||
31 | |||
32 | typedef enum fe_type { | ||
33 | FE_QPSK, | ||
34 | FE_QAM, | ||
35 | FE_OFDM, | ||
36 | FE_ATSC | ||
37 | } fe_type_t; | ||
38 | |||
39 | |||
40 | typedef enum fe_caps { | ||
41 | FE_IS_STUPID = 0, | ||
42 | FE_CAN_INVERSION_AUTO = 0x1, | ||
43 | FE_CAN_FEC_1_2 = 0x2, | ||
44 | FE_CAN_FEC_2_3 = 0x4, | ||
45 | FE_CAN_FEC_3_4 = 0x8, | ||
46 | FE_CAN_FEC_4_5 = 0x10, | ||
47 | FE_CAN_FEC_5_6 = 0x20, | ||
48 | FE_CAN_FEC_6_7 = 0x40, | ||
49 | FE_CAN_FEC_7_8 = 0x80, | ||
50 | FE_CAN_FEC_8_9 = 0x100, | ||
51 | FE_CAN_FEC_AUTO = 0x200, | ||
52 | FE_CAN_QPSK = 0x400, | ||
53 | FE_CAN_QAM_16 = 0x800, | ||
54 | FE_CAN_QAM_32 = 0x1000, | ||
55 | FE_CAN_QAM_64 = 0x2000, | ||
56 | FE_CAN_QAM_128 = 0x4000, | ||
57 | FE_CAN_QAM_256 = 0x8000, | ||
58 | FE_CAN_QAM_AUTO = 0x10000, | ||
59 | FE_CAN_TRANSMISSION_MODE_AUTO = 0x20000, | ||
60 | FE_CAN_BANDWIDTH_AUTO = 0x40000, | ||
61 | FE_CAN_GUARD_INTERVAL_AUTO = 0x80000, | ||
62 | FE_CAN_HIERARCHY_AUTO = 0x100000, | ||
63 | FE_CAN_8VSB = 0x200000, | ||
64 | FE_CAN_16VSB = 0x400000, | ||
65 | FE_HAS_EXTENDED_CAPS = 0x800000, /* We need more bitspace for newer APIs, indicate this. */ | ||
66 | FE_CAN_2G_MODULATION = 0x10000000, /* frontend supports "2nd generation modulation" (DVB-S2) */ | ||
67 | FE_NEEDS_BENDING = 0x20000000, /* not supported anymore, don't use (frontend requires frequency bending) */ | ||
68 | FE_CAN_RECOVER = 0x40000000, /* frontend can recover from a cable unplug automatically */ | ||
69 | FE_CAN_MUTE_TS = 0x80000000 /* frontend can stop spurious TS data output */ | ||
70 | } fe_caps_t; | ||
71 | |||
72 | |||
73 | struct dvb_frontend_info { | ||
74 | char name[128]; | ||
75 | fe_type_t type; | ||
76 | __u32 frequency_min; | ||
77 | __u32 frequency_max; | ||
78 | __u32 frequency_stepsize; | ||
79 | __u32 frequency_tolerance; | ||
80 | __u32 symbol_rate_min; | ||
81 | __u32 symbol_rate_max; | ||
82 | __u32 symbol_rate_tolerance; /* ppm */ | ||
83 | __u32 notifier_delay; /* DEPRECATED */ | ||
84 | fe_caps_t caps; | ||
85 | }; | ||
86 | |||
87 | |||
88 | /** | ||
89 | * Check out the DiSEqC bus spec available on http://www.eutelsat.org/ for | ||
90 | * the meaning of this struct... | ||
91 | */ | ||
92 | struct dvb_diseqc_master_cmd { | ||
93 | __u8 msg [6]; /* { framing, address, command, data [3] } */ | ||
94 | __u8 msg_len; /* valid values are 3...6 */ | ||
95 | }; | ||
96 | |||
97 | |||
98 | struct dvb_diseqc_slave_reply { | ||
99 | __u8 msg [4]; /* { framing, data [3] } */ | ||
100 | __u8 msg_len; /* valid values are 0...4, 0 means no msg */ | ||
101 | int timeout; /* return from ioctl after timeout ms with */ | ||
102 | }; /* errorcode when no message was received */ | ||
103 | |||
104 | |||
105 | typedef enum fe_sec_voltage { | ||
106 | SEC_VOLTAGE_13, | ||
107 | SEC_VOLTAGE_18, | ||
108 | SEC_VOLTAGE_OFF | ||
109 | } fe_sec_voltage_t; | ||
110 | |||
111 | |||
112 | typedef enum fe_sec_tone_mode { | ||
113 | SEC_TONE_ON, | ||
114 | SEC_TONE_OFF | ||
115 | } fe_sec_tone_mode_t; | ||
116 | |||
117 | |||
118 | typedef enum fe_sec_mini_cmd { | ||
119 | SEC_MINI_A, | ||
120 | SEC_MINI_B | ||
121 | } fe_sec_mini_cmd_t; | ||
122 | |||
123 | |||
124 | typedef enum fe_status { | ||
125 | FE_HAS_SIGNAL = 0x01, /* found something above the noise level */ | ||
126 | FE_HAS_CARRIER = 0x02, /* found a DVB signal */ | ||
127 | FE_HAS_VITERBI = 0x04, /* FEC is stable */ | ||
128 | FE_HAS_SYNC = 0x08, /* found sync bytes */ | ||
129 | FE_HAS_LOCK = 0x10, /* everything's working... */ | ||
130 | FE_TIMEDOUT = 0x20, /* no lock within the last ~2 seconds */ | ||
131 | FE_REINIT = 0x40 /* frontend was reinitialized, */ | ||
132 | } fe_status_t; /* application is recommended to reset */ | ||
133 | /* DiSEqC, tone and parameters */ | ||
134 | |||
135 | typedef enum fe_spectral_inversion { | ||
136 | INVERSION_OFF, | ||
137 | INVERSION_ON, | ||
138 | INVERSION_AUTO | ||
139 | } fe_spectral_inversion_t; | ||
140 | |||
141 | |||
142 | typedef enum fe_code_rate { | ||
143 | FEC_NONE = 0, | ||
144 | FEC_1_2, | ||
145 | FEC_2_3, | ||
146 | FEC_3_4, | ||
147 | FEC_4_5, | ||
148 | FEC_5_6, | ||
149 | FEC_6_7, | ||
150 | FEC_7_8, | ||
151 | FEC_8_9, | ||
152 | FEC_AUTO, | ||
153 | FEC_3_5, | ||
154 | FEC_9_10, | ||
155 | } fe_code_rate_t; | ||
156 | |||
157 | |||
158 | typedef enum fe_modulation { | ||
159 | QPSK, | ||
160 | QAM_16, | ||
161 | QAM_32, | ||
162 | QAM_64, | ||
163 | QAM_128, | ||
164 | QAM_256, | ||
165 | QAM_AUTO, | ||
166 | VSB_8, | ||
167 | VSB_16, | ||
168 | PSK_8, | ||
169 | APSK_16, | ||
170 | APSK_32, | ||
171 | DQPSK, | ||
172 | } fe_modulation_t; | ||
173 | |||
174 | typedef enum fe_transmit_mode { | ||
175 | TRANSMISSION_MODE_2K, | ||
176 | TRANSMISSION_MODE_8K, | ||
177 | TRANSMISSION_MODE_AUTO, | ||
178 | TRANSMISSION_MODE_4K | ||
179 | } fe_transmit_mode_t; | ||
180 | |||
181 | typedef enum fe_bandwidth { | ||
182 | BANDWIDTH_8_MHZ, | ||
183 | BANDWIDTH_7_MHZ, | ||
184 | BANDWIDTH_6_MHZ, | ||
185 | BANDWIDTH_AUTO | ||
186 | } fe_bandwidth_t; | ||
187 | |||
188 | |||
189 | typedef enum fe_guard_interval { | ||
190 | GUARD_INTERVAL_1_32, | ||
191 | GUARD_INTERVAL_1_16, | ||
192 | GUARD_INTERVAL_1_8, | ||
193 | GUARD_INTERVAL_1_4, | ||
194 | GUARD_INTERVAL_AUTO | ||
195 | } fe_guard_interval_t; | ||
196 | |||
197 | |||
198 | typedef enum fe_hierarchy { | ||
199 | HIERARCHY_NONE, | ||
200 | HIERARCHY_1, | ||
201 | HIERARCHY_2, | ||
202 | HIERARCHY_4, | ||
203 | HIERARCHY_AUTO | ||
204 | } fe_hierarchy_t; | ||
205 | |||
206 | |||
207 | struct dvb_qpsk_parameters { | ||
208 | __u32 symbol_rate; /* symbol rate in Symbols per second */ | ||
209 | fe_code_rate_t fec_inner; /* forward error correction (see above) */ | ||
210 | }; | ||
211 | |||
212 | struct dvb_qam_parameters { | ||
213 | __u32 symbol_rate; /* symbol rate in Symbols per second */ | ||
214 | fe_code_rate_t fec_inner; /* forward error correction (see above) */ | ||
215 | fe_modulation_t modulation; /* modulation type (see above) */ | ||
216 | }; | ||
217 | |||
218 | struct dvb_vsb_parameters { | ||
219 | fe_modulation_t modulation; /* modulation type (see above) */ | ||
220 | }; | ||
221 | |||
222 | struct dvb_ofdm_parameters { | ||
223 | fe_bandwidth_t bandwidth; | ||
224 | fe_code_rate_t code_rate_HP; /* high priority stream code rate */ | ||
225 | fe_code_rate_t code_rate_LP; /* low priority stream code rate */ | ||
226 | fe_modulation_t constellation; /* modulation type (see above) */ | ||
227 | fe_transmit_mode_t transmission_mode; | ||
228 | fe_guard_interval_t guard_interval; | ||
229 | fe_hierarchy_t hierarchy_information; | ||
230 | }; | ||
231 | |||
232 | |||
233 | struct dvb_frontend_parameters { | ||
234 | __u32 frequency; /* (absolute) frequency in Hz for QAM/OFDM/ATSC */ | ||
235 | /* intermediate frequency in kHz for QPSK */ | ||
236 | fe_spectral_inversion_t inversion; | ||
237 | union { | ||
238 | struct dvb_qpsk_parameters qpsk; | ||
239 | struct dvb_qam_parameters qam; | ||
240 | struct dvb_ofdm_parameters ofdm; | ||
241 | struct dvb_vsb_parameters vsb; | ||
242 | } u; | ||
243 | }; | ||
244 | |||
245 | |||
246 | struct dvb_frontend_event { | ||
247 | fe_status_t status; | ||
248 | struct dvb_frontend_parameters parameters; | ||
249 | }; | ||
250 | |||
251 | /* S2API Commands */ | ||
252 | #define DTV_UNDEFINED 0 | ||
253 | #define DTV_TUNE 1 | ||
254 | #define DTV_CLEAR 2 | ||
255 | #define DTV_FREQUENCY 3 | ||
256 | #define DTV_MODULATION 4 | ||
257 | #define DTV_BANDWIDTH_HZ 5 | ||
258 | #define DTV_INVERSION 6 | ||
259 | #define DTV_DISEQC_MASTER 7 | ||
260 | #define DTV_SYMBOL_RATE 8 | ||
261 | #define DTV_INNER_FEC 9 | ||
262 | #define DTV_VOLTAGE 10 | ||
263 | #define DTV_TONE 11 | ||
264 | #define DTV_PILOT 12 | ||
265 | #define DTV_ROLLOFF 13 | ||
266 | #define DTV_DISEQC_SLAVE_REPLY 14 | ||
267 | |||
268 | /* Basic enumeration set for querying unlimited capabilities */ | ||
269 | #define DTV_FE_CAPABILITY_COUNT 15 | ||
270 | #define DTV_FE_CAPABILITY 16 | ||
271 | #define DTV_DELIVERY_SYSTEM 17 | ||
272 | |||
273 | /* ISDB-T and ISDB-Tsb */ | ||
274 | #define DTV_ISDBT_PARTIAL_RECEPTION 18 | ||
275 | #define DTV_ISDBT_SOUND_BROADCASTING 19 | ||
276 | |||
277 | #define DTV_ISDBT_SB_SUBCHANNEL_ID 20 | ||
278 | #define DTV_ISDBT_SB_SEGMENT_IDX 21 | ||
279 | #define DTV_ISDBT_SB_SEGMENT_COUNT 22 | ||
280 | |||
281 | #define DTV_ISDBT_LAYERA_FEC 23 | ||
282 | #define DTV_ISDBT_LAYERA_MODULATION 24 | ||
283 | #define DTV_ISDBT_LAYERA_SEGMENT_COUNT 25 | ||
284 | #define DTV_ISDBT_LAYERA_TIME_INTERLEAVING 26 | ||
285 | |||
286 | #define DTV_ISDBT_LAYERB_FEC 27 | ||
287 | #define DTV_ISDBT_LAYERB_MODULATION 28 | ||
288 | #define DTV_ISDBT_LAYERB_SEGMENT_COUNT 29 | ||
289 | #define DTV_ISDBT_LAYERB_TIME_INTERLEAVING 30 | ||
290 | |||
291 | #define DTV_ISDBT_LAYERC_FEC 31 | ||
292 | #define DTV_ISDBT_LAYERC_MODULATION 32 | ||
293 | #define DTV_ISDBT_LAYERC_SEGMENT_COUNT 33 | ||
294 | #define DTV_ISDBT_LAYERC_TIME_INTERLEAVING 34 | ||
295 | |||
296 | #define DTV_API_VERSION 35 | ||
297 | |||
298 | #define DTV_CODE_RATE_HP 36 | ||
299 | #define DTV_CODE_RATE_LP 37 | ||
300 | #define DTV_GUARD_INTERVAL 38 | ||
301 | #define DTV_TRANSMISSION_MODE 39 | ||
302 | #define DTV_HIERARCHY 40 | ||
303 | |||
304 | #define DTV_ISDBT_LAYER_ENABLED 41 | ||
305 | |||
306 | #define DTV_ISDBS_TS_ID 42 | ||
307 | |||
308 | #define DTV_MAX_COMMAND DTV_ISDBS_TS_ID | ||
309 | |||
310 | typedef enum fe_pilot { | ||
311 | PILOT_ON, | ||
312 | PILOT_OFF, | ||
313 | PILOT_AUTO, | ||
314 | } fe_pilot_t; | ||
315 | |||
316 | typedef enum fe_rolloff { | ||
317 | ROLLOFF_35, /* Implied value in DVB-S, default for DVB-S2 */ | ||
318 | ROLLOFF_20, | ||
319 | ROLLOFF_25, | ||
320 | ROLLOFF_AUTO, | ||
321 | } fe_rolloff_t; | ||
322 | |||
323 | typedef enum fe_delivery_system { | ||
324 | SYS_UNDEFINED, | ||
325 | SYS_DVBC_ANNEX_AC, | ||
326 | SYS_DVBC_ANNEX_B, | ||
327 | SYS_DVBT, | ||
328 | SYS_DSS, | ||
329 | SYS_DVBS, | ||
330 | SYS_DVBS2, | ||
331 | SYS_DVBH, | ||
332 | SYS_ISDBT, | ||
333 | SYS_ISDBS, | ||
334 | SYS_ISDBC, | ||
335 | SYS_ATSC, | ||
336 | SYS_ATSCMH, | ||
337 | SYS_DMBTH, | ||
338 | SYS_CMMB, | ||
339 | SYS_DAB, | ||
340 | } fe_delivery_system_t; | ||
341 | |||
342 | struct dtv_cmds_h { | ||
343 | char *name; /* A display name for debugging purposes */ | ||
344 | |||
345 | __u32 cmd; /* A unique ID */ | ||
346 | |||
347 | /* Flags */ | ||
348 | __u32 set:1; /* Either a set or get property */ | ||
349 | __u32 buffer:1; /* Does this property use the buffer? */ | ||
350 | __u32 reserved:30; /* Align */ | ||
351 | }; | ||
352 | |||
353 | struct dtv_property { | ||
354 | __u32 cmd; | ||
355 | __u32 reserved[3]; | ||
356 | union { | ||
357 | __u32 data; | ||
358 | struct { | ||
359 | __u8 data[32]; | ||
360 | __u32 len; | ||
361 | __u32 reserved1[3]; | ||
362 | void *reserved2; | ||
363 | } buffer; | ||
364 | } u; | ||
365 | int result; | ||
366 | } __attribute__ ((packed)); | ||
367 | |||
368 | /* num of properties cannot exceed DTV_IOCTL_MAX_MSGS per ioctl */ | ||
369 | #define DTV_IOCTL_MAX_MSGS 64 | ||
370 | |||
371 | struct dtv_properties { | ||
372 | __u32 num; | ||
373 | struct dtv_property *props; | ||
374 | }; | ||
375 | |||
376 | #define <link linkend="FE_GET_PROPERTY">FE_SET_PROPERTY</link> _IOW('o', 82, struct dtv_properties) | ||
377 | #define <link linkend="FE_GET_PROPERTY">FE_GET_PROPERTY</link> _IOR('o', 83, struct dtv_properties) | ||
378 | |||
379 | |||
380 | /** | ||
381 | * When set, this flag will disable any zigzagging or other "normal" tuning | ||
382 | * behaviour. Additionally, there will be no automatic monitoring of the lock | ||
383 | * status, and hence no frontend events will be generated. If a frontend device | ||
384 | * is closed, this flag will be automatically turned off when the device is | ||
385 | * reopened read-write. | ||
386 | */ | ||
387 | #define FE_TUNE_MODE_ONESHOT 0x01 | ||
388 | |||
389 | |||
390 | #define <link linkend="FE_GET_INFO">FE_GET_INFO</link> _IOR('o', 61, struct dvb_frontend_info) | ||
391 | |||
392 | #define <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link> _IO('o', 62) | ||
393 | #define <link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link> _IOW('o', 63, struct dvb_diseqc_master_cmd) | ||
394 | #define <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link> _IOR('o', 64, struct dvb_diseqc_slave_reply) | ||
395 | #define <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link> _IO('o', 65) /* fe_sec_mini_cmd_t */ | ||
396 | |||
397 | #define <link linkend="FE_SET_TONE">FE_SET_TONE</link> _IO('o', 66) /* fe_sec_tone_mode_t */ | ||
398 | #define <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> _IO('o', 67) /* fe_sec_voltage_t */ | ||
399 | #define <link linkend="FE_ENABLE_HIGH_LNB_VOLTAGE">FE_ENABLE_HIGH_LNB_VOLTAGE</link> _IO('o', 68) /* int */ | ||
400 | |||
401 | #define <link linkend="FE_READ_STATUS">FE_READ_STATUS</link> _IOR('o', 69, fe_status_t) | ||
402 | #define <link linkend="FE_READ_BER">FE_READ_BER</link> _IOR('o', 70, __u32) | ||
403 | #define <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link> _IOR('o', 71, __u16) | ||
404 | #define <link linkend="FE_READ_SNR">FE_READ_SNR</link> _IOR('o', 72, __u16) | ||
405 | #define <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link> _IOR('o', 73, __u32) | ||
406 | |||
407 | #define <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> _IOW('o', 76, struct dvb_frontend_parameters) | ||
408 | #define <link linkend="FE_GET_FRONTEND">FE_GET_FRONTEND</link> _IOR('o', 77, struct dvb_frontend_parameters) | ||
409 | #define <link linkend="FE_SET_FRONTEND_TUNE_MODE">FE_SET_FRONTEND_TUNE_MODE</link> _IO('o', 81) /* unsigned int */ | ||
410 | #define <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> _IOR('o', 78, struct dvb_frontend_event) | ||
411 | |||
412 | #define <link linkend="FE_DISHNETWORK_SEND_LEGACY_CMD">FE_DISHNETWORK_SEND_LEGACY_CMD</link> _IO('o', 80) /* unsigned int */ | ||
413 | |||
414 | #endif /*_DVBFRONTEND_H_*/ | ||
415 | </programlisting> | ||
diff --git a/Documentation/DocBook/dvb/frontend.xml b/Documentation/DocBook/dvb/frontend.xml index 9d89a7b94fd5..300ba1f04177 100644 --- a/Documentation/DocBook/dvb/frontend.xml +++ b/Documentation/DocBook/dvb/frontend.xml | |||
@@ -73,7 +73,8 @@ a specific frontend type.</para> | |||
73 | <section id="frontend_info"> | 73 | <section id="frontend_info"> |
74 | <title>frontend information</title> | 74 | <title>frontend information</title> |
75 | 75 | ||
76 | <para>Information about the frontend ca be queried with FE_GET_INFO.</para> | 76 | <para>Information about the frontend ca be queried with |
77 | <link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para> | ||
77 | 78 | ||
78 | <programlisting> | 79 | <programlisting> |
79 | struct dvb_frontend_info { | 80 | struct dvb_frontend_info { |
@@ -338,7 +339,7 @@ modulation mode which can be one of the following: | |||
338 | <entry align="char"> | 339 | <entry align="char"> |
339 | <para>This system call opens a named frontend device (/dev/dvb/adapter0/frontend0) | 340 | <para>This system call opens a named frontend device (/dev/dvb/adapter0/frontend0) |
340 | for subsequent use. Usually the first thing to do after a successful open is to | 341 | for subsequent use. Usually the first thing to do after a successful open is to |
341 | find out the frontend type with FE_GET_INFO.</para> | 342 | find out the frontend type with <link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para> |
342 | <para>The device can be opened in read-only mode, which only allows monitoring of | 343 | <para>The device can be opened in read-only mode, which only allows monitoring of |
343 | device status and statistics, or read/write mode, which allows any kind of use | 344 | device status and statistics, or read/write mode, which allows any kind of use |
344 | (e.g. performing tuning operations.) | 345 | (e.g. performing tuning operations.) |
@@ -478,7 +479,7 @@ modulation mode which can be one of the following: | |||
478 | </row></tbody></tgroup></informaltable> | 479 | </row></tbody></tgroup></informaltable> |
479 | </section> | 480 | </section> |
480 | 481 | ||
481 | <section id="frontend_read_status"> | 482 | <section id="FE_READ_STATUS"> |
482 | <title>FE_READ_STATUS</title> | 483 | <title>FE_READ_STATUS</title> |
483 | <para>DESCRIPTION | 484 | <para>DESCRIPTION |
484 | </para> | 485 | </para> |
@@ -492,7 +493,7 @@ modulation mode which can be one of the following: | |||
492 | </para> | 493 | </para> |
493 | <informaltable><tgroup cols="1"><tbody><row><entry | 494 | <informaltable><tgroup cols="1"><tbody><row><entry |
494 | align="char"> | 495 | align="char"> |
495 | <para>int ioctl(int fd, int request = FE_READ_STATUS, | 496 | <para>int ioctl(int fd, int request = <link linkend="FE_READ_STATUS">FE_READ_STATUS</link>, |
496 | fe_status_t ⋆status);</para> | 497 | fe_status_t ⋆status);</para> |
497 | </entry> | 498 | </entry> |
498 | </row></tbody></tgroup></informaltable> | 499 | </row></tbody></tgroup></informaltable> |
@@ -511,7 +512,7 @@ modulation mode which can be one of the following: | |||
511 | <para>int request</para> | 512 | <para>int request</para> |
512 | </entry><entry | 513 | </entry><entry |
513 | align="char"> | 514 | align="char"> |
514 | <para>Equals FE_READ_STATUS for this command.</para> | 515 | <para>Equals <link linkend="FE_READ_STATUS">FE_READ_STATUS</link> for this command.</para> |
515 | </entry> | 516 | </entry> |
516 | </row><row><entry | 517 | </row><row><entry |
517 | align="char"> | 518 | align="char"> |
@@ -542,7 +543,7 @@ modulation mode which can be one of the following: | |||
542 | </row></tbody></tgroup></informaltable> | 543 | </row></tbody></tgroup></informaltable> |
543 | </section> | 544 | </section> |
544 | 545 | ||
545 | <section id="frontend_read_ber"> | 546 | <section id="FE_READ_BER"> |
546 | <title>FE_READ_BER</title> | 547 | <title>FE_READ_BER</title> |
547 | <para>DESCRIPTION | 548 | <para>DESCRIPTION |
548 | </para> | 549 | </para> |
@@ -557,7 +558,7 @@ modulation mode which can be one of the following: | |||
557 | </para> | 558 | </para> |
558 | <informaltable><tgroup cols="1"><tbody><row><entry | 559 | <informaltable><tgroup cols="1"><tbody><row><entry |
559 | align="char"> | 560 | align="char"> |
560 | <para>int ioctl(int fd, int request = FE_READ_BER, | 561 | <para>int ioctl(int fd, int request = <link linkend="FE_READ_BER">FE_READ_BER</link>, |
561 | uint32_t ⋆ber);</para> | 562 | uint32_t ⋆ber);</para> |
562 | </entry> | 563 | </entry> |
563 | </row></tbody></tgroup></informaltable> | 564 | </row></tbody></tgroup></informaltable> |
@@ -575,7 +576,7 @@ modulation mode which can be one of the following: | |||
575 | <para>int request</para> | 576 | <para>int request</para> |
576 | </entry><entry | 577 | </entry><entry |
577 | align="char"> | 578 | align="char"> |
578 | <para>Equals FE_READ_BER for this command.</para> | 579 | <para>Equals <link linkend="FE_READ_BER">FE_READ_BER</link> for this command.</para> |
579 | </entry> | 580 | </entry> |
580 | </row><row><entry | 581 | </row><row><entry |
581 | align="char"> | 582 | align="char"> |
@@ -619,7 +620,7 @@ modulation mode which can be one of the following: | |||
619 | </row></tbody></tgroup></informaltable> | 620 | </row></tbody></tgroup></informaltable> |
620 | </section> | 621 | </section> |
621 | 622 | ||
622 | <section id="frontend_read_snr"> | 623 | <section id="FE_READ_SNR"> |
623 | <title>FE_READ_SNR</title> | 624 | <title>FE_READ_SNR</title> |
624 | 625 | ||
625 | <para>DESCRIPTION | 626 | <para>DESCRIPTION |
@@ -634,7 +635,7 @@ modulation mode which can be one of the following: | |||
634 | </para> | 635 | </para> |
635 | <informaltable><tgroup cols="1"><tbody><row><entry | 636 | <informaltable><tgroup cols="1"><tbody><row><entry |
636 | align="char"> | 637 | align="char"> |
637 | <para>int ioctl(int fd, int request = FE_READ_SNR, int16_t | 638 | <para>int ioctl(int fd, int request = <link linkend="FE_READ_SNR">FE_READ_SNR</link>, int16_t |
638 | ⋆snr);</para> | 639 | ⋆snr);</para> |
639 | </entry> | 640 | </entry> |
640 | </row></tbody></tgroup></informaltable> | 641 | </row></tbody></tgroup></informaltable> |
@@ -652,7 +653,7 @@ modulation mode which can be one of the following: | |||
652 | <para>int request</para> | 653 | <para>int request</para> |
653 | </entry><entry | 654 | </entry><entry |
654 | align="char"> | 655 | align="char"> |
655 | <para>Equals FE_READ_SNR for this command.</para> | 656 | <para>Equals <link linkend="FE_READ_SNR">FE_READ_SNR</link> for this command.</para> |
656 | </entry> | 657 | </entry> |
657 | </row><row><entry | 658 | </row><row><entry |
658 | align="char"> | 659 | align="char"> |
@@ -697,7 +698,7 @@ modulation mode which can be one of the following: | |||
697 | </row></tbody></tgroup></informaltable> | 698 | </row></tbody></tgroup></informaltable> |
698 | </section> | 699 | </section> |
699 | 700 | ||
700 | <section id="frontend_read_signal_strength"> | 701 | <section id="FE_READ_SIGNAL_STRENGTH"> |
701 | <title>FE_READ_SIGNAL_STRENGTH</title> | 702 | <title>FE_READ_SIGNAL_STRENGTH</title> |
702 | <para>DESCRIPTION | 703 | <para>DESCRIPTION |
703 | </para> | 704 | </para> |
@@ -712,7 +713,7 @@ modulation mode which can be one of the following: | |||
712 | <informaltable><tgroup cols="1"><tbody><row><entry | 713 | <informaltable><tgroup cols="1"><tbody><row><entry |
713 | align="char"> | 714 | align="char"> |
714 | <para>int ioctl( int fd, int request = | 715 | <para>int ioctl( int fd, int request = |
715 | FE_READ_SIGNAL_STRENGTH, int16_t ⋆strength);</para> | 716 | <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link>, int16_t ⋆strength);</para> |
716 | </entry> | 717 | </entry> |
717 | </row></tbody></tgroup></informaltable> | 718 | </row></tbody></tgroup></informaltable> |
718 | 719 | ||
@@ -730,7 +731,7 @@ modulation mode which can be one of the following: | |||
730 | <para>int request</para> | 731 | <para>int request</para> |
731 | </entry><entry | 732 | </entry><entry |
732 | align="char"> | 733 | align="char"> |
733 | <para>Equals FE_READ_SIGNAL_STRENGTH for this | 734 | <para>Equals <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link> for this |
734 | command.</para> | 735 | command.</para> |
735 | </entry> | 736 | </entry> |
736 | </row><row><entry | 737 | </row><row><entry |
@@ -775,7 +776,7 @@ modulation mode which can be one of the following: | |||
775 | </row></tbody></tgroup></informaltable> | 776 | </row></tbody></tgroup></informaltable> |
776 | </section> | 777 | </section> |
777 | 778 | ||
778 | <section id="frontend_read_ub"> | 779 | <section id="FE_READ_UNCORRECTED_BLOCKS"> |
779 | <title>FE_READ_UNCORRECTED_BLOCKS</title> | 780 | <title>FE_READ_UNCORRECTED_BLOCKS</title> |
780 | <para>DESCRIPTION | 781 | <para>DESCRIPTION |
781 | </para> | 782 | </para> |
@@ -797,7 +798,7 @@ modulation mode which can be one of the following: | |||
797 | <informaltable><tgroup cols="1"><tbody><row><entry | 798 | <informaltable><tgroup cols="1"><tbody><row><entry |
798 | align="char"> | 799 | align="char"> |
799 | <para>int ioctl( int fd, int request = | 800 | <para>int ioctl( int fd, int request = |
800 | FE_READ_UNCORRECTED_BLOCKS, uint32_t ⋆ublocks);</para> | 801 | <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link>, uint32_t ⋆ublocks);</para> |
801 | </entry> | 802 | </entry> |
802 | </row></tbody></tgroup></informaltable> | 803 | </row></tbody></tgroup></informaltable> |
803 | <para>PARAMETERS | 804 | <para>PARAMETERS |
@@ -814,7 +815,7 @@ modulation mode which can be one of the following: | |||
814 | <para>int request</para> | 815 | <para>int request</para> |
815 | </entry><entry | 816 | </entry><entry |
816 | align="char"> | 817 | align="char"> |
817 | <para>Equals FE_READ_UNCORRECTED_BLOCKS for this | 818 | <para>Equals <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link> for this |
818 | command.</para> | 819 | command.</para> |
819 | </entry> | 820 | </entry> |
820 | </row><row><entry | 821 | </row><row><entry |
@@ -852,7 +853,7 @@ modulation mode which can be one of the following: | |||
852 | </row></tbody></tgroup></informaltable> | 853 | </row></tbody></tgroup></informaltable> |
853 | </section> | 854 | </section> |
854 | 855 | ||
855 | <section id="frontend_set_fe"> | 856 | <section id="FE_SET_FRONTEND"> |
856 | <title>FE_SET_FRONTEND</title> | 857 | <title>FE_SET_FRONTEND</title> |
857 | <para>DESCRIPTION | 858 | <para>DESCRIPTION |
858 | </para> | 859 | </para> |
@@ -861,8 +862,8 @@ modulation mode which can be one of the following: | |||
861 | <para>This ioctl call starts a tuning operation using specified parameters. The result | 862 | <para>This ioctl call starts a tuning operation using specified parameters. The result |
862 | of this call will be successful if the parameters were valid and the tuning could | 863 | of this call will be successful if the parameters were valid and the tuning could |
863 | be initiated. The result of the tuning operation in itself, however, will arrive | 864 | be initiated. The result of the tuning operation in itself, however, will arrive |
864 | asynchronously as an event (see documentation for FE_GET_EVENT and | 865 | asynchronously as an event (see documentation for <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> and |
865 | FrontendEvent.) If a new FE_SET_FRONTEND operation is initiated before | 866 | FrontendEvent.) If a new <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> operation is initiated before |
866 | the previous one was completed, the previous operation will be aborted in favor | 867 | the previous one was completed, the previous operation will be aborted in favor |
867 | of the new one. This command requires read/write access to the device.</para> | 868 | of the new one. This command requires read/write access to the device.</para> |
868 | </entry> | 869 | </entry> |
@@ -872,7 +873,7 @@ modulation mode which can be one of the following: | |||
872 | </para> | 873 | </para> |
873 | <informaltable><tgroup cols="1"><tbody><row><entry | 874 | <informaltable><tgroup cols="1"><tbody><row><entry |
874 | align="char"> | 875 | align="char"> |
875 | <para>int ioctl(int fd, int request = FE_SET_FRONTEND, | 876 | <para>int ioctl(int fd, int request = <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link>, |
876 | struct dvb_frontend_parameters ⋆p);</para> | 877 | struct dvb_frontend_parameters ⋆p);</para> |
877 | </entry> | 878 | </entry> |
878 | </row></tbody></tgroup></informaltable> | 879 | </row></tbody></tgroup></informaltable> |
@@ -890,7 +891,7 @@ modulation mode which can be one of the following: | |||
890 | <para>int request</para> | 891 | <para>int request</para> |
891 | </entry><entry | 892 | </entry><entry |
892 | align="char"> | 893 | align="char"> |
893 | <para>Equals FE_SET_FRONTEND for this command.</para> | 894 | <para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para> |
894 | </entry> | 895 | </entry> |
895 | </row><row><entry | 896 | </row><row><entry |
896 | align="char"> | 897 | align="char"> |
@@ -928,7 +929,7 @@ modulation mode which can be one of the following: | |||
928 | </row></tbody></tgroup></informaltable> | 929 | </row></tbody></tgroup></informaltable> |
929 | </section> | 930 | </section> |
930 | 931 | ||
931 | <section id="frontend_get_fe"> | 932 | <section id="FE_GET_FRONTEND"> |
932 | <title>FE_GET_FRONTEND</title> | 933 | <title>FE_GET_FRONTEND</title> |
933 | <para>DESCRIPTION | 934 | <para>DESCRIPTION |
934 | </para> | 935 | </para> |
@@ -943,7 +944,7 @@ modulation mode which can be one of the following: | |||
943 | </para> | 944 | </para> |
944 | <informaltable><tgroup cols="1"><tbody><row><entry | 945 | <informaltable><tgroup cols="1"><tbody><row><entry |
945 | align="char"> | 946 | align="char"> |
946 | <para>int ioctl(int fd, int request = FE_GET_FRONTEND, | 947 | <para>int ioctl(int fd, int request = <link linkend="FE_GET_FRONTEND">FE_GET_FRONTEND</link>, |
947 | struct dvb_frontend_parameters ⋆p);</para> | 948 | struct dvb_frontend_parameters ⋆p);</para> |
948 | </entry> | 949 | </entry> |
949 | </row></tbody></tgroup></informaltable> | 950 | </row></tbody></tgroup></informaltable> |
@@ -962,7 +963,7 @@ modulation mode which can be one of the following: | |||
962 | <para>int request</para> | 963 | <para>int request</para> |
963 | </entry><entry | 964 | </entry><entry |
964 | align="char"> | 965 | align="char"> |
965 | <para>Equals FE_SET_FRONTEND for this command.</para> | 966 | <para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para> |
966 | </entry> | 967 | </entry> |
967 | </row><row><entry | 968 | </row><row><entry |
968 | align="char"> | 969 | align="char"> |
@@ -1003,7 +1004,7 @@ modulation mode which can be one of the following: | |||
1003 | 1004 | ||
1004 | </section> | 1005 | </section> |
1005 | 1006 | ||
1006 | <section id="frontend_get_event"> | 1007 | <section id="FE_GET_EVENT"> |
1007 | <title>FE_GET_EVENT</title> | 1008 | <title>FE_GET_EVENT</title> |
1008 | <para>DESCRIPTION | 1009 | <para>DESCRIPTION |
1009 | </para> | 1010 | </para> |
@@ -1024,7 +1025,8 @@ modulation mode which can be one of the following: | |||
1024 | rather small (room for 8 events), the queue must be serviced regularly to avoid | 1025 | rather small (room for 8 events), the queue must be serviced regularly to avoid |
1025 | overflow. If an overflow happens, the oldest event is discarded from the queue, | 1026 | overflow. If an overflow happens, the oldest event is discarded from the queue, |
1026 | and an error (EOVERFLOW) occurs the next time the queue is read. After | 1027 | and an error (EOVERFLOW) occurs the next time the queue is read. After |
1027 | reporting the error condition in this fashion, subsequent FE_GET_EVENT | 1028 | reporting the error condition in this fashion, subsequent |
1029 | <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> | ||
1028 | calls will return events from the queue as usual.</para> | 1030 | calls will return events from the queue as usual.</para> |
1029 | </entry> | 1031 | </entry> |
1030 | </row><row><entry | 1032 | </row><row><entry |
@@ -1057,7 +1059,7 @@ modulation mode which can be one of the following: | |||
1057 | <para>int request</para> | 1059 | <para>int request</para> |
1058 | </entry><entry | 1060 | </entry><entry |
1059 | align="char"> | 1061 | align="char"> |
1060 | <para>Equals FE_GET_EVENT for this command.</para> | 1062 | <para>Equals <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> for this command.</para> |
1061 | </entry> | 1063 | </entry> |
1062 | </row><row><entry | 1064 | </row><row><entry |
1063 | align="char"> | 1065 | align="char"> |
@@ -1115,7 +1117,7 @@ modulation mode which can be one of the following: | |||
1115 | </row></tbody></tgroup></informaltable> | 1117 | </row></tbody></tgroup></informaltable> |
1116 | </section> | 1118 | </section> |
1117 | 1119 | ||
1118 | <section id="frontend_get_info"> | 1120 | <section id="FE_GET_INFO"> |
1119 | <title>FE_GET_INFO</title> | 1121 | <title>FE_GET_INFO</title> |
1120 | <para>DESCRIPTION | 1122 | <para>DESCRIPTION |
1121 | </para> | 1123 | </para> |
@@ -1130,7 +1132,7 @@ modulation mode which can be one of the following: | |||
1130 | 1132 | ||
1131 | <informaltable><tgroup cols="1"><tbody><row><entry | 1133 | <informaltable><tgroup cols="1"><tbody><row><entry |
1132 | align="char"> | 1134 | align="char"> |
1133 | <para> int ioctl(int fd, int request = FE_GET_INFO, struct | 1135 | <para> int ioctl(int fd, int request = <link linkend="FE_GET_INFO">FE_GET_INFO</link>, struct |
1134 | dvb_frontend_info ⋆info);</para> | 1136 | dvb_frontend_info ⋆info);</para> |
1135 | </entry> | 1137 | </entry> |
1136 | </row></tbody></tgroup></informaltable> | 1138 | </row></tbody></tgroup></informaltable> |
@@ -1149,7 +1151,7 @@ modulation mode which can be one of the following: | |||
1149 | <para>int request</para> | 1151 | <para>int request</para> |
1150 | </entry><entry | 1152 | </entry><entry |
1151 | align="char"> | 1153 | align="char"> |
1152 | <para>Equals FE_GET_INFO for this command.</para> | 1154 | <para>Equals <link linkend="FE_GET_INFO">FE_GET_INFO</link> for this command.</para> |
1153 | </entry> | 1155 | </entry> |
1154 | </row><row><entry | 1156 | </row><row><entry |
1155 | align="char"> | 1157 | align="char"> |
@@ -1181,7 +1183,7 @@ modulation mode which can be one of the following: | |||
1181 | </row></tbody></tgroup></informaltable> | 1183 | </row></tbody></tgroup></informaltable> |
1182 | </section> | 1184 | </section> |
1183 | 1185 | ||
1184 | <section id="frontend_diseqc_reset_overload"> | 1186 | <section id="FE_DISEQC_RESET_OVERLOAD"> |
1185 | <title>FE_DISEQC_RESET_OVERLOAD</title> | 1187 | <title>FE_DISEQC_RESET_OVERLOAD</title> |
1186 | <para>DESCRIPTION | 1188 | <para>DESCRIPTION |
1187 | </para> | 1189 | </para> |
@@ -1199,7 +1201,7 @@ modulation mode which can be one of the following: | |||
1199 | <informaltable><tgroup cols="1"><tbody><row><entry | 1201 | <informaltable><tgroup cols="1"><tbody><row><entry |
1200 | align="char"> | 1202 | align="char"> |
1201 | <para>int ioctl(int fd, int request = | 1203 | <para>int ioctl(int fd, int request = |
1202 | FE_DISEQC_RESET_OVERLOAD);</para> | 1204 | <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link>);</para> |
1203 | </entry> | 1205 | </entry> |
1204 | </row></tbody></tgroup></informaltable> | 1206 | </row></tbody></tgroup></informaltable> |
1205 | <para>PARAMETERS | 1207 | <para>PARAMETERS |
@@ -1216,7 +1218,7 @@ modulation mode which can be one of the following: | |||
1216 | <para>int request</para> | 1218 | <para>int request</para> |
1217 | </entry><entry | 1219 | </entry><entry |
1218 | align="char"> | 1220 | align="char"> |
1219 | <para>Equals FE_DISEQC_RESET_OVERLOAD for this | 1221 | <para>Equals <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link> for this |
1220 | command.</para> | 1222 | command.</para> |
1221 | </entry> | 1223 | </entry> |
1222 | </row></tbody></tgroup></informaltable> | 1224 | </row></tbody></tgroup></informaltable> |
@@ -1247,7 +1249,7 @@ modulation mode which can be one of the following: | |||
1247 | </row></tbody></tgroup></informaltable> | 1249 | </row></tbody></tgroup></informaltable> |
1248 | </section> | 1250 | </section> |
1249 | 1251 | ||
1250 | <section id="frontend_diseqc_send_master_cmd"> | 1252 | <section id="FE_DISEQC_SEND_MASTER_CMD"> |
1251 | <title>FE_DISEQC_SEND_MASTER_CMD</title> | 1253 | <title>FE_DISEQC_SEND_MASTER_CMD</title> |
1252 | <para>DESCRIPTION | 1254 | <para>DESCRIPTION |
1253 | </para> | 1255 | </para> |
@@ -1261,7 +1263,7 @@ modulation mode which can be one of the following: | |||
1261 | <informaltable><tgroup cols="1"><tbody><row><entry | 1263 | <informaltable><tgroup cols="1"><tbody><row><entry |
1262 | align="char"> | 1264 | align="char"> |
1263 | <para>int ioctl(int fd, int request = | 1265 | <para>int ioctl(int fd, int request = |
1264 | FE_DISEQC_SEND_MASTER_CMD, struct | 1266 | <link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link>, struct |
1265 | dvb_diseqc_master_cmd ⋆cmd);</para> | 1267 | dvb_diseqc_master_cmd ⋆cmd);</para> |
1266 | </entry> | 1268 | </entry> |
1267 | </row></tbody></tgroup></informaltable> | 1269 | </row></tbody></tgroup></informaltable> |
@@ -1280,7 +1282,7 @@ modulation mode which can be one of the following: | |||
1280 | <para>int request</para> | 1282 | <para>int request</para> |
1281 | </entry><entry | 1283 | </entry><entry |
1282 | align="char"> | 1284 | align="char"> |
1283 | <para>Equals FE_DISEQC_SEND_MASTER_CMD for this | 1285 | <para>Equals <link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link> for this |
1284 | command.</para> | 1286 | command.</para> |
1285 | </entry> | 1287 | </entry> |
1286 | </row><row><entry | 1288 | </row><row><entry |
@@ -1335,7 +1337,7 @@ modulation mode which can be one of the following: | |||
1335 | </row></tbody></tgroup></informaltable> | 1337 | </row></tbody></tgroup></informaltable> |
1336 | </section> | 1338 | </section> |
1337 | 1339 | ||
1338 | <section id="frontend_diseqc_recv_slave_reply"> | 1340 | <section id="FE_DISEQC_RECV_SLAVE_REPLY"> |
1339 | <title>FE_DISEQC_RECV_SLAVE_REPLY</title> | 1341 | <title>FE_DISEQC_RECV_SLAVE_REPLY</title> |
1340 | <para>DESCRIPTION | 1342 | <para>DESCRIPTION |
1341 | </para> | 1343 | </para> |
@@ -1350,7 +1352,7 @@ modulation mode which can be one of the following: | |||
1350 | <informaltable><tgroup cols="1"><tbody><row><entry | 1352 | <informaltable><tgroup cols="1"><tbody><row><entry |
1351 | align="char"> | 1353 | align="char"> |
1352 | <para>int ioctl(int fd, int request = | 1354 | <para>int ioctl(int fd, int request = |
1353 | FE_DISEQC_RECV_SLAVE_REPLY, struct | 1355 | <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link>, struct |
1354 | dvb_diseqc_slave_reply ⋆reply);</para> | 1356 | dvb_diseqc_slave_reply ⋆reply);</para> |
1355 | </entry> | 1357 | </entry> |
1356 | </row></tbody></tgroup></informaltable> | 1358 | </row></tbody></tgroup></informaltable> |
@@ -1369,7 +1371,7 @@ modulation mode which can be one of the following: | |||
1369 | <para>int request</para> | 1371 | <para>int request</para> |
1370 | </entry><entry | 1372 | </entry><entry |
1371 | align="char"> | 1373 | align="char"> |
1372 | <para>Equals FE_DISEQC_RECV_SLAVE_REPLY for this | 1374 | <para>Equals <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link> for this |
1373 | command.</para> | 1375 | command.</para> |
1374 | </entry> | 1376 | </entry> |
1375 | </row><row><entry | 1377 | </row><row><entry |
@@ -1423,7 +1425,7 @@ modulation mode which can be one of the following: | |||
1423 | </row></tbody></tgroup></informaltable> | 1425 | </row></tbody></tgroup></informaltable> |
1424 | </section> | 1426 | </section> |
1425 | 1427 | ||
1426 | <section id="frontend_diseqc_send_burst"> | 1428 | <section id="FE_DISEQC_SEND_BURST"> |
1427 | <title>FE_DISEQC_SEND_BURST</title> | 1429 | <title>FE_DISEQC_SEND_BURST</title> |
1428 | <para>DESCRIPTION | 1430 | <para>DESCRIPTION |
1429 | </para> | 1431 | </para> |
@@ -1438,7 +1440,7 @@ modulation mode which can be one of the following: | |||
1438 | <informaltable><tgroup cols="1"><tbody><row><entry | 1440 | <informaltable><tgroup cols="1"><tbody><row><entry |
1439 | align="char"> | 1441 | align="char"> |
1440 | <para>int ioctl(int fd, int request = | 1442 | <para>int ioctl(int fd, int request = |
1441 | FE_DISEQC_SEND_BURST, fe_sec_mini_cmd_t burst);</para> | 1443 | <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link>, fe_sec_mini_cmd_t burst);</para> |
1442 | </entry> | 1444 | </entry> |
1443 | </row></tbody></tgroup></informaltable> | 1445 | </row></tbody></tgroup></informaltable> |
1444 | 1446 | ||
@@ -1456,7 +1458,7 @@ modulation mode which can be one of the following: | |||
1456 | <para>int request</para> | 1458 | <para>int request</para> |
1457 | </entry><entry | 1459 | </entry><entry |
1458 | align="char"> | 1460 | align="char"> |
1459 | <para>Equals FE_DISEQC_SEND_BURST for this command.</para> | 1461 | <para>Equals <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link> for this command.</para> |
1460 | </entry> | 1462 | </entry> |
1461 | </row><row><entry | 1463 | </row><row><entry |
1462 | align="char"> | 1464 | align="char"> |
@@ -1509,7 +1511,7 @@ modulation mode which can be one of the following: | |||
1509 | </row></tbody></tgroup></informaltable> | 1511 | </row></tbody></tgroup></informaltable> |
1510 | </section> | 1512 | </section> |
1511 | 1513 | ||
1512 | <section id="frontend_set_tone"> | 1514 | <section id="FE_SET_TONE"> |
1513 | <title>FE_SET_TONE</title> | 1515 | <title>FE_SET_TONE</title> |
1514 | <para>DESCRIPTION | 1516 | <para>DESCRIPTION |
1515 | </para> | 1517 | </para> |
@@ -1523,7 +1525,7 @@ modulation mode which can be one of the following: | |||
1523 | </para> | 1525 | </para> |
1524 | <informaltable><tgroup cols="1"><tbody><row><entry | 1526 | <informaltable><tgroup cols="1"><tbody><row><entry |
1525 | align="char"> | 1527 | align="char"> |
1526 | <para>int ioctl(int fd, int request = FE_SET_TONE, | 1528 | <para>int ioctl(int fd, int request = <link linkend="FE_SET_TONE">FE_SET_TONE</link>, |
1527 | fe_sec_tone_mode_t tone);</para> | 1529 | fe_sec_tone_mode_t tone);</para> |
1528 | </entry> | 1530 | </entry> |
1529 | </row></tbody></tgroup></informaltable> | 1531 | </row></tbody></tgroup></informaltable> |
@@ -1541,7 +1543,7 @@ modulation mode which can be one of the following: | |||
1541 | <para>int request</para> | 1543 | <para>int request</para> |
1542 | </entry><entry | 1544 | </entry><entry |
1543 | align="char"> | 1545 | align="char"> |
1544 | <para>Equals FE_SET_TONE for this command.</para> | 1546 | <para>Equals <link linkend="FE_SET_TONE">FE_SET_TONE</link> for this command.</para> |
1545 | </entry> | 1547 | </entry> |
1546 | </row><row><entry | 1548 | </row><row><entry |
1547 | align="char"> | 1549 | align="char"> |
@@ -1592,7 +1594,7 @@ modulation mode which can be one of the following: | |||
1592 | </row></tbody></tgroup></informaltable> | 1594 | </row></tbody></tgroup></informaltable> |
1593 | </section> | 1595 | </section> |
1594 | 1596 | ||
1595 | <section id="fe_set_voltage"> | 1597 | <section id="FE_SET_VOLTAGE"> |
1596 | <title>FE_SET_VOLTAGE</title> | 1598 | <title>FE_SET_VOLTAGE</title> |
1597 | <para>DESCRIPTION | 1599 | <para>DESCRIPTION |
1598 | </para> | 1600 | </para> |
@@ -1606,7 +1608,7 @@ modulation mode which can be one of the following: | |||
1606 | </para> | 1608 | </para> |
1607 | <informaltable><tgroup cols="1"><tbody><row><entry | 1609 | <informaltable><tgroup cols="1"><tbody><row><entry |
1608 | align="char"> | 1610 | align="char"> |
1609 | <para>int ioctl(int fd, int request = FE_SET_VOLTAGE, | 1611 | <para>int ioctl(int fd, int request = <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link>, |
1610 | fe_sec_voltage_t voltage);</para> | 1612 | fe_sec_voltage_t voltage);</para> |
1611 | </entry> | 1613 | </entry> |
1612 | </row></tbody></tgroup></informaltable> | 1614 | </row></tbody></tgroup></informaltable> |
@@ -1625,7 +1627,7 @@ modulation mode which can be one of the following: | |||
1625 | <para>int request</para> | 1627 | <para>int request</para> |
1626 | </entry><entry | 1628 | </entry><entry |
1627 | align="char"> | 1629 | align="char"> |
1628 | <para>Equals FE_SET_VOLTAGE for this command.</para> | 1630 | <para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para> |
1629 | </entry> | 1631 | </entry> |
1630 | </row><row><entry | 1632 | </row><row><entry |
1631 | align="char"> | 1633 | align="char"> |
@@ -1677,7 +1679,7 @@ modulation mode which can be one of the following: | |||
1677 | </row></tbody></tgroup></informaltable> | 1679 | </row></tbody></tgroup></informaltable> |
1678 | </section> | 1680 | </section> |
1679 | 1681 | ||
1680 | <section id="frontend_enable_high_lnb_volt"> | 1682 | <section id="FE_ENABLE_HIGH_LNB_VOLTAGE"> |
1681 | <title>FE_ENABLE_HIGH_LNB_VOLTAGE</title> | 1683 | <title>FE_ENABLE_HIGH_LNB_VOLTAGE</title> |
1682 | <para>DESCRIPTION | 1684 | <para>DESCRIPTION |
1683 | </para> | 1685 | </para> |
@@ -1694,7 +1696,7 @@ modulation mode which can be one of the following: | |||
1694 | <informaltable><tgroup cols="1"><tbody><row><entry | 1696 | <informaltable><tgroup cols="1"><tbody><row><entry |
1695 | align="char"> | 1697 | align="char"> |
1696 | <para>int ioctl(int fd, int request = | 1698 | <para>int ioctl(int fd, int request = |
1697 | FE_ENABLE_HIGH_LNB_VOLTAGE, int high);</para> | 1699 | <link linkend="FE_ENABLE_HIGH_LNB_VOLTAGE">FE_ENABLE_HIGH_LNB_VOLTAGE</link>, int high);</para> |
1698 | </entry> | 1700 | </entry> |
1699 | </row></tbody></tgroup></informaltable> | 1701 | </row></tbody></tgroup></informaltable> |
1700 | 1702 | ||
@@ -1712,7 +1714,7 @@ modulation mode which can be one of the following: | |||
1712 | <para>int request</para> | 1714 | <para>int request</para> |
1713 | </entry><entry | 1715 | </entry><entry |
1714 | align="char"> | 1716 | align="char"> |
1715 | <para>Equals FE_SET_VOLTAGE for this command.</para> | 1717 | <para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para> |
1716 | </entry> | 1718 | </entry> |
1717 | </row><row><entry | 1719 | </row><row><entry |
1718 | align="char"> | 1720 | align="char"> |
@@ -1762,5 +1764,82 @@ modulation mode which can be one of the following: | |||
1762 | </entry> | 1764 | </entry> |
1763 | </row></tbody></tgroup></informaltable> | 1765 | </row></tbody></tgroup></informaltable> |
1764 | </section> | 1766 | </section> |
1767 | |||
1768 | <section id="FE_SET_FRONTEND_TUNE_MODE"> | ||
1769 | <title>FE_SET_FRONTEND_TUNE_MODE</title> | ||
1770 | <para>DESCRIPTION</para> | ||
1771 | <informaltable><tgroup cols="1"><tbody><row> | ||
1772 | <entry align="char"> | ||
1773 | <para>Allow setting tuner mode flags to the frontend.</para> | ||
1774 | </entry> | ||
1775 | </row></tbody></tgroup></informaltable> | ||
1776 | |||
1777 | <para>SYNOPSIS</para> | ||
1778 | <informaltable><tgroup cols="1"><tbody><row> | ||
1779 | <entry align="char"> | ||
1780 | <para>int ioctl(int fd, int request = | ||
1781 | <link linkend="FE_SET_FRONTEND_TUNE_MODE">FE_SET_FRONTEND_TUNE_MODE</link>, unsigned int flags);</para> | ||
1782 | </entry> | ||
1783 | </row></tbody></tgroup></informaltable> | ||
1784 | |||
1785 | <para>PARAMETERS</para> | ||
1786 | <informaltable><tgroup cols="2"><tbody><row> | ||
1787 | <entry align="char"> | ||
1788 | <para>unsigned int flags</para> | ||
1789 | </entry> | ||
1790 | <entry align="char"> | ||
1791 | <para> | ||
1792 | FE_TUNE_MODE_ONESHOT When set, this flag will disable any zigzagging or other "normal" tuning behaviour. Additionally, there will be no automatic monitoring of the lock status, and hence no frontend events will be generated. If a frontend device is closed, this flag will be automatically turned off when the device is reopened read-write. | ||
1793 | </para> | ||
1794 | </entry> | ||
1795 | </row></tbody></tgroup></informaltable> | ||
1796 | |||
1797 | <para>ERRORS</para> | ||
1798 | <informaltable><tgroup cols="2"><tbody><row> | ||
1799 | <entry align="char"><para>EINVAL</para></entry> | ||
1800 | <entry align="char"><para>Invalid argument.</para></entry> | ||
1801 | </row></tbody></tgroup></informaltable> | ||
1765 | </section> | 1802 | </section> |
1766 | &sub-isdbt; | 1803 | |
1804 | <section id="FE_DISHNETWORK_SEND_LEGACY_CMD"> | ||
1805 | <title>FE_DISHNETWORK_SEND_LEGACY_CMD</title> | ||
1806 | <para>DESCRIPTION</para> | ||
1807 | <informaltable><tgroup cols="1"><tbody><row> | ||
1808 | <entry align="char"> | ||
1809 | <para>WARNING: This is a very obscure legacy command, used only at stv0299 driver. Should not be used on newer drivers.</para> | ||
1810 | <para>It provides a non-standard method for selecting Diseqc voltage on the frontend, for Dish Network legacy switches.</para> | ||
1811 | <para>As support for this ioctl were added in 2004, this means that such dishes were already legacy in 2004.</para> | ||
1812 | </entry> | ||
1813 | </row></tbody></tgroup></informaltable> | ||
1814 | |||
1815 | <para>SYNOPSIS</para> | ||
1816 | <informaltable><tgroup cols="1"><tbody><row> | ||
1817 | <entry align="char"> | ||
1818 | <para>int ioctl(int fd, int request = | ||
1819 | <link linkend="FE_DISHNETWORK_SEND_LEGACY_CMD">FE_DISHNETWORK_SEND_LEGACY_CMD</link>, unsigned long cmd);</para> | ||
1820 | </entry> | ||
1821 | </row></tbody></tgroup></informaltable> | ||
1822 | |||
1823 | <para>PARAMETERS</para> | ||
1824 | <informaltable><tgroup cols="2"><tbody><row> | ||
1825 | <entry align="char"> | ||
1826 | <para>unsigned long cmd</para> | ||
1827 | </entry> | ||
1828 | <entry align="char"> | ||
1829 | <para> | ||
1830 | sends the specified raw cmd to the dish via DISEqC. | ||
1831 | </para> | ||
1832 | </entry> | ||
1833 | </row></tbody></tgroup></informaltable> | ||
1834 | |||
1835 | <para>ERRORS</para> | ||
1836 | <informaltable><tgroup cols="1"><tbody><row> | ||
1837 | <entry align="char"> | ||
1838 | <para>There are no errors in use for this call</para> | ||
1839 | </entry> | ||
1840 | </row></tbody></tgroup></informaltable> | ||
1841 | </section> | ||
1842 | |||
1843 | </section> | ||
1844 | |||
1845 | &sub-dvbproperty; | ||
diff --git a/Documentation/DocBook/genericirq.tmpl b/Documentation/DocBook/genericirq.tmpl index c671a0168096..1448b33fd222 100644 --- a/Documentation/DocBook/genericirq.tmpl +++ b/Documentation/DocBook/genericirq.tmpl | |||
@@ -417,8 +417,8 @@ desc->chip->end(); | |||
417 | </para> | 417 | </para> |
418 | <para> | 418 | <para> |
419 | To make use of the split implementation, replace the call to | 419 | To make use of the split implementation, replace the call to |
420 | __do_IRQ by a call to desc->chip->handle_irq() and associate | 420 | __do_IRQ by a call to desc->handle_irq() and associate |
421 | the appropriate handler function to desc->chip->handle_irq(). | 421 | the appropriate handler function to desc->handle_irq(). |
422 | In most cases the generic handler implementations should | 422 | In most cases the generic handler implementations should |
423 | be sufficient. | 423 | be sufficient. |
424 | </para> | 424 | </para> |
diff --git a/Documentation/DocBook/kernel-hacking.tmpl b/Documentation/DocBook/kernel-hacking.tmpl index 992e67e6be7f..7b3f49363413 100644 --- a/Documentation/DocBook/kernel-hacking.tmpl +++ b/Documentation/DocBook/kernel-hacking.tmpl | |||
@@ -352,7 +352,7 @@ asmlinkage long sys_mycall(int arg) | |||
352 | </para> | 352 | </para> |
353 | 353 | ||
354 | <programlisting> | 354 | <programlisting> |
355 | if (signal_pending()) | 355 | if (signal_pending(current)) |
356 | return -ERESTARTSYS; | 356 | return -ERESTARTSYS; |
357 | </programlisting> | 357 | </programlisting> |
358 | 358 | ||
diff --git a/Documentation/DocBook/media-entities.tmpl b/Documentation/DocBook/media-entities.tmpl index 0eb43c1970bb..c725cb852c54 100644 --- a/Documentation/DocBook/media-entities.tmpl +++ b/Documentation/DocBook/media-entities.tmpl | |||
@@ -23,6 +23,7 @@ | |||
23 | <!ENTITY VIDIOC-ENUMINPUT "<link linkend='vidioc-enuminput'><constant>VIDIOC_ENUMINPUT</constant></link>"> | 23 | <!ENTITY VIDIOC-ENUMINPUT "<link linkend='vidioc-enuminput'><constant>VIDIOC_ENUMINPUT</constant></link>"> |
24 | <!ENTITY VIDIOC-ENUMOUTPUT "<link linkend='vidioc-enumoutput'><constant>VIDIOC_ENUMOUTPUT</constant></link>"> | 24 | <!ENTITY VIDIOC-ENUMOUTPUT "<link linkend='vidioc-enumoutput'><constant>VIDIOC_ENUMOUTPUT</constant></link>"> |
25 | <!ENTITY VIDIOC-ENUMSTD "<link linkend='vidioc-enumstd'><constant>VIDIOC_ENUMSTD</constant></link>"> | 25 | <!ENTITY VIDIOC-ENUMSTD "<link linkend='vidioc-enumstd'><constant>VIDIOC_ENUMSTD</constant></link>"> |
26 | <!ENTITY VIDIOC-ENUM-DV-PRESETS "<link linkend='vidioc-enum-dv-presets'><constant>VIDIOC_ENUM_DV_PRESETS</constant></link>"> | ||
26 | <!ENTITY VIDIOC-ENUM-FMT "<link linkend='vidioc-enum-fmt'><constant>VIDIOC_ENUM_FMT</constant></link>"> | 27 | <!ENTITY VIDIOC-ENUM-FMT "<link linkend='vidioc-enum-fmt'><constant>VIDIOC_ENUM_FMT</constant></link>"> |
27 | <!ENTITY VIDIOC-ENUM-FRAMEINTERVALS "<link linkend='vidioc-enum-frameintervals'><constant>VIDIOC_ENUM_FRAMEINTERVALS</constant></link>"> | 28 | <!ENTITY VIDIOC-ENUM-FRAMEINTERVALS "<link linkend='vidioc-enum-frameintervals'><constant>VIDIOC_ENUM_FRAMEINTERVALS</constant></link>"> |
28 | <!ENTITY VIDIOC-ENUM-FRAMESIZES "<link linkend='vidioc-enum-framesizes'><constant>VIDIOC_ENUM_FRAMESIZES</constant></link>"> | 29 | <!ENTITY VIDIOC-ENUM-FRAMESIZES "<link linkend='vidioc-enum-framesizes'><constant>VIDIOC_ENUM_FRAMESIZES</constant></link>"> |
@@ -30,6 +31,8 @@ | |||
30 | <!ENTITY VIDIOC-G-AUDOUT "<link linkend='vidioc-g-audioout'><constant>VIDIOC_G_AUDOUT</constant></link>"> | 31 | <!ENTITY VIDIOC-G-AUDOUT "<link linkend='vidioc-g-audioout'><constant>VIDIOC_G_AUDOUT</constant></link>"> |
31 | <!ENTITY VIDIOC-G-CROP "<link linkend='vidioc-g-crop'><constant>VIDIOC_G_CROP</constant></link>"> | 32 | <!ENTITY VIDIOC-G-CROP "<link linkend='vidioc-g-crop'><constant>VIDIOC_G_CROP</constant></link>"> |
32 | <!ENTITY VIDIOC-G-CTRL "<link linkend='vidioc-g-ctrl'><constant>VIDIOC_G_CTRL</constant></link>"> | 33 | <!ENTITY VIDIOC-G-CTRL "<link linkend='vidioc-g-ctrl'><constant>VIDIOC_G_CTRL</constant></link>"> |
34 | <!ENTITY VIDIOC-G-DV-PRESET "<link linkend='vidioc-g-dv-preset'><constant>VIDIOC_G_DV_PRESET</constant></link>"> | ||
35 | <!ENTITY VIDIOC-G-DV-TIMINGS "<link linkend='vidioc-g-dv-timings'><constant>VIDIOC_G_DV_TIMINGS</constant></link>"> | ||
33 | <!ENTITY VIDIOC-G-ENC-INDEX "<link linkend='vidioc-g-enc-index'><constant>VIDIOC_G_ENC_INDEX</constant></link>"> | 36 | <!ENTITY VIDIOC-G-ENC-INDEX "<link linkend='vidioc-g-enc-index'><constant>VIDIOC_G_ENC_INDEX</constant></link>"> |
34 | <!ENTITY VIDIOC-G-EXT-CTRLS "<link linkend='vidioc-g-ext-ctrls'><constant>VIDIOC_G_EXT_CTRLS</constant></link>"> | 37 | <!ENTITY VIDIOC-G-EXT-CTRLS "<link linkend='vidioc-g-ext-ctrls'><constant>VIDIOC_G_EXT_CTRLS</constant></link>"> |
35 | <!ENTITY VIDIOC-G-FBUF "<link linkend='vidioc-g-fbuf'><constant>VIDIOC_G_FBUF</constant></link>"> | 38 | <!ENTITY VIDIOC-G-FBUF "<link linkend='vidioc-g-fbuf'><constant>VIDIOC_G_FBUF</constant></link>"> |
@@ -53,6 +56,7 @@ | |||
53 | <!ENTITY VIDIOC-QUERYCTRL "<link linkend='vidioc-queryctrl'><constant>VIDIOC_QUERYCTRL</constant></link>"> | 56 | <!ENTITY VIDIOC-QUERYCTRL "<link linkend='vidioc-queryctrl'><constant>VIDIOC_QUERYCTRL</constant></link>"> |
54 | <!ENTITY VIDIOC-QUERYMENU "<link linkend='vidioc-queryctrl'><constant>VIDIOC_QUERYMENU</constant></link>"> | 57 | <!ENTITY VIDIOC-QUERYMENU "<link linkend='vidioc-queryctrl'><constant>VIDIOC_QUERYMENU</constant></link>"> |
55 | <!ENTITY VIDIOC-QUERYSTD "<link linkend='vidioc-querystd'><constant>VIDIOC_QUERYSTD</constant></link>"> | 58 | <!ENTITY VIDIOC-QUERYSTD "<link linkend='vidioc-querystd'><constant>VIDIOC_QUERYSTD</constant></link>"> |
59 | <!ENTITY VIDIOC-QUERY-DV-PRESET "<link linkend='vidioc-query-dv-preset'><constant>VIDIOC_QUERY_DV_PRESET</constant></link>"> | ||
56 | <!ENTITY VIDIOC-REQBUFS "<link linkend='vidioc-reqbufs'><constant>VIDIOC_REQBUFS</constant></link>"> | 60 | <!ENTITY VIDIOC-REQBUFS "<link linkend='vidioc-reqbufs'><constant>VIDIOC_REQBUFS</constant></link>"> |
57 | <!ENTITY VIDIOC-STREAMOFF "<link linkend='vidioc-streamon'><constant>VIDIOC_STREAMOFF</constant></link>"> | 61 | <!ENTITY VIDIOC-STREAMOFF "<link linkend='vidioc-streamon'><constant>VIDIOC_STREAMOFF</constant></link>"> |
58 | <!ENTITY VIDIOC-STREAMON "<link linkend='vidioc-streamon'><constant>VIDIOC_STREAMON</constant></link>"> | 62 | <!ENTITY VIDIOC-STREAMON "<link linkend='vidioc-streamon'><constant>VIDIOC_STREAMON</constant></link>"> |
@@ -60,6 +64,8 @@ | |||
60 | <!ENTITY VIDIOC-S-AUDOUT "<link linkend='vidioc-g-audioout'><constant>VIDIOC_S_AUDOUT</constant></link>"> | 64 | <!ENTITY VIDIOC-S-AUDOUT "<link linkend='vidioc-g-audioout'><constant>VIDIOC_S_AUDOUT</constant></link>"> |
61 | <!ENTITY VIDIOC-S-CROP "<link linkend='vidioc-g-crop'><constant>VIDIOC_S_CROP</constant></link>"> | 65 | <!ENTITY VIDIOC-S-CROP "<link linkend='vidioc-g-crop'><constant>VIDIOC_S_CROP</constant></link>"> |
62 | <!ENTITY VIDIOC-S-CTRL "<link linkend='vidioc-g-ctrl'><constant>VIDIOC_S_CTRL</constant></link>"> | 66 | <!ENTITY VIDIOC-S-CTRL "<link linkend='vidioc-g-ctrl'><constant>VIDIOC_S_CTRL</constant></link>"> |
67 | <!ENTITY VIDIOC-S-DV-PRESET "<link linkend='vidioc-g-dv-preset'><constant>VIDIOC_S_DV_PRESET</constant></link>"> | ||
68 | <!ENTITY VIDIOC-S-DV-TIMINGS "<link linkend='vidioc-g-dv-timings'><constant>VIDIOC_S_DV_TIMINGS</constant></link>"> | ||
63 | <!ENTITY VIDIOC-S-EXT-CTRLS "<link linkend='vidioc-g-ext-ctrls'><constant>VIDIOC_S_EXT_CTRLS</constant></link>"> | 69 | <!ENTITY VIDIOC-S-EXT-CTRLS "<link linkend='vidioc-g-ext-ctrls'><constant>VIDIOC_S_EXT_CTRLS</constant></link>"> |
64 | <!ENTITY VIDIOC-S-FBUF "<link linkend='vidioc-g-fbuf'><constant>VIDIOC_S_FBUF</constant></link>"> | 70 | <!ENTITY VIDIOC-S-FBUF "<link linkend='vidioc-g-fbuf'><constant>VIDIOC_S_FBUF</constant></link>"> |
65 | <!ENTITY VIDIOC-S-FMT "<link linkend='vidioc-g-fmt'><constant>VIDIOC_S_FMT</constant></link>"> | 71 | <!ENTITY VIDIOC-S-FMT "<link linkend='vidioc-g-fmt'><constant>VIDIOC_S_FMT</constant></link>"> |
@@ -118,6 +124,7 @@ | |||
118 | <!-- Structures --> | 124 | <!-- Structures --> |
119 | <!ENTITY v4l2-audio "struct <link linkend='v4l2-audio'>v4l2_audio</link>"> | 125 | <!ENTITY v4l2-audio "struct <link linkend='v4l2-audio'>v4l2_audio</link>"> |
120 | <!ENTITY v4l2-audioout "struct <link linkend='v4l2-audioout'>v4l2_audioout</link>"> | 126 | <!ENTITY v4l2-audioout "struct <link linkend='v4l2-audioout'>v4l2_audioout</link>"> |
127 | <!ENTITY v4l2-bt-timings "struct <link linkend='v4l2-bt-timings'>v4l2_bt_timings</link>"> | ||
121 | <!ENTITY v4l2-buffer "struct <link linkend='v4l2-buffer'>v4l2_buffer</link>"> | 128 | <!ENTITY v4l2-buffer "struct <link linkend='v4l2-buffer'>v4l2_buffer</link>"> |
122 | <!ENTITY v4l2-capability "struct <link linkend='v4l2-capability'>v4l2_capability</link>"> | 129 | <!ENTITY v4l2-capability "struct <link linkend='v4l2-capability'>v4l2_capability</link>"> |
123 | <!ENTITY v4l2-captureparm "struct <link linkend='v4l2-captureparm'>v4l2_captureparm</link>"> | 130 | <!ENTITY v4l2-captureparm "struct <link linkend='v4l2-captureparm'>v4l2_captureparm</link>"> |
@@ -128,6 +135,9 @@ | |||
128 | <!ENTITY v4l2-dbg-chip-ident "struct <link linkend='v4l2-dbg-chip-ident'>v4l2_dbg_chip_ident</link>"> | 135 | <!ENTITY v4l2-dbg-chip-ident "struct <link linkend='v4l2-dbg-chip-ident'>v4l2_dbg_chip_ident</link>"> |
129 | <!ENTITY v4l2-dbg-match "struct <link linkend='v4l2-dbg-match'>v4l2_dbg_match</link>"> | 136 | <!ENTITY v4l2-dbg-match "struct <link linkend='v4l2-dbg-match'>v4l2_dbg_match</link>"> |
130 | <!ENTITY v4l2-dbg-register "struct <link linkend='v4l2-dbg-register'>v4l2_dbg_register</link>"> | 137 | <!ENTITY v4l2-dbg-register "struct <link linkend='v4l2-dbg-register'>v4l2_dbg_register</link>"> |
138 | <!ENTITY v4l2-dv-enum-preset "struct <link linkend='v4l2-dv-enum-preset'>v4l2_dv_enum_preset</link>"> | ||
139 | <!ENTITY v4l2-dv-preset "struct <link linkend='v4l2-dv-preset'>v4l2_dv_preset</link>"> | ||
140 | <!ENTITY v4l2-dv-timings "struct <link linkend='v4l2-dv-timings'>v4l2_dv_timings</link>"> | ||
131 | <!ENTITY v4l2-enc-idx "struct <link linkend='v4l2-enc-idx'>v4l2_enc_idx</link>"> | 141 | <!ENTITY v4l2-enc-idx "struct <link linkend='v4l2-enc-idx'>v4l2_enc_idx</link>"> |
132 | <!ENTITY v4l2-enc-idx-entry "struct <link linkend='v4l2-enc-idx-entry'>v4l2_enc_idx_entry</link>"> | 142 | <!ENTITY v4l2-enc-idx-entry "struct <link linkend='v4l2-enc-idx-entry'>v4l2_enc_idx_entry</link>"> |
133 | <!ENTITY v4l2-encoder-cmd "struct <link linkend='v4l2-encoder-cmd'>v4l2_encoder_cmd</link>"> | 143 | <!ENTITY v4l2-encoder-cmd "struct <link linkend='v4l2-encoder-cmd'>v4l2_encoder_cmd</link>"> |
@@ -243,6 +253,10 @@ | |||
243 | <!ENTITY sub-enumaudioout SYSTEM "v4l/vidioc-enumaudioout.xml"> | 253 | <!ENTITY sub-enumaudioout SYSTEM "v4l/vidioc-enumaudioout.xml"> |
244 | <!ENTITY sub-enuminput SYSTEM "v4l/vidioc-enuminput.xml"> | 254 | <!ENTITY sub-enuminput SYSTEM "v4l/vidioc-enuminput.xml"> |
245 | <!ENTITY sub-enumoutput SYSTEM "v4l/vidioc-enumoutput.xml"> | 255 | <!ENTITY sub-enumoutput SYSTEM "v4l/vidioc-enumoutput.xml"> |
256 | <!ENTITY sub-enum-dv-presets SYSTEM "v4l/vidioc-enum-dv-presets.xml"> | ||
257 | <!ENTITY sub-g-dv-preset SYSTEM "v4l/vidioc-g-dv-preset.xml"> | ||
258 | <!ENTITY sub-query-dv-preset SYSTEM "v4l/vidioc-query-dv-preset.xml"> | ||
259 | <!ENTITY sub-g-dv-timings SYSTEM "v4l/vidioc-g-dv-timings.xml"> | ||
246 | <!ENTITY sub-enumstd SYSTEM "v4l/vidioc-enumstd.xml"> | 260 | <!ENTITY sub-enumstd SYSTEM "v4l/vidioc-enumstd.xml"> |
247 | <!ENTITY sub-g-audio SYSTEM "v4l/vidioc-g-audio.xml"> | 261 | <!ENTITY sub-g-audio SYSTEM "v4l/vidioc-g-audio.xml"> |
248 | <!ENTITY sub-g-audioout SYSTEM "v4l/vidioc-g-audioout.xml"> | 262 | <!ENTITY sub-g-audioout SYSTEM "v4l/vidioc-g-audioout.xml"> |
@@ -280,7 +294,7 @@ | |||
280 | <!ENTITY sub-v4l2 SYSTEM "v4l/v4l2.xml"> | 294 | <!ENTITY sub-v4l2 SYSTEM "v4l/v4l2.xml"> |
281 | <!ENTITY sub-intro SYSTEM "dvb/intro.xml"> | 295 | <!ENTITY sub-intro SYSTEM "dvb/intro.xml"> |
282 | <!ENTITY sub-frontend SYSTEM "dvb/frontend.xml"> | 296 | <!ENTITY sub-frontend SYSTEM "dvb/frontend.xml"> |
283 | <!ENTITY sub-isdbt SYSTEM "dvb/isdbt.xml"> | 297 | <!ENTITY sub-dvbproperty SYSTEM "dvb/dvbproperty.xml"> |
284 | <!ENTITY sub-demux SYSTEM "dvb/demux.xml"> | 298 | <!ENTITY sub-demux SYSTEM "dvb/demux.xml"> |
285 | <!ENTITY sub-video SYSTEM "dvb/video.xml"> | 299 | <!ENTITY sub-video SYSTEM "dvb/video.xml"> |
286 | <!ENTITY sub-audio SYSTEM "dvb/audio.xml"> | 300 | <!ENTITY sub-audio SYSTEM "dvb/audio.xml"> |
@@ -288,6 +302,7 @@ | |||
288 | <!ENTITY sub-net SYSTEM "dvb/net.xml"> | 302 | <!ENTITY sub-net SYSTEM "dvb/net.xml"> |
289 | <!ENTITY sub-kdapi SYSTEM "dvb/kdapi.xml"> | 303 | <!ENTITY sub-kdapi SYSTEM "dvb/kdapi.xml"> |
290 | <!ENTITY sub-examples SYSTEM "dvb/examples.xml"> | 304 | <!ENTITY sub-examples SYSTEM "dvb/examples.xml"> |
305 | <!ENTITY sub-frontend-h SYSTEM "dvb/frontend.h.xml"> | ||
291 | <!ENTITY sub-dvbapi SYSTEM "dvb/dvbapi.xml"> | 306 | <!ENTITY sub-dvbapi SYSTEM "dvb/dvbapi.xml"> |
292 | <!ENTITY sub-media SYSTEM "media.xml"> | 307 | <!ENTITY sub-media SYSTEM "media.xml"> |
293 | <!ENTITY sub-media-entities SYSTEM "media-entities.tmpl"> | 308 | <!ENTITY sub-media-entities SYSTEM "media-entities.tmpl"> |
@@ -332,6 +347,10 @@ | |||
332 | <!ENTITY enumaudioout SYSTEM "v4l/vidioc-enumaudioout.xml"> | 347 | <!ENTITY enumaudioout SYSTEM "v4l/vidioc-enumaudioout.xml"> |
333 | <!ENTITY enuminput SYSTEM "v4l/vidioc-enuminput.xml"> | 348 | <!ENTITY enuminput SYSTEM "v4l/vidioc-enuminput.xml"> |
334 | <!ENTITY enumoutput SYSTEM "v4l/vidioc-enumoutput.xml"> | 349 | <!ENTITY enumoutput SYSTEM "v4l/vidioc-enumoutput.xml"> |
350 | <!ENTITY enum-dv-presets SYSTEM "v4l/vidioc-enum-dv-presets.xml"> | ||
351 | <!ENTITY g-dv-preset SYSTEM "v4l/vidioc-g-dv-preset.xml"> | ||
352 | <!ENTITY query-dv-preset SYSTEM "v4l/vidioc-query-dv-preset.xml"> | ||
353 | <!ENTITY g-dv-timings SYSTEM "v4l/vidioc-g-dv-timings.xml"> | ||
335 | <!ENTITY enumstd SYSTEM "v4l/vidioc-enumstd.xml"> | 354 | <!ENTITY enumstd SYSTEM "v4l/vidioc-enumstd.xml"> |
336 | <!ENTITY g-audio SYSTEM "v4l/vidioc-g-audio.xml"> | 355 | <!ENTITY g-audio SYSTEM "v4l/vidioc-g-audio.xml"> |
337 | <!ENTITY g-audioout SYSTEM "v4l/vidioc-g-audioout.xml"> | 356 | <!ENTITY g-audioout SYSTEM "v4l/vidioc-g-audioout.xml"> |
diff --git a/Documentation/DocBook/media-indices.tmpl b/Documentation/DocBook/media-indices.tmpl index 9e30a236d74f..78d6031de001 100644 --- a/Documentation/DocBook/media-indices.tmpl +++ b/Documentation/DocBook/media-indices.tmpl | |||
@@ -36,6 +36,7 @@ | |||
36 | <indexentry><primaryie>enum <link linkend='v4l2-preemphasis'>v4l2_preemphasis</link></primaryie></indexentry> | 36 | <indexentry><primaryie>enum <link linkend='v4l2-preemphasis'>v4l2_preemphasis</link></primaryie></indexentry> |
37 | <indexentry><primaryie>struct <link linkend='v4l2-audio'>v4l2_audio</link></primaryie></indexentry> | 37 | <indexentry><primaryie>struct <link linkend='v4l2-audio'>v4l2_audio</link></primaryie></indexentry> |
38 | <indexentry><primaryie>struct <link linkend='v4l2-audioout'>v4l2_audioout</link></primaryie></indexentry> | 38 | <indexentry><primaryie>struct <link linkend='v4l2-audioout'>v4l2_audioout</link></primaryie></indexentry> |
39 | <indexentry><primaryie>struct <link linkend='v4l2-bt-timings'>v4l2_bt_timings</link></primaryie></indexentry> | ||
39 | <indexentry><primaryie>struct <link linkend='v4l2-buffer'>v4l2_buffer</link></primaryie></indexentry> | 40 | <indexentry><primaryie>struct <link linkend='v4l2-buffer'>v4l2_buffer</link></primaryie></indexentry> |
40 | <indexentry><primaryie>struct <link linkend='v4l2-capability'>v4l2_capability</link></primaryie></indexentry> | 41 | <indexentry><primaryie>struct <link linkend='v4l2-capability'>v4l2_capability</link></primaryie></indexentry> |
41 | <indexentry><primaryie>struct <link linkend='v4l2-captureparm'>v4l2_captureparm</link></primaryie></indexentry> | 42 | <indexentry><primaryie>struct <link linkend='v4l2-captureparm'>v4l2_captureparm</link></primaryie></indexentry> |
@@ -46,6 +47,9 @@ | |||
46 | <indexentry><primaryie>struct <link linkend='v4l2-dbg-chip-ident'>v4l2_dbg_chip_ident</link></primaryie></indexentry> | 47 | <indexentry><primaryie>struct <link linkend='v4l2-dbg-chip-ident'>v4l2_dbg_chip_ident</link></primaryie></indexentry> |
47 | <indexentry><primaryie>struct <link linkend='v4l2-dbg-match'>v4l2_dbg_match</link></primaryie></indexentry> | 48 | <indexentry><primaryie>struct <link linkend='v4l2-dbg-match'>v4l2_dbg_match</link></primaryie></indexentry> |
48 | <indexentry><primaryie>struct <link linkend='v4l2-dbg-register'>v4l2_dbg_register</link></primaryie></indexentry> | 49 | <indexentry><primaryie>struct <link linkend='v4l2-dbg-register'>v4l2_dbg_register</link></primaryie></indexentry> |
50 | <indexentry><primaryie>struct <link linkend='v4l2-dv-enum-preset'>v4l2_dv_enum_preset</link></primaryie></indexentry> | ||
51 | <indexentry><primaryie>struct <link linkend='v4l2-dv-preset'>v4l2_dv_preset</link></primaryie></indexentry> | ||
52 | <indexentry><primaryie>struct <link linkend='v4l2-dv-timings'>v4l2_dv_timings</link></primaryie></indexentry> | ||
49 | <indexentry><primaryie>struct <link linkend='v4l2-enc-idx'>v4l2_enc_idx</link></primaryie></indexentry> | 53 | <indexentry><primaryie>struct <link linkend='v4l2-enc-idx'>v4l2_enc_idx</link></primaryie></indexentry> |
50 | <indexentry><primaryie>struct <link linkend='v4l2-enc-idx-entry'>v4l2_enc_idx_entry</link></primaryie></indexentry> | 54 | <indexentry><primaryie>struct <link linkend='v4l2-enc-idx-entry'>v4l2_enc_idx_entry</link></primaryie></indexentry> |
51 | <indexentry><primaryie>struct <link linkend='v4l2-encoder-cmd'>v4l2_encoder_cmd</link></primaryie></indexentry> | 55 | <indexentry><primaryie>struct <link linkend='v4l2-encoder-cmd'>v4l2_encoder_cmd</link></primaryie></indexentry> |
diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl index df0d089d0fb9..f508a8a27fea 100644 --- a/Documentation/DocBook/mtdnand.tmpl +++ b/Documentation/DocBook/mtdnand.tmpl | |||
@@ -362,7 +362,7 @@ module_exit(board_cleanup); | |||
362 | <sect1 id="Multiple_chip_control"> | 362 | <sect1 id="Multiple_chip_control"> |
363 | <title>Multiple chip control</title> | 363 | <title>Multiple chip control</title> |
364 | <para> | 364 | <para> |
365 | The nand driver can control chip arrays. Therefor the | 365 | The nand driver can control chip arrays. Therefore the |
366 | board driver must provide an own select_chip function. This | 366 | board driver must provide an own select_chip function. This |
367 | function must (de)select the requested chip. | 367 | function must (de)select the requested chip. |
368 | The function pointer in the nand_chip structure must | 368 | The function pointer in the nand_chip structure must |
diff --git a/Documentation/DocBook/procfs-guide.tmpl b/Documentation/DocBook/procfs-guide.tmpl deleted file mode 100644 index 9eba4b7af73d..000000000000 --- a/Documentation/DocBook/procfs-guide.tmpl +++ /dev/null | |||
@@ -1,626 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" | ||
3 | "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ | ||
4 | <!ENTITY procfsexample SYSTEM "procfs_example.xml"> | ||
5 | ]> | ||
6 | |||
7 | <book id="LKProcfsGuide"> | ||
8 | <bookinfo> | ||
9 | <title>Linux Kernel Procfs Guide</title> | ||
10 | |||
11 | <authorgroup> | ||
12 | <author> | ||
13 | <firstname>Erik</firstname> | ||
14 | <othername>(J.A.K.)</othername> | ||
15 | <surname>Mouw</surname> | ||
16 | <affiliation> | ||
17 | <address> | ||
18 | <email>mouw@nl.linux.org</email> | ||
19 | </address> | ||
20 | </affiliation> | ||
21 | </author> | ||
22 | <othercredit> | ||
23 | <contrib> | ||
24 | This software and documentation were written while working on the | ||
25 | LART computing board | ||
26 | (<ulink url="http://www.lartmaker.nl/">http://www.lartmaker.nl/</ulink>), | ||
27 | which was sponsored by the Delt University of Technology projects | ||
28 | Mobile Multi-media Communications and Ubiquitous Communications. | ||
29 | </contrib> | ||
30 | </othercredit> | ||
31 | </authorgroup> | ||
32 | |||
33 | <revhistory> | ||
34 | <revision> | ||
35 | <revnumber>1.0</revnumber> | ||
36 | <date>May 30, 2001</date> | ||
37 | <revremark>Initial revision posted to linux-kernel</revremark> | ||
38 | </revision> | ||
39 | <revision> | ||
40 | <revnumber>1.1</revnumber> | ||
41 | <date>June 3, 2001</date> | ||
42 | <revremark>Revised after comments from linux-kernel</revremark> | ||
43 | </revision> | ||
44 | </revhistory> | ||
45 | |||
46 | <copyright> | ||
47 | <year>2001</year> | ||
48 | <holder>Erik Mouw</holder> | ||
49 | </copyright> | ||
50 | |||
51 | |||
52 | <legalnotice> | ||
53 | <para> | ||
54 | This documentation is free software; you can redistribute it | ||
55 | and/or modify it under the terms of the GNU General Public | ||
56 | License as published by the Free Software Foundation; either | ||
57 | version 2 of the License, or (at your option) any later | ||
58 | version. | ||
59 | </para> | ||
60 | |||
61 | <para> | ||
62 | This documentation is distributed in the hope that it will be | ||
63 | useful, but WITHOUT ANY WARRANTY; without even the implied | ||
64 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | ||
65 | PURPOSE. See the GNU General Public License for more details. | ||
66 | </para> | ||
67 | |||
68 | <para> | ||
69 | You should have received a copy of the GNU General Public | ||
70 | License along with this program; if not, write to the Free | ||
71 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
72 | MA 02111-1307 USA | ||
73 | </para> | ||
74 | |||
75 | <para> | ||
76 | For more details see the file COPYING in the source | ||
77 | distribution of Linux. | ||
78 | </para> | ||
79 | </legalnotice> | ||
80 | </bookinfo> | ||
81 | |||
82 | |||
83 | |||
84 | |||
85 | <toc> | ||
86 | </toc> | ||
87 | |||
88 | |||
89 | |||
90 | |||
91 | <preface id="Preface"> | ||
92 | <title>Preface</title> | ||
93 | |||
94 | <para> | ||
95 | This guide describes the use of the procfs file system from | ||
96 | within the Linux kernel. The idea to write this guide came up on | ||
97 | the #kernelnewbies IRC channel (see <ulink | ||
98 | url="http://www.kernelnewbies.org/">http://www.kernelnewbies.org/</ulink>), | ||
99 | when Jeff Garzik explained the use of procfs and forwarded me a | ||
100 | message Alexander Viro wrote to the linux-kernel mailing list. I | ||
101 | agreed to write it up nicely, so here it is. | ||
102 | </para> | ||
103 | |||
104 | <para> | ||
105 | I'd like to thank Jeff Garzik | ||
106 | <email>jgarzik@pobox.com</email> and Alexander Viro | ||
107 | <email>viro@parcelfarce.linux.theplanet.co.uk</email> for their input, | ||
108 | Tim Waugh <email>twaugh@redhat.com</email> for his <ulink | ||
109 | url="http://people.redhat.com/twaugh/docbook/selfdocbook/">Selfdocbook</ulink>, | ||
110 | and Marc Joosen <email>marcj@historia.et.tudelft.nl</email> for | ||
111 | proofreading. | ||
112 | </para> | ||
113 | |||
114 | <para> | ||
115 | Erik | ||
116 | </para> | ||
117 | </preface> | ||
118 | |||
119 | |||
120 | |||
121 | |||
122 | <chapter id="intro"> | ||
123 | <title>Introduction</title> | ||
124 | |||
125 | <para> | ||
126 | The <filename class="directory">/proc</filename> file system | ||
127 | (procfs) is a special file system in the linux kernel. It's a | ||
128 | virtual file system: it is not associated with a block device | ||
129 | but exists only in memory. The files in the procfs are there to | ||
130 | allow userland programs access to certain information from the | ||
131 | kernel (like process information in <filename | ||
132 | class="directory">/proc/[0-9]+/</filename>), but also for debug | ||
133 | purposes (like <filename>/proc/ksyms</filename>). | ||
134 | </para> | ||
135 | |||
136 | <para> | ||
137 | This guide describes the use of the procfs file system from | ||
138 | within the Linux kernel. It starts by introducing all relevant | ||
139 | functions to manage the files within the file system. After that | ||
140 | it shows how to communicate with userland, and some tips and | ||
141 | tricks will be pointed out. Finally a complete example will be | ||
142 | shown. | ||
143 | </para> | ||
144 | |||
145 | <para> | ||
146 | Note that the files in <filename | ||
147 | class="directory">/proc/sys</filename> are sysctl files: they | ||
148 | don't belong to procfs and are governed by a completely | ||
149 | different API described in the Kernel API book. | ||
150 | </para> | ||
151 | </chapter> | ||
152 | |||
153 | |||
154 | |||
155 | |||
156 | <chapter id="managing"> | ||
157 | <title>Managing procfs entries</title> | ||
158 | |||
159 | <para> | ||
160 | This chapter describes the functions that various kernel | ||
161 | components use to populate the procfs with files, symlinks, | ||
162 | device nodes, and directories. | ||
163 | </para> | ||
164 | |||
165 | <para> | ||
166 | A minor note before we start: if you want to use any of the | ||
167 | procfs functions, be sure to include the correct header file! | ||
168 | This should be one of the first lines in your code: | ||
169 | </para> | ||
170 | |||
171 | <programlisting> | ||
172 | #include <linux/proc_fs.h> | ||
173 | </programlisting> | ||
174 | |||
175 | |||
176 | |||
177 | |||
178 | <sect1 id="regularfile"> | ||
179 | <title>Creating a regular file</title> | ||
180 | |||
181 | <funcsynopsis> | ||
182 | <funcprototype> | ||
183 | <funcdef>struct proc_dir_entry* <function>create_proc_entry</function></funcdef> | ||
184 | <paramdef>const char* <parameter>name</parameter></paramdef> | ||
185 | <paramdef>mode_t <parameter>mode</parameter></paramdef> | ||
186 | <paramdef>struct proc_dir_entry* <parameter>parent</parameter></paramdef> | ||
187 | </funcprototype> | ||
188 | </funcsynopsis> | ||
189 | |||
190 | <para> | ||
191 | This function creates a regular file with the name | ||
192 | <parameter>name</parameter>, file mode | ||
193 | <parameter>mode</parameter> in the directory | ||
194 | <parameter>parent</parameter>. To create a file in the root of | ||
195 | the procfs, use <constant>NULL</constant> as | ||
196 | <parameter>parent</parameter> parameter. When successful, the | ||
197 | function will return a pointer to the freshly created | ||
198 | <structname>struct proc_dir_entry</structname>; otherwise it | ||
199 | will return <constant>NULL</constant>. <xref | ||
200 | linkend="userland"/> describes how to do something useful with | ||
201 | regular files. | ||
202 | </para> | ||
203 | |||
204 | <para> | ||
205 | Note that it is specifically supported that you can pass a | ||
206 | path that spans multiple directories. For example | ||
207 | <function>create_proc_entry</function>(<parameter>"drivers/via0/info"</parameter>) | ||
208 | will create the <filename class="directory">via0</filename> | ||
209 | directory if necessary, with standard | ||
210 | <constant>0755</constant> permissions. | ||
211 | </para> | ||
212 | |||
213 | <para> | ||
214 | If you only want to be able to read the file, the function | ||
215 | <function>create_proc_read_entry</function> described in <xref | ||
216 | linkend="convenience"/> may be used to create and initialise | ||
217 | the procfs entry in one single call. | ||
218 | </para> | ||
219 | </sect1> | ||
220 | |||
221 | |||
222 | |||
223 | |||
224 | <sect1 id="Creating_a_symlink"> | ||
225 | <title>Creating a symlink</title> | ||
226 | |||
227 | <funcsynopsis> | ||
228 | <funcprototype> | ||
229 | <funcdef>struct proc_dir_entry* | ||
230 | <function>proc_symlink</function></funcdef> <paramdef>const | ||
231 | char* <parameter>name</parameter></paramdef> | ||
232 | <paramdef>struct proc_dir_entry* | ||
233 | <parameter>parent</parameter></paramdef> <paramdef>const | ||
234 | char* <parameter>dest</parameter></paramdef> | ||
235 | </funcprototype> | ||
236 | </funcsynopsis> | ||
237 | |||
238 | <para> | ||
239 | This creates a symlink in the procfs directory | ||
240 | <parameter>parent</parameter> that points from | ||
241 | <parameter>name</parameter> to | ||
242 | <parameter>dest</parameter>. This translates in userland to | ||
243 | <literal>ln -s</literal> <parameter>dest</parameter> | ||
244 | <parameter>name</parameter>. | ||
245 | </para> | ||
246 | </sect1> | ||
247 | |||
248 | <sect1 id="Creating_a_directory"> | ||
249 | <title>Creating a directory</title> | ||
250 | |||
251 | <funcsynopsis> | ||
252 | <funcprototype> | ||
253 | <funcdef>struct proc_dir_entry* <function>proc_mkdir</function></funcdef> | ||
254 | <paramdef>const char* <parameter>name</parameter></paramdef> | ||
255 | <paramdef>struct proc_dir_entry* <parameter>parent</parameter></paramdef> | ||
256 | </funcprototype> | ||
257 | </funcsynopsis> | ||
258 | |||
259 | <para> | ||
260 | Create a directory <parameter>name</parameter> in the procfs | ||
261 | directory <parameter>parent</parameter>. | ||
262 | </para> | ||
263 | </sect1> | ||
264 | |||
265 | |||
266 | |||
267 | |||
268 | <sect1 id="Removing_an_entry"> | ||
269 | <title>Removing an entry</title> | ||
270 | |||
271 | <funcsynopsis> | ||
272 | <funcprototype> | ||
273 | <funcdef>void <function>remove_proc_entry</function></funcdef> | ||
274 | <paramdef>const char* <parameter>name</parameter></paramdef> | ||
275 | <paramdef>struct proc_dir_entry* <parameter>parent</parameter></paramdef> | ||
276 | </funcprototype> | ||
277 | </funcsynopsis> | ||
278 | |||
279 | <para> | ||
280 | Removes the entry <parameter>name</parameter> in the directory | ||
281 | <parameter>parent</parameter> from the procfs. Entries are | ||
282 | removed by their <emphasis>name</emphasis>, not by the | ||
283 | <structname>struct proc_dir_entry</structname> returned by the | ||
284 | various create functions. Note that this function doesn't | ||
285 | recursively remove entries. | ||
286 | </para> | ||
287 | |||
288 | <para> | ||
289 | Be sure to free the <structfield>data</structfield> entry from | ||
290 | the <structname>struct proc_dir_entry</structname> before | ||
291 | <function>remove_proc_entry</function> is called (that is: if | ||
292 | there was some <structfield>data</structfield> allocated, of | ||
293 | course). See <xref linkend="usingdata"/> for more information | ||
294 | on using the <structfield>data</structfield> entry. | ||
295 | </para> | ||
296 | </sect1> | ||
297 | </chapter> | ||
298 | |||
299 | |||
300 | |||
301 | |||
302 | <chapter id="userland"> | ||
303 | <title>Communicating with userland</title> | ||
304 | |||
305 | <para> | ||
306 | Instead of reading (or writing) information directly from | ||
307 | kernel memory, procfs works with <emphasis>call back | ||
308 | functions</emphasis> for files: functions that are called when | ||
309 | a specific file is being read or written. Such functions have | ||
310 | to be initialised after the procfs file is created by setting | ||
311 | the <structfield>read_proc</structfield> and/or | ||
312 | <structfield>write_proc</structfield> fields in the | ||
313 | <structname>struct proc_dir_entry*</structname> that the | ||
314 | function <function>create_proc_entry</function> returned: | ||
315 | </para> | ||
316 | |||
317 | <programlisting> | ||
318 | struct proc_dir_entry* entry; | ||
319 | |||
320 | entry->read_proc = read_proc_foo; | ||
321 | entry->write_proc = write_proc_foo; | ||
322 | </programlisting> | ||
323 | |||
324 | <para> | ||
325 | If you only want to use a the | ||
326 | <structfield>read_proc</structfield>, the function | ||
327 | <function>create_proc_read_entry</function> described in <xref | ||
328 | linkend="convenience"/> may be used to create and initialise the | ||
329 | procfs entry in one single call. | ||
330 | </para> | ||
331 | |||
332 | |||
333 | |||
334 | <sect1 id="Reading_data"> | ||
335 | <title>Reading data</title> | ||
336 | |||
337 | <para> | ||
338 | The read function is a call back function that allows userland | ||
339 | processes to read data from the kernel. The read function | ||
340 | should have the following format: | ||
341 | </para> | ||
342 | |||
343 | <funcsynopsis> | ||
344 | <funcprototype> | ||
345 | <funcdef>int <function>read_func</function></funcdef> | ||
346 | <paramdef>char* <parameter>buffer</parameter></paramdef> | ||
347 | <paramdef>char** <parameter>start</parameter></paramdef> | ||
348 | <paramdef>off_t <parameter>off</parameter></paramdef> | ||
349 | <paramdef>int <parameter>count</parameter></paramdef> | ||
350 | <paramdef>int* <parameter>peof</parameter></paramdef> | ||
351 | <paramdef>void* <parameter>data</parameter></paramdef> | ||
352 | </funcprototype> | ||
353 | </funcsynopsis> | ||
354 | |||
355 | <para> | ||
356 | The read function should write its information into the | ||
357 | <parameter>buffer</parameter>, which will be exactly | ||
358 | <literal>PAGE_SIZE</literal> bytes long. | ||
359 | </para> | ||
360 | |||
361 | <para> | ||
362 | The parameter | ||
363 | <parameter>peof</parameter> should be used to signal that the | ||
364 | end of the file has been reached by writing | ||
365 | <literal>1</literal> to the memory location | ||
366 | <parameter>peof</parameter> points to. | ||
367 | </para> | ||
368 | |||
369 | <para> | ||
370 | The <parameter>data</parameter> | ||
371 | parameter can be used to create a single call back function for | ||
372 | several files, see <xref linkend="usingdata"/>. | ||
373 | </para> | ||
374 | |||
375 | <para> | ||
376 | The rest of the parameters and the return value are described | ||
377 | by a comment in <filename>fs/proc/generic.c</filename> as follows: | ||
378 | </para> | ||
379 | |||
380 | <blockquote> | ||
381 | <para> | ||
382 | You have three ways to return data: | ||
383 | </para> | ||
384 | <orderedlist> | ||
385 | <listitem> | ||
386 | <para> | ||
387 | Leave <literal>*start = NULL</literal>. (This is the default.) | ||
388 | Put the data of the requested offset at that | ||
389 | offset within the buffer. Return the number (<literal>n</literal>) | ||
390 | of bytes there are from the beginning of the | ||
391 | buffer up to the last byte of data. If the | ||
392 | number of supplied bytes (<literal>= n - offset</literal>) is | ||
393 | greater than zero and you didn't signal eof | ||
394 | and the reader is prepared to take more data | ||
395 | you will be called again with the requested | ||
396 | offset advanced by the number of bytes | ||
397 | absorbed. This interface is useful for files | ||
398 | no larger than the buffer. | ||
399 | </para> | ||
400 | </listitem> | ||
401 | <listitem> | ||
402 | <para> | ||
403 | Set <literal>*start</literal> to an unsigned long value less than | ||
404 | the buffer address but greater than zero. | ||
405 | Put the data of the requested offset at the | ||
406 | beginning of the buffer. Return the number of | ||
407 | bytes of data placed there. If this number is | ||
408 | greater than zero and you didn't signal eof | ||
409 | and the reader is prepared to take more data | ||
410 | you will be called again with the requested | ||
411 | offset advanced by <literal>*start</literal>. This interface is | ||
412 | useful when you have a large file consisting | ||
413 | of a series of blocks which you want to count | ||
414 | and return as wholes. | ||
415 | (Hack by Paul.Russell@rustcorp.com.au) | ||
416 | </para> | ||
417 | </listitem> | ||
418 | <listitem> | ||
419 | <para> | ||
420 | Set <literal>*start</literal> to an address within the buffer. | ||
421 | Put the data of the requested offset at <literal>*start</literal>. | ||
422 | Return the number of bytes of data placed there. | ||
423 | If this number is greater than zero and you | ||
424 | didn't signal eof and the reader is prepared to | ||
425 | take more data you will be called again with the | ||
426 | requested offset advanced by the number of bytes | ||
427 | absorbed. | ||
428 | </para> | ||
429 | </listitem> | ||
430 | </orderedlist> | ||
431 | </blockquote> | ||
432 | |||
433 | <para> | ||
434 | <xref linkend="example"/> shows how to use a read call back | ||
435 | function. | ||
436 | </para> | ||
437 | </sect1> | ||
438 | |||
439 | |||
440 | |||
441 | |||
442 | <sect1 id="Writing_data"> | ||
443 | <title>Writing data</title> | ||
444 | |||
445 | <para> | ||
446 | The write call back function allows a userland process to write | ||
447 | data to the kernel, so it has some kind of control over the | ||
448 | kernel. The write function should have the following format: | ||
449 | </para> | ||
450 | |||
451 | <funcsynopsis> | ||
452 | <funcprototype> | ||
453 | <funcdef>int <function>write_func</function></funcdef> | ||
454 | <paramdef>struct file* <parameter>file</parameter></paramdef> | ||
455 | <paramdef>const char* <parameter>buffer</parameter></paramdef> | ||
456 | <paramdef>unsigned long <parameter>count</parameter></paramdef> | ||
457 | <paramdef>void* <parameter>data</parameter></paramdef> | ||
458 | </funcprototype> | ||
459 | </funcsynopsis> | ||
460 | |||
461 | <para> | ||
462 | The write function should read <parameter>count</parameter> | ||
463 | bytes at maximum from the <parameter>buffer</parameter>. Note | ||
464 | that the <parameter>buffer</parameter> doesn't live in the | ||
465 | kernel's memory space, so it should first be copied to kernel | ||
466 | space with <function>copy_from_user</function>. The | ||
467 | <parameter>file</parameter> parameter is usually | ||
468 | ignored. <xref linkend="usingdata"/> shows how to use the | ||
469 | <parameter>data</parameter> parameter. | ||
470 | </para> | ||
471 | |||
472 | <para> | ||
473 | Again, <xref linkend="example"/> shows how to use this call back | ||
474 | function. | ||
475 | </para> | ||
476 | </sect1> | ||
477 | |||
478 | |||
479 | |||
480 | |||
481 | <sect1 id="usingdata"> | ||
482 | <title>A single call back for many files</title> | ||
483 | |||
484 | <para> | ||
485 | When a large number of almost identical files is used, it's | ||
486 | quite inconvenient to use a separate call back function for | ||
487 | each file. A better approach is to have a single call back | ||
488 | function that distinguishes between the files by using the | ||
489 | <structfield>data</structfield> field in <structname>struct | ||
490 | proc_dir_entry</structname>. First of all, the | ||
491 | <structfield>data</structfield> field has to be initialised: | ||
492 | </para> | ||
493 | |||
494 | <programlisting> | ||
495 | struct proc_dir_entry* entry; | ||
496 | struct my_file_data *file_data; | ||
497 | |||
498 | file_data = kmalloc(sizeof(struct my_file_data), GFP_KERNEL); | ||
499 | entry->data = file_data; | ||
500 | </programlisting> | ||
501 | |||
502 | <para> | ||
503 | The <structfield>data</structfield> field is a <type>void | ||
504 | *</type>, so it can be initialised with anything. | ||
505 | </para> | ||
506 | |||
507 | <para> | ||
508 | Now that the <structfield>data</structfield> field is set, the | ||
509 | <function>read_proc</function> and | ||
510 | <function>write_proc</function> can use it to distinguish | ||
511 | between files because they get it passed into their | ||
512 | <parameter>data</parameter> parameter: | ||
513 | </para> | ||
514 | |||
515 | <programlisting> | ||
516 | int foo_read_func(char *page, char **start, off_t off, | ||
517 | int count, int *eof, void *data) | ||
518 | { | ||
519 | int len; | ||
520 | |||
521 | if(data == file_data) { | ||
522 | /* special case for this file */ | ||
523 | } else { | ||
524 | /* normal processing */ | ||
525 | } | ||
526 | |||
527 | return len; | ||
528 | } | ||
529 | </programlisting> | ||
530 | |||
531 | <para> | ||
532 | Be sure to free the <structfield>data</structfield> data field | ||
533 | when removing the procfs entry. | ||
534 | </para> | ||
535 | </sect1> | ||
536 | </chapter> | ||
537 | |||
538 | |||
539 | |||
540 | |||
541 | <chapter id="tips"> | ||
542 | <title>Tips and tricks</title> | ||
543 | |||
544 | |||
545 | |||
546 | |||
547 | <sect1 id="convenience"> | ||
548 | <title>Convenience functions</title> | ||
549 | |||
550 | <funcsynopsis> | ||
551 | <funcprototype> | ||
552 | <funcdef>struct proc_dir_entry* <function>create_proc_read_entry</function></funcdef> | ||
553 | <paramdef>const char* <parameter>name</parameter></paramdef> | ||
554 | <paramdef>mode_t <parameter>mode</parameter></paramdef> | ||
555 | <paramdef>struct proc_dir_entry* <parameter>parent</parameter></paramdef> | ||
556 | <paramdef>read_proc_t* <parameter>read_proc</parameter></paramdef> | ||
557 | <paramdef>void* <parameter>data</parameter></paramdef> | ||
558 | </funcprototype> | ||
559 | </funcsynopsis> | ||
560 | |||
561 | <para> | ||
562 | This function creates a regular file in exactly the same way | ||
563 | as <function>create_proc_entry</function> from <xref | ||
564 | linkend="regularfile"/> does, but also allows to set the read | ||
565 | function <parameter>read_proc</parameter> in one call. This | ||
566 | function can set the <parameter>data</parameter> as well, like | ||
567 | explained in <xref linkend="usingdata"/>. | ||
568 | </para> | ||
569 | </sect1> | ||
570 | |||
571 | |||
572 | |||
573 | <sect1 id="Modules"> | ||
574 | <title>Modules</title> | ||
575 | |||
576 | <para> | ||
577 | If procfs is being used from within a module, be sure to set | ||
578 | the <structfield>owner</structfield> field in the | ||
579 | <structname>struct proc_dir_entry</structname> to | ||
580 | <constant>THIS_MODULE</constant>. | ||
581 | </para> | ||
582 | |||
583 | <programlisting> | ||
584 | struct proc_dir_entry* entry; | ||
585 | |||
586 | entry->owner = THIS_MODULE; | ||
587 | </programlisting> | ||
588 | </sect1> | ||
589 | |||
590 | |||
591 | |||
592 | |||
593 | <sect1 id="Mode_and_ownership"> | ||
594 | <title>Mode and ownership</title> | ||
595 | |||
596 | <para> | ||
597 | Sometimes it is useful to change the mode and/or ownership of | ||
598 | a procfs entry. Here is an example that shows how to achieve | ||
599 | that: | ||
600 | </para> | ||
601 | |||
602 | <programlisting> | ||
603 | struct proc_dir_entry* entry; | ||
604 | |||
605 | entry->mode = S_IWUSR |S_IRUSR | S_IRGRP | S_IROTH; | ||
606 | entry->uid = 0; | ||
607 | entry->gid = 100; | ||
608 | </programlisting> | ||
609 | |||
610 | </sect1> | ||
611 | </chapter> | ||
612 | |||
613 | |||
614 | |||
615 | |||
616 | <chapter id="example"> | ||
617 | <title>Example</title> | ||
618 | |||
619 | <!-- be careful with the example code: it shouldn't be wider than | ||
620 | approx. 60 columns, or otherwise it won't fit properly on a page | ||
621 | --> | ||
622 | |||
623 | &procfsexample; | ||
624 | |||
625 | </chapter> | ||
626 | </book> | ||
diff --git a/Documentation/DocBook/procfs_example.c b/Documentation/DocBook/procfs_example.c deleted file mode 100644 index a5b11793b1e0..000000000000 --- a/Documentation/DocBook/procfs_example.c +++ /dev/null | |||
@@ -1,201 +0,0 @@ | |||
1 | /* | ||
2 | * procfs_example.c: an example proc interface | ||
3 | * | ||
4 | * Copyright (C) 2001, Erik Mouw (mouw@nl.linux.org) | ||
5 | * | ||
6 | * This file accompanies the procfs-guide in the Linux kernel | ||
7 | * source. Its main use is to demonstrate the concepts and | ||
8 | * functions described in the guide. | ||
9 | * | ||
10 | * This software has been developed while working on the LART | ||
11 | * computing board (http://www.lartmaker.nl), which was sponsored | ||
12 | * by the Delt University of Technology projects Mobile Multi-media | ||
13 | * Communications and Ubiquitous Communications. | ||
14 | * | ||
15 | * This program is free software; you can redistribute | ||
16 | * it and/or modify it under the terms of the GNU General | ||
17 | * Public License as published by the Free Software | ||
18 | * Foundation; either version 2 of the License, or (at your | ||
19 | * option) any later version. | ||
20 | * | ||
21 | * This program is distributed in the hope that it will be | ||
22 | * useful, but WITHOUT ANY WARRANTY; without even the implied | ||
23 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | ||
24 | * PURPOSE. See the GNU General Public License for more | ||
25 | * details. | ||
26 | * | ||
27 | * You should have received a copy of the GNU General Public | ||
28 | * License along with this program; if not, write to the | ||
29 | * Free Software Foundation, Inc., 59 Temple Place, | ||
30 | * Suite 330, Boston, MA 02111-1307 USA | ||
31 | * | ||
32 | */ | ||
33 | |||
34 | #include <linux/module.h> | ||
35 | #include <linux/kernel.h> | ||
36 | #include <linux/init.h> | ||
37 | #include <linux/proc_fs.h> | ||
38 | #include <linux/jiffies.h> | ||
39 | #include <asm/uaccess.h> | ||
40 | |||
41 | |||
42 | #define MODULE_VERS "1.0" | ||
43 | #define MODULE_NAME "procfs_example" | ||
44 | |||
45 | #define FOOBAR_LEN 8 | ||
46 | |||
47 | struct fb_data_t { | ||
48 | char name[FOOBAR_LEN + 1]; | ||
49 | char value[FOOBAR_LEN + 1]; | ||
50 | }; | ||
51 | |||
52 | |||
53 | static struct proc_dir_entry *example_dir, *foo_file, | ||
54 | *bar_file, *jiffies_file, *symlink; | ||
55 | |||
56 | |||
57 | struct fb_data_t foo_data, bar_data; | ||
58 | |||
59 | |||
60 | static int proc_read_jiffies(char *page, char **start, | ||
61 | off_t off, int count, | ||
62 | int *eof, void *data) | ||
63 | { | ||
64 | int len; | ||
65 | |||
66 | len = sprintf(page, "jiffies = %ld\n", | ||
67 | jiffies); | ||
68 | |||
69 | return len; | ||
70 | } | ||
71 | |||
72 | |||
73 | static int proc_read_foobar(char *page, char **start, | ||
74 | off_t off, int count, | ||
75 | int *eof, void *data) | ||
76 | { | ||
77 | int len; | ||
78 | struct fb_data_t *fb_data = (struct fb_data_t *)data; | ||
79 | |||
80 | /* DON'T DO THAT - buffer overruns are bad */ | ||
81 | len = sprintf(page, "%s = '%s'\n", | ||
82 | fb_data->name, fb_data->value); | ||
83 | |||
84 | return len; | ||
85 | } | ||
86 | |||
87 | |||
88 | static int proc_write_foobar(struct file *file, | ||
89 | const char *buffer, | ||
90 | unsigned long count, | ||
91 | void *data) | ||
92 | { | ||
93 | int len; | ||
94 | struct fb_data_t *fb_data = (struct fb_data_t *)data; | ||
95 | |||
96 | if(count > FOOBAR_LEN) | ||
97 | len = FOOBAR_LEN; | ||
98 | else | ||
99 | len = count; | ||
100 | |||
101 | if(copy_from_user(fb_data->value, buffer, len)) | ||
102 | return -EFAULT; | ||
103 | |||
104 | fb_data->value[len] = '\0'; | ||
105 | |||
106 | return len; | ||
107 | } | ||
108 | |||
109 | |||
110 | static int __init init_procfs_example(void) | ||
111 | { | ||
112 | int rv = 0; | ||
113 | |||
114 | /* create directory */ | ||
115 | example_dir = proc_mkdir(MODULE_NAME, NULL); | ||
116 | if(example_dir == NULL) { | ||
117 | rv = -ENOMEM; | ||
118 | goto out; | ||
119 | } | ||
120 | /* create jiffies using convenience function */ | ||
121 | jiffies_file = create_proc_read_entry("jiffies", | ||
122 | 0444, example_dir, | ||
123 | proc_read_jiffies, | ||
124 | NULL); | ||
125 | if(jiffies_file == NULL) { | ||
126 | rv = -ENOMEM; | ||
127 | goto no_jiffies; | ||
128 | } | ||
129 | |||
130 | /* create foo and bar files using same callback | ||
131 | * functions | ||
132 | */ | ||
133 | foo_file = create_proc_entry("foo", 0644, example_dir); | ||
134 | if(foo_file == NULL) { | ||
135 | rv = -ENOMEM; | ||
136 | goto no_foo; | ||
137 | } | ||
138 | |||
139 | strcpy(foo_data.name, "foo"); | ||
140 | strcpy(foo_data.value, "foo"); | ||
141 | foo_file->data = &foo_data; | ||
142 | foo_file->read_proc = proc_read_foobar; | ||
143 | foo_file->write_proc = proc_write_foobar; | ||
144 | |||
145 | bar_file = create_proc_entry("bar", 0644, example_dir); | ||
146 | if(bar_file == NULL) { | ||
147 | rv = -ENOMEM; | ||
148 | goto no_bar; | ||
149 | } | ||
150 | |||
151 | strcpy(bar_data.name, "bar"); | ||
152 | strcpy(bar_data.value, "bar"); | ||
153 | bar_file->data = &bar_data; | ||
154 | bar_file->read_proc = proc_read_foobar; | ||
155 | bar_file->write_proc = proc_write_foobar; | ||
156 | |||
157 | /* create symlink */ | ||
158 | symlink = proc_symlink("jiffies_too", example_dir, | ||
159 | "jiffies"); | ||
160 | if(symlink == NULL) { | ||
161 | rv = -ENOMEM; | ||
162 | goto no_symlink; | ||
163 | } | ||
164 | |||
165 | /* everything OK */ | ||
166 | printk(KERN_INFO "%s %s initialised\n", | ||
167 | MODULE_NAME, MODULE_VERS); | ||
168 | return 0; | ||
169 | |||
170 | no_symlink: | ||
171 | remove_proc_entry("bar", example_dir); | ||
172 | no_bar: | ||
173 | remove_proc_entry("foo", example_dir); | ||
174 | no_foo: | ||
175 | remove_proc_entry("jiffies", example_dir); | ||
176 | no_jiffies: | ||
177 | remove_proc_entry(MODULE_NAME, NULL); | ||
178 | out: | ||
179 | return rv; | ||
180 | } | ||
181 | |||
182 | |||
183 | static void __exit cleanup_procfs_example(void) | ||
184 | { | ||
185 | remove_proc_entry("jiffies_too", example_dir); | ||
186 | remove_proc_entry("bar", example_dir); | ||
187 | remove_proc_entry("foo", example_dir); | ||
188 | remove_proc_entry("jiffies", example_dir); | ||
189 | remove_proc_entry(MODULE_NAME, NULL); | ||
190 | |||
191 | printk(KERN_INFO "%s %s removed\n", | ||
192 | MODULE_NAME, MODULE_VERS); | ||
193 | } | ||
194 | |||
195 | |||
196 | module_init(init_procfs_example); | ||
197 | module_exit(cleanup_procfs_example); | ||
198 | |||
199 | MODULE_AUTHOR("Erik Mouw"); | ||
200 | MODULE_DESCRIPTION("procfs examples"); | ||
201 | MODULE_LICENSE("GPL"); | ||
diff --git a/Documentation/DocBook/v4l/common.xml b/Documentation/DocBook/v4l/common.xml index b1a81d246d58..c65f0ac9b6ee 100644 --- a/Documentation/DocBook/v4l/common.xml +++ b/Documentation/DocBook/v4l/common.xml | |||
@@ -716,6 +716,41 @@ if (-1 == ioctl (fd, &VIDIOC-S-STD;, &std_id)) { | |||
716 | } | 716 | } |
717 | </programlisting> | 717 | </programlisting> |
718 | </example> | 718 | </example> |
719 | <section id="dv-timings"> | ||
720 | <title>Digital Video (DV) Timings</title> | ||
721 | <para> | ||
722 | The video standards discussed so far has been dealing with Analog TV and the | ||
723 | corresponding video timings. Today there are many more different hardware interfaces | ||
724 | such as High Definition TV interfaces (HDMI), VGA, DVI connectors etc., that carry | ||
725 | video signals and there is a need to extend the API to select the video timings | ||
726 | for these interfaces. Since it is not possible to extend the &v4l2-std-id; due to | ||
727 | the limited bits available, a new set of IOCTLs is added to set/get video timings at | ||
728 | the input and output: </para><itemizedlist> | ||
729 | <listitem> | ||
730 | <para>DV Presets: Digital Video (DV) presets. These are IDs representing a | ||
731 | video timing at the input/output. Presets are pre-defined timings implemented | ||
732 | by the hardware according to video standards. A __u32 data type is used to represent | ||
733 | a preset unlike the bit mask that is used in &v4l2-std-id; allowing future extensions | ||
734 | to support as many different presets as needed.</para> | ||
735 | </listitem> | ||
736 | <listitem> | ||
737 | <para>Custom DV Timings: This will allow applications to define more detailed | ||
738 | custom video timings for the interface. This includes parameters such as width, height, | ||
739 | polarities, frontporch, backporch etc. | ||
740 | </para> | ||
741 | </listitem> | ||
742 | </itemizedlist> | ||
743 | <para>To enumerate and query the attributes of DV presets supported by a device, | ||
744 | applications use the &VIDIOC-ENUM-DV-PRESETS; ioctl. To get the current DV preset, | ||
745 | applications use the &VIDIOC-G-DV-PRESET; ioctl and to set a preset they use the | ||
746 | &VIDIOC-S-DV-PRESET; ioctl.</para> | ||
747 | <para>To set custom DV timings for the device, applications use the | ||
748 | &VIDIOC-S-DV-TIMINGS; ioctl and to get current custom DV timings they use the | ||
749 | &VIDIOC-G-DV-TIMINGS; ioctl.</para> | ||
750 | <para>Applications can make use of the <xref linkend="input-capabilities" /> and | ||
751 | <xref linkend="output-capabilities"/> flags to decide what ioctls are available to set the | ||
752 | video timings for the device.</para> | ||
753 | </section> | ||
719 | </section> | 754 | </section> |
720 | 755 | ||
721 | &sub-controls; | 756 | &sub-controls; |
diff --git a/Documentation/DocBook/v4l/compat.xml b/Documentation/DocBook/v4l/compat.xml index 4d1902a54d61..b9dbdf9e6d29 100644 --- a/Documentation/DocBook/v4l/compat.xml +++ b/Documentation/DocBook/v4l/compat.xml | |||
@@ -2291,8 +2291,8 @@ was renamed to <structname id="v4l2-chip-ident-old">v4l2_chip_ident_old</structn | |||
2291 | <listitem> | 2291 | <listitem> |
2292 | <para>New control <constant>V4L2_CID_COLORFX</constant> was added.</para> | 2292 | <para>New control <constant>V4L2_CID_COLORFX</constant> was added.</para> |
2293 | </listitem> | 2293 | </listitem> |
2294 | </orderedlist> | 2294 | </orderedlist> |
2295 | </section> | 2295 | </section> |
2296 | <section> | 2296 | <section> |
2297 | <title>V4L2 in Linux 2.6.32</title> | 2297 | <title>V4L2 in Linux 2.6.32</title> |
2298 | <orderedlist> | 2298 | <orderedlist> |
@@ -2322,8 +2322,16 @@ more information.</para> | |||
2322 | <listitem> | 2322 | <listitem> |
2323 | <para>Added Remote Controller chapter, describing the default Remote Controller mapping for media devices.</para> | 2323 | <para>Added Remote Controller chapter, describing the default Remote Controller mapping for media devices.</para> |
2324 | </listitem> | 2324 | </listitem> |
2325 | </orderedlist> | 2325 | </orderedlist> |
2326 | </section> | 2326 | </section> |
2327 | <section> | ||
2328 | <title>V4L2 in Linux 2.6.33</title> | ||
2329 | <orderedlist> | ||
2330 | <listitem> | ||
2331 | <para>Added support for Digital Video timings in order to support HDTV receivers and transmitters.</para> | ||
2332 | </listitem> | ||
2333 | </orderedlist> | ||
2334 | </section> | ||
2327 | </section> | 2335 | </section> |
2328 | 2336 | ||
2329 | <section id="other"> | 2337 | <section id="other"> |
diff --git a/Documentation/DocBook/v4l/controls.xml b/Documentation/DocBook/v4l/controls.xml index f492accb691d..f46450610412 100644 --- a/Documentation/DocBook/v4l/controls.xml +++ b/Documentation/DocBook/v4l/controls.xml | |||
@@ -281,10 +281,28 @@ minimum value disables backlight compensation.</entry> | |||
281 | <constant>V4L2_COLORFX_SEPIA</constant> (2).</entry> | 281 | <constant>V4L2_COLORFX_SEPIA</constant> (2).</entry> |
282 | </row> | 282 | </row> |
283 | <row> | 283 | <row> |
284 | <entry><constant>V4L2_CID_ROTATE</constant></entry> | ||
285 | <entry>integer</entry> | ||
286 | <entry>Rotates the image by specified angle. Common angles are 90, | ||
287 | 270 and 180. Rotating the image to 90 and 270 will reverse the height | ||
288 | and width of the display window. It is necessary to set the new height and | ||
289 | width of the picture using the &VIDIOC-S-FMT; ioctl according to | ||
290 | the rotation angle selected.</entry> | ||
291 | </row> | ||
292 | <row> | ||
293 | <entry><constant>V4L2_CID_BG_COLOR</constant></entry> | ||
294 | <entry>integer</entry> | ||
295 | <entry>Sets the background color on the current output device. | ||
296 | Background color needs to be specified in the RGB24 format. The | ||
297 | supplied 32 bit value is interpreted as bits 0-7 Red color information, | ||
298 | bits 8-15 Green color information, bits 16-23 Blue color | ||
299 | information and bits 24-31 must be zero.</entry> | ||
300 | </row> | ||
301 | <row> | ||
284 | <entry><constant>V4L2_CID_LASTP1</constant></entry> | 302 | <entry><constant>V4L2_CID_LASTP1</constant></entry> |
285 | <entry></entry> | 303 | <entry></entry> |
286 | <entry>End of the predefined control IDs (currently | 304 | <entry>End of the predefined control IDs (currently |
287 | <constant>V4L2_CID_COLORFX</constant> + 1).</entry> | 305 | <constant>V4L2_CID_BG_COLOR</constant> + 1).</entry> |
288 | </row> | 306 | </row> |
289 | <row> | 307 | <row> |
290 | <entry><constant>V4L2_CID_PRIVATE_BASE</constant></entry> | 308 | <entry><constant>V4L2_CID_PRIVATE_BASE</constant></entry> |
diff --git a/Documentation/DocBook/v4l/pixfmt.xml b/Documentation/DocBook/v4l/pixfmt.xml index 7d396a3785f5..885968d6a2fc 100644 --- a/Documentation/DocBook/v4l/pixfmt.xml +++ b/Documentation/DocBook/v4l/pixfmt.xml | |||
@@ -770,6 +770,11 @@ kernel sources in the file <filename>Documentation/video4linux/cx2341x/README.hm | |||
770 | <entry>'S920'</entry> | 770 | <entry>'S920'</entry> |
771 | <entry>YUV 4:2:0 format of the gspca sn9c20x driver.</entry> | 771 | <entry>YUV 4:2:0 format of the gspca sn9c20x driver.</entry> |
772 | </row> | 772 | </row> |
773 | <row id="V4L2-PIX-FMT-STV0680"> | ||
774 | <entry><constant>V4L2_PIX_FMT_STV0680</constant></entry> | ||
775 | <entry>'S680'</entry> | ||
776 | <entry>Bayer format of the gspca stv0680 driver.</entry> | ||
777 | </row> | ||
773 | <row id="V4L2-PIX-FMT-WNVA"> | 778 | <row id="V4L2-PIX-FMT-WNVA"> |
774 | <entry><constant>V4L2_PIX_FMT_WNVA</constant></entry> | 779 | <entry><constant>V4L2_PIX_FMT_WNVA</constant></entry> |
775 | <entry>'WNVA'</entry> | 780 | <entry>'WNVA'</entry> |
diff --git a/Documentation/DocBook/v4l/v4l2.xml b/Documentation/DocBook/v4l/v4l2.xml index 937b4157a5d0..060105af49e5 100644 --- a/Documentation/DocBook/v4l/v4l2.xml +++ b/Documentation/DocBook/v4l/v4l2.xml | |||
@@ -74,6 +74,17 @@ Remote Controller chapter.</contrib> | |||
74 | </address> | 74 | </address> |
75 | </affiliation> | 75 | </affiliation> |
76 | </author> | 76 | </author> |
77 | |||
78 | <author> | ||
79 | <firstname>Muralidharan</firstname> | ||
80 | <surname>Karicheri</surname> | ||
81 | <contrib>Documented the Digital Video timings API.</contrib> | ||
82 | <affiliation> | ||
83 | <address> | ||
84 | <email>m-karicheri2@ti.com</email> | ||
85 | </address> | ||
86 | </affiliation> | ||
87 | </author> | ||
77 | </authorgroup> | 88 | </authorgroup> |
78 | 89 | ||
79 | <copyright> | 90 | <copyright> |
@@ -89,7 +100,7 @@ Remote Controller chapter.</contrib> | |||
89 | <year>2008</year> | 100 | <year>2008</year> |
90 | <year>2009</year> | 101 | <year>2009</year> |
91 | <holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin | 102 | <holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin |
92 | Rubli, Andy Walls, Mauro Carvalho Chehab</holder> | 103 | Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab</holder> |
93 | </copyright> | 104 | </copyright> |
94 | <legalnotice> | 105 | <legalnotice> |
95 | <para>Except when explicitly stated as GPL, programming examples within | 106 | <para>Except when explicitly stated as GPL, programming examples within |
@@ -103,6 +114,13 @@ structs, ioctls) must be noted in more detail in the history chapter | |||
103 | applications. --> | 114 | applications. --> |
104 | 115 | ||
105 | <revision> | 116 | <revision> |
117 | <revnumber>2.6.33</revnumber> | ||
118 | <date>2009-12-03</date> | ||
119 | <authorinitials>mk</authorinitials> | ||
120 | <revremark>Added documentation for the Digital Video timings API.</revremark> | ||
121 | </revision> | ||
122 | |||
123 | <revision> | ||
106 | <revnumber>2.6.32</revnumber> | 124 | <revnumber>2.6.32</revnumber> |
107 | <date>2009-08-31</date> | 125 | <date>2009-08-31</date> |
108 | <authorinitials>mcc</authorinitials> | 126 | <authorinitials>mcc</authorinitials> |
@@ -355,7 +373,7 @@ and discussions on the V4L mailing list.</revremark> | |||
355 | </partinfo> | 373 | </partinfo> |
356 | 374 | ||
357 | <title>Video for Linux Two API Specification</title> | 375 | <title>Video for Linux Two API Specification</title> |
358 | <subtitle>Revision 2.6.32</subtitle> | 376 | <subtitle>Revision 2.6.33</subtitle> |
359 | 377 | ||
360 | <chapter id="common"> | 378 | <chapter id="common"> |
361 | &sub-common; | 379 | &sub-common; |
@@ -411,6 +429,7 @@ and discussions on the V4L mailing list.</revremark> | |||
411 | &sub-encoder-cmd; | 429 | &sub-encoder-cmd; |
412 | &sub-enumaudio; | 430 | &sub-enumaudio; |
413 | &sub-enumaudioout; | 431 | &sub-enumaudioout; |
432 | &sub-enum-dv-presets; | ||
414 | &sub-enum-fmt; | 433 | &sub-enum-fmt; |
415 | &sub-enum-framesizes; | 434 | &sub-enum-framesizes; |
416 | &sub-enum-frameintervals; | 435 | &sub-enum-frameintervals; |
@@ -421,6 +440,8 @@ and discussions on the V4L mailing list.</revremark> | |||
421 | &sub-g-audioout; | 440 | &sub-g-audioout; |
422 | &sub-g-crop; | 441 | &sub-g-crop; |
423 | &sub-g-ctrl; | 442 | &sub-g-ctrl; |
443 | &sub-g-dv-preset; | ||
444 | &sub-g-dv-timings; | ||
424 | &sub-g-enc-index; | 445 | &sub-g-enc-index; |
425 | &sub-g-ext-ctrls; | 446 | &sub-g-ext-ctrls; |
426 | &sub-g-fbuf; | 447 | &sub-g-fbuf; |
@@ -441,6 +462,7 @@ and discussions on the V4L mailing list.</revremark> | |||
441 | &sub-querybuf; | 462 | &sub-querybuf; |
442 | &sub-querycap; | 463 | &sub-querycap; |
443 | &sub-queryctrl; | 464 | &sub-queryctrl; |
465 | &sub-query-dv-preset; | ||
444 | &sub-querystd; | 466 | &sub-querystd; |
445 | &sub-reqbufs; | 467 | &sub-reqbufs; |
446 | &sub-s-hw-freq-seek; | 468 | &sub-s-hw-freq-seek; |
diff --git a/Documentation/DocBook/v4l/videodev2.h.xml b/Documentation/DocBook/v4l/videodev2.h.xml index 97002060ac4f..068325940658 100644 --- a/Documentation/DocBook/v4l/videodev2.h.xml +++ b/Documentation/DocBook/v4l/videodev2.h.xml | |||
@@ -363,6 +363,7 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> { | |||
363 | #define <link linkend="V4L2-PIX-FMT-OV511">V4L2_PIX_FMT_OV511</link> v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */ | 363 | #define <link linkend="V4L2-PIX-FMT-OV511">V4L2_PIX_FMT_OV511</link> v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */ |
364 | #define <link linkend="V4L2-PIX-FMT-OV518">V4L2_PIX_FMT_OV518</link> v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ | 364 | #define <link linkend="V4L2-PIX-FMT-OV518">V4L2_PIX_FMT_OV518</link> v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ |
365 | #define <link linkend="V4L2-PIX-FMT-TM6000">V4L2_PIX_FMT_TM6000</link> v4l2_fourcc('T', 'M', '6', '0') /* tm5600/tm60x0 */ | 365 | #define <link linkend="V4L2-PIX-FMT-TM6000">V4L2_PIX_FMT_TM6000</link> v4l2_fourcc('T', 'M', '6', '0') /* tm5600/tm60x0 */ |
366 | #define <link linkend="V4L2-PIX-FMT-STV0680">V4L2_PIX_FMT_STV0680</link> v4l2_fourcc('S', '6', '8', '0') /* stv0680 bayer */ | ||
366 | 367 | ||
367 | /* | 368 | /* |
368 | * F O R M A T E N U M E R A T I O N | 369 | * F O R M A T E N U M E R A T I O N |
@@ -492,7 +493,7 @@ struct <link linkend="v4l2-jpegcompression">v4l2_jpegcompression</link> { | |||
492 | * you do, leave them untouched. | 493 | * you do, leave them untouched. |
493 | * Inluding less markers will make the | 494 | * Inluding less markers will make the |
494 | * resulting code smaller, but there will | 495 | * resulting code smaller, but there will |
495 | * be fewer aplications which can read it. | 496 | * be fewer applications which can read it. |
496 | * The presence of the APP and COM marker | 497 | * The presence of the APP and COM marker |
497 | * is influenced by APP_len and COM_len | 498 | * is influenced by APP_len and COM_len |
498 | * ONLY, not by this property! */ | 499 | * ONLY, not by this property! */ |
@@ -565,6 +566,7 @@ struct <link linkend="v4l2-framebuffer">v4l2_framebuffer</link> { | |||
565 | #define V4L2_FBUF_CAP_LOCAL_ALPHA 0x0010 | 566 | #define V4L2_FBUF_CAP_LOCAL_ALPHA 0x0010 |
566 | #define V4L2_FBUF_CAP_GLOBAL_ALPHA 0x0020 | 567 | #define V4L2_FBUF_CAP_GLOBAL_ALPHA 0x0020 |
567 | #define V4L2_FBUF_CAP_LOCAL_INV_ALPHA 0x0040 | 568 | #define V4L2_FBUF_CAP_LOCAL_INV_ALPHA 0x0040 |
569 | #define V4L2_FBUF_CAP_SRC_CHROMAKEY 0x0080 | ||
568 | /* Flags for the 'flags' field. */ | 570 | /* Flags for the 'flags' field. */ |
569 | #define V4L2_FBUF_FLAG_PRIMARY 0x0001 | 571 | #define V4L2_FBUF_FLAG_PRIMARY 0x0001 |
570 | #define V4L2_FBUF_FLAG_OVERLAY 0x0002 | 572 | #define V4L2_FBUF_FLAG_OVERLAY 0x0002 |
@@ -572,6 +574,7 @@ struct <link linkend="v4l2-framebuffer">v4l2_framebuffer</link> { | |||
572 | #define V4L2_FBUF_FLAG_LOCAL_ALPHA 0x0008 | 574 | #define V4L2_FBUF_FLAG_LOCAL_ALPHA 0x0008 |
573 | #define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010 | 575 | #define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010 |
574 | #define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020 | 576 | #define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020 |
577 | #define V4L2_FBUF_FLAG_SRC_CHROMAKEY 0x0040 | ||
575 | 578 | ||
576 | struct <link linkend="v4l2-clip">v4l2_clip</link> { | 579 | struct <link linkend="v4l2-clip">v4l2_clip</link> { |
577 | struct <link linkend="v4l2-rect">v4l2_rect</link> c; | 580 | struct <link linkend="v4l2-rect">v4l2_rect</link> c; |
@@ -731,6 +734,99 @@ struct <link linkend="v4l2-standard">v4l2_standard</link> { | |||
731 | }; | 734 | }; |
732 | 735 | ||
733 | /* | 736 | /* |
737 | * V I D E O T I M I N G S D V P R E S E T | ||
738 | */ | ||
739 | struct <link linkend="v4l2-dv-preset">v4l2_dv_preset</link> { | ||
740 | __u32 preset; | ||
741 | __u32 reserved[4]; | ||
742 | }; | ||
743 | |||
744 | /* | ||
745 | * D V P R E S E T S E N U M E R A T I O N | ||
746 | */ | ||
747 | struct <link linkend="v4l2-dv-enum-preset">v4l2_dv_enum_preset</link> { | ||
748 | __u32 index; | ||
749 | __u32 preset; | ||
750 | __u8 name[32]; /* Name of the preset timing */ | ||
751 | __u32 width; | ||
752 | __u32 height; | ||
753 | __u32 reserved[4]; | ||
754 | }; | ||
755 | |||
756 | /* | ||
757 | * D V P R E S E T V A L U E S | ||
758 | */ | ||
759 | #define V4L2_DV_INVALID 0 | ||
760 | #define V4L2_DV_480P59_94 1 /* BT.1362 */ | ||
761 | #define V4L2_DV_576P50 2 /* BT.1362 */ | ||
762 | #define V4L2_DV_720P24 3 /* SMPTE 296M */ | ||
763 | #define V4L2_DV_720P25 4 /* SMPTE 296M */ | ||
764 | #define V4L2_DV_720P30 5 /* SMPTE 296M */ | ||
765 | #define V4L2_DV_720P50 6 /* SMPTE 296M */ | ||
766 | #define V4L2_DV_720P59_94 7 /* SMPTE 274M */ | ||
767 | #define V4L2_DV_720P60 8 /* SMPTE 274M/296M */ | ||
768 | #define V4L2_DV_1080I29_97 9 /* BT.1120/ SMPTE 274M */ | ||
769 | #define V4L2_DV_1080I30 10 /* BT.1120/ SMPTE 274M */ | ||
770 | #define V4L2_DV_1080I25 11 /* BT.1120 */ | ||
771 | #define V4L2_DV_1080I50 12 /* SMPTE 296M */ | ||
772 | #define V4L2_DV_1080I60 13 /* SMPTE 296M */ | ||
773 | #define V4L2_DV_1080P24 14 /* SMPTE 296M */ | ||
774 | #define V4L2_DV_1080P25 15 /* SMPTE 296M */ | ||
775 | #define V4L2_DV_1080P30 16 /* SMPTE 296M */ | ||
776 | #define V4L2_DV_1080P50 17 /* BT.1120 */ | ||
777 | #define V4L2_DV_1080P60 18 /* BT.1120 */ | ||
778 | |||
779 | /* | ||
780 | * D V B T T I M I N G S | ||
781 | */ | ||
782 | |||
783 | /* BT.656/BT.1120 timing data */ | ||
784 | struct <link linkend="v4l2-bt-timings">v4l2_bt_timings</link> { | ||
785 | __u32 width; /* width in pixels */ | ||
786 | __u32 height; /* height in lines */ | ||
787 | __u32 interlaced; /* Interlaced or progressive */ | ||
788 | __u32 polarities; /* Positive or negative polarity */ | ||
789 | __u64 pixelclock; /* Pixel clock in HZ. Ex. 74.25MHz->74250000 */ | ||
790 | __u32 hfrontporch; /* Horizpontal front porch in pixels */ | ||
791 | __u32 hsync; /* Horizontal Sync length in pixels */ | ||
792 | __u32 hbackporch; /* Horizontal back porch in pixels */ | ||
793 | __u32 vfrontporch; /* Vertical front porch in pixels */ | ||
794 | __u32 vsync; /* Vertical Sync length in lines */ | ||
795 | __u32 vbackporch; /* Vertical back porch in lines */ | ||
796 | __u32 il_vfrontporch; /* Vertical front porch for bottom field of | ||
797 | * interlaced field formats | ||
798 | */ | ||
799 | __u32 il_vsync; /* Vertical sync length for bottom field of | ||
800 | * interlaced field formats | ||
801 | */ | ||
802 | __u32 il_vbackporch; /* Vertical back porch for bottom field of | ||
803 | * interlaced field formats | ||
804 | */ | ||
805 | __u32 reserved[16]; | ||
806 | } __attribute__ ((packed)); | ||
807 | |||
808 | /* Interlaced or progressive format */ | ||
809 | #define V4L2_DV_PROGRESSIVE 0 | ||
810 | #define V4L2_DV_INTERLACED 1 | ||
811 | |||
812 | /* Polarities. If bit is not set, it is assumed to be negative polarity */ | ||
813 | #define V4L2_DV_VSYNC_POS_POL 0x00000001 | ||
814 | #define V4L2_DV_HSYNC_POS_POL 0x00000002 | ||
815 | |||
816 | |||
817 | /* DV timings */ | ||
818 | struct <link linkend="v4l2-dv-timings">v4l2_dv_timings</link> { | ||
819 | __u32 type; | ||
820 | union { | ||
821 | struct <link linkend="v4l2-bt-timings">v4l2_bt_timings</link> bt; | ||
822 | __u32 reserved[32]; | ||
823 | }; | ||
824 | } __attribute__ ((packed)); | ||
825 | |||
826 | /* Values for the type field */ | ||
827 | #define V4L2_DV_BT_656_1120 0 /* BT.656/1120 timing type */ | ||
828 | |||
829 | /* | ||
734 | * V I D E O I N P U T S | 830 | * V I D E O I N P U T S |
735 | */ | 831 | */ |
736 | struct <link linkend="v4l2-input">v4l2_input</link> { | 832 | struct <link linkend="v4l2-input">v4l2_input</link> { |
@@ -741,7 +837,8 @@ struct <link linkend="v4l2-input">v4l2_input</link> { | |||
741 | __u32 tuner; /* Associated tuner */ | 837 | __u32 tuner; /* Associated tuner */ |
742 | v4l2_std_id std; | 838 | v4l2_std_id std; |
743 | __u32 status; | 839 | __u32 status; |
744 | __u32 reserved[4]; | 840 | __u32 capabilities; |
841 | __u32 reserved[3]; | ||
745 | }; | 842 | }; |
746 | 843 | ||
747 | /* Values for the 'type' field */ | 844 | /* Values for the 'type' field */ |
@@ -772,6 +869,11 @@ struct <link linkend="v4l2-input">v4l2_input</link> { | |||
772 | #define V4L2_IN_ST_NO_ACCESS 0x02000000 /* Conditional access denied */ | 869 | #define V4L2_IN_ST_NO_ACCESS 0x02000000 /* Conditional access denied */ |
773 | #define V4L2_IN_ST_VTR 0x04000000 /* VTR time constant */ | 870 | #define V4L2_IN_ST_VTR 0x04000000 /* VTR time constant */ |
774 | 871 | ||
872 | /* capabilities flags */ | ||
873 | #define V4L2_IN_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */ | ||
874 | #define V4L2_IN_CAP_CUSTOM_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */ | ||
875 | #define V4L2_IN_CAP_STD 0x00000004 /* Supports S_STD */ | ||
876 | |||
775 | /* | 877 | /* |
776 | * V I D E O O U T P U T S | 878 | * V I D E O O U T P U T S |
777 | */ | 879 | */ |
@@ -782,13 +884,19 @@ struct <link linkend="v4l2-output">v4l2_output</link> { | |||
782 | __u32 audioset; /* Associated audios (bitfield) */ | 884 | __u32 audioset; /* Associated audios (bitfield) */ |
783 | __u32 modulator; /* Associated modulator */ | 885 | __u32 modulator; /* Associated modulator */ |
784 | v4l2_std_id std; | 886 | v4l2_std_id std; |
785 | __u32 reserved[4]; | 887 | __u32 capabilities; |
888 | __u32 reserved[3]; | ||
786 | }; | 889 | }; |
787 | /* Values for the 'type' field */ | 890 | /* Values for the 'type' field */ |
788 | #define V4L2_OUTPUT_TYPE_MODULATOR 1 | 891 | #define V4L2_OUTPUT_TYPE_MODULATOR 1 |
789 | #define V4L2_OUTPUT_TYPE_ANALOG 2 | 892 | #define V4L2_OUTPUT_TYPE_ANALOG 2 |
790 | #define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3 | 893 | #define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3 |
791 | 894 | ||
895 | /* capabilities flags */ | ||
896 | #define V4L2_OUT_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */ | ||
897 | #define V4L2_OUT_CAP_CUSTOM_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */ | ||
898 | #define V4L2_OUT_CAP_STD 0x00000004 /* Supports S_STD */ | ||
899 | |||
792 | /* | 900 | /* |
793 | * C O N T R O L S | 901 | * C O N T R O L S |
794 | */ | 902 | */ |
@@ -914,8 +1022,10 @@ enum <link linkend="v4l2-colorfx">v4l2_colorfx</link> { | |||
914 | #define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) | 1022 | #define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) |
915 | #define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) | 1023 | #define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) |
916 | 1024 | ||
1025 | #define V4L2_CID_ROTATE (V4L2_CID_BASE+34) | ||
1026 | #define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35) | ||
917 | /* last CID + 1 */ | 1027 | /* last CID + 1 */ |
918 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+34) | 1028 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+36) |
919 | 1029 | ||
920 | /* MPEG-class control IDs defined by V4L2 */ | 1030 | /* MPEG-class control IDs defined by V4L2 */ |
921 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) | 1031 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) |
@@ -1621,6 +1731,13 @@ struct <link linkend="v4l2-dbg-chip-ident">v4l2_dbg_chip_ident</link> { | |||
1621 | #endif | 1731 | #endif |
1622 | 1732 | ||
1623 | #define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct <link linkend="v4l2-hw-freq-seek">v4l2_hw_freq_seek</link>) | 1733 | #define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct <link linkend="v4l2-hw-freq-seek">v4l2_hw_freq_seek</link>) |
1734 | #define VIDIOC_ENUM_DV_PRESETS _IOWR('V', 83, struct <link linkend="v4l2-dv-enum-preset">v4l2_dv_enum_preset</link>) | ||
1735 | #define VIDIOC_S_DV_PRESET _IOWR('V', 84, struct <link linkend="v4l2-dv-preset">v4l2_dv_preset</link>) | ||
1736 | #define VIDIOC_G_DV_PRESET _IOWR('V', 85, struct <link linkend="v4l2-dv-preset">v4l2_dv_preset</link>) | ||
1737 | #define VIDIOC_QUERY_DV_PRESET _IOR('V', 86, struct <link linkend="v4l2-dv-preset">v4l2_dv_preset</link>) | ||
1738 | #define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct <link linkend="v4l2-dv-timings">v4l2_dv_timings</link>) | ||
1739 | #define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct <link linkend="v4l2-dv-timings">v4l2_dv_timings</link>) | ||
1740 | |||
1624 | /* Reminder: when adding new ioctls please add support for them to | 1741 | /* Reminder: when adding new ioctls please add support for them to |
1625 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ | 1742 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ |
1626 | 1743 | ||
diff --git a/Documentation/DocBook/v4l/vidioc-enum-dv-presets.xml b/Documentation/DocBook/v4l/vidioc-enum-dv-presets.xml new file mode 100644 index 000000000000..1d31427edd1b --- /dev/null +++ b/Documentation/DocBook/v4l/vidioc-enum-dv-presets.xml | |||
@@ -0,0 +1,238 @@ | |||
1 | <refentry id="vidioc-enum-dv-presets"> | ||
2 | <refmeta> | ||
3 | <refentrytitle>ioctl VIDIOC_ENUM_DV_PRESETS</refentrytitle> | ||
4 | &manvol; | ||
5 | </refmeta> | ||
6 | |||
7 | <refnamediv> | ||
8 | <refname>VIDIOC_ENUM_DV_PRESETS</refname> | ||
9 | <refpurpose>Enumerate supported Digital Video presets</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_dv_enum_preset *<parameter>argp</parameter></paramdef> | ||
19 | </funcprototype> | ||
20 | </funcsynopsis> | ||
21 | </refsynopsisdiv> | ||
22 | |||
23 | <refsect1> | ||
24 | <title>Arguments</title> | ||
25 | |||
26 | <variablelist> | ||
27 | <varlistentry> | ||
28 | <term><parameter>fd</parameter></term> | ||
29 | <listitem> | ||
30 | <para>&fd;</para> | ||
31 | </listitem> | ||
32 | </varlistentry> | ||
33 | <varlistentry> | ||
34 | <term><parameter>request</parameter></term> | ||
35 | <listitem> | ||
36 | <para>VIDIOC_ENUM_DV_PRESETS</para> | ||
37 | </listitem> | ||
38 | </varlistentry> | ||
39 | <varlistentry> | ||
40 | <term><parameter>argp</parameter></term> | ||
41 | <listitem> | ||
42 | <para></para> | ||
43 | </listitem> | ||
44 | </varlistentry> | ||
45 | </variablelist> | ||
46 | </refsect1> | ||
47 | |||
48 | <refsect1> | ||
49 | <title>Description</title> | ||
50 | |||
51 | <para>To query the attributes of a DV preset, applications initialize the | ||
52 | <structfield>index</structfield> field and zero the reserved array of &v4l2-dv-enum-preset; | ||
53 | and call the <constant>VIDIOC_ENUM_DV_PRESETS</constant> ioctl with a pointer to this | ||
54 | structure. Drivers fill the rest of the structure or return an | ||
55 | &EINVAL; when the index is out of bounds. To enumerate all DV Presets supported, | ||
56 | applications shall begin at index zero, incrementing by one until the | ||
57 | driver returns <errorcode>EINVAL</errorcode>. Drivers may enumerate a | ||
58 | different set of DV presets after switching the video input or | ||
59 | output.</para> | ||
60 | |||
61 | <table pgwide="1" frame="none" id="v4l2-dv-enum-preset"> | ||
62 | <title>struct <structname>v4l2_dv_enum_presets</structname></title> | ||
63 | <tgroup cols="3"> | ||
64 | &cs-str; | ||
65 | <tbody valign="top"> | ||
66 | <row> | ||
67 | <entry>__u32</entry> | ||
68 | <entry><structfield>index</structfield></entry> | ||
69 | <entry>Number of the DV preset, set by the | ||
70 | application.</entry> | ||
71 | </row> | ||
72 | <row> | ||
73 | <entry>__u32</entry> | ||
74 | <entry><structfield>preset</structfield></entry> | ||
75 | <entry>This field identifies one of the DV preset values listed in <xref linkend="v4l2-dv-presets-vals"/>.</entry> | ||
76 | </row> | ||
77 | <row> | ||
78 | <entry>__u8</entry> | ||
79 | <entry><structfield>name</structfield>[24]</entry> | ||
80 | <entry>Name of the preset, a NUL-terminated ASCII string, for example: "720P-60", "1080I-60". This information is | ||
81 | intended for the user.</entry> | ||
82 | </row> | ||
83 | <row> | ||
84 | <entry>__u32</entry> | ||
85 | <entry><structfield>width</structfield></entry> | ||
86 | <entry>Width of the active video in pixels for the DV preset.</entry> | ||
87 | </row> | ||
88 | <row> | ||
89 | <entry>__u32</entry> | ||
90 | <entry><structfield>height</structfield></entry> | ||
91 | <entry>Height of the active video in lines for the DV preset.</entry> | ||
92 | </row> | ||
93 | <row> | ||
94 | <entry>__u32</entry> | ||
95 | <entry><structfield>reserved</structfield>[4]</entry> | ||
96 | <entry>Reserved for future extensions. Drivers must set the array to zero.</entry> | ||
97 | </row> | ||
98 | </tbody> | ||
99 | </tgroup> | ||
100 | </table> | ||
101 | |||
102 | <table pgwide="1" frame="none" id="v4l2-dv-presets-vals"> | ||
103 | <title>struct <structname>DV Presets</structname></title> | ||
104 | <tgroup cols="3"> | ||
105 | &cs-str; | ||
106 | <tbody valign="top"> | ||
107 | <row> | ||
108 | <entry>Preset</entry> | ||
109 | <entry>Preset value</entry> | ||
110 | <entry>Description</entry> | ||
111 | </row> | ||
112 | <row> | ||
113 | <entry></entry> | ||
114 | <entry></entry> | ||
115 | <entry></entry> | ||
116 | </row> | ||
117 | <row> | ||
118 | <entry>V4L2_DV_INVALID</entry> | ||
119 | <entry>0</entry> | ||
120 | <entry>Invalid preset value.</entry> | ||
121 | </row> | ||
122 | <row> | ||
123 | <entry>V4L2_DV_480P59_94</entry> | ||
124 | <entry>1</entry> | ||
125 | <entry>720x480 progressive video at 59.94 fps as per BT.1362.</entry> | ||
126 | </row> | ||
127 | <row> | ||
128 | <entry>V4L2_DV_576P50</entry> | ||
129 | <entry>2</entry> | ||
130 | <entry>720x576 progressive video at 50 fps as per BT.1362.</entry> | ||
131 | </row> | ||
132 | <row> | ||
133 | <entry>V4L2_DV_720P24</entry> | ||
134 | <entry>3</entry> | ||
135 | <entry>1280x720 progressive video at 24 fps as per SMPTE 296M.</entry> | ||
136 | </row> | ||
137 | <row> | ||
138 | <entry>V4L2_DV_720P25</entry> | ||
139 | <entry>4</entry> | ||
140 | <entry>1280x720 progressive video at 25 fps as per SMPTE 296M.</entry> | ||
141 | </row> | ||
142 | <row> | ||
143 | <entry>V4L2_DV_720P30</entry> | ||
144 | <entry>5</entry> | ||
145 | <entry>1280x720 progressive video at 30 fps as per SMPTE 296M.</entry> | ||
146 | </row> | ||
147 | <row> | ||
148 | <entry>V4L2_DV_720P50</entry> | ||
149 | <entry>6</entry> | ||
150 | <entry>1280x720 progressive video at 50 fps as per SMPTE 296M.</entry> | ||
151 | </row> | ||
152 | <row> | ||
153 | <entry>V4L2_DV_720P59_94</entry> | ||
154 | <entry>7</entry> | ||
155 | <entry>1280x720 progressive video at 59.94 fps as per SMPTE 274M.</entry> | ||
156 | </row> | ||
157 | <row> | ||
158 | <entry>V4L2_DV_720P60</entry> | ||
159 | <entry>8</entry> | ||
160 | <entry>1280x720 progressive video at 60 fps as per SMPTE 274M/296M.</entry> | ||
161 | </row> | ||
162 | <row> | ||
163 | <entry>V4L2_DV_1080I29_97</entry> | ||
164 | <entry>9</entry> | ||
165 | <entry>1920x1080 interlaced video at 29.97 fps as per BT.1120/SMPTE 274M.</entry> | ||
166 | </row> | ||
167 | <row> | ||
168 | <entry>V4L2_DV_1080I30</entry> | ||
169 | <entry>10</entry> | ||
170 | <entry>1920x1080 interlaced video at 30 fps as per BT.1120/SMPTE 274M.</entry> | ||
171 | </row> | ||
172 | <row> | ||
173 | <entry>V4L2_DV_1080I25</entry> | ||
174 | <entry>11</entry> | ||
175 | <entry>1920x1080 interlaced video at 25 fps as per BT.1120.</entry> | ||
176 | </row> | ||
177 | <row> | ||
178 | <entry>V4L2_DV_1080I50</entry> | ||
179 | <entry>12</entry> | ||
180 | <entry>1920x1080 interlaced video at 50 fps as per SMPTE 296M.</entry> | ||
181 | </row> | ||
182 | <row> | ||
183 | <entry>V4L2_DV_1080I60</entry> | ||
184 | <entry>13</entry> | ||
185 | <entry>1920x1080 interlaced video at 60 fps as per SMPTE 296M.</entry> | ||
186 | </row> | ||
187 | <row> | ||
188 | <entry>V4L2_DV_1080P24</entry> | ||
189 | <entry>14</entry> | ||
190 | <entry>1920x1080 progressive video at 24 fps as per SMPTE 296M.</entry> | ||
191 | </row> | ||
192 | <row> | ||
193 | <entry>V4L2_DV_1080P25</entry> | ||
194 | <entry>15</entry> | ||
195 | <entry>1920x1080 progressive video at 25 fps as per SMPTE 296M.</entry> | ||
196 | </row> | ||
197 | <row> | ||
198 | <entry>V4L2_DV_1080P30</entry> | ||
199 | <entry>16</entry> | ||
200 | <entry>1920x1080 progressive video at 30 fps as per SMPTE 296M.</entry> | ||
201 | </row> | ||
202 | <row> | ||
203 | <entry>V4L2_DV_1080P50</entry> | ||
204 | <entry>17</entry> | ||
205 | <entry>1920x1080 progressive video at 50 fps as per BT.1120.</entry> | ||
206 | </row> | ||
207 | <row> | ||
208 | <entry>V4L2_DV_1080P60</entry> | ||
209 | <entry>18</entry> | ||
210 | <entry>1920x1080 progressive video at 60 fps as per BT.1120.</entry> | ||
211 | </row> | ||
212 | </tbody> | ||
213 | </tgroup> | ||
214 | </table> | ||
215 | </refsect1> | ||
216 | |||
217 | <refsect1> | ||
218 | &return-value; | ||
219 | |||
220 | <variablelist> | ||
221 | <varlistentry> | ||
222 | <term><errorcode>EINVAL</errorcode></term> | ||
223 | <listitem> | ||
224 | <para>The &v4l2-dv-enum-preset; <structfield>index</structfield> | ||
225 | is out of bounds.</para> | ||
226 | </listitem> | ||
227 | </varlistentry> | ||
228 | </variablelist> | ||
229 | </refsect1> | ||
230 | </refentry> | ||
231 | |||
232 | <!-- | ||
233 | Local Variables: | ||
234 | mode: sgml | ||
235 | sgml-parent-document: "v4l2.sgml" | ||
236 | indent-tabs-mode: nil | ||
237 | End: | ||
238 | --> | ||
diff --git a/Documentation/DocBook/v4l/vidioc-enuminput.xml b/Documentation/DocBook/v4l/vidioc-enuminput.xml index 414856b82473..71b868e2fb8f 100644 --- a/Documentation/DocBook/v4l/vidioc-enuminput.xml +++ b/Documentation/DocBook/v4l/vidioc-enuminput.xml | |||
@@ -124,7 +124,13 @@ current input.</entry> | |||
124 | </row> | 124 | </row> |
125 | <row> | 125 | <row> |
126 | <entry>__u32</entry> | 126 | <entry>__u32</entry> |
127 | <entry><structfield>reserved</structfield>[4]</entry> | 127 | <entry><structfield>capabilities</structfield></entry> |
128 | <entry>This field provides capabilities for the | ||
129 | input. See <xref linkend="input-capabilities" /> for flags.</entry> | ||
130 | </row> | ||
131 | <row> | ||
132 | <entry>__u32</entry> | ||
133 | <entry><structfield>reserved</structfield>[3]</entry> | ||
128 | <entry>Reserved for future extensions. Drivers must set | 134 | <entry>Reserved for future extensions. Drivers must set |
129 | the array to zero.</entry> | 135 | the array to zero.</entry> |
130 | </row> | 136 | </row> |
@@ -261,6 +267,34 @@ flag is set Macrovision has been detected.</entry> | |||
261 | </tbody> | 267 | </tbody> |
262 | </tgroup> | 268 | </tgroup> |
263 | </table> | 269 | </table> |
270 | |||
271 | <!-- Capability flags based on video timings RFC by Muralidharan | ||
272 | Karicheri, titled RFC (v1.2): V4L - Support for video timings at the | ||
273 | input/output interface to linux-media@vger.kernel.org on 19 Oct 2009. | ||
274 | --> | ||
275 | <table frame="none" pgwide="1" id="input-capabilities"> | ||
276 | <title>Input capabilities</title> | ||
277 | <tgroup cols="3"> | ||
278 | &cs-def; | ||
279 | <tbody valign="top"> | ||
280 | <row> | ||
281 | <entry><constant>V4L2_IN_CAP_PRESETS</constant></entry> | ||
282 | <entry>0x00000001</entry> | ||
283 | <entry>This input supports setting DV presets by using VIDIOC_S_DV_PRESET.</entry> | ||
284 | </row> | ||
285 | <row> | ||
286 | <entry><constant>V4L2_OUT_CAP_CUSTOM_TIMINGS</constant></entry> | ||
287 | <entry>0x00000002</entry> | ||
288 | <entry>This input supports setting custom video timings by using VIDIOC_S_DV_TIMINGS.</entry> | ||
289 | </row> | ||
290 | <row> | ||
291 | <entry><constant>V4L2_IN_CAP_STD</constant></entry> | ||
292 | <entry>0x00000004</entry> | ||
293 | <entry>This input supports setting the TV standard by using VIDIOC_S_STD.</entry> | ||
294 | </row> | ||
295 | </tbody> | ||
296 | </tgroup> | ||
297 | </table> | ||
264 | </refsect1> | 298 | </refsect1> |
265 | 299 | ||
266 | <refsect1> | 300 | <refsect1> |
diff --git a/Documentation/DocBook/v4l/vidioc-enumoutput.xml b/Documentation/DocBook/v4l/vidioc-enumoutput.xml index e8d16dcd50cf..a281d26a195f 100644 --- a/Documentation/DocBook/v4l/vidioc-enumoutput.xml +++ b/Documentation/DocBook/v4l/vidioc-enumoutput.xml | |||
@@ -114,7 +114,13 @@ details on video standards and how to switch see <xref | |||
114 | </row> | 114 | </row> |
115 | <row> | 115 | <row> |
116 | <entry>__u32</entry> | 116 | <entry>__u32</entry> |
117 | <entry><structfield>reserved</structfield>[4]</entry> | 117 | <entry><structfield>capabilities</structfield></entry> |
118 | <entry>This field provides capabilities for the | ||
119 | output. See <xref linkend="output-capabilities" /> for flags.</entry> | ||
120 | </row> | ||
121 | <row> | ||
122 | <entry>__u32</entry> | ||
123 | <entry><structfield>reserved</structfield>[3]</entry> | ||
118 | <entry>Reserved for future extensions. Drivers must set | 124 | <entry>Reserved for future extensions. Drivers must set |
119 | the array to zero.</entry> | 125 | the array to zero.</entry> |
120 | </row> | 126 | </row> |
@@ -147,6 +153,34 @@ CVBS, S-Video, RGB.</entry> | |||
147 | </tgroup> | 153 | </tgroup> |
148 | </table> | 154 | </table> |
149 | 155 | ||
156 | <!-- Capabilities flags based on video timings RFC by Muralidharan | ||
157 | Karicheri, titled RFC (v1.2): V4L - Support for video timings at the | ||
158 | input/output interface to linux-media@vger.kernel.org on 19 Oct 2009. | ||
159 | --> | ||
160 | <table frame="none" pgwide="1" id="output-capabilities"> | ||
161 | <title>Output capabilities</title> | ||
162 | <tgroup cols="3"> | ||
163 | &cs-def; | ||
164 | <tbody valign="top"> | ||
165 | <row> | ||
166 | <entry><constant>V4L2_OUT_CAP_PRESETS</constant></entry> | ||
167 | <entry>0x00000001</entry> | ||
168 | <entry>This output supports setting DV presets by using VIDIOC_S_DV_PRESET.</entry> | ||
169 | </row> | ||
170 | <row> | ||
171 | <entry><constant>V4L2_OUT_CAP_CUSTOM_TIMINGS</constant></entry> | ||
172 | <entry>0x00000002</entry> | ||
173 | <entry>This output supports setting custom video timings by using VIDIOC_S_DV_TIMINGS.</entry> | ||
174 | </row> | ||
175 | <row> | ||
176 | <entry><constant>V4L2_OUT_CAP_STD</constant></entry> | ||
177 | <entry>0x00000004</entry> | ||
178 | <entry>This output supports setting the TV standard by using VIDIOC_S_STD.</entry> | ||
179 | </row> | ||
180 | </tbody> | ||
181 | </tgroup> | ||
182 | </table> | ||
183 | |||
150 | </refsect1> | 184 | </refsect1> |
151 | <refsect1> | 185 | <refsect1> |
152 | &return-value; | 186 | &return-value; |
diff --git a/Documentation/DocBook/v4l/vidioc-g-dv-preset.xml b/Documentation/DocBook/v4l/vidioc-g-dv-preset.xml new file mode 100644 index 000000000000..3c6784e132f3 --- /dev/null +++ b/Documentation/DocBook/v4l/vidioc-g-dv-preset.xml | |||
@@ -0,0 +1,111 @@ | |||
1 | <refentry id="vidioc-g-dv-preset"> | ||
2 | <refmeta> | ||
3 | <refentrytitle>ioctl VIDIOC_G_DV_PRESET, VIDIOC_S_DV_PRESET</refentrytitle> | ||
4 | &manvol; | ||
5 | </refmeta> | ||
6 | |||
7 | <refnamediv> | ||
8 | <refname>VIDIOC_G_DV_PRESET</refname> | ||
9 | <refname>VIDIOC_S_DV_PRESET</refname> | ||
10 | <refpurpose>Query or select the DV preset of the current input or output</refpurpose> | ||
11 | </refnamediv> | ||
12 | |||
13 | <refsynopsisdiv> | ||
14 | <funcsynopsis> | ||
15 | <funcprototype> | ||
16 | <funcdef>int <function>ioctl</function></funcdef> | ||
17 | <paramdef>int <parameter>fd</parameter></paramdef> | ||
18 | <paramdef>int <parameter>request</parameter></paramdef> | ||
19 | <paramdef>&v4l2-dv-preset; | ||
20 | *<parameter>argp</parameter></paramdef> | ||
21 | </funcprototype> | ||
22 | </funcsynopsis> | ||
23 | </refsynopsisdiv> | ||
24 | |||
25 | <refsect1> | ||
26 | <title>Arguments</title> | ||
27 | |||
28 | <variablelist> | ||
29 | <varlistentry> | ||
30 | <term><parameter>fd</parameter></term> | ||
31 | <listitem> | ||
32 | <para>&fd;</para> | ||
33 | </listitem> | ||
34 | </varlistentry> | ||
35 | <varlistentry> | ||
36 | <term><parameter>request</parameter></term> | ||
37 | <listitem> | ||
38 | <para>VIDIOC_G_DV_PRESET, VIDIOC_S_DV_PRESET</para> | ||
39 | </listitem> | ||
40 | </varlistentry> | ||
41 | <varlistentry> | ||
42 | <term><parameter>argp</parameter></term> | ||
43 | <listitem> | ||
44 | <para></para> | ||
45 | </listitem> | ||
46 | </varlistentry> | ||
47 | </variablelist> | ||
48 | </refsect1> | ||
49 | |||
50 | <refsect1> | ||
51 | <title>Description</title> | ||
52 | <para>To query and select the current DV preset, applications | ||
53 | use the <constant>VIDIOC_G_DV_PRESET</constant> and <constant>VIDIOC_S_DV_PRESET</constant> | ||
54 | ioctls which take a pointer to a &v4l2-dv-preset; type as argument. | ||
55 | Applications must zero the reserved array in &v4l2-dv-preset;. | ||
56 | <constant>VIDIOC_G_DV_PRESET</constant> returns a dv preset in the field | ||
57 | <structfield>preset</structfield> of &v4l2-dv-preset;.</para> | ||
58 | |||
59 | <para><constant>VIDIOC_S_DV_PRESET</constant> accepts a pointer to a &v4l2-dv-preset; | ||
60 | that has the preset value to be set. Applications must zero the reserved array in &v4l2-dv-preset;. | ||
61 | If the preset is not supported, it returns an &EINVAL; </para> | ||
62 | </refsect1> | ||
63 | |||
64 | <refsect1> | ||
65 | &return-value; | ||
66 | |||
67 | <variablelist> | ||
68 | <varlistentry> | ||
69 | <term><errorcode>EINVAL</errorcode></term> | ||
70 | <listitem> | ||
71 | <para>This ioctl is not supported, or the | ||
72 | <constant>VIDIOC_S_DV_PRESET</constant>,<constant>VIDIOC_S_DV_PRESET</constant> parameter was unsuitable.</para> | ||
73 | </listitem> | ||
74 | </varlistentry> | ||
75 | <varlistentry> | ||
76 | <term><errorcode>EBUSY</errorcode></term> | ||
77 | <listitem> | ||
78 | <para>The device is busy and therefore can not change the preset.</para> | ||
79 | </listitem> | ||
80 | </varlistentry> | ||
81 | </variablelist> | ||
82 | |||
83 | <table pgwide="1" frame="none" id="v4l2-dv-preset"> | ||
84 | <title>struct <structname>v4l2_dv_preset</structname></title> | ||
85 | <tgroup cols="3"> | ||
86 | &cs-str; | ||
87 | <tbody valign="top"> | ||
88 | <row> | ||
89 | <entry>__u32</entry> | ||
90 | <entry><structfield>preset</structfield></entry> | ||
91 | <entry>Preset value to represent the digital video timings</entry> | ||
92 | </row> | ||
93 | <row> | ||
94 | <entry>__u32</entry> | ||
95 | <entry><structfield>reserved[4]</structfield></entry> | ||
96 | <entry>Reserved fields for future use</entry> | ||
97 | </row> | ||
98 | </tbody> | ||
99 | </tgroup> | ||
100 | </table> | ||
101 | |||
102 | </refsect1> | ||
103 | </refentry> | ||
104 | |||
105 | <!-- | ||
106 | Local Variables: | ||
107 | mode: sgml | ||
108 | sgml-parent-document: "v4l2.sgml" | ||
109 | indent-tabs-mode: nil | ||
110 | End: | ||
111 | --> | ||
diff --git a/Documentation/DocBook/v4l/vidioc-g-dv-timings.xml b/Documentation/DocBook/v4l/vidioc-g-dv-timings.xml new file mode 100644 index 000000000000..ecc19576bb8f --- /dev/null +++ b/Documentation/DocBook/v4l/vidioc-g-dv-timings.xml | |||
@@ -0,0 +1,224 @@ | |||
1 | <refentry id="vidioc-g-dv-timings"> | ||
2 | <refmeta> | ||
3 | <refentrytitle>ioctl VIDIOC_G_DV_TIMINGS, VIDIOC_S_DV_TIMINGS</refentrytitle> | ||
4 | &manvol; | ||
5 | </refmeta> | ||
6 | |||
7 | <refnamediv> | ||
8 | <refname>VIDIOC_G_DV_TIMINGS</refname> | ||
9 | <refname>VIDIOC_S_DV_TIMINGS</refname> | ||
10 | <refpurpose>Get or set custom DV timings for input or output</refpurpose> | ||
11 | </refnamediv> | ||
12 | |||
13 | <refsynopsisdiv> | ||
14 | <funcsynopsis> | ||
15 | <funcprototype> | ||
16 | <funcdef>int <function>ioctl</function></funcdef> | ||
17 | <paramdef>int <parameter>fd</parameter></paramdef> | ||
18 | <paramdef>int <parameter>request</parameter></paramdef> | ||
19 | <paramdef>&v4l2-dv-timings; | ||
20 | *<parameter>argp</parameter></paramdef> | ||
21 | </funcprototype> | ||
22 | </funcsynopsis> | ||
23 | </refsynopsisdiv> | ||
24 | |||
25 | <refsect1> | ||
26 | <title>Arguments</title> | ||
27 | |||
28 | <variablelist> | ||
29 | <varlistentry> | ||
30 | <term><parameter>fd</parameter></term> | ||
31 | <listitem> | ||
32 | <para>&fd;</para> | ||
33 | </listitem> | ||
34 | </varlistentry> | ||
35 | <varlistentry> | ||
36 | <term><parameter>request</parameter></term> | ||
37 | <listitem> | ||
38 | <para>VIDIOC_G_DV_TIMINGS, VIDIOC_S_DV_TIMINGS</para> | ||
39 | </listitem> | ||
40 | </varlistentry> | ||
41 | <varlistentry> | ||
42 | <term><parameter>argp</parameter></term> | ||
43 | <listitem> | ||
44 | <para></para> | ||
45 | </listitem> | ||
46 | </varlistentry> | ||
47 | </variablelist> | ||
48 | </refsect1> | ||
49 | |||
50 | <refsect1> | ||
51 | <title>Description</title> | ||
52 | <para>To set custom DV timings for the input or output, applications use the | ||
53 | <constant>VIDIOC_S_DV_TIMINGS</constant> ioctl and to get the current custom timings, | ||
54 | applications use the <constant>VIDIOC_G_DV_TIMINGS</constant> ioctl. The detailed timing | ||
55 | information is filled in using the structure &v4l2-dv-timings;. These ioctls take | ||
56 | a pointer to the &v4l2-dv-timings; structure as argument. If the ioctl is not supported | ||
57 | or the timing values are not correct, the driver returns &EINVAL;.</para> | ||
58 | </refsect1> | ||
59 | |||
60 | <refsect1> | ||
61 | &return-value; | ||
62 | |||
63 | <variablelist> | ||
64 | <varlistentry> | ||
65 | <term><errorcode>EINVAL</errorcode></term> | ||
66 | <listitem> | ||
67 | <para>This ioctl is not supported, or the | ||
68 | <constant>VIDIOC_S_DV_TIMINGS</constant> parameter was unsuitable.</para> | ||
69 | </listitem> | ||
70 | </varlistentry> | ||
71 | <varlistentry> | ||
72 | <term><errorcode>EBUSY</errorcode></term> | ||
73 | <listitem> | ||
74 | <para>The device is busy and therefore can not change the timings.</para> | ||
75 | </listitem> | ||
76 | </varlistentry> | ||
77 | </variablelist> | ||
78 | |||
79 | <table pgwide="1" frame="none" id="v4l2-bt-timings"> | ||
80 | <title>struct <structname>v4l2_bt_timings</structname></title> | ||
81 | <tgroup cols="3"> | ||
82 | &cs-str; | ||
83 | <tbody valign="top"> | ||
84 | <row> | ||
85 | <entry>__u32</entry> | ||
86 | <entry><structfield>width</structfield></entry> | ||
87 | <entry>Width of the active video in pixels</entry> | ||
88 | </row> | ||
89 | <row> | ||
90 | <entry>__u32</entry> | ||
91 | <entry><structfield>height</structfield></entry> | ||
92 | <entry>Height of the active video in lines</entry> | ||
93 | </row> | ||
94 | <row> | ||
95 | <entry>__u32</entry> | ||
96 | <entry><structfield>interlaced</structfield></entry> | ||
97 | <entry>Progressive (0) or interlaced (1)</entry> | ||
98 | </row> | ||
99 | <row> | ||
100 | <entry>__u32</entry> | ||
101 | <entry><structfield>polarities</structfield></entry> | ||
102 | <entry>This is a bit mask that defines polarities of sync signals. | ||
103 | bit 0 (V4L2_DV_VSYNC_POS_POL) is for vertical sync polarity and bit 1 (V4L2_DV_HSYNC_POS_POL) is for horizontal sync polarity. If the bit is set | ||
104 | (1) it is positive polarity and if is cleared (0), it is negative polarity.</entry> | ||
105 | </row> | ||
106 | <row> | ||
107 | <entry>__u64</entry> | ||
108 | <entry><structfield>pixelclock</structfield></entry> | ||
109 | <entry>Pixel clock in Hz. Ex. 74.25MHz->74250000</entry> | ||
110 | </row> | ||
111 | <row> | ||
112 | <entry>__u32</entry> | ||
113 | <entry><structfield>hfrontporch</structfield></entry> | ||
114 | <entry>Horizontal front porch in pixels</entry> | ||
115 | </row> | ||
116 | <row> | ||
117 | <entry>__u32</entry> | ||
118 | <entry><structfield>hsync</structfield></entry> | ||
119 | <entry>Horizontal sync length in pixels</entry> | ||
120 | </row> | ||
121 | <row> | ||
122 | <entry>__u32</entry> | ||
123 | <entry><structfield>hbackporch</structfield></entry> | ||
124 | <entry>Horizontal back porch in pixels</entry> | ||
125 | </row> | ||
126 | <row> | ||
127 | <entry>__u32</entry> | ||
128 | <entry><structfield>vfrontporch</structfield></entry> | ||
129 | <entry>Vertical front porch in lines</entry> | ||
130 | </row> | ||
131 | <row> | ||
132 | <entry>__u32</entry> | ||
133 | <entry><structfield>vsync</structfield></entry> | ||
134 | <entry>Vertical sync length in lines</entry> | ||
135 | </row> | ||
136 | <row> | ||
137 | <entry>__u32</entry> | ||
138 | <entry><structfield>vbackporch</structfield></entry> | ||
139 | <entry>Vertical back porch in lines</entry> | ||
140 | </row> | ||
141 | <row> | ||
142 | <entry>__u32</entry> | ||
143 | <entry><structfield>il_vfrontporch</structfield></entry> | ||
144 | <entry>Vertical front porch in lines for bottom field of interlaced field formats</entry> | ||
145 | </row> | ||
146 | <row> | ||
147 | <entry>__u32</entry> | ||
148 | <entry><structfield>il_vsync</structfield></entry> | ||
149 | <entry>Vertical sync length in lines for bottom field of interlaced field formats</entry> | ||
150 | </row> | ||
151 | <row> | ||
152 | <entry>__u32</entry> | ||
153 | <entry><structfield>il_vbackporch</structfield></entry> | ||
154 | <entry>Vertical back porch in lines for bottom field of interlaced field formats</entry> | ||
155 | </row> | ||
156 | </tbody> | ||
157 | </tgroup> | ||
158 | </table> | ||
159 | |||
160 | <table pgwide="1" frame="none" id="v4l2-dv-timings"> | ||
161 | <title>struct <structname>v4l2_dv_timings</structname></title> | ||
162 | <tgroup cols="4"> | ||
163 | &cs-str; | ||
164 | <tbody valign="top"> | ||
165 | <row> | ||
166 | <entry>__u32</entry> | ||
167 | <entry><structfield>type</structfield></entry> | ||
168 | <entry></entry> | ||
169 | <entry>Type of DV timings as listed in <xref linkend="dv-timing-types"/>.</entry> | ||
170 | </row> | ||
171 | <row> | ||
172 | <entry>union</entry> | ||
173 | <entry><structfield></structfield></entry> | ||
174 | <entry></entry> | ||
175 | </row> | ||
176 | <row> | ||
177 | <entry></entry> | ||
178 | <entry>&v4l2-bt-timings;</entry> | ||
179 | <entry><structfield>bt</structfield></entry> | ||
180 | <entry>Timings defined by BT.656/1120 specifications</entry> | ||
181 | </row> | ||
182 | <row> | ||
183 | <entry></entry> | ||
184 | <entry>__u32</entry> | ||
185 | <entry><structfield>reserved</structfield>[32]</entry> | ||
186 | <entry></entry> | ||
187 | </row> | ||
188 | </tbody> | ||
189 | </tgroup> | ||
190 | </table> | ||
191 | |||
192 | <table pgwide="1" frame="none" id="dv-timing-types"> | ||
193 | <title>DV Timing types</title> | ||
194 | <tgroup cols="3"> | ||
195 | &cs-str; | ||
196 | <tbody valign="top"> | ||
197 | <row> | ||
198 | <entry>Timing type</entry> | ||
199 | <entry>value</entry> | ||
200 | <entry>Description</entry> | ||
201 | </row> | ||
202 | <row> | ||
203 | <entry></entry> | ||
204 | <entry></entry> | ||
205 | <entry></entry> | ||
206 | </row> | ||
207 | <row> | ||
208 | <entry>V4L2_DV_BT_656_1120</entry> | ||
209 | <entry>0</entry> | ||
210 | <entry>BT.656/1120 timings</entry> | ||
211 | </row> | ||
212 | </tbody> | ||
213 | </tgroup> | ||
214 | </table> | ||
215 | </refsect1> | ||
216 | </refentry> | ||
217 | |||
218 | <!-- | ||
219 | Local Variables: | ||
220 | mode: sgml | ||
221 | sgml-parent-document: "v4l2.sgml" | ||
222 | indent-tabs-mode: nil | ||
223 | End: | ||
224 | --> | ||
diff --git a/Documentation/DocBook/v4l/vidioc-g-fbuf.xml b/Documentation/DocBook/v4l/vidioc-g-fbuf.xml index f7017062656e..e7dda4822f04 100644 --- a/Documentation/DocBook/v4l/vidioc-g-fbuf.xml +++ b/Documentation/DocBook/v4l/vidioc-g-fbuf.xml | |||
@@ -336,6 +336,13 @@ alpha value. Alpha blending makes no sense for destructive overlays.</entry> | |||
336 | inverted alpha channel of the framebuffer or VGA signal. Alpha | 336 | inverted alpha channel of the framebuffer or VGA signal. Alpha |
337 | blending makes no sense for destructive overlays.</entry> | 337 | blending makes no sense for destructive overlays.</entry> |
338 | </row> | 338 | </row> |
339 | <row> | ||
340 | <entry><constant>V4L2_FBUF_CAP_SRC_CHROMAKEY</constant></entry> | ||
341 | <entry>0x0080</entry> | ||
342 | <entry>The device supports Source Chroma-keying. Framebuffer pixels | ||
343 | with the chroma-key colors are replaced by video pixels, which is exactly opposite of | ||
344 | <constant>V4L2_FBUF_CAP_CHROMAKEY</constant></entry> | ||
345 | </row> | ||
339 | </tbody> | 346 | </tbody> |
340 | </tgroup> | 347 | </tgroup> |
341 | </table> | 348 | </table> |
@@ -411,6 +418,16 @@ images, but with an inverted alpha value. The blend function is: | |||
411 | output = framebuffer pixel * (1 - alpha) + video pixel * alpha. The | 418 | output = framebuffer pixel * (1 - alpha) + video pixel * alpha. The |
412 | actual alpha depth depends on the framebuffer pixel format.</entry> | 419 | actual alpha depth depends on the framebuffer pixel format.</entry> |
413 | </row> | 420 | </row> |
421 | <row> | ||
422 | <entry><constant>V4L2_FBUF_FLAG_SRC_CHROMAKEY</constant></entry> | ||
423 | <entry>0x0040</entry> | ||
424 | <entry>Use source chroma-keying. The source chroma-key color is | ||
425 | determined by the <structfield>chromakey</structfield> field of | ||
426 | &v4l2-window; and negotiated with the &VIDIOC-S-FMT; ioctl, see <xref | ||
427 | linkend="overlay" /> and <xref linkend="osd" />. | ||
428 | Both chroma-keying are mutual exclusive to each other, so same | ||
429 | <structfield>chromakey</structfield> field of &v4l2-window; is being used.</entry> | ||
430 | </row> | ||
414 | </tbody> | 431 | </tbody> |
415 | </tgroup> | 432 | </tgroup> |
416 | </table> | 433 | </table> |
diff --git a/Documentation/DocBook/v4l/vidioc-g-std.xml b/Documentation/DocBook/v4l/vidioc-g-std.xml index b6f5d267e856..912f8513e5da 100644 --- a/Documentation/DocBook/v4l/vidioc-g-std.xml +++ b/Documentation/DocBook/v4l/vidioc-g-std.xml | |||
@@ -86,6 +86,12 @@ standards.</para> | |||
86 | <constant>VIDIOC_S_STD</constant> parameter was unsuitable.</para> | 86 | <constant>VIDIOC_S_STD</constant> parameter was unsuitable.</para> |
87 | </listitem> | 87 | </listitem> |
88 | </varlistentry> | 88 | </varlistentry> |
89 | <varlistentry> | ||
90 | <term><errorcode>EBUSY</errorcode></term> | ||
91 | <listitem> | ||
92 | <para>The device is busy and therefore can not change the standard</para> | ||
93 | </listitem> | ||
94 | </varlistentry> | ||
89 | </variablelist> | 95 | </variablelist> |
90 | </refsect1> | 96 | </refsect1> |
91 | </refentry> | 97 | </refentry> |
diff --git a/Documentation/DocBook/v4l/vidioc-query-dv-preset.xml b/Documentation/DocBook/v4l/vidioc-query-dv-preset.xml new file mode 100644 index 000000000000..87e4f0f6151c --- /dev/null +++ b/Documentation/DocBook/v4l/vidioc-query-dv-preset.xml | |||
@@ -0,0 +1,85 @@ | |||
1 | <refentry id="vidioc-query-dv-preset"> | ||
2 | <refmeta> | ||
3 | <refentrytitle>ioctl VIDIOC_QUERY_DV_PRESET</refentrytitle> | ||
4 | &manvol; | ||
5 | </refmeta> | ||
6 | |||
7 | <refnamediv> | ||
8 | <refname>VIDIOC_QUERY_DV_PRESET</refname> | ||
9 | <refpurpose>Sense the DV preset received by the current | ||
10 | input</refpurpose> | ||
11 | </refnamediv> | ||
12 | |||
13 | <refsynopsisdiv> | ||
14 | <funcsynopsis> | ||
15 | <funcprototype> | ||
16 | <funcdef>int <function>ioctl</function></funcdef> | ||
17 | <paramdef>int <parameter>fd</parameter></paramdef> | ||
18 | <paramdef>int <parameter>request</parameter></paramdef> | ||
19 | <paramdef>&v4l2-dv-preset; *<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_QUERY_DV_PRESET</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 | <para>The hardware may be able to detect the current DV preset | ||
53 | automatically, similar to sensing the video standard. To do so, applications | ||
54 | call <constant> VIDIOC_QUERY_DV_PRESET</constant> with a pointer to a | ||
55 | &v4l2-dv-preset; type. Once the hardware detects a preset, that preset is | ||
56 | returned in the preset field of &v4l2-dv-preset;. When detection is not | ||
57 | possible or fails, the value V4L2_DV_INVALID is returned.</para> | ||
58 | </refsect1> | ||
59 | |||
60 | <refsect1> | ||
61 | &return-value; | ||
62 | <variablelist> | ||
63 | <varlistentry> | ||
64 | <term><errorcode>EINVAL</errorcode></term> | ||
65 | <listitem> | ||
66 | <para>This ioctl is not supported.</para> | ||
67 | </listitem> | ||
68 | </varlistentry> | ||
69 | <varlistentry> | ||
70 | <term><errorcode>EBUSY</errorcode></term> | ||
71 | <listitem> | ||
72 | <para>The device is busy and therefore can not sense the preset</para> | ||
73 | </listitem> | ||
74 | </varlistentry> | ||
75 | </variablelist> | ||
76 | </refsect1> | ||
77 | </refentry> | ||
78 | |||
79 | <!-- | ||
80 | Local Variables: | ||
81 | mode: sgml | ||
82 | sgml-parent-document: "v4l2.sgml" | ||
83 | indent-tabs-mode: nil | ||
84 | End: | ||
85 | --> | ||
diff --git a/Documentation/DocBook/v4l/vidioc-querystd.xml b/Documentation/DocBook/v4l/vidioc-querystd.xml index b5a7ff934486..1a9e60393091 100644 --- a/Documentation/DocBook/v4l/vidioc-querystd.xml +++ b/Documentation/DocBook/v4l/vidioc-querystd.xml | |||
@@ -70,6 +70,12 @@ current video input or output.</para> | |||
70 | <para>This ioctl is not supported.</para> | 70 | <para>This ioctl is not supported.</para> |
71 | </listitem> | 71 | </listitem> |
72 | </varlistentry> | 72 | </varlistentry> |
73 | <varlistentry> | ||
74 | <term><errorcode>EBUSY</errorcode></term> | ||
75 | <listitem> | ||
76 | <para>The device is busy and therefore can not detect the standard</para> | ||
77 | </listitem> | ||
78 | </varlistentry> | ||
73 | </variablelist> | 79 | </variablelist> |
74 | </refsect1> | 80 | </refsect1> |
75 | </refentry> | 81 | </refentry> |
diff --git a/Documentation/DocBook/writing-an-alsa-driver.tmpl b/Documentation/DocBook/writing-an-alsa-driver.tmpl index 7a2e0e98986a..0d0f7b4d4b1a 100644 --- a/Documentation/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/DocBook/writing-an-alsa-driver.tmpl | |||
@@ -5318,7 +5318,7 @@ struct _snd_pcm_runtime { | |||
5318 | pages of the given size and map them onto the virtually contiguous | 5318 | pages of the given size and map them onto the virtually contiguous |
5319 | memory. The virtual pointer is addressed in runtime->dma_area. | 5319 | memory. The virtual pointer is addressed in runtime->dma_area. |
5320 | The physical address (runtime->dma_addr) is set to zero, | 5320 | The physical address (runtime->dma_addr) is set to zero, |
5321 | because the buffer is physically non-contigous. | 5321 | because the buffer is physically non-contiguous. |
5322 | The physical address table is set up in sgbuf->table. | 5322 | The physical address table is set up in sgbuf->table. |
5323 | You can get the physical address at a certain offset via | 5323 | You can get the physical address at a certain offset via |
5324 | <function>snd_pcm_sgbuf_get_addr()</function>. | 5324 | <function>snd_pcm_sgbuf_get_addr()</function>. |
diff --git a/Documentation/SubmitChecklist b/Documentation/SubmitChecklist index 78a9168ff377..1053a56be3b1 100644 --- a/Documentation/SubmitChecklist +++ b/Documentation/SubmitChecklist | |||
@@ -15,7 +15,7 @@ kernel patches. | |||
15 | 2: Passes allnoconfig, allmodconfig | 15 | 2: Passes allnoconfig, allmodconfig |
16 | 16 | ||
17 | 3: Builds on multiple CPU architectures by using local cross-compile tools | 17 | 3: Builds on multiple CPU architectures by using local cross-compile tools |
18 | or something like PLM at OSDL. | 18 | or some other build farm. |
19 | 19 | ||
20 | 4: ppc64 is a good architecture for cross-compilation checking because it | 20 | 4: ppc64 is a good architecture for cross-compilation checking because it |
21 | tends to use `unsigned long' for 64-bit quantities. | 21 | tends to use `unsigned long' for 64-bit quantities. |
@@ -88,3 +88,6 @@ kernel patches. | |||
88 | 88 | ||
89 | 24: All memory barriers {e.g., barrier(), rmb(), wmb()} need a comment in the | 89 | 24: All memory barriers {e.g., barrier(), rmb(), wmb()} need a comment in the |
90 | source code that explains the logic of what they are doing and why. | 90 | source code that explains the logic of what they are doing and why. |
91 | |||
92 | 25: If any ioctl's are added by the patch, then also update | ||
93 | Documentation/ioctl/ioctl-number.txt. | ||
diff --git a/Documentation/acpi/method-customizing.txt b/Documentation/acpi/method-customizing.txt new file mode 100644 index 000000000000..e628cd23ca80 --- /dev/null +++ b/Documentation/acpi/method-customizing.txt | |||
@@ -0,0 +1,66 @@ | |||
1 | Linux ACPI Custom Control Method How To | ||
2 | ======================================= | ||
3 | |||
4 | Written by Zhang Rui <rui.zhang@intel.com> | ||
5 | |||
6 | |||
7 | Linux supports customizing ACPI control methods at runtime. | ||
8 | |||
9 | Users can use this to | ||
10 | 1. override an existing method which may not work correctly, | ||
11 | or just for debugging purposes. | ||
12 | 2. insert a completely new method in order to create a missing | ||
13 | method such as _OFF, _ON, _STA, _INI, etc. | ||
14 | For these cases, it is far simpler to dynamically install a single | ||
15 | control method rather than override the entire DSDT, because kernel | ||
16 | rebuild/reboot is not needed and test result can be got in minutes. | ||
17 | |||
18 | Note: Only ACPI METHOD can be overridden, any other object types like | ||
19 | "Device", "OperationRegion", are not recognized. | ||
20 | Note: The same ACPI control method can be overridden for many times, | ||
21 | and it's always the latest one that used by Linux/kernel. | ||
22 | |||
23 | 1. override an existing method | ||
24 | a) get the ACPI table via ACPI sysfs I/F. e.g. to get the DSDT, | ||
25 | just run "cat /sys/firmware/acpi/tables/DSDT > /tmp/dsdt.dat" | ||
26 | b) disassemble the table by running "iasl -d dsdt.dat". | ||
27 | c) rewrite the ASL code of the method and save it in a new file, | ||
28 | d) package the new file (psr.asl) to an ACPI table format. | ||
29 | Here is an example of a customized \_SB._AC._PSR method, | ||
30 | |||
31 | DefinitionBlock ("", "SSDT", 1, "", "", 0x20080715) | ||
32 | { | ||
33 | External (ACON) | ||
34 | |||
35 | Method (\_SB_.AC._PSR, 0, NotSerialized) | ||
36 | { | ||
37 | Store ("In AC _PSR", Debug) | ||
38 | Return (ACON) | ||
39 | } | ||
40 | } | ||
41 | Note that the full pathname of the method in ACPI namespace | ||
42 | should be used. | ||
43 | And remember to use "External" to declare external objects. | ||
44 | e) assemble the file to generate the AML code of the method. | ||
45 | e.g. "iasl psr.asl" (psr.aml is generated as a result) | ||
46 | f) mount debugfs by "mount -t debugfs none /sys/kernel/debug" | ||
47 | g) override the old method via the debugfs by running | ||
48 | "cat /tmp/psr.aml > /sys/kernel/debug/acpi/custom_method" | ||
49 | |||
50 | 2. insert a new method | ||
51 | This is easier than overriding an existing method. | ||
52 | We just need to create the ASL code of the method we want to | ||
53 | insert and then follow the step c) ~ g) in section 1. | ||
54 | |||
55 | 3. undo your changes | ||
56 | The "undo" operation is not supported for a new inserted method | ||
57 | right now, i.e. we can not remove a method currently. | ||
58 | For an overrided method, in order to undo your changes, please | ||
59 | save a copy of the method original ASL code in step c) section 1, | ||
60 | and redo step c) ~ g) to override the method with the original one. | ||
61 | |||
62 | |||
63 | Note: We can use a kernel with multiple custom ACPI method running, | ||
64 | But each individual write to debugfs can implement a SINGLE | ||
65 | method override. i.e. if we want to insert/override multiple | ||
66 | ACPI methods, we need to redo step c) ~ g) for multiple times. | ||
diff --git a/Documentation/arm/OMAP/DSS b/Documentation/arm/OMAP/DSS new file mode 100644 index 000000000000..0af0e9eed5d6 --- /dev/null +++ b/Documentation/arm/OMAP/DSS | |||
@@ -0,0 +1,317 @@ | |||
1 | OMAP2/3 Display Subsystem | ||
2 | ------------------------- | ||
3 | |||
4 | This is an almost total rewrite of the OMAP FB driver in drivers/video/omap | ||
5 | (let's call it DSS1). The main differences between DSS1 and DSS2 are DSI, | ||
6 | TV-out and multiple display support, but there are lots of small improvements | ||
7 | also. | ||
8 | |||
9 | The DSS2 driver (omapdss module) is in arch/arm/plat-omap/dss/, and the FB, | ||
10 | panel and controller drivers are in drivers/video/omap2/. DSS1 and DSS2 live | ||
11 | currently side by side, you can choose which one to use. | ||
12 | |||
13 | Features | ||
14 | -------- | ||
15 | |||
16 | Working and tested features include: | ||
17 | |||
18 | - MIPI DPI (parallel) output | ||
19 | - MIPI DSI output in command mode | ||
20 | - MIPI DBI (RFBI) output | ||
21 | - SDI output | ||
22 | - TV output | ||
23 | - All pieces can be compiled as a module or inside kernel | ||
24 | - Use DISPC to update any of the outputs | ||
25 | - Use CPU to update RFBI or DSI output | ||
26 | - OMAP DISPC planes | ||
27 | - RGB16, RGB24 packed, RGB24 unpacked | ||
28 | - YUV2, UYVY | ||
29 | - Scaling | ||
30 | - Adjusting DSS FCK to find a good pixel clock | ||
31 | - Use DSI DPLL to create DSS FCK | ||
32 | |||
33 | Tested boards include: | ||
34 | - OMAP3 SDP board | ||
35 | - Beagle board | ||
36 | - N810 | ||
37 | |||
38 | omapdss driver | ||
39 | -------------- | ||
40 | |||
41 | The DSS driver does not itself have any support for Linux framebuffer, V4L or | ||
42 | such like the current ones, but it has an internal kernel API that upper level | ||
43 | drivers can use. | ||
44 | |||
45 | The DSS driver models OMAP's overlays, overlay managers and displays in a | ||
46 | flexible way to enable non-common multi-display configuration. In addition to | ||
47 | modelling the hardware overlays, omapdss supports virtual overlays and overlay | ||
48 | managers. These can be used when updating a display with CPU or system DMA. | ||
49 | |||
50 | Panel and controller drivers | ||
51 | ---------------------------- | ||
52 | |||
53 | The drivers implement panel or controller specific functionality and are not | ||
54 | usually visible to users except through omapfb driver. They register | ||
55 | themselves to the DSS driver. | ||
56 | |||
57 | omapfb driver | ||
58 | ------------- | ||
59 | |||
60 | The omapfb driver implements arbitrary number of standard linux framebuffers. | ||
61 | These framebuffers can be routed flexibly to any overlays, thus allowing very | ||
62 | dynamic display architecture. | ||
63 | |||
64 | The driver exports some omapfb specific ioctls, which are compatible with the | ||
65 | ioctls in the old driver. | ||
66 | |||
67 | The rest of the non standard features are exported via sysfs. Whether the final | ||
68 | implementation will use sysfs, or ioctls, is still open. | ||
69 | |||
70 | V4L2 drivers | ||
71 | ------------ | ||
72 | |||
73 | V4L2 is being implemented in TI. | ||
74 | |||
75 | From omapdss point of view the V4L2 drivers should be similar to framebuffer | ||
76 | driver. | ||
77 | |||
78 | Architecture | ||
79 | -------------------- | ||
80 | |||
81 | Some clarification what the different components do: | ||
82 | |||
83 | - Framebuffer is a memory area inside OMAP's SRAM/SDRAM that contains the | ||
84 | pixel data for the image. Framebuffer has width and height and color | ||
85 | depth. | ||
86 | - Overlay defines where the pixels are read from and where they go on the | ||
87 | screen. The overlay may be smaller than framebuffer, thus displaying only | ||
88 | part of the framebuffer. The position of the overlay may be changed if | ||
89 | the overlay is smaller than the display. | ||
90 | - Overlay manager combines the overlays in to one image and feeds them to | ||
91 | display. | ||
92 | - Display is the actual physical display device. | ||
93 | |||
94 | A framebuffer can be connected to multiple overlays to show the same pixel data | ||
95 | on all of the overlays. Note that in this case the overlay input sizes must be | ||
96 | the same, but, in case of video overlays, the output size can be different. Any | ||
97 | framebuffer can be connected to any overlay. | ||
98 | |||
99 | An overlay can be connected to one overlay manager. Also DISPC overlays can be | ||
100 | connected only to DISPC overlay managers, and virtual overlays can be only | ||
101 | connected to virtual overlays. | ||
102 | |||
103 | An overlay manager can be connected to one display. There are certain | ||
104 | restrictions which kinds of displays an overlay manager can be connected: | ||
105 | |||
106 | - DISPC TV overlay manager can be only connected to TV display. | ||
107 | - Virtual overlay managers can only be connected to DBI or DSI displays. | ||
108 | - DISPC LCD overlay manager can be connected to all displays, except TV | ||
109 | display. | ||
110 | |||
111 | Sysfs | ||
112 | ----- | ||
113 | The sysfs interface is mainly used for testing. I don't think sysfs | ||
114 | interface is the best for this in the final version, but I don't quite know | ||
115 | what would be the best interfaces for these things. | ||
116 | |||
117 | The sysfs interface is divided to two parts: DSS and FB. | ||
118 | |||
119 | /sys/class/graphics/fb? directory: | ||
120 | mirror 0=off, 1=on | ||
121 | rotate Rotation 0-3 for 0, 90, 180, 270 degrees | ||
122 | rotate_type 0 = DMA rotation, 1 = VRFB rotation | ||
123 | overlays List of overlay numbers to which framebuffer pixels go | ||
124 | phys_addr Physical address of the framebuffer | ||
125 | virt_addr Virtual address of the framebuffer | ||
126 | size Size of the framebuffer | ||
127 | |||
128 | /sys/devices/platform/omapdss/overlay? directory: | ||
129 | enabled 0=off, 1=on | ||
130 | input_size width,height (ie. the framebuffer size) | ||
131 | manager Destination overlay manager name | ||
132 | name | ||
133 | output_size width,height | ||
134 | position x,y | ||
135 | screen_width width | ||
136 | global_alpha global alpha 0-255 0=transparent 255=opaque | ||
137 | |||
138 | /sys/devices/platform/omapdss/manager? directory: | ||
139 | display Destination display | ||
140 | name | ||
141 | alpha_blending_enabled 0=off, 1=on | ||
142 | trans_key_enabled 0=off, 1=on | ||
143 | trans_key_type gfx-destination, video-source | ||
144 | trans_key_value transparency color key (RGB24) | ||
145 | default_color default background color (RGB24) | ||
146 | |||
147 | /sys/devices/platform/omapdss/display? directory: | ||
148 | ctrl_name Controller name | ||
149 | mirror 0=off, 1=on | ||
150 | update_mode 0=off, 1=auto, 2=manual | ||
151 | enabled 0=off, 1=on | ||
152 | name | ||
153 | rotate Rotation 0-3 for 0, 90, 180, 270 degrees | ||
154 | timings Display timings (pixclock,xres/hfp/hbp/hsw,yres/vfp/vbp/vsw) | ||
155 | When writing, two special timings are accepted for tv-out: | ||
156 | "pal" and "ntsc" | ||
157 | panel_name | ||
158 | tear_elim Tearing elimination 0=off, 1=on | ||
159 | |||
160 | There are also some debugfs files at <debugfs>/omapdss/ which show information | ||
161 | about clocks and registers. | ||
162 | |||
163 | Examples | ||
164 | -------- | ||
165 | |||
166 | The following definitions have been made for the examples below: | ||
167 | |||
168 | ovl0=/sys/devices/platform/omapdss/overlay0 | ||
169 | ovl1=/sys/devices/platform/omapdss/overlay1 | ||
170 | ovl2=/sys/devices/platform/omapdss/overlay2 | ||
171 | |||
172 | mgr0=/sys/devices/platform/omapdss/manager0 | ||
173 | mgr1=/sys/devices/platform/omapdss/manager1 | ||
174 | |||
175 | lcd=/sys/devices/platform/omapdss/display0 | ||
176 | dvi=/sys/devices/platform/omapdss/display1 | ||
177 | tv=/sys/devices/platform/omapdss/display2 | ||
178 | |||
179 | fb0=/sys/class/graphics/fb0 | ||
180 | fb1=/sys/class/graphics/fb1 | ||
181 | fb2=/sys/class/graphics/fb2 | ||
182 | |||
183 | Default setup on OMAP3 SDP | ||
184 | -------------------------- | ||
185 | |||
186 | Here's the default setup on OMAP3 SDP board. All planes go to LCD. DVI | ||
187 | and TV-out are not in use. The columns from left to right are: | ||
188 | framebuffers, overlays, overlay managers, displays. Framebuffers are | ||
189 | handled by omapfb, and the rest by the DSS. | ||
190 | |||
191 | FB0 --- GFX -\ DVI | ||
192 | FB1 --- VID1 --+- LCD ---- LCD | ||
193 | FB2 --- VID2 -/ TV ----- TV | ||
194 | |||
195 | Example: Switch from LCD to DVI | ||
196 | ---------------------- | ||
197 | |||
198 | w=`cat $dvi/timings | cut -d "," -f 2 | cut -d "/" -f 1` | ||
199 | h=`cat $dvi/timings | cut -d "," -f 3 | cut -d "/" -f 1` | ||
200 | |||
201 | echo "0" > $lcd/enabled | ||
202 | echo "" > $mgr0/display | ||
203 | fbset -fb /dev/fb0 -xres $w -yres $h -vxres $w -vyres $h | ||
204 | # at this point you have to switch the dvi/lcd dip-switch from the omap board | ||
205 | echo "dvi" > $mgr0/display | ||
206 | echo "1" > $dvi/enabled | ||
207 | |||
208 | After this the configuration looks like: | ||
209 | |||
210 | FB0 --- GFX -\ -- DVI | ||
211 | FB1 --- VID1 --+- LCD -/ LCD | ||
212 | FB2 --- VID2 -/ TV ----- TV | ||
213 | |||
214 | Example: Clone GFX overlay to LCD and TV | ||
215 | ------------------------------- | ||
216 | |||
217 | w=`cat $tv/timings | cut -d "," -f 2 | cut -d "/" -f 1` | ||
218 | h=`cat $tv/timings | cut -d "," -f 3 | cut -d "/" -f 1` | ||
219 | |||
220 | echo "0" > $ovl0/enabled | ||
221 | echo "0" > $ovl1/enabled | ||
222 | |||
223 | echo "" > $fb1/overlays | ||
224 | echo "0,1" > $fb0/overlays | ||
225 | |||
226 | echo "$w,$h" > $ovl1/output_size | ||
227 | echo "tv" > $ovl1/manager | ||
228 | |||
229 | echo "1" > $ovl0/enabled | ||
230 | echo "1" > $ovl1/enabled | ||
231 | |||
232 | echo "1" > $tv/enabled | ||
233 | |||
234 | After this the configuration looks like (only relevant parts shown): | ||
235 | |||
236 | FB0 +-- GFX ---- LCD ---- LCD | ||
237 | \- VID1 ---- TV ---- TV | ||
238 | |||
239 | Misc notes | ||
240 | ---------- | ||
241 | |||
242 | OMAP FB allocates the framebuffer memory using the OMAP VRAM allocator. | ||
243 | |||
244 | Using DSI DPLL to generate pixel clock it is possible produce the pixel clock | ||
245 | of 86.5MHz (max possible), and with that you get 1280x1024@57 output from DVI. | ||
246 | |||
247 | Rotation and mirroring currently only supports RGB565 and RGB8888 modes. VRFB | ||
248 | does not support mirroring. | ||
249 | |||
250 | VRFB rotation requires much more memory than non-rotated framebuffer, so you | ||
251 | probably need to increase your vram setting before using VRFB rotation. Also, | ||
252 | many applications may not work with VRFB if they do not pay attention to all | ||
253 | framebuffer parameters. | ||
254 | |||
255 | Kernel boot arguments | ||
256 | --------------------- | ||
257 | |||
258 | vram=<size> | ||
259 | - Amount of total VRAM to preallocate. For example, "10M". omapfb | ||
260 | allocates memory for framebuffers from VRAM. | ||
261 | |||
262 | omapfb.mode=<display>:<mode>[,...] | ||
263 | - Default video mode for specified displays. For example, | ||
264 | "dvi:800x400MR-24@60". See drivers/video/modedb.c. | ||
265 | There are also two special modes: "pal" and "ntsc" that | ||
266 | can be used to tv out. | ||
267 | |||
268 | omapfb.vram=<fbnum>:<size>[@<physaddr>][,...] | ||
269 | - VRAM allocated for a framebuffer. Normally omapfb allocates vram | ||
270 | depending on the display size. With this you can manually allocate | ||
271 | more or define the physical address of each framebuffer. For example, | ||
272 | "1:4M" to allocate 4M for fb1. | ||
273 | |||
274 | omapfb.debug=<y|n> | ||
275 | - Enable debug printing. You have to have OMAPFB debug support enabled | ||
276 | in kernel config. | ||
277 | |||
278 | omapfb.test=<y|n> | ||
279 | - Draw test pattern to framebuffer whenever framebuffer settings change. | ||
280 | You need to have OMAPFB debug support enabled in kernel config. | ||
281 | |||
282 | omapfb.vrfb=<y|n> | ||
283 | - Use VRFB rotation for all framebuffers. | ||
284 | |||
285 | omapfb.rotate=<angle> | ||
286 | - Default rotation applied to all framebuffers. | ||
287 | 0 - 0 degree rotation | ||
288 | 1 - 90 degree rotation | ||
289 | 2 - 180 degree rotation | ||
290 | 3 - 270 degree rotation | ||
291 | |||
292 | omapfb.mirror=<y|n> | ||
293 | - Default mirror for all framebuffers. Only works with DMA rotation. | ||
294 | |||
295 | omapdss.def_disp=<display> | ||
296 | - Name of default display, to which all overlays will be connected. | ||
297 | Common examples are "lcd" or "tv". | ||
298 | |||
299 | omapdss.debug=<y|n> | ||
300 | - Enable debug printing. You have to have DSS debug support enabled in | ||
301 | kernel config. | ||
302 | |||
303 | TODO | ||
304 | ---- | ||
305 | |||
306 | DSS locking | ||
307 | |||
308 | Error checking | ||
309 | - Lots of checks are missing or implemented just as BUG() | ||
310 | |||
311 | System DMA update for DSI | ||
312 | - Can be used for RGB16 and RGB24P modes. Probably not for RGB24U (how | ||
313 | to skip the empty byte?) | ||
314 | |||
315 | OMAP1 support | ||
316 | - Not sure if needed | ||
317 | |||
diff --git a/Documentation/blackfin/00-INDEX b/Documentation/blackfin/00-INDEX index d6840a91e1e1..c34e12440fec 100644 --- a/Documentation/blackfin/00-INDEX +++ b/Documentation/blackfin/00-INDEX | |||
@@ -1,9 +1,6 @@ | |||
1 | 00-INDEX | 1 | 00-INDEX |
2 | - This file | 2 | - This file |
3 | 3 | ||
4 | cache-lock.txt | ||
5 | - HOWTO for blackfin cache locking. | ||
6 | |||
7 | cachefeatures.txt | 4 | cachefeatures.txt |
8 | - Supported cache features. | 5 | - Supported cache features. |
9 | 6 | ||
diff --git a/Documentation/blackfin/Makefile b/Documentation/blackfin/Makefile new file mode 100644 index 000000000000..773dbb103f1c --- /dev/null +++ b/Documentation/blackfin/Makefile | |||
@@ -0,0 +1,6 @@ | |||
1 | obj-m := gptimers-example.o | ||
2 | |||
3 | all: modules | ||
4 | |||
5 | modules clean: | ||
6 | $(MAKE) -C ../.. SUBDIRS=$(PWD) $@ | ||
diff --git a/Documentation/blackfin/cache-lock.txt b/Documentation/blackfin/cache-lock.txt deleted file mode 100644 index 88ba1e6c31c3..000000000000 --- a/Documentation/blackfin/cache-lock.txt +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /* | ||
2 | * File: Documentation/blackfin/cache-lock.txt | ||
3 | * Based on: | ||
4 | * Author: | ||
5 | * | ||
6 | * Created: | ||
7 | * Description: This file contains the simple DMA Implementation for Blackfin | ||
8 | * | ||
9 | * Rev: $Id: cache-lock.txt 2384 2006-11-01 04:12:43Z magicyang $ | ||
10 | * | ||
11 | * Modified: | ||
12 | * Copyright 2004-2006 Analog Devices Inc. | ||
13 | * | ||
14 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | How to lock your code in cache in uClinux/blackfin | ||
19 | -------------------------------------------------- | ||
20 | |||
21 | There are only a few steps required to lock your code into the cache. | ||
22 | Currently you can lock the code by Way. | ||
23 | |||
24 | Below are the interface provided for locking the cache. | ||
25 | |||
26 | |||
27 | 1. cache_grab_lock(int Ways); | ||
28 | |||
29 | This function grab the lock for locking your code into the cache specified | ||
30 | by Ways. | ||
31 | |||
32 | |||
33 | 2. cache_lock(int Ways); | ||
34 | |||
35 | This function should be called after your critical code has been executed. | ||
36 | Once the critical code exits, the code is now loaded into the cache. This | ||
37 | function locks the code into the cache. | ||
38 | |||
39 | |||
40 | So, the example sequence will be: | ||
41 | |||
42 | cache_grab_lock(WAY0_L); /* Grab the lock */ | ||
43 | |||
44 | critical_code(); /* Execute the code of interest */ | ||
45 | |||
46 | cache_lock(WAY0_L); /* Lock the cache */ | ||
47 | |||
48 | Where WAY0_L signifies WAY0 locking. | ||
diff --git a/Documentation/blackfin/cachefeatures.txt b/Documentation/blackfin/cachefeatures.txt index 0fbec23becb5..75de51f94515 100644 --- a/Documentation/blackfin/cachefeatures.txt +++ b/Documentation/blackfin/cachefeatures.txt | |||
@@ -41,16 +41,6 @@ | |||
41 | icplb_flush(); | 41 | icplb_flush(); |
42 | dcplb_flush(); | 42 | dcplb_flush(); |
43 | 43 | ||
44 | - Locking the cache. | ||
45 | |||
46 | cache_grab_lock(); | ||
47 | cache_lock(); | ||
48 | |||
49 | Please refer linux-2.6.x/Documentation/blackfin/cache-lock.txt for how to | ||
50 | lock the cache. | ||
51 | |||
52 | Locking the cache is optional feature. | ||
53 | |||
54 | - Miscellaneous cache functions. | 44 | - Miscellaneous cache functions. |
55 | 45 | ||
56 | flush_cache_all(); | 46 | flush_cache_all(); |
diff --git a/Documentation/blackfin/gptimers-example.c b/Documentation/blackfin/gptimers-example.c new file mode 100644 index 000000000000..b1bd6340e748 --- /dev/null +++ b/Documentation/blackfin/gptimers-example.c | |||
@@ -0,0 +1,83 @@ | |||
1 | /* | ||
2 | * Simple gptimers example | ||
3 | * http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:gptimers | ||
4 | * | ||
5 | * Copyright 2007-2009 Analog Devices Inc. | ||
6 | * | ||
7 | * Licensed under the GPL-2 or later. | ||
8 | */ | ||
9 | |||
10 | #include <linux/interrupt.h> | ||
11 | #include <linux/module.h> | ||
12 | |||
13 | #include <asm/gptimers.h> | ||
14 | #include <asm/portmux.h> | ||
15 | |||
16 | /* ... random driver includes ... */ | ||
17 | |||
18 | #define DRIVER_NAME "gptimer_example" | ||
19 | |||
20 | struct gptimer_data { | ||
21 | uint32_t period, width; | ||
22 | }; | ||
23 | static struct gptimer_data data; | ||
24 | |||
25 | /* ... random driver state ... */ | ||
26 | |||
27 | static irqreturn_t gptimer_example_irq(int irq, void *dev_id) | ||
28 | { | ||
29 | struct gptimer_data *data = dev_id; | ||
30 | |||
31 | /* make sure it was our timer which caused the interrupt */ | ||
32 | if (!get_gptimer_intr(TIMER5_id)) | ||
33 | return IRQ_NONE; | ||
34 | |||
35 | /* read the width/period values that were captured for the waveform */ | ||
36 | data->width = get_gptimer_pwidth(TIMER5_id); | ||
37 | data->period = get_gptimer_period(TIMER5_id); | ||
38 | |||
39 | /* acknowledge the interrupt */ | ||
40 | clear_gptimer_intr(TIMER5_id); | ||
41 | |||
42 | /* tell the upper layers we took care of things */ | ||
43 | return IRQ_HANDLED; | ||
44 | } | ||
45 | |||
46 | /* ... random driver code ... */ | ||
47 | |||
48 | static int __init gptimer_example_init(void) | ||
49 | { | ||
50 | int ret; | ||
51 | |||
52 | /* grab the peripheral pins */ | ||
53 | ret = peripheral_request(P_TMR5, DRIVER_NAME); | ||
54 | if (ret) { | ||
55 | printk(KERN_NOTICE DRIVER_NAME ": peripheral request failed\n"); | ||
56 | return ret; | ||
57 | } | ||
58 | |||
59 | /* grab the IRQ for the timer */ | ||
60 | ret = request_irq(IRQ_TIMER5, gptimer_example_irq, IRQF_SHARED, DRIVER_NAME, &data); | ||
61 | if (ret) { | ||
62 | printk(KERN_NOTICE DRIVER_NAME ": IRQ request failed\n"); | ||
63 | peripheral_free(P_TMR5); | ||
64 | return ret; | ||
65 | } | ||
66 | |||
67 | /* setup the timer and enable it */ | ||
68 | set_gptimer_config(TIMER5_id, WDTH_CAP | PULSE_HI | PERIOD_CNT | IRQ_ENA); | ||
69 | enable_gptimers(TIMER5bit); | ||
70 | |||
71 | return 0; | ||
72 | } | ||
73 | module_init(gptimer_example_init); | ||
74 | |||
75 | static void __exit gptimer_example_exit(void) | ||
76 | { | ||
77 | disable_gptimers(TIMER5bit); | ||
78 | free_irq(IRQ_TIMER5, &data); | ||
79 | peripheral_free(P_TMR5); | ||
80 | } | ||
81 | module_exit(gptimer_example_exit); | ||
82 | |||
83 | MODULE_LICENSE("BSD"); | ||
diff --git a/Documentation/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.txt index 75a58d14d3cf..6c30e930c122 100644 --- a/Documentation/cpu-freq/cpu-drivers.txt +++ b/Documentation/cpu-freq/cpu-drivers.txt | |||
@@ -92,9 +92,9 @@ policy->cpuinfo.max_freq - the minimum and maximum frequency | |||
92 | (in kHz) which is supported by | 92 | (in kHz) which is supported by |
93 | this CPU | 93 | this CPU |
94 | policy->cpuinfo.transition_latency the time it takes on this CPU to | 94 | policy->cpuinfo.transition_latency the time it takes on this CPU to |
95 | switch between two frequencies (if | 95 | switch between two frequencies in |
96 | appropriate, else specify | 96 | nanoseconds (if appropriate, else |
97 | CPUFREQ_ETERNAL) | 97 | specify CPUFREQ_ETERNAL) |
98 | 98 | ||
99 | policy->cur The current operating frequency of | 99 | policy->cur The current operating frequency of |
100 | this CPU (if appropriate) | 100 | this CPU (if appropriate) |
diff --git a/Documentation/cpu-freq/user-guide.txt b/Documentation/cpu-freq/user-guide.txt index 2a5b850847c0..04f6b32993e6 100644 --- a/Documentation/cpu-freq/user-guide.txt +++ b/Documentation/cpu-freq/user-guide.txt | |||
@@ -203,6 +203,17 @@ scaling_cur_freq : Current frequency of the CPU as determined by | |||
203 | the frequency the kernel thinks the CPU runs | 203 | the frequency the kernel thinks the CPU runs |
204 | at. | 204 | at. |
205 | 205 | ||
206 | bios_limit : If the BIOS tells the OS to limit a CPU to | ||
207 | lower frequencies, the user can read out the | ||
208 | maximum available frequency from this file. | ||
209 | This typically can happen through (often not | ||
210 | intended) BIOS settings, restrictions | ||
211 | triggered through a service processor or other | ||
212 | BIOS/HW based implementations. | ||
213 | This does not cover thermal ACPI limitations | ||
214 | which can be detected through the generic | ||
215 | thermal driver. | ||
216 | |||
206 | If you have selected the "userspace" governor which allows you to | 217 | If you have selected the "userspace" governor which allows you to |
207 | set the CPU operating frequency to a specific value, you can read out | 218 | set the CPU operating frequency to a specific value, you can read out |
208 | the current frequency in | 219 | the current frequency in |
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt index 9d620c153b04..a99d7031cdf9 100644 --- a/Documentation/cpu-hotplug.txt +++ b/Documentation/cpu-hotplug.txt | |||
@@ -49,6 +49,12 @@ maxcpus=n Restrict boot time cpus to n. Say if you have 4 cpus, using | |||
49 | additional_cpus=n (*) Use this to limit hotpluggable cpus. This option sets | 49 | additional_cpus=n (*) Use this to limit hotpluggable cpus. This option sets |
50 | cpu_possible_map = cpu_present_map + additional_cpus | 50 | cpu_possible_map = cpu_present_map + additional_cpus |
51 | 51 | ||
52 | cede_offline={"off","on"} Use this option to disable/enable putting offlined | ||
53 | processors to an extended H_CEDE state on | ||
54 | supported pseries platforms. | ||
55 | If nothing is specified, | ||
56 | cede_offline is set to "on". | ||
57 | |||
52 | (*) Option valid only for following architectures | 58 | (*) Option valid only for following architectures |
53 | - ia64 | 59 | - ia64 |
54 | 60 | ||
@@ -309,41 +315,26 @@ A: The following are what is required for CPU hotplug infrastructure to work | |||
309 | 315 | ||
310 | Q: I need to ensure that a particular cpu is not removed when there is some | 316 | Q: I need to ensure that a particular cpu is not removed when there is some |
311 | work specific to this cpu is in progress. | 317 | work specific to this cpu is in progress. |
312 | A: First switch the current thread context to preferred cpu | 318 | A: There are two ways. If your code can be run in interrupt context, use |
319 | smp_call_function_single(), otherwise use work_on_cpu(). Note that | ||
320 | work_on_cpu() is slow, and can fail due to out of memory: | ||
313 | 321 | ||
314 | int my_func_on_cpu(int cpu) | 322 | int my_func_on_cpu(int cpu) |
315 | { | 323 | { |
316 | cpumask_t saved_mask, new_mask = CPU_MASK_NONE; | 324 | int err; |
317 | int curr_cpu, err = 0; | 325 | get_online_cpus(); |
318 | 326 | if (!cpu_online(cpu)) | |
319 | saved_mask = current->cpus_allowed; | 327 | err = -EINVAL; |
320 | cpu_set(cpu, new_mask); | 328 | else |
321 | err = set_cpus_allowed(current, new_mask); | 329 | #if NEEDS_BLOCKING |
322 | 330 | err = work_on_cpu(cpu, __my_func_on_cpu, NULL); | |
323 | if (err) | 331 | #else |
324 | return err; | 332 | smp_call_function_single(cpu, __my_func_on_cpu, &err, |
325 | 333 | true); | |
326 | /* | 334 | #endif |
327 | * If we got scheduled out just after the return from | 335 | put_online_cpus(); |
328 | * set_cpus_allowed() before running the work, this ensures | 336 | return err; |
329 | * we stay locked. | 337 | } |
330 | */ | ||
331 | curr_cpu = get_cpu(); | ||
332 | |||
333 | if (curr_cpu != cpu) { | ||
334 | err = -EAGAIN; | ||
335 | goto ret; | ||
336 | } else { | ||
337 | /* | ||
338 | * Do work : But cant sleep, since get_cpu() disables preempt | ||
339 | */ | ||
340 | } | ||
341 | ret: | ||
342 | put_cpu(); | ||
343 | set_cpus_allowed(current, saved_mask); | ||
344 | return err; | ||
345 | } | ||
346 | |||
347 | 338 | ||
348 | Q: How do we determine how many CPUs are available for hotplug. | 339 | Q: How do we determine how many CPUs are available for hotplug. |
349 | A: There is no clear spec defined way from ACPI that can give us that | 340 | A: There is no clear spec defined way from ACPI that can give us that |
diff --git a/Documentation/device-mapper/snapshot.txt b/Documentation/device-mapper/snapshot.txt index a5009c8300f3..e3a77b215135 100644 --- a/Documentation/device-mapper/snapshot.txt +++ b/Documentation/device-mapper/snapshot.txt | |||
@@ -8,13 +8,19 @@ the block device which are also writable without interfering with the | |||
8 | original content; | 8 | original content; |
9 | *) To create device "forks", i.e. multiple different versions of the | 9 | *) To create device "forks", i.e. multiple different versions of the |
10 | same data stream. | 10 | same data stream. |
11 | *) To merge a snapshot of a block device back into the snapshot's origin | ||
12 | device. | ||
11 | 13 | ||
14 | In the first two cases, dm copies only the chunks of data that get | ||
15 | changed and uses a separate copy-on-write (COW) block device for | ||
16 | storage. | ||
12 | 17 | ||
13 | In both cases, dm copies only the chunks of data that get changed and | 18 | For snapshot merge the contents of the COW storage are merged back into |
14 | uses a separate copy-on-write (COW) block device for storage. | 19 | the origin device. |
15 | 20 | ||
16 | 21 | ||
17 | There are two dm targets available: snapshot and snapshot-origin. | 22 | There are three dm targets available: |
23 | snapshot, snapshot-origin, and snapshot-merge. | ||
18 | 24 | ||
19 | *) snapshot-origin <origin> | 25 | *) snapshot-origin <origin> |
20 | 26 | ||
@@ -40,8 +46,25 @@ The difference is that for transient snapshots less metadata must be | |||
40 | saved on disk - they can be kept in memory by the kernel. | 46 | saved on disk - they can be kept in memory by the kernel. |
41 | 47 | ||
42 | 48 | ||
43 | How this is used by LVM2 | 49 | * snapshot-merge <origin> <COW device> <persistent> <chunksize> |
44 | ======================== | 50 | |
51 | takes the same table arguments as the snapshot target except it only | ||
52 | works with persistent snapshots. This target assumes the role of the | ||
53 | "snapshot-origin" target and must not be loaded if the "snapshot-origin" | ||
54 | is still present for <origin>. | ||
55 | |||
56 | Creates a merging snapshot that takes control of the changed chunks | ||
57 | stored in the <COW device> of an existing snapshot, through a handover | ||
58 | procedure, and merges these chunks back into the <origin>. Once merging | ||
59 | has started (in the background) the <origin> may be opened and the merge | ||
60 | will continue while I/O is flowing to it. Changes to the <origin> are | ||
61 | deferred until the merging snapshot's corresponding chunk(s) have been | ||
62 | merged. Once merging has started the snapshot device, associated with | ||
63 | the "snapshot" target, will return -EIO when accessed. | ||
64 | |||
65 | |||
66 | How snapshot is used by LVM2 | ||
67 | ============================ | ||
45 | When you create the first LVM2 snapshot of a volume, four dm devices are used: | 68 | When you create the first LVM2 snapshot of a volume, four dm devices are used: |
46 | 69 | ||
47 | 1) a device containing the original mapping table of the source volume; | 70 | 1) a device containing the original mapping table of the source volume; |
@@ -72,3 +95,30 @@ brw------- 1 root root 254, 12 29 ago 18:15 /dev/mapper/volumeGroup-snap-cow | |||
72 | brw------- 1 root root 254, 13 29 ago 18:15 /dev/mapper/volumeGroup-snap | 95 | brw------- 1 root root 254, 13 29 ago 18:15 /dev/mapper/volumeGroup-snap |
73 | brw------- 1 root root 254, 10 29 ago 18:14 /dev/mapper/volumeGroup-base | 96 | brw------- 1 root root 254, 10 29 ago 18:14 /dev/mapper/volumeGroup-base |
74 | 97 | ||
98 | |||
99 | How snapshot-merge is used by LVM2 | ||
100 | ================================== | ||
101 | A merging snapshot assumes the role of the "snapshot-origin" while | ||
102 | merging. As such the "snapshot-origin" is replaced with | ||
103 | "snapshot-merge". The "-real" device is not changed and the "-cow" | ||
104 | device is renamed to <origin name>-cow to aid LVM2's cleanup of the | ||
105 | merging snapshot after it completes. The "snapshot" that hands over its | ||
106 | COW device to the "snapshot-merge" is deactivated (unless using lvchange | ||
107 | --refresh); but if it is left active it will simply return I/O errors. | ||
108 | |||
109 | A snapshot will merge into its origin with the following command: | ||
110 | |||
111 | lvconvert --merge volumeGroup/snap | ||
112 | |||
113 | we'll now have this situation: | ||
114 | |||
115 | # dmsetup table|grep volumeGroup | ||
116 | |||
117 | volumeGroup-base-real: 0 2097152 linear 8:19 384 | ||
118 | volumeGroup-base-cow: 0 204800 linear 8:19 2097536 | ||
119 | volumeGroup-base: 0 2097152 snapshot-merge 254:11 254:12 P 16 | ||
120 | |||
121 | # ls -lL /dev/mapper/volumeGroup-* | ||
122 | brw------- 1 root root 254, 11 29 ago 18:15 /dev/mapper/volumeGroup-base-real | ||
123 | brw------- 1 root root 254, 12 29 ago 18:16 /dev/mapper/volumeGroup-base-cow | ||
124 | brw------- 1 root root 254, 10 29 ago 18:16 /dev/mapper/volumeGroup-base | ||
diff --git a/Documentation/dontdiff b/Documentation/dontdiff index e151b2a36267..3ad6acead949 100644 --- a/Documentation/dontdiff +++ b/Documentation/dontdiff | |||
@@ -103,6 +103,7 @@ gconf | |||
103 | gen-devlist | 103 | gen-devlist |
104 | gen_crc32table | 104 | gen_crc32table |
105 | gen_init_cpio | 105 | gen_init_cpio |
106 | generated | ||
106 | genheaders | 107 | genheaders |
107 | genksyms | 108 | genksyms |
108 | *_gray256.c | 109 | *_gray256.c |
diff --git a/Documentation/driver-model/driver.txt b/Documentation/driver-model/driver.txt index 60120fb3b961..d2cd6fb8ba9e 100644 --- a/Documentation/driver-model/driver.txt +++ b/Documentation/driver-model/driver.txt | |||
@@ -226,5 +226,5 @@ struct driver_attribute driver_attr_debug; | |||
226 | This can then be used to add and remove the attribute from the | 226 | This can then be used to add and remove the attribute from the |
227 | driver's directory using: | 227 | driver's directory using: |
228 | 228 | ||
229 | int driver_create_file(struct device_driver *, struct driver_attribute *); | 229 | int driver_create_file(struct device_driver *, const struct driver_attribute *); |
230 | void driver_remove_file(struct device_driver *, struct driver_attribute *); | 230 | void driver_remove_file(struct device_driver *, const struct driver_attribute *); |
diff --git a/Documentation/dvb/README.dvb-usb b/Documentation/dvb/README.dvb-usb index bf2a9cdfe7bb..c8238e44ed6b 100644 --- a/Documentation/dvb/README.dvb-usb +++ b/Documentation/dvb/README.dvb-usb | |||
@@ -85,7 +85,7 @@ http://www.linuxtv.org/wiki/index.php/DVB_USB | |||
85 | - moved transfer control (pid filter, fifo control) from usb driver to frontend, it seems | 85 | - moved transfer control (pid filter, fifo control) from usb driver to frontend, it seems |
86 | better settled there (added xfer_ops-struct) | 86 | better settled there (added xfer_ops-struct) |
87 | - created a common files for frontends (mc/p/mb) | 87 | - created a common files for frontends (mc/p/mb) |
88 | 2004-09-28 - added support for a new device (Unkown, vendor ID is Hyper-Paltek) | 88 | 2004-09-28 - added support for a new device (Unknown, vendor ID is Hyper-Paltek) |
89 | 2004-09-20 - added support for a new device (Compro DVB-U2000), thanks | 89 | 2004-09-20 - added support for a new device (Compro DVB-U2000), thanks |
90 | to Amaury Demol for reporting | 90 | to Amaury Demol for reporting |
91 | - changed usb TS transfer method (several urbs, stopping transfer | 91 | - changed usb TS transfer method (several urbs, stopping transfer |
diff --git a/Documentation/edac.txt b/Documentation/edac.txt index 06f8f46692dc..79c533223762 100644 --- a/Documentation/edac.txt +++ b/Documentation/edac.txt | |||
@@ -80,7 +80,7 @@ is: | |||
80 | 80 | ||
81 | broken_parity_status | 81 | broken_parity_status |
82 | 82 | ||
83 | as is located in /sys/devices/pci<XXX>/0000:XX:YY.Z directorys for | 83 | as is located in /sys/devices/pci<XXX>/0000:XX:YY.Z directories for |
84 | PCI devices. | 84 | PCI devices. |
85 | 85 | ||
86 | FUTURE HARDWARE SCANNING | 86 | FUTURE HARDWARE SCANNING |
@@ -288,9 +288,8 @@ Total UE count that had no information attribute fileY: | |||
288 | 288 | ||
289 | 'ue_noinfo_count' | 289 | 'ue_noinfo_count' |
290 | 290 | ||
291 | This attribute file displays the number of UEs that | 291 | This attribute file displays the number of UEs that have occurred |
292 | have occurred have occurred with no informations as to which DIMM | 292 | with no information as to which DIMM slot is having errors. |
293 | slot is having errors. | ||
294 | 293 | ||
295 | 294 | ||
296 | Total Correctable Errors count attribute file: | 295 | Total Correctable Errors count attribute file: |
diff --git a/Documentation/fb/viafb.txt b/Documentation/fb/viafb.txt index 67dbf442b0b6..f3e046a6a987 100644 --- a/Documentation/fb/viafb.txt +++ b/Documentation/fb/viafb.txt | |||
@@ -7,7 +7,7 @@ | |||
7 | VIA UniChrome Family(CLE266, PM800 / CN400 / CN300, | 7 | VIA UniChrome Family(CLE266, PM800 / CN400 / CN300, |
8 | P4M800CE / P4M800Pro / CN700 / VN800, | 8 | P4M800CE / P4M800Pro / CN700 / VN800, |
9 | CX700 / VX700, K8M890, P4M890, | 9 | CX700 / VX700, K8M890, P4M890, |
10 | CN896 / P4M900, VX800) | 10 | CN896 / P4M900, VX800, VX855) |
11 | 11 | ||
12 | [Driver features] | 12 | [Driver features] |
13 | ------------------------ | 13 | ------------------------ |
@@ -154,13 +154,6 @@ | |||
154 | 0 : No Dual Edge Panel (default) | 154 | 0 : No Dual Edge Panel (default) |
155 | 1 : Dual Edge Panel | 155 | 1 : Dual Edge Panel |
156 | 156 | ||
157 | viafb_video_dev: | ||
158 | This option is used to specify video output devices(CRT, DVI, LCD) for | ||
159 | duoview case. | ||
160 | For example: | ||
161 | To output video on DVI, we should use: | ||
162 | modprobe viafb viafb_video_dev=DVI... | ||
163 | |||
164 | viafb_lcd_port: | 157 | viafb_lcd_port: |
165 | This option is used to specify LCD output port, | 158 | This option is used to specify LCD output port, |
166 | available values are "DVP0" "DVP1" "DFP_HIGHLOW" "DFP_HIGH" "DFP_LOW". | 159 | available values are "DVP0" "DVP1" "DFP_HIGHLOW" "DFP_HIGH" "DFP_LOW". |
@@ -181,9 +174,6 @@ Notes: | |||
181 | and bpp, need to call VIAFB specified ioctl interface VIAFB_SET_DEVICE | 174 | and bpp, need to call VIAFB specified ioctl interface VIAFB_SET_DEVICE |
182 | instead of calling common ioctl function FBIOPUT_VSCREENINFO since | 175 | instead of calling common ioctl function FBIOPUT_VSCREENINFO since |
183 | viafb doesn't support multi-head well, or it will cause screen crush. | 176 | viafb doesn't support multi-head well, or it will cause screen crush. |
184 | 4. VX800 2D accelerator hasn't been supported in this driver yet. When | ||
185 | using driver on VX800, the driver will disable the acceleration | ||
186 | function as default. | ||
187 | 177 | ||
188 | 178 | ||
189 | [Configure viafb with "fbset" tool] | 179 | [Configure viafb with "fbset" tool] |
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 86f2ec90af87..5b5db085fbf0 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -270,22 +270,6 @@ Who: Michael Buesch <mb@bu3sch.de> | |||
270 | 270 | ||
271 | --------------------------- | 271 | --------------------------- |
272 | 272 | ||
273 | What: usedac i386 kernel parameter | ||
274 | When: 2.6.27 | ||
275 | Why: replaced by allowdac and no dac combination | ||
276 | Who: Glauber Costa <gcosta@redhat.com> | ||
277 | |||
278 | --------------------------- | ||
279 | |||
280 | What: print_fn_descriptor_symbol() | ||
281 | When: October 2009 | ||
282 | Why: The %pF vsprintf format provides the same functionality in a | ||
283 | simpler way. print_fn_descriptor_symbol() is deprecated but | ||
284 | still present to give out-of-tree modules time to change. | ||
285 | Who: Bjorn Helgaas <bjorn.helgaas@hp.com> | ||
286 | |||
287 | --------------------------- | ||
288 | |||
289 | What: /sys/o2cb symlink | 273 | What: /sys/o2cb symlink |
290 | When: January 2010 | 274 | When: January 2010 |
291 | Why: /sys/fs/o2cb is the proper location for this information - /sys/o2cb | 275 | Why: /sys/fs/o2cb is the proper location for this information - /sys/o2cb |
@@ -462,3 +446,29 @@ Why: With the recent innovations in CPU hardware acceleration technologies | |||
462 | Who: Alok N Kataria <akataria@vmware.com> | 446 | Who: Alok N Kataria <akataria@vmware.com> |
463 | 447 | ||
464 | ---------------------------- | 448 | ---------------------------- |
449 | |||
450 | What: adt7473 hardware monitoring driver | ||
451 | When: February 2010 | ||
452 | Why: Obsoleted by the adt7475 driver. | ||
453 | Who: Jean Delvare <khali@linux-fr.org> | ||
454 | |||
455 | --------------------------- | ||
456 | What: Support for lcd_switch and display_get in asus-laptop driver | ||
457 | When: March 2010 | ||
458 | Why: These two features use non-standard interfaces. There are the | ||
459 | only features that really need multiple path to guess what's | ||
460 | the right method name on a specific laptop. | ||
461 | |||
462 | Removing them will allow to remove a lot of code an significantly | ||
463 | clean the drivers. | ||
464 | |||
465 | This will affect the backlight code which won't be able to know | ||
466 | if the backlight is on or off. The platform display file will also be | ||
467 | write only (like the one in eeepc-laptop). | ||
468 | |||
469 | This should'nt affect a lot of user because they usually know | ||
470 | when their display is on or off. | ||
471 | |||
472 | Who: Corentin Chary <corentin.chary@gmail.com> | ||
473 | |||
474 | ---------------------------- | ||
diff --git a/Documentation/filesystems/00-INDEX b/Documentation/filesystems/00-INDEX index f15621ee5599..875d49696b6e 100644 --- a/Documentation/filesystems/00-INDEX +++ b/Documentation/filesystems/00-INDEX | |||
@@ -1,7 +1,5 @@ | |||
1 | 00-INDEX | 1 | 00-INDEX |
2 | - this file (info on some of the filesystems supported by linux). | 2 | - this file (info on some of the filesystems supported by linux). |
3 | Exporting | ||
4 | - explanation of how to make filesystems exportable. | ||
5 | Locking | 3 | Locking |
6 | - info on locking rules as they pertain to Linux VFS. | 4 | - info on locking rules as they pertain to Linux VFS. |
7 | 9p.txt | 5 | 9p.txt |
@@ -36,6 +34,8 @@ dnotify.txt | |||
36 | - info about directory notification in Linux. | 34 | - info about directory notification in Linux. |
37 | ecryptfs.txt | 35 | ecryptfs.txt |
38 | - docs on eCryptfs: stacked cryptographic filesystem for Linux. | 36 | - docs on eCryptfs: stacked cryptographic filesystem for Linux. |
37 | exofs.txt | ||
38 | - info, usage, mount options, design about EXOFS. | ||
39 | ext2.txt | 39 | ext2.txt |
40 | - info, mount options and specifications for the Ext2 filesystem. | 40 | - info, mount options and specifications for the Ext2 filesystem. |
41 | ext3.txt | 41 | ext3.txt |
@@ -66,12 +66,8 @@ mandatory-locking.txt | |||
66 | - info on the Linux implementation of Sys V mandatory file locking. | 66 | - info on the Linux implementation of Sys V mandatory file locking. |
67 | ncpfs.txt | 67 | ncpfs.txt |
68 | - info on Novell Netware(tm) filesystem using NCP protocol. | 68 | - info on Novell Netware(tm) filesystem using NCP protocol. |
69 | nfs41-server.txt | 69 | nfs/ |
70 | - info on the Linux server implementation of NFSv4 minor version 1. | 70 | - nfs-related documentation. |
71 | nfs-rdma.txt | ||
72 | - how to install and setup the Linux NFS/RDMA client and server software. | ||
73 | nfsroot.txt | ||
74 | - short guide on setting up a diskless box with NFS root filesystem. | ||
75 | nilfs2.txt | 71 | nilfs2.txt |
76 | - info and mount options for the NILFS2 filesystem. | 72 | - info and mount options for the NILFS2 filesystem. |
77 | ntfs.txt | 73 | ntfs.txt |
@@ -90,8 +86,6 @@ relay.txt | |||
90 | - info on relay, for efficient streaming from kernel to user space. | 86 | - info on relay, for efficient streaming from kernel to user space. |
91 | romfs.txt | 87 | romfs.txt |
92 | - description of the ROMFS filesystem. | 88 | - description of the ROMFS filesystem. |
93 | rpc-cache.txt | ||
94 | - introduction to the caching mechanisms in the sunrpc layer. | ||
95 | seq_file.txt | 89 | seq_file.txt |
96 | - how to use the seq_file API | 90 | - how to use the seq_file API |
97 | sharedsubtree.txt | 91 | sharedsubtree.txt |
diff --git a/Documentation/filesystems/exofs.txt b/Documentation/filesystems/exofs.txt index 0ced74c2f73c..abd2a9b5b787 100644 --- a/Documentation/filesystems/exofs.txt +++ b/Documentation/filesystems/exofs.txt | |||
@@ -60,13 +60,13 @@ USAGE | |||
60 | 60 | ||
61 | mkfs.exofs --pid=65536 --format /dev/osd0 | 61 | mkfs.exofs --pid=65536 --format /dev/osd0 |
62 | 62 | ||
63 | The --format is optional if not specified no OSD_FORMAT will be | 63 | The --format is optional. If not specified, no OSD_FORMAT will be |
64 | preformed and a clean file system will be created in the specified pid, | 64 | performed and a clean file system will be created in the specified pid, |
65 | in the available space of the target. (Use --format=size_in_meg to limit | 65 | in the available space of the target. (Use --format=size_in_meg to limit |
66 | the total LUN space available) | 66 | the total LUN space available) |
67 | 67 | ||
68 | If pid already exist it will be deleted and a new one will be created in it's | 68 | If pid already exists, it will be deleted and a new one will be created in |
69 | place. Be careful. | 69 | its place. Be careful. |
70 | 70 | ||
71 | An exofs lives inside a single OSD partition. You can create multiple exofs | 71 | An exofs lives inside a single OSD partition. You can create multiple exofs |
72 | filesystems on the same device using multiple pids. | 72 | filesystems on the same device using multiple pids. |
@@ -81,7 +81,7 @@ USAGE | |||
81 | 81 | ||
82 | 7. For reference (See do-exofs example script): | 82 | 7. For reference (See do-exofs example script): |
83 | do-exofs start - an example of how to perform the above steps. | 83 | do-exofs start - an example of how to perform the above steps. |
84 | do-exofs stop - an example of how to unmount the file system. | 84 | do-exofs stop - an example of how to unmount the file system. |
85 | do-exofs format - an example of how to format and mkfs a new exofs. | 85 | do-exofs format - an example of how to format and mkfs a new exofs. |
86 | 86 | ||
87 | 8. Extra compilation flags (uncomment in fs/exofs/Kbuild): | 87 | 8. Extra compilation flags (uncomment in fs/exofs/Kbuild): |
@@ -104,8 +104,8 @@ Where: | |||
104 | exofs specific options: Options are separated by commas (,) | 104 | exofs specific options: Options are separated by commas (,) |
105 | pid=<integer> - The partition number to mount/create as | 105 | pid=<integer> - The partition number to mount/create as |
106 | container of the filesystem. | 106 | container of the filesystem. |
107 | This option is mandatory | 107 | This option is mandatory. |
108 | to=<integer> - Timeout in ticks for a single command | 108 | to=<integer> - Timeout in ticks for a single command. |
109 | default is (60 * HZ) [for debugging only] | 109 | default is (60 * HZ) [for debugging only] |
110 | 110 | ||
111 | =============================================================================== | 111 | =============================================================================== |
@@ -116,7 +116,7 @@ DESIGN | |||
116 | with a special ID (defined in common.h). | 116 | with a special ID (defined in common.h). |
117 | Information included in the file system control block is used to fill the | 117 | Information included in the file system control block is used to fill the |
118 | in-memory superblock structure at mount time. This object is created before | 118 | in-memory superblock structure at mount time. This object is created before |
119 | the file system is used by mkexofs.c It contains information such as: | 119 | the file system is used by mkexofs.c. It contains information such as: |
120 | - The file system's magic number | 120 | - The file system's magic number |
121 | - The next inode number to be allocated | 121 | - The next inode number to be allocated |
122 | 122 | ||
@@ -134,8 +134,8 @@ DESIGN | |||
134 | attributes. This applies to both regular files and other types (directories, | 134 | attributes. This applies to both regular files and other types (directories, |
135 | device files, symlinks, etc.). | 135 | device files, symlinks, etc.). |
136 | 136 | ||
137 | * Credentials are generated per object (inode and superblock) when they is | 137 | * Credentials are generated per object (inode and superblock) when they are |
138 | created in memory (read off disk or created). The credential works for all | 138 | created in memory (read from disk or created). The credential works for all |
139 | operations and is used as long as the object remains in memory. | 139 | operations and is used as long as the object remains in memory. |
140 | 140 | ||
141 | * Async OSD operations are used whenever possible, but the target may execute | 141 | * Async OSD operations are used whenever possible, but the target may execute |
@@ -145,7 +145,8 @@ DESIGN | |||
145 | from executing in reverse order: | 145 | from executing in reverse order: |
146 | - The following are handled with the OBJ_CREATED and OBJ_2BCREATED | 146 | - The following are handled with the OBJ_CREATED and OBJ_2BCREATED |
147 | flags. OBJ_CREATED is set when we know the object exists on the OSD - | 147 | flags. OBJ_CREATED is set when we know the object exists on the OSD - |
148 | in create's callback function, and when we successfully do a read_inode. | 148 | in create's callback function, and when we successfully do a |
149 | read_inode. | ||
149 | OBJ_2BCREATED is set in the beginning of the create function, so we | 150 | OBJ_2BCREATED is set in the beginning of the create function, so we |
150 | know that we should wait. | 151 | know that we should wait. |
151 | - create/delete: delete should wait until the object is created | 152 | - create/delete: delete should wait until the object is created |
diff --git a/Documentation/filesystems/ext3.txt b/Documentation/filesystems/ext3.txt index 05d5cf1d743f..867c5b50cb42 100644 --- a/Documentation/filesystems/ext3.txt +++ b/Documentation/filesystems/ext3.txt | |||
@@ -32,8 +32,8 @@ journal_dev=devnum When the external journal device's major/minor numbers | |||
32 | identified through its new major/minor numbers encoded | 32 | identified through its new major/minor numbers encoded |
33 | in devnum. | 33 | in devnum. |
34 | 34 | ||
35 | noload Don't load the journal on mounting. Note that this forces | 35 | norecovery Don't load the journal on mounting. Note that this forces |
36 | mount of inconsistent filesystem, which can lead to | 36 | noload mount of inconsistent filesystem, which can lead to |
37 | various problems. | 37 | various problems. |
38 | 38 | ||
39 | data=journal All data are committed into the journal prior to being | 39 | data=journal All data are committed into the journal prior to being |
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt index 6d94e0696f8c..af6885c3c821 100644 --- a/Documentation/filesystems/ext4.txt +++ b/Documentation/filesystems/ext4.txt | |||
@@ -153,8 +153,8 @@ journal_dev=devnum When the external journal device's major/minor numbers | |||
153 | identified through its new major/minor numbers encoded | 153 | identified through its new major/minor numbers encoded |
154 | in devnum. | 154 | in devnum. |
155 | 155 | ||
156 | noload Don't load the journal on mounting. Note that | 156 | norecovery Don't load the journal on mounting. Note that |
157 | if the filesystem was not unmounted cleanly, | 157 | noload if the filesystem was not unmounted cleanly, |
158 | skipping the journal replay will lead to the | 158 | skipping the journal replay will lead to the |
159 | filesystem containing inconsistencies that can | 159 | filesystem containing inconsistencies that can |
160 | lead to any number of problems. | 160 | lead to any number of problems. |
@@ -353,6 +353,12 @@ noauto_da_alloc replacing existing files via patterns such as | |||
353 | system crashes before the delayed allocation | 353 | system crashes before the delayed allocation |
354 | blocks are forced to disk. | 354 | blocks are forced to disk. |
355 | 355 | ||
356 | discard Controls whether ext4 should issue discard/TRIM | ||
357 | nodiscard(*) commands to the underlying block device when | ||
358 | blocks are freed. This is useful for SSD devices | ||
359 | and sparse/thinly-provisioned LUNs, but it is off | ||
360 | by default until sufficient testing has been done. | ||
361 | |||
356 | Data Mode | 362 | Data Mode |
357 | ========= | 363 | ========= |
358 | There are 3 different data modes: | 364 | There are 3 different data modes: |
diff --git a/Documentation/filesystems/nfs/00-INDEX b/Documentation/filesystems/nfs/00-INDEX new file mode 100644 index 000000000000..2f68cd688769 --- /dev/null +++ b/Documentation/filesystems/nfs/00-INDEX | |||
@@ -0,0 +1,16 @@ | |||
1 | 00-INDEX | ||
2 | - this file (nfs-related documentation). | ||
3 | Exporting | ||
4 | - explanation of how to make filesystems exportable. | ||
5 | knfsd-stats.txt | ||
6 | - statistics which the NFS server makes available to user space. | ||
7 | nfs.txt | ||
8 | - nfs client, and DNS resolution for fs_locations. | ||
9 | nfs41-server.txt | ||
10 | - info on the Linux server implementation of NFSv4 minor version 1. | ||
11 | nfs-rdma.txt | ||
12 | - how to install and setup the Linux NFS/RDMA client and server software | ||
13 | nfsroot.txt | ||
14 | - short guide on setting up a diskless box with NFS root filesystem. | ||
15 | rpc-cache.txt | ||
16 | - introduction to the caching mechanisms in the sunrpc layer. | ||
diff --git a/Documentation/filesystems/Exporting b/Documentation/filesystems/nfs/Exporting index 87019d2b5981..87019d2b5981 100644 --- a/Documentation/filesystems/Exporting +++ b/Documentation/filesystems/nfs/Exporting | |||
diff --git a/Documentation/filesystems/knfsd-stats.txt b/Documentation/filesystems/nfs/knfsd-stats.txt index 64ced5149d37..64ced5149d37 100644 --- a/Documentation/filesystems/knfsd-stats.txt +++ b/Documentation/filesystems/nfs/knfsd-stats.txt | |||
diff --git a/Documentation/filesystems/nfs-rdma.txt b/Documentation/filesystems/nfs/nfs-rdma.txt index e386f7e4bcee..e386f7e4bcee 100644 --- a/Documentation/filesystems/nfs-rdma.txt +++ b/Documentation/filesystems/nfs/nfs-rdma.txt | |||
diff --git a/Documentation/filesystems/nfs.txt b/Documentation/filesystems/nfs/nfs.txt index f50f26ce6cd0..f50f26ce6cd0 100644 --- a/Documentation/filesystems/nfs.txt +++ b/Documentation/filesystems/nfs/nfs.txt | |||
diff --git a/Documentation/filesystems/nfs41-server.txt b/Documentation/filesystems/nfs/nfs41-server.txt index 5920fe26e6ff..1bd0d0c05171 100644 --- a/Documentation/filesystems/nfs41-server.txt +++ b/Documentation/filesystems/nfs/nfs41-server.txt | |||
@@ -41,7 +41,7 @@ interoperability problems with future clients. Known issues: | |||
41 | conformant with the spec (for example, we don't use kerberos | 41 | conformant with the spec (for example, we don't use kerberos |
42 | on the backchannel correctly). | 42 | on the backchannel correctly). |
43 | - no trunking support: no clients currently take advantage of | 43 | - no trunking support: no clients currently take advantage of |
44 | trunking, but this is a mandatory failure, and its use is | 44 | trunking, but this is a mandatory feature, and its use is |
45 | recommended to clients in a number of places. (E.g. to ensure | 45 | recommended to clients in a number of places. (E.g. to ensure |
46 | timely renewal in case an existing connection's retry timeouts | 46 | timely renewal in case an existing connection's retry timeouts |
47 | have gotten too long; see section 8.3 of the draft.) | 47 | have gotten too long; see section 8.3 of the draft.) |
@@ -213,3 +213,10 @@ The following cases aren't supported yet: | |||
213 | DESTROY_CLIENTID, DESTROY_SESSION, EXCHANGE_ID. | 213 | DESTROY_CLIENTID, DESTROY_SESSION, EXCHANGE_ID. |
214 | * DESTROY_SESSION MUST be the final operation in the COMPOUND request. | 214 | * DESTROY_SESSION MUST be the final operation in the COMPOUND request. |
215 | 215 | ||
216 | Nonstandard compound limitations: | ||
217 | * No support for a sessions fore channel RPC compound that requires both a | ||
218 | ca_maxrequestsize request and a ca_maxresponsesize reply, so we may | ||
219 | fail to live up to the promise we made in CREATE_SESSION fore channel | ||
220 | negotiation. | ||
221 | * No more than one IO operation (read, write, readdir) allowed per | ||
222 | compound. | ||
diff --git a/Documentation/filesystems/nfsroot.txt b/Documentation/filesystems/nfs/nfsroot.txt index 3ba0b945aaf8..3ba0b945aaf8 100644 --- a/Documentation/filesystems/nfsroot.txt +++ b/Documentation/filesystems/nfs/nfsroot.txt | |||
diff --git a/Documentation/filesystems/rpc-cache.txt b/Documentation/filesystems/nfs/rpc-cache.txt index 8a382bea6808..8a382bea6808 100644 --- a/Documentation/filesystems/rpc-cache.txt +++ b/Documentation/filesystems/nfs/rpc-cache.txt | |||
diff --git a/Documentation/filesystems/nilfs2.txt b/Documentation/filesystems/nilfs2.txt index 01539f410676..4949fcaa6b6a 100644 --- a/Documentation/filesystems/nilfs2.txt +++ b/Documentation/filesystems/nilfs2.txt | |||
@@ -49,8 +49,7 @@ Mount options | |||
49 | NILFS2 supports the following mount options: | 49 | NILFS2 supports the following mount options: |
50 | (*) == default | 50 | (*) == default |
51 | 51 | ||
52 | barrier=on(*) This enables/disables barriers. barrier=off disables | 52 | nobarrier Disables barriers. |
53 | it, barrier=on enables it. | ||
54 | errors=continue(*) Keep going on a filesystem error. | 53 | errors=continue(*) Keep going on a filesystem error. |
55 | errors=remount-ro Remount the filesystem read-only on an error. | 54 | errors=remount-ro Remount the filesystem read-only on an error. |
56 | errors=panic Panic and halt the machine if an error occurs. | 55 | errors=panic Panic and halt the machine if an error occurs. |
@@ -71,6 +70,10 @@ order=strict Apply strict in-order semantics that preserves sequence | |||
71 | blocks. That means, it is guaranteed that no | 70 | blocks. That means, it is guaranteed that no |
72 | overtaking of events occurs in the recovered file | 71 | overtaking of events occurs in the recovered file |
73 | system after a crash. | 72 | system after a crash. |
73 | norecovery Disable recovery of the filesystem on mount. | ||
74 | This disables every write access on the device for | ||
75 | read-only mounts or snapshots. This option will fail | ||
76 | for r/w mounts on an unclean volume. | ||
74 | 77 | ||
75 | NILFS2 usage | 78 | NILFS2 usage |
76 | ============ | 79 | ============ |
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index 92b888d540a6..a7e9746ee7ea 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting | |||
@@ -140,7 +140,7 @@ Callers of notify_change() need ->i_mutex now. | |||
140 | New super_block field "struct export_operations *s_export_op" for | 140 | New super_block field "struct export_operations *s_export_op" for |
141 | explicit support for exporting, e.g. via NFS. The structure is fully | 141 | explicit support for exporting, e.g. via NFS. The structure is fully |
142 | documented at its declaration in include/linux/fs.h, and in | 142 | documented at its declaration in include/linux/fs.h, and in |
143 | Documentation/filesystems/Exporting. | 143 | Documentation/filesystems/nfs/Exporting. |
144 | 144 | ||
145 | Briefly it allows for the definition of decode_fh and encode_fh operations | 145 | Briefly it allows for the definition of decode_fh and encode_fh operations |
146 | to encode and decode filehandles, and allows the filesystem to use | 146 | to encode and decode filehandles, and allows the filesystem to use |
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index 4af0018533f2..220cc6376ef8 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -38,6 +38,7 @@ Table of Contents | |||
38 | 3.3 /proc/<pid>/io - Display the IO accounting fields | 38 | 3.3 /proc/<pid>/io - Display the IO accounting fields |
39 | 3.4 /proc/<pid>/coredump_filter - Core dump filtering settings | 39 | 3.4 /proc/<pid>/coredump_filter - Core dump filtering settings |
40 | 3.5 /proc/<pid>/mountinfo - Information about mounts | 40 | 3.5 /proc/<pid>/mountinfo - Information about mounts |
41 | 3.6 /proc/<pid>/comm & /proc/<pid>/task/<tid>/comm | ||
41 | 42 | ||
42 | 43 | ||
43 | ------------------------------------------------------------------------------ | 44 | ------------------------------------------------------------------------------ |
@@ -1089,8 +1090,8 @@ The "processes" line gives the number of processes and threads created, which | |||
1089 | includes (but is not limited to) those created by calls to the fork() and | 1090 | includes (but is not limited to) those created by calls to the fork() and |
1090 | clone() system calls. | 1091 | clone() system calls. |
1091 | 1092 | ||
1092 | The "procs_running" line gives the number of processes currently running on | 1093 | The "procs_running" line gives the total number of threads that are |
1093 | CPUs. | 1094 | running or ready to run (i.e., the total number of runnable threads). |
1094 | 1095 | ||
1095 | The "procs_blocked" line gives the number of processes currently blocked, | 1096 | The "procs_blocked" line gives the number of processes currently blocked, |
1096 | waiting for I/O to complete. | 1097 | waiting for I/O to complete. |
@@ -1409,3 +1410,11 @@ For more information on mount propagation see: | |||
1409 | 1410 | ||
1410 | Documentation/filesystems/sharedsubtree.txt | 1411 | Documentation/filesystems/sharedsubtree.txt |
1411 | 1412 | ||
1413 | |||
1414 | 3.6 /proc/<pid>/comm & /proc/<pid>/task/<tid>/comm | ||
1415 | -------------------------------------------------------- | ||
1416 | These files provide a method to access a tasks comm value. It also allows for | ||
1417 | a task to set its own or one of its thread siblings comm value. The comm value | ||
1418 | is limited in size compared to the cmdline value, so writing anything longer | ||
1419 | then the kernel's TASK_COMM_LEN (currently 16 chars) will result in a truncated | ||
1420 | comm value. | ||
diff --git a/Documentation/filesystems/seq_file.txt b/Documentation/filesystems/seq_file.txt index 0d15ebccf5b0..a1e2e0dda907 100644 --- a/Documentation/filesystems/seq_file.txt +++ b/Documentation/filesystems/seq_file.txt | |||
@@ -248,9 +248,7 @@ code, that is done in the initialization code in the usual way: | |||
248 | { | 248 | { |
249 | struct proc_dir_entry *entry; | 249 | struct proc_dir_entry *entry; |
250 | 250 | ||
251 | entry = create_proc_entry("sequence", 0, NULL); | 251 | proc_create("sequence", 0, NULL, &ct_file_ops); |
252 | if (entry) | ||
253 | entry->proc_fops = &ct_file_ops; | ||
254 | return 0; | 252 | return 0; |
255 | } | 253 | } |
256 | 254 | ||
diff --git a/Documentation/filesystems/sysfs.txt b/Documentation/filesystems/sysfs.txt index b245d524d568..931c806642c5 100644 --- a/Documentation/filesystems/sysfs.txt +++ b/Documentation/filesystems/sysfs.txt | |||
@@ -91,8 +91,8 @@ struct device_attribute { | |||
91 | const char *buf, size_t count); | 91 | const char *buf, size_t count); |
92 | }; | 92 | }; |
93 | 93 | ||
94 | int device_create_file(struct device *, struct device_attribute *); | 94 | int device_create_file(struct device *, const struct device_attribute *); |
95 | void device_remove_file(struct device *, struct device_attribute *); | 95 | void device_remove_file(struct device *, const struct device_attribute *); |
96 | 96 | ||
97 | It also defines this helper for defining device attributes: | 97 | It also defines this helper for defining device attributes: |
98 | 98 | ||
@@ -316,8 +316,8 @@ DEVICE_ATTR(_name, _mode, _show, _store); | |||
316 | 316 | ||
317 | Creation/Removal: | 317 | Creation/Removal: |
318 | 318 | ||
319 | int device_create_file(struct device *device, struct device_attribute * attr); | 319 | int device_create_file(struct device *dev, const struct device_attribute * attr); |
320 | void device_remove_file(struct device * dev, struct device_attribute * attr); | 320 | void device_remove_file(struct device *dev, const struct device_attribute * attr); |
321 | 321 | ||
322 | 322 | ||
323 | - bus drivers (include/linux/device.h) | 323 | - bus drivers (include/linux/device.h) |
@@ -358,7 +358,7 @@ DRIVER_ATTR(_name, _mode, _show, _store) | |||
358 | 358 | ||
359 | Creation/Removal: | 359 | Creation/Removal: |
360 | 360 | ||
361 | int driver_create_file(struct device_driver *, struct driver_attribute *); | 361 | int driver_create_file(struct device_driver *, const struct driver_attribute *); |
362 | void driver_remove_file(struct device_driver *, struct driver_attribute *); | 362 | void driver_remove_file(struct device_driver *, const struct driver_attribute *); |
363 | 363 | ||
364 | 364 | ||
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 623f094c9d8d..3de2f32edd90 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -472,7 +472,7 @@ __sync_single_inode) to check if ->writepages has been successful in | |||
472 | writing out the whole address_space. | 472 | writing out the whole address_space. |
473 | 473 | ||
474 | The Writeback tag is used by filemap*wait* and sync_page* functions, | 474 | The Writeback tag is used by filemap*wait* and sync_page* functions, |
475 | via wait_on_page_writeback_range, to wait for all writeback to | 475 | via filemap_fdatawait_range, to wait for all writeback to |
476 | complete. While waiting ->sync_page (if defined) will be called on | 476 | complete. While waiting ->sync_page (if defined) will be called on |
477 | each page that is found to require writeback. | 477 | each page that is found to require writeback. |
478 | 478 | ||
diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt index fa4dc077ae0e..1866c27eec69 100644 --- a/Documentation/gpio.txt +++ b/Documentation/gpio.txt | |||
@@ -380,7 +380,7 @@ rare; use gpiochip_remove() when it is unavoidable. | |||
380 | 380 | ||
381 | Most often a gpio_chip is part of an instance-specific structure with state | 381 | Most often a gpio_chip is part of an instance-specific structure with state |
382 | not exposed by the GPIO interfaces, such as addressing, power management, | 382 | not exposed by the GPIO interfaces, such as addressing, power management, |
383 | and more. Chips such as codecs will have complex non-GPIO state, | 383 | and more. Chips such as codecs will have complex non-GPIO state. |
384 | 384 | ||
385 | Any debugfs dump method should normally ignore signals which haven't been | 385 | Any debugfs dump method should normally ignore signals which haven't been |
386 | requested as GPIOs. They can use gpiochip_is_requested(), which returns | 386 | requested as GPIOs. They can use gpiochip_is_requested(), which returns |
@@ -531,7 +531,14 @@ and have the following read/write attributes: | |||
531 | This file exists only if the pin can be configured as an | 531 | This file exists only if the pin can be configured as an |
532 | interrupt generating input pin. | 532 | interrupt generating input pin. |
533 | 533 | ||
534 | GPIO controllers have paths like /sys/class/gpio/chipchip42/ (for the | 534 | "active_low" ... reads as either 0 (false) or 1 (true). Write |
535 | any nonzero value to invert the value attribute both | ||
536 | for reading and writing. Existing and subsequent | ||
537 | poll(2) support configuration via the edge attribute | ||
538 | for "rising" and "falling" edges will follow this | ||
539 | setting. | ||
540 | |||
541 | GPIO controllers have paths like /sys/class/gpio/gpiochip42/ (for the | ||
535 | controller implementing GPIOs starting at #42) and have the following | 542 | controller implementing GPIOs starting at #42) and have the following |
536 | read-only attributes: | 543 | read-only attributes: |
537 | 544 | ||
@@ -566,6 +573,8 @@ requested using gpio_request(): | |||
566 | int gpio_export_link(struct device *dev, const char *name, | 573 | int gpio_export_link(struct device *dev, const char *name, |
567 | unsigned gpio) | 574 | unsigned gpio) |
568 | 575 | ||
576 | /* change the polarity of a GPIO node in sysfs */ | ||
577 | int gpio_sysfs_set_active_low(unsigned gpio, int value); | ||
569 | 578 | ||
570 | After a kernel driver requests a GPIO, it may only be made available in | 579 | After a kernel driver requests a GPIO, it may only be made available in |
571 | the sysfs interface by gpio_export(). The driver can control whether the | 580 | the sysfs interface by gpio_export(). The driver can control whether the |
@@ -580,3 +589,9 @@ After the GPIO has been exported, gpio_export_link() allows creating | |||
580 | symlinks from elsewhere in sysfs to the GPIO sysfs node. Drivers can | 589 | symlinks from elsewhere in sysfs to the GPIO sysfs node. Drivers can |
581 | use this to provide the interface under their own device in sysfs with | 590 | use this to provide the interface under their own device in sysfs with |
582 | a descriptive name. | 591 | a descriptive name. |
592 | |||
593 | Drivers can use gpio_sysfs_set_active_low() to hide GPIO line polarity | ||
594 | differences between boards from user space. This only affects the | ||
595 | sysfs interface. Polarity change can be done both before and after | ||
596 | gpio_export(), and previously enabled poll(2) support for either | ||
597 | rising or falling edge will be reconfigured to follow this setting. | ||
diff --git a/Documentation/hwmon/adt7473 b/Documentation/hwmon/adt7473 index 1cbf671822e2..446612bd1fb9 100644 --- a/Documentation/hwmon/adt7473 +++ b/Documentation/hwmon/adt7473 | |||
@@ -9,6 +9,8 @@ Supported chips: | |||
9 | 9 | ||
10 | Author: Darrick J. Wong | 10 | Author: Darrick J. Wong |
11 | 11 | ||
12 | This driver is depreacted, please use the adt7475 driver instead. | ||
13 | |||
12 | Description | 14 | Description |
13 | ----------- | 15 | ----------- |
14 | 16 | ||
diff --git a/Documentation/hwmon/adt7475 b/Documentation/hwmon/adt7475 index a2b1abec850e..0502f2b464e1 100644 --- a/Documentation/hwmon/adt7475 +++ b/Documentation/hwmon/adt7475 | |||
@@ -1,87 +1,117 @@ | |||
1 | This describes the interface for the ADT7475 driver: | 1 | Kernel driver adt7475 |
2 | 2 | ===================== | |
3 | (there are 4 fans, numbered fan1 to fan4): | 3 | |
4 | 4 | Supported chips: | |
5 | fanX_input Read the current speed of the fan (in RPMs) | 5 | * Analog Devices ADT7473 |
6 | fanX_min Read/write the minimum speed of the fan. Dropping | 6 | Prefix: 'adt7473' |
7 | below this sets an alarm. | 7 | Addresses scanned: I2C 0x2C, 0x2D, 0x2E |
8 | 8 | Datasheet: Publicly available at the On Semiconductors website | |
9 | (there are three PWMs, numbered pwm1 to pwm3): | 9 | * Analog Devices ADT7475 |
10 | 10 | Prefix: 'adt7475' | |
11 | pwmX Read/write the current duty cycle of the PWM. Writes | 11 | Addresses scanned: I2C 0x2E |
12 | only have effect when auto mode is turned off (see | 12 | Datasheet: Publicly available at the On Semiconductors website |
13 | below). Range is 0 - 255. | 13 | * Analog Devices ADT7476 |
14 | 14 | Prefix: 'adt7476' | |
15 | pwmX_enable Fan speed control method: | 15 | Addresses scanned: I2C 0x2C, 0x2D, 0x2E |
16 | 16 | Datasheet: Publicly available at the On Semiconductors website | |
17 | 0 - No control (fan at full speed) | 17 | * Analog Devices ADT7490 |
18 | 1 - Manual fan speed control (using pwm[1-*]) | 18 | Prefix: 'adt7490' |
19 | 2 - Automatic fan speed control | 19 | Addresses scanned: I2C 0x2C, 0x2D, 0x2E |
20 | 20 | Datasheet: Publicly available at the On Semiconductors website | |
21 | pwmX_auto_channels_temp Select which channels affect this PWM | 21 | |
22 | 22 | Authors: | |
23 | 1 - TEMP1 controls PWM | 23 | Jordan Crouse |
24 | 2 - TEMP2 controls PWM | 24 | Hans de Goede |
25 | 4 - TEMP3 controls PWM | 25 | Darrick J. Wong (documentation) |
26 | 6 - TEMP2 and TEMP3 control PWM | 26 | Jean Delvare |
27 | 7 - All three inputs control PWM | 27 | |
28 | 28 | ||
29 | pwmX_freq Read/write the PWM frequency in Hz. The number | 29 | Description |
30 | should be one of the following: | 30 | ----------- |
31 | 31 | ||
32 | 11 Hz | 32 | This driver implements support for the Analog Devices ADT7473, ADT7475, |
33 | 14 Hz | 33 | ADT7476 and ADT7490 chip family. The ADT7473 and ADT7475 differ only in |
34 | 22 Hz | 34 | minor details. The ADT7476 has additional features, including extra voltage |
35 | 29 Hz | 35 | measurement inputs and VID support. The ADT7490 also has additional |
36 | 35 Hz | 36 | features, including extra voltage measurement inputs and PECI support. All |
37 | 44 Hz | 37 | the supported chips will be collectively designed by the name "ADT747x" in |
38 | 58 Hz | 38 | the rest of this document. |
39 | 88 Hz | 39 | |
40 | 40 | The ADT747x uses the 2-wire interface compatible with the SMBus 2.0 | |
41 | pwmX_auto_point1_pwm Read/write the minimum PWM duty cycle in automatic mode | 41 | specification. Using an analog to digital converter it measures three (3) |
42 | 42 | temperatures and two (2) or more voltages. It has four (4) 16-bit counters | |
43 | pwmX_auto_point2_pwm Read/write the maximum PWM duty cycle in automatic mode | 43 | for measuring fan speed. There are three (3) PWM outputs that can be used |
44 | 44 | to control fan speed. | |
45 | (there are three temperature settings numbered temp1 to temp3): | 45 | |
46 | 46 | A sophisticated control system for the PWM outputs is designed into the | |
47 | tempX_input Read the current temperature. The value is in milli | 47 | ADT747x that allows fan speed to be adjusted automatically based on any of the |
48 | degrees of Celsius. | 48 | three temperature sensors. Each PWM output is individually adjustable and |
49 | 49 | programmable. Once configured, the ADT747x will adjust the PWM outputs in | |
50 | tempX_max Read/write the upper temperature limit - exceeding this | 50 | response to the measured temperatures without further host intervention. |
51 | will cause an alarm. | 51 | This feature can also be disabled for manual control of the PWM's. |
52 | 52 | ||
53 | tempX_min Read/write the lower temperature limit - exceeding this | 53 | Each of the measured inputs (voltage, temperature, fan speed) has |
54 | will cause an alarm. | 54 | corresponding high/low limit values. The ADT747x will signal an ALARM if |
55 | 55 | any measured value exceeds either limit. | |
56 | tempX_offset Read/write the temperature adjustment offset | 56 | |
57 | 57 | The ADT747x samples all inputs continuously. The driver will not read | |
58 | tempX_crit Read/write the THERM limit for remote1. | 58 | the registers more often than once every other second. Further, |
59 | 59 | configuration data is only read once per minute. | |
60 | tempX_crit_hyst Set the temperature value below crit where the | 60 | |
61 | fans will stay on - this helps drive the temperature | 61 | Chip Differences Summary |
62 | low enough so it doesn't stay near the edge and | 62 | ------------------------ |
63 | cause THERM to keep tripping. | 63 | |
64 | 64 | ADT7473: | |
65 | tempX_auto_point1_temp Read/write the minimum temperature where the fans will | 65 | * 2 voltage inputs |
66 | turn on in automatic mode. | 66 | * system acoustics optimizations (not implemented) |
67 | 67 | ||
68 | tempX_auto_point2_temp Read/write the maximum temperature over which the fans | 68 | ADT7475: |
69 | will run in automatic mode. tempX_auto_point1_temp | 69 | * 2 voltage inputs |
70 | and tempX_auto_point2_temp together define the | 70 | |
71 | range of automatic control. | 71 | ADT7476: |
72 | 72 | * 5 voltage inputs | |
73 | tempX_alarm Read a 1 if the max/min alarm is set | 73 | * VID support |
74 | tempX_fault Read a 1 if either temp1 or temp3 diode has a fault | 74 | |
75 | 75 | ADT7490: | |
76 | (There are two voltage settings, in1 and in2): | 76 | * 6 voltage inputs |
77 | 77 | * 1 Imon input (not implemented) | |
78 | inX_input Read the current voltage on VCC. Value is in | 78 | * PECI support (not implemented) |
79 | millivolts. | 79 | * 2 GPIO pins (not implemented) |
80 | 80 | * system acoustics optimizations (not implemented) | |
81 | inX_min read/write the minimum voltage limit. | 81 | |
82 | Dropping below this causes an alarm. | 82 | Special Features |
83 | 83 | ---------------- | |
84 | inX_max read/write the maximum voltage limit. | 84 | |
85 | Exceeding this causes an alarm. | 85 | The ADT747x has a 10-bit ADC and can therefore measure temperatures |
86 | 86 | with a resolution of 0.25 degree Celsius. Temperature readings can be | |
87 | inX_alarm Read a 1 if the max/min alarm is set. | 87 | configured either for two's complement format or "Offset 64" format, |
88 | wherein 64 is subtracted from the raw value to get the temperature value. | ||
89 | |||
90 | The datasheet is very detailed and describes a procedure for determining | ||
91 | an optimal configuration for the automatic PWM control. | ||
92 | |||
93 | Fan Speed Control | ||
94 | ----------------- | ||
95 | |||
96 | The driver exposes two trip points per PWM channel. | ||
97 | |||
98 | point1: Set the PWM speed at the lower temperature bound | ||
99 | point2: Set the PWM speed at the higher temperature bound | ||
100 | |||
101 | The ADT747x will scale the PWM linearly between the lower and higher PWM | ||
102 | speed when the temperature is between the two temperature boundaries. | ||
103 | Temperature boundaries are associated to temperature channels rather than | ||
104 | PWM outputs, and a given PWM output can be controlled by several temperature | ||
105 | channels. As a result, the ADT747x may compute more than one PWM value | ||
106 | for a channel at a given time, in which case the maximum value (fastest | ||
107 | fan speed) is applied. PWM values range from 0 (off) to 255 (full speed). | ||
108 | |||
109 | Fan speed may be set to maximum when the temperature sensor associated with | ||
110 | the PWM control exceeds temp#_max. | ||
111 | |||
112 | Notes | ||
113 | ----- | ||
114 | |||
115 | The nVidia binary driver presents an ADT7473 chip via an on-card i2c bus. | ||
116 | Unfortunately, they fail to set the i2c adapter class, so this driver may | ||
117 | fail to find the chip until the nvidia driver is patched. | ||
diff --git a/Documentation/hwmon/f71882fg b/Documentation/hwmon/f71882fg index bee4c30bc1e2..a7952c2bd959 100644 --- a/Documentation/hwmon/f71882fg +++ b/Documentation/hwmon/f71882fg | |||
@@ -14,6 +14,10 @@ Supported chips: | |||
14 | Prefix: 'f71882fg' | 14 | Prefix: 'f71882fg' |
15 | Addresses scanned: none, address read from Super I/O config space | 15 | Addresses scanned: none, address read from Super I/O config space |
16 | Datasheet: Available from the Fintek website | 16 | Datasheet: Available from the Fintek website |
17 | * Fintek F71889FG | ||
18 | Prefix: 'f71889fg' | ||
19 | Addresses scanned: none, address read from Super I/O config space | ||
20 | Datasheet: Should become available on the Fintek website soon | ||
17 | * Fintek F8000 | 21 | * Fintek F8000 |
18 | Prefix: 'f8000' | 22 | Prefix: 'f8000' |
19 | Addresses scanned: none, address read from Super I/O config space | 23 | Addresses scanned: none, address read from Super I/O config space |
@@ -51,6 +55,12 @@ supported. The right one to use depends on external circuitry on the | |||
51 | motherboard, so the driver assumes that the BIOS set the method | 55 | motherboard, so the driver assumes that the BIOS set the method |
52 | properly. | 56 | properly. |
53 | 57 | ||
58 | Note that the lowest numbered temperature zone trip point corresponds to | ||
59 | to the border between the highest and one but highest temperature zones, and | ||
60 | vica versa. So the temperature zone trip points 1-4 (or 1-2) go from high temp | ||
61 | to low temp! This is how things are implemented in the IC, and the driver | ||
62 | mimicks this. | ||
63 | |||
54 | There are 2 modes to specify the speed of the fan, PWM duty cycle (or DC | 64 | There are 2 modes to specify the speed of the fan, PWM duty cycle (or DC |
55 | voltage) mode, where 0-100% duty cycle (0-100% of 12V) is specified. And RPM | 65 | voltage) mode, where 0-100% duty cycle (0-100% of 12V) is specified. And RPM |
56 | mode where the actual RPM of the fan (as measured) is controlled and the speed | 66 | mode where the actual RPM of the fan (as measured) is controlled and the speed |
diff --git a/Documentation/hwmon/it87 b/Documentation/hwmon/it87 index 659315d98e00..f9ba96c0ac4a 100644 --- a/Documentation/hwmon/it87 +++ b/Documentation/hwmon/it87 | |||
@@ -86,7 +86,6 @@ The IT8712F and IT8716F additionally feature VID inputs, used to report | |||
86 | the Vcore voltage of the processor. The early IT8712F have 5 VID pins, | 86 | the Vcore voltage of the processor. The early IT8712F have 5 VID pins, |
87 | the IT8716F and late IT8712F have 6. They are shared with other functions | 87 | the IT8716F and late IT8712F have 6. They are shared with other functions |
88 | though, so the functionality may not be available on a given system. | 88 | though, so the functionality may not be available on a given system. |
89 | The driver dumbly assume it is there. | ||
90 | 89 | ||
91 | The IT8718F and IT8720F also features VID inputs (up to 8 pins) but the value | 90 | The IT8718F and IT8720F also features VID inputs (up to 8 pins) but the value |
92 | is stored in the Super-I/O configuration space. Due to technical limitations, | 91 | is stored in the Super-I/O configuration space. Due to technical limitations, |
diff --git a/Documentation/hwmon/k10temp b/Documentation/hwmon/k10temp new file mode 100644 index 000000000000..a7a18d453a51 --- /dev/null +++ b/Documentation/hwmon/k10temp | |||
@@ -0,0 +1,60 @@ | |||
1 | Kernel driver k10temp | ||
2 | ===================== | ||
3 | |||
4 | Supported chips: | ||
5 | * AMD Family 10h processors: | ||
6 | Socket F: Quad-Core/Six-Core/Embedded Opteron | ||
7 | Socket AM2+: Opteron, Phenom (II) X3/X4 | ||
8 | Socket AM3: Quad-Core Opteron, Athlon/Phenom II X2/X3/X4, Sempron II | ||
9 | Socket S1G3: Athlon II, Sempron, Turion II | ||
10 | * AMD Family 11h processors: | ||
11 | Socket S1G2: Athlon (X2), Sempron (X2), Turion X2 (Ultra) | ||
12 | |||
13 | Prefix: 'k10temp' | ||
14 | Addresses scanned: PCI space | ||
15 | Datasheets: | ||
16 | BIOS and Kernel Developer's Guide (BKDG) For AMD Family 10h Processors: | ||
17 | http://support.amd.com/us/Processor_TechDocs/31116.pdf | ||
18 | BIOS and Kernel Developer's Guide (BKDG) for AMD Family 11h Processors: | ||
19 | http://support.amd.com/us/Processor_TechDocs/41256.pdf | ||
20 | Revision Guide for AMD Family 10h Processors: | ||
21 | http://support.amd.com/us/Processor_TechDocs/41322.pdf | ||
22 | Revision Guide for AMD Family 11h Processors: | ||
23 | http://support.amd.com/us/Processor_TechDocs/41788.pdf | ||
24 | AMD Family 11h Processor Power and Thermal Data Sheet for Notebooks: | ||
25 | http://support.amd.com/us/Processor_TechDocs/43373.pdf | ||
26 | AMD Family 10h Server and Workstation Processor Power and Thermal Data Sheet: | ||
27 | http://support.amd.com/us/Processor_TechDocs/43374.pdf | ||
28 | AMD Family 10h Desktop Processor Power and Thermal Data Sheet: | ||
29 | http://support.amd.com/us/Processor_TechDocs/43375.pdf | ||
30 | |||
31 | Author: Clemens Ladisch <clemens@ladisch.de> | ||
32 | |||
33 | Description | ||
34 | ----------- | ||
35 | |||
36 | This driver permits reading of the internal temperature sensor of AMD | ||
37 | Family 10h and 11h processors. | ||
38 | |||
39 | All these processors have a sensor, but on older revisions of Family 10h | ||
40 | processors, the sensor may return inconsistent values (erratum 319). The | ||
41 | driver will refuse to load on these revisions unless you specify the | ||
42 | "force=1" module parameter. | ||
43 | |||
44 | There is one temperature measurement value, available as temp1_input in | ||
45 | sysfs. It is measured in degrees Celsius with a resolution of 1/8th degree. | ||
46 | Please note that it is defined as a relative value; to quote the AMD manual: | ||
47 | |||
48 | Tctl is the processor temperature control value, used by the platform to | ||
49 | control cooling systems. Tctl is a non-physical temperature on an | ||
50 | arbitrary scale measured in degrees. It does _not_ represent an actual | ||
51 | physical temperature like die or case temperature. Instead, it specifies | ||
52 | the processor temperature relative to the point at which the system must | ||
53 | supply the maximum cooling for the processor's specified maximum case | ||
54 | temperature and maximum thermal power dissipation. | ||
55 | |||
56 | The maximum value for Tctl is available in the file temp1_max. | ||
57 | |||
58 | If the BIOS has enabled hardware temperature control, the threshold at | ||
59 | which the processor will throttle itself to avoid damage is available in | ||
60 | temp1_crit and temp1_crit_hyst. | ||
diff --git a/Documentation/hwmon/lis3lv02d b/Documentation/hwmon/lis3lv02d index effe949a7282..06534f25e643 100644 --- a/Documentation/hwmon/lis3lv02d +++ b/Documentation/hwmon/lis3lv02d | |||
@@ -3,7 +3,8 @@ Kernel driver lis3lv02d | |||
3 | 3 | ||
4 | Supported chips: | 4 | Supported chips: |
5 | 5 | ||
6 | * STMicroelectronics LIS3LV02DL and LIS3LV02DQ | 6 | * STMicroelectronics LIS3LV02DL, LIS3LV02DQ (12 bits precision) |
7 | * STMicroelectronics LIS302DL, LIS3L02DQ, LIS331DL (8 bits) | ||
7 | 8 | ||
8 | Authors: | 9 | Authors: |
9 | Yan Burman <burman.yan@gmail.com> | 10 | Yan Burman <burman.yan@gmail.com> |
@@ -13,32 +14,52 @@ Authors: | |||
13 | Description | 14 | Description |
14 | ----------- | 15 | ----------- |
15 | 16 | ||
16 | This driver provides support for the accelerometer found in various HP | 17 | This driver provides support for the accelerometer found in various HP laptops |
17 | laptops sporting the feature officially called "HP Mobile Data | 18 | sporting the feature officially called "HP Mobile Data Protection System 3D" or |
18 | Protection System 3D" or "HP 3D DriveGuard". It detects automatically | 19 | "HP 3D DriveGuard". It detects automatically laptops with this sensor. Known |
19 | laptops with this sensor. Known models (for now the HP 2133, nc6420, | 20 | models (full list can be found in drivers/hwmon/hp_accel.c) will have their |
20 | nc2510, nc8510, nc84x0, nw9440 and nx9420) will have their axis | 21 | axis automatically oriented on standard way (eg: you can directly play |
21 | automatically oriented on standard way (eg: you can directly play | 22 | neverball). The accelerometer data is readable via |
22 | neverball). The accelerometer data is readable via | 23 | /sys/devices/platform/lis3lv02d. Reported values are scaled |
23 | /sys/devices/platform/lis3lv02d. | 24 | to mg values (1/1000th of earth gravity). |
24 | 25 | ||
25 | Sysfs attributes under /sys/devices/platform/lis3lv02d/: | 26 | Sysfs attributes under /sys/devices/platform/lis3lv02d/: |
26 | position - 3D position that the accelerometer reports. Format: "(x,y,z)" | 27 | position - 3D position that the accelerometer reports. Format: "(x,y,z)" |
27 | calibrate - read: values (x, y, z) that are used as the base for input | 28 | rate - read reports the sampling rate of the accelerometer device in HZ. |
28 | class device operation. | 29 | write changes sampling rate of the accelerometer device. |
29 | write: forces the base to be recalibrated with the current | 30 | Only values which are supported by HW are accepted. |
30 | position. | 31 | selftest - performs selftest for the chip as specified by chip manufacturer. |
31 | rate - reports the sampling rate of the accelerometer device in HZ | ||
32 | 32 | ||
33 | This driver also provides an absolute input class device, allowing | 33 | This driver also provides an absolute input class device, allowing |
34 | the laptop to act as a pinball machine-esque joystick. | 34 | the laptop to act as a pinball machine-esque joystick. Joystick device can be |
35 | calibrated. Joystick device can be in two different modes. | ||
36 | By default output values are scaled between -32768 .. 32767. In joystick raw | ||
37 | mode, joystick and sysfs position entry have the same scale. There can be | ||
38 | small difference due to input system fuzziness feature. | ||
39 | Events are also available as input event device. | ||
40 | |||
41 | Selftest is meant only for hardware diagnostic purposes. It is not meant to be | ||
42 | used during normal operations. Position data is not corrupted during selftest | ||
43 | but interrupt behaviour is not guaranteed to work reliably. In test mode, the | ||
44 | sensing element is internally moved little bit. Selftest measures difference | ||
45 | between normal mode and test mode. Chip specifications tell the acceptance | ||
46 | limit for each type of the chip. Limits are provided via platform data | ||
47 | to allow adjustment of the limits without a change to the actual driver. | ||
48 | Seltest returns either "OK x y z" or "FAIL x y z" where x, y and z are | ||
49 | measured difference between modes. Axes are not remapped in selftest mode. | ||
50 | Measurement values are provided to help HW diagnostic applications to make | ||
51 | final decision. | ||
52 | |||
53 | On HP laptops, if the led infrastructure is activated, support for a led | ||
54 | indicating disk protection will be provided as /sys/class/leds/hp::hddprotect. | ||
35 | 55 | ||
36 | Another feature of the driver is misc device called "freefall" that | 56 | Another feature of the driver is misc device called "freefall" that |
37 | acts similar to /dev/rtc and reacts on free-fall interrupts received | 57 | acts similar to /dev/rtc and reacts on free-fall interrupts received |
38 | from the device. It supports blocking operations, poll/select and | 58 | from the device. It supports blocking operations, poll/select and |
39 | fasync operation modes. You must read 1 bytes from the device. The | 59 | fasync operation modes. You must read 1 bytes from the device. The |
40 | result is number of free-fall interrupts since the last successful | 60 | result is number of free-fall interrupts since the last successful |
41 | read (or 255 if number of interrupts would not fit). | 61 | read (or 255 if number of interrupts would not fit). See the hpfall.c |
62 | file for an example on using the device. | ||
42 | 63 | ||
43 | 64 | ||
44 | Axes orientation | 65 | Axes orientation |
@@ -55,7 +76,7 @@ the accelerometer are converted into a "standard" organisation of the axes | |||
55 | * If the laptop is put upside-down, Z becomes negative | 76 | * If the laptop is put upside-down, Z becomes negative |
56 | 77 | ||
57 | If your laptop model is not recognized (cf "dmesg"), you can send an | 78 | If your laptop model is not recognized (cf "dmesg"), you can send an |
58 | email to the authors to add it to the database. When reporting a new | 79 | email to the maintainer to add it to the database. When reporting a new |
59 | laptop, please include the output of "dmidecode" plus the value of | 80 | laptop, please include the output of "dmidecode" plus the value of |
60 | /sys/devices/platform/lis3lv02d/position in these four cases. | 81 | /sys/devices/platform/lis3lv02d/position in these four cases. |
61 | 82 | ||
diff --git a/Documentation/hwmon/mc13783-adc b/Documentation/hwmon/mc13783-adc new file mode 100644 index 000000000000..044531a86405 --- /dev/null +++ b/Documentation/hwmon/mc13783-adc | |||
@@ -0,0 +1,50 @@ | |||
1 | Kernel driver mc13783-adc | ||
2 | ========================= | ||
3 | |||
4 | Supported chips: | ||
5 | * Freescale Atlas MC13783 | ||
6 | Prefix: 'mc13783_adc' | ||
7 | Datasheet: http://www.freescale.com/files/rf_if/doc/data_sheet/MC13783.pdf?fsrch=1 | ||
8 | |||
9 | Authors: | ||
10 | Sascha Hauer <s.hauer@pengutronix.de> | ||
11 | Luotao Fu <l.fu@pengutronix.de> | ||
12 | |||
13 | Description | ||
14 | ----------- | ||
15 | |||
16 | The Freescale MC13783 is a Power Management and Audio Circuit. Among | ||
17 | other things it contains a 10-bit A/D converter. The converter has 16 | ||
18 | channels which can be used in different modes. | ||
19 | The A/D converter has a resolution of 2.25mV. Channels 0-4 have | ||
20 | a dedicated meaning with chip internal scaling applied. Channels 5-7 | ||
21 | can be used as general purpose inputs or alternatively in a dedicated | ||
22 | mode. Channels 12-15 are occupied by the touchscreen if it's active. | ||
23 | |||
24 | Currently the driver only supports channels 2 and 5-15 with no alternative | ||
25 | modes for channels 5-7. | ||
26 | |||
27 | See this table for the meaning of the different channels and their chip | ||
28 | internal scaling: | ||
29 | |||
30 | Channel Signal Input Range Scaling | ||
31 | ------------------------------------------------------------------------------- | ||
32 | 0 Battery Voltage (BATT) 2.50 - 4.65V -2.40V | ||
33 | 1 Battery Current (BATT - BATTISNS) -50 - 50 mV x20 | ||
34 | 2 Application Supply (BP) 2.50 - 4.65V -2.40V | ||
35 | 3 Charger Voltage (CHRGRAW) 0 - 10V / /5 | ||
36 | 0 - 20V /10 | ||
37 | 4 Charger Current (CHRGISNSP-CHRGISNSN) -0.25V - 0.25V x4 | ||
38 | 5 General Purpose ADIN5 / Battery Pack Thermistor 0 - 2.30V No | ||
39 | 6 General Purpose ADIN6 / Backup Voltage (LICELL) 0 - 2.30V / No / | ||
40 | 1.50 - 3.50V -1.20V | ||
41 | 7 General Purpose ADIN7 / UID / Die Temperature 0 - 2.30V / No / | ||
42 | 0 - 2.55V / x0.9 / No | ||
43 | 8 General Purpose ADIN8 0 - 2.30V No | ||
44 | 9 General Purpose ADIN9 0 - 2.30V No | ||
45 | 10 General Purpose ADIN10 0 - 2.30V No | ||
46 | 11 General Purpose ADIN11 0 - 2.30V No | ||
47 | 12 General Purpose TSX1 / Touchscreen X-plate 1 0 - 2.30V No | ||
48 | 13 General Purpose TSX2 / Touchscreen X-plate 2 0 - 2.30V No | ||
49 | 14 General Purpose TSY1 / Touchscreen Y-plate 1 0 - 2.30V No | ||
50 | 15 General Purpose TSY2 / Touchscreen Y-plate 2 0 - 2.30V No | ||
diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface index 82def883361b..3de6b0bcb147 100644 --- a/Documentation/hwmon/sysfs-interface +++ b/Documentation/hwmon/sysfs-interface | |||
@@ -225,8 +225,6 @@ pwm[1-*]_auto_point[1-*]_temp_hyst | |||
225 | to PWM output channels. | 225 | to PWM output channels. |
226 | RW | 226 | RW |
227 | 227 | ||
228 | OR | ||
229 | |||
230 | temp[1-*]_auto_point[1-*]_pwm | 228 | temp[1-*]_auto_point[1-*]_pwm |
231 | temp[1-*]_auto_point[1-*]_temp | 229 | temp[1-*]_auto_point[1-*]_temp |
232 | temp[1-*]_auto_point[1-*]_temp_hyst | 230 | temp[1-*]_auto_point[1-*]_temp_hyst |
@@ -235,6 +233,15 @@ temp[1-*]_auto_point[1-*]_temp_hyst | |||
235 | to temperature channels. | 233 | to temperature channels. |
236 | RW | 234 | RW |
237 | 235 | ||
236 | There is a third case where trip points are associated to both PWM output | ||
237 | channels and temperature channels: the PWM values are associated to PWM | ||
238 | output channels while the temperature values are associated to temperature | ||
239 | channels. In that case, the result is determined by the mapping between | ||
240 | temperature inputs and PWM outputs. When several temperature inputs are | ||
241 | mapped to a given PWM output, this leads to several candidate PWM values. | ||
242 | The actual result is up to the chip, but in general the highest candidate | ||
243 | value (fastest fan speed) wins. | ||
244 | |||
238 | 245 | ||
239 | **************** | 246 | **************** |
240 | * Temperatures * | 247 | * Temperatures * |
diff --git a/Documentation/hwmon/w83627ehf b/Documentation/hwmon/w83627ehf index 02b74899edaf..b7e42ec4b26b 100644 --- a/Documentation/hwmon/w83627ehf +++ b/Documentation/hwmon/w83627ehf | |||
@@ -81,8 +81,14 @@ pwm[1-4] - this file stores PWM duty cycle or DC value (fan speed) in range: | |||
81 | 0 (stop) to 255 (full) | 81 | 0 (stop) to 255 (full) |
82 | 82 | ||
83 | pwm[1-4]_enable - this file controls mode of fan/temperature control: | 83 | pwm[1-4]_enable - this file controls mode of fan/temperature control: |
84 | * 1 Manual Mode, write to pwm file any value 0-255 (full speed) | 84 | * 1 Manual mode, write to pwm file any value 0-255 (full speed) |
85 | * 2 Thermal Cruise | 85 | * 2 "Thermal Cruise" mode |
86 | * 3 "Fan Speed Cruise" mode | ||
87 | * 4 "Smart Fan III" mode | ||
88 | |||
89 | pwm[1-4]_mode - controls if output is PWM or DC level | ||
90 | * 0 DC output (0 - 12v) | ||
91 | * 1 PWM output | ||
86 | 92 | ||
87 | Thermal Cruise mode | 93 | Thermal Cruise mode |
88 | ------------------- | 94 | ------------------- |
diff --git a/Documentation/hwmon/w83627hf b/Documentation/hwmon/w83627hf index 6ee36dbafd64..44dd2bcc72bd 100644 --- a/Documentation/hwmon/w83627hf +++ b/Documentation/hwmon/w83627hf | |||
@@ -32,8 +32,6 @@ Authors: | |||
32 | Module Parameters | 32 | Module Parameters |
33 | ----------------- | 33 | ----------------- |
34 | 34 | ||
35 | * force_addr: int | ||
36 | Initialize the ISA address of the sensors | ||
37 | * force_i2c: int | 35 | * force_i2c: int |
38 | Initialize the I2C address of the sensors | 36 | Initialize the I2C address of the sensors |
39 | * init: int | 37 | * init: int |
@@ -70,3 +68,30 @@ doesn't help, you may just ignore the bogus VID reading with no harm done. | |||
70 | For further information on this driver see the w83781d driver documentation. | 68 | For further information on this driver see the w83781d driver documentation. |
71 | 69 | ||
72 | [1] http://www.lm-sensors.org/browser/lm-sensors/trunk/doc/vid | 70 | [1] http://www.lm-sensors.org/browser/lm-sensors/trunk/doc/vid |
71 | |||
72 | Forcing the address | ||
73 | ------------------- | ||
74 | |||
75 | The driver used to have a module parameter named force_addr, which could | ||
76 | be used to force the base I/O address of the hardware monitoring block. | ||
77 | This was meant as a workaround for mainboards with a broken BIOS. This | ||
78 | module parameter is gone for technical reasons. If you need this feature, | ||
79 | you can obtain the same result by using the isaset tool (part of | ||
80 | lm-sensors) before loading the driver: | ||
81 | |||
82 | # Enter the Super I/O config space | ||
83 | isaset -y -f 0x2e 0x87 | ||
84 | isaset -y -f 0x2e 0x87 | ||
85 | |||
86 | # Select the hwmon logical device | ||
87 | isaset -y 0x2e 0x2f 0x07 0x0b | ||
88 | |||
89 | # Set the base I/O address (to 0x290 in this example) | ||
90 | isaset -y 0x2e 0x2f 0x60 0x02 | ||
91 | isaset -y 0x2e 0x2f 0x61 0x90 | ||
92 | |||
93 | # Exit the Super-I/O config space | ||
94 | isaset -y -f 0x2e 0xaa | ||
95 | |||
96 | The above sequence assumes a Super-I/O config space at 0x2e/0x2f, but | ||
97 | 0x4e/0x4f is also possible. | ||
diff --git a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients index 7860aafb483d..0a74603eb671 100644 --- a/Documentation/i2c/writing-clients +++ b/Documentation/i2c/writing-clients | |||
@@ -44,7 +44,7 @@ static struct i2c_driver foo_driver = { | |||
44 | /* if device autodetection is needed: */ | 44 | /* if device autodetection is needed: */ |
45 | .class = I2C_CLASS_SOMETHING, | 45 | .class = I2C_CLASS_SOMETHING, |
46 | .detect = foo_detect, | 46 | .detect = foo_detect, |
47 | .address_data = &addr_data, | 47 | .address_list = normal_i2c, |
48 | 48 | ||
49 | .shutdown = foo_shutdown, /* optional */ | 49 | .shutdown = foo_shutdown, /* optional */ |
50 | .suspend = foo_suspend, /* optional */ | 50 | .suspend = foo_suspend, /* optional */ |
diff --git a/Documentation/infiniband/ipoib.txt b/Documentation/infiniband/ipoib.txt index 6d40f00b358c..64eeb55d0c09 100644 --- a/Documentation/infiniband/ipoib.txt +++ b/Documentation/infiniband/ipoib.txt | |||
@@ -36,11 +36,11 @@ Datagram vs Connected modes | |||
36 | fabric with a 2K MTU, the IPoIB MTU will be 2048 - 4 = 2044 bytes. | 36 | fabric with a 2K MTU, the IPoIB MTU will be 2048 - 4 = 2044 bytes. |
37 | 37 | ||
38 | In connected mode, the IB RC (Reliable Connected) transport is used. | 38 | In connected mode, the IB RC (Reliable Connected) transport is used. |
39 | Connected mode is to takes advantage of the connected nature of the | 39 | Connected mode takes advantage of the connected nature of the IB |
40 | IB transport and allows an MTU up to the maximal IP packet size of | 40 | transport and allows an MTU up to the maximal IP packet size of 64K, |
41 | 64K, which reduces the number of IP packets needed for handling | 41 | which reduces the number of IP packets needed for handling large UDP |
42 | large UDP datagrams, TCP segments, etc and increases the performance | 42 | datagrams, TCP segments, etc and increases the performance for large |
43 | for large messages. | 43 | messages. |
44 | 44 | ||
45 | In connected mode, the interface's UD QP is still used for multicast | 45 | In connected mode, the interface's UD QP is still used for multicast |
46 | and communication with peers that don't support connected mode. In | 46 | and communication with peers that don't support connected mode. In |
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt index bb3bf38f03da..6f8c1cabbc5d 100644 --- a/Documentation/kbuild/kbuild.txt +++ b/Documentation/kbuild/kbuild.txt | |||
@@ -1,3 +1,17 @@ | |||
1 | Output files | ||
2 | |||
3 | modules.order | ||
4 | -------------------------------------------------- | ||
5 | This file records the order in which modules appear in Makefiles. This | ||
6 | is used by modprobe to deterministically resolve aliases that match | ||
7 | multiple modules. | ||
8 | |||
9 | modules.builtin | ||
10 | -------------------------------------------------- | ||
11 | This file lists all modules that are built into the kernel. This is used | ||
12 | by modprobe to not fail when trying to load something builtin. | ||
13 | |||
14 | |||
1 | Environment variables | 15 | Environment variables |
2 | 16 | ||
3 | KCPPFLAGS | 17 | KCPPFLAGS |
diff --git a/Documentation/kbuild/kconfig.txt b/Documentation/kbuild/kconfig.txt index 849b5e56d06f..49efae703979 100644 --- a/Documentation/kbuild/kconfig.txt +++ b/Documentation/kbuild/kconfig.txt | |||
@@ -103,10 +103,16 @@ KCONFIG_AUTOCONFIG | |||
103 | This environment variable can be set to specify the path & name of the | 103 | This environment variable can be set to specify the path & name of the |
104 | "auto.conf" file. Its default value is "include/config/auto.conf". | 104 | "auto.conf" file. Its default value is "include/config/auto.conf". |
105 | 105 | ||
106 | KCONFIG_TRISTATE | ||
107 | -------------------------------------------------- | ||
108 | This environment variable can be set to specify the path & name of the | ||
109 | "tristate.conf" file. Its default value is "include/config/tristate.conf". | ||
110 | |||
106 | KCONFIG_AUTOHEADER | 111 | KCONFIG_AUTOHEADER |
107 | -------------------------------------------------- | 112 | -------------------------------------------------- |
108 | This environment variable can be set to specify the path & name of the | 113 | This environment variable can be set to specify the path & name of the |
109 | "autoconf.h" (header) file. Its default value is "include/linux/autoconf.h". | 114 | "autoconf.h" (header) file. |
115 | Its default value is "include/generated/autoconf.h". | ||
110 | 116 | ||
111 | 117 | ||
112 | ====================================================================== | 118 | ====================================================================== |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 495a39a77341..5ba4d9dff113 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -1032,7 +1032,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1032 | No delay | 1032 | No delay |
1033 | 1033 | ||
1034 | ip= [IP_PNP] | 1034 | ip= [IP_PNP] |
1035 | See Documentation/filesystems/nfsroot.txt. | 1035 | See Documentation/filesystems/nfs/nfsroot.txt. |
1036 | 1036 | ||
1037 | ip2= [HW] Set IO/IRQ pairs for up to 4 IntelliPort boards | 1037 | ip2= [HW] Set IO/IRQ pairs for up to 4 IntelliPort boards |
1038 | See comment before ip2_setup() in | 1038 | See comment before ip2_setup() in |
@@ -1553,10 +1553,10 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1553 | going to be removed in 2.6.29. | 1553 | going to be removed in 2.6.29. |
1554 | 1554 | ||
1555 | nfsaddrs= [NFS] | 1555 | nfsaddrs= [NFS] |
1556 | See Documentation/filesystems/nfsroot.txt. | 1556 | See Documentation/filesystems/nfs/nfsroot.txt. |
1557 | 1557 | ||
1558 | nfsroot= [NFS] nfs root filesystem for disk-less boxes. | 1558 | nfsroot= [NFS] nfs root filesystem for disk-less boxes. |
1559 | See Documentation/filesystems/nfsroot.txt. | 1559 | See Documentation/filesystems/nfs/nfsroot.txt. |
1560 | 1560 | ||
1561 | nfs.callback_tcpport= | 1561 | nfs.callback_tcpport= |
1562 | [NFS] set the TCP port on which the NFSv4 callback | 1562 | [NFS] set the TCP port on which the NFSv4 callback |
@@ -1787,6 +1787,11 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1787 | waiting for the ACK, so if this is set too high | 1787 | waiting for the ACK, so if this is set too high |
1788 | interrupts *may* be lost! | 1788 | interrupts *may* be lost! |
1789 | 1789 | ||
1790 | omap_mux= [OMAP] Override bootloader pin multiplexing. | ||
1791 | Format: <mux_mode0.mode_name=value>... | ||
1792 | For example, to override I2C bus2: | ||
1793 | omap_mux=i2c2_scl.i2c2_scl=0x100,i2c2_sda.i2c2_sda=0x100 | ||
1794 | |||
1790 | opl3= [HW,OSS] | 1795 | opl3= [HW,OSS] |
1791 | Format: <io> | 1796 | Format: <io> |
1792 | 1797 | ||
@@ -2663,6 +2668,8 @@ and is between 256 and 4096 characters. It is defined in the file | |||
2663 | to a common usb-storage quirk flag as follows: | 2668 | to a common usb-storage quirk flag as follows: |
2664 | a = SANE_SENSE (collect more than 18 bytes | 2669 | a = SANE_SENSE (collect more than 18 bytes |
2665 | of sense data); | 2670 | of sense data); |
2671 | b = BAD_SENSE (don't collect more than 18 | ||
2672 | bytes of sense data); | ||
2666 | c = FIX_CAPACITY (decrease the reported | 2673 | c = FIX_CAPACITY (decrease the reported |
2667 | device capacity by one sector); | 2674 | device capacity by one sector); |
2668 | h = CAPACITY_HEURISTICS (decrease the | 2675 | h = CAPACITY_HEURISTICS (decrease the |
@@ -2722,6 +2729,11 @@ and is between 256 and 4096 characters. It is defined in the file | |||
2722 | vmpoff= [KNL,S390] Perform z/VM CP command after power off. | 2729 | vmpoff= [KNL,S390] Perform z/VM CP command after power off. |
2723 | Format: <command> | 2730 | Format: <command> |
2724 | 2731 | ||
2732 | vt.cur_default= [VT] Default cursor shape. | ||
2733 | Format: 0xCCBBAA, where AA, BB, and CC are the same as | ||
2734 | the parameters of the <Esc>[?A;B;Cc escape sequence; | ||
2735 | see VGA-softcursor.txt. Default: 2 = underline. | ||
2736 | |||
2725 | vt.default_blu= [VT] | 2737 | vt.default_blu= [VT] |
2726 | Format: <blue0>,<blue1>,<blue2>,...,<blue15> | 2738 | Format: <blue0>,<blue1>,<blue2>,...,<blue15> |
2727 | Change the default blue palette of the console. | 2739 | Change the default blue palette of the console. |
@@ -2747,6 +2759,15 @@ and is between 256 and 4096 characters. It is defined in the file | |||
2747 | Default is 1, i.e. UTF-8 mode is enabled for all | 2759 | Default is 1, i.e. UTF-8 mode is enabled for all |
2748 | newly opened terminals. | 2760 | newly opened terminals. |
2749 | 2761 | ||
2762 | vt.global_cursor_default= | ||
2763 | [VT] | ||
2764 | Format=<-1|0|1> | ||
2765 | Set system-wide default for whether a cursor | ||
2766 | is shown on new VTs. Default is -1, | ||
2767 | i.e. cursors will be created by default unless | ||
2768 | overridden by individual drivers. 0 will hide | ||
2769 | cursors, 1 will display them. | ||
2770 | |||
2750 | waveartist= [HW,OSS] | 2771 | waveartist= [HW,OSS] |
2751 | Format: <io>,<irq>,<dma>,<dma2> | 2772 | Format: <io>,<irq>,<dma>,<dma2> |
2752 | 2773 | ||
diff --git a/Documentation/laptops/thinkpad-acpi.txt b/Documentation/laptops/thinkpad-acpi.txt index aafcaa634191..169091f75e6d 100644 --- a/Documentation/laptops/thinkpad-acpi.txt +++ b/Documentation/laptops/thinkpad-acpi.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | ThinkPad ACPI Extras Driver | 1 | ThinkPad ACPI Extras Driver |
2 | 2 | ||
3 | Version 0.23 | 3 | Version 0.24 |
4 | April 10th, 2009 | 4 | December 11th, 2009 |
5 | 5 | ||
6 | Borislav Deianov <borislav@users.sf.net> | 6 | Borislav Deianov <borislav@users.sf.net> |
7 | Henrique de Moraes Holschuh <hmh@hmh.eng.br> | 7 | Henrique de Moraes Holschuh <hmh@hmh.eng.br> |
@@ -460,6 +460,8 @@ event code Key Notes | |||
460 | For Lenovo ThinkPads with a new | 460 | For Lenovo ThinkPads with a new |
461 | BIOS, it has to be handled either | 461 | BIOS, it has to be handled either |
462 | by the ACPI OSI, or by userspace. | 462 | by the ACPI OSI, or by userspace. |
463 | The driver does the right thing, | ||
464 | never mess with this. | ||
463 | 0x1011 0x10 FN+END Brightness down. See brightness | 465 | 0x1011 0x10 FN+END Brightness down. See brightness |
464 | up for details. | 466 | up for details. |
465 | 467 | ||
@@ -582,46 +584,15 @@ with hotkey_report_mode. | |||
582 | 584 | ||
583 | Brightness hotkey notes: | 585 | Brightness hotkey notes: |
584 | 586 | ||
585 | These are the current sane choices for brightness key mapping in | 587 | Don't mess with the brightness hotkeys in a Thinkpad. If you want |
586 | thinkpad-acpi: | 588 | notifications for OSD, use the sysfs backlight class event support. |
587 | 589 | ||
588 | For IBM and Lenovo models *without* ACPI backlight control (the ones on | 590 | The driver will issue KEY_BRIGHTNESS_UP and KEY_BRIGHTNESS_DOWN events |
589 | which thinkpad-acpi will autoload its backlight interface by default, | 591 | automatically for the cases were userspace has to do something to |
590 | and on which ACPI video does not export a backlight interface): | 592 | implement brightness changes. When you override these events, you will |
591 | 593 | either fail to handle properly the ThinkPads that require explicit | |
592 | 1. Don't enable or map the brightness hotkeys in thinkpad-acpi, as | 594 | action to change backlight brightness, or the ThinkPads that require |
593 | these older firmware versions unfortunately won't respect the hotkey | 595 | that no action be taken to work properly. |
594 | mask for brightness keys anyway, and always reacts to them. This | ||
595 | usually work fine, unless X.org drivers are doing something to block | ||
596 | the BIOS. In that case, use (3) below. This is the default mode of | ||
597 | operation. | ||
598 | |||
599 | 2. Enable the hotkeys, but map them to something else that is NOT | ||
600 | KEY_BRIGHTNESS_UP/DOWN or any other keycode that would cause | ||
601 | userspace to try to change the backlight level, and use that as an | ||
602 | on-screen-display hint. | ||
603 | |||
604 | 3. IF AND ONLY IF X.org drivers find a way to block the firmware from | ||
605 | automatically changing the brightness, enable the hotkeys and map | ||
606 | them to KEY_BRIGHTNESS_UP and KEY_BRIGHTNESS_DOWN, and feed that to | ||
607 | something that calls xbacklight. thinkpad-acpi will not be able to | ||
608 | change brightness in that case either, so you should disable its | ||
609 | backlight interface. | ||
610 | |||
611 | For Lenovo models *with* ACPI backlight control: | ||
612 | |||
613 | 1. Load up ACPI video and use that. ACPI video will report ACPI | ||
614 | events for brightness change keys. Do not mess with thinkpad-acpi | ||
615 | defaults in this case. thinkpad-acpi should not have anything to do | ||
616 | with backlight events in a scenario where ACPI video is loaded: | ||
617 | brightness hotkeys must be disabled, and the backlight interface is | ||
618 | to be kept disabled as well. This is the default mode of operation. | ||
619 | |||
620 | 2. Do *NOT* load up ACPI video, enable the hotkeys in thinkpad-acpi, | ||
621 | and map them to KEY_BRIGHTNESS_UP and KEY_BRIGHTNESS_DOWN. Process | ||
622 | these keys on userspace somehow (e.g. by calling xbacklight). | ||
623 | The driver will do this automatically if it detects that ACPI video | ||
624 | has been disabled. | ||
625 | 596 | ||
626 | 597 | ||
627 | Bluetooth | 598 | Bluetooth |
@@ -1121,25 +1092,61 @@ WARNING: | |||
1121 | its level up and down at every change. | 1092 | its level up and down at every change. |
1122 | 1093 | ||
1123 | 1094 | ||
1124 | Volume control -- /proc/acpi/ibm/volume | 1095 | Volume control |
1125 | --------------------------------------- | 1096 | -------------- |
1097 | |||
1098 | procfs: /proc/acpi/ibm/volume | ||
1099 | ALSA: "ThinkPad Console Audio Control", default ID: "ThinkPadEC" | ||
1100 | |||
1101 | NOTE: by default, the volume control interface operates in read-only | ||
1102 | mode, as it is supposed to be used for on-screen-display purposes. | ||
1103 | The read/write mode can be enabled through the use of the | ||
1104 | "volume_control=1" module parameter. | ||
1126 | 1105 | ||
1127 | This feature allows volume control on ThinkPad models which don't have | 1106 | NOTE: distros are urged to not enable volume_control by default, this |
1128 | a hardware volume knob. The available commands are: | 1107 | should be done by the local admin only. The ThinkPad UI is for the |
1108 | console audio control to be done through the volume keys only, and for | ||
1109 | the desktop environment to just provide on-screen-display feedback. | ||
1110 | Software volume control should be done only in the main AC97/HDA | ||
1111 | mixer. | ||
1112 | |||
1113 | This feature allows volume control on ThinkPad models with a digital | ||
1114 | volume knob (when available, not all models have it), as well as | ||
1115 | mute/unmute control. The available commands are: | ||
1129 | 1116 | ||
1130 | echo up >/proc/acpi/ibm/volume | 1117 | echo up >/proc/acpi/ibm/volume |
1131 | echo down >/proc/acpi/ibm/volume | 1118 | echo down >/proc/acpi/ibm/volume |
1132 | echo mute >/proc/acpi/ibm/volume | 1119 | echo mute >/proc/acpi/ibm/volume |
1120 | echo unmute >/proc/acpi/ibm/volume | ||
1133 | echo 'level <level>' >/proc/acpi/ibm/volume | 1121 | echo 'level <level>' >/proc/acpi/ibm/volume |
1134 | 1122 | ||
1135 | The <level> number range is 0 to 15 although not all of them may be | 1123 | The <level> number range is 0 to 14 although not all of them may be |
1136 | distinct. The unmute the volume after the mute command, use either the | 1124 | distinct. The unmute the volume after the mute command, use either the |
1137 | up or down command (the level command will not unmute the volume). | 1125 | up or down command (the level command will not unmute the volume), or |
1126 | the unmute command. | ||
1127 | |||
1138 | The current volume level and mute state is shown in the file. | 1128 | The current volume level and mute state is shown in the file. |
1139 | 1129 | ||
1140 | The ALSA mixer interface to this feature is still missing, but patches | 1130 | You can use the volume_capabilities parameter to tell the driver |
1141 | to add it exist. That problem should be addressed in the not so | 1131 | whether your thinkpad has volume control or mute-only control: |
1142 | distant future. | 1132 | volume_capabilities=1 for mixers with mute and volume control, |
1133 | volume_capabilities=2 for mixers with only mute control. | ||
1134 | |||
1135 | If the driver misdetects the capabilities for your ThinkPad model, | ||
1136 | please report this to ibm-acpi-devel@lists.sourceforge.net, so that we | ||
1137 | can update the driver. | ||
1138 | |||
1139 | There are two strategies for volume control. To select which one | ||
1140 | should be used, use the volume_mode module parameter: volume_mode=1 | ||
1141 | selects EC mode, and volume_mode=3 selects EC mode with NVRAM backing | ||
1142 | (so that volume/mute changes are remembered across shutdown/reboot). | ||
1143 | |||
1144 | The driver will operate in volume_mode=3 by default. If that does not | ||
1145 | work well on your ThinkPad model, please report this to | ||
1146 | ibm-acpi-devel@lists.sourceforge.net. | ||
1147 | |||
1148 | The driver supports the standard ALSA module parameters. If the ALSA | ||
1149 | mixer is disabled, the driver will disable all volume functionality. | ||
1143 | 1150 | ||
1144 | 1151 | ||
1145 | Fan control and monitoring: fan speed, fan enable/disable | 1152 | Fan control and monitoring: fan speed, fan enable/disable |
@@ -1405,6 +1412,7 @@ to enable more than one output class, just add their values. | |||
1405 | 0x0008 HKEY event interface, hotkeys | 1412 | 0x0008 HKEY event interface, hotkeys |
1406 | 0x0010 Fan control | 1413 | 0x0010 Fan control |
1407 | 0x0020 Backlight brightness | 1414 | 0x0020 Backlight brightness |
1415 | 0x0040 Audio mixer/volume control | ||
1408 | 1416 | ||
1409 | There is also a kernel build option to enable more debugging | 1417 | There is also a kernel build option to enable more debugging |
1410 | information, which may be necessary to debug driver problems. | 1418 | information, which may be necessary to debug driver problems. |
@@ -1465,3 +1473,9 @@ Sysfs interface changelog: | |||
1465 | and it is always able to disable hot keys. Very old | 1473 | and it is always able to disable hot keys. Very old |
1466 | thinkpads are properly supported. hotkey_bios_mask | 1474 | thinkpads are properly supported. hotkey_bios_mask |
1467 | is deprecated and marked for removal. | 1475 | is deprecated and marked for removal. |
1476 | |||
1477 | 0x020600: Marker for backlight change event support. | ||
1478 | |||
1479 | 0x020700: Support for mute-only mixers. | ||
1480 | Volume control in read-only mode by default. | ||
1481 | Marker for ALSA mixer support. | ||
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c index 098de5bce00a..42208511b5c0 100644 --- a/Documentation/lguest/lguest.c +++ b/Documentation/lguest/lguest.c | |||
@@ -304,7 +304,7 @@ static void *map_zeroed_pages(unsigned int num) | |||
304 | addr = mmap(NULL, getpagesize() * num, | 304 | addr = mmap(NULL, getpagesize() * num, |
305 | PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, fd, 0); | 305 | PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, fd, 0); |
306 | if (addr == MAP_FAILED) | 306 | if (addr == MAP_FAILED) |
307 | err(1, "Mmaping %u pages of /dev/zero", num); | 307 | err(1, "Mmapping %u pages of /dev/zero", num); |
308 | 308 | ||
309 | /* | 309 | /* |
310 | * One neat mmap feature is that you can close the fd, and it | 310 | * One neat mmap feature is that you can close the fd, and it |
diff --git a/Documentation/lockstat.txt b/Documentation/lockstat.txt index 9cb9138f7a79..65f4c795015d 100644 --- a/Documentation/lockstat.txt +++ b/Documentation/lockstat.txt | |||
@@ -62,8 +62,20 @@ applicable). | |||
62 | It also tracks 4 contention points per class. A contention point is a call site | 62 | It also tracks 4 contention points per class. A contention point is a call site |
63 | that had to wait on lock acquisition. | 63 | that had to wait on lock acquisition. |
64 | 64 | ||
65 | - CONFIGURATION | ||
66 | |||
67 | Lock statistics are enabled via CONFIG_LOCK_STATS. | ||
68 | |||
65 | - USAGE | 69 | - USAGE |
66 | 70 | ||
71 | Enable collection of statistics: | ||
72 | |||
73 | # echo 1 >/proc/sys/kernel/lock_stat | ||
74 | |||
75 | Disable collection of statistics: | ||
76 | |||
77 | # echo 0 >/proc/sys/kernel/lock_stat | ||
78 | |||
67 | Look at the current lock statistics: | 79 | Look at the current lock statistics: |
68 | 80 | ||
69 | ( line numbers not part of actual output, done for clarity in the explanation | 81 | ( line numbers not part of actual output, done for clarity in the explanation |
diff --git a/Documentation/md.txt b/Documentation/md.txt index 4edd39ec7db9..188f4768f1d5 100644 --- a/Documentation/md.txt +++ b/Documentation/md.txt | |||
@@ -233,9 +233,9 @@ All md devices contain: | |||
233 | 233 | ||
234 | resync_start | 234 | resync_start |
235 | The point at which resync should start. If no resync is needed, | 235 | The point at which resync should start. If no resync is needed, |
236 | this will be a very large number. At array creation it will | 236 | this will be a very large number (or 'none' since 2.6.30-rc1). At |
237 | default to 0, though starting the array as 'clean' will | 237 | array creation it will default to 0, though starting the array as |
238 | set it much larger. | 238 | 'clean' will set it much larger. |
239 | 239 | ||
240 | new_dev | 240 | new_dev |
241 | This file can be written but not read. The value written should | 241 | This file can be written but not read. The value written should |
@@ -296,6 +296,51 @@ All md devices contain: | |||
296 | active-idle | 296 | active-idle |
297 | like active, but no writes have been seen for a while (safe_mode_delay). | 297 | like active, but no writes have been seen for a while (safe_mode_delay). |
298 | 298 | ||
299 | bitmap/location | ||
300 | This indicates where the write-intent bitmap for the array is | ||
301 | stored. | ||
302 | It can be one of "none", "file" or "[+-]N". | ||
303 | "file" may later be extended to "file:/file/name" | ||
304 | "[+-]N" means that many sectors from the start of the metadata. | ||
305 | This is replicated on all devices. For arrays with externally | ||
306 | managed metadata, the offset is from the beginning of the | ||
307 | device. | ||
308 | bitmap/chunksize | ||
309 | The size, in bytes, of the chunk which will be represented by a | ||
310 | single bit. For RAID456, it is a portion of an individual | ||
311 | device. For RAID10, it is a portion of the array. For RAID1, it | ||
312 | is both (they come to the same thing). | ||
313 | bitmap/time_base | ||
314 | The time, in seconds, between looking for bits in the bitmap to | ||
315 | be cleared. In the current implementation, a bit will be cleared | ||
316 | between 2 and 3 times "time_base" after all the covered blocks | ||
317 | are known to be in-sync. | ||
318 | bitmap/backlog | ||
319 | When write-mostly devices are active in a RAID1, write requests | ||
320 | to those devices proceed in the background - the filesystem (or | ||
321 | other user of the device) does not have to wait for them. | ||
322 | 'backlog' sets a limit on the number of concurrent background | ||
323 | writes. If there are more than this, new writes will by | ||
324 | synchronous. | ||
325 | bitmap/metadata | ||
326 | This can be either 'internal' or 'external'. | ||
327 | 'internal' is the default and means the metadata for the bitmap | ||
328 | is stored in the first 256 bytes of the allocated space and is | ||
329 | managed by the md module. | ||
330 | 'external' means that bitmap metadata is managed externally to | ||
331 | the kernel (i.e. by some userspace program) | ||
332 | bitmap/can_clear | ||
333 | This is either 'true' or 'false'. If 'true', then bits in the | ||
334 | bitmap will be cleared when the corresponding blocks are thought | ||
335 | to be in-sync. If 'false', bits will never be cleared. | ||
336 | This is automatically set to 'false' if a write happens on a | ||
337 | degraded array, or if the array becomes degraded during a write. | ||
338 | When metadata is managed externally, it should be set to true | ||
339 | once the array becomes non-degraded, and this fact has been | ||
340 | recorded in the metadata. | ||
341 | |||
342 | |||
343 | |||
299 | 344 | ||
300 | As component devices are added to an md array, they appear in the 'md' | 345 | As component devices are added to an md array, they appear in the 'md' |
301 | directory as new directories named | 346 | directory as new directories named |
@@ -334,8 +379,9 @@ Each directory contains: | |||
334 | Writing "writemostly" sets the writemostly flag. | 379 | Writing "writemostly" sets the writemostly flag. |
335 | Writing "-writemostly" clears the writemostly flag. | 380 | Writing "-writemostly" clears the writemostly flag. |
336 | Writing "blocked" sets the "blocked" flag. | 381 | Writing "blocked" sets the "blocked" flag. |
337 | Writing "-blocked" clear the "blocked" flag and allows writes | 382 | Writing "-blocked" clears the "blocked" flag and allows writes |
338 | to complete. | 383 | to complete. |
384 | Writing "in_sync" sets the in_sync flag. | ||
339 | 385 | ||
340 | This file responds to select/poll. Any change to 'faulty' | 386 | This file responds to select/poll. Any change to 'faulty' |
341 | or 'blocked' causes an event. | 387 | or 'blocked' causes an event. |
@@ -372,6 +418,24 @@ Each directory contains: | |||
372 | array. If a value less than the current component_size is | 418 | array. If a value less than the current component_size is |
373 | written, it will be rejected. | 419 | written, it will be rejected. |
374 | 420 | ||
421 | recovery_start | ||
422 | |||
423 | When the device is not 'in_sync', this records the number of | ||
424 | sectors from the start of the device which are known to be | ||
425 | correct. This is normally zero, but during a recovery | ||
426 | operation is will steadily increase, and if the recovery is | ||
427 | interrupted, restoring this value can cause recovery to | ||
428 | avoid repeating the earlier blocks. With v1.x metadata, this | ||
429 | value is saved and restored automatically. | ||
430 | |||
431 | This can be set whenever the device is not an active member of | ||
432 | the array, either before the array is activated, or before | ||
433 | the 'slot' is set. | ||
434 | |||
435 | Setting this to 'none' is equivalent to setting 'in_sync'. | ||
436 | Setting to any other value also clears the 'in_sync' flag. | ||
437 | |||
438 | |||
375 | 439 | ||
376 | An active md device will also contain and entry for each active device | 440 | An active md device will also contain and entry for each active device |
377 | in the array. These are named | 441 | in the array. These are named |
diff --git a/Documentation/memory-hotplug.txt b/Documentation/memory-hotplug.txt index bbc8a6a36921..57e7e9cc1870 100644 --- a/Documentation/memory-hotplug.txt +++ b/Documentation/memory-hotplug.txt | |||
@@ -160,12 +160,15 @@ Under each section, you can see 4 files. | |||
160 | NOTE: | 160 | NOTE: |
161 | These directories/files appear after physical memory hotplug phase. | 161 | These directories/files appear after physical memory hotplug phase. |
162 | 162 | ||
163 | If CONFIG_NUMA is enabled the | 163 | If CONFIG_NUMA is enabled the memoryXXX/ directories can also be accessed |
164 | /sys/devices/system/memory/memoryXXX memory section | 164 | via symbolic links located in the /sys/devices/system/node/node* directories. |
165 | directories can also be accessed via symbolic links located in | 165 | |
166 | the /sys/devices/system/node/node* directories. For example: | 166 | For example: |
167 | /sys/devices/system/node/node0/memory9 -> ../../memory/memory9 | 167 | /sys/devices/system/node/node0/memory9 -> ../../memory/memory9 |
168 | 168 | ||
169 | A backlink will also be created: | ||
170 | /sys/devices/system/memory/memory9/node0 -> ../../node/node0 | ||
171 | |||
169 | -------------------------------- | 172 | -------------------------------- |
170 | 4. Physical memory hot-add phase | 173 | 4. Physical memory hot-add phase |
171 | -------------------------------- | 174 | -------------------------------- |
diff --git a/Documentation/misc-devices/ad525x_dpot.txt b/Documentation/misc-devices/ad525x_dpot.txt new file mode 100644 index 000000000000..0c9413b1cbf3 --- /dev/null +++ b/Documentation/misc-devices/ad525x_dpot.txt | |||
@@ -0,0 +1,57 @@ | |||
1 | --------------------------------- | ||
2 | AD525x Digital Potentiometers | ||
3 | --------------------------------- | ||
4 | |||
5 | The ad525x_dpot driver exports a simple sysfs interface. This allows you to | ||
6 | work with the immediate resistance settings as well as update the saved startup | ||
7 | settings. Access to the factory programmed tolerance is also provided, but | ||
8 | interpretation of this settings is required by the end application according to | ||
9 | the specific part in use. | ||
10 | |||
11 | --------- | ||
12 | Files | ||
13 | --------- | ||
14 | |||
15 | Each dpot device will have a set of eeprom, rdac, and tolerance files. How | ||
16 | many depends on the actual part you have, as will the range of allowed values. | ||
17 | |||
18 | The eeprom files are used to program the startup value of the device. | ||
19 | |||
20 | The rdac files are used to program the immediate value of the device. | ||
21 | |||
22 | The tolerance files are the read-only factory programmed tolerance settings | ||
23 | and may vary greatly on a part-by-part basis. For exact interpretation of | ||
24 | this field, please consult the datasheet for your part. This is presented | ||
25 | as a hex file for easier parsing. | ||
26 | |||
27 | ----------- | ||
28 | Example | ||
29 | ----------- | ||
30 | |||
31 | Locate the device in your sysfs tree. This is probably easiest by going into | ||
32 | the common i2c directory and locating the device by the i2c slave address. | ||
33 | |||
34 | # ls /sys/bus/i2c/devices/ | ||
35 | 0-0022 0-0027 0-002f | ||
36 | |||
37 | So assuming the device in question is on the first i2c bus and has the slave | ||
38 | address of 0x2f, we descend (unrelated sysfs entries have been trimmed). | ||
39 | |||
40 | # ls /sys/bus/i2c/devices/0-002f/ | ||
41 | eeprom0 rdac0 tolerance0 | ||
42 | |||
43 | You can use simple reads/writes to access these files: | ||
44 | |||
45 | # cd /sys/bus/i2c/devices/0-002f/ | ||
46 | |||
47 | # cat eeprom0 | ||
48 | 0 | ||
49 | # echo 10 > eeprom0 | ||
50 | # cat eeprom0 | ||
51 | 10 | ||
52 | |||
53 | # cat rdac0 | ||
54 | 5 | ||
55 | # echo 3 > rdac0 | ||
56 | # cat rdac0 | ||
57 | 3 | ||
diff --git a/Documentation/c2port.txt b/Documentation/misc-devices/c2port.txt index d9bf93ea4398..d9bf93ea4398 100644 --- a/Documentation/c2port.txt +++ b/Documentation/misc-devices/c2port.txt | |||
diff --git a/Documentation/ics932s401 b/Documentation/misc-devices/ics932s401 index 07a739f406d8..07a739f406d8 100644 --- a/Documentation/ics932s401 +++ b/Documentation/misc-devices/ics932s401 | |||
diff --git a/Documentation/nommu-mmap.txt b/Documentation/nommu-mmap.txt index b565e8279d13..8e1ddec2c78a 100644 --- a/Documentation/nommu-mmap.txt +++ b/Documentation/nommu-mmap.txt | |||
@@ -119,6 +119,32 @@ FURTHER NOTES ON NO-MMU MMAP | |||
119 | granule but will only discard the excess if appropriately configured as | 119 | granule but will only discard the excess if appropriately configured as |
120 | this has an effect on fragmentation. | 120 | this has an effect on fragmentation. |
121 | 121 | ||
122 | (*) The memory allocated by a request for an anonymous mapping will normally | ||
123 | be cleared by the kernel before being returned in accordance with the | ||
124 | Linux man pages (ver 2.22 or later). | ||
125 | |||
126 | In the MMU case this can be achieved with reasonable performance as | ||
127 | regions are backed by virtual pages, with the contents only being mapped | ||
128 | to cleared physical pages when a write happens on that specific page | ||
129 | (prior to which, the pages are effectively mapped to the global zero page | ||
130 | from which reads can take place). This spreads out the time it takes to | ||
131 | initialize the contents of a page - depending on the write-usage of the | ||
132 | mapping. | ||
133 | |||
134 | In the no-MMU case, however, anonymous mappings are backed by physical | ||
135 | pages, and the entire map is cleared at allocation time. This can cause | ||
136 | significant delays during a userspace malloc() as the C library does an | ||
137 | anonymous mapping and the kernel then does a memset for the entire map. | ||
138 | |||
139 | However, for memory that isn't required to be precleared - such as that | ||
140 | returned by malloc() - mmap() can take a MAP_UNINITIALIZED flag to | ||
141 | indicate to the kernel that it shouldn't bother clearing the memory before | ||
142 | returning it. Note that CONFIG_MMAP_ALLOW_UNINITIALIZED must be enabled | ||
143 | to permit this, otherwise the flag will be ignored. | ||
144 | |||
145 | uClibc uses this to speed up malloc(), and the ELF-FDPIC binfmt uses this | ||
146 | to allocate the brk and stack region. | ||
147 | |||
122 | (*) A list of all the private copy and anonymous mappings on the system is | 148 | (*) A list of all the private copy and anonymous mappings on the system is |
123 | visible through /proc/maps in no-MMU mode. | 149 | visible through /proc/maps in no-MMU mode. |
124 | 150 | ||
diff --git a/Documentation/oops-tracing.txt b/Documentation/oops-tracing.txt index b152e81da592..c10c022b911c 100644 --- a/Documentation/oops-tracing.txt +++ b/Documentation/oops-tracing.txt | |||
@@ -257,6 +257,8 @@ characters, each representing a particular tainted value. | |||
257 | 257 | ||
258 | 10: 'W' if a warning has previously been issued by the kernel. | 258 | 10: 'W' if a warning has previously been issued by the kernel. |
259 | 259 | ||
260 | 11: 'C' if a staging driver has been loaded. | ||
261 | |||
260 | The primary reason for the 'Tainted: ' string is to tell kernel | 262 | The primary reason for the 'Tainted: ' string is to tell kernel |
261 | debuggers if this is a clean kernel or if anything unusual has | 263 | debuggers if this is a clean kernel or if anything unusual has |
262 | occurred. Tainting is permanent: even if an offending module is | 264 | occurred. Tainting is permanent: even if an offending module is |
diff --git a/Documentation/power/regulator/consumer.txt b/Documentation/power/regulator/consumer.txt index 5f83fd24ea84..cdebb5145c25 100644 --- a/Documentation/power/regulator/consumer.txt +++ b/Documentation/power/regulator/consumer.txt | |||
@@ -104,7 +104,7 @@ to set the limit to 500mA when supplying power. | |||
104 | 104 | ||
105 | Consumers can control their supply current limit by calling :- | 105 | Consumers can control their supply current limit by calling :- |
106 | 106 | ||
107 | int regulator_set_current_limit(regulator, min_uV, max_uV); | 107 | int regulator_set_current_limit(regulator, min_uA, max_uA); |
108 | 108 | ||
109 | Where min_uA and max_uA are the minimum and maximum acceptable current limit in | 109 | Where min_uA and max_uA are the minimum and maximum acceptable current limit in |
110 | microamps. | 110 | microamps. |
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt index 4a3109b28847..356fd86f4ea8 100644 --- a/Documentation/power/runtime_pm.txt +++ b/Documentation/power/runtime_pm.txt | |||
@@ -42,80 +42,81 @@ struct dev_pm_ops { | |||
42 | ... | 42 | ... |
43 | }; | 43 | }; |
44 | 44 | ||
45 | The ->runtime_suspend() callback is executed by the PM core for the bus type of | 45 | The ->runtime_suspend(), ->runtime_resume() and ->runtime_idle() callbacks are |
46 | the device being suspended. The bus type's callback is then _entirely_ | 46 | executed by the PM core for either the bus type, or device type (if the bus |
47 | _responsible_ for handling the device as appropriate, which may, but need not | 47 | type's callback is not defined), or device class (if the bus type's and device |
48 | include executing the device driver's own ->runtime_suspend() callback (from the | 48 | type's callbacks are not defined) of given device. The bus type, device type |
49 | and device class callbacks are referred to as subsystem-level callbacks in what | ||
50 | follows. | ||
51 | |||
52 | The subsystem-level suspend callback is _entirely_ _responsible_ for handling | ||
53 | the suspend of the device as appropriate, which may, but need not include | ||
54 | executing the device driver's own ->runtime_suspend() callback (from the | ||
49 | PM core's point of view it is not necessary to implement a ->runtime_suspend() | 55 | PM core's point of view it is not necessary to implement a ->runtime_suspend() |
50 | callback in a device driver as long as the bus type's ->runtime_suspend() knows | 56 | callback in a device driver as long as the subsystem-level suspend callback |
51 | what to do to handle the device). | 57 | knows what to do to handle the device). |
52 | 58 | ||
53 | * Once the bus type's ->runtime_suspend() callback has completed successfully | 59 | * Once the subsystem-level suspend callback has completed successfully |
54 | for given device, the PM core regards the device as suspended, which need | 60 | for given device, the PM core regards the device as suspended, which need |
55 | not mean that the device has been put into a low power state. It is | 61 | not mean that the device has been put into a low power state. It is |
56 | supposed to mean, however, that the device will not process data and will | 62 | supposed to mean, however, that the device will not process data and will |
57 | not communicate with the CPU(s) and RAM until its bus type's | 63 | not communicate with the CPU(s) and RAM until the subsystem-level resume |
58 | ->runtime_resume() callback is executed for it. The run-time PM status of | 64 | callback is executed for it. The run-time PM status of a device after |
59 | a device after successful execution of its bus type's ->runtime_suspend() | 65 | successful execution of the subsystem-level suspend callback is 'suspended'. |
60 | callback is 'suspended'. | 66 | |
61 | 67 | * If the subsystem-level suspend callback returns -EBUSY or -EAGAIN, | |
62 | * If the bus type's ->runtime_suspend() callback returns -EBUSY or -EAGAIN, | 68 | the device's run-time PM status is 'active', which means that the device |
63 | the device's run-time PM status is supposed to be 'active', which means that | 69 | _must_ be fully operational afterwards. |
64 | the device _must_ be fully operational afterwards. | 70 | |
65 | 71 | * If the subsystem-level suspend callback returns an error code different | |
66 | * If the bus type's ->runtime_suspend() callback returns an error code | 72 | from -EBUSY or -EAGAIN, the PM core regards this as a fatal error and will |
67 | different from -EBUSY or -EAGAIN, the PM core regards this as a fatal | 73 | refuse to run the helper functions described in Section 4 for the device, |
68 | error and will refuse to run the helper functions described in Section 4 | 74 | until the status of it is directly set either to 'active', or to 'suspended' |
69 | for the device, until the status of it is directly set either to 'active' | 75 | (the PM core provides special helper functions for this purpose). |
70 | or to 'suspended' (the PM core provides special helper functions for this | 76 | |
71 | purpose). | 77 | In particular, if the driver requires remote wake-up capability (i.e. hardware |
72 | 78 | mechanism allowing the device to request a change of its power state, such as | |
73 | In particular, if the driver requires remote wakeup capability for proper | 79 | PCI PME) for proper functioning and device_run_wake() returns 'false' for the |
74 | functioning and device_run_wake() returns 'false' for the device, then | 80 | device, then ->runtime_suspend() should return -EBUSY. On the other hand, if |
75 | ->runtime_suspend() should return -EBUSY. On the other hand, if | 81 | device_run_wake() returns 'true' for the device and the device is put into a low |
76 | device_run_wake() returns 'true' for the device and the device is put | 82 | power state during the execution of the subsystem-level suspend callback, it is |
77 | into a low power state during the execution of its bus type's | 83 | expected that remote wake-up will be enabled for the device. Generally, remote |
78 | ->runtime_suspend(), it is expected that remote wake-up (i.e. hardware mechanism | 84 | wake-up should be enabled for all input devices put into a low power state at |
79 | allowing the device to request a change of its power state, such as PCI PME) | 85 | run time. |
80 | will be enabled for the device. Generally, remote wake-up should be enabled | 86 | |
81 | for all input devices put into a low power state at run time. | 87 | The subsystem-level resume callback is _entirely_ _responsible_ for handling the |
82 | 88 | resume of the device as appropriate, which may, but need not include executing | |
83 | The ->runtime_resume() callback is executed by the PM core for the bus type of | 89 | the device driver's own ->runtime_resume() callback (from the PM core's point of |
84 | the device being woken up. The bus type's callback is then _entirely_ | 90 | view it is not necessary to implement a ->runtime_resume() callback in a device |
85 | _responsible_ for handling the device as appropriate, which may, but need not | 91 | driver as long as the subsystem-level resume callback knows what to do to handle |
86 | include executing the device driver's own ->runtime_resume() callback (from the | 92 | the device). |
87 | PM core's point of view it is not necessary to implement a ->runtime_resume() | 93 | |
88 | callback in a device driver as long as the bus type's ->runtime_resume() knows | 94 | * Once the subsystem-level resume callback has completed successfully, the PM |
89 | what to do to handle the device). | 95 | core regards the device as fully operational, which means that the device |
90 | 96 | _must_ be able to complete I/O operations as needed. The run-time PM status | |
91 | * Once the bus type's ->runtime_resume() callback has completed successfully, | 97 | of the device is then 'active'. |
92 | the PM core regards the device as fully operational, which means that the | 98 | |
93 | device _must_ be able to complete I/O operations as needed. The run-time | 99 | * If the subsystem-level resume callback returns an error code, the PM core |
94 | PM status of the device is then 'active'. | 100 | regards this as a fatal error and will refuse to run the helper functions |
95 | 101 | described in Section 4 for the device, until its status is directly set | |
96 | * If the bus type's ->runtime_resume() callback returns an error code, the PM | 102 | either to 'active' or to 'suspended' (the PM core provides special helper |
97 | core regards this as a fatal error and will refuse to run the helper | 103 | functions for this purpose). |
98 | functions described in Section 4 for the device, until its status is | 104 | |
99 | directly set either to 'active' or to 'suspended' (the PM core provides | 105 | The subsystem-level idle callback is executed by the PM core whenever the device |
100 | special helper functions for this purpose). | 106 | appears to be idle, which is indicated to the PM core by two counters, the |
101 | 107 | device's usage counter and the counter of 'active' children of the device. | |
102 | The ->runtime_idle() callback is executed by the PM core for the bus type of | ||
103 | given device whenever the device appears to be idle, which is indicated to the | ||
104 | PM core by two counters, the device's usage counter and the counter of 'active' | ||
105 | children of the device. | ||
106 | 108 | ||
107 | * If any of these counters is decreased using a helper function provided by | 109 | * If any of these counters is decreased using a helper function provided by |
108 | the PM core and it turns out to be equal to zero, the other counter is | 110 | the PM core and it turns out to be equal to zero, the other counter is |
109 | checked. If that counter also is equal to zero, the PM core executes the | 111 | checked. If that counter also is equal to zero, the PM core executes the |
110 | device bus type's ->runtime_idle() callback (with the device as an | 112 | subsystem-level idle callback with the device as an argument. |
111 | argument). | ||
112 | 113 | ||
113 | The action performed by a bus type's ->runtime_idle() callback is totally | 114 | The action performed by a subsystem-level idle callback is totally dependent on |
114 | dependent on the bus type in question, but the expected and recommended action | 115 | the subsystem in question, but the expected and recommended action is to check |
115 | is to check if the device can be suspended (i.e. if all of the conditions | 116 | if the device can be suspended (i.e. if all of the conditions necessary for |
116 | necessary for suspending the device are satisfied) and to queue up a suspend | 117 | suspending the device are satisfied) and to queue up a suspend request for the |
117 | request for the device in that case. The value returned by this callback is | 118 | device in that case. The value returned by this callback is ignored by the PM |
118 | ignored by the PM core. | 119 | core. |
119 | 120 | ||
120 | The helper functions provided by the PM core, described in Section 4, guarantee | 121 | The helper functions provided by the PM core, described in Section 4, guarantee |
121 | that the following constraints are met with respect to the bus type's run-time | 122 | that the following constraints are met with respect to the bus type's run-time |
@@ -238,41 +239,41 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h: | |||
238 | removing the device from device hierarchy | 239 | removing the device from device hierarchy |
239 | 240 | ||
240 | int pm_runtime_idle(struct device *dev); | 241 | int pm_runtime_idle(struct device *dev); |
241 | - execute ->runtime_idle() for the device's bus type; returns 0 on success | 242 | - execute the subsystem-level idle callback for the device; returns 0 on |
242 | or error code on failure, where -EINPROGRESS means that ->runtime_idle() | 243 | success or error code on failure, where -EINPROGRESS means that |
243 | is already being executed | 244 | ->runtime_idle() is already being executed |
244 | 245 | ||
245 | int pm_runtime_suspend(struct device *dev); | 246 | int pm_runtime_suspend(struct device *dev); |
246 | - execute ->runtime_suspend() for the device's bus type; returns 0 on | 247 | - execute the subsystem-level suspend callback for the device; returns 0 on |
247 | success, 1 if the device's run-time PM status was already 'suspended', or | 248 | success, 1 if the device's run-time PM status was already 'suspended', or |
248 | error code on failure, where -EAGAIN or -EBUSY means it is safe to attempt | 249 | error code on failure, where -EAGAIN or -EBUSY means it is safe to attempt |
249 | to suspend the device again in future | 250 | to suspend the device again in future |
250 | 251 | ||
251 | int pm_runtime_resume(struct device *dev); | 252 | int pm_runtime_resume(struct device *dev); |
252 | - execute ->runtime_resume() for the device's bus type; returns 0 on | 253 | - execute the subsystem-leve resume callback for the device; returns 0 on |
253 | success, 1 if the device's run-time PM status was already 'active' or | 254 | success, 1 if the device's run-time PM status was already 'active' or |
254 | error code on failure, where -EAGAIN means it may be safe to attempt to | 255 | error code on failure, where -EAGAIN means it may be safe to attempt to |
255 | resume the device again in future, but 'power.runtime_error' should be | 256 | resume the device again in future, but 'power.runtime_error' should be |
256 | checked additionally | 257 | checked additionally |
257 | 258 | ||
258 | int pm_request_idle(struct device *dev); | 259 | int pm_request_idle(struct device *dev); |
259 | - submit a request to execute ->runtime_idle() for the device's bus type | 260 | - submit a request to execute the subsystem-level idle callback for the |
260 | (the request is represented by a work item in pm_wq); returns 0 on success | 261 | device (the request is represented by a work item in pm_wq); returns 0 on |
261 | or error code if the request has not been queued up | 262 | success or error code if the request has not been queued up |
262 | 263 | ||
263 | int pm_schedule_suspend(struct device *dev, unsigned int delay); | 264 | int pm_schedule_suspend(struct device *dev, unsigned int delay); |
264 | - schedule the execution of ->runtime_suspend() for the device's bus type | 265 | - schedule the execution of the subsystem-level suspend callback for the |
265 | in future, where 'delay' is the time to wait before queuing up a suspend | 266 | device in future, where 'delay' is the time to wait before queuing up a |
266 | work item in pm_wq, in milliseconds (if 'delay' is zero, the work item is | 267 | suspend work item in pm_wq, in milliseconds (if 'delay' is zero, the work |
267 | queued up immediately); returns 0 on success, 1 if the device's PM | 268 | item is queued up immediately); returns 0 on success, 1 if the device's PM |
268 | run-time status was already 'suspended', or error code if the request | 269 | run-time status was already 'suspended', or error code if the request |
269 | hasn't been scheduled (or queued up if 'delay' is 0); if the execution of | 270 | hasn't been scheduled (or queued up if 'delay' is 0); if the execution of |
270 | ->runtime_suspend() is already scheduled and not yet expired, the new | 271 | ->runtime_suspend() is already scheduled and not yet expired, the new |
271 | value of 'delay' will be used as the time to wait | 272 | value of 'delay' will be used as the time to wait |
272 | 273 | ||
273 | int pm_request_resume(struct device *dev); | 274 | int pm_request_resume(struct device *dev); |
274 | - submit a request to execute ->runtime_resume() for the device's bus type | 275 | - submit a request to execute the subsystem-level resume callback for the |
275 | (the request is represented by a work item in pm_wq); returns 0 on | 276 | device (the request is represented by a work item in pm_wq); returns 0 on |
276 | success, 1 if the device's run-time PM status was already 'active', or | 277 | success, 1 if the device's run-time PM status was already 'active', or |
277 | error code if the request hasn't been queued up | 278 | error code if the request hasn't been queued up |
278 | 279 | ||
@@ -303,12 +304,12 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h: | |||
303 | run-time PM callbacks described in Section 2 | 304 | run-time PM callbacks described in Section 2 |
304 | 305 | ||
305 | int pm_runtime_disable(struct device *dev); | 306 | int pm_runtime_disable(struct device *dev); |
306 | - prevent the run-time PM helper functions from running the device bus | 307 | - prevent the run-time PM helper functions from running subsystem-level |
307 | type's run-time PM callbacks, make sure that all of the pending run-time | 308 | run-time PM callbacks for the device, make sure that all of the pending |
308 | PM operations on the device are either completed or canceled; returns | 309 | run-time PM operations on the device are either completed or canceled; |
309 | 1 if there was a resume request pending and it was necessary to execute | 310 | returns 1 if there was a resume request pending and it was necessary to |
310 | ->runtime_resume() for the device's bus type to satisfy that request, | 311 | execute the subsystem-level resume callback for the device to satisfy that |
311 | otherwise 0 is returned | 312 | request, otherwise 0 is returned |
312 | 313 | ||
313 | void pm_suspend_ignore_children(struct device *dev, bool enable); | 314 | void pm_suspend_ignore_children(struct device *dev, bool enable); |
314 | - set/unset the power.ignore_children flag of the device | 315 | - set/unset the power.ignore_children flag of the device |
@@ -378,5 +379,55 @@ pm_runtime_suspend() or pm_runtime_idle() or their asynchronous counterparts, | |||
378 | they will fail returning -EAGAIN, because the device's usage counter is | 379 | they will fail returning -EAGAIN, because the device's usage counter is |
379 | incremented by the core before executing ->probe() and ->remove(). Still, it | 380 | incremented by the core before executing ->probe() and ->remove(). Still, it |
380 | may be desirable to suspend the device as soon as ->probe() or ->remove() has | 381 | may be desirable to suspend the device as soon as ->probe() or ->remove() has |
381 | finished, so the PM core uses pm_runtime_idle_sync() to invoke the device bus | 382 | finished, so the PM core uses pm_runtime_idle_sync() to invoke the |
382 | type's ->runtime_idle() callback at that time. | 383 | subsystem-level idle callback for the device at that time. |
384 | |||
385 | 6. Run-time PM and System Sleep | ||
386 | |||
387 | Run-time PM and system sleep (i.e., system suspend and hibernation, also known | ||
388 | as suspend-to-RAM and suspend-to-disk) interact with each other in a couple of | ||
389 | ways. If a device is active when a system sleep starts, everything is | ||
390 | straightforward. But what should happen if the device is already suspended? | ||
391 | |||
392 | The device may have different wake-up settings for run-time PM and system sleep. | ||
393 | For example, remote wake-up may be enabled for run-time suspend but disallowed | ||
394 | for system sleep (device_may_wakeup(dev) returns 'false'). When this happens, | ||
395 | the subsystem-level system suspend callback is responsible for changing the | ||
396 | device's wake-up setting (it may leave that to the device driver's system | ||
397 | suspend routine). It may be necessary to resume the device and suspend it again | ||
398 | in order to do so. The same is true if the driver uses different power levels | ||
399 | or other settings for run-time suspend and system sleep. | ||
400 | |||
401 | During system resume, devices generally should be brought back to full power, | ||
402 | even if they were suspended before the system sleep began. There are several | ||
403 | reasons for this, including: | ||
404 | |||
405 | * The device might need to switch power levels, wake-up settings, etc. | ||
406 | |||
407 | * Remote wake-up events might have been lost by the firmware. | ||
408 | |||
409 | * The device's children may need the device to be at full power in order | ||
410 | to resume themselves. | ||
411 | |||
412 | * The driver's idea of the device state may not agree with the device's | ||
413 | physical state. This can happen during resume from hibernation. | ||
414 | |||
415 | * The device might need to be reset. | ||
416 | |||
417 | * Even though the device was suspended, if its usage counter was > 0 then most | ||
418 | likely it would need a run-time resume in the near future anyway. | ||
419 | |||
420 | * Always going back to full power is simplest. | ||
421 | |||
422 | If the device was suspended before the sleep began, then its run-time PM status | ||
423 | will have to be updated to reflect the actual post-system sleep status. The way | ||
424 | to do this is: | ||
425 | |||
426 | pm_runtime_disable(dev); | ||
427 | pm_runtime_set_active(dev); | ||
428 | pm_runtime_enable(dev); | ||
429 | |||
430 | The PM core always increments the run-time usage counter before calling the | ||
431 | ->prepare() callback and decrements it after calling the ->complete() callback. | ||
432 | Hence disabling run-time PM temporarily like this will not cause any run-time | ||
433 | suspend callbacks to be lost. | ||
diff --git a/Documentation/powerpc/dts-bindings/4xx/ppc440spe-adma.txt b/Documentation/powerpc/dts-bindings/4xx/ppc440spe-adma.txt new file mode 100644 index 000000000000..515ebcf1b97d --- /dev/null +++ b/Documentation/powerpc/dts-bindings/4xx/ppc440spe-adma.txt | |||
@@ -0,0 +1,93 @@ | |||
1 | PPC440SPe DMA/XOR (DMA Controller and XOR Accelerator) | ||
2 | |||
3 | Device nodes needed for operation of the ppc440spe-adma driver | ||
4 | are specified hereby. These are I2O/DMA, DMA and XOR nodes | ||
5 | for DMA engines and Memory Queue Module node. The latter is used | ||
6 | by ADMA driver for configuration of RAID-6 H/W capabilities of | ||
7 | the PPC440SPe. In addition to the nodes and properties described | ||
8 | below, the ranges property of PLB node must specify ranges for | ||
9 | DMA devices. | ||
10 | |||
11 | i) The I2O node | ||
12 | |||
13 | Required properties: | ||
14 | |||
15 | - compatible : "ibm,i2o-440spe"; | ||
16 | - reg : <registers mapping> | ||
17 | - dcr-reg : <DCR registers range> | ||
18 | |||
19 | Example: | ||
20 | |||
21 | I2O: i2o@400100000 { | ||
22 | compatible = "ibm,i2o-440spe"; | ||
23 | reg = <0x00000004 0x00100000 0x100>; | ||
24 | dcr-reg = <0x060 0x020>; | ||
25 | }; | ||
26 | |||
27 | |||
28 | ii) The DMA node | ||
29 | |||
30 | Required properties: | ||
31 | |||
32 | - compatible : "ibm,dma-440spe"; | ||
33 | - cell-index : 1 cell, hardware index of the DMA engine | ||
34 | (typically 0x0 and 0x1 for DMA0 and DMA1) | ||
35 | - reg : <registers mapping> | ||
36 | - dcr-reg : <DCR registers range> | ||
37 | - interrupts : <interrupt mapping for DMA0/1 interrupts sources: | ||
38 | 2 sources: DMAx CS FIFO Needs Service IRQ (on UIC0) | ||
39 | and DMA Error IRQ (on UIC1). The latter is common | ||
40 | for both DMA engines>. | ||
41 | - interrupt-parent : needed for interrupt mapping | ||
42 | |||
43 | Example: | ||
44 | |||
45 | DMA0: dma0@400100100 { | ||
46 | compatible = "ibm,dma-440spe"; | ||
47 | cell-index = <0>; | ||
48 | reg = <0x00000004 0x00100100 0x100>; | ||
49 | dcr-reg = <0x060 0x020>; | ||
50 | interrupt-parent = <&DMA0>; | ||
51 | interrupts = <0 1>; | ||
52 | #interrupt-cells = <1>; | ||
53 | #address-cells = <0>; | ||
54 | #size-cells = <0>; | ||
55 | interrupt-map = < | ||
56 | 0 &UIC0 0x14 4 | ||
57 | 1 &UIC1 0x16 4>; | ||
58 | }; | ||
59 | |||
60 | |||
61 | iii) XOR Accelerator node | ||
62 | |||
63 | Required properties: | ||
64 | |||
65 | - compatible : "amcc,xor-accelerator"; | ||
66 | - reg : <registers mapping> | ||
67 | - interrupts : <interrupt mapping for XOR interrupt source> | ||
68 | - interrupt-parent : for interrupt mapping | ||
69 | |||
70 | Example: | ||
71 | |||
72 | xor-accel@400200000 { | ||
73 | compatible = "amcc,xor-accelerator"; | ||
74 | reg = <0x00000004 0x00200000 0x400>; | ||
75 | interrupt-parent = <&UIC1>; | ||
76 | interrupts = <0x1f 4>; | ||
77 | }; | ||
78 | |||
79 | |||
80 | iv) Memory Queue Module node | ||
81 | |||
82 | Required properties: | ||
83 | |||
84 | - compatible : "ibm,mq-440spe"; | ||
85 | - dcr-reg : <DCR registers range> | ||
86 | |||
87 | Example: | ||
88 | |||
89 | MQ0: mq { | ||
90 | compatible = "ibm,mq-440spe"; | ||
91 | dcr-reg = <0x040 0x020>; | ||
92 | }; | ||
93 | |||
diff --git a/Documentation/powerpc/dts-bindings/fsl/board.txt b/Documentation/powerpc/dts-bindings/fsl/board.txt index e8b5bc24d0ac..39e941515a36 100644 --- a/Documentation/powerpc/dts-bindings/fsl/board.txt +++ b/Documentation/powerpc/dts-bindings/fsl/board.txt | |||
@@ -20,12 +20,16 @@ Required properities: | |||
20 | - compatible : should be "fsl,fpga-pixis". | 20 | - compatible : should be "fsl,fpga-pixis". |
21 | - reg : should contain the address and the length of the FPPGA register | 21 | - reg : should contain the address and the length of the FPPGA register |
22 | set. | 22 | set. |
23 | - interrupt-parent: should specify phandle for the interrupt controller. | ||
24 | - interrupts : should specify event (wakeup) IRQ. | ||
23 | 25 | ||
24 | Example (MPC8610HPCD): | 26 | Example (MPC8610HPCD): |
25 | 27 | ||
26 | board-control@e8000000 { | 28 | board-control@e8000000 { |
27 | compatible = "fsl,fpga-pixis"; | 29 | compatible = "fsl,fpga-pixis"; |
28 | reg = <0xe8000000 32>; | 30 | reg = <0xe8000000 32>; |
31 | interrupt-parent = <&mpic>; | ||
32 | interrupts = <8 8>; | ||
29 | }; | 33 | }; |
30 | 34 | ||
31 | * Freescale BCSR GPIO banks | 35 | * Freescale BCSR GPIO banks |
diff --git a/Documentation/powerpc/dts-bindings/fsl/mpc5200.txt b/Documentation/powerpc/dts-bindings/fsl/mpc5200.txt index cabc780f7258..5c6602dbfdc2 100644 --- a/Documentation/powerpc/dts-bindings/fsl/mpc5200.txt +++ b/Documentation/powerpc/dts-bindings/fsl/mpc5200.txt | |||
@@ -103,7 +103,22 @@ fsl,mpc5200-gpt nodes | |||
103 | --------------------- | 103 | --------------------- |
104 | On the mpc5200 and 5200b, GPT0 has a watchdog timer function. If the board | 104 | On the mpc5200 and 5200b, GPT0 has a watchdog timer function. If the board |
105 | design supports the internal wdt, then the device node for GPT0 should | 105 | design supports the internal wdt, then the device node for GPT0 should |
106 | include the empty property 'fsl,has-wdt'. | 106 | include the empty property 'fsl,has-wdt'. Note that this does not activate |
107 | the watchdog. The timer will function as a GPT if the timer api is used, and | ||
108 | it will function as watchdog if the watchdog device is used. The watchdog | ||
109 | mode has priority over the gpt mode, i.e. if the watchdog is activated, any | ||
110 | gpt api call to this timer will fail with -EBUSY. | ||
111 | |||
112 | If you add the property | ||
113 | fsl,wdt-on-boot = <n>; | ||
114 | GPT0 will be marked as in-use watchdog, i.e. blocking every gpt access to it. | ||
115 | If n>0, the watchdog is started with a timeout of n seconds. If n=0, the | ||
116 | configuration of the watchdog is not touched. This is useful in two cases: | ||
117 | - just mark GPT0 as watchdog, blocking gpt accesses, and configure it later; | ||
118 | - do not touch a configuration assigned by the boot loader which supervises | ||
119 | the boot process itself. | ||
120 | |||
121 | The watchdog will respect the CONFIG_WATCHDOG_NOWAYOUT option. | ||
107 | 122 | ||
108 | An mpc5200-gpt can be used as a single line GPIO controller. To do so, | 123 | An mpc5200-gpt can be used as a single line GPIO controller. To do so, |
109 | add the following properties to the gpt node: | 124 | add the following properties to the gpt node: |
diff --git a/Documentation/powerpc/dts-bindings/fsl/mpic.txt b/Documentation/powerpc/dts-bindings/fsl/mpic.txt new file mode 100644 index 000000000000..71e39cf3215b --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/mpic.txt | |||
@@ -0,0 +1,42 @@ | |||
1 | * OpenPIC and its interrupt numbers on Freescale's e500/e600 cores | ||
2 | |||
3 | The OpenPIC specification does not specify which interrupt source has to | ||
4 | become which interrupt number. This is up to the software implementation | ||
5 | of the interrupt controller. The only requirement is that every | ||
6 | interrupt source has to have an unique interrupt number / vector number. | ||
7 | To accomplish this the current implementation assigns the number zero to | ||
8 | the first source, the number one to the second source and so on until | ||
9 | all interrupt sources have their unique number. | ||
10 | Usually the assigned vector number equals the interrupt number mentioned | ||
11 | in the documentation for a given core / CPU. This is however not true | ||
12 | for the e500 cores (MPC85XX CPUs) where the documentation distinguishes | ||
13 | between internal and external interrupt sources and starts counting at | ||
14 | zero for both of them. | ||
15 | |||
16 | So what to write for external interrupt source X or internal interrupt | ||
17 | source Y into the device tree? Here is an example: | ||
18 | |||
19 | The memory map for the interrupt controller in the MPC8544[0] shows, | ||
20 | that the first interrupt source starts at 0x5_0000 (PIC Register Address | ||
21 | Map-Interrupt Source Configuration Registers). This source becomes the | ||
22 | number zero therefore: | ||
23 | External interrupt 0 = interrupt number 0 | ||
24 | External interrupt 1 = interrupt number 1 | ||
25 | External interrupt 2 = interrupt number 2 | ||
26 | ... | ||
27 | Every interrupt number allocates 0x20 bytes register space. So to get | ||
28 | its number it is sufficient to shift the lower 16bits to right by five. | ||
29 | So for the external interrupt 10 we have: | ||
30 | 0x0140 >> 5 = 10 | ||
31 | |||
32 | After the external sources, the internal sources follow. The in core I2C | ||
33 | controller on the MPC8544 for instance has the internal source number | ||
34 | 27. Oo obtain its interrupt number we take the lower 16bits of its memory | ||
35 | address (0x5_0560) and shift it right: | ||
36 | 0x0560 >> 5 = 43 | ||
37 | |||
38 | Therefore the I2C device node for the MPC8544 CPU has to have the | ||
39 | interrupt number 43 specified in the device tree. | ||
40 | |||
41 | [0] MPC8544E PowerQUICCTM III, Integrated Host Processor Family Reference Manual | ||
42 | MPC8544ERM Rev. 1 10/2007 | ||
diff --git a/Documentation/powerpc/dts-bindings/nintendo/gamecube.txt b/Documentation/powerpc/dts-bindings/nintendo/gamecube.txt new file mode 100644 index 000000000000..b558585b1aaf --- /dev/null +++ b/Documentation/powerpc/dts-bindings/nintendo/gamecube.txt | |||
@@ -0,0 +1,109 @@ | |||
1 | |||
2 | Nintendo GameCube device tree | ||
3 | ============================= | ||
4 | |||
5 | 1) The "flipper" node | ||
6 | |||
7 | This node represents the multi-function "Flipper" chip, which packages | ||
8 | many of the devices found in the Nintendo GameCube. | ||
9 | |||
10 | Required properties: | ||
11 | |||
12 | - compatible : Should be "nintendo,flipper" | ||
13 | |||
14 | 1.a) The Video Interface (VI) node | ||
15 | |||
16 | Represents the interface between the graphics processor and a external | ||
17 | video encoder. | ||
18 | |||
19 | Required properties: | ||
20 | |||
21 | - compatible : should be "nintendo,flipper-vi" | ||
22 | - reg : should contain the VI registers location and length | ||
23 | - interrupts : should contain the VI interrupt | ||
24 | |||
25 | 1.b) The Processor Interface (PI) node | ||
26 | |||
27 | Represents the data and control interface between the main processor | ||
28 | and graphics and audio processor. | ||
29 | |||
30 | Required properties: | ||
31 | |||
32 | - compatible : should be "nintendo,flipper-pi" | ||
33 | - reg : should contain the PI registers location and length | ||
34 | |||
35 | 1.b.i) The "Flipper" interrupt controller node | ||
36 | |||
37 | Represents the interrupt controller within the "Flipper" chip. | ||
38 | The node for the "Flipper" interrupt controller must be placed under | ||
39 | the PI node. | ||
40 | |||
41 | Required properties: | ||
42 | |||
43 | - compatible : should be "nintendo,flipper-pic" | ||
44 | |||
45 | 1.c) The Digital Signal Procesor (DSP) node | ||
46 | |||
47 | Represents the digital signal processor interface, designed to offload | ||
48 | audio related tasks. | ||
49 | |||
50 | Required properties: | ||
51 | |||
52 | - compatible : should be "nintendo,flipper-dsp" | ||
53 | - reg : should contain the DSP registers location and length | ||
54 | - interrupts : should contain the DSP interrupt | ||
55 | |||
56 | 1.c.i) The Auxiliary RAM (ARAM) node | ||
57 | |||
58 | Represents the non cpu-addressable ram designed mainly to store audio | ||
59 | related information. | ||
60 | The ARAM node must be placed under the DSP node. | ||
61 | |||
62 | Required properties: | ||
63 | |||
64 | - compatible : should be "nintendo,flipper-aram" | ||
65 | - reg : should contain the ARAM start (zero-based) and length | ||
66 | |||
67 | 1.d) The Disk Interface (DI) node | ||
68 | |||
69 | Represents the interface used to communicate with mass storage devices. | ||
70 | |||
71 | Required properties: | ||
72 | |||
73 | - compatible : should be "nintendo,flipper-di" | ||
74 | - reg : should contain the DI registers location and length | ||
75 | - interrupts : should contain the DI interrupt | ||
76 | |||
77 | 1.e) The Audio Interface (AI) node | ||
78 | |||
79 | Represents the interface to the external 16-bit stereo digital-to-analog | ||
80 | converter. | ||
81 | |||
82 | Required properties: | ||
83 | |||
84 | - compatible : should be "nintendo,flipper-ai" | ||
85 | - reg : should contain the AI registers location and length | ||
86 | - interrupts : should contain the AI interrupt | ||
87 | |||
88 | 1.f) The Serial Interface (SI) node | ||
89 | |||
90 | Represents the interface to the four single bit serial interfaces. | ||
91 | The SI is a proprietary serial interface used normally to control gamepads. | ||
92 | It's NOT a RS232-type interface. | ||
93 | |||
94 | Required properties: | ||
95 | |||
96 | - compatible : should be "nintendo,flipper-si" | ||
97 | - reg : should contain the SI registers location and length | ||
98 | - interrupts : should contain the SI interrupt | ||
99 | |||
100 | 1.g) The External Interface (EXI) node | ||
101 | |||
102 | Represents the multi-channel SPI-like interface. | ||
103 | |||
104 | Required properties: | ||
105 | |||
106 | - compatible : should be "nintendo,flipper-exi" | ||
107 | - reg : should contain the EXI registers location and length | ||
108 | - interrupts : should contain the EXI interrupt | ||
109 | |||
diff --git a/Documentation/powerpc/dts-bindings/nintendo/wii.txt b/Documentation/powerpc/dts-bindings/nintendo/wii.txt new file mode 100644 index 000000000000..a7e155a023b8 --- /dev/null +++ b/Documentation/powerpc/dts-bindings/nintendo/wii.txt | |||
@@ -0,0 +1,184 @@ | |||
1 | |||
2 | Nintendo Wii device tree | ||
3 | ======================== | ||
4 | |||
5 | 0) The root node | ||
6 | |||
7 | This node represents the Nintendo Wii video game console. | ||
8 | |||
9 | Required properties: | ||
10 | |||
11 | - model : Should be "nintendo,wii" | ||
12 | - compatible : Should be "nintendo,wii" | ||
13 | |||
14 | 1) The "hollywood" node | ||
15 | |||
16 | This node represents the multi-function "Hollywood" chip, which packages | ||
17 | many of the devices found in the Nintendo Wii. | ||
18 | |||
19 | Required properties: | ||
20 | |||
21 | - compatible : Should be "nintendo,hollywood" | ||
22 | |||
23 | 1.a) The Video Interface (VI) node | ||
24 | |||
25 | Represents the interface between the graphics processor and a external | ||
26 | video encoder. | ||
27 | |||
28 | Required properties: | ||
29 | |||
30 | - compatible : should be "nintendo,hollywood-vi","nintendo,flipper-vi" | ||
31 | - reg : should contain the VI registers location and length | ||
32 | - interrupts : should contain the VI interrupt | ||
33 | |||
34 | 1.b) The Processor Interface (PI) node | ||
35 | |||
36 | Represents the data and control interface between the main processor | ||
37 | and graphics and audio processor. | ||
38 | |||
39 | Required properties: | ||
40 | |||
41 | - compatible : should be "nintendo,hollywood-pi","nintendo,flipper-pi" | ||
42 | - reg : should contain the PI registers location and length | ||
43 | |||
44 | 1.b.i) The "Flipper" interrupt controller node | ||
45 | |||
46 | Represents the "Flipper" interrupt controller within the "Hollywood" chip. | ||
47 | The node for the "Flipper" interrupt controller must be placed under | ||
48 | the PI node. | ||
49 | |||
50 | Required properties: | ||
51 | |||
52 | - #interrupt-cells : <1> | ||
53 | - compatible : should be "nintendo,flipper-pic" | ||
54 | - interrupt-controller | ||
55 | |||
56 | 1.c) The Digital Signal Procesor (DSP) node | ||
57 | |||
58 | Represents the digital signal processor interface, designed to offload | ||
59 | audio related tasks. | ||
60 | |||
61 | Required properties: | ||
62 | |||
63 | - compatible : should be "nintendo,hollywood-dsp","nintendo,flipper-dsp" | ||
64 | - reg : should contain the DSP registers location and length | ||
65 | - interrupts : should contain the DSP interrupt | ||
66 | |||
67 | 1.d) The Serial Interface (SI) node | ||
68 | |||
69 | Represents the interface to the four single bit serial interfaces. | ||
70 | The SI is a proprietary serial interface used normally to control gamepads. | ||
71 | It's NOT a RS232-type interface. | ||
72 | |||
73 | Required properties: | ||
74 | |||
75 | - compatible : should be "nintendo,hollywood-si","nintendo,flipper-si" | ||
76 | - reg : should contain the SI registers location and length | ||
77 | - interrupts : should contain the SI interrupt | ||
78 | |||
79 | 1.e) The Audio Interface (AI) node | ||
80 | |||
81 | Represents the interface to the external 16-bit stereo digital-to-analog | ||
82 | converter. | ||
83 | |||
84 | Required properties: | ||
85 | |||
86 | - compatible : should be "nintendo,hollywood-ai","nintendo,flipper-ai" | ||
87 | - reg : should contain the AI registers location and length | ||
88 | - interrupts : should contain the AI interrupt | ||
89 | |||
90 | 1.f) The External Interface (EXI) node | ||
91 | |||
92 | Represents the multi-channel SPI-like interface. | ||
93 | |||
94 | Required properties: | ||
95 | |||
96 | - compatible : should be "nintendo,hollywood-exi","nintendo,flipper-exi" | ||
97 | - reg : should contain the EXI registers location and length | ||
98 | - interrupts : should contain the EXI interrupt | ||
99 | |||
100 | 1.g) The Open Host Controller Interface (OHCI) nodes | ||
101 | |||
102 | Represent the USB 1.x Open Host Controller Interfaces. | ||
103 | |||
104 | Required properties: | ||
105 | |||
106 | - compatible : should be "nintendo,hollywood-usb-ohci","usb-ohci" | ||
107 | - reg : should contain the OHCI registers location and length | ||
108 | - interrupts : should contain the OHCI interrupt | ||
109 | |||
110 | 1.h) The Enhanced Host Controller Interface (EHCI) node | ||
111 | |||
112 | Represents the USB 2.0 Enhanced Host Controller Interface. | ||
113 | |||
114 | Required properties: | ||
115 | |||
116 | - compatible : should be "nintendo,hollywood-usb-ehci","usb-ehci" | ||
117 | - reg : should contain the EHCI registers location and length | ||
118 | - interrupts : should contain the EHCI interrupt | ||
119 | |||
120 | 1.i) The Secure Digital Host Controller Interface (SDHCI) nodes | ||
121 | |||
122 | Represent the Secure Digital Host Controller Interfaces. | ||
123 | |||
124 | Required properties: | ||
125 | |||
126 | - compatible : should be "nintendo,hollywood-sdhci","sdhci" | ||
127 | - reg : should contain the SDHCI registers location and length | ||
128 | - interrupts : should contain the SDHCI interrupt | ||
129 | |||
130 | 1.j) The Inter-Processsor Communication (IPC) node | ||
131 | |||
132 | Represent the Inter-Processor Communication interface. This interface | ||
133 | enables communications between the Broadway and the Starlet processors. | ||
134 | |||
135 | - compatible : should be "nintendo,hollywood-ipc" | ||
136 | - reg : should contain the IPC registers location and length | ||
137 | - interrupts : should contain the IPC interrupt | ||
138 | |||
139 | 1.k) The "Hollywood" interrupt controller node | ||
140 | |||
141 | Represents the "Hollywood" interrupt controller within the | ||
142 | "Hollywood" chip. | ||
143 | |||
144 | Required properties: | ||
145 | |||
146 | - #interrupt-cells : <1> | ||
147 | - compatible : should be "nintendo,hollywood-pic" | ||
148 | - reg : should contain the controller registers location and length | ||
149 | - interrupt-controller | ||
150 | - interrupts : should contain the cascade interrupt of the "flipper" pic | ||
151 | - interrupt-parent: should contain the phandle of the "flipper" pic | ||
152 | |||
153 | 1.l) The General Purpose I/O (GPIO) controller node | ||
154 | |||
155 | Represents the dual access 32 GPIO controller interface. | ||
156 | |||
157 | Required properties: | ||
158 | |||
159 | - #gpio-cells : <2> | ||
160 | - compatible : should be "nintendo,hollywood-gpio" | ||
161 | - reg : should contain the IPC registers location and length | ||
162 | - gpio-controller | ||
163 | |||
164 | 1.m) The control node | ||
165 | |||
166 | Represents the control interface used to setup several miscellaneous | ||
167 | settings of the "Hollywood" chip like boot memory mappings, resets, | ||
168 | disk interface mode, etc. | ||
169 | |||
170 | Required properties: | ||
171 | |||
172 | - compatible : should be "nintendo,hollywood-control" | ||
173 | - reg : should contain the control registers location and length | ||
174 | |||
175 | 1.n) The Disk Interface (DI) node | ||
176 | |||
177 | Represents the interface used to communicate with mass storage devices. | ||
178 | |||
179 | Required properties: | ||
180 | |||
181 | - compatible : should be "nintendo,hollywood-di" | ||
182 | - reg : should contain the DI registers location and length | ||
183 | - interrupts : should contain the DI interrupt | ||
184 | |||
diff --git a/Documentation/powerpc/dts-bindings/xilinx.txt b/Documentation/powerpc/dts-bindings/xilinx.txt index 80339fe4300b..ea68046bb9cb 100644 --- a/Documentation/powerpc/dts-bindings/xilinx.txt +++ b/Documentation/powerpc/dts-bindings/xilinx.txt | |||
@@ -292,4 +292,15 @@ | |||
292 | - reg-offset : A value of 3 is required | 292 | - reg-offset : A value of 3 is required |
293 | - reg-shift : A value of 2 is required | 293 | - reg-shift : A value of 2 is required |
294 | 294 | ||
295 | vii) Xilinx USB Host controller | ||
296 | |||
297 | The Xilinx USB host controller is EHCI compatible but with a different | ||
298 | base address for the EHCI registers, and it is always a big-endian | ||
299 | USB Host controller. The hardware can be configured as high speed only, | ||
300 | or high speed/full speed hybrid. | ||
301 | |||
302 | Required properties: | ||
303 | - xlnx,support-usb-fs: A value 0 means the core is built as high speed | ||
304 | only. A value 1 means the core also supports | ||
305 | full speed devices. | ||
295 | 306 | ||
diff --git a/Documentation/scsi/ChangeLog.megaraid_sas b/Documentation/scsi/ChangeLog.megaraid_sas index c851ef497795..17ffa0607712 100644 --- a/Documentation/scsi/ChangeLog.megaraid_sas +++ b/Documentation/scsi/ChangeLog.megaraid_sas | |||
@@ -1,3 +1,65 @@ | |||
1 | 1 Release Date : Tues. July 28, 2009 10:12:45 PST 2009 - | ||
2 | (emaild-id:megaraidlinux@lsi.com) | ||
3 | Bo Yang | ||
4 | |||
5 | 2 Current Version : 00.00.04.12 | ||
6 | 3 Older Version : 00.00.04.10 | ||
7 | |||
8 | 1. Change the AEN sys PD update from scsi_scan to | ||
9 | scsi_add_device and scsi_remove_device. | ||
10 | 2. Takeoff the debug print-out in aen_polling routine. | ||
11 | |||
12 | 1 Release Date : Thur. July 02, 2009 10:12:45 PST 2009 - | ||
13 | (emaild-id:megaraidlinux@lsi.com) | ||
14 | Bo Yang | ||
15 | |||
16 | 2 Current Version : 00.00.04.10 | ||
17 | 3 Older Version : 00.00.04.08 | ||
18 | |||
19 | 1. Add the 3 mins timeout during the controller initialize. | ||
20 | 2. Add the fix for 64bit sense date errors. | ||
21 | |||
22 | 1 Release Date : Tues. May 05, 2009 10:12:45 PST 2009 - | ||
23 | (emaild-id:megaraidlinux@lsi.com) | ||
24 | Bo Yang | ||
25 | |||
26 | 2 Current Version : 00.00.04.08 | ||
27 | 3 Older Version : 00.00.04.06 | ||
28 | |||
29 | 1. Add the fix of pending in FW after deleted the logic drives. | ||
30 | 2. Add the fix of deallocating memory after get pdlist. | ||
31 | |||
32 | 1 Release Date : Tues. March 26, 2009 10:12:45 PST 2009 - | ||
33 | (emaild-id:megaraidlinux@lsi.com) | ||
34 | Bo Yang | ||
35 | |||
36 | 2 Current Version : 00.00.04.06 | ||
37 | 3 Older Version : 00.00.04.04 | ||
38 | |||
39 | 1. Add the fix of the driver cmd empty fix of the driver cmd empty. | ||
40 | 2. Add the fix of the driver MSM AEN CMD cause the system slow. | ||
41 | |||
42 | 1 Release Date : Tues. March 03, 2009 10:12:45 PST 2009 - | ||
43 | (emaild-id:megaraidlinux@lsi.com) | ||
44 | Bo Yang | ||
45 | |||
46 | 2 Current Version : 00.00.04.04 | ||
47 | 3 Older Version : 00.00.04.01 | ||
48 | |||
49 | 1. Add the Tape drive fix to the driver: If the command is for | ||
50 | the tape device, set the pthru timeout to the os layer timeout value. | ||
51 | |||
52 | 2. Add Poll_wait mechanism to Gen-2 Linux driv. | ||
53 | In the aen handler, driver needs to wakeup poll handler similar to | ||
54 | the way it raises SIGIO. | ||
55 | |||
56 | 3. Add new controller new SAS2 support to the driver. | ||
57 | |||
58 | 4. Report the unconfigured PD (system PD) to OS. | ||
59 | |||
60 | 5. Add the IEEE SGL support to the driver | ||
61 | |||
62 | 6. Reasign the Application cmds to SAS2 controller | ||
1 | 63 | ||
2 | 1 Release Date : Thur.July. 24 11:41:51 PST 2008 - | 64 | 1 Release Date : Thur.July. 24 11:41:51 PST 2008 - |
3 | (emaild-id:megaraidlinux@lsi.com) | 65 | (emaild-id:megaraidlinux@lsi.com) |
@@ -185,7 +247,7 @@ ii. FW enables WCE bit in Mode Sense cmd for drives that are configured | |||
185 | Disks are exposed with WCE=1. User is advised to enable Write Back | 247 | Disks are exposed with WCE=1. User is advised to enable Write Back |
186 | mode only when the controller has battery backup. At this time | 248 | mode only when the controller has battery backup. At this time |
187 | Synhronize cache is not supported by the FW. Driver will short-cycle | 249 | Synhronize cache is not supported by the FW. Driver will short-cycle |
188 | the cmd and return sucess without sending down to FW. | 250 | the cmd and return success without sending down to FW. |
189 | 251 | ||
190 | 1 Release Date : Sun Jan. 14 11:21:32 PDT 2007 - | 252 | 1 Release Date : Sun Jan. 14 11:21:32 PDT 2007 - |
191 | Sumant Patro <Sumant.Patro@lsil.com>/Bo Yang | 253 | Sumant Patro <Sumant.Patro@lsil.com>/Bo Yang |
diff --git a/Documentation/serial/hayes-esp.txt b/Documentation/serial/hayes-esp.txt deleted file mode 100644 index 09b5d5856758..000000000000 --- a/Documentation/serial/hayes-esp.txt +++ /dev/null | |||
@@ -1,154 +0,0 @@ | |||
1 | HAYES ESP DRIVER VERSION 2.1 | ||
2 | |||
3 | A big thanks to the people at Hayes, especially Alan Adamson. Their support | ||
4 | has enabled me to provide enhancements to the driver. | ||
5 | |||
6 | Please report your experiences with this driver to me (arobinso@nyx.net). I | ||
7 | am looking for both positive and negative feedback. | ||
8 | |||
9 | *** IMPORTANT CHANGES FOR 2.1 *** | ||
10 | Support for PIO mode. Five situations will cause PIO mode to be used: | ||
11 | 1) A multiport card is detected. PIO mode will always be used. (8 port cards | ||
12 | do not support DMA). | ||
13 | 2) The DMA channel is set to an invalid value (anything other than 1 or 3). | ||
14 | 3) The DMA buffer/channel could not be allocated. The port will revert to PIO | ||
15 | mode until it is reopened. | ||
16 | 4) Less than a specified number of bytes need to be transferred to/from the | ||
17 | FIFOs. PIO mode will be used for that transfer only. | ||
18 | 5) A port needs to do a DMA transfer and another port is already using the | ||
19 | DMA channel. PIO mode will be used for that transfer only. | ||
20 | |||
21 | Since the Hayes ESP seems to conflict with other cards (notably sound cards) | ||
22 | when using DMA, DMA is turned off by default. To use DMA, it must be turned | ||
23 | on explicitly, either with the "dma=" option described below or with | ||
24 | setserial. A multiport card can be forced into DMA mode by using setserial; | ||
25 | however, most multiport cards don't support DMA. | ||
26 | |||
27 | The latest version of setserial allows the enhanced configuration of the ESP | ||
28 | card to be viewed and modified. | ||
29 | *** | ||
30 | |||
31 | This package contains the files needed to compile a module to support the Hayes | ||
32 | ESP card. The drivers are basically a modified version of the serial drivers. | ||
33 | |||
34 | Features: | ||
35 | |||
36 | - Uses the enhanced mode of the ESP card, allowing a wider range of | ||
37 | interrupts and features than compatibility mode | ||
38 | - Uses DMA and 16 bit PIO mode to transfer data to and from the ESP's FIFOs, | ||
39 | reducing CPU load | ||
40 | - Supports primary and secondary ports | ||
41 | |||
42 | |||
43 | If the driver is compiled as a module, the IRQs to use can be specified by | ||
44 | using the irq= option. The format is: | ||
45 | |||
46 | irq=[0x100],[0x140],[0x180],[0x200],[0x240],[0x280],[0x300],[0x380] | ||
47 | |||
48 | The address in brackets is the base address of the card. The IRQ of | ||
49 | nonexistent cards can be set to 0. If an IRQ of a card that does exist is set | ||
50 | to 0, the driver will attempt to guess at the correct IRQ. For example, to set | ||
51 | the IRQ of the card at address 0x300 to 12, the insmod command would be: | ||
52 | |||
53 | insmod esp irq=0,0,0,0,0,0,12,0 | ||
54 | |||
55 | The custom divisor can be set by using the divisor= option. The format is the | ||
56 | same as for the irq= option. Each divisor value is a series of hex digits, | ||
57 | with each digit representing the divisor to use for a corresponding port. The | ||
58 | divisor value is constructed RIGHT TO LEFT. Specifying a nonzero divisor value | ||
59 | will automatically set the spd_cust flag. To calculate the divisor to use for | ||
60 | a certain baud rate, divide the port's base baud (generally 921600) by the | ||
61 | desired rate. For example, to set the divisor of the primary port at 0x300 to | ||
62 | 4 and the divisor of the secondary port at 0x308 to 8, the insmod command would | ||
63 | be: | ||
64 | |||
65 | insmod esp divisor=0,0,0,0,0,0,0x84,0 | ||
66 | |||
67 | The dma= option can be used to set the DMA channel. The channel can be either | ||
68 | 1 or 3. Specifying any other value will force the driver to use PIO mode. | ||
69 | For example, to set the DMA channel to 3, the insmod command would be: | ||
70 | |||
71 | insmod esp dma=3 | ||
72 | |||
73 | The rx_trigger= and tx_trigger= options can be used to set the FIFO trigger | ||
74 | levels. They specify when the ESP card should send an interrupt. Larger | ||
75 | values will decrease the number of interrupts; however, a value too high may | ||
76 | result in data loss. Valid values are 1 through 1023, with 768 being the | ||
77 | default. For example, to set the receive trigger level to 512 bytes and the | ||
78 | transmit trigger level to 700 bytes, the insmod command would be: | ||
79 | |||
80 | insmod esp rx_trigger=512 tx_trigger=700 | ||
81 | |||
82 | The flow_off= and flow_on= options can be used to set the hardware flow off/ | ||
83 | flow on levels. The flow on level must be lower than the flow off level, and | ||
84 | the flow off level should be higher than rx_trigger. Valid values are 1 | ||
85 | through 1023, with 1016 being the default flow off level and 944 being the | ||
86 | default flow on level. For example, to set the flow off level to 1000 bytes | ||
87 | and the flow on level to 935 bytes, the insmod command would be: | ||
88 | |||
89 | insmod esp flow_off=1000 flow_on=935 | ||
90 | |||
91 | The rx_timeout= option can be used to set the receive timeout value. This | ||
92 | value indicates how long after receiving the last character that the ESP card | ||
93 | should wait before signalling an interrupt. Valid values are 0 though 255, | ||
94 | with 128 being the default. A value too high will increase latency, and a | ||
95 | value too low will cause unnecessary interrupts. For example, to set the | ||
96 | receive timeout to 255, the insmod command would be: | ||
97 | |||
98 | insmod esp rx_timeout=255 | ||
99 | |||
100 | The pio_threshold= option sets the threshold (in number of characters) for | ||
101 | using PIO mode instead of DMA mode. For example, if this value is 32, | ||
102 | transfers of 32 bytes or less will always use PIO mode. | ||
103 | |||
104 | insmod esp pio_threshold=32 | ||
105 | |||
106 | Multiple options can be listed on the insmod command line by separating each | ||
107 | option with a space. For example: | ||
108 | |||
109 | insmod esp dma=3 trigger=512 | ||
110 | |||
111 | The esp module can be automatically loaded when needed. To cause this to | ||
112 | happen, add the following lines to /etc/modprobe.conf (replacing the last line | ||
113 | with options for your configuration): | ||
114 | |||
115 | alias char-major-57 esp | ||
116 | alias char-major-58 esp | ||
117 | options esp irq=0,0,0,0,0,0,3,0 divisor=0,0,0,0,0,0,0x4,0 | ||
118 | |||
119 | You may also need to run 'depmod -a'. | ||
120 | |||
121 | Devices must be created manually. To create the devices, note the output from | ||
122 | the module after it is inserted. The output will appear in the location where | ||
123 | kernel messages usually appear (usually /var/adm/messages). Create two devices | ||
124 | for each 'tty' mentioned, one with major of 57 and the other with major of 58. | ||
125 | The minor number should be the same as the tty number reported. The commands | ||
126 | would be (replace ? with the tty number): | ||
127 | |||
128 | mknod /dev/ttyP? c 57 ? | ||
129 | mknod /dev/cup? c 58 ? | ||
130 | |||
131 | For example, if the following line appears: | ||
132 | |||
133 | Oct 24 18:17:23 techno kernel: ttyP8 at 0x0140 (irq = 3) is an ESP primary port | ||
134 | |||
135 | ...two devices should be created: | ||
136 | |||
137 | mknod /dev/ttyP8 c 57 8 | ||
138 | mknod /dev/cup8 c 58 8 | ||
139 | |||
140 | You may need to set the permissions on the devices: | ||
141 | |||
142 | chmod 666 /dev/ttyP* | ||
143 | chmod 666 /dev/cup* | ||
144 | |||
145 | The ESP module and the serial module should not conflict (they can be used at | ||
146 | the same time). After the ESP module has been loaded the ports on the ESP card | ||
147 | will no longer be accessible by the serial driver. | ||
148 | |||
149 | If I/O errors are experienced when accessing the port, check for IRQ and DMA | ||
150 | conflicts ('cat /proc/interrupts' and 'cat /proc/dma' for a list of IRQs and | ||
151 | DMAs currently in use). | ||
152 | |||
153 | Enjoy! | ||
154 | Andrew J. Robinson <arobinso@nyx.net> | ||
diff --git a/Documentation/serial/tty.txt b/Documentation/serial/tty.txt index 8e65c4498c52..5e5349a4fcd2 100644 --- a/Documentation/serial/tty.txt +++ b/Documentation/serial/tty.txt | |||
@@ -42,7 +42,8 @@ TTY side interfaces: | |||
42 | open() - Called when the line discipline is attached to | 42 | open() - Called when the line discipline is attached to |
43 | the terminal. No other call into the line | 43 | the terminal. No other call into the line |
44 | discipline for this tty will occur until it | 44 | discipline for this tty will occur until it |
45 | completes successfully. Can sleep. | 45 | completes successfully. Returning an error will |
46 | prevent the ldisc from being attached. Can sleep. | ||
46 | 47 | ||
47 | close() - This is called on a terminal when the line | 48 | close() - This is called on a terminal when the line |
48 | discipline is being unplugged. At the point of | 49 | discipline is being unplugged. At the point of |
@@ -52,7 +53,7 @@ close() - This is called on a terminal when the line | |||
52 | hangup() - Called when the tty line is hung up. | 53 | hangup() - Called when the tty line is hung up. |
53 | The line discipline should cease I/O to the tty. | 54 | The line discipline should cease I/O to the tty. |
54 | No further calls into the ldisc code will occur. | 55 | No further calls into the ldisc code will occur. |
55 | Can sleep. | 56 | The return value is ignored. Can sleep. |
56 | 57 | ||
57 | write() - A process is writing data through the line | 58 | write() - A process is writing data through the line |
58 | discipline. Multiple write calls are serialized | 59 | discipline. Multiple write calls are serialized |
@@ -83,6 +84,10 @@ ioctl() - Called when an ioctl is handed to the tty layer | |||
83 | that might be for the ldisc. Multiple ioctl calls | 84 | that might be for the ldisc. Multiple ioctl calls |
84 | may occur in parallel. May sleep. | 85 | may occur in parallel. May sleep. |
85 | 86 | ||
87 | compat_ioctl() - Called when a 32 bit ioctl is handed to the tty layer | ||
88 | that might be for the ldisc. Multiple ioctl calls | ||
89 | may occur in parallel. May sleep. | ||
90 | |||
86 | Driver Side Interfaces: | 91 | Driver Side Interfaces: |
87 | 92 | ||
88 | receive_buf() - Hand buffers of bytes from the driver to the ldisc | 93 | receive_buf() - Hand buffers of bytes from the driver to the ldisc |
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt index 9000cd84d076..e72cee9e2a71 100644 --- a/Documentation/sound/alsa/HD-Audio-Models.txt +++ b/Documentation/sound/alsa/HD-Audio-Models.txt | |||
@@ -126,6 +126,7 @@ ALC882/883/885/888/889 | |||
126 | mb5 Macbook 5,1 | 126 | mb5 Macbook 5,1 |
127 | mbp3 Macbook Pro rev3 | 127 | mbp3 Macbook Pro rev3 |
128 | imac24 iMac 24'' with jack detection | 128 | imac24 iMac 24'' with jack detection |
129 | imac91 iMac 9,1 | ||
129 | w2jc ASUS W2JC | 130 | w2jc ASUS W2JC |
130 | 3stack-2ch-dig 3-jack with SPDIF I/O (ALC883) | 131 | 3stack-2ch-dig 3-jack with SPDIF I/O (ALC883) |
131 | alc883-6stack-dig 6-jack digital with SPDIF I/O (ALC883) | 132 | alc883-6stack-dig 6-jack digital with SPDIF I/O (ALC883) |
@@ -402,4 +403,5 @@ STAC9872 | |||
402 | Cirrus Logic CS4206/4207 | 403 | Cirrus Logic CS4206/4207 |
403 | ======================== | 404 | ======================== |
404 | mbp55 MacBook Pro 5,5 | 405 | mbp55 MacBook Pro 5,5 |
406 | imac27 IMac 27 Inch | ||
405 | auto BIOS setup (default) | 407 | auto BIOS setup (default) |
diff --git a/Documentation/sound/alsa/HD-Audio.txt b/Documentation/sound/alsa/HD-Audio.txt index 7b8a5f947d1d..6325bec06a72 100644 --- a/Documentation/sound/alsa/HD-Audio.txt +++ b/Documentation/sound/alsa/HD-Audio.txt | |||
@@ -624,11 +624,13 @@ hda-verb. The program gives you an easy-to-use GUI stuff for showing | |||
624 | the widget information and adjusting the amp values, as well as the | 624 | the widget information and adjusting the amp values, as well as the |
625 | proc-compatible output. | 625 | proc-compatible output. |
626 | 626 | ||
627 | The hda-analyzer is a part of alsa.git repository in | 627 | The hda-analyzer: |
628 | alsa-project.org: | ||
629 | 628 | ||
630 | - http://git.alsa-project.org/?p=alsa.git;a=tree;f=hda-analyzer | 629 | - http://git.alsa-project.org/?p=alsa.git;a=tree;f=hda-analyzer |
631 | 630 | ||
631 | is a part of alsa.git repository in alsa-project.org: | ||
632 | |||
633 | - git://git.alsa-project.org/alsa.git | ||
632 | 634 | ||
633 | Codecgraph | 635 | Codecgraph |
634 | ~~~~~~~~~~ | 636 | ~~~~~~~~~~ |
diff --git a/Documentation/spi/spi-summary b/Documentation/spi/spi-summary index deab51ddc33e..4884cb33845d 100644 --- a/Documentation/spi/spi-summary +++ b/Documentation/spi/spi-summary | |||
@@ -538,7 +538,7 @@ SPI MESSAGE QUEUE | |||
538 | The bulk of the driver will be managing the I/O queue fed by transfer(). | 538 | The bulk of the driver will be managing the I/O queue fed by transfer(). |
539 | 539 | ||
540 | That queue could be purely conceptual. For example, a driver used only | 540 | That queue could be purely conceptual. For example, a driver used only |
541 | for low-frequency sensor acess might be fine using synchronous PIO. | 541 | for low-frequency sensor access might be fine using synchronous PIO. |
542 | 542 | ||
543 | But the queue will probably be very real, using message->queue, PIO, | 543 | But the queue will probably be very real, using message->queue, PIO, |
544 | often DMA (especially if the root filesystem is in SPI flash), and | 544 | often DMA (especially if the root filesystem is in SPI flash), and |
diff --git a/Documentation/spinlocks.txt b/Documentation/spinlocks.txt index 619699dde593..178c831b907d 100644 --- a/Documentation/spinlocks.txt +++ b/Documentation/spinlocks.txt | |||
@@ -1,73 +1,8 @@ | |||
1 | SPIN_LOCK_UNLOCKED and RW_LOCK_UNLOCKED defeat lockdep state tracking and | 1 | Lesson 1: Spin locks |
2 | are hence deprecated. | ||
3 | 2 | ||
4 | Please use DEFINE_SPINLOCK()/DEFINE_RWLOCK() or | 3 | The most basic primitive for locking is spinlock. |
5 | __SPIN_LOCK_UNLOCKED()/__RW_LOCK_UNLOCKED() as appropriate for static | ||
6 | initialization. | ||
7 | |||
8 | Most of the time, you can simply turn: | ||
9 | |||
10 | static spinlock_t xxx_lock = SPIN_LOCK_UNLOCKED; | ||
11 | |||
12 | into: | ||
13 | |||
14 | static DEFINE_SPINLOCK(xxx_lock); | ||
15 | |||
16 | Static structure member variables go from: | ||
17 | |||
18 | struct foo bar { | ||
19 | .lock = SPIN_LOCK_UNLOCKED; | ||
20 | }; | ||
21 | |||
22 | to: | ||
23 | |||
24 | struct foo bar { | ||
25 | .lock = __SPIN_LOCK_UNLOCKED(bar.lock); | ||
26 | }; | ||
27 | |||
28 | Declaration of static rw_locks undergo a similar transformation. | ||
29 | |||
30 | Dynamic initialization, when necessary, may be performed as | ||
31 | demonstrated below. | ||
32 | |||
33 | spinlock_t xxx_lock; | ||
34 | rwlock_t xxx_rw_lock; | ||
35 | |||
36 | static int __init xxx_init(void) | ||
37 | { | ||
38 | spin_lock_init(&xxx_lock); | ||
39 | rwlock_init(&xxx_rw_lock); | ||
40 | ... | ||
41 | } | ||
42 | |||
43 | module_init(xxx_init); | ||
44 | |||
45 | The following discussion is still valid, however, with the dynamic | ||
46 | initialization of spinlocks or with DEFINE_SPINLOCK, etc., used | ||
47 | instead of SPIN_LOCK_UNLOCKED. | ||
48 | |||
49 | ----------------------- | ||
50 | |||
51 | On Fri, 2 Jan 1998, Doug Ledford wrote: | ||
52 | > | ||
53 | > I'm working on making the aic7xxx driver more SMP friendly (as well as | ||
54 | > importing the latest FreeBSD sequencer code to have 7895 support) and wanted | ||
55 | > to get some info from you. The goal here is to make the various routines | ||
56 | > SMP safe as well as UP safe during interrupts and other manipulating | ||
57 | > routines. So far, I've added a spin_lock variable to things like my queue | ||
58 | > structs. Now, from what I recall, there are some spin lock functions I can | ||
59 | > use to lock these spin locks from other use as opposed to a (nasty) | ||
60 | > save_flags(); cli(); stuff; restore_flags(); construct. Where do I find | ||
61 | > these routines and go about making use of them? Do they only lock on a | ||
62 | > per-processor basis or can they also lock say an interrupt routine from | ||
63 | > mucking with a queue if the queue routine was manipulating it when the | ||
64 | > interrupt occurred, or should I still use a cli(); based construct on that | ||
65 | > one? | ||
66 | |||
67 | See <asm/spinlock.h>. The basic version is: | ||
68 | |||
69 | spinlock_t xxx_lock = SPIN_LOCK_UNLOCKED; | ||
70 | 4 | ||
5 | static DEFINE_SPINLOCK(xxx_lock); | ||
71 | 6 | ||
72 | unsigned long flags; | 7 | unsigned long flags; |
73 | 8 | ||
@@ -75,13 +10,11 @@ See <asm/spinlock.h>. The basic version is: | |||
75 | ... critical section here .. | 10 | ... critical section here .. |
76 | spin_unlock_irqrestore(&xxx_lock, flags); | 11 | spin_unlock_irqrestore(&xxx_lock, flags); |
77 | 12 | ||
78 | and the above is always safe. It will disable interrupts _locally_, but the | 13 | The above is always safe. It will disable interrupts _locally_, but the |
79 | spinlock itself will guarantee the global lock, so it will guarantee that | 14 | spinlock itself will guarantee the global lock, so it will guarantee that |
80 | there is only one thread-of-control within the region(s) protected by that | 15 | there is only one thread-of-control within the region(s) protected by that |
81 | lock. | 16 | lock. This works well even under UP. The above sequence under UP |
82 | 17 | essentially is just the same as doing | |
83 | Note that it works well even under UP - the above sequence under UP | ||
84 | essentially is just the same as doing a | ||
85 | 18 | ||
86 | unsigned long flags; | 19 | unsigned long flags; |
87 | 20 | ||
@@ -91,15 +24,13 @@ essentially is just the same as doing a | |||
91 | 24 | ||
92 | so the code does _not_ need to worry about UP vs SMP issues: the spinlocks | 25 | so the code does _not_ need to worry about UP vs SMP issues: the spinlocks |
93 | work correctly under both (and spinlocks are actually more efficient on | 26 | work correctly under both (and spinlocks are actually more efficient on |
94 | architectures that allow doing the "save_flags + cli" in one go because I | 27 | architectures that allow doing the "save_flags + cli" in one operation). |
95 | don't export that interface normally). | 28 | |
29 | NOTE! Implications of spin_locks for memory are further described in: | ||
96 | 30 | ||
97 | NOTE NOTE NOTE! The reason the spinlock is so much faster than a global | 31 | Documentation/memory-barriers.txt |
98 | interrupt lock under SMP is exactly because it disables interrupts only on | 32 | (5) LOCK operations. |
99 | the local CPU. The spin-lock is safe only when you _also_ use the lock | 33 | (6) UNLOCK operations. |
100 | itself to do locking across CPU's, which implies that EVERYTHING that | ||
101 | touches a shared variable has to agree about the spinlock they want to | ||
102 | use. | ||
103 | 34 | ||
104 | The above is usually pretty simple (you usually need and want only one | 35 | The above is usually pretty simple (you usually need and want only one |
105 | spinlock for most things - using more than one spinlock can make things a | 36 | spinlock for most things - using more than one spinlock can make things a |
@@ -120,20 +51,24 @@ and another sequence that does | |||
120 | then they are NOT mutually exclusive, and the critical regions can happen | 51 | then they are NOT mutually exclusive, and the critical regions can happen |
121 | at the same time on two different CPU's. That's fine per se, but the | 52 | at the same time on two different CPU's. That's fine per se, but the |
122 | critical regions had better be critical for different things (ie they | 53 | critical regions had better be critical for different things (ie they |
123 | can't stomp on each other). | 54 | can't stomp on each other). |
124 | 55 | ||
125 | The above is a problem mainly if you end up mixing code - for example the | 56 | The above is a problem mainly if you end up mixing code - for example the |
126 | routines in ll_rw_block() tend to use cli/sti to protect the atomicity of | 57 | routines in ll_rw_block() tend to use cli/sti to protect the atomicity of |
127 | their actions, and if a driver uses spinlocks instead then you should | 58 | their actions, and if a driver uses spinlocks instead then you should |
128 | think about issues like the above.. | 59 | think about issues like the above. |
129 | 60 | ||
130 | This is really the only really hard part about spinlocks: once you start | 61 | This is really the only really hard part about spinlocks: once you start |
131 | using spinlocks they tend to expand to areas you might not have noticed | 62 | using spinlocks they tend to expand to areas you might not have noticed |
132 | before, because you have to make sure the spinlocks correctly protect the | 63 | before, because you have to make sure the spinlocks correctly protect the |
133 | shared data structures _everywhere_ they are used. The spinlocks are most | 64 | shared data structures _everywhere_ they are used. The spinlocks are most |
134 | easily added to places that are completely independent of other code (ie | 65 | easily added to places that are completely independent of other code (for |
135 | internal driver data structures that nobody else ever touches, for | 66 | example, internal driver data structures that nobody else ever touches). |
136 | example). | 67 | |
68 | NOTE! The spin-lock is safe only when you _also_ use the lock itself | ||
69 | to do locking across CPU's, which implies that EVERYTHING that | ||
70 | touches a shared variable has to agree about the spinlock they want | ||
71 | to use. | ||
137 | 72 | ||
138 | ---- | 73 | ---- |
139 | 74 | ||
@@ -141,13 +76,17 @@ Lesson 2: reader-writer spinlocks. | |||
141 | 76 | ||
142 | If your data accesses have a very natural pattern where you usually tend | 77 | If your data accesses have a very natural pattern where you usually tend |
143 | to mostly read from the shared variables, the reader-writer locks | 78 | to mostly read from the shared variables, the reader-writer locks |
144 | (rw_lock) versions of the spinlocks are often nicer. They allow multiple | 79 | (rw_lock) versions of the spinlocks are sometimes useful. They allow multiple |
145 | readers to be in the same critical region at once, but if somebody wants | 80 | readers to be in the same critical region at once, but if somebody wants |
146 | to change the variables it has to get an exclusive write lock. The | 81 | to change the variables it has to get an exclusive write lock. |
147 | routines look the same as above: | ||
148 | 82 | ||
149 | rwlock_t xxx_lock = RW_LOCK_UNLOCKED; | 83 | NOTE! reader-writer locks require more atomic memory operations than |
84 | simple spinlocks. Unless the reader critical section is long, you | ||
85 | are better off just using spinlocks. | ||
150 | 86 | ||
87 | The routines look the same as above: | ||
88 | |||
89 | rwlock_t xxx_lock = RW_LOCK_UNLOCKED; | ||
151 | 90 | ||
152 | unsigned long flags; | 91 | unsigned long flags; |
153 | 92 | ||
@@ -159,18 +98,21 @@ routines look the same as above: | |||
159 | .. read and write exclusive access to the info ... | 98 | .. read and write exclusive access to the info ... |
160 | write_unlock_irqrestore(&xxx_lock, flags); | 99 | write_unlock_irqrestore(&xxx_lock, flags); |
161 | 100 | ||
162 | The above kind of lock is useful for complex data structures like linked | 101 | The above kind of lock may be useful for complex data structures like |
163 | lists etc, especially when you know that most of the work is to just | 102 | linked lists, especially searching for entries without changing the list |
164 | traverse the list searching for entries without changing the list itself, | 103 | itself. The read lock allows many concurrent readers. Anything that |
165 | for example. Then you can use the read lock for that kind of list | 104 | _changes_ the list will have to get the write lock. |
166 | traversal, which allows many concurrent readers. Anything that _changes_ | 105 | |
167 | the list will have to get the write lock. | 106 | NOTE! RCU is better for list traversal, but requires careful |
107 | attention to design detail (see Documentation/RCU/listRCU.txt). | ||
168 | 108 | ||
169 | Note: you cannot "upgrade" a read-lock to a write-lock, so if you at _any_ | 109 | Also, you cannot "upgrade" a read-lock to a write-lock, so if you at _any_ |
170 | time need to do any changes (even if you don't do it every time), you have | 110 | time need to do any changes (even if you don't do it every time), you have |
171 | to get the write-lock at the very beginning. I could fairly easily add a | 111 | to get the write-lock at the very beginning. |
172 | primitive to create a "upgradeable" read-lock, but it hasn't been an issue | 112 | |
173 | yet. Tell me if you'd want one. | 113 | NOTE! We are working hard to remove reader-writer spinlocks in most |
114 | cases, so please don't add a new one without consensus. (Instead, see | ||
115 | Documentation/RCU/rcu.txt for complete information.) | ||
174 | 116 | ||
175 | ---- | 117 | ---- |
176 | 118 | ||
@@ -233,4 +175,46 @@ indeed), while write-locks need to protect themselves against interrupts. | |||
233 | 175 | ||
234 | Linus | 176 | Linus |
235 | 177 | ||
178 | ---- | ||
179 | |||
180 | Reference information: | ||
181 | |||
182 | For dynamic initialization, use spin_lock_init() or rwlock_init() as | ||
183 | appropriate: | ||
184 | |||
185 | spinlock_t xxx_lock; | ||
186 | rwlock_t xxx_rw_lock; | ||
187 | |||
188 | static int __init xxx_init(void) | ||
189 | { | ||
190 | spin_lock_init(&xxx_lock); | ||
191 | rwlock_init(&xxx_rw_lock); | ||
192 | ... | ||
193 | } | ||
194 | |||
195 | module_init(xxx_init); | ||
196 | |||
197 | For static initialization, use DEFINE_SPINLOCK() / DEFINE_RWLOCK() or | ||
198 | __SPIN_LOCK_UNLOCKED() / __RW_LOCK_UNLOCKED() as appropriate. | ||
199 | |||
200 | SPIN_LOCK_UNLOCKED and RW_LOCK_UNLOCKED are deprecated. These interfere | ||
201 | with lockdep state tracking. | ||
202 | |||
203 | Most of the time, you can simply turn: | ||
204 | static spinlock_t xxx_lock = SPIN_LOCK_UNLOCKED; | ||
205 | into: | ||
206 | static DEFINE_SPINLOCK(xxx_lock); | ||
207 | |||
208 | Static structure member variables go from: | ||
209 | |||
210 | struct foo bar { | ||
211 | .lock = SPIN_LOCK_UNLOCKED; | ||
212 | }; | ||
213 | |||
214 | to: | ||
236 | 215 | ||
216 | struct foo bar { | ||
217 | .lock = __SPIN_LOCK_UNLOCKED(bar.lock); | ||
218 | }; | ||
219 | |||
220 | Declaration of static rw_locks undergo a similar transformation. | ||
diff --git a/Documentation/stable_kernel_rules.txt b/Documentation/stable_kernel_rules.txt index a452227361b1..5effa5bd993b 100644 --- a/Documentation/stable_kernel_rules.txt +++ b/Documentation/stable_kernel_rules.txt | |||
@@ -26,13 +26,33 @@ Procedure for submitting patches to the -stable tree: | |||
26 | 26 | ||
27 | - Send the patch, after verifying that it follows the above rules, to | 27 | - Send the patch, after verifying that it follows the above rules, to |
28 | stable@kernel.org. | 28 | stable@kernel.org. |
29 | - To have the patch automatically included in the stable tree, add the | ||
30 | the tag | ||
31 | Cc: stable@kernel.org | ||
32 | in the sign-off area. Once the patch is merged it will be applied to | ||
33 | the stable tree without anything else needing to be done by the author | ||
34 | or subsystem maintainer. | ||
35 | - If the patch requires other patches as prerequisites which can be | ||
36 | cherry-picked than this can be specified in the following format in | ||
37 | the sign-off area: | ||
38 | |||
39 | Cc: <stable@kernel.org> # .32.x: a1f84a3: sched: Check for idle | ||
40 | Cc: <stable@kernel.org> # .32.x: 1b9508f: sched: Rate-limit newidle | ||
41 | Cc: <stable@kernel.org> # .32.x: fd21073: sched: Fix affinity logic | ||
42 | Cc: <stable@kernel.org> # .32.x | ||
43 | Signed-off-by: Ingo Molnar <mingo@elte.hu> | ||
44 | |||
45 | The tag sequence has the meaning of: | ||
46 | git cherry-pick a1f84a3 | ||
47 | git cherry-pick 1b9508f | ||
48 | git cherry-pick fd21073 | ||
49 | git cherry-pick <this commit> | ||
50 | |||
29 | - The sender will receive an ACK when the patch has been accepted into the | 51 | - The sender will receive an ACK when the patch has been accepted into the |
30 | queue, or a NAK if the patch is rejected. This response might take a few | 52 | queue, or a NAK if the patch is rejected. This response might take a few |
31 | days, according to the developer's schedules. | 53 | days, according to the developer's schedules. |
32 | - If accepted, the patch will be added to the -stable queue, for review by | 54 | - If accepted, the patch will be added to the -stable queue, for review by |
33 | other developers and by the relevant subsystem maintainer. | 55 | other developers and by the relevant subsystem maintainer. |
34 | - If the stable@kernel.org address is added to a patch, when it goes into | ||
35 | Linus's tree it will automatically be emailed to the stable team. | ||
36 | - Security patches should not be sent to this alias, but instead to the | 56 | - Security patches should not be sent to this alias, but instead to the |
37 | documented security@kernel.org address. | 57 | documented security@kernel.org address. |
38 | 58 | ||
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index a028b92001ed..3894eaa23486 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt | |||
@@ -19,6 +19,8 @@ Currently, these files might (depending on your configuration) | |||
19 | show up in /proc/sys/kernel: | 19 | show up in /proc/sys/kernel: |
20 | - acpi_video_flags | 20 | - acpi_video_flags |
21 | - acct | 21 | - acct |
22 | - bootloader_type [ X86 only ] | ||
23 | - bootloader_version [ X86 only ] | ||
22 | - callhome [ S390 only ] | 24 | - callhome [ S390 only ] |
23 | - auto_msgmni | 25 | - auto_msgmni |
24 | - core_pattern | 26 | - core_pattern |
@@ -93,6 +95,35 @@ valid for 30 seconds. | |||
93 | 95 | ||
94 | ============================================================== | 96 | ============================================================== |
95 | 97 | ||
98 | bootloader_type: | ||
99 | |||
100 | x86 bootloader identification | ||
101 | |||
102 | This gives the bootloader type number as indicated by the bootloader, | ||
103 | shifted left by 4, and OR'd with the low four bits of the bootloader | ||
104 | version. The reason for this encoding is that this used to match the | ||
105 | type_of_loader field in the kernel header; the encoding is kept for | ||
106 | backwards compatibility. That is, if the full bootloader type number | ||
107 | is 0x15 and the full version number is 0x234, this file will contain | ||
108 | the value 340 = 0x154. | ||
109 | |||
110 | See the type_of_loader and ext_loader_type fields in | ||
111 | Documentation/x86/boot.txt for additional information. | ||
112 | |||
113 | ============================================================== | ||
114 | |||
115 | bootloader_version: | ||
116 | |||
117 | x86 bootloader version | ||
118 | |||
119 | The complete bootloader version number. In the example above, this | ||
120 | file will contain the value 564 = 0x234. | ||
121 | |||
122 | See the type_of_loader and ext_loader_ver fields in | ||
123 | Documentation/x86/boot.txt for additional information. | ||
124 | |||
125 | ============================================================== | ||
126 | |||
96 | callhome: | 127 | callhome: |
97 | 128 | ||
98 | Controls the kernel's callhome behavior in case of a kernel panic. | 129 | Controls the kernel's callhome behavior in case of a kernel panic. |
@@ -139,9 +170,9 @@ core_pattern is used to specify a core dumpfile pattern name. | |||
139 | core_pipe_limit: | 170 | core_pipe_limit: |
140 | 171 | ||
141 | This sysctl is only applicable when core_pattern is configured to pipe core | 172 | This sysctl is only applicable when core_pattern is configured to pipe core |
142 | files to user space helper a (when the first character of core_pattern is a '|', | 173 | files to a user space helper (when the first character of core_pattern is a '|', |
143 | see above). When collecting cores via a pipe to an application, it is | 174 | see above). When collecting cores via a pipe to an application, it is |
144 | occasionally usefull for the collecting application to gather data about the | 175 | occasionally useful for the collecting application to gather data about the |
145 | crashing process from its /proc/pid directory. In order to do this safely, the | 176 | crashing process from its /proc/pid directory. In order to do this safely, the |
146 | kernel must wait for the collecting process to exit, so as not to remove the | 177 | kernel must wait for the collecting process to exit, so as not to remove the |
147 | crashing processes proc files prematurely. This in turn creates the possibility | 178 | crashing processes proc files prematurely. This in turn creates the possibility |
@@ -152,7 +183,7 @@ applications in parallel. If this value is exceeded, then those crashing | |||
152 | processes above that value are noted via the kernel log and their cores are | 183 | processes above that value are noted via the kernel log and their cores are |
153 | skipped. 0 is a special value, indicating that unlimited processes may be | 184 | skipped. 0 is a special value, indicating that unlimited processes may be |
154 | captured in parallel, but that no waiting will take place (i.e. the collecting | 185 | captured in parallel, but that no waiting will take place (i.e. the collecting |
155 | process is not guaranteed access to /proc/<crahing pid>/). This value defaults | 186 | process is not guaranteed access to /proc/<crashing pid>/). This value defaults |
156 | to 0. | 187 | to 0. |
157 | 188 | ||
158 | ============================================================== | 189 | ============================================================== |
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index a6e360d2055c..fc5790d36cd9 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt | |||
@@ -370,7 +370,7 @@ The default is 1 percent. | |||
370 | mmap_min_addr | 370 | mmap_min_addr |
371 | 371 | ||
372 | This file indicates the amount of address space which a user process will | 372 | This file indicates the amount of address space which a user process will |
373 | be restricted from mmaping. Since kernel null dereference bugs could | 373 | be restricted from mmapping. Since kernel null dereference bugs could |
374 | accidentally operate based on the information in the first couple of pages | 374 | accidentally operate based on the information in the first couple of pages |
375 | of memory userspace processes should not be allowed to write to them. By | 375 | of memory userspace processes should not be allowed to write to them. By |
376 | default this value is set to 0 and no protections will be enforced by the | 376 | default this value is set to 0 and no protections will be enforced by the |
diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt index a87dc277a5ca..cb3d15bc1aeb 100644 --- a/Documentation/thermal/sysfs-api.txt +++ b/Documentation/thermal/sysfs-api.txt | |||
@@ -206,6 +206,7 @@ passive | |||
206 | passive trip point for the zone. Activation is done by polling with | 206 | passive trip point for the zone. Activation is done by polling with |
207 | an interval of 1 second. | 207 | an interval of 1 second. |
208 | Unit: millidegrees Celsius | 208 | Unit: millidegrees Celsius |
209 | Valid values: 0 (disabled) or greater than 1000 | ||
209 | RW, Optional | 210 | RW, Optional |
210 | 211 | ||
211 | ***************************** | 212 | ***************************** |
diff --git a/Documentation/timers/hpet.txt b/Documentation/timers/hpet.txt index 04763a325520..16d25e6b5a00 100644 --- a/Documentation/timers/hpet.txt +++ b/Documentation/timers/hpet.txt | |||
@@ -3,7 +3,7 @@ | |||
3 | The High Precision Event Timer (HPET) hardware follows a specification | 3 | The High Precision Event Timer (HPET) hardware follows a specification |
4 | by Intel and Microsoft which can be found at | 4 | by Intel and Microsoft which can be found at |
5 | 5 | ||
6 | http://www.intel.com/technology/architecture/hpetspec.htm | 6 | http://www.intel.com/hardwaredesign/hpetspec_1.pdf |
7 | 7 | ||
8 | Each HPET has one fixed-rate counter (at 10+ MHz, hence "High Precision") | 8 | Each HPET has one fixed-rate counter (at 10+ MHz, hence "High Precision") |
9 | and up to 32 comparators. Normally three or more comparators are provided, | 9 | and up to 32 comparators. Normally three or more comparators are provided, |
diff --git a/Documentation/trace/events-kmem.txt b/Documentation/trace/events-kmem.txt index 6ef2a8652e17..aa82ee4a5a87 100644 --- a/Documentation/trace/events-kmem.txt +++ b/Documentation/trace/events-kmem.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | Subsystem Trace Points: kmem | 1 | Subsystem Trace Points: kmem |
2 | 2 | ||
3 | The tracing system kmem captures events related to object and page allocation | 3 | The kmem tracing system captures events related to object and page allocation |
4 | within the kernel. Broadly speaking there are four major subheadings. | 4 | within the kernel. Broadly speaking there are five major subheadings. |
5 | 5 | ||
6 | o Slab allocation of small objects of unknown type (kmalloc) | 6 | o Slab allocation of small objects of unknown type (kmalloc) |
7 | o Slab allocation of small objects of known type | 7 | o Slab allocation of small objects of known type |
@@ -9,7 +9,7 @@ within the kernel. Broadly speaking there are four major subheadings. | |||
9 | o Per-CPU Allocator Activity | 9 | o Per-CPU Allocator Activity |
10 | o External Fragmentation | 10 | o External Fragmentation |
11 | 11 | ||
12 | This document will describe what each of the tracepoints are and why they | 12 | This document describes what each of the tracepoints is and why they |
13 | might be useful. | 13 | might be useful. |
14 | 14 | ||
15 | 1. Slab allocation of small objects of unknown type | 15 | 1. Slab allocation of small objects of unknown type |
@@ -34,7 +34,7 @@ kmem_cache_free call_site=%lx ptr=%p | |||
34 | These events are similar in usage to the kmalloc-related events except that | 34 | These events are similar in usage to the kmalloc-related events except that |
35 | it is likely easier to pin the event down to a specific cache. At the time | 35 | it is likely easier to pin the event down to a specific cache. At the time |
36 | of writing, no information is available on what slab is being allocated from, | 36 | of writing, no information is available on what slab is being allocated from, |
37 | but the call_site can usually be used to extrapolate that information | 37 | but the call_site can usually be used to extrapolate that information. |
38 | 38 | ||
39 | 3. Page allocation | 39 | 3. Page allocation |
40 | ================== | 40 | ================== |
@@ -80,9 +80,9 @@ event indicating whether it is for a percpu_refill or not. | |||
80 | When the per-CPU list is too full, a number of pages are freed, each one | 80 | When the per-CPU list is too full, a number of pages are freed, each one |
81 | which triggers a mm_page_pcpu_drain event. | 81 | which triggers a mm_page_pcpu_drain event. |
82 | 82 | ||
83 | The individual nature of the events are so that pages can be tracked | 83 | The individual nature of the events is so that pages can be tracked |
84 | between allocation and freeing. A number of drain or refill pages that occur | 84 | between allocation and freeing. A number of drain or refill pages that occur |
85 | consecutively imply the zone->lock being taken once. Large amounts of PCP | 85 | consecutively imply the zone->lock being taken once. Large amounts of per-CPU |
86 | refills and drains could imply an imbalance between CPUs where too much work | 86 | refills and drains could imply an imbalance between CPUs where too much work |
87 | is being concentrated in one place. It could also indicate that the per-CPU | 87 | is being concentrated in one place. It could also indicate that the per-CPU |
88 | lists should be a larger size. Finally, large amounts of refills on one CPU | 88 | lists should be a larger size. Finally, large amounts of refills on one CPU |
@@ -102,6 +102,6 @@ is important. | |||
102 | 102 | ||
103 | Large numbers of this event implies that memory is fragmenting and | 103 | Large numbers of this event implies that memory is fragmenting and |
104 | high-order allocations will start failing at some time in the future. One | 104 | high-order allocations will start failing at some time in the future. One |
105 | means of reducing the occurange of this event is to increase the size of | 105 | means of reducing the occurrence of this event is to increase the size of |
106 | min_free_kbytes in increments of 3*pageblock_size*nr_online_nodes where | 106 | min_free_kbytes in increments of 3*pageblock_size*nr_online_nodes where |
107 | pageblock_size is usually the size of the default hugepage size. | 107 | pageblock_size is usually the size of the default hugepage size. |
diff --git a/Documentation/usb/power-management.txt b/Documentation/usb/power-management.txt index ad642615ad4c..3bf6818c8cf5 100644 --- a/Documentation/usb/power-management.txt +++ b/Documentation/usb/power-management.txt | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | Alan Stern <stern@rowland.harvard.edu> | 3 | Alan Stern <stern@rowland.harvard.edu> |
4 | 4 | ||
5 | October 5, 2007 | 5 | November 10, 2009 |
6 | 6 | ||
7 | 7 | ||
8 | 8 | ||
@@ -71,12 +71,10 @@ being accessed through sysfs, then it definitely is idle. | |||
71 | Forms of dynamic PM | 71 | Forms of dynamic PM |
72 | ------------------- | 72 | ------------------- |
73 | 73 | ||
74 | Dynamic suspends can occur in two ways: manual and automatic. | 74 | Dynamic suspends occur when the kernel decides to suspend an idle |
75 | "Manual" means that the user has told the kernel to suspend a device, | 75 | device. This is called "autosuspend" for short. In general, a device |
76 | whereas "automatic" means that the kernel has decided all by itself to | 76 | won't be autosuspended unless it has been idle for some minimum period |
77 | suspend a device. Automatic suspend is called "autosuspend" for | 77 | of time, the so-called idle-delay time. |
78 | short. In general, a device won't be autosuspended unless it has been | ||
79 | idle for some minimum period of time, the so-called idle-delay time. | ||
80 | 78 | ||
81 | Of course, nothing the kernel does on its own initiative should | 79 | Of course, nothing the kernel does on its own initiative should |
82 | prevent the computer or its devices from working properly. If a | 80 | prevent the computer or its devices from working properly. If a |
@@ -96,10 +94,11 @@ idle. | |||
96 | We can categorize power management events in two broad classes: | 94 | We can categorize power management events in two broad classes: |
97 | external and internal. External events are those triggered by some | 95 | external and internal. External events are those triggered by some |
98 | agent outside the USB stack: system suspend/resume (triggered by | 96 | agent outside the USB stack: system suspend/resume (triggered by |
99 | userspace), manual dynamic suspend/resume (also triggered by | 97 | userspace), manual dynamic resume (also triggered by userspace), and |
100 | userspace), and remote wakeup (triggered by the device). Internal | 98 | remote wakeup (triggered by the device). Internal events are those |
101 | events are those triggered within the USB stack: autosuspend and | 99 | triggered within the USB stack: autosuspend and autoresume. Note that |
102 | autoresume. | 100 | all dynamic suspend events are internal; external agents are not |
101 | allowed to issue dynamic suspends. | ||
103 | 102 | ||
104 | 103 | ||
105 | The user interface for dynamic PM | 104 | The user interface for dynamic PM |
@@ -123,9 +122,9 @@ relevant attribute files are: wakeup, level, and autosuspend. | |||
123 | 122 | ||
124 | power/level | 123 | power/level |
125 | 124 | ||
126 | This file contains one of three words: "on", "auto", | 125 | This file contains one of two words: "on" or "auto". |
127 | or "suspend". You can write those words to the file | 126 | You can write those words to the file to change the |
128 | to change the device's setting. | 127 | device's setting. |
129 | 128 | ||
130 | "on" means that the device should be resumed and | 129 | "on" means that the device should be resumed and |
131 | autosuspend is not allowed. (Of course, system | 130 | autosuspend is not allowed. (Of course, system |
@@ -134,10 +133,10 @@ relevant attribute files are: wakeup, level, and autosuspend. | |||
134 | "auto" is the normal state in which the kernel is | 133 | "auto" is the normal state in which the kernel is |
135 | allowed to autosuspend and autoresume the device. | 134 | allowed to autosuspend and autoresume the device. |
136 | 135 | ||
137 | "suspend" means that the device should remain | 136 | (In kernels up to 2.6.32, you could also specify |
138 | suspended, and autoresume is not allowed. (But remote | 137 | "suspend", meaning that the device should remain |
139 | wakeup may still be allowed, since it is controlled | 138 | suspended and autoresume was not allowed. This |
140 | separately by the power/wakeup attribute.) | 139 | setting is no longer supported.) |
141 | 140 | ||
142 | power/autosuspend | 141 | power/autosuspend |
143 | 142 | ||
@@ -145,9 +144,9 @@ relevant attribute files are: wakeup, level, and autosuspend. | |||
145 | number of seconds the device should remain idle before | 144 | number of seconds the device should remain idle before |
146 | the kernel will autosuspend it (the idle-delay time). | 145 | the kernel will autosuspend it (the idle-delay time). |
147 | The default is 2. 0 means to autosuspend as soon as | 146 | The default is 2. 0 means to autosuspend as soon as |
148 | the device becomes idle, and -1 means never to | 147 | the device becomes idle, and negative values mean |
149 | autosuspend. You can write a number to the file to | 148 | never to autosuspend. You can write a number to the |
150 | change the autosuspend idle-delay time. | 149 | file to change the autosuspend idle-delay time. |
151 | 150 | ||
152 | Writing "-1" to power/autosuspend and writing "on" to power/level do | 151 | Writing "-1" to power/autosuspend and writing "on" to power/level do |
153 | essentially the same thing -- they both prevent the device from being | 152 | essentially the same thing -- they both prevent the device from being |
@@ -313,13 +312,14 @@ three of the methods listed above. In addition, a driver indicates | |||
313 | that it supports autosuspend by setting the .supports_autosuspend flag | 312 | that it supports autosuspend by setting the .supports_autosuspend flag |
314 | in its usb_driver structure. It is then responsible for informing the | 313 | in its usb_driver structure. It is then responsible for informing the |
315 | USB core whenever one of its interfaces becomes busy or idle. The | 314 | USB core whenever one of its interfaces becomes busy or idle. The |
316 | driver does so by calling these five functions: | 315 | driver does so by calling these six functions: |
317 | 316 | ||
318 | int usb_autopm_get_interface(struct usb_interface *intf); | 317 | int usb_autopm_get_interface(struct usb_interface *intf); |
319 | void usb_autopm_put_interface(struct usb_interface *intf); | 318 | void usb_autopm_put_interface(struct usb_interface *intf); |
320 | int usb_autopm_set_interface(struct usb_interface *intf); | ||
321 | int usb_autopm_get_interface_async(struct usb_interface *intf); | 319 | int usb_autopm_get_interface_async(struct usb_interface *intf); |
322 | void usb_autopm_put_interface_async(struct usb_interface *intf); | 320 | void usb_autopm_put_interface_async(struct usb_interface *intf); |
321 | void usb_autopm_get_interface_no_resume(struct usb_interface *intf); | ||
322 | void usb_autopm_put_interface_no_suspend(struct usb_interface *intf); | ||
323 | 323 | ||
324 | The functions work by maintaining a counter in the usb_interface | 324 | The functions work by maintaining a counter in the usb_interface |
325 | structure. When intf->pm_usage_count is > 0 then the interface is | 325 | structure. When intf->pm_usage_count is > 0 then the interface is |
@@ -331,11 +331,13 @@ considered to be idle, and the kernel may autosuspend the device. | |||
331 | associated with the device itself rather than any of its interfaces. | 331 | associated with the device itself rather than any of its interfaces. |
332 | This field is used only by the USB core.) | 332 | This field is used only by the USB core.) |
333 | 333 | ||
334 | The driver owns intf->pm_usage_count; it can modify the value however | 334 | Drivers must not modify intf->pm_usage_count directly; its value |
335 | and whenever it likes. A nice aspect of the non-async usb_autopm_* | 335 | should be changed only be using the functions listed above. Drivers |
336 | routines is that the changes they make are protected by the usb_device | 336 | are responsible for insuring that the overall change to pm_usage_count |
337 | structure's PM mutex (udev->pm_mutex); however drivers may change | 337 | during their lifetime balances out to 0 (it may be necessary for the |
338 | pm_usage_count without holding the mutex. Drivers using the async | 338 | disconnect method to call usb_autopm_put_interface() one or more times |
339 | to fulfill this requirement). The first two routines use the PM mutex | ||
340 | in struct usb_device for mutual exclusion; drivers using the async | ||
339 | routines are responsible for their own synchronization and mutual | 341 | routines are responsible for their own synchronization and mutual |
340 | exclusion. | 342 | exclusion. |
341 | 343 | ||
@@ -347,11 +349,6 @@ exclusion. | |||
347 | attempts an autosuspend if the new value is <= 0 and the | 349 | attempts an autosuspend if the new value is <= 0 and the |
348 | device isn't suspended. | 350 | device isn't suspended. |
349 | 351 | ||
350 | usb_autopm_set_interface() leaves pm_usage_count alone. | ||
351 | It attempts an autoresume if the value is > 0 and the device | ||
352 | is suspended, and it attempts an autosuspend if the value is | ||
353 | <= 0 and the device isn't suspended. | ||
354 | |||
355 | usb_autopm_get_interface_async() and | 352 | usb_autopm_get_interface_async() and |
356 | usb_autopm_put_interface_async() do almost the same things as | 353 | usb_autopm_put_interface_async() do almost the same things as |
357 | their non-async counterparts. The differences are: they do | 354 | their non-async counterparts. The differences are: they do |
@@ -360,13 +357,11 @@ exclusion. | |||
360 | such as an URB's completion handler, but when they return the | 357 | such as an URB's completion handler, but when they return the |
361 | device will not generally not yet be in the desired state. | 358 | device will not generally not yet be in the desired state. |
362 | 359 | ||
363 | There also are a couple of utility routines drivers can use: | 360 | usb_autopm_get_interface_no_resume() and |
364 | 361 | usb_autopm_put_interface_no_suspend() merely increment or | |
365 | usb_autopm_enable() sets pm_usage_cnt to 0 and then calls | 362 | decrement the pm_usage_count value; they do not attempt to |
366 | usb_autopm_set_interface(), which will attempt an autosuspend. | 363 | carry out an autoresume or an autosuspend. Hence they can be |
367 | 364 | called in an atomic context. | |
368 | usb_autopm_disable() sets pm_usage_cnt to 1 and then calls | ||
369 | usb_autopm_set_interface(), which will attempt an autoresume. | ||
370 | 365 | ||
371 | The conventional usage pattern is that a driver calls | 366 | The conventional usage pattern is that a driver calls |
372 | usb_autopm_get_interface() in its open routine and | 367 | usb_autopm_get_interface() in its open routine and |
@@ -381,9 +376,9 @@ the device hasn't been idle for long enough, a delayed workqueue | |||
381 | routine is automatically set up to carry out the operation when the | 376 | routine is automatically set up to carry out the operation when the |
382 | autosuspend idle-delay has expired. | 377 | autosuspend idle-delay has expired. |
383 | 378 | ||
384 | Autoresume attempts also can fail. This will happen if power/level is | 379 | Autoresume attempts also can fail, although failure would mean that |
385 | set to "suspend" or if the device doesn't manage to resume properly. | 380 | the device is no longer present or operating properly. Unlike |
386 | Unlike autosuspend, there's no delay for an autoresume. | 381 | autosuspend, there's no delay for an autoresume. |
387 | 382 | ||
388 | 383 | ||
389 | Other parts of the driver interface | 384 | Other parts of the driver interface |
@@ -400,11 +395,11 @@ though, setting this flag won't cause the kernel to autoresume it. | |||
400 | Normally a driver would set this flag in its probe method, at which | 395 | Normally a driver would set this flag in its probe method, at which |
401 | time the device is guaranteed not to be autosuspended.) | 396 | time the device is guaranteed not to be autosuspended.) |
402 | 397 | ||
403 | The usb_autopm_* routines have to run in a sleepable process context; | 398 | The synchronous usb_autopm_* routines have to run in a sleepable |
404 | they must not be called from an interrupt handler or while holding a | 399 | process context; they must not be called from an interrupt handler or |
405 | spinlock. In fact, the entire autosuspend mechanism is not well geared | 400 | while holding a spinlock. In fact, the entire autosuspend mechanism |
406 | toward interrupt-driven operation. However there is one thing a | 401 | is not well geared toward interrupt-driven operation. However there |
407 | driver can do in an interrupt handler: | 402 | is one thing a driver can do in an interrupt handler: |
408 | 403 | ||
409 | usb_mark_last_busy(struct usb_device *udev); | 404 | usb_mark_last_busy(struct usb_device *udev); |
410 | 405 | ||
@@ -423,15 +418,16 @@ an URB had completed too recently. | |||
423 | 418 | ||
424 | External suspend calls should never be allowed to fail in this way, | 419 | External suspend calls should never be allowed to fail in this way, |
425 | only autosuspend calls. The driver can tell them apart by checking | 420 | only autosuspend calls. The driver can tell them apart by checking |
426 | udev->auto_pm; this flag will be set to 1 for internal PM events | 421 | the PM_EVENT_AUTO bit in the message.event argument to the suspend |
427 | (autosuspend or autoresume) and 0 for external PM events. | 422 | method; this bit will be set for internal PM events (autosuspend) and |
423 | clear for external PM events. | ||
428 | 424 | ||
429 | Many of the ingredients in the autosuspend framework are oriented | 425 | Many of the ingredients in the autosuspend framework are oriented |
430 | towards interfaces: The usb_interface structure contains the | 426 | towards interfaces: The usb_interface structure contains the |
431 | pm_usage_cnt field, and the usb_autopm_* routines take an interface | 427 | pm_usage_cnt field, and the usb_autopm_* routines take an interface |
432 | pointer as their argument. But somewhat confusingly, a few of the | 428 | pointer as their argument. But somewhat confusingly, a few of the |
433 | pieces (usb_mark_last_busy() and udev->auto_pm) use the usb_device | 429 | pieces (i.e., usb_mark_last_busy()) use the usb_device structure |
434 | structure instead. Drivers need to keep this straight; they can call | 430 | instead. Drivers need to keep this straight; they can call |
435 | interface_to_usbdev() to find the device structure for a given | 431 | interface_to_usbdev() to find the device structure for a given |
436 | interface. | 432 | interface. |
437 | 433 | ||
@@ -530,13 +526,3 @@ succeed, it may still remain active and thus cause the system to | |||
530 | resume as soon as the system suspend is complete. Or the remote | 526 | resume as soon as the system suspend is complete. Or the remote |
531 | wakeup may fail and get lost. Which outcome occurs depends on timing | 527 | wakeup may fail and get lost. Which outcome occurs depends on timing |
532 | and on the hardware and firmware design. | 528 | and on the hardware and firmware design. |
533 | |||
534 | More interestingly, a device might undergo a manual resume or | ||
535 | autoresume during system suspend. With current kernels this shouldn't | ||
536 | happen, because manual resumes must be initiated by userspace and | ||
537 | autoresumes happen in response to I/O requests, but all user processes | ||
538 | and I/O should be quiescent during a system suspend -- thanks to the | ||
539 | freezer. However there are plans to do away with the freezer, which | ||
540 | would mean these things would become possible. If and when this comes | ||
541 | about, the USB core will carefully arrange matters so that either type | ||
542 | of resume will block until the entire system has resumed. | ||
diff --git a/Documentation/video4linux/CARDLIST.cx23885 b/Documentation/video4linux/CARDLIST.cx23885 index 5f33d8486102..7539e8fa1ffd 100644 --- a/Documentation/video4linux/CARDLIST.cx23885 +++ b/Documentation/video4linux/CARDLIST.cx23885 | |||
@@ -24,3 +24,5 @@ | |||
24 | 23 -> Magic-Pro ProHDTV Extreme 2 [14f1:8657] | 24 | 23 -> Magic-Pro ProHDTV Extreme 2 [14f1:8657] |
25 | 24 -> Hauppauge WinTV-HVR1850 [0070:8541] | 25 | 24 -> Hauppauge WinTV-HVR1850 [0070:8541] |
26 | 25 -> Compro VideoMate E800 [1858:e800] | 26 | 25 -> Compro VideoMate E800 [1858:e800] |
27 | 26 -> Hauppauge WinTV-HVR1290 [0070:8551] | ||
28 | 27 -> Mygica X8558 PRO DMB-TH [14f1:8578] | ||
diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88 index 3385f8b094a5..7ec3c4e4b60f 100644 --- a/Documentation/video4linux/CARDLIST.cx88 +++ b/Documentation/video4linux/CARDLIST.cx88 | |||
@@ -81,3 +81,4 @@ | |||
81 | 80 -> Hauppauge WinTV-IR Only [0070:9290] | 81 | 80 -> Hauppauge WinTV-IR Only [0070:9290] |
82 | 81 -> Leadtek WinFast DTV1800 Hybrid [107d:6654] | 82 | 81 -> Leadtek WinFast DTV1800 Hybrid [107d:6654] |
83 | 82 -> WinFast DTV2000 H rev. J [107d:6f2b] | 83 | 82 -> WinFast DTV2000 H rev. J [107d:6f2b] |
84 | 83 -> Prof 7301 DVB-S/S2 [b034:3034] | ||
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx index b8afef4c0e01..0c166ff003a0 100644 --- a/Documentation/video4linux/CARDLIST.em28xx +++ b/Documentation/video4linux/CARDLIST.em28xx | |||
@@ -1,5 +1,5 @@ | |||
1 | 0 -> Unknown EM2800 video grabber (em2800) [eb1a:2800] | 1 | 0 -> Unknown EM2800 video grabber (em2800) [eb1a:2800] |
2 | 1 -> Unknown EM2750/28xx video grabber (em2820/em2840) [eb1a:2710,eb1a:2820,eb1a:2821,eb1a:2860,eb1a:2861,eb1a:2870,eb1a:2881,eb1a:2883,eb1a:2868] | 2 | 1 -> Unknown EM2750/28xx video grabber (em2820/em2840) [eb1a:2710,eb1a:2820,eb1a:2821,eb1a:2860,eb1a:2861,eb1a:2862,eb1a:2870,eb1a:2881,eb1a:2883,eb1a:2868] |
3 | 2 -> Terratec Cinergy 250 USB (em2820/em2840) [0ccd:0036] | 3 | 2 -> Terratec Cinergy 250 USB (em2820/em2840) [0ccd:0036] |
4 | 3 -> Pinnacle PCTV USB 2 (em2820/em2840) [2304:0208] | 4 | 3 -> Pinnacle PCTV USB 2 (em2820/em2840) [2304:0208] |
5 | 4 -> Hauppauge WinTV USB 2 (em2820/em2840) [2040:4200,2040:4201] | 5 | 4 -> Hauppauge WinTV USB 2 (em2820/em2840) [2040:4200,2040:4201] |
@@ -69,3 +69,4 @@ | |||
69 | 71 -> Silvercrest Webcam 1.3mpix (em2820/em2840) | 69 | 71 -> Silvercrest Webcam 1.3mpix (em2820/em2840) |
70 | 72 -> Gadmei UTV330+ (em2861) | 70 | 72 -> Gadmei UTV330+ (em2861) |
71 | 73 -> Reddo DVB-C USB TV Box (em2870) | 71 | 73 -> Reddo DVB-C USB TV Box (em2870) |
72 | 74 -> Actionmaster/LinXcel/Digitus VC211A (em2800) | ||
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134 index 2620d60341ee..fce1e7eb0474 100644 --- a/Documentation/video4linux/CARDLIST.saa7134 +++ b/Documentation/video4linux/CARDLIST.saa7134 | |||
@@ -172,3 +172,5 @@ | |||
172 | 171 -> Beholder BeholdTV X7 [5ace:7595] | 172 | 171 -> Beholder BeholdTV X7 [5ace:7595] |
173 | 172 -> RoverMedia TV Link Pro FM [19d1:0138] | 173 | 172 -> RoverMedia TV Link Pro FM [19d1:0138] |
174 | 173 -> Zolid Hybrid TV Tuner PCI [1131:2004] | 174 | 173 -> Zolid Hybrid TV Tuner PCI [1131:2004] |
175 | 174 -> Asus Europa Hybrid OEM [1043:4847] | ||
176 | 175 -> Leadtek Winfast DTV1000S [107d:6655] | ||
diff --git a/Documentation/video4linux/gspca.txt b/Documentation/video4linux/gspca.txt index 3f61825be499..1800a62cf135 100644 --- a/Documentation/video4linux/gspca.txt +++ b/Documentation/video4linux/gspca.txt | |||
@@ -6,11 +6,13 @@ The modules are: | |||
6 | 6 | ||
7 | xxxx vend:prod | 7 | xxxx vend:prod |
8 | ---- | 8 | ---- |
9 | spca501 0000:0000 MystFromOri Unknow Camera | 9 | spca501 0000:0000 MystFromOri Unknown Camera |
10 | spca508 0130:0130 Clone Digital Webcam 11043 | ||
10 | m5602 0402:5602 ALi Video Camera Controller | 11 | m5602 0402:5602 ALi Video Camera Controller |
11 | spca501 040a:0002 Kodak DVC-325 | 12 | spca501 040a:0002 Kodak DVC-325 |
12 | spca500 040a:0300 Kodak EZ200 | 13 | spca500 040a:0300 Kodak EZ200 |
13 | zc3xx 041e:041e Creative WebCam Live! | 14 | zc3xx 041e:041e Creative WebCam Live! |
15 | ov519 041e:4003 Video Blaster WebCam Go Plus | ||
14 | spca500 041e:400a Creative PC-CAM 300 | 16 | spca500 041e:400a Creative PC-CAM 300 |
15 | sunplus 041e:400b Creative PC-CAM 600 | 17 | sunplus 041e:400b Creative PC-CAM 600 |
16 | sunplus 041e:4012 PC-Cam350 | 18 | sunplus 041e:4012 PC-Cam350 |
@@ -37,6 +39,7 @@ ov519 041e:405f Creative Live! VISTA VF0330 | |||
37 | ov519 041e:4060 Creative Live! VISTA VF0350 | 39 | ov519 041e:4060 Creative Live! VISTA VF0350 |
38 | ov519 041e:4061 Creative Live! VISTA VF0400 | 40 | ov519 041e:4061 Creative Live! VISTA VF0400 |
39 | ov519 041e:4064 Creative Live! VISTA VF0420 | 41 | ov519 041e:4064 Creative Live! VISTA VF0420 |
42 | ov519 041e:4067 Creative Live! Cam Video IM (VF0350) | ||
40 | ov519 041e:4068 Creative Live! VISTA VF0470 | 43 | ov519 041e:4068 Creative Live! VISTA VF0470 |
41 | spca561 0458:7004 Genius VideoCAM Express V2 | 44 | spca561 0458:7004 Genius VideoCAM Express V2 |
42 | sunplus 0458:7006 Genius Dsc 1.3 Smart | 45 | sunplus 0458:7006 Genius Dsc 1.3 Smart |
@@ -68,12 +71,12 @@ zc3xx 046d:08a3 Logitech QC Chat | |||
68 | zc3xx 046d:08a6 Logitech QCim | 71 | zc3xx 046d:08a6 Logitech QCim |
69 | zc3xx 046d:08a7 Logitech QuickCam Image | 72 | zc3xx 046d:08a7 Logitech QuickCam Image |
70 | zc3xx 046d:08a9 Logitech Notebook Deluxe | 73 | zc3xx 046d:08a9 Logitech Notebook Deluxe |
71 | zc3xx 046d:08aa Labtec Webcam Notebook | 74 | zc3xx 046d:08aa Labtec Webcam Notebook |
72 | zc3xx 046d:08ac Logitech QuickCam Cool | 75 | zc3xx 046d:08ac Logitech QuickCam Cool |
73 | zc3xx 046d:08ad Logitech QCCommunicate STX | 76 | zc3xx 046d:08ad Logitech QCCommunicate STX |
74 | zc3xx 046d:08ae Logitech QuickCam for Notebooks | 77 | zc3xx 046d:08ae Logitech QuickCam for Notebooks |
75 | zc3xx 046d:08af Logitech QuickCam Cool | 78 | zc3xx 046d:08af Logitech QuickCam Cool |
76 | zc3xx 046d:08b9 Logitech QC IM ??? | 79 | zc3xx 046d:08b9 Logitech QuickCam Express |
77 | zc3xx 046d:08d7 Logitech QCam STX | 80 | zc3xx 046d:08d7 Logitech QCam STX |
78 | zc3xx 046d:08d9 Logitech QuickCam IM/Connect | 81 | zc3xx 046d:08d9 Logitech QuickCam IM/Connect |
79 | zc3xx 046d:08d8 Logitech Notebook Deluxe | 82 | zc3xx 046d:08d8 Logitech Notebook Deluxe |
@@ -82,7 +85,7 @@ zc3xx 046d:08dd Logitech QuickCam for Notebooks | |||
82 | spca500 046d:0900 Logitech Inc. ClickSmart 310 | 85 | spca500 046d:0900 Logitech Inc. ClickSmart 310 |
83 | spca500 046d:0901 Logitech Inc. ClickSmart 510 | 86 | spca500 046d:0901 Logitech Inc. ClickSmart 510 |
84 | sunplus 046d:0905 Logitech ClickSmart 820 | 87 | sunplus 046d:0905 Logitech ClickSmart 820 |
85 | tv8532 046d:0920 QC Express | 88 | tv8532 046d:0920 Logitech QuickCam Express |
86 | tv8532 046d:0921 Labtec Webcam | 89 | tv8532 046d:0921 Labtec Webcam |
87 | spca561 046d:0928 Logitech QC Express Etch2 | 90 | spca561 046d:0928 Logitech QC Express Etch2 |
88 | spca561 046d:0929 Labtec Webcam Elch2 | 91 | spca561 046d:0929 Labtec Webcam Elch2 |
@@ -91,7 +94,7 @@ spca561 046d:092b Labtec Webcam Plus | |||
91 | spca561 046d:092c Logitech QC chat Elch2 | 94 | spca561 046d:092c Logitech QC chat Elch2 |
92 | spca561 046d:092d Logitech QC Elch2 | 95 | spca561 046d:092d Logitech QC Elch2 |
93 | spca561 046d:092e Logitech QC Elch2 | 96 | spca561 046d:092e Logitech QC Elch2 |
94 | spca561 046d:092f Logitech QuickCam Express Plus | 97 | spca561 046d:092f Logitech QuickCam Express Plus |
95 | sunplus 046d:0960 Logitech ClickSmart 420 | 98 | sunplus 046d:0960 Logitech ClickSmart 420 |
96 | sunplus 0471:0322 Philips DMVC1300K | 99 | sunplus 0471:0322 Philips DMVC1300K |
97 | zc3xx 0471:0325 Philips SPC 200 NC | 100 | zc3xx 0471:0325 Philips SPC 200 NC |
@@ -166,10 +169,14 @@ sunplus 055f:c650 Mustek MDC5500Z | |||
166 | zc3xx 055f:d003 Mustek WCam300A | 169 | zc3xx 055f:d003 Mustek WCam300A |
167 | zc3xx 055f:d004 Mustek WCam300 AN | 170 | zc3xx 055f:d004 Mustek WCam300 AN |
168 | conex 0572:0041 Creative Notebook cx11646 | 171 | conex 0572:0041 Creative Notebook cx11646 |
172 | ov519 05a9:0511 Video Blaster WebCam 3/WebCam Plus, D-Link USB Digital Video Camera | ||
173 | ov519 05a9:0518 Creative WebCam | ||
169 | ov519 05a9:0519 OV519 Microphone | 174 | ov519 05a9:0519 OV519 Microphone |
170 | ov519 05a9:0530 OmniVision | 175 | ov519 05a9:0530 OmniVision |
176 | ov519 05a9:2800 OmniVision SuperCAM | ||
171 | ov519 05a9:4519 Webcam Classic | 177 | ov519 05a9:4519 Webcam Classic |
172 | ov519 05a9:8519 OmniVision | 178 | ov519 05a9:8519 OmniVision |
179 | ov519 05a9:a511 D-Link USB Digital Video Camera | ||
173 | ov519 05a9:a518 D-Link DSB-C310 Webcam | 180 | ov519 05a9:a518 D-Link DSB-C310 Webcam |
174 | sunplus 05da:1018 Digital Dream Enigma 1.3 | 181 | sunplus 05da:1018 Digital Dream Enigma 1.3 |
175 | stk014 05e1:0893 Syntek DV4000 | 182 | stk014 05e1:0893 Syntek DV4000 |
@@ -185,9 +192,8 @@ ov534 06f8:3002 Hercules Blog Webcam | |||
185 | ov534 06f8:3003 Hercules Dualpix HD Weblog | 192 | ov534 06f8:3003 Hercules Dualpix HD Weblog |
186 | sonixj 06f8:3004 Hercules Classic Silver | 193 | sonixj 06f8:3004 Hercules Classic Silver |
187 | sonixj 06f8:3008 Hercules Deluxe Optical Glass | 194 | sonixj 06f8:3008 Hercules Deluxe Optical Glass |
188 | pac7311 06f8:3009 Hercules Classic Link | 195 | pac7302 06f8:3009 Hercules Classic Link |
189 | spca508 0733:0110 ViewQuest VQ110 | 196 | spca508 0733:0110 ViewQuest VQ110 |
190 | spca508 0130:0130 Clone Digital Webcam 11043 | ||
191 | spca501 0733:0401 Intel Create and Share | 197 | spca501 0733:0401 Intel Create and Share |
192 | spca501 0733:0402 ViewQuest M318B | 198 | spca501 0733:0402 ViewQuest M318B |
193 | spca505 0733:0430 Intel PC Camera Pro | 199 | spca505 0733:0430 Intel PC Camera Pro |
@@ -198,10 +204,12 @@ sunplus 0733:2221 Mercury Digital Pro 3.1p | |||
198 | sunplus 0733:3261 Concord 3045 spca536a | 204 | sunplus 0733:3261 Concord 3045 spca536a |
199 | sunplus 0733:3281 Cyberpix S550V | 205 | sunplus 0733:3281 Cyberpix S550V |
200 | spca506 0734:043b 3DeMon USB Capture aka | 206 | spca506 0734:043b 3DeMon USB Capture aka |
207 | ov519 0813:0002 Dual Mode USB Camera Plus | ||
201 | spca500 084d:0003 D-Link DSC-350 | 208 | spca500 084d:0003 D-Link DSC-350 |
202 | spca500 08ca:0103 Aiptek PocketDV | 209 | spca500 08ca:0103 Aiptek PocketDV |
203 | sunplus 08ca:0104 Aiptek PocketDVII 1.3 | 210 | sunplus 08ca:0104 Aiptek PocketDVII 1.3 |
204 | sunplus 08ca:0106 Aiptek Pocket DV3100+ | 211 | sunplus 08ca:0106 Aiptek Pocket DV3100+ |
212 | mr97310a 08ca:0110 Trust Spyc@m 100 | ||
205 | mr97310a 08ca:0111 Aiptek PenCam VGA+ | 213 | mr97310a 08ca:0111 Aiptek PenCam VGA+ |
206 | sunplus 08ca:2008 Aiptek Mini PenCam 2 M | 214 | sunplus 08ca:2008 Aiptek Mini PenCam 2 M |
207 | sunplus 08ca:2010 Aiptek PocketCam 3M | 215 | sunplus 08ca:2010 Aiptek PocketCam 3M |
@@ -222,7 +230,7 @@ pac207 093a:2460 Qtec Webcam 100 | |||
222 | pac207 093a:2461 HP Webcam | 230 | pac207 093a:2461 HP Webcam |
223 | pac207 093a:2463 Philips SPC 220 NC | 231 | pac207 093a:2463 Philips SPC 220 NC |
224 | pac207 093a:2464 Labtec Webcam 1200 | 232 | pac207 093a:2464 Labtec Webcam 1200 |
225 | pac207 093a:2468 PAC207 | 233 | pac207 093a:2468 Webcam WB-1400T |
226 | pac207 093a:2470 Genius GF112 | 234 | pac207 093a:2470 Genius GF112 |
227 | pac207 093a:2471 Genius VideoCam ge111 | 235 | pac207 093a:2471 Genius VideoCam ge111 |
228 | pac207 093a:2472 Genius VideoCam ge110 | 236 | pac207 093a:2472 Genius VideoCam ge110 |
@@ -230,18 +238,19 @@ pac207 093a:2474 Genius iLook 111 | |||
230 | pac207 093a:2476 Genius e-Messenger 112 | 238 | pac207 093a:2476 Genius e-Messenger 112 |
231 | pac7311 093a:2600 PAC7311 Typhoon | 239 | pac7311 093a:2600 PAC7311 Typhoon |
232 | pac7311 093a:2601 Philips SPC 610 NC | 240 | pac7311 093a:2601 Philips SPC 610 NC |
233 | pac7311 093a:2603 PAC7312 | 241 | pac7311 093a:2603 Philips SPC 500 NC |
234 | pac7311 093a:2608 Trust WB-3300p | 242 | pac7311 093a:2608 Trust WB-3300p |
235 | pac7311 093a:260e Gigaware VGA PC Camera, Trust WB-3350p, SIGMA cam 2350 | 243 | pac7311 093a:260e Gigaware VGA PC Camera, Trust WB-3350p, SIGMA cam 2350 |
236 | pac7311 093a:260f SnakeCam | 244 | pac7311 093a:260f SnakeCam |
237 | pac7311 093a:2620 Apollo AC-905 | 245 | pac7302 093a:2620 Apollo AC-905 |
238 | pac7311 093a:2621 PAC731x | 246 | pac7302 093a:2621 PAC731x |
239 | pac7311 093a:2622 Genius Eye 312 | 247 | pac7302 093a:2622 Genius Eye 312 |
240 | pac7311 093a:2624 PAC7302 | 248 | pac7302 093a:2624 PAC7302 |
241 | pac7311 093a:2626 Labtec 2200 | 249 | pac7302 093a:2626 Labtec 2200 |
242 | pac7311 093a:2629 Genious iSlim 300 | 250 | pac7302 093a:2628 Genius iLook 300 |
243 | pac7311 093a:262a Webcam 300k | 251 | pac7302 093a:2629 Genious iSlim 300 |
244 | pac7311 093a:262c Philips SPC 230 NC | 252 | pac7302 093a:262a Webcam 300k |
253 | pac7302 093a:262c Philips SPC 230 NC | ||
245 | jeilinj 0979:0280 Sakar 57379 | 254 | jeilinj 0979:0280 Sakar 57379 |
246 | zc3xx 0ac8:0302 Z-star Vimicro zc0302 | 255 | zc3xx 0ac8:0302 Z-star Vimicro zc0302 |
247 | vc032x 0ac8:0321 Vimicro generic vc0321 | 256 | vc032x 0ac8:0321 Vimicro generic vc0321 |
@@ -250,12 +259,13 @@ vc032x 0ac8:0328 A4Tech PK-130MG | |||
250 | zc3xx 0ac8:301b Z-Star zc301b | 259 | zc3xx 0ac8:301b Z-Star zc301b |
251 | zc3xx 0ac8:303b Vimicro 0x303b | 260 | zc3xx 0ac8:303b Vimicro 0x303b |
252 | zc3xx 0ac8:305b Z-star Vimicro zc0305b | 261 | zc3xx 0ac8:305b Z-star Vimicro zc0305b |
253 | zc3xx 0ac8:307b Ldlc VC302+Ov7620 | 262 | zc3xx 0ac8:307b PC Camera (ZS0211) |
254 | vc032x 0ac8:c001 Sony embedded vimicro | 263 | vc032x 0ac8:c001 Sony embedded vimicro |
255 | vc032x 0ac8:c002 Sony embedded vimicro | 264 | vc032x 0ac8:c002 Sony embedded vimicro |
256 | vc032x 0ac8:c301 Samsung Q1 Ultra Premium | 265 | vc032x 0ac8:c301 Samsung Q1 Ultra Premium |
257 | spca508 0af9:0010 Hama USB Sightcam 100 | 266 | spca508 0af9:0010 Hama USB Sightcam 100 |
258 | spca508 0af9:0011 Hama USB Sightcam 100 | 267 | spca508 0af9:0011 Hama USB Sightcam 100 |
268 | ov519 0b62:0059 iBOT2 Webcam | ||
259 | sonixb 0c45:6001 Genius VideoCAM NB | 269 | sonixb 0c45:6001 Genius VideoCAM NB |
260 | sonixb 0c45:6005 Microdia Sweex Mini Webcam | 270 | sonixb 0c45:6005 Microdia Sweex Mini Webcam |
261 | sonixb 0c45:6007 Sonix sn9c101 + Tas5110D | 271 | sonixb 0c45:6007 Sonix sn9c101 + Tas5110D |
@@ -315,8 +325,10 @@ sn9c20x 0c45:62b3 PC Camera (SN9C202 + OV9655) | |||
315 | sn9c20x 0c45:62bb PC Camera (SN9C202 + OV7660) | 325 | sn9c20x 0c45:62bb PC Camera (SN9C202 + OV7660) |
316 | sn9c20x 0c45:62bc PC Camera (SN9C202 + HV7131R) | 326 | sn9c20x 0c45:62bc PC Camera (SN9C202 + HV7131R) |
317 | sunplus 0d64:0303 Sunplus FashionCam DXG | 327 | sunplus 0d64:0303 Sunplus FashionCam DXG |
328 | ov519 0e96:c001 TRUST 380 USB2 SPACEC@M | ||
318 | etoms 102c:6151 Qcam Sangha CIF | 329 | etoms 102c:6151 Qcam Sangha CIF |
319 | etoms 102c:6251 Qcam xxxxxx VGA | 330 | etoms 102c:6251 Qcam xxxxxx VGA |
331 | ov519 1046:9967 W9967CF/W9968CF WebCam IC, Video Blaster WebCam Go | ||
320 | zc3xx 10fd:0128 Typhoon Webshot II USB 300k 0x0128 | 332 | zc3xx 10fd:0128 Typhoon Webshot II USB 300k 0x0128 |
321 | spca561 10fd:7e50 FlyCam Usb 100 | 333 | spca561 10fd:7e50 FlyCam Usb 100 |
322 | zc3xx 10fd:8050 Typhoon Webshot II USB 300k | 334 | zc3xx 10fd:8050 Typhoon Webshot II USB 300k |
@@ -329,7 +341,12 @@ spca501 1776:501c Arowana 300K CMOS Camera | |||
329 | t613 17a1:0128 TASCORP JPEG Webcam, NGS Cyclops | 341 | t613 17a1:0128 TASCORP JPEG Webcam, NGS Cyclops |
330 | vc032x 17ef:4802 Lenovo Vc0323+MI1310_SOC | 342 | vc032x 17ef:4802 Lenovo Vc0323+MI1310_SOC |
331 | pac207 2001:f115 D-Link DSB-C120 | 343 | pac207 2001:f115 D-Link DSB-C120 |
344 | sq905c 2770:9050 sq905c | ||
345 | sq905c 2770:905c DualCamera | ||
346 | sq905 2770:9120 Argus Digital Camera DC1512 | ||
347 | sq905c 2770:913d sq905c | ||
332 | spca500 2899:012c Toptro Industrial | 348 | spca500 2899:012c Toptro Industrial |
349 | ov519 8020:ef04 ov519 | ||
333 | spca508 8086:0110 Intel Easy PC Camera | 350 | spca508 8086:0110 Intel Easy PC Camera |
334 | spca500 8086:0630 Intel Pocket PC Camera | 351 | spca500 8086:0630 Intel Pocket PC Camera |
335 | spca506 99fa:8988 Grandtec V.cap | 352 | spca506 99fa:8988 Grandtec V.cap |
diff --git a/Documentation/video4linux/sh_mobile_ceu_camera.txt b/Documentation/video4linux/sh_mobile_ceu_camera.txt new file mode 100644 index 000000000000..2ae16349a78d --- /dev/null +++ b/Documentation/video4linux/sh_mobile_ceu_camera.txt | |||
@@ -0,0 +1,157 @@ | |||
1 | Cropping and Scaling algorithm, used in the sh_mobile_ceu_camera driver | ||
2 | ======================================================================= | ||
3 | |||
4 | Terminology | ||
5 | ----------- | ||
6 | |||
7 | sensor scales: horizontal and vertical scales, configured by the sensor driver | ||
8 | host scales: -"- host driver | ||
9 | combined scales: sensor_scale * host_scale | ||
10 | |||
11 | |||
12 | Generic scaling / cropping scheme | ||
13 | --------------------------------- | ||
14 | |||
15 | -1-- | ||
16 | | | ||
17 | -2-- -\ | ||
18 | | --\ | ||
19 | | --\ | ||
20 | +-5-- -\ -- -3-- | ||
21 | | ---\ | ||
22 | | --- -4-- -\ | ||
23 | | -\ | ||
24 | | - -6-- | ||
25 | | | ||
26 | | - -6'- | ||
27 | | -/ | ||
28 | | --- -4'- -/ | ||
29 | | ---/ | ||
30 | +-5'- -/ | ||
31 | | -- -3'- | ||
32 | | --/ | ||
33 | | --/ | ||
34 | -2'- -/ | ||
35 | | | ||
36 | | | ||
37 | -1'- | ||
38 | |||
39 | Produced by user requests: | ||
40 | |||
41 | S_CROP(left / top = (5) - (1), width / height = (5') - (5)) | ||
42 | S_FMT(width / height = (6') - (6)) | ||
43 | |||
44 | Here: | ||
45 | |||
46 | (1) to (1') - whole max width or height | ||
47 | (1) to (2) - sensor cropped left or top | ||
48 | (2) to (2') - sensor cropped width or height | ||
49 | (3) to (3') - sensor scale | ||
50 | (3) to (4) - CEU cropped left or top | ||
51 | (4) to (4') - CEU cropped width or height | ||
52 | (5) to (5') - reverse sensor scale applied to CEU cropped width or height | ||
53 | (2) to (5) - reverse sensor scale applied to CEU cropped left or top | ||
54 | (6) to (6') - CEU scale - user window | ||
55 | |||
56 | |||
57 | S_FMT | ||
58 | ----- | ||
59 | |||
60 | Do not touch input rectangle - it is already optimal. | ||
61 | |||
62 | 1. Calculate current sensor scales: | ||
63 | |||
64 | scale_s = ((3') - (3)) / ((2') - (2)) | ||
65 | |||
66 | 2. Calculate "effective" input crop (sensor subwindow) - CEU crop scaled back at | ||
67 | current sensor scales onto input window - this is user S_CROP: | ||
68 | |||
69 | width_u = (5') - (5) = ((4') - (4)) * scale_s | ||
70 | |||
71 | 3. Calculate new combined scales from "effective" input window to requested user | ||
72 | window: | ||
73 | |||
74 | scale_comb = width_u / ((6') - (6)) | ||
75 | |||
76 | 4. Calculate sensor output window by applying combined scales to real input | ||
77 | window: | ||
78 | |||
79 | width_s_out = ((2') - (2)) / scale_comb | ||
80 | |||
81 | 5. Apply iterative sensor S_FMT for sensor output window. | ||
82 | |||
83 | subdev->video_ops->s_fmt(.width = width_s_out) | ||
84 | |||
85 | 6. Retrieve sensor output window (g_fmt) | ||
86 | |||
87 | 7. Calculate new sensor scales: | ||
88 | |||
89 | scale_s_new = ((3')_new - (3)_new) / ((2') - (2)) | ||
90 | |||
91 | 8. Calculate new CEU crop - apply sensor scales to previously calculated | ||
92 | "effective" crop: | ||
93 | |||
94 | width_ceu = (4')_new - (4)_new = width_u / scale_s_new | ||
95 | left_ceu = (4)_new - (3)_new = ((5) - (2)) / scale_s_new | ||
96 | |||
97 | 9. Use CEU cropping to crop to the new window: | ||
98 | |||
99 | ceu_crop(.width = width_ceu, .left = left_ceu) | ||
100 | |||
101 | 10. Use CEU scaling to scale to the requested user window: | ||
102 | |||
103 | scale_ceu = width_ceu / width | ||
104 | |||
105 | |||
106 | S_CROP | ||
107 | ------ | ||
108 | |||
109 | If old scale applied to new crop is invalid produce nearest new scale possible | ||
110 | |||
111 | 1. Calculate current combined scales. | ||
112 | |||
113 | scale_comb = (((4') - (4)) / ((6') - (6))) * (((2') - (2)) / ((3') - (3))) | ||
114 | |||
115 | 2. Apply iterative sensor S_CROP for new input window. | ||
116 | |||
117 | 3. If old combined scales applied to new crop produce an impossible user window, | ||
118 | adjust scales to produce nearest possible window. | ||
119 | |||
120 | width_u_out = ((5') - (5)) / scale_comb | ||
121 | |||
122 | if (width_u_out > max) | ||
123 | scale_comb = ((5') - (5)) / max; | ||
124 | else if (width_u_out < min) | ||
125 | scale_comb = ((5') - (5)) / min; | ||
126 | |||
127 | 4. Issue G_CROP to retrieve actual input window. | ||
128 | |||
129 | 5. Using actual input window and calculated combined scales calculate sensor | ||
130 | target output window. | ||
131 | |||
132 | width_s_out = ((3') - (3)) = ((2') - (2)) / scale_comb | ||
133 | |||
134 | 6. Apply iterative S_FMT for new sensor target output window. | ||
135 | |||
136 | 7. Issue G_FMT to retrieve the actual sensor output window. | ||
137 | |||
138 | 8. Calculate sensor scales. | ||
139 | |||
140 | scale_s = ((3') - (3)) / ((2') - (2)) | ||
141 | |||
142 | 9. Calculate sensor output subwindow to be cropped on CEU by applying sensor | ||
143 | scales to the requested window. | ||
144 | |||
145 | width_ceu = ((5') - (5)) / scale_s | ||
146 | |||
147 | 10. Use CEU cropping for above calculated window. | ||
148 | |||
149 | 11. Calculate CEU scales from sensor scales from results of (10) and user window | ||
150 | from (3) | ||
151 | |||
152 | scale_ceu = calc_scale(((5') - (5)), &width_u_out) | ||
153 | |||
154 | 12. Apply CEU scales. | ||
155 | |||
156 | -- | ||
157 | Author: Guennadi Liakhovetski <g.liakhovetski@gmx.de> | ||
diff --git a/Documentation/video4linux/si4713.txt b/Documentation/video4linux/si4713.txt index 25abdb78209d..2e7392a4fee1 100644 --- a/Documentation/video4linux/si4713.txt +++ b/Documentation/video4linux/si4713.txt | |||
@@ -164,7 +164,7 @@ Stereo/Mono and RDS subchannels | |||
164 | 164 | ||
165 | The device can also be configured using the available sub channels for | 165 | The device can also be configured using the available sub channels for |
166 | transmission. To do that use S/G_MODULATOR ioctl and configure txsubchans properly. | 166 | transmission. To do that use S/G_MODULATOR ioctl and configure txsubchans properly. |
167 | Refer to v4l2-spec for proper use of this ioctl. | 167 | Refer to the V4L2 API specification for proper use of this ioctl. |
168 | 168 | ||
169 | Testing | 169 | Testing |
170 | ======= | 170 | ======= |
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt index b806edaf3e75..74d677c8b036 100644 --- a/Documentation/video4linux/v4l2-framework.txt +++ b/Documentation/video4linux/v4l2-framework.txt | |||
@@ -561,6 +561,8 @@ video_device helper functions | |||
561 | 561 | ||
562 | There are a few useful helper functions: | 562 | There are a few useful helper functions: |
563 | 563 | ||
564 | - file/video_device private data | ||
565 | |||
564 | You can set/get driver private data in the video_device struct using: | 566 | You can set/get driver private data in the video_device struct using: |
565 | 567 | ||
566 | void *video_get_drvdata(struct video_device *vdev); | 568 | void *video_get_drvdata(struct video_device *vdev); |
@@ -575,8 +577,7 @@ struct video_device *video_devdata(struct file *file); | |||
575 | 577 | ||
576 | returns the video_device belonging to the file struct. | 578 | returns the video_device belonging to the file struct. |
577 | 579 | ||
578 | The final helper function combines video_get_drvdata with | 580 | The video_drvdata function combines video_get_drvdata with video_devdata: |
579 | video_devdata: | ||
580 | 581 | ||
581 | void *video_drvdata(struct file *file); | 582 | void *video_drvdata(struct file *file); |
582 | 583 | ||
@@ -584,6 +585,17 @@ You can go from a video_device struct to the v4l2_device struct using: | |||
584 | 585 | ||
585 | struct v4l2_device *v4l2_dev = vdev->v4l2_dev; | 586 | struct v4l2_device *v4l2_dev = vdev->v4l2_dev; |
586 | 587 | ||
588 | - Device node name | ||
589 | |||
590 | The video_device node kernel name can be retrieved using | ||
591 | |||
592 | const char *video_device_node_name(struct video_device *vdev); | ||
593 | |||
594 | The name is used as a hint by userspace tools such as udev. The function | ||
595 | should be used where possible instead of accessing the video_device::num and | ||
596 | video_device::minor fields. | ||
597 | |||
598 | |||
587 | video buffer helper functions | 599 | video buffer helper functions |
588 | ----------------------------- | 600 | ----------------------------- |
589 | 601 | ||
diff --git a/Documentation/video4linux/zr364xx.txt b/Documentation/video4linux/zr364xx.txt index 7f3d1955d214..d98e4d302977 100644 --- a/Documentation/video4linux/zr364xx.txt +++ b/Documentation/video4linux/zr364xx.txt | |||
@@ -66,3 +66,4 @@ Vendor Product Distributor Model | |||
66 | 0x0a17 0x004e Pentax Optio 50 | 66 | 0x0a17 0x004e Pentax Optio 50 |
67 | 0x041e 0x405d Creative DiVi CAM 516 | 67 | 0x041e 0x405d Creative DiVi CAM 516 |
68 | 0x08ca 0x2102 Aiptek DV T300 | 68 | 0x08ca 0x2102 Aiptek DV T300 |
69 | 0x06d6 0x003d Trust Powerc@m 910Z | ||
diff --git a/Documentation/vm/hugetlbpage.txt b/Documentation/vm/hugetlbpage.txt index 82a7bd1800b2..bc31636973e3 100644 --- a/Documentation/vm/hugetlbpage.txt +++ b/Documentation/vm/hugetlbpage.txt | |||
@@ -11,23 +11,21 @@ This optimization is more critical now as bigger and bigger physical memories | |||
11 | (several GBs) are more readily available. | 11 | (several GBs) are more readily available. |
12 | 12 | ||
13 | Users can use the huge page support in Linux kernel by either using the mmap | 13 | Users can use the huge page support in Linux kernel by either using the mmap |
14 | system call or standard SYSv shared memory system calls (shmget, shmat). | 14 | system call or standard SYSV shared memory system calls (shmget, shmat). |
15 | 15 | ||
16 | First the Linux kernel needs to be built with the CONFIG_HUGETLBFS | 16 | First the Linux kernel needs to be built with the CONFIG_HUGETLBFS |
17 | (present under "File systems") and CONFIG_HUGETLB_PAGE (selected | 17 | (present under "File systems") and CONFIG_HUGETLB_PAGE (selected |
18 | automatically when CONFIG_HUGETLBFS is selected) configuration | 18 | automatically when CONFIG_HUGETLBFS is selected) configuration |
19 | options. | 19 | options. |
20 | 20 | ||
21 | The kernel built with huge page support should show the number of configured | 21 | The /proc/meminfo file provides information about the total number of |
22 | huge pages in the system by running the "cat /proc/meminfo" command. | 22 | persistent hugetlb pages in the kernel's huge page pool. It also displays |
23 | information about the number of free, reserved and surplus huge pages and the | ||
24 | default huge page size. The huge page size is needed for generating the | ||
25 | proper alignment and size of the arguments to system calls that map huge page | ||
26 | regions. | ||
23 | 27 | ||
24 | /proc/meminfo also provides information about the total number of hugetlb | 28 | The output of "cat /proc/meminfo" will include lines like: |
25 | pages configured in the kernel. It also displays information about the | ||
26 | number of free hugetlb pages at any time. It also displays information about | ||
27 | the configured huge page size - this is needed for generating the proper | ||
28 | alignment and size of the arguments to the above system calls. | ||
29 | |||
30 | The output of "cat /proc/meminfo" will have lines like: | ||
31 | 29 | ||
32 | ..... | 30 | ..... |
33 | HugePages_Total: vvv | 31 | HugePages_Total: vvv |
@@ -53,59 +51,63 @@ HugePages_Surp is short for "surplus," and is the number of huge pages in | |||
53 | /proc/filesystems should also show a filesystem of type "hugetlbfs" configured | 51 | /proc/filesystems should also show a filesystem of type "hugetlbfs" configured |
54 | in the kernel. | 52 | in the kernel. |
55 | 53 | ||
56 | /proc/sys/vm/nr_hugepages indicates the current number of configured hugetlb | 54 | /proc/sys/vm/nr_hugepages indicates the current number of "persistent" huge |
57 | pages in the kernel. Super user can dynamically request more (or free some | 55 | pages in the kernel's huge page pool. "Persistent" huge pages will be |
58 | pre-configured) huge pages. | 56 | returned to the huge page pool when freed by a task. A user with root |
59 | The allocation (or deallocation) of hugetlb pages is possible only if there are | 57 | privileges can dynamically allocate more or free some persistent huge pages |
60 | enough physically contiguous free pages in system (freeing of huge pages is | 58 | by increasing or decreasing the value of 'nr_hugepages'. |
61 | possible only if there are enough hugetlb pages free that can be transferred | ||
62 | back to regular memory pool). | ||
63 | 59 | ||
64 | Pages that are used as hugetlb pages are reserved inside the kernel and cannot | 60 | Pages that are used as huge pages are reserved inside the kernel and cannot |
65 | be used for other purposes. | 61 | be used for other purposes. Huge pages cannot be swapped out under |
62 | memory pressure. | ||
66 | 63 | ||
67 | Once the kernel with Hugetlb page support is built and running, a user can | 64 | Once a number of huge pages have been pre-allocated to the kernel huge page |
68 | use either the mmap system call or shared memory system calls to start using | 65 | pool, a user with appropriate privilege can use either the mmap system call |
69 | the huge pages. It is required that the system administrator preallocate | 66 | or shared memory system calls to use the huge pages. See the discussion of |
70 | enough memory for huge page purposes. | 67 | Using Huge Pages, below. |
71 | 68 | ||
72 | The administrator can preallocate huge pages on the kernel boot command line by | 69 | The administrator can allocate persistent huge pages on the kernel boot |
73 | specifying the "hugepages=N" parameter, where 'N' = the number of huge pages | 70 | command line by specifying the "hugepages=N" parameter, where 'N' = the |
74 | requested. This is the most reliable method for preallocating huge pages as | 71 | number of huge pages requested. This is the most reliable method of |
75 | memory has not yet become fragmented. | 72 | allocating huge pages as memory has not yet become fragmented. |
76 | 73 | ||
77 | Some platforms support multiple huge page sizes. To preallocate huge pages | 74 | Some platforms support multiple huge page sizes. To allocate huge pages |
78 | of a specific size, one must preceed the huge pages boot command parameters | 75 | of a specific size, one must preceed the huge pages boot command parameters |
79 | with a huge page size selection parameter "hugepagesz=<size>". <size> must | 76 | with a huge page size selection parameter "hugepagesz=<size>". <size> must |
80 | be specified in bytes with optional scale suffix [kKmMgG]. The default huge | 77 | be specified in bytes with optional scale suffix [kKmMgG]. The default huge |
81 | page size may be selected with the "default_hugepagesz=<size>" boot parameter. | 78 | page size may be selected with the "default_hugepagesz=<size>" boot parameter. |
82 | 79 | ||
83 | /proc/sys/vm/nr_hugepages indicates the current number of configured [default | 80 | When multiple huge page sizes are supported, /proc/sys/vm/nr_hugepages |
84 | size] hugetlb pages in the kernel. Super user can dynamically request more | 81 | indicates the current number of pre-allocated huge pages of the default size. |
85 | (or free some pre-configured) huge pages. | 82 | Thus, one can use the following command to dynamically allocate/deallocate |
86 | 83 | default sized persistent huge pages: | |
87 | Use the following command to dynamically allocate/deallocate default sized | ||
88 | huge pages: | ||
89 | 84 | ||
90 | echo 20 > /proc/sys/vm/nr_hugepages | 85 | echo 20 > /proc/sys/vm/nr_hugepages |
91 | 86 | ||
92 | This command will try to configure 20 default sized huge pages in the system. | 87 | This command will try to adjust the number of default sized huge pages in the |
88 | huge page pool to 20, allocating or freeing huge pages, as required. | ||
89 | |||
93 | On a NUMA platform, the kernel will attempt to distribute the huge page pool | 90 | On a NUMA platform, the kernel will attempt to distribute the huge page pool |
94 | over the all on-line nodes. These huge pages, allocated when nr_hugepages | 91 | over all the set of allowed nodes specified by the NUMA memory policy of the |
95 | is increased, are called "persistent huge pages". | 92 | task that modifies nr_hugepages. The default for the allowed nodes--when the |
93 | task has default memory policy--is all on-line nodes with memory. Allowed | ||
94 | nodes with insufficient available, contiguous memory for a huge page will be | ||
95 | silently skipped when allocating persistent huge pages. See the discussion | ||
96 | below of the interaction of task memory policy, cpusets and per node attributes | ||
97 | with the allocation and freeing of persistent huge pages. | ||
96 | 98 | ||
97 | The success or failure of huge page allocation depends on the amount of | 99 | The success or failure of huge page allocation depends on the amount of |
98 | physically contiguous memory that is preset in system at the time of the | 100 | physically contiguous memory that is present in system at the time of the |
99 | allocation attempt. If the kernel is unable to allocate huge pages from | 101 | allocation attempt. If the kernel is unable to allocate huge pages from |
100 | some nodes in a NUMA system, it will attempt to make up the difference by | 102 | some nodes in a NUMA system, it will attempt to make up the difference by |
101 | allocating extra pages on other nodes with sufficient available contiguous | 103 | allocating extra pages on other nodes with sufficient available contiguous |
102 | memory, if any. | 104 | memory, if any. |
103 | 105 | ||
104 | System administrators may want to put this command in one of the local rc init | 106 | System administrators may want to put this command in one of the local rc |
105 | files. This will enable the kernel to request huge pages early in the boot | 107 | init files. This will enable the kernel to allocate huge pages early in |
106 | process when the possibility of getting physical contiguous pages is still | 108 | the boot process when the possibility of getting physical contiguous pages |
107 | very high. Administrators can verify the number of huge pages actually | 109 | is still very high. Administrators can verify the number of huge pages |
108 | allocated by checking the sysctl or meminfo. To check the per node | 110 | actually allocated by checking the sysctl or meminfo. To check the per node |
109 | distribution of huge pages in a NUMA system, use: | 111 | distribution of huge pages in a NUMA system, use: |
110 | 112 | ||
111 | cat /sys/devices/system/node/node*/meminfo | fgrep Huge | 113 | cat /sys/devices/system/node/node*/meminfo | fgrep Huge |
@@ -113,45 +115,47 @@ distribution of huge pages in a NUMA system, use: | |||
113 | /proc/sys/vm/nr_overcommit_hugepages specifies how large the pool of | 115 | /proc/sys/vm/nr_overcommit_hugepages specifies how large the pool of |
114 | huge pages can grow, if more huge pages than /proc/sys/vm/nr_hugepages are | 116 | huge pages can grow, if more huge pages than /proc/sys/vm/nr_hugepages are |
115 | requested by applications. Writing any non-zero value into this file | 117 | requested by applications. Writing any non-zero value into this file |
116 | indicates that the hugetlb subsystem is allowed to try to obtain "surplus" | 118 | indicates that the hugetlb subsystem is allowed to try to obtain that |
117 | huge pages from the buddy allocator, when the normal pool is exhausted. As | 119 | number of "surplus" huge pages from the kernel's normal page pool, when the |
118 | these surplus huge pages go out of use, they are freed back to the buddy | 120 | persistent huge page pool is exhausted. As these surplus huge pages become |
119 | allocator. | 121 | unused, they are freed back to the kernel's normal page pool. |
120 | 122 | ||
121 | When increasing the huge page pool size via nr_hugepages, any surplus | 123 | When increasing the huge page pool size via nr_hugepages, any existing surplus |
122 | pages will first be promoted to persistent huge pages. Then, additional | 124 | pages will first be promoted to persistent huge pages. Then, additional |
123 | huge pages will be allocated, if necessary and if possible, to fulfill | 125 | huge pages will be allocated, if necessary and if possible, to fulfill |
124 | the new huge page pool size. | 126 | the new persistent huge page pool size. |
125 | 127 | ||
126 | The administrator may shrink the pool of preallocated huge pages for | 128 | The administrator may shrink the pool of persistent huge pages for |
127 | the default huge page size by setting the nr_hugepages sysctl to a | 129 | the default huge page size by setting the nr_hugepages sysctl to a |
128 | smaller value. The kernel will attempt to balance the freeing of huge pages | 130 | smaller value. The kernel will attempt to balance the freeing of huge pages |
129 | across all on-line nodes. Any free huge pages on the selected nodes will | 131 | across all nodes in the memory policy of the task modifying nr_hugepages. |
130 | be freed back to the buddy allocator. | 132 | Any free huge pages on the selected nodes will be freed back to the kernel's |
131 | 133 | normal page pool. | |
132 | Caveat: Shrinking the pool via nr_hugepages such that it becomes less | 134 | |
133 | than the number of huge pages in use will convert the balance to surplus | 135 | Caveat: Shrinking the persistent huge page pool via nr_hugepages such that |
134 | huge pages even if it would exceed the overcommit value. As long as | 136 | it becomes less than the number of huge pages in use will convert the balance |
135 | this condition holds, however, no more surplus huge pages will be | 137 | of the in-use huge pages to surplus huge pages. This will occur even if |
136 | allowed on the system until one of the two sysctls are increased | 138 | the number of surplus pages it would exceed the overcommit value. As long as |
137 | sufficiently, or the surplus huge pages go out of use and are freed. | 139 | this condition holds--that is, until nr_hugepages+nr_overcommit_hugepages is |
140 | increased sufficiently, or the surplus huge pages go out of use and are freed-- | ||
141 | no more surplus huge pages will be allowed to be allocated. | ||
138 | 142 | ||
139 | With support for multiple huge page pools at run-time available, much of | 143 | With support for multiple huge page pools at run-time available, much of |
140 | the huge page userspace interface has been duplicated in sysfs. The above | 144 | the huge page userspace interface in /proc/sys/vm has been duplicated in sysfs. |
141 | information applies to the default huge page size which will be | 145 | The /proc interfaces discussed above have been retained for backwards |
142 | controlled by the /proc interfaces for backwards compatibility. The root | 146 | compatibility. The root huge page control directory in sysfs is: |
143 | huge page control directory in sysfs is: | ||
144 | 147 | ||
145 | /sys/kernel/mm/hugepages | 148 | /sys/kernel/mm/hugepages |
146 | 149 | ||
147 | For each huge page size supported by the running kernel, a subdirectory | 150 | For each huge page size supported by the running kernel, a subdirectory |
148 | will exist, of the form | 151 | will exist, of the form: |
149 | 152 | ||
150 | hugepages-${size}kB | 153 | hugepages-${size}kB |
151 | 154 | ||
152 | Inside each of these directories, the same set of files will exist: | 155 | Inside each of these directories, the same set of files will exist: |
153 | 156 | ||
154 | nr_hugepages | 157 | nr_hugepages |
158 | nr_hugepages_mempolicy | ||
155 | nr_overcommit_hugepages | 159 | nr_overcommit_hugepages |
156 | free_hugepages | 160 | free_hugepages |
157 | resv_hugepages | 161 | resv_hugepages |
@@ -159,6 +163,102 @@ Inside each of these directories, the same set of files will exist: | |||
159 | 163 | ||
160 | which function as described above for the default huge page-sized case. | 164 | which function as described above for the default huge page-sized case. |
161 | 165 | ||
166 | |||
167 | Interaction of Task Memory Policy with Huge Page Allocation/Freeing | ||
168 | |||
169 | Whether huge pages are allocated and freed via the /proc interface or | ||
170 | the /sysfs interface using the nr_hugepages_mempolicy attribute, the NUMA | ||
171 | nodes from which huge pages are allocated or freed are controlled by the | ||
172 | NUMA memory policy of the task that modifies the nr_hugepages_mempolicy | ||
173 | sysctl or attribute. When the nr_hugepages attribute is used, mempolicy | ||
174 | is ignored. | ||
175 | |||
176 | The recommended method to allocate or free huge pages to/from the kernel | ||
177 | huge page pool, using the nr_hugepages example above, is: | ||
178 | |||
179 | numactl --interleave <node-list> echo 20 \ | ||
180 | >/proc/sys/vm/nr_hugepages_mempolicy | ||
181 | |||
182 | or, more succinctly: | ||
183 | |||
184 | numactl -m <node-list> echo 20 >/proc/sys/vm/nr_hugepages_mempolicy | ||
185 | |||
186 | This will allocate or free abs(20 - nr_hugepages) to or from the nodes | ||
187 | specified in <node-list>, depending on whether number of persistent huge pages | ||
188 | is initially less than or greater than 20, respectively. No huge pages will be | ||
189 | allocated nor freed on any node not included in the specified <node-list>. | ||
190 | |||
191 | When adjusting the persistent hugepage count via nr_hugepages_mempolicy, any | ||
192 | memory policy mode--bind, preferred, local or interleave--may be used. The | ||
193 | resulting effect on persistent huge page allocation is as follows: | ||
194 | |||
195 | 1) Regardless of mempolicy mode [see Documentation/vm/numa_memory_policy.txt], | ||
196 | persistent huge pages will be distributed across the node or nodes | ||
197 | specified in the mempolicy as if "interleave" had been specified. | ||
198 | However, if a node in the policy does not contain sufficient contiguous | ||
199 | memory for a huge page, the allocation will not "fallback" to the nearest | ||
200 | neighbor node with sufficient contiguous memory. To do this would cause | ||
201 | undesirable imbalance in the distribution of the huge page pool, or | ||
202 | possibly, allocation of persistent huge pages on nodes not allowed by | ||
203 | the task's memory policy. | ||
204 | |||
205 | 2) One or more nodes may be specified with the bind or interleave policy. | ||
206 | If more than one node is specified with the preferred policy, only the | ||
207 | lowest numeric id will be used. Local policy will select the node where | ||
208 | the task is running at the time the nodes_allowed mask is constructed. | ||
209 | For local policy to be deterministic, the task must be bound to a cpu or | ||
210 | cpus in a single node. Otherwise, the task could be migrated to some | ||
211 | other node at any time after launch and the resulting node will be | ||
212 | indeterminate. Thus, local policy is not very useful for this purpose. | ||
213 | Any of the other mempolicy modes may be used to specify a single node. | ||
214 | |||
215 | 3) The nodes allowed mask will be derived from any non-default task mempolicy, | ||
216 | whether this policy was set explicitly by the task itself or one of its | ||
217 | ancestors, such as numactl. This means that if the task is invoked from a | ||
218 | shell with non-default policy, that policy will be used. One can specify a | ||
219 | node list of "all" with numactl --interleave or --membind [-m] to achieve | ||
220 | interleaving over all nodes in the system or cpuset. | ||
221 | |||
222 | 4) Any task mempolicy specifed--e.g., using numactl--will be constrained by | ||
223 | the resource limits of any cpuset in which the task runs. Thus, there will | ||
224 | be no way for a task with non-default policy running in a cpuset with a | ||
225 | subset of the system nodes to allocate huge pages outside the cpuset | ||
226 | without first moving to a cpuset that contains all of the desired nodes. | ||
227 | |||
228 | 5) Boot-time huge page allocation attempts to distribute the requested number | ||
229 | of huge pages over all on-lines nodes with memory. | ||
230 | |||
231 | Per Node Hugepages Attributes | ||
232 | |||
233 | A subset of the contents of the root huge page control directory in sysfs, | ||
234 | described above, will be replicated under each the system device of each | ||
235 | NUMA node with memory in: | ||
236 | |||
237 | /sys/devices/system/node/node[0-9]*/hugepages/ | ||
238 | |||
239 | Under this directory, the subdirectory for each supported huge page size | ||
240 | contains the following attribute files: | ||
241 | |||
242 | nr_hugepages | ||
243 | free_hugepages | ||
244 | surplus_hugepages | ||
245 | |||
246 | The free_' and surplus_' attribute files are read-only. They return the number | ||
247 | of free and surplus [overcommitted] huge pages, respectively, on the parent | ||
248 | node. | ||
249 | |||
250 | The nr_hugepages attribute returns the total number of huge pages on the | ||
251 | specified node. When this attribute is written, the number of persistent huge | ||
252 | pages on the parent node will be adjusted to the specified value, if sufficient | ||
253 | resources exist, regardless of the task's mempolicy or cpuset constraints. | ||
254 | |||
255 | Note that the number of overcommit and reserve pages remain global quantities, | ||
256 | as we don't know until fault time, when the faulting task's mempolicy is | ||
257 | applied, from which node the huge page allocation will be attempted. | ||
258 | |||
259 | |||
260 | Using Huge Pages | ||
261 | |||
162 | If the user applications are going to request huge pages using mmap system | 262 | If the user applications are going to request huge pages using mmap system |
163 | call, then it is required that system administrator mount a file system of | 263 | call, then it is required that system administrator mount a file system of |
164 | type hugetlbfs: | 264 | type hugetlbfs: |
@@ -206,9 +306,11 @@ map_hugetlb.c. | |||
206 | * requesting huge pages. | 306 | * requesting huge pages. |
207 | * | 307 | * |
208 | * For the ia64 architecture, the Linux kernel reserves Region number 4 for | 308 | * For the ia64 architecture, the Linux kernel reserves Region number 4 for |
209 | * huge pages. That means the addresses starting with 0x800000... will need | 309 | * huge pages. That means that if one requires a fixed address, a huge page |
210 | * to be specified. Specifying a fixed address is not required on ppc64, | 310 | * aligned address starting with 0x800000... will be required. If a fixed |
211 | * i386 or x86_64. | 311 | * address is not required, the kernel will select an address in the proper |
312 | * range. | ||
313 | * Other architectures, such as ppc64, i386 or x86_64 are not so constrained. | ||
212 | * | 314 | * |
213 | * Note: The default shared memory limit is quite low on many kernels, | 315 | * Note: The default shared memory limit is quite low on many kernels, |
214 | * you may need to increase it via: | 316 | * you may need to increase it via: |
@@ -237,14 +339,8 @@ map_hugetlb.c. | |||
237 | 339 | ||
238 | #define dprintf(x) printf(x) | 340 | #define dprintf(x) printf(x) |
239 | 341 | ||
240 | /* Only ia64 requires this */ | 342 | #define ADDR (void *)(0x0UL) /* let kernel choose address */ |
241 | #ifdef __ia64__ | ||
242 | #define ADDR (void *)(0x8000000000000000UL) | ||
243 | #define SHMAT_FLAGS (SHM_RND) | ||
244 | #else | ||
245 | #define ADDR (void *)(0x0UL) | ||
246 | #define SHMAT_FLAGS (0) | 343 | #define SHMAT_FLAGS (0) |
247 | #endif | ||
248 | 344 | ||
249 | int main(void) | 345 | int main(void) |
250 | { | 346 | { |
@@ -302,10 +398,12 @@ int main(void) | |||
302 | * example, the app is requesting memory of size 256MB that is backed by | 398 | * example, the app is requesting memory of size 256MB that is backed by |
303 | * huge pages. | 399 | * huge pages. |
304 | * | 400 | * |
305 | * For ia64 architecture, Linux kernel reserves Region number 4 for huge pages. | 401 | * For the ia64 architecture, the Linux kernel reserves Region number 4 for |
306 | * That means the addresses starting with 0x800000... will need to be | 402 | * huge pages. That means that if one requires a fixed address, a huge page |
307 | * specified. Specifying a fixed address is not required on ppc64, i386 | 403 | * aligned address starting with 0x800000... will be required. If a fixed |
308 | * or x86_64. | 404 | * address is not required, the kernel will select an address in the proper |
405 | * range. | ||
406 | * Other architectures, such as ppc64, i386 or x86_64 are not so constrained. | ||
309 | */ | 407 | */ |
310 | #include <stdlib.h> | 408 | #include <stdlib.h> |
311 | #include <stdio.h> | 409 | #include <stdio.h> |
@@ -317,14 +415,8 @@ int main(void) | |||
317 | #define LENGTH (256UL*1024*1024) | 415 | #define LENGTH (256UL*1024*1024) |
318 | #define PROTECTION (PROT_READ | PROT_WRITE) | 416 | #define PROTECTION (PROT_READ | PROT_WRITE) |
319 | 417 | ||
320 | /* Only ia64 requires this */ | 418 | #define ADDR (void *)(0x0UL) /* let kernel choose address */ |
321 | #ifdef __ia64__ | ||
322 | #define ADDR (void *)(0x8000000000000000UL) | ||
323 | #define FLAGS (MAP_SHARED | MAP_FIXED) | ||
324 | #else | ||
325 | #define ADDR (void *)(0x0UL) | ||
326 | #define FLAGS (MAP_SHARED) | 419 | #define FLAGS (MAP_SHARED) |
327 | #endif | ||
328 | 420 | ||
329 | void check_bytes(char *addr) | 421 | void check_bytes(char *addr) |
330 | { | 422 | { |
diff --git a/Documentation/vm/hwpoison.txt b/Documentation/vm/hwpoison.txt index 3ffadf8da61f..12f9ba20ccb7 100644 --- a/Documentation/vm/hwpoison.txt +++ b/Documentation/vm/hwpoison.txt | |||
@@ -92,16 +92,62 @@ PR_MCE_KILL_GET | |||
92 | 92 | ||
93 | Testing: | 93 | Testing: |
94 | 94 | ||
95 | madvise(MADV_POISON, ....) | 95 | madvise(MADV_HWPOISON, ....) |
96 | (as root) | 96 | (as root) |
97 | Poison a page in the process for testing | 97 | Poison a page in the process for testing |
98 | 98 | ||
99 | 99 | ||
100 | hwpoison-inject module through debugfs | 100 | hwpoison-inject module through debugfs |
101 | /sys/debug/hwpoison/corrupt-pfn | ||
102 | 101 | ||
103 | Inject hwpoison fault at PFN echoed into this file | 102 | /sys/debug/hwpoison/ |
104 | 103 | ||
104 | corrupt-pfn | ||
105 | |||
106 | Inject hwpoison fault at PFN echoed into this file. This does | ||
107 | some early filtering to avoid corrupted unintended pages in test suites. | ||
108 | |||
109 | unpoison-pfn | ||
110 | |||
111 | Software-unpoison page at PFN echoed into this file. This | ||
112 | way a page can be reused again. | ||
113 | This only works for Linux injected failures, not for real | ||
114 | memory failures. | ||
115 | |||
116 | Note these injection interfaces are not stable and might change between | ||
117 | kernel versions | ||
118 | |||
119 | corrupt-filter-dev-major | ||
120 | corrupt-filter-dev-minor | ||
121 | |||
122 | Only handle memory failures to pages associated with the file system defined | ||
123 | by block device major/minor. -1U is the wildcard value. | ||
124 | This should be only used for testing with artificial injection. | ||
125 | |||
126 | corrupt-filter-memcg | ||
127 | |||
128 | Limit injection to pages owned by memgroup. Specified by inode number | ||
129 | of the memcg. | ||
130 | |||
131 | Example: | ||
132 | mkdir /cgroup/hwpoison | ||
133 | |||
134 | usemem -m 100 -s 1000 & | ||
135 | echo `jobs -p` > /cgroup/hwpoison/tasks | ||
136 | |||
137 | memcg_ino=$(ls -id /cgroup/hwpoison | cut -f1 -d' ') | ||
138 | echo $memcg_ino > /debug/hwpoison/corrupt-filter-memcg | ||
139 | |||
140 | page-types -p `pidof init` --hwpoison # shall do nothing | ||
141 | page-types -p `pidof usemem` --hwpoison # poison its pages | ||
142 | |||
143 | corrupt-filter-flags-mask | ||
144 | corrupt-filter-flags-value | ||
145 | |||
146 | When specified, only poison pages if ((page_flags & mask) == value). | ||
147 | This allows stress testing of many kinds of pages. The page_flags | ||
148 | are the same as in /proc/kpageflags. The flag bits are defined in | ||
149 | include/linux/kernel-page-flags.h and documented in | ||
150 | Documentation/vm/pagemap.txt | ||
105 | 151 | ||
106 | Architecture specific MCE injector | 152 | Architecture specific MCE injector |
107 | 153 | ||
diff --git a/Documentation/vm/ksm.txt b/Documentation/vm/ksm.txt index 262d8e6793a3..b392e496f816 100644 --- a/Documentation/vm/ksm.txt +++ b/Documentation/vm/ksm.txt | |||
@@ -16,9 +16,9 @@ by sharing the data common between them. But it can be useful to any | |||
16 | application which generates many instances of the same data. | 16 | application which generates many instances of the same data. |
17 | 17 | ||
18 | KSM only merges anonymous (private) pages, never pagecache (file) pages. | 18 | KSM only merges anonymous (private) pages, never pagecache (file) pages. |
19 | KSM's merged pages are at present locked into kernel memory for as long | 19 | KSM's merged pages were originally locked into kernel memory, but can now |
20 | as they are shared: so cannot be swapped out like the user pages they | 20 | be swapped out just like other user pages (but sharing is broken when they |
21 | replace (but swapping KSM pages should follow soon in a later release). | 21 | are swapped back in: ksmd must rediscover their identity and merge again). |
22 | 22 | ||
23 | KSM only operates on those areas of address space which an application | 23 | KSM only operates on those areas of address space which an application |
24 | has advised to be likely candidates for merging, by using the madvise(2) | 24 | has advised to be likely candidates for merging, by using the madvise(2) |
@@ -44,20 +44,12 @@ includes unmapped gaps (though working on the intervening mapped areas), | |||
44 | and might fail with EAGAIN if not enough memory for internal structures. | 44 | and might fail with EAGAIN if not enough memory for internal structures. |
45 | 45 | ||
46 | Applications should be considerate in their use of MADV_MERGEABLE, | 46 | Applications should be considerate in their use of MADV_MERGEABLE, |
47 | restricting its use to areas likely to benefit. KSM's scans may use | 47 | restricting its use to areas likely to benefit. KSM's scans may use a lot |
48 | a lot of processing power, and its kernel-resident pages are a limited | 48 | of processing power: some installations will disable KSM for that reason. |
49 | resource. Some installations will disable KSM for these reasons. | ||
50 | 49 | ||
51 | The KSM daemon is controlled by sysfs files in /sys/kernel/mm/ksm/, | 50 | The KSM daemon is controlled by sysfs files in /sys/kernel/mm/ksm/, |
52 | readable by all but writable only by root: | 51 | readable by all but writable only by root: |
53 | 52 | ||
54 | max_kernel_pages - set to maximum number of kernel pages that KSM may use | ||
55 | e.g. "echo 100000 > /sys/kernel/mm/ksm/max_kernel_pages" | ||
56 | Value 0 imposes no limit on the kernel pages KSM may use; | ||
57 | but note that any process using MADV_MERGEABLE can cause | ||
58 | KSM to allocate these pages, unswappable until it exits. | ||
59 | Default: quarter of memory (chosen to not pin too much) | ||
60 | |||
61 | pages_to_scan - how many present pages to scan before ksmd goes to sleep | 53 | pages_to_scan - how many present pages to scan before ksmd goes to sleep |
62 | e.g. "echo 100 > /sys/kernel/mm/ksm/pages_to_scan" | 54 | e.g. "echo 100 > /sys/kernel/mm/ksm/pages_to_scan" |
63 | Default: 100 (chosen for demonstration purposes) | 55 | Default: 100 (chosen for demonstration purposes) |
@@ -75,7 +67,7 @@ run - set 0 to stop ksmd from running but keep merged pages, | |||
75 | 67 | ||
76 | The effectiveness of KSM and MADV_MERGEABLE is shown in /sys/kernel/mm/ksm/: | 68 | The effectiveness of KSM and MADV_MERGEABLE is shown in /sys/kernel/mm/ksm/: |
77 | 69 | ||
78 | pages_shared - how many shared unswappable kernel pages KSM is using | 70 | pages_shared - how many shared pages are being used |
79 | pages_sharing - how many more sites are sharing them i.e. how much saved | 71 | pages_sharing - how many more sites are sharing them i.e. how much saved |
80 | pages_unshared - how many pages unique but repeatedly checked for merging | 72 | pages_unshared - how many pages unique but repeatedly checked for merging |
81 | pages_volatile - how many pages changing too fast to be placed in a tree | 73 | pages_volatile - how many pages changing too fast to be placed in a tree |
@@ -87,4 +79,4 @@ pages_volatile embraces several different kinds of activity, but a high | |||
87 | proportion there would also indicate poor use of madvise MADV_MERGEABLE. | 79 | proportion there would also indicate poor use of madvise MADV_MERGEABLE. |
88 | 80 | ||
89 | Izik Eidus, | 81 | Izik Eidus, |
90 | Hugh Dickins, 24 Sept 2009 | 82 | Hugh Dickins, 17 Nov 2009 |
diff --git a/Documentation/vm/page-types.c b/Documentation/vm/page-types.c index 4793c6aac733..66e9358e2144 100644 --- a/Documentation/vm/page-types.c +++ b/Documentation/vm/page-types.c | |||
@@ -1,11 +1,22 @@ | |||
1 | /* | 1 | /* |
2 | * page-types: Tool for querying page flags | 2 | * page-types: Tool for querying page flags |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms of the GNU General Public License as published by the Free | ||
6 | * Software Foundation; version 2. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should find a copy of v2 of the GNU General Public License somewhere on | ||
14 | * your Linux system; if not, write to the Free Software Foundation, Inc., 59 | ||
15 | * Temple Place, Suite 330, Boston, MA 02111-1307 USA. | ||
16 | * | ||
4 | * Copyright (C) 2009 Intel corporation | 17 | * Copyright (C) 2009 Intel corporation |
5 | * | 18 | * |
6 | * Authors: Wu Fengguang <fengguang.wu@intel.com> | 19 | * Authors: Wu Fengguang <fengguang.wu@intel.com> |
7 | * | ||
8 | * Released under the General Public License (GPL). | ||
9 | */ | 20 | */ |
10 | 21 | ||
11 | #define _LARGEFILE64_SOURCE | 22 | #define _LARGEFILE64_SOURCE |
@@ -100,7 +111,7 @@ | |||
100 | #define BIT(name) (1ULL << KPF_##name) | 111 | #define BIT(name) (1ULL << KPF_##name) |
101 | #define BITS_COMPOUND (BIT(COMPOUND_HEAD) | BIT(COMPOUND_TAIL)) | 112 | #define BITS_COMPOUND (BIT(COMPOUND_HEAD) | BIT(COMPOUND_TAIL)) |
102 | 113 | ||
103 | static char *page_flag_names[] = { | 114 | static const char *page_flag_names[] = { |
104 | [KPF_LOCKED] = "L:locked", | 115 | [KPF_LOCKED] = "L:locked", |
105 | [KPF_ERROR] = "E:error", | 116 | [KPF_ERROR] = "E:error", |
106 | [KPF_REFERENCED] = "R:referenced", | 117 | [KPF_REFERENCED] = "R:referenced", |
@@ -173,7 +184,7 @@ static int kpageflags_fd; | |||
173 | static int opt_hwpoison; | 184 | static int opt_hwpoison; |
174 | static int opt_unpoison; | 185 | static int opt_unpoison; |
175 | 186 | ||
176 | static char *hwpoison_debug_fs = "/debug/hwpoison"; | 187 | static const char hwpoison_debug_fs[] = "/debug/hwpoison"; |
177 | static int hwpoison_inject_fd; | 188 | static int hwpoison_inject_fd; |
178 | static int hwpoison_forget_fd; | 189 | static int hwpoison_forget_fd; |
179 | 190 | ||
@@ -301,7 +312,7 @@ static char *page_flag_name(uint64_t flags) | |||
301 | present = (flags >> i) & 1; | 312 | present = (flags >> i) & 1; |
302 | if (!page_flag_names[i]) { | 313 | if (!page_flag_names[i]) { |
303 | if (present) | 314 | if (present) |
304 | fatal("unkown flag bit %d\n", i); | 315 | fatal("unknown flag bit %d\n", i); |
305 | continue; | 316 | continue; |
306 | } | 317 | } |
307 | buf[j++] = present ? page_flag_names[i][0] : '_'; | 318 | buf[j++] = present ? page_flag_names[i][0] : '_'; |
@@ -560,7 +571,7 @@ static void walk_pfn(unsigned long voffset, | |||
560 | { | 571 | { |
561 | uint64_t buf[KPAGEFLAGS_BATCH]; | 572 | uint64_t buf[KPAGEFLAGS_BATCH]; |
562 | unsigned long batch; | 573 | unsigned long batch; |
563 | unsigned long pages; | 574 | long pages; |
564 | unsigned long i; | 575 | unsigned long i; |
565 | 576 | ||
566 | while (count) { | 577 | while (count) { |
@@ -673,30 +684,35 @@ static void usage(void) | |||
673 | 684 | ||
674 | printf( | 685 | printf( |
675 | "page-types [options]\n" | 686 | "page-types [options]\n" |
676 | " -r|--raw Raw mode, for kernel developers\n" | 687 | " -r|--raw Raw mode, for kernel developers\n" |
677 | " -a|--addr addr-spec Walk a range of pages\n" | 688 | " -d|--describe flags Describe flags\n" |
678 | " -b|--bits bits-spec Walk pages with specified bits\n" | 689 | " -a|--addr addr-spec Walk a range of pages\n" |
679 | " -p|--pid pid Walk process address space\n" | 690 | " -b|--bits bits-spec Walk pages with specified bits\n" |
691 | " -p|--pid pid Walk process address space\n" | ||
680 | #if 0 /* planned features */ | 692 | #if 0 /* planned features */ |
681 | " -f|--file filename Walk file address space\n" | 693 | " -f|--file filename Walk file address space\n" |
682 | #endif | 694 | #endif |
683 | " -l|--list Show page details in ranges\n" | 695 | " -l|--list Show page details in ranges\n" |
684 | " -L|--list-each Show page details one by one\n" | 696 | " -L|--list-each Show page details one by one\n" |
685 | " -N|--no-summary Don't show summay info\n" | 697 | " -N|--no-summary Don't show summay info\n" |
686 | " -X|--hwpoison hwpoison pages\n" | 698 | " -X|--hwpoison hwpoison pages\n" |
687 | " -x|--unpoison unpoison pages\n" | 699 | " -x|--unpoison unpoison pages\n" |
688 | " -h|--help Show this usage message\n" | 700 | " -h|--help Show this usage message\n" |
701 | "flags:\n" | ||
702 | " 0x10 bitfield format, e.g.\n" | ||
703 | " anon bit-name, e.g.\n" | ||
704 | " 0x10,anon comma-separated list, e.g.\n" | ||
689 | "addr-spec:\n" | 705 | "addr-spec:\n" |
690 | " N one page at offset N (unit: pages)\n" | 706 | " N one page at offset N (unit: pages)\n" |
691 | " N+M pages range from N to N+M-1\n" | 707 | " N+M pages range from N to N+M-1\n" |
692 | " N,M pages range from N to M-1\n" | 708 | " N,M pages range from N to M-1\n" |
693 | " N, pages range from N to end\n" | 709 | " N, pages range from N to end\n" |
694 | " ,M pages range from 0 to M-1\n" | 710 | " ,M pages range from 0 to M-1\n" |
695 | "bits-spec:\n" | 711 | "bits-spec:\n" |
696 | " bit1,bit2 (flags & (bit1|bit2)) != 0\n" | 712 | " bit1,bit2 (flags & (bit1|bit2)) != 0\n" |
697 | " bit1,bit2=bit1 (flags & (bit1|bit2)) == bit1\n" | 713 | " bit1,bit2=bit1 (flags & (bit1|bit2)) == bit1\n" |
698 | " bit1,~bit2 (flags & (bit1|bit2)) == bit1\n" | 714 | " bit1,~bit2 (flags & (bit1|bit2)) == bit1\n" |
699 | " =bit1,bit2 flags == (bit1|bit2)\n" | 715 | " =bit1,bit2 flags == (bit1|bit2)\n" |
700 | "bit-names:\n" | 716 | "bit-names:\n" |
701 | ); | 717 | ); |
702 | 718 | ||
@@ -884,13 +900,23 @@ static void parse_bits_mask(const char *optarg) | |||
884 | add_bits_filter(mask, bits); | 900 | add_bits_filter(mask, bits); |
885 | } | 901 | } |
886 | 902 | ||
903 | static void describe_flags(const char *optarg) | ||
904 | { | ||
905 | uint64_t flags = parse_flag_names(optarg, 0); | ||
906 | |||
907 | printf("0x%016llx\t%s\t%s\n", | ||
908 | (unsigned long long)flags, | ||
909 | page_flag_name(flags), | ||
910 | page_flag_longname(flags)); | ||
911 | } | ||
887 | 912 | ||
888 | static struct option opts[] = { | 913 | static const struct option opts[] = { |
889 | { "raw" , 0, NULL, 'r' }, | 914 | { "raw" , 0, NULL, 'r' }, |
890 | { "pid" , 1, NULL, 'p' }, | 915 | { "pid" , 1, NULL, 'p' }, |
891 | { "file" , 1, NULL, 'f' }, | 916 | { "file" , 1, NULL, 'f' }, |
892 | { "addr" , 1, NULL, 'a' }, | 917 | { "addr" , 1, NULL, 'a' }, |
893 | { "bits" , 1, NULL, 'b' }, | 918 | { "bits" , 1, NULL, 'b' }, |
919 | { "describe" , 1, NULL, 'd' }, | ||
894 | { "list" , 0, NULL, 'l' }, | 920 | { "list" , 0, NULL, 'l' }, |
895 | { "list-each" , 0, NULL, 'L' }, | 921 | { "list-each" , 0, NULL, 'L' }, |
896 | { "no-summary", 0, NULL, 'N' }, | 922 | { "no-summary", 0, NULL, 'N' }, |
@@ -907,7 +933,7 @@ int main(int argc, char *argv[]) | |||
907 | page_size = getpagesize(); | 933 | page_size = getpagesize(); |
908 | 934 | ||
909 | while ((c = getopt_long(argc, argv, | 935 | while ((c = getopt_long(argc, argv, |
910 | "rp:f:a:b:lLNXxh", opts, NULL)) != -1) { | 936 | "rp:f:a:b:d:lLNXxh", opts, NULL)) != -1) { |
911 | switch (c) { | 937 | switch (c) { |
912 | case 'r': | 938 | case 'r': |
913 | opt_raw = 1; | 939 | opt_raw = 1; |
@@ -924,6 +950,9 @@ int main(int argc, char *argv[]) | |||
924 | case 'b': | 950 | case 'b': |
925 | parse_bits_mask(optarg); | 951 | parse_bits_mask(optarg); |
926 | break; | 952 | break; |
953 | case 'd': | ||
954 | describe_flags(optarg); | ||
955 | exit(0); | ||
927 | case 'l': | 956 | case 'l': |
928 | opt_list = 1; | 957 | opt_list = 1; |
929 | break; | 958 | break; |
diff --git a/Documentation/vm/slub.txt b/Documentation/vm/slub.txt index 510917ff59ed..b37300edf27c 100644 --- a/Documentation/vm/slub.txt +++ b/Documentation/vm/slub.txt | |||
@@ -245,7 +245,7 @@ been overwritten. Here a string of 8 characters was written into a slab that | |||
245 | has the length of 8 characters. However, a 8 character string needs a | 245 | has the length of 8 characters. However, a 8 character string needs a |
246 | terminating 0. That zero has overwritten the first byte of the Redzone field. | 246 | terminating 0. That zero has overwritten the first byte of the Redzone field. |
247 | After reporting the details of the issue encountered the FIX SLUB message | 247 | After reporting the details of the issue encountered the FIX SLUB message |
248 | tell us that SLUB has restored the Redzone to its proper value and then | 248 | tells us that SLUB has restored the Redzone to its proper value and then |
249 | system operations continue. | 249 | system operations continue. |
250 | 250 | ||
251 | Emergency operations: | 251 | Emergency operations: |