diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-04-21 05:33:03 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-04-21 08:44:55 -0400 |
commit | 64131a87f2aae2ed9e05d8227c5b009ca6c50d98 (patch) | |
tree | fdea23fd59216120bf54a48c60ca24489a733f14 /Documentation | |
parent | 676ee36be04985062522804c2de04f0764212be6 (diff) | |
parent | 2c33ce009ca2389dbf0535d0672214d09738e35e (diff) |
Merge branch 'drm-next-merged' of git://people.freedesktop.org/~airlied/linux into v4l_for_linus
* 'drm-next-merged' of git://people.freedesktop.org/~airlied/linux: (9717 commits)
media-bus: Fixup RGB444_1X12, RGB565_1X16, and YUV8_1X24 media bus format
hexdump: avoid warning in test function
fs: take i_mutex during prepare_binprm for set[ug]id executables
smp: Fix error case handling in smp_call_function_*()
iommu-common: Fix PARISC compile-time warnings
sparc: Make LDC use common iommu poll management functions
sparc: Make sparc64 use scalable lib/iommu-common.c functions
Break up monolithic iommu table/lock into finer graularity pools and lock
sparc: Revert generic IOMMU allocator.
tools/power turbostat: correct dumped pkg-cstate-limit value
tools/power turbostat: calculate TSC frequency from CPUID(0x15) on SKL
tools/power turbostat: correct DRAM RAPL units on recent Xeon processors
tools/power turbostat: Initial Skylake support
tools/power turbostat: Use $(CURDIR) instead of $(PWD) and add support for O= option in Makefile
tools/power turbostat: modprobe msr, if needed
tools/power turbostat: dump MSR_TURBO_RATIO_LIMIT2
tools/power turbostat: use new MSR_TURBO_RATIO_LIMIT names
Bluetooth: hidp: Fix regression with older userspace and flags validation
config: Enable NEED_DMA_MAP_STATE by default when SWIOTLB is selected
perf/x86/intel/pt: Fix and clean up error handling in pt_event_add()
...
That solves several merge conflicts:
Documentation/DocBook/media/v4l/subdev-formats.xml
Documentation/devicetree/bindings/vendor-prefixes.txt
drivers/staging/media/mn88473/mn88473.c
include/linux/kconfig.h
include/uapi/linux/media-bus-format.h
The ones at subdev-formats.xml and media-bus-format.h are not trivial.
That's why we opted to merge from DRM.
Diffstat (limited to 'Documentation')
286 files changed, 8497 insertions, 1982 deletions
diff --git a/Documentation/ABI/obsolete/sysfs-block-zram b/Documentation/ABI/obsolete/sysfs-block-zram new file mode 100644 index 000000000000..720ea92cfb2e --- /dev/null +++ b/Documentation/ABI/obsolete/sysfs-block-zram | |||
@@ -0,0 +1,119 @@ | |||
1 | What: /sys/block/zram<id>/num_reads | ||
2 | Date: August 2015 | ||
3 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | ||
4 | Description: | ||
5 | The num_reads file is read-only and specifies the number of | ||
6 | reads (failed or successful) done on this device. | ||
7 | Now accessible via zram<id>/stat node. | ||
8 | |||
9 | What: /sys/block/zram<id>/num_writes | ||
10 | Date: August 2015 | ||
11 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | ||
12 | Description: | ||
13 | The num_writes file is read-only and specifies the number of | ||
14 | writes (failed or successful) done on this device. | ||
15 | Now accessible via zram<id>/stat node. | ||
16 | |||
17 | What: /sys/block/zram<id>/invalid_io | ||
18 | Date: August 2015 | ||
19 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | ||
20 | Description: | ||
21 | The invalid_io file is read-only and specifies the number of | ||
22 | non-page-size-aligned I/O requests issued to this device. | ||
23 | Now accessible via zram<id>/io_stat node. | ||
24 | |||
25 | What: /sys/block/zram<id>/failed_reads | ||
26 | Date: August 2015 | ||
27 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | ||
28 | Description: | ||
29 | The failed_reads file is read-only and specifies the number of | ||
30 | failed reads happened on this device. | ||
31 | Now accessible via zram<id>/io_stat node. | ||
32 | |||
33 | What: /sys/block/zram<id>/failed_writes | ||
34 | Date: August 2015 | ||
35 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | ||
36 | Description: | ||
37 | The failed_writes file is read-only and specifies the number of | ||
38 | failed writes happened on this device. | ||
39 | Now accessible via zram<id>/io_stat node. | ||
40 | |||
41 | What: /sys/block/zram<id>/notify_free | ||
42 | Date: August 2015 | ||
43 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | ||
44 | Description: | ||
45 | The notify_free file is read-only. Depending on device usage | ||
46 | scenario it may account a) the number of pages freed because | ||
47 | of swap slot free notifications or b) the number of pages freed | ||
48 | because of REQ_DISCARD requests sent by bio. The former ones | ||
49 | are sent to a swap block device when a swap slot is freed, which | ||
50 | implies that this disk is being used as a swap disk. The latter | ||
51 | ones are sent by filesystem mounted with discard option, | ||
52 | whenever some data blocks are getting discarded. | ||
53 | Now accessible via zram<id>/io_stat node. | ||
54 | |||
55 | What: /sys/block/zram<id>/zero_pages | ||
56 | Date: August 2015 | ||
57 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | ||
58 | Description: | ||
59 | The zero_pages file is read-only and specifies number of zero | ||
60 | filled pages written to this disk. No memory is allocated for | ||
61 | such pages. | ||
62 | Now accessible via zram<id>/mm_stat node. | ||
63 | |||
64 | What: /sys/block/zram<id>/orig_data_size | ||
65 | Date: August 2015 | ||
66 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | ||
67 | Description: | ||
68 | The orig_data_size file is read-only and specifies uncompressed | ||
69 | size of data stored in this disk. This excludes zero-filled | ||
70 | pages (zero_pages) since no memory is allocated for them. | ||
71 | Unit: bytes | ||
72 | Now accessible via zram<id>/mm_stat node. | ||
73 | |||
74 | What: /sys/block/zram<id>/compr_data_size | ||
75 | Date: August 2015 | ||
76 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | ||
77 | Description: | ||
78 | The compr_data_size file is read-only and specifies compressed | ||
79 | size of data stored in this disk. So, compression ratio can be | ||
80 | calculated using orig_data_size and this statistic. | ||
81 | Unit: bytes | ||
82 | Now accessible via zram<id>/mm_stat node. | ||
83 | |||
84 | What: /sys/block/zram<id>/mem_used_total | ||
85 | Date: August 2015 | ||
86 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | ||
87 | Description: | ||
88 | The mem_used_total file is read-only and specifies the amount | ||
89 | of memory, including allocator fragmentation and metadata | ||
90 | overhead, allocated for this disk. So, allocator space | ||
91 | efficiency can be calculated using compr_data_size and this | ||
92 | statistic. | ||
93 | Unit: bytes | ||
94 | Now accessible via zram<id>/mm_stat node. | ||
95 | |||
96 | What: /sys/block/zram<id>/mem_used_max | ||
97 | Date: August 2015 | ||
98 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | ||
99 | Description: | ||
100 | The mem_used_max file is read/write and specifies the amount | ||
101 | of maximum memory zram have consumed to store compressed data. | ||
102 | For resetting the value, you should write "0". Otherwise, | ||
103 | you could see -EINVAL. | ||
104 | Unit: bytes | ||
105 | Downgraded to write-only node: so it's possible to set new | ||
106 | value only; its current value is stored in zram<id>/mm_stat | ||
107 | node. | ||
108 | |||
109 | What: /sys/block/zram<id>/mem_limit | ||
110 | Date: August 2015 | ||
111 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | ||
112 | Description: | ||
113 | The mem_limit file is read/write and specifies the maximum | ||
114 | amount of memory ZRAM can use to store the compressed data. | ||
115 | The limit could be changed in run time and "0" means disable | ||
116 | the limit. No limit is the initial state. Unit: bytes | ||
117 | Downgraded to write-only node: so it's possible to set new | ||
118 | value only; its current value is stored in zram<id>/mm_stat | ||
119 | node. | ||
diff --git a/Documentation/ABI/stable/sysfs-devices b/Documentation/ABI/stable/sysfs-devices new file mode 100644 index 000000000000..43f78b88da28 --- /dev/null +++ b/Documentation/ABI/stable/sysfs-devices | |||
@@ -0,0 +1,10 @@ | |||
1 | # Note: This documents additional properties of any device beyond what | ||
2 | # is documented in Documentation/sysfs-rules.txt | ||
3 | |||
4 | What: /sys/devices/*/of_path | ||
5 | Date: February 2015 | ||
6 | Contact: Device Tree mailing list <devicetree@vger.kernel.org> | ||
7 | Description: | ||
8 | Any device associated with a device-tree node will have | ||
9 | an of_path symlink pointing to the corresponding device | ||
10 | node in /sys/firmware/devicetree/ | ||
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-printer b/Documentation/ABI/testing/configfs-usb-gadget-printer new file mode 100644 index 000000000000..6b0714e3c605 --- /dev/null +++ b/Documentation/ABI/testing/configfs-usb-gadget-printer | |||
@@ -0,0 +1,9 @@ | |||
1 | What: /config/usb-gadget/gadget/functions/printer.name | ||
2 | Date: Apr 2015 | ||
3 | KernelVersion: 4.1 | ||
4 | Description: | ||
5 | The attributes: | ||
6 | |||
7 | pnp_string - Data to be passed to the host in pnp string | ||
8 | q_len - Number of requests per endpoint | ||
9 | |||
diff --git a/Documentation/ABI/testing/sysfs-block-dm b/Documentation/ABI/testing/sysfs-block-dm index 87ca5691e29b..f9f2339b9a0a 100644 --- a/Documentation/ABI/testing/sysfs-block-dm +++ b/Documentation/ABI/testing/sysfs-block-dm | |||
@@ -23,3 +23,25 @@ Description: Device-mapper device suspend state. | |||
23 | Contains the value 1 while the device is suspended. | 23 | Contains the value 1 while the device is suspended. |
24 | Otherwise it contains 0. Read-only attribute. | 24 | Otherwise it contains 0. Read-only attribute. |
25 | Users: util-linux, device-mapper udev rules | 25 | Users: util-linux, device-mapper udev rules |
26 | |||
27 | What: /sys/block/dm-<num>/dm/rq_based_seq_io_merge_deadline | ||
28 | Date: March 2015 | ||
29 | KernelVersion: 4.1 | ||
30 | Contact: dm-devel@redhat.com | ||
31 | Description: Allow control over how long a request that is a | ||
32 | reasonable merge candidate can be queued on the request | ||
33 | queue. The resolution of this deadline is in | ||
34 | microseconds (ranging from 1 to 100000 usecs). | ||
35 | Setting this attribute to 0 (the default) will disable | ||
36 | request-based DM's merge heuristic and associated extra | ||
37 | accounting. This attribute is not applicable to | ||
38 | bio-based DM devices so it will only ever report 0 for | ||
39 | them. | ||
40 | |||
41 | What: /sys/block/dm-<num>/dm/use_blk_mq | ||
42 | Date: March 2015 | ||
43 | KernelVersion: 4.1 | ||
44 | Contact: dm-devel@redhat.com | ||
45 | Description: Request-based Device-mapper blk-mq I/O path mode. | ||
46 | Contains the value 1 if the device is using blk-mq. | ||
47 | Otherwise it contains 0. Read-only attribute. | ||
diff --git a/Documentation/ABI/testing/sysfs-block-zram b/Documentation/ABI/testing/sysfs-block-zram index a6148eaf91e5..2e69e83bf510 100644 --- a/Documentation/ABI/testing/sysfs-block-zram +++ b/Documentation/ABI/testing/sysfs-block-zram | |||
@@ -141,3 +141,28 @@ Description: | |||
141 | amount of memory ZRAM can use to store the compressed data. The | 141 | amount of memory ZRAM can use to store the compressed data. The |
142 | limit could be changed in run time and "0" means disable the | 142 | limit could be changed in run time and "0" means disable the |
143 | limit. No limit is the initial state. Unit: bytes | 143 | limit. No limit is the initial state. Unit: bytes |
144 | |||
145 | What: /sys/block/zram<id>/compact | ||
146 | Date: August 2015 | ||
147 | Contact: Minchan Kim <minchan@kernel.org> | ||
148 | Description: | ||
149 | The compact file is write-only and trigger compaction for | ||
150 | allocator zrm uses. The allocator moves some objects so that | ||
151 | it could free fragment space. | ||
152 | |||
153 | What: /sys/block/zram<id>/io_stat | ||
154 | Date: August 2015 | ||
155 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | ||
156 | Description: | ||
157 | The io_stat file is read-only and accumulates device's I/O | ||
158 | statistics not accounted by block layer. For example, | ||
159 | failed_reads, failed_writes, etc. File format is similar to | ||
160 | block layer statistics file format. | ||
161 | |||
162 | What: /sys/block/zram<id>/mm_stat | ||
163 | Date: August 2015 | ||
164 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | ||
165 | Description: | ||
166 | The mm_stat file is read-only and represents device's mm | ||
167 | statistics (orig_data_size, compr_data_size, etc.) in a format | ||
168 | similar to block layer statistics file format. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio index 9a70c31619ea..3befcb19f414 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio | |||
@@ -253,6 +253,8 @@ What: /sys/bus/iio/devices/iio:deviceX/in_temp_offset | |||
253 | What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_offset | 253 | What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_offset |
254 | What: /sys/bus/iio/devices/iio:deviceX/in_pressure_offset | 254 | What: /sys/bus/iio/devices/iio:deviceX/in_pressure_offset |
255 | What: /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_offset | 255 | What: /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_offset |
256 | What: /sys/bus/iio/devices/iio:deviceX/in_magn_offset | ||
257 | What: /sys/bus/iio/devices/iio:deviceX/in_rot_offset | ||
256 | KernelVersion: 2.6.35 | 258 | KernelVersion: 2.6.35 |
257 | Contact: linux-iio@vger.kernel.org | 259 | Contact: linux-iio@vger.kernel.org |
258 | Description: | 260 | Description: |
@@ -296,6 +298,7 @@ What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_scale | |||
296 | What: /sys/bus/iio/devices/iio:deviceX/in_pressure_scale | 298 | What: /sys/bus/iio/devices/iio:deviceX/in_pressure_scale |
297 | What: /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_scale | 299 | What: /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_scale |
298 | What: /sys/bus/iio/devices/iio:deviceX/in_velocity_sqrt(x^2+y^2+z^2)_scale | 300 | What: /sys/bus/iio/devices/iio:deviceX/in_velocity_sqrt(x^2+y^2+z^2)_scale |
301 | What: /sys/bus/iio/devices/iio:deviceX/in_illuminance_scale | ||
299 | KernelVersion: 2.6.35 | 302 | KernelVersion: 2.6.35 |
300 | Contact: linux-iio@vger.kernel.org | 303 | Contact: linux-iio@vger.kernel.org |
301 | Description: | 304 | Description: |
@@ -336,6 +339,7 @@ what /sys/bus/iio/devices/iio:deviceX/in_illuminance0_calibscale | |||
336 | what /sys/bus/iio/devices/iio:deviceX/in_proximity0_calibscale | 339 | what /sys/bus/iio/devices/iio:deviceX/in_proximity0_calibscale |
337 | What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_calibscale | 340 | What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_calibscale |
338 | What: /sys/bus/iio/devices/iio:deviceX/in_pressure_calibscale | 341 | What: /sys/bus/iio/devices/iio:deviceX/in_pressure_calibscale |
342 | What: /sys/bus/iio/devices/iio:deviceX/in_illuminance_calibscale | ||
339 | KernelVersion: 2.6.35 | 343 | KernelVersion: 2.6.35 |
340 | Contact: linux-iio@vger.kernel.org | 344 | Contact: linux-iio@vger.kernel.org |
341 | Description: | 345 | Description: |
@@ -347,7 +351,7 @@ What: /sys/bus/iio/devices/iio:deviceX/in_activity_calibgender | |||
347 | What: /sys/bus/iio/devices/iio:deviceX/in_energy_calibgender | 351 | What: /sys/bus/iio/devices/iio:deviceX/in_energy_calibgender |
348 | What: /sys/bus/iio/devices/iio:deviceX/in_distance_calibgender | 352 | What: /sys/bus/iio/devices/iio:deviceX/in_distance_calibgender |
349 | What: /sys/bus/iio/devices/iio:deviceX/in_velocity_calibgender | 353 | What: /sys/bus/iio/devices/iio:deviceX/in_velocity_calibgender |
350 | KernelVersion: 3.20 | 354 | KernelVersion: 4.0 |
351 | Contact: linux-iio@vger.kernel.org | 355 | Contact: linux-iio@vger.kernel.org |
352 | Description: | 356 | Description: |
353 | Gender of the user (e.g.: male, female) used by some pedometers | 357 | Gender of the user (e.g.: male, female) used by some pedometers |
@@ -358,7 +362,7 @@ What: /sys/bus/iio/devices/iio:deviceX/in_activity_calibgender_available | |||
358 | What: /sys/bus/iio/devices/iio:deviceX/in_energy_calibgender_available | 362 | What: /sys/bus/iio/devices/iio:deviceX/in_energy_calibgender_available |
359 | What: /sys/bus/iio/devices/iio:deviceX/in_distance_calibgender_available | 363 | What: /sys/bus/iio/devices/iio:deviceX/in_distance_calibgender_available |
360 | What: /sys/bus/iio/devices/iio:deviceX/in_velocity_calibgender_available | 364 | What: /sys/bus/iio/devices/iio:deviceX/in_velocity_calibgender_available |
361 | KernelVersion: 3.20 | 365 | KernelVersion: 4.0 |
362 | Contact: linux-iio@vger.kernel.org | 366 | Contact: linux-iio@vger.kernel.org |
363 | Description: | 367 | Description: |
364 | Lists all available gender values (e.g.: male, female). | 368 | Lists all available gender values (e.g.: male, female). |
@@ -375,7 +379,7 @@ Description: | |||
375 | type. | 379 | type. |
376 | 380 | ||
377 | What: /sys/bus/iio/devices/iio:deviceX/in_energy_calibweight | 381 | What: /sys/bus/iio/devices/iio:deviceX/in_energy_calibweight |
378 | KernelVersion: 3.20 | 382 | KernelVersion: 4.0 |
379 | Contact: linux-iio@vger.kernel.org | 383 | Contact: linux-iio@vger.kernel.org |
380 | Description: | 384 | Description: |
381 | Weight of the user (in kg). It is needed by some pedometers | 385 | Weight of the user (in kg). It is needed by some pedometers |
@@ -612,6 +616,8 @@ Description: | |||
612 | a given event type is enabled a future point (and not those for | 616 | a given event type is enabled a future point (and not those for |
613 | whatever event was previously enabled). | 617 | whatever event was previously enabled). |
614 | 618 | ||
619 | What: /sys/.../events/in_accel_thresh_rising_value | ||
620 | What: /sys/.../events/in_accel_thresh_falling_value | ||
615 | What: /sys/.../events/in_accel_x_raw_thresh_rising_value | 621 | What: /sys/.../events/in_accel_x_raw_thresh_rising_value |
616 | What: /sys/.../events/in_accel_x_raw_thresh_falling_value | 622 | What: /sys/.../events/in_accel_x_raw_thresh_falling_value |
617 | What: /sys/.../events/in_accel_y_raw_thresh_rising_value | 623 | What: /sys/.../events/in_accel_y_raw_thresh_rising_value |
@@ -661,6 +667,24 @@ Description: | |||
661 | value is in raw device units or in processed units (as _raw | 667 | value is in raw device units or in processed units (as _raw |
662 | and _input do on sysfs direct channel read attributes). | 668 | and _input do on sysfs direct channel read attributes). |
663 | 669 | ||
670 | What: /sys/.../events/in_accel_scale | ||
671 | What: /sys/.../events/in_accel_peak_scale | ||
672 | What: /sys/.../events/in_anglvel_scale | ||
673 | What: /sys/.../events/in_magn_scale | ||
674 | What: /sys/.../events/in_rot_from_north_magnetic_scale | ||
675 | What: /sys/.../events/in_rot_from_north_true_scale | ||
676 | What: /sys/.../events/in_voltage_scale | ||
677 | What: /sys/.../events/in_voltage_supply_scale | ||
678 | What: /sys/.../events/in_temp_scale | ||
679 | What: /sys/.../events/in_illuminance_scale | ||
680 | What: /sys/.../events/in_proximity_scale | ||
681 | KernelVersion: 3.21 | ||
682 | Contact: linux-iio@vger.kernel.org | ||
683 | Description: | ||
684 | Specifies the conversion factor from the standard units | ||
685 | to device specific units used to set the event trigger | ||
686 | threshold. | ||
687 | |||
664 | What: /sys/.../events/in_accel_x_thresh_rising_hysteresis | 688 | What: /sys/.../events/in_accel_x_thresh_rising_hysteresis |
665 | What: /sys/.../events/in_accel_x_thresh_falling_hysteresis | 689 | What: /sys/.../events/in_accel_x_thresh_falling_hysteresis |
666 | What: /sys/.../events/in_accel_x_thresh_either_hysteresis | 690 | What: /sys/.../events/in_accel_x_thresh_either_hysteresis |
@@ -776,7 +800,7 @@ Description: | |||
776 | 800 | ||
777 | What: /sys/.../events/in_accel_x_thresh_rising_period | 801 | What: /sys/.../events/in_accel_x_thresh_rising_period |
778 | What: /sys/.../events/in_accel_x_thresh_falling_period | 802 | What: /sys/.../events/in_accel_x_thresh_falling_period |
779 | hat: /sys/.../events/in_accel_x_roc_rising_period | 803 | What: /sys/.../events/in_accel_x_roc_rising_period |
780 | What: /sys/.../events/in_accel_x_roc_falling_period | 804 | What: /sys/.../events/in_accel_x_roc_falling_period |
781 | What: /sys/.../events/in_accel_y_thresh_rising_period | 805 | What: /sys/.../events/in_accel_y_thresh_rising_period |
782 | What: /sys/.../events/in_accel_y_thresh_falling_period | 806 | What: /sys/.../events/in_accel_y_thresh_falling_period |
@@ -923,7 +947,7 @@ Description: | |||
923 | this type. | 947 | this type. |
924 | 948 | ||
925 | What: /sys/.../events/in_steps_change_en | 949 | What: /sys/.../events/in_steps_change_en |
926 | KernelVersion: 3.20 | 950 | KernelVersion: 4.0 |
927 | Contact: linux-iio@vger.kernel.org | 951 | Contact: linux-iio@vger.kernel.org |
928 | Description: | 952 | Description: |
929 | Event generated when channel passes a threshold on the absolute | 953 | Event generated when channel passes a threshold on the absolute |
@@ -932,7 +956,7 @@ Description: | |||
932 | in_steps_change_value. | 956 | in_steps_change_value. |
933 | 957 | ||
934 | What: /sys/.../events/in_steps_change_value | 958 | What: /sys/.../events/in_steps_change_value |
935 | KernelVersion: 3.20 | 959 | KernelVersion: 4.0 |
936 | Contact: linux-iio@vger.kernel.org | 960 | Contact: linux-iio@vger.kernel.org |
937 | Description: | 961 | Description: |
938 | Specifies the value of change threshold that the | 962 | Specifies the value of change threshold that the |
@@ -997,6 +1021,7 @@ What: /sys/.../iio:deviceX/scan_elements/in_incli_y_en | |||
997 | What: /sys/.../iio:deviceX/scan_elements/in_pressureY_en | 1021 | What: /sys/.../iio:deviceX/scan_elements/in_pressureY_en |
998 | What: /sys/.../iio:deviceX/scan_elements/in_pressure_en | 1022 | What: /sys/.../iio:deviceX/scan_elements/in_pressure_en |
999 | What: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_en | 1023 | What: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_en |
1024 | What: /sys/.../iio:deviceX/scan_elements/in_proximity_en | ||
1000 | KernelVersion: 2.6.37 | 1025 | KernelVersion: 2.6.37 |
1001 | Contact: linux-iio@vger.kernel.org | 1026 | Contact: linux-iio@vger.kernel.org |
1002 | Description: | 1027 | Description: |
@@ -1013,6 +1038,7 @@ What: /sys/.../iio:deviceX/scan_elements/in_timestamp_type | |||
1013 | What: /sys/.../iio:deviceX/scan_elements/in_pressureY_type | 1038 | What: /sys/.../iio:deviceX/scan_elements/in_pressureY_type |
1014 | What: /sys/.../iio:deviceX/scan_elements/in_pressure_type | 1039 | What: /sys/.../iio:deviceX/scan_elements/in_pressure_type |
1015 | What: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_type | 1040 | What: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_type |
1041 | What: /sys/.../iio:deviceX/scan_elements/in_proximity_type | ||
1016 | KernelVersion: 2.6.37 | 1042 | KernelVersion: 2.6.37 |
1017 | Contact: linux-iio@vger.kernel.org | 1043 | Contact: linux-iio@vger.kernel.org |
1018 | Description: | 1044 | Description: |
@@ -1064,6 +1090,7 @@ What: /sys/.../iio:deviceX/scan_elements/in_timestamp_index | |||
1064 | What: /sys/.../iio:deviceX/scan_elements/in_pressureY_index | 1090 | What: /sys/.../iio:deviceX/scan_elements/in_pressureY_index |
1065 | What: /sys/.../iio:deviceX/scan_elements/in_pressure_index | 1091 | What: /sys/.../iio:deviceX/scan_elements/in_pressure_index |
1066 | What: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_index | 1092 | What: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_index |
1093 | What: /sys/.../iio:deviceX/scan_elements/in_proximity_index | ||
1067 | KernelVersion: 2.6.37 | 1094 | KernelVersion: 2.6.37 |
1068 | Contact: linux-iio@vger.kernel.org | 1095 | Contact: linux-iio@vger.kernel.org |
1069 | Description: | 1096 | Description: |
@@ -1104,7 +1131,7 @@ Description: | |||
1104 | 1131 | ||
1105 | What: /sys/.../iio:deviceX/in_energy_input | 1132 | What: /sys/.../iio:deviceX/in_energy_input |
1106 | What: /sys/.../iio:deviceX/in_energy_raw | 1133 | What: /sys/.../iio:deviceX/in_energy_raw |
1107 | KernelVersion: 3.20 | 1134 | KernelVersion: 4.0 |
1108 | Contact: linux-iio@vger.kernel.org | 1135 | Contact: linux-iio@vger.kernel.org |
1109 | Description: | 1136 | Description: |
1110 | This attribute is used to read the energy value reported by the | 1137 | This attribute is used to read the energy value reported by the |
@@ -1113,7 +1140,7 @@ Description: | |||
1113 | 1140 | ||
1114 | What: /sys/.../iio:deviceX/in_distance_input | 1141 | What: /sys/.../iio:deviceX/in_distance_input |
1115 | What: /sys/.../iio:deviceX/in_distance_raw | 1142 | What: /sys/.../iio:deviceX/in_distance_raw |
1116 | KernelVersion: 3.20 | 1143 | KernelVersion: 4.0 |
1117 | Contact: linux-iio@vger.kernel.org | 1144 | Contact: linux-iio@vger.kernel.org |
1118 | Description: | 1145 | Description: |
1119 | This attribute is used to read the distance covered by the user | 1146 | This attribute is used to read the distance covered by the user |
@@ -1143,9 +1170,13 @@ Description: | |||
1143 | values should behave in the same way as a distance, i.e. lower | 1170 | values should behave in the same way as a distance, i.e. lower |
1144 | values indicate something is closer to the sensor. | 1171 | values indicate something is closer to the sensor. |
1145 | 1172 | ||
1173 | What: /sys/.../iio:deviceX/in_illuminance_input | ||
1174 | What: /sys/.../iio:deviceX/in_illuminance_raw | ||
1146 | What: /sys/.../iio:deviceX/in_illuminanceY_input | 1175 | What: /sys/.../iio:deviceX/in_illuminanceY_input |
1147 | What: /sys/.../iio:deviceX/in_illuminanceY_raw | 1176 | What: /sys/.../iio:deviceX/in_illuminanceY_raw |
1148 | What: /sys/.../iio:deviceX/in_illuminanceY_mean_raw | 1177 | What: /sys/.../iio:deviceX/in_illuminanceY_mean_raw |
1178 | What: /sys/.../iio:deviceX/in_illuminance_ir_raw | ||
1179 | What: /sys/.../iio:deviceX/in_illuminance_clear_raw | ||
1149 | KernelVersion: 3.4 | 1180 | KernelVersion: 3.4 |
1150 | Contact: linux-iio@vger.kernel.org | 1181 | Contact: linux-iio@vger.kernel.org |
1151 | Description: | 1182 | Description: |
@@ -1174,7 +1205,7 @@ Description: | |||
1174 | seconds. | 1205 | seconds. |
1175 | 1206 | ||
1176 | What: /sys/.../iio:deviceX/in_velocity_sqrt(x^2+y^2+z^2)_integration_time | 1207 | What: /sys/.../iio:deviceX/in_velocity_sqrt(x^2+y^2+z^2)_integration_time |
1177 | KernelVersion: 3.20 | 1208 | KernelVersion: 4.0 |
1178 | Contact: linux-iio@vger.kernel.org | 1209 | Contact: linux-iio@vger.kernel.org |
1179 | Description: | 1210 | Description: |
1180 | Number of seconds in which to compute speed. | 1211 | Number of seconds in which to compute speed. |
@@ -1236,7 +1267,7 @@ Description: | |||
1236 | Units after application of scale are m/s. | 1267 | Units after application of scale are m/s. |
1237 | 1268 | ||
1238 | What: /sys/.../iio:deviceX/in_steps_debounce_count | 1269 | What: /sys/.../iio:deviceX/in_steps_debounce_count |
1239 | KernelVersion: 3.20 | 1270 | KernelVersion: 4.0 |
1240 | Contact: linux-iio@vger.kernel.org | 1271 | Contact: linux-iio@vger.kernel.org |
1241 | Description: | 1272 | Description: |
1242 | Specifies the number of steps that must occur within | 1273 | Specifies the number of steps that must occur within |
@@ -1244,8 +1275,92 @@ Description: | |||
1244 | consumer is making steps. | 1275 | consumer is making steps. |
1245 | 1276 | ||
1246 | What: /sys/.../iio:deviceX/in_steps_debounce_time | 1277 | What: /sys/.../iio:deviceX/in_steps_debounce_time |
1247 | KernelVersion: 3.20 | 1278 | KernelVersion: 4.0 |
1248 | Contact: linux-iio@vger.kernel.org | 1279 | Contact: linux-iio@vger.kernel.org |
1249 | Description: | 1280 | Description: |
1250 | Specifies number of seconds in which we compute the steps | 1281 | Specifies number of seconds in which we compute the steps |
1251 | that occur in order to decide if the consumer is making steps. | 1282 | that occur in order to decide if the consumer is making steps. |
1283 | |||
1284 | What: /sys/bus/iio/devices/iio:deviceX/buffer/watermark | ||
1285 | KernelVersion: 4.2 | ||
1286 | Contact: linux-iio@vger.kernel.org | ||
1287 | Description: | ||
1288 | A single positive integer specifying the maximum number of scan | ||
1289 | elements to wait for. | ||
1290 | Poll will block until the watermark is reached. | ||
1291 | Blocking read will wait until the minimum between the requested | ||
1292 | read amount or the low water mark is available. | ||
1293 | Non-blocking read will retrieve the available samples from the | ||
1294 | buffer even if there are less samples then watermark level. This | ||
1295 | allows the application to block on poll with a timeout and read | ||
1296 | the available samples after the timeout expires and thus have a | ||
1297 | maximum delay guarantee. | ||
1298 | |||
1299 | What: /sys/bus/iio/devices/iio:deviceX/buffer/hwfifo_enabled | ||
1300 | KernelVersion: 4.2 | ||
1301 | Contact: linux-iio@vger.kernel.org | ||
1302 | Description: | ||
1303 | A read-only boolean value that indicates if the hardware fifo is | ||
1304 | currently enabled or disabled. If the device does not have a | ||
1305 | hardware fifo this entry is not present. | ||
1306 | The hardware fifo is enabled when the buffer is enabled if the | ||
1307 | current hardware fifo watermark level is set and other current | ||
1308 | device settings allows it (e.g. if a trigger is set that samples | ||
1309 | data differently that the hardware fifo does then hardware fifo | ||
1310 | will not enabled). | ||
1311 | If the hardware fifo is enabled and the level of the hardware | ||
1312 | fifo reaches the hardware fifo watermark level the device will | ||
1313 | flush its hardware fifo to the device buffer. Doing a non | ||
1314 | blocking read on the device when no samples are present in the | ||
1315 | device buffer will also force a flush. | ||
1316 | When the hardware fifo is enabled there is no need to use a | ||
1317 | trigger to use buffer mode since the watermark settings | ||
1318 | guarantees that the hardware fifo is flushed to the device | ||
1319 | buffer. | ||
1320 | |||
1321 | What: /sys/bus/iio/devices/iio:deviceX/buffer/hwfifo_watermark | ||
1322 | KernelVersion: 4.2 | ||
1323 | Contact: linux-iio@vger.kernel.org | ||
1324 | Description: | ||
1325 | Read-only entry that contains a single integer specifying the | ||
1326 | current watermark level for the hardware fifo. If the device | ||
1327 | does not have a hardware fifo this entry is not present. | ||
1328 | The watermark level for the hardware fifo is set by the driver | ||
1329 | based on the value set by the user in buffer/watermark but | ||
1330 | taking into account hardware limitations (e.g. most hardware | ||
1331 | buffers are limited to 32-64 samples, some hardware buffers | ||
1332 | watermarks are fixed or have minimum levels). A value of 0 | ||
1333 | means that the hardware watermark is unset. | ||
1334 | |||
1335 | What: /sys/bus/iio/devices/iio:deviceX/buffer/hwfifo_watermark_min | ||
1336 | KernelVersion: 4.2 | ||
1337 | Contact: linux-iio@vger.kernel.org | ||
1338 | Description: | ||
1339 | A single positive integer specifying the minimum watermark level | ||
1340 | for the hardware fifo of this device. If the device does not | ||
1341 | have a hardware fifo this entry is not present. | ||
1342 | If the user sets buffer/watermark to a value less than this one, | ||
1343 | then the hardware watermark will remain unset. | ||
1344 | |||
1345 | What: /sys/bus/iio/devices/iio:deviceX/buffer/hwfifo_watermark_max | ||
1346 | KernelVersion: 4.2 | ||
1347 | Contact: linux-iio@vger.kernel.org | ||
1348 | Description: | ||
1349 | A single positive integer specifying the maximum watermark level | ||
1350 | for the hardware fifo of this device. If the device does not | ||
1351 | have a hardware fifo this entry is not present. | ||
1352 | If the user sets buffer/watermark to a value greater than this | ||
1353 | one, then the hardware watermark will be capped at this value. | ||
1354 | |||
1355 | What: /sys/bus/iio/devices/iio:deviceX/buffer/hwfifo_watermark_available | ||
1356 | KernelVersion: 4.2 | ||
1357 | Contact: linux-iio@vger.kernel.org | ||
1358 | Description: | ||
1359 | A list of positive integers specifying the available watermark | ||
1360 | levels for the hardware fifo. This entry is optional and if it | ||
1361 | is not present it means that all the values between | ||
1362 | hwfifo_watermark_min and hwfifo_watermark_max are supported. | ||
1363 | If the user sets buffer/watermark to a value greater than | ||
1364 | hwfifo_watermak_min but not equal to any of the values in this | ||
1365 | list, the driver will chose an appropriate value for the | ||
1366 | hardware fifo watermark level. | ||
diff --git a/Documentation/ABI/testing/sysfs-class-cxl b/Documentation/ABI/testing/sysfs-class-cxl index 3680364b4048..d46bba801aac 100644 --- a/Documentation/ABI/testing/sysfs-class-cxl +++ b/Documentation/ABI/testing/sysfs-class-cxl | |||
@@ -100,7 +100,7 @@ Description: read only | |||
100 | Hexadecimal value of the device ID found in this AFU | 100 | Hexadecimal value of the device ID found in this AFU |
101 | configuration record. | 101 | configuration record. |
102 | 102 | ||
103 | What: /sys/class/cxl/<afu>/cr<config num>/vendor | 103 | What: /sys/class/cxl/<afu>/cr<config num>/class |
104 | Date: February 2015 | 104 | Date: February 2015 |
105 | Contact: linuxppc-dev@lists.ozlabs.org | 105 | Contact: linuxppc-dev@lists.ozlabs.org |
106 | Description: read only | 106 | Description: read only |
diff --git a/Documentation/ABI/testing/sysfs-class-led-flash b/Documentation/ABI/testing/sysfs-class-led-flash new file mode 100644 index 000000000000..220a0270b47b --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-led-flash | |||
@@ -0,0 +1,80 @@ | |||
1 | What: /sys/class/leds/<led>/flash_brightness | ||
2 | Date: March 2015 | ||
3 | KernelVersion: 4.0 | ||
4 | Contact: Jacek Anaszewski <j.anaszewski@samsung.com> | ||
5 | Description: read/write | ||
6 | Set the brightness of this LED in the flash strobe mode, in | ||
7 | microamperes. The file is created only for the flash LED devices | ||
8 | that support setting flash brightness. | ||
9 | |||
10 | The value is between 0 and | ||
11 | /sys/class/leds/<led>/max_flash_brightness. | ||
12 | |||
13 | What: /sys/class/leds/<led>/max_flash_brightness | ||
14 | Date: March 2015 | ||
15 | KernelVersion: 4.0 | ||
16 | Contact: Jacek Anaszewski <j.anaszewski@samsung.com> | ||
17 | Description: read only | ||
18 | Maximum brightness level for this LED in the flash strobe mode, | ||
19 | in microamperes. | ||
20 | |||
21 | What: /sys/class/leds/<led>/flash_timeout | ||
22 | Date: March 2015 | ||
23 | KernelVersion: 4.0 | ||
24 | Contact: Jacek Anaszewski <j.anaszewski@samsung.com> | ||
25 | Description: read/write | ||
26 | Hardware timeout for flash, in microseconds. The flash strobe | ||
27 | is stopped after this period of time has passed from the start | ||
28 | of the strobe. The file is created only for the flash LED | ||
29 | devices that support setting flash timeout. | ||
30 | |||
31 | What: /sys/class/leds/<led>/max_flash_timeout | ||
32 | Date: March 2015 | ||
33 | KernelVersion: 4.0 | ||
34 | Contact: Jacek Anaszewski <j.anaszewski@samsung.com> | ||
35 | Description: read only | ||
36 | Maximum flash timeout for this LED, in microseconds. | ||
37 | |||
38 | What: /sys/class/leds/<led>/flash_strobe | ||
39 | Date: March 2015 | ||
40 | KernelVersion: 4.0 | ||
41 | Contact: Jacek Anaszewski <j.anaszewski@samsung.com> | ||
42 | Description: read/write | ||
43 | Flash strobe state. When written with 1 it triggers flash strobe | ||
44 | and when written with 0 it turns the flash off. | ||
45 | |||
46 | On read 1 means that flash is currently strobing and 0 means | ||
47 | that flash is off. | ||
48 | |||
49 | What: /sys/class/leds/<led>/flash_fault | ||
50 | Date: March 2015 | ||
51 | KernelVersion: 4.0 | ||
52 | Contact: Jacek Anaszewski <j.anaszewski@samsung.com> | ||
53 | Description: read only | ||
54 | Space separated list of flash faults that may have occurred. | ||
55 | Flash faults are re-read after strobing the flash. Possible | ||
56 | flash faults: | ||
57 | |||
58 | * led-over-voltage - flash controller voltage to the flash LED | ||
59 | has exceeded the limit specific to the flash controller | ||
60 | * flash-timeout-exceeded - the flash strobe was still on when | ||
61 | the timeout set by the user has expired; not all flash | ||
62 | controllers may set this in all such conditions | ||
63 | * controller-over-temperature - the flash controller has | ||
64 | overheated | ||
65 | * controller-short-circuit - the short circuit protection | ||
66 | of the flash controller has been triggered | ||
67 | * led-power-supply-over-current - current in the LED power | ||
68 | supply has exceeded the limit specific to the flash | ||
69 | controller | ||
70 | * indicator-led-fault - the flash controller has detected | ||
71 | a short or open circuit condition on the indicator LED | ||
72 | * led-under-voltage - flash controller voltage to the flash | ||
73 | LED has been below the minimum limit specific to | ||
74 | the flash | ||
75 | * controller-under-voltage - the input voltage of the flash | ||
76 | controller is below the limit under which strobing the | ||
77 | flash at full current will not be possible; | ||
78 | the condition persists until this flag is no longer set | ||
79 | * led-over-temperature - the temperature of the LED has exceeded | ||
80 | its allowed upper limit | ||
diff --git a/Documentation/ABI/testing/sysfs-class-net b/Documentation/ABI/testing/sysfs-class-net index beb8ec4dabbc..5ecfd72ba684 100644 --- a/Documentation/ABI/testing/sysfs-class-net +++ b/Documentation/ABI/testing/sysfs-class-net | |||
@@ -188,6 +188,14 @@ Description: | |||
188 | Indicates the interface unique physical port identifier within | 188 | Indicates the interface unique physical port identifier within |
189 | the NIC, as a string. | 189 | the NIC, as a string. |
190 | 190 | ||
191 | What: /sys/class/net/<iface>/phys_port_name | ||
192 | Date: March 2015 | ||
193 | KernelVersion: 4.0 | ||
194 | Contact: netdev@vger.kernel.org | ||
195 | Description: | ||
196 | Indicates the interface physical port name within the NIC, | ||
197 | as a string. | ||
198 | |||
191 | What: /sys/class/net/<iface>/speed | 199 | What: /sys/class/net/<iface>/speed |
192 | Date: October 2009 | 200 | Date: October 2009 |
193 | KernelVersion: 2.6.33 | 201 | KernelVersion: 2.6.33 |
diff --git a/Documentation/ABI/testing/sysfs-class-net-queues b/Documentation/ABI/testing/sysfs-class-net-queues index 5e9aeb91d355..0c0df91b1516 100644 --- a/Documentation/ABI/testing/sysfs-class-net-queues +++ b/Documentation/ABI/testing/sysfs-class-net-queues | |||
@@ -24,6 +24,14 @@ Description: | |||
24 | Indicates the number of transmit timeout events seen by this | 24 | Indicates the number of transmit timeout events seen by this |
25 | network interface transmit queue. | 25 | network interface transmit queue. |
26 | 26 | ||
27 | What: /sys/class/<iface>/queues/tx-<queue>/tx_maxrate | ||
28 | Date: March 2015 | ||
29 | KernelVersion: 4.1 | ||
30 | Contact: netdev@vger.kernel.org | ||
31 | Description: | ||
32 | A Mbps max-rate set for the queue, a value of zero means disabled, | ||
33 | default is disabled. | ||
34 | |||
27 | What: /sys/class/<iface>/queues/tx-<queue>/xps_cpus | 35 | What: /sys/class/<iface>/queues/tx-<queue>/xps_cpus |
28 | Date: November 2010 | 36 | Date: November 2010 |
29 | KernelVersion: 2.6.38 | 37 | KernelVersion: 2.6.38 |
diff --git a/Documentation/ABI/testing/sysfs-driver-hid b/Documentation/ABI/testing/sysfs-driver-hid index b6490e14fe83..48942cacb0bf 100644 --- a/Documentation/ABI/testing/sysfs-driver-hid +++ b/Documentation/ABI/testing/sysfs-driver-hid | |||
@@ -8,3 +8,13 @@ Description: When read, this file returns the device's raw binary HID | |||
8 | report descriptor. | 8 | report descriptor. |
9 | This file cannot be written. | 9 | This file cannot be written. |
10 | Users: HIDAPI library (http://www.signal11.us/oss/hidapi) | 10 | Users: HIDAPI library (http://www.signal11.us/oss/hidapi) |
11 | |||
12 | What: For USB devices : /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/country | ||
13 | For BT devices : /sys/class/bluetooth/hci<addr>/<hid-bus>:<vendor-id>:<product-id>.<num>/country | ||
14 | Symlink : /sys/class/hidraw/hidraw<num>/device/country | ||
15 | Date: February 2015 | ||
16 | KernelVersion: 3.19 | ||
17 | Contact: Olivier Gay <ogay@logitech.com> | ||
18 | Description: When read, this file returns the hex integer value in ASCII | ||
19 | of the device's HID country code (e.g. 21 for US). | ||
20 | This file cannot be written. | ||
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-logitech-lg4ff b/Documentation/ABI/testing/sysfs-driver-hid-logitech-lg4ff index 167d9032b970..b3f6a2ac5007 100644 --- a/Documentation/ABI/testing/sysfs-driver-hid-logitech-lg4ff +++ b/Documentation/ABI/testing/sysfs-driver-hid-logitech-lg4ff | |||
@@ -5,3 +5,48 @@ Contact: Michal Malý <madcatxster@gmail.com> | |||
5 | Description: Display minimum, maximum and current range of the steering | 5 | Description: Display minimum, maximum and current range of the steering |
6 | wheel. Writing a value within min and max boundaries sets the | 6 | wheel. Writing a value within min and max boundaries sets the |
7 | range of the wheel. | 7 | range of the wheel. |
8 | |||
9 | What: /sys/bus/hid/drivers/logitech/<dev>/alternate_modes | ||
10 | Date: Feb 2015 | ||
11 | KernelVersion: 4.1 | ||
12 | Contact: Michal Malý <madcatxster@gmail.com> | ||
13 | Description: Displays a set of alternate modes supported by a wheel. Each | ||
14 | mode is listed as follows: | ||
15 | Tag: Mode Name | ||
16 | Currently active mode is marked with an asterisk. List also | ||
17 | contains an abstract item "native" which always denotes the | ||
18 | native mode of the wheel. Echoing the mode tag switches the | ||
19 | wheel into the corresponding mode. Depending on the exact model | ||
20 | of the wheel not all listed modes might always be selectable. | ||
21 | If a wheel cannot be switched into the desired mode, -EINVAL | ||
22 | is returned accompanied with an explanatory message in the | ||
23 | kernel log. | ||
24 | This entry is not created for devices that have only one mode. | ||
25 | |||
26 | Currently supported mode switches: | ||
27 | Driving Force Pro: | ||
28 | DF-EX --> DFP | ||
29 | |||
30 | G25: | ||
31 | DF-EX --> DFP --> G25 | ||
32 | |||
33 | G27: | ||
34 | DF-EX <*> DFP <-> G25 <-> G27 | ||
35 | DF-EX <*--------> G25 <-> G27 | ||
36 | DF-EX <*----------------> G27 | ||
37 | |||
38 | DFGT: | ||
39 | DF-EX <*> DFP <-> DFGT | ||
40 | DF-EX <*--------> DFGT | ||
41 | |||
42 | * hid_logitech module must be loaded with lg4ff_no_autoswitch=1 | ||
43 | parameter set in order for the switch to DF-EX mode to work. | ||
44 | |||
45 | What: /sys/bus/hid/drivers/logitech/<dev>/real_id | ||
46 | Date: Feb 2015 | ||
47 | KernelVersion: 4.1 | ||
48 | Contact: Michal Malý <madcatxster@gmail.com> | ||
49 | Description: Displays the real model of the wheel regardless of any | ||
50 | alternate mode the wheel might be switched to. | ||
51 | It is a read-only value. | ||
52 | This entry is not created for devices that have only one mode. | ||
diff --git a/Documentation/CodeOfConflict b/Documentation/CodeOfConflict new file mode 100644 index 000000000000..1684d0b4efa6 --- /dev/null +++ b/Documentation/CodeOfConflict | |||
@@ -0,0 +1,27 @@ | |||
1 | Code of Conflict | ||
2 | ---------------- | ||
3 | |||
4 | The Linux kernel development effort is a very personal process compared | ||
5 | to "traditional" ways of developing software. Your code and ideas | ||
6 | behind it will be carefully reviewed, often resulting in critique and | ||
7 | criticism. The review will almost always require improvements to the | ||
8 | code before it can be included in the kernel. Know that this happens | ||
9 | because everyone involved wants to see the best possible solution for | ||
10 | the overall success of Linux. This development process has been proven | ||
11 | to create the most robust operating system kernel ever, and we do not | ||
12 | want to do anything to cause the quality of submission and eventual | ||
13 | result to ever decrease. | ||
14 | |||
15 | If however, anyone feels personally abused, threatened, or otherwise | ||
16 | uncomfortable due to this process, that is not acceptable. If so, | ||
17 | please contact the Linux Foundation's Technical Advisory Board at | ||
18 | <tab@lists.linux-foundation.org>, or the individual members, and they | ||
19 | will work to resolve the issue to the best of their ability. For more | ||
20 | information on who is on the Technical Advisory Board and what their | ||
21 | role is, please see: | ||
22 | http://www.linuxfoundation.org/programs/advisory-councils/tab | ||
23 | |||
24 | As a reviewer of code, please strive to keep things civil and focused on | ||
25 | the technical issues involved. We are all humans, and frustrations can | ||
26 | be high on both sides of the process. Try to keep in mind the immortal | ||
27 | words of Bill and Ted, "Be excellent to each other." | ||
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle index 449a8a19fc21..f4b78eafd92a 100644 --- a/Documentation/CodingStyle +++ b/Documentation/CodingStyle | |||
@@ -13,7 +13,7 @@ and NOT read it. Burn them, it's a great symbolic gesture. | |||
13 | Anyway, here goes: | 13 | Anyway, here goes: |
14 | 14 | ||
15 | 15 | ||
16 | Chapter 1: Indentation | 16 | Chapter 1: Indentation |
17 | 17 | ||
18 | Tabs are 8 characters, and thus indentations are also 8 characters. | 18 | Tabs are 8 characters, and thus indentations are also 8 characters. |
19 | There are heretic movements that try to make indentations 4 (or even 2!) | 19 | There are heretic movements that try to make indentations 4 (or even 2!) |
@@ -56,7 +56,6 @@ instead of "double-indenting" the "case" labels. E.g.: | |||
56 | break; | 56 | break; |
57 | } | 57 | } |
58 | 58 | ||
59 | |||
60 | Don't put multiple statements on a single line unless you have | 59 | Don't put multiple statements on a single line unless you have |
61 | something to hide: | 60 | something to hide: |
62 | 61 | ||
@@ -156,25 +155,25 @@ comments on. | |||
156 | 155 | ||
157 | Do not unnecessarily use braces where a single statement will do. | 156 | Do not unnecessarily use braces where a single statement will do. |
158 | 157 | ||
159 | if (condition) | 158 | if (condition) |
160 | action(); | 159 | action(); |
161 | 160 | ||
162 | and | 161 | and |
163 | 162 | ||
164 | if (condition) | 163 | if (condition) |
165 | do_this(); | 164 | do_this(); |
166 | else | 165 | else |
167 | do_that(); | 166 | do_that(); |
168 | 167 | ||
169 | This does not apply if only one branch of a conditional statement is a single | 168 | This does not apply if only one branch of a conditional statement is a single |
170 | statement; in the latter case use braces in both branches: | 169 | statement; in the latter case use braces in both branches: |
171 | 170 | ||
172 | if (condition) { | 171 | if (condition) { |
173 | do_this(); | 172 | do_this(); |
174 | do_that(); | 173 | do_that(); |
175 | } else { | 174 | } else { |
176 | otherwise(); | 175 | otherwise(); |
177 | } | 176 | } |
178 | 177 | ||
179 | 3.1: Spaces | 178 | 3.1: Spaces |
180 | 179 | ||
@@ -186,8 +185,11 @@ although they are not required in the language, as in: "sizeof info" after | |||
186 | "struct fileinfo info;" is declared). | 185 | "struct fileinfo info;" is declared). |
187 | 186 | ||
188 | So use a space after these keywords: | 187 | So use a space after these keywords: |
188 | |||
189 | if, switch, case, for, do, while | 189 | if, switch, case, for, do, while |
190 | |||
190 | but not with sizeof, typeof, alignof, or __attribute__. E.g., | 191 | but not with sizeof, typeof, alignof, or __attribute__. E.g., |
192 | |||
191 | s = sizeof(struct file); | 193 | s = sizeof(struct file); |
192 | 194 | ||
193 | Do not add spaces around (inside) parenthesized expressions. This example is | 195 | Do not add spaces around (inside) parenthesized expressions. This example is |
@@ -209,12 +211,15 @@ such as any of these: | |||
209 | = + - < > * / % | & ^ <= >= == != ? : | 211 | = + - < > * / % | & ^ <= >= == != ? : |
210 | 212 | ||
211 | but no space after unary operators: | 213 | but no space after unary operators: |
214 | |||
212 | & * + - ~ ! sizeof typeof alignof __attribute__ defined | 215 | & * + - ~ ! sizeof typeof alignof __attribute__ defined |
213 | 216 | ||
214 | no space before the postfix increment & decrement unary operators: | 217 | no space before the postfix increment & decrement unary operators: |
218 | |||
215 | ++ -- | 219 | ++ -- |
216 | 220 | ||
217 | no space after the prefix increment & decrement unary operators: | 221 | no space after the prefix increment & decrement unary operators: |
222 | |||
218 | ++ -- | 223 | ++ -- |
219 | 224 | ||
220 | and no space around the '.' and "->" structure member operators. | 225 | and no space around the '.' and "->" structure member operators. |
@@ -268,13 +273,11 @@ See chapter 6 (Functions). | |||
268 | Chapter 5: Typedefs | 273 | Chapter 5: Typedefs |
269 | 274 | ||
270 | Please don't use things like "vps_t". | 275 | Please don't use things like "vps_t". |
271 | |||
272 | It's a _mistake_ to use typedef for structures and pointers. When you see a | 276 | It's a _mistake_ to use typedef for structures and pointers. When you see a |
273 | 277 | ||
274 | vps_t a; | 278 | vps_t a; |
275 | 279 | ||
276 | in the source, what does it mean? | 280 | in the source, what does it mean? |
277 | |||
278 | In contrast, if it says | 281 | In contrast, if it says |
279 | 282 | ||
280 | struct virtual_container *a; | 283 | struct virtual_container *a; |
@@ -372,11 +375,11 @@ In source files, separate functions with one blank line. If the function is | |||
372 | exported, the EXPORT* macro for it should follow immediately after the closing | 375 | exported, the EXPORT* macro for it should follow immediately after the closing |
373 | function brace line. E.g.: | 376 | function brace line. E.g.: |
374 | 377 | ||
375 | int system_is_up(void) | 378 | int system_is_up(void) |
376 | { | 379 | { |
377 | return system_state == SYSTEM_RUNNING; | 380 | return system_state == SYSTEM_RUNNING; |
378 | } | 381 | } |
379 | EXPORT_SYMBOL(system_is_up); | 382 | EXPORT_SYMBOL(system_is_up); |
380 | 383 | ||
381 | In function prototypes, include parameter names with their data types. | 384 | In function prototypes, include parameter names with their data types. |
382 | Although this is not required by the C language, it is preferred in Linux | 385 | Although this is not required by the C language, it is preferred in Linux |
@@ -405,34 +408,34 @@ The rationale for using gotos is: | |||
405 | modifications are prevented | 408 | modifications are prevented |
406 | - saves the compiler work to optimize redundant code away ;) | 409 | - saves the compiler work to optimize redundant code away ;) |
407 | 410 | ||
408 | int fun(int a) | 411 | int fun(int a) |
409 | { | 412 | { |
410 | int result = 0; | 413 | int result = 0; |
411 | char *buffer; | 414 | char *buffer; |
412 | 415 | ||
413 | buffer = kmalloc(SIZE, GFP_KERNEL); | 416 | buffer = kmalloc(SIZE, GFP_KERNEL); |
414 | if (!buffer) | 417 | if (!buffer) |
415 | return -ENOMEM; | 418 | return -ENOMEM; |
416 | 419 | ||
417 | if (condition1) { | 420 | if (condition1) { |
418 | while (loop1) { | 421 | while (loop1) { |
419 | ... | 422 | ... |
423 | } | ||
424 | result = 1; | ||
425 | goto out_buffer; | ||
420 | } | 426 | } |
421 | result = 1; | 427 | ... |
422 | goto out_buffer; | 428 | out_buffer: |
429 | kfree(buffer); | ||
430 | return result; | ||
423 | } | 431 | } |
424 | ... | ||
425 | out_buffer: | ||
426 | kfree(buffer); | ||
427 | return result; | ||
428 | } | ||
429 | 432 | ||
430 | A common type of bug to be aware of it "one err bugs" which look like this: | 433 | A common type of bug to be aware of it "one err bugs" which look like this: |
431 | 434 | ||
432 | err: | 435 | err: |
433 | kfree(foo->bar); | 436 | kfree(foo->bar); |
434 | kfree(foo); | 437 | kfree(foo); |
435 | return ret; | 438 | return ret; |
436 | 439 | ||
437 | The bug in this code is that on some exit paths "foo" is NULL. Normally the | 440 | The bug in this code is that on some exit paths "foo" is NULL. Normally the |
438 | fix for this is to split it up into two error labels "err_bar:" and "err_foo:". | 441 | fix for this is to split it up into two error labels "err_bar:" and "err_foo:". |
@@ -503,9 +506,9 @@ values. To do the latter, you can stick the following in your .emacs file: | |||
503 | (defun c-lineup-arglist-tabs-only (ignored) | 506 | (defun c-lineup-arglist-tabs-only (ignored) |
504 | "Line up argument lists by tabs, not spaces" | 507 | "Line up argument lists by tabs, not spaces" |
505 | (let* ((anchor (c-langelem-pos c-syntactic-element)) | 508 | (let* ((anchor (c-langelem-pos c-syntactic-element)) |
506 | (column (c-langelem-2nd-pos c-syntactic-element)) | 509 | (column (c-langelem-2nd-pos c-syntactic-element)) |
507 | (offset (- (1+ column) anchor)) | 510 | (offset (- (1+ column) anchor)) |
508 | (steps (floor offset c-basic-offset))) | 511 | (steps (floor offset c-basic-offset))) |
509 | (* (max steps 1) | 512 | (* (max steps 1) |
510 | c-basic-offset))) | 513 | c-basic-offset))) |
511 | 514 | ||
@@ -612,7 +615,7 @@ have a reference count on it, you almost certainly have a bug. | |||
612 | 615 | ||
613 | Names of macros defining constants and labels in enums are capitalized. | 616 | Names of macros defining constants and labels in enums are capitalized. |
614 | 617 | ||
615 | #define CONSTANT 0x12345 | 618 | #define CONSTANT 0x12345 |
616 | 619 | ||
617 | Enums are preferred when defining several related constants. | 620 | Enums are preferred when defining several related constants. |
618 | 621 | ||
@@ -623,28 +626,28 @@ Generally, inline functions are preferable to macros resembling functions. | |||
623 | 626 | ||
624 | Macros with multiple statements should be enclosed in a do - while block: | 627 | Macros with multiple statements should be enclosed in a do - while block: |
625 | 628 | ||
626 | #define macrofun(a, b, c) \ | 629 | #define macrofun(a, b, c) \ |
627 | do { \ | 630 | do { \ |
628 | if (a == 5) \ | 631 | if (a == 5) \ |
629 | do_this(b, c); \ | 632 | do_this(b, c); \ |
630 | } while (0) | 633 | } while (0) |
631 | 634 | ||
632 | Things to avoid when using macros: | 635 | Things to avoid when using macros: |
633 | 636 | ||
634 | 1) macros that affect control flow: | 637 | 1) macros that affect control flow: |
635 | 638 | ||
636 | #define FOO(x) \ | 639 | #define FOO(x) \ |
637 | do { \ | 640 | do { \ |
638 | if (blah(x) < 0) \ | 641 | if (blah(x) < 0) \ |
639 | return -EBUGGERED; \ | 642 | return -EBUGGERED; \ |
640 | } while(0) | 643 | } while(0) |
641 | 644 | ||
642 | is a _very_ bad idea. It looks like a function call but exits the "calling" | 645 | is a _very_ bad idea. It looks like a function call but exits the "calling" |
643 | function; don't break the internal parsers of those who will read the code. | 646 | function; don't break the internal parsers of those who will read the code. |
644 | 647 | ||
645 | 2) macros that depend on having a local variable with a magic name: | 648 | 2) macros that depend on having a local variable with a magic name: |
646 | 649 | ||
647 | #define FOO(val) bar(index, val) | 650 | #define FOO(val) bar(index, val) |
648 | 651 | ||
649 | might look like a good thing, but it's confusing as hell when one reads the | 652 | might look like a good thing, but it's confusing as hell when one reads the |
650 | code and it's prone to breakage from seemingly innocent changes. | 653 | code and it's prone to breakage from seemingly innocent changes. |
@@ -656,8 +659,21 @@ bite you if somebody e.g. turns FOO into an inline function. | |||
656 | must enclose the expression in parentheses. Beware of similar issues with | 659 | must enclose the expression in parentheses. Beware of similar issues with |
657 | macros using parameters. | 660 | macros using parameters. |
658 | 661 | ||
659 | #define CONSTANT 0x4000 | 662 | #define CONSTANT 0x4000 |
660 | #define CONSTEXP (CONSTANT | 3) | 663 | #define CONSTEXP (CONSTANT | 3) |
664 | |||
665 | 5) namespace collisions when defining local variables in macros resembling | ||
666 | functions: | ||
667 | |||
668 | #define FOO(x) \ | ||
669 | ({ \ | ||
670 | typeof(x) ret; \ | ||
671 | ret = calc_ret(x); \ | ||
672 | (ret); \ | ||
673 | )} | ||
674 | |||
675 | ret is a common name for a local variable - __foo_ret is less likely | ||
676 | to collide with an existing variable. | ||
661 | 677 | ||
662 | The cpp manual deals with macros exhaustively. The gcc internals manual also | 678 | The cpp manual deals with macros exhaustively. The gcc internals manual also |
663 | covers RTL which is used frequently with assembly language in the kernel. | 679 | covers RTL which is used frequently with assembly language in the kernel. |
@@ -796,11 +812,11 @@ you should use, rather than explicitly coding some variant of them yourself. | |||
796 | For example, if you need to calculate the length of an array, take advantage | 812 | For example, if you need to calculate the length of an array, take advantage |
797 | of the macro | 813 | of the macro |
798 | 814 | ||
799 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | 815 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) |
800 | 816 | ||
801 | Similarly, if you need to calculate the size of some structure member, use | 817 | Similarly, if you need to calculate the size of some structure member, use |
802 | 818 | ||
803 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) | 819 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) |
804 | 820 | ||
805 | There are also min() and max() macros that do strict type checking if you | 821 | There are also min() and max() macros that do strict type checking if you |
806 | need them. Feel free to peruse that header file to see what else is already | 822 | need them. Feel free to peruse that header file to see what else is already |
@@ -813,19 +829,19 @@ Some editors can interpret configuration information embedded in source files, | |||
813 | indicated with special markers. For example, emacs interprets lines marked | 829 | indicated with special markers. For example, emacs interprets lines marked |
814 | like this: | 830 | like this: |
815 | 831 | ||
816 | -*- mode: c -*- | 832 | -*- mode: c -*- |
817 | 833 | ||
818 | Or like this: | 834 | Or like this: |
819 | 835 | ||
820 | /* | 836 | /* |
821 | Local Variables: | 837 | Local Variables: |
822 | compile-command: "gcc -DMAGIC_DEBUG_FLAG foo.c" | 838 | compile-command: "gcc -DMAGIC_DEBUG_FLAG foo.c" |
823 | End: | 839 | End: |
824 | */ | 840 | */ |
825 | 841 | ||
826 | Vim interprets markers that look like this: | 842 | Vim interprets markers that look like this: |
827 | 843 | ||
828 | /* vim:set sw=8 noet */ | 844 | /* vim:set sw=8 noet */ |
829 | 845 | ||
830 | Do not include any of these in source files. People have their own personal | 846 | Do not include any of these in source files. People have their own personal |
831 | editor configurations, and your source files should not override them. This | 847 | editor configurations, and your source files should not override them. This |
@@ -902,9 +918,9 @@ At the end of any non-trivial #if or #ifdef block (more than a few lines), | |||
902 | place a comment after the #endif on the same line, noting the conditional | 918 | place a comment after the #endif on the same line, noting the conditional |
903 | expression used. For instance: | 919 | expression used. For instance: |
904 | 920 | ||
905 | #ifdef CONFIG_SOMETHING | 921 | #ifdef CONFIG_SOMETHING |
906 | ... | 922 | ... |
907 | #endif /* CONFIG_SOMETHING */ | 923 | #endif /* CONFIG_SOMETHING */ |
908 | 924 | ||
909 | 925 | ||
910 | Appendix I: References | 926 | Appendix I: References |
diff --git a/Documentation/DocBook/crypto-API.tmpl b/Documentation/DocBook/crypto-API.tmpl index 04a8c24ead47..efc8d90a9a3f 100644 --- a/Documentation/DocBook/crypto-API.tmpl +++ b/Documentation/DocBook/crypto-API.tmpl | |||
@@ -509,6 +509,270 @@ | |||
509 | select it due to the used type and mask field. | 509 | select it due to the used type and mask field. |
510 | </para> | 510 | </para> |
511 | </sect1> | 511 | </sect1> |
512 | |||
513 | <sect1><title>Internal Structure of Kernel Crypto API</title> | ||
514 | |||
515 | <para> | ||
516 | The kernel crypto API has an internal structure where a cipher | ||
517 | implementation may use many layers and indirections. This section | ||
518 | shall help to clarify how the kernel crypto API uses | ||
519 | various components to implement the complete cipher. | ||
520 | </para> | ||
521 | |||
522 | <para> | ||
523 | The following subsections explain the internal structure based | ||
524 | on existing cipher implementations. The first section addresses | ||
525 | the most complex scenario where all other scenarios form a logical | ||
526 | subset. | ||
527 | </para> | ||
528 | |||
529 | <sect2><title>Generic AEAD Cipher Structure</title> | ||
530 | |||
531 | <para> | ||
532 | The following ASCII art decomposes the kernel crypto API layers | ||
533 | when using the AEAD cipher with the automated IV generation. The | ||
534 | shown example is used by the IPSEC layer. | ||
535 | </para> | ||
536 | |||
537 | <para> | ||
538 | For other use cases of AEAD ciphers, the ASCII art applies as | ||
539 | well, but the caller may not use the GIVCIPHER interface. In | ||
540 | this case, the caller must generate the IV. | ||
541 | </para> | ||
542 | |||
543 | <para> | ||
544 | The depicted example decomposes the AEAD cipher of GCM(AES) based | ||
545 | on the generic C implementations (gcm.c, aes-generic.c, ctr.c, | ||
546 | ghash-generic.c, seqiv.c). The generic implementation serves as an | ||
547 | example showing the complete logic of the kernel crypto API. | ||
548 | </para> | ||
549 | |||
550 | <para> | ||
551 | It is possible that some streamlined cipher implementations (like | ||
552 | AES-NI) provide implementations merging aspects which in the view | ||
553 | of the kernel crypto API cannot be decomposed into layers any more. | ||
554 | In case of the AES-NI implementation, the CTR mode, the GHASH | ||
555 | implementation and the AES cipher are all merged into one cipher | ||
556 | implementation registered with the kernel crypto API. In this case, | ||
557 | the concept described by the following ASCII art applies too. However, | ||
558 | the decomposition of GCM into the individual sub-components | ||
559 | by the kernel crypto API is not done any more. | ||
560 | </para> | ||
561 | |||
562 | <para> | ||
563 | Each block in the following ASCII art is an independent cipher | ||
564 | instance obtained from the kernel crypto API. Each block | ||
565 | is accessed by the caller or by other blocks using the API functions | ||
566 | defined by the kernel crypto API for the cipher implementation type. | ||
567 | </para> | ||
568 | |||
569 | <para> | ||
570 | The blocks below indicate the cipher type as well as the specific | ||
571 | logic implemented in the cipher. | ||
572 | </para> | ||
573 | |||
574 | <para> | ||
575 | The ASCII art picture also indicates the call structure, i.e. who | ||
576 | calls which component. The arrows point to the invoked block | ||
577 | where the caller uses the API applicable to the cipher type | ||
578 | specified for the block. | ||
579 | </para> | ||
580 | |||
581 | <programlisting> | ||
582 | <![CDATA[ | ||
583 | kernel crypto API | IPSEC Layer | ||
584 | | | ||
585 | +-----------+ | | ||
586 | | | (1) | ||
587 | | givcipher | <----------------------------------- esp_output | ||
588 | | (seqiv) | ---+ | ||
589 | +-----------+ | | ||
590 | | (2) | ||
591 | +-----------+ | | ||
592 | | | <--+ (2) | ||
593 | | aead | <----------------------------------- esp_input | ||
594 | | (gcm) | ------------+ | ||
595 | +-----------+ | | ||
596 | | (3) | (5) | ||
597 | v v | ||
598 | +-----------+ +-----------+ | ||
599 | | | | | | ||
600 | | ablkcipher| | ahash | | ||
601 | | (ctr) | ---+ | (ghash) | | ||
602 | +-----------+ | +-----------+ | ||
603 | | | ||
604 | +-----------+ | (4) | ||
605 | | | <--+ | ||
606 | | cipher | | ||
607 | | (aes) | | ||
608 | +-----------+ | ||
609 | ]]> | ||
610 | </programlisting> | ||
611 | |||
612 | <para> | ||
613 | The following call sequence is applicable when the IPSEC layer | ||
614 | triggers an encryption operation with the esp_output function. During | ||
615 | configuration, the administrator set up the use of rfc4106(gcm(aes)) as | ||
616 | the cipher for ESP. The following call sequence is now depicted in the | ||
617 | ASCII art above: | ||
618 | </para> | ||
619 | |||
620 | <orderedlist> | ||
621 | <listitem> | ||
622 | <para> | ||
623 | esp_output() invokes crypto_aead_givencrypt() to trigger an encryption | ||
624 | operation of the GIVCIPHER implementation. | ||
625 | </para> | ||
626 | |||
627 | <para> | ||
628 | In case of GCM, the SEQIV implementation is registered as GIVCIPHER | ||
629 | in crypto_rfc4106_alloc(). | ||
630 | </para> | ||
631 | |||
632 | <para> | ||
633 | The SEQIV performs its operation to generate an IV where the core | ||
634 | function is seqiv_geniv(). | ||
635 | </para> | ||
636 | </listitem> | ||
637 | |||
638 | <listitem> | ||
639 | <para> | ||
640 | Now, SEQIV uses the AEAD API function calls to invoke the associated | ||
641 | AEAD cipher. In our case, during the instantiation of SEQIV, the | ||
642 | cipher handle for GCM is provided to SEQIV. This means that SEQIV | ||
643 | invokes AEAD cipher operations with the GCM cipher handle. | ||
644 | </para> | ||
645 | |||
646 | <para> | ||
647 | During instantiation of the GCM handle, the CTR(AES) and GHASH | ||
648 | ciphers are instantiated. The cipher handles for CTR(AES) and GHASH | ||
649 | are retained for later use. | ||
650 | </para> | ||
651 | |||
652 | <para> | ||
653 | The GCM implementation is responsible to invoke the CTR mode AES and | ||
654 | the GHASH cipher in the right manner to implement the GCM | ||
655 | specification. | ||
656 | </para> | ||
657 | </listitem> | ||
658 | |||
659 | <listitem> | ||
660 | <para> | ||
661 | The GCM AEAD cipher type implementation now invokes the ABLKCIPHER API | ||
662 | with the instantiated CTR(AES) cipher handle. | ||
663 | </para> | ||
664 | |||
665 | <para> | ||
666 | During instantiation of the CTR(AES) cipher, the CIPHER type | ||
667 | implementation of AES is instantiated. The cipher handle for AES is | ||
668 | retained. | ||
669 | </para> | ||
670 | |||
671 | <para> | ||
672 | That means that the ABLKCIPHER implementation of CTR(AES) only | ||
673 | implements the CTR block chaining mode. After performing the block | ||
674 | chaining operation, the CIPHER implementation of AES is invoked. | ||
675 | </para> | ||
676 | </listitem> | ||
677 | |||
678 | <listitem> | ||
679 | <para> | ||
680 | The ABLKCIPHER of CTR(AES) now invokes the CIPHER API with the AES | ||
681 | cipher handle to encrypt one block. | ||
682 | </para> | ||
683 | </listitem> | ||
684 | |||
685 | <listitem> | ||
686 | <para> | ||
687 | The GCM AEAD implementation also invokes the GHASH cipher | ||
688 | implementation via the AHASH API. | ||
689 | </para> | ||
690 | </listitem> | ||
691 | </orderedlist> | ||
692 | |||
693 | <para> | ||
694 | When the IPSEC layer triggers the esp_input() function, the same call | ||
695 | sequence is followed with the only difference that the operation starts | ||
696 | with step (2). | ||
697 | </para> | ||
698 | </sect2> | ||
699 | |||
700 | <sect2><title>Generic Block Cipher Structure</title> | ||
701 | <para> | ||
702 | Generic block ciphers follow the same concept as depicted with the ASCII | ||
703 | art picture above. | ||
704 | </para> | ||
705 | |||
706 | <para> | ||
707 | For example, CBC(AES) is implemented with cbc.c, and aes-generic.c. The | ||
708 | ASCII art picture above applies as well with the difference that only | ||
709 | step (4) is used and the ABLKCIPHER block chaining mode is CBC. | ||
710 | </para> | ||
711 | </sect2> | ||
712 | |||
713 | <sect2><title>Generic Keyed Message Digest Structure</title> | ||
714 | <para> | ||
715 | Keyed message digest implementations again follow the same concept as | ||
716 | depicted in the ASCII art picture above. | ||
717 | </para> | ||
718 | |||
719 | <para> | ||
720 | For example, HMAC(SHA256) is implemented with hmac.c and | ||
721 | sha256_generic.c. The following ASCII art illustrates the | ||
722 | implementation: | ||
723 | </para> | ||
724 | |||
725 | <programlisting> | ||
726 | <![CDATA[ | ||
727 | kernel crypto API | Caller | ||
728 | | | ||
729 | +-----------+ (1) | | ||
730 | | | <------------------ some_function | ||
731 | | ahash | | ||
732 | | (hmac) | ---+ | ||
733 | +-----------+ | | ||
734 | | (2) | ||
735 | +-----------+ | | ||
736 | | | <--+ | ||
737 | | shash | | ||
738 | | (sha256) | | ||
739 | +-----------+ | ||
740 | ]]> | ||
741 | </programlisting> | ||
742 | |||
743 | <para> | ||
744 | The following call sequence is applicable when a caller triggers | ||
745 | an HMAC operation: | ||
746 | </para> | ||
747 | |||
748 | <orderedlist> | ||
749 | <listitem> | ||
750 | <para> | ||
751 | The AHASH API functions are invoked by the caller. The HMAC | ||
752 | implementation performs its operation as needed. | ||
753 | </para> | ||
754 | |||
755 | <para> | ||
756 | During initialization of the HMAC cipher, the SHASH cipher type of | ||
757 | SHA256 is instantiated. The cipher handle for the SHA256 instance is | ||
758 | retained. | ||
759 | </para> | ||
760 | |||
761 | <para> | ||
762 | At one time, the HMAC implementation requires a SHA256 operation | ||
763 | where the SHA256 cipher handle is used. | ||
764 | </para> | ||
765 | </listitem> | ||
766 | |||
767 | <listitem> | ||
768 | <para> | ||
769 | The HMAC instance now invokes the SHASH API with the SHA256 | ||
770 | cipher handle to calculate the message digest. | ||
771 | </para> | ||
772 | </listitem> | ||
773 | </orderedlist> | ||
774 | </sect2> | ||
775 | </sect1> | ||
512 | </chapter> | 776 | </chapter> |
513 | 777 | ||
514 | <chapter id="Development"><title>Developing Cipher Algorithms</title> | 778 | <chapter id="Development"><title>Developing Cipher Algorithms</title> |
@@ -808,6 +1072,602 @@ | |||
808 | </sect1> | 1072 | </sect1> |
809 | </chapter> | 1073 | </chapter> |
810 | 1074 | ||
1075 | <chapter id="User"><title>User Space Interface</title> | ||
1076 | <sect1><title>Introduction</title> | ||
1077 | <para> | ||
1078 | The concepts of the kernel crypto API visible to kernel space is fully | ||
1079 | applicable to the user space interface as well. Therefore, the kernel | ||
1080 | crypto API high level discussion for the in-kernel use cases applies | ||
1081 | here as well. | ||
1082 | </para> | ||
1083 | |||
1084 | <para> | ||
1085 | The major difference, however, is that user space can only act as a | ||
1086 | consumer and never as a provider of a transformation or cipher algorithm. | ||
1087 | </para> | ||
1088 | |||
1089 | <para> | ||
1090 | The following covers the user space interface exported by the kernel | ||
1091 | crypto API. A working example of this description is libkcapi that | ||
1092 | can be obtained from [1]. That library can be used by user space | ||
1093 | applications that require cryptographic services from the kernel. | ||
1094 | </para> | ||
1095 | |||
1096 | <para> | ||
1097 | Some details of the in-kernel kernel crypto API aspects do not | ||
1098 | apply to user space, however. This includes the difference between | ||
1099 | synchronous and asynchronous invocations. The user space API call | ||
1100 | is fully synchronous. | ||
1101 | </para> | ||
1102 | |||
1103 | <para> | ||
1104 | [1] http://www.chronox.de/libkcapi.html | ||
1105 | </para> | ||
1106 | |||
1107 | </sect1> | ||
1108 | |||
1109 | <sect1><title>User Space API General Remarks</title> | ||
1110 | <para> | ||
1111 | The kernel crypto API is accessible from user space. Currently, | ||
1112 | the following ciphers are accessible: | ||
1113 | </para> | ||
1114 | |||
1115 | <itemizedlist> | ||
1116 | <listitem> | ||
1117 | <para>Message digest including keyed message digest (HMAC, CMAC)</para> | ||
1118 | </listitem> | ||
1119 | |||
1120 | <listitem> | ||
1121 | <para>Symmetric ciphers</para> | ||
1122 | </listitem> | ||
1123 | |||
1124 | <listitem> | ||
1125 | <para>AEAD ciphers</para> | ||
1126 | </listitem> | ||
1127 | |||
1128 | <listitem> | ||
1129 | <para>Random Number Generators</para> | ||
1130 | </listitem> | ||
1131 | </itemizedlist> | ||
1132 | |||
1133 | <para> | ||
1134 | The interface is provided via socket type using the type AF_ALG. | ||
1135 | In addition, the setsockopt option type is SOL_ALG. In case the | ||
1136 | user space header files do not export these flags yet, use the | ||
1137 | following macros: | ||
1138 | </para> | ||
1139 | |||
1140 | <programlisting> | ||
1141 | #ifndef AF_ALG | ||
1142 | #define AF_ALG 38 | ||
1143 | #endif | ||
1144 | #ifndef SOL_ALG | ||
1145 | #define SOL_ALG 279 | ||
1146 | #endif | ||
1147 | </programlisting> | ||
1148 | |||
1149 | <para> | ||
1150 | A cipher is accessed with the same name as done for the in-kernel | ||
1151 | API calls. This includes the generic vs. unique naming schema for | ||
1152 | ciphers as well as the enforcement of priorities for generic names. | ||
1153 | </para> | ||
1154 | |||
1155 | <para> | ||
1156 | To interact with the kernel crypto API, a socket must be | ||
1157 | created by the user space application. User space invokes the cipher | ||
1158 | operation with the send()/write() system call family. The result of the | ||
1159 | cipher operation is obtained with the read()/recv() system call family. | ||
1160 | </para> | ||
1161 | |||
1162 | <para> | ||
1163 | The following API calls assume that the socket descriptor | ||
1164 | is already opened by the user space application and discusses only | ||
1165 | the kernel crypto API specific invocations. | ||
1166 | </para> | ||
1167 | |||
1168 | <para> | ||
1169 | To initialize the socket interface, the following sequence has to | ||
1170 | be performed by the consumer: | ||
1171 | </para> | ||
1172 | |||
1173 | <orderedlist> | ||
1174 | <listitem> | ||
1175 | <para> | ||
1176 | Create a socket of type AF_ALG with the struct sockaddr_alg | ||
1177 | parameter specified below for the different cipher types. | ||
1178 | </para> | ||
1179 | </listitem> | ||
1180 | |||
1181 | <listitem> | ||
1182 | <para> | ||
1183 | Invoke bind with the socket descriptor | ||
1184 | </para> | ||
1185 | </listitem> | ||
1186 | |||
1187 | <listitem> | ||
1188 | <para> | ||
1189 | Invoke accept with the socket descriptor. The accept system call | ||
1190 | returns a new file descriptor that is to be used to interact with | ||
1191 | the particular cipher instance. When invoking send/write or recv/read | ||
1192 | system calls to send data to the kernel or obtain data from the | ||
1193 | kernel, the file descriptor returned by accept must be used. | ||
1194 | </para> | ||
1195 | </listitem> | ||
1196 | </orderedlist> | ||
1197 | </sect1> | ||
1198 | |||
1199 | <sect1><title>In-place Cipher operation</title> | ||
1200 | <para> | ||
1201 | Just like the in-kernel operation of the kernel crypto API, the user | ||
1202 | space interface allows the cipher operation in-place. That means that | ||
1203 | the input buffer used for the send/write system call and the output | ||
1204 | buffer used by the read/recv system call may be one and the same. | ||
1205 | This is of particular interest for symmetric cipher operations where a | ||
1206 | copying of the output data to its final destination can be avoided. | ||
1207 | </para> | ||
1208 | |||
1209 | <para> | ||
1210 | If a consumer on the other hand wants to maintain the plaintext and | ||
1211 | the ciphertext in different memory locations, all a consumer needs | ||
1212 | to do is to provide different memory pointers for the encryption and | ||
1213 | decryption operation. | ||
1214 | </para> | ||
1215 | </sect1> | ||
1216 | |||
1217 | <sect1><title>Message Digest API</title> | ||
1218 | <para> | ||
1219 | The message digest type to be used for the cipher operation is | ||
1220 | selected when invoking the bind syscall. bind requires the caller | ||
1221 | to provide a filled struct sockaddr data structure. This data | ||
1222 | structure must be filled as follows: | ||
1223 | </para> | ||
1224 | |||
1225 | <programlisting> | ||
1226 | struct sockaddr_alg sa = { | ||
1227 | .salg_family = AF_ALG, | ||
1228 | .salg_type = "hash", /* this selects the hash logic in the kernel */ | ||
1229 | .salg_name = "sha1" /* this is the cipher name */ | ||
1230 | }; | ||
1231 | </programlisting> | ||
1232 | |||
1233 | <para> | ||
1234 | The salg_type value "hash" applies to message digests and keyed | ||
1235 | message digests. Though, a keyed message digest is referenced by | ||
1236 | the appropriate salg_name. Please see below for the setsockopt | ||
1237 | interface that explains how the key can be set for a keyed message | ||
1238 | digest. | ||
1239 | </para> | ||
1240 | |||
1241 | <para> | ||
1242 | Using the send() system call, the application provides the data that | ||
1243 | should be processed with the message digest. The send system call | ||
1244 | allows the following flags to be specified: | ||
1245 | </para> | ||
1246 | |||
1247 | <itemizedlist> | ||
1248 | <listitem> | ||
1249 | <para> | ||
1250 | MSG_MORE: If this flag is set, the send system call acts like a | ||
1251 | message digest update function where the final hash is not | ||
1252 | yet calculated. If the flag is not set, the send system call | ||
1253 | calculates the final message digest immediately. | ||
1254 | </para> | ||
1255 | </listitem> | ||
1256 | </itemizedlist> | ||
1257 | |||
1258 | <para> | ||
1259 | With the recv() system call, the application can read the message | ||
1260 | digest from the kernel crypto API. If the buffer is too small for the | ||
1261 | message digest, the flag MSG_TRUNC is set by the kernel. | ||
1262 | </para> | ||
1263 | |||
1264 | <para> | ||
1265 | In order to set a message digest key, the calling application must use | ||
1266 | the setsockopt() option of ALG_SET_KEY. If the key is not set the HMAC | ||
1267 | operation is performed without the initial HMAC state change caused by | ||
1268 | the key. | ||
1269 | </para> | ||
1270 | </sect1> | ||
1271 | |||
1272 | <sect1><title>Symmetric Cipher API</title> | ||
1273 | <para> | ||
1274 | The operation is very similar to the message digest discussion. | ||
1275 | During initialization, the struct sockaddr data structure must be | ||
1276 | filled as follows: | ||
1277 | </para> | ||
1278 | |||
1279 | <programlisting> | ||
1280 | struct sockaddr_alg sa = { | ||
1281 | .salg_family = AF_ALG, | ||
1282 | .salg_type = "skcipher", /* this selects the symmetric cipher */ | ||
1283 | .salg_name = "cbc(aes)" /* this is the cipher name */ | ||
1284 | }; | ||
1285 | </programlisting> | ||
1286 | |||
1287 | <para> | ||
1288 | Before data can be sent to the kernel using the write/send system | ||
1289 | call family, the consumer must set the key. The key setting is | ||
1290 | described with the setsockopt invocation below. | ||
1291 | </para> | ||
1292 | |||
1293 | <para> | ||
1294 | Using the sendmsg() system call, the application provides the data that should be processed for encryption or decryption. In addition, the IV is | ||
1295 | specified with the data structure provided by the sendmsg() system call. | ||
1296 | </para> | ||
1297 | |||
1298 | <para> | ||
1299 | The sendmsg system call parameter of struct msghdr is embedded into the | ||
1300 | struct cmsghdr data structure. See recv(2) and cmsg(3) for more | ||
1301 | information on how the cmsghdr data structure is used together with the | ||
1302 | send/recv system call family. That cmsghdr data structure holds the | ||
1303 | following information specified with a separate header instances: | ||
1304 | </para> | ||
1305 | |||
1306 | <itemizedlist> | ||
1307 | <listitem> | ||
1308 | <para> | ||
1309 | specification of the cipher operation type with one of these flags: | ||
1310 | </para> | ||
1311 | <itemizedlist> | ||
1312 | <listitem> | ||
1313 | <para>ALG_OP_ENCRYPT - encryption of data</para> | ||
1314 | </listitem> | ||
1315 | <listitem> | ||
1316 | <para>ALG_OP_DECRYPT - decryption of data</para> | ||
1317 | </listitem> | ||
1318 | </itemizedlist> | ||
1319 | </listitem> | ||
1320 | |||
1321 | <listitem> | ||
1322 | <para> | ||
1323 | specification of the IV information marked with the flag ALG_SET_IV | ||
1324 | </para> | ||
1325 | </listitem> | ||
1326 | </itemizedlist> | ||
1327 | |||
1328 | <para> | ||
1329 | The send system call family allows the following flag to be specified: | ||
1330 | </para> | ||
1331 | |||
1332 | <itemizedlist> | ||
1333 | <listitem> | ||
1334 | <para> | ||
1335 | MSG_MORE: If this flag is set, the send system call acts like a | ||
1336 | cipher update function where more input data is expected | ||
1337 | with a subsequent invocation of the send system call. | ||
1338 | </para> | ||
1339 | </listitem> | ||
1340 | </itemizedlist> | ||
1341 | |||
1342 | <para> | ||
1343 | Note: The kernel reports -EINVAL for any unexpected data. The caller | ||
1344 | must make sure that all data matches the constraints given in | ||
1345 | /proc/crypto for the selected cipher. | ||
1346 | </para> | ||
1347 | |||
1348 | <para> | ||
1349 | With the recv() system call, the application can read the result of | ||
1350 | the cipher operation from the kernel crypto API. The output buffer | ||
1351 | must be at least as large as to hold all blocks of the encrypted or | ||
1352 | decrypted data. If the output data size is smaller, only as many | ||
1353 | blocks are returned that fit into that output buffer size. | ||
1354 | </para> | ||
1355 | </sect1> | ||
1356 | |||
1357 | <sect1><title>AEAD Cipher API</title> | ||
1358 | <para> | ||
1359 | The operation is very similar to the symmetric cipher discussion. | ||
1360 | During initialization, the struct sockaddr data structure must be | ||
1361 | filled as follows: | ||
1362 | </para> | ||
1363 | |||
1364 | <programlisting> | ||
1365 | struct sockaddr_alg sa = { | ||
1366 | .salg_family = AF_ALG, | ||
1367 | .salg_type = "aead", /* this selects the symmetric cipher */ | ||
1368 | .salg_name = "gcm(aes)" /* this is the cipher name */ | ||
1369 | }; | ||
1370 | </programlisting> | ||
1371 | |||
1372 | <para> | ||
1373 | Before data can be sent to the kernel using the write/send system | ||
1374 | call family, the consumer must set the key. The key setting is | ||
1375 | described with the setsockopt invocation below. | ||
1376 | </para> | ||
1377 | |||
1378 | <para> | ||
1379 | In addition, before data can be sent to the kernel using the | ||
1380 | write/send system call family, the consumer must set the authentication | ||
1381 | tag size. To set the authentication tag size, the caller must use the | ||
1382 | setsockopt invocation described below. | ||
1383 | </para> | ||
1384 | |||
1385 | <para> | ||
1386 | Using the sendmsg() system call, the application provides the data that should be processed for encryption or decryption. In addition, the IV is | ||
1387 | specified with the data structure provided by the sendmsg() system call. | ||
1388 | </para> | ||
1389 | |||
1390 | <para> | ||
1391 | The sendmsg system call parameter of struct msghdr is embedded into the | ||
1392 | struct cmsghdr data structure. See recv(2) and cmsg(3) for more | ||
1393 | information on how the cmsghdr data structure is used together with the | ||
1394 | send/recv system call family. That cmsghdr data structure holds the | ||
1395 | following information specified with a separate header instances: | ||
1396 | </para> | ||
1397 | |||
1398 | <itemizedlist> | ||
1399 | <listitem> | ||
1400 | <para> | ||
1401 | specification of the cipher operation type with one of these flags: | ||
1402 | </para> | ||
1403 | <itemizedlist> | ||
1404 | <listitem> | ||
1405 | <para>ALG_OP_ENCRYPT - encryption of data</para> | ||
1406 | </listitem> | ||
1407 | <listitem> | ||
1408 | <para>ALG_OP_DECRYPT - decryption of data</para> | ||
1409 | </listitem> | ||
1410 | </itemizedlist> | ||
1411 | </listitem> | ||
1412 | |||
1413 | <listitem> | ||
1414 | <para> | ||
1415 | specification of the IV information marked with the flag ALG_SET_IV | ||
1416 | </para> | ||
1417 | </listitem> | ||
1418 | |||
1419 | <listitem> | ||
1420 | <para> | ||
1421 | specification of the associated authentication data (AAD) with the | ||
1422 | flag ALG_SET_AEAD_ASSOCLEN. The AAD is sent to the kernel together | ||
1423 | with the plaintext / ciphertext. See below for the memory structure. | ||
1424 | </para> | ||
1425 | </listitem> | ||
1426 | </itemizedlist> | ||
1427 | |||
1428 | <para> | ||
1429 | The send system call family allows the following flag to be specified: | ||
1430 | </para> | ||
1431 | |||
1432 | <itemizedlist> | ||
1433 | <listitem> | ||
1434 | <para> | ||
1435 | MSG_MORE: If this flag is set, the send system call acts like a | ||
1436 | cipher update function where more input data is expected | ||
1437 | with a subsequent invocation of the send system call. | ||
1438 | </para> | ||
1439 | </listitem> | ||
1440 | </itemizedlist> | ||
1441 | |||
1442 | <para> | ||
1443 | Note: The kernel reports -EINVAL for any unexpected data. The caller | ||
1444 | must make sure that all data matches the constraints given in | ||
1445 | /proc/crypto for the selected cipher. | ||
1446 | </para> | ||
1447 | |||
1448 | <para> | ||
1449 | With the recv() system call, the application can read the result of | ||
1450 | the cipher operation from the kernel crypto API. The output buffer | ||
1451 | must be at least as large as defined with the memory structure below. | ||
1452 | If the output data size is smaller, the cipher operation is not performed. | ||
1453 | </para> | ||
1454 | |||
1455 | <para> | ||
1456 | The authenticated decryption operation may indicate an integrity error. | ||
1457 | Such breach in integrity is marked with the -EBADMSG error code. | ||
1458 | </para> | ||
1459 | |||
1460 | <sect2><title>AEAD Memory Structure</title> | ||
1461 | <para> | ||
1462 | The AEAD cipher operates with the following information that | ||
1463 | is communicated between user and kernel space as one data stream: | ||
1464 | </para> | ||
1465 | |||
1466 | <itemizedlist> | ||
1467 | <listitem> | ||
1468 | <para>plaintext or ciphertext</para> | ||
1469 | </listitem> | ||
1470 | |||
1471 | <listitem> | ||
1472 | <para>associated authentication data (AAD)</para> | ||
1473 | </listitem> | ||
1474 | |||
1475 | <listitem> | ||
1476 | <para>authentication tag</para> | ||
1477 | </listitem> | ||
1478 | </itemizedlist> | ||
1479 | |||
1480 | <para> | ||
1481 | The sizes of the AAD and the authentication tag are provided with | ||
1482 | the sendmsg and setsockopt calls (see there). As the kernel knows | ||
1483 | the size of the entire data stream, the kernel is now able to | ||
1484 | calculate the right offsets of the data components in the data | ||
1485 | stream. | ||
1486 | </para> | ||
1487 | |||
1488 | <para> | ||
1489 | The user space caller must arrange the aforementioned information | ||
1490 | in the following order: | ||
1491 | </para> | ||
1492 | |||
1493 | <itemizedlist> | ||
1494 | <listitem> | ||
1495 | <para> | ||
1496 | AEAD encryption input: AAD || plaintext | ||
1497 | </para> | ||
1498 | </listitem> | ||
1499 | |||
1500 | <listitem> | ||
1501 | <para> | ||
1502 | AEAD decryption input: AAD || ciphertext || authentication tag | ||
1503 | </para> | ||
1504 | </listitem> | ||
1505 | </itemizedlist> | ||
1506 | |||
1507 | <para> | ||
1508 | The output buffer the user space caller provides must be at least as | ||
1509 | large to hold the following data: | ||
1510 | </para> | ||
1511 | |||
1512 | <itemizedlist> | ||
1513 | <listitem> | ||
1514 | <para> | ||
1515 | AEAD encryption output: ciphertext || authentication tag | ||
1516 | </para> | ||
1517 | </listitem> | ||
1518 | |||
1519 | <listitem> | ||
1520 | <para> | ||
1521 | AEAD decryption output: plaintext | ||
1522 | </para> | ||
1523 | </listitem> | ||
1524 | </itemizedlist> | ||
1525 | </sect2> | ||
1526 | </sect1> | ||
1527 | |||
1528 | <sect1><title>Random Number Generator API</title> | ||
1529 | <para> | ||
1530 | Again, the operation is very similar to the other APIs. | ||
1531 | During initialization, the struct sockaddr data structure must be | ||
1532 | filled as follows: | ||
1533 | </para> | ||
1534 | |||
1535 | <programlisting> | ||
1536 | struct sockaddr_alg sa = { | ||
1537 | .salg_family = AF_ALG, | ||
1538 | .salg_type = "rng", /* this selects the symmetric cipher */ | ||
1539 | .salg_name = "drbg_nopr_sha256" /* this is the cipher name */ | ||
1540 | }; | ||
1541 | </programlisting> | ||
1542 | |||
1543 | <para> | ||
1544 | Depending on the RNG type, the RNG must be seeded. The seed is provided | ||
1545 | using the setsockopt interface to set the key. For example, the | ||
1546 | ansi_cprng requires a seed. The DRBGs do not require a seed, but | ||
1547 | may be seeded. | ||
1548 | </para> | ||
1549 | |||
1550 | <para> | ||
1551 | Using the read()/recvmsg() system calls, random numbers can be obtained. | ||
1552 | The kernel generates at most 128 bytes in one call. If user space | ||
1553 | requires more data, multiple calls to read()/recvmsg() must be made. | ||
1554 | </para> | ||
1555 | |||
1556 | <para> | ||
1557 | WARNING: The user space caller may invoke the initially mentioned | ||
1558 | accept system call multiple times. In this case, the returned file | ||
1559 | descriptors have the same state. | ||
1560 | </para> | ||
1561 | |||
1562 | </sect1> | ||
1563 | |||
1564 | <sect1><title>Zero-Copy Interface</title> | ||
1565 | <para> | ||
1566 | In addition to the send/write/read/recv system call familty, the AF_ALG | ||
1567 | interface can be accessed with the zero-copy interface of splice/vmsplice. | ||
1568 | As the name indicates, the kernel tries to avoid a copy operation into | ||
1569 | kernel space. | ||
1570 | </para> | ||
1571 | |||
1572 | <para> | ||
1573 | The zero-copy operation requires data to be aligned at the page boundary. | ||
1574 | Non-aligned data can be used as well, but may require more operations of | ||
1575 | the kernel which would defeat the speed gains obtained from the zero-copy | ||
1576 | interface. | ||
1577 | </para> | ||
1578 | |||
1579 | <para> | ||
1580 | The system-interent limit for the size of one zero-copy operation is | ||
1581 | 16 pages. If more data is to be sent to AF_ALG, user space must slice | ||
1582 | the input into segments with a maximum size of 16 pages. | ||
1583 | </para> | ||
1584 | |||
1585 | <para> | ||
1586 | Zero-copy can be used with the following code example (a complete working | ||
1587 | example is provided with libkcapi): | ||
1588 | </para> | ||
1589 | |||
1590 | <programlisting> | ||
1591 | int pipes[2]; | ||
1592 | |||
1593 | pipe(pipes); | ||
1594 | /* input data in iov */ | ||
1595 | vmsplice(pipes[1], iov, iovlen, SPLICE_F_GIFT); | ||
1596 | /* opfd is the file descriptor returned from accept() system call */ | ||
1597 | splice(pipes[0], NULL, opfd, NULL, ret, 0); | ||
1598 | read(opfd, out, outlen); | ||
1599 | </programlisting> | ||
1600 | |||
1601 | </sect1> | ||
1602 | |||
1603 | <sect1><title>Setsockopt Interface</title> | ||
1604 | <para> | ||
1605 | In addition to the read/recv and send/write system call handling | ||
1606 | to send and retrieve data subject to the cipher operation, a consumer | ||
1607 | also needs to set the additional information for the cipher operation. | ||
1608 | This additional information is set using the setsockopt system call | ||
1609 | that must be invoked with the file descriptor of the open cipher | ||
1610 | (i.e. the file descriptor returned by the accept system call). | ||
1611 | </para> | ||
1612 | |||
1613 | <para> | ||
1614 | Each setsockopt invocation must use the level SOL_ALG. | ||
1615 | </para> | ||
1616 | |||
1617 | <para> | ||
1618 | The setsockopt interface allows setting the following data using | ||
1619 | the mentioned optname: | ||
1620 | </para> | ||
1621 | |||
1622 | <itemizedlist> | ||
1623 | <listitem> | ||
1624 | <para> | ||
1625 | ALG_SET_KEY -- Setting the key. Key setting is applicable to: | ||
1626 | </para> | ||
1627 | <itemizedlist> | ||
1628 | <listitem> | ||
1629 | <para>the skcipher cipher type (symmetric ciphers)</para> | ||
1630 | </listitem> | ||
1631 | <listitem> | ||
1632 | <para>the hash cipher type (keyed message digests)</para> | ||
1633 | </listitem> | ||
1634 | <listitem> | ||
1635 | <para>the AEAD cipher type</para> | ||
1636 | </listitem> | ||
1637 | <listitem> | ||
1638 | <para>the RNG cipher type to provide the seed</para> | ||
1639 | </listitem> | ||
1640 | </itemizedlist> | ||
1641 | </listitem> | ||
1642 | |||
1643 | <listitem> | ||
1644 | <para> | ||
1645 | ALG_SET_AEAD_AUTHSIZE -- Setting the authentication tag size | ||
1646 | for AEAD ciphers. For a encryption operation, the authentication | ||
1647 | tag of the given size will be generated. For a decryption operation, | ||
1648 | the provided ciphertext is assumed to contain an authentication tag | ||
1649 | of the given size (see section about AEAD memory layout below). | ||
1650 | </para> | ||
1651 | </listitem> | ||
1652 | </itemizedlist> | ||
1653 | |||
1654 | </sect1> | ||
1655 | |||
1656 | <sect1><title>User space API example</title> | ||
1657 | <para> | ||
1658 | Please see [1] for libkcapi which provides an easy-to-use wrapper | ||
1659 | around the aforementioned Netlink kernel interface. [1] also contains | ||
1660 | a test application that invokes all libkcapi API calls. | ||
1661 | </para> | ||
1662 | |||
1663 | <para> | ||
1664 | [1] http://www.chronox.de/libkcapi.html | ||
1665 | </para> | ||
1666 | |||
1667 | </sect1> | ||
1668 | |||
1669 | </chapter> | ||
1670 | |||
811 | <chapter id="API"><title>Programming Interface</title> | 1671 | <chapter id="API"><title>Programming Interface</title> |
812 | <sect1><title>Block Cipher Context Data Structures</title> | 1672 | <sect1><title>Block Cipher Context Data Structures</title> |
813 | !Pinclude/linux/crypto.h Block Cipher Context Data Structures | 1673 | !Pinclude/linux/crypto.h Block Cipher Context Data Structures |
diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl index 03f1985a4bd1..9765a4c0829d 100644 --- a/Documentation/DocBook/drm.tmpl +++ b/Documentation/DocBook/drm.tmpl | |||
@@ -1293,7 +1293,7 @@ int max_width, max_height;</synopsis> | |||
1293 | </para> | 1293 | </para> |
1294 | <para> | 1294 | <para> |
1295 | If a page flip can be successfully scheduled the driver must set the | 1295 | If a page flip can be successfully scheduled the driver must set the |
1296 | <code>drm_crtc-<fb</code> field to the new framebuffer pointed to | 1296 | <code>drm_crtc->fb</code> field to the new framebuffer pointed to |
1297 | by <code>fb</code>. This is important so that the reference counting | 1297 | by <code>fb</code>. This is important so that the reference counting |
1298 | on framebuffers stays balanced. | 1298 | on framebuffers stays balanced. |
1299 | </para> | 1299 | </para> |
@@ -3979,6 +3979,11 @@ int num_ioctls;</synopsis> | |||
3979 | !Fdrivers/gpu/drm/i915/i915_irq.c intel_runtime_pm_disable_interrupts | 3979 | !Fdrivers/gpu/drm/i915/i915_irq.c intel_runtime_pm_disable_interrupts |
3980 | !Fdrivers/gpu/drm/i915/i915_irq.c intel_runtime_pm_enable_interrupts | 3980 | !Fdrivers/gpu/drm/i915/i915_irq.c intel_runtime_pm_enable_interrupts |
3981 | </sect2> | 3981 | </sect2> |
3982 | <sect2> | ||
3983 | <title>Intel GVT-g Guest Support(vGPU)</title> | ||
3984 | !Pdrivers/gpu/drm/i915/i915_vgpu.c Intel GVT-g guest support | ||
3985 | !Idrivers/gpu/drm/i915/i915_vgpu.c | ||
3986 | </sect2> | ||
3982 | </sect1> | 3987 | </sect1> |
3983 | <sect1> | 3988 | <sect1> |
3984 | <title>Display Hardware Handling</title> | 3989 | <title>Display Hardware Handling</title> |
@@ -4048,6 +4053,17 @@ int num_ioctls;</synopsis> | |||
4048 | !Idrivers/gpu/drm/i915/intel_fbc.c | 4053 | !Idrivers/gpu/drm/i915/intel_fbc.c |
4049 | </sect2> | 4054 | </sect2> |
4050 | <sect2> | 4055 | <sect2> |
4056 | <title>Display Refresh Rate Switching (DRRS)</title> | ||
4057 | !Pdrivers/gpu/drm/i915/intel_dp.c Display Refresh Rate Switching (DRRS) | ||
4058 | !Fdrivers/gpu/drm/i915/intel_dp.c intel_dp_set_drrs_state | ||
4059 | !Fdrivers/gpu/drm/i915/intel_dp.c intel_edp_drrs_enable | ||
4060 | !Fdrivers/gpu/drm/i915/intel_dp.c intel_edp_drrs_disable | ||
4061 | !Fdrivers/gpu/drm/i915/intel_dp.c intel_edp_drrs_invalidate | ||
4062 | !Fdrivers/gpu/drm/i915/intel_dp.c intel_edp_drrs_flush | ||
4063 | !Fdrivers/gpu/drm/i915/intel_dp.c intel_dp_drrs_init | ||
4064 | |||
4065 | </sect2> | ||
4066 | <sect2> | ||
4051 | <title>DPIO</title> | 4067 | <title>DPIO</title> |
4052 | !Pdrivers/gpu/drm/i915/i915_reg.h DPIO | 4068 | !Pdrivers/gpu/drm/i915/i915_reg.h DPIO |
4053 | <table id="dpiox2"> | 4069 | <table id="dpiox2"> |
@@ -4168,7 +4184,7 @@ int num_ioctls;</synopsis> | |||
4168 | <sect2> | 4184 | <sect2> |
4169 | <title>Buffer Object Eviction</title> | 4185 | <title>Buffer Object Eviction</title> |
4170 | <para> | 4186 | <para> |
4171 | This section documents the interface function for evicting buffer | 4187 | This section documents the interface functions for evicting buffer |
4172 | objects to make space available in the virtual gpu address spaces. | 4188 | objects to make space available in the virtual gpu address spaces. |
4173 | Note that this is mostly orthogonal to shrinking buffer objects | 4189 | Note that this is mostly orthogonal to shrinking buffer objects |
4174 | caches, which has the goal to make main memory (shared with the gpu | 4190 | caches, which has the goal to make main memory (shared with the gpu |
@@ -4176,6 +4192,17 @@ int num_ioctls;</synopsis> | |||
4176 | </para> | 4192 | </para> |
4177 | !Idrivers/gpu/drm/i915/i915_gem_evict.c | 4193 | !Idrivers/gpu/drm/i915/i915_gem_evict.c |
4178 | </sect2> | 4194 | </sect2> |
4195 | <sect2> | ||
4196 | <title>Buffer Object Memory Shrinking</title> | ||
4197 | <para> | ||
4198 | This section documents the interface function for shrinking memory | ||
4199 | usage of buffer object caches. Shrinking is used to make main memory | ||
4200 | available. Note that this is mostly orthogonal to evicting buffer | ||
4201 | objects, which has the goal to make space in gpu virtual address | ||
4202 | spaces. | ||
4203 | </para> | ||
4204 | !Idrivers/gpu/drm/i915/i915_gem_shrinker.c | ||
4205 | </sect2> | ||
4179 | </sect1> | 4206 | </sect1> |
4180 | 4207 | ||
4181 | <sect1> | 4208 | <sect1> |
diff --git a/Documentation/DocBook/media/v4l/subdev-formats.xml b/Documentation/DocBook/media/v4l/subdev-formats.xml index bc8d3fb9e4a9..2588ad781242 100644 --- a/Documentation/DocBook/media/v4l/subdev-formats.xml +++ b/Documentation/DocBook/media/v4l/subdev-formats.xml | |||
@@ -91,7 +91,9 @@ see <xref linkend="colorspaces" />.</entry> | |||
91 | <listitem><para>For formats where the total number of bits per pixel is smaller | 91 | <listitem><para>For formats where the total number of bits per pixel is smaller |
92 | than the number of bus samples per pixel times the bus width, a padding | 92 | than the number of bus samples per pixel times the bus width, a padding |
93 | value stating if the bytes are padded in their most high order bits | 93 | value stating if the bytes are padded in their most high order bits |
94 | (PADHI) or low order bits (PADLO).</para></listitem> | 94 | (PADHI) or low order bits (PADLO). A "C" prefix is used for component-wise |
95 | padding in the most high order bits (CPADHI) or low order bits (CPADLO) | ||
96 | of each separate component.</para></listitem> | ||
95 | <listitem><para>For formats where the number of bus samples per pixel is larger | 97 | <listitem><para>For formats where the number of bus samples per pixel is larger |
96 | than 1, an endianness value stating if the pixel is transferred MSB first | 98 | than 1, an endianness value stating if the pixel is transferred MSB first |
97 | (BE) or LSB first (LE).</para></listitem> | 99 | (BE) or LSB first (LE).</para></listitem> |
@@ -192,6 +194,24 @@ see <xref linkend="colorspaces" />.</entry> | |||
192 | </row> | 194 | </row> |
193 | </thead> | 195 | </thead> |
194 | <tbody valign="top"> | 196 | <tbody valign="top"> |
197 | <row id="MEDIA-BUS-FMT-RGB444-1X12"> | ||
198 | <entry>MEDIA_BUS_FMT_RGB444_1X12</entry> | ||
199 | <entry>0x1016</entry> | ||
200 | <entry></entry> | ||
201 | &dash-ent-20; | ||
202 | <entry>r<subscript>3</subscript></entry> | ||
203 | <entry>r<subscript>2</subscript></entry> | ||
204 | <entry>r<subscript>1</subscript></entry> | ||
205 | <entry>r<subscript>0</subscript></entry> | ||
206 | <entry>g<subscript>3</subscript></entry> | ||
207 | <entry>g<subscript>2</subscript></entry> | ||
208 | <entry>g<subscript>1</subscript></entry> | ||
209 | <entry>g<subscript>0</subscript></entry> | ||
210 | <entry>b<subscript>3</subscript></entry> | ||
211 | <entry>b<subscript>2</subscript></entry> | ||
212 | <entry>b<subscript>1</subscript></entry> | ||
213 | <entry>b<subscript>0</subscript></entry> | ||
214 | </row> | ||
195 | <row id="MEDIA-BUS-FMT-RGB444-2X8-PADHI-BE"> | 215 | <row id="MEDIA-BUS-FMT-RGB444-2X8-PADHI-BE"> |
196 | <entry>MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE</entry> | 216 | <entry>MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE</entry> |
197 | <entry>0x1001</entry> | 217 | <entry>0x1001</entry> |
@@ -304,6 +324,28 @@ see <xref linkend="colorspaces" />.</entry> | |||
304 | <entry>g<subscript>4</subscript></entry> | 324 | <entry>g<subscript>4</subscript></entry> |
305 | <entry>g<subscript>3</subscript></entry> | 325 | <entry>g<subscript>3</subscript></entry> |
306 | </row> | 326 | </row> |
327 | <row id="MEDIA-BUS-FMT-RGB565-1X16"> | ||
328 | <entry>MEDIA_BUS_FMT_RGB565_1X16</entry> | ||
329 | <entry>0x1017</entry> | ||
330 | <entry></entry> | ||
331 | &dash-ent-16; | ||
332 | <entry>r<subscript>4</subscript></entry> | ||
333 | <entry>r<subscript>3</subscript></entry> | ||
334 | <entry>r<subscript>2</subscript></entry> | ||
335 | <entry>r<subscript>1</subscript></entry> | ||
336 | <entry>r<subscript>0</subscript></entry> | ||
337 | <entry>g<subscript>5</subscript></entry> | ||
338 | <entry>g<subscript>4</subscript></entry> | ||
339 | <entry>g<subscript>3</subscript></entry> | ||
340 | <entry>g<subscript>2</subscript></entry> | ||
341 | <entry>g<subscript>1</subscript></entry> | ||
342 | <entry>g<subscript>0</subscript></entry> | ||
343 | <entry>b<subscript>4</subscript></entry> | ||
344 | <entry>b<subscript>3</subscript></entry> | ||
345 | <entry>b<subscript>2</subscript></entry> | ||
346 | <entry>b<subscript>1</subscript></entry> | ||
347 | <entry>b<subscript>0</subscript></entry> | ||
348 | </row> | ||
307 | <row id="MEDIA-BUS-FMT-BGR565-2X8-BE"> | 349 | <row id="MEDIA-BUS-FMT-BGR565-2X8-BE"> |
308 | <entry>MEDIA_BUS_FMT_BGR565_2X8_BE</entry> | 350 | <entry>MEDIA_BUS_FMT_BGR565_2X8_BE</entry> |
309 | <entry>0x1005</entry> | 351 | <entry>0x1005</entry> |
@@ -470,6 +512,96 @@ see <xref linkend="colorspaces" />.</entry> | |||
470 | <entry>g<subscript>1</subscript></entry> | 512 | <entry>g<subscript>1</subscript></entry> |
471 | <entry>g<subscript>0</subscript></entry> | 513 | <entry>g<subscript>0</subscript></entry> |
472 | </row> | 514 | </row> |
515 | <row id="MEDIA-BUS-FMT-RGB666-1X24_CPADHI"> | ||
516 | <entry>MEDIA_BUS_FMT_RGB666_1X24_CPADHI</entry> | ||
517 | <entry>0x1015</entry> | ||
518 | <entry></entry> | ||
519 | &dash-ent-8; | ||
520 | <entry>0</entry> | ||
521 | <entry>0</entry> | ||
522 | <entry>r<subscript>5</subscript></entry> | ||
523 | <entry>r<subscript>4</subscript></entry> | ||
524 | <entry>r<subscript>3</subscript></entry> | ||
525 | <entry>r<subscript>2</subscript></entry> | ||
526 | <entry>r<subscript>1</subscript></entry> | ||
527 | <entry>r<subscript>0</subscript></entry> | ||
528 | <entry>0</entry> | ||
529 | <entry>0</entry> | ||
530 | <entry>g<subscript>5</subscript></entry> | ||
531 | <entry>g<subscript>4</subscript></entry> | ||
532 | <entry>g<subscript>3</subscript></entry> | ||
533 | <entry>g<subscript>2</subscript></entry> | ||
534 | <entry>g<subscript>1</subscript></entry> | ||
535 | <entry>g<subscript>0</subscript></entry> | ||
536 | <entry>0</entry> | ||
537 | <entry>0</entry> | ||
538 | <entry>b<subscript>5</subscript></entry> | ||
539 | <entry>b<subscript>4</subscript></entry> | ||
540 | <entry>b<subscript>3</subscript></entry> | ||
541 | <entry>b<subscript>2</subscript></entry> | ||
542 | <entry>b<subscript>1</subscript></entry> | ||
543 | <entry>b<subscript>0</subscript></entry> | ||
544 | </row> | ||
545 | <row id="MEDIA-BUS-FMT-BGR888-1X24"> | ||
546 | <entry>MEDIA_BUS_FMT_BGR888_1X24</entry> | ||
547 | <entry>0x1013</entry> | ||
548 | <entry></entry> | ||
549 | &dash-ent-8; | ||
550 | <entry>b<subscript>7</subscript></entry> | ||
551 | <entry>b<subscript>6</subscript></entry> | ||
552 | <entry>b<subscript>5</subscript></entry> | ||
553 | <entry>b<subscript>4</subscript></entry> | ||
554 | <entry>b<subscript>3</subscript></entry> | ||
555 | <entry>b<subscript>2</subscript></entry> | ||
556 | <entry>b<subscript>1</subscript></entry> | ||
557 | <entry>b<subscript>0</subscript></entry> | ||
558 | <entry>g<subscript>7</subscript></entry> | ||
559 | <entry>g<subscript>6</subscript></entry> | ||
560 | <entry>g<subscript>5</subscript></entry> | ||
561 | <entry>g<subscript>4</subscript></entry> | ||
562 | <entry>g<subscript>3</subscript></entry> | ||
563 | <entry>g<subscript>2</subscript></entry> | ||
564 | <entry>g<subscript>1</subscript></entry> | ||
565 | <entry>g<subscript>0</subscript></entry> | ||
566 | <entry>r<subscript>7</subscript></entry> | ||
567 | <entry>r<subscript>6</subscript></entry> | ||
568 | <entry>r<subscript>5</subscript></entry> | ||
569 | <entry>r<subscript>4</subscript></entry> | ||
570 | <entry>r<subscript>3</subscript></entry> | ||
571 | <entry>r<subscript>2</subscript></entry> | ||
572 | <entry>r<subscript>1</subscript></entry> | ||
573 | <entry>r<subscript>0</subscript></entry> | ||
574 | </row> | ||
575 | <row id="MEDIA-BUS-FMT-GBR888-1X24"> | ||
576 | <entry>MEDIA_BUS_FMT_GBR888_1X24</entry> | ||
577 | <entry>0x1014</entry> | ||
578 | <entry></entry> | ||
579 | &dash-ent-8; | ||
580 | <entry>g<subscript>7</subscript></entry> | ||
581 | <entry>g<subscript>6</subscript></entry> | ||
582 | <entry>g<subscript>5</subscript></entry> | ||
583 | <entry>g<subscript>4</subscript></entry> | ||
584 | <entry>g<subscript>3</subscript></entry> | ||
585 | <entry>g<subscript>2</subscript></entry> | ||
586 | <entry>g<subscript>1</subscript></entry> | ||
587 | <entry>g<subscript>0</subscript></entry> | ||
588 | <entry>b<subscript>7</subscript></entry> | ||
589 | <entry>b<subscript>6</subscript></entry> | ||
590 | <entry>b<subscript>5</subscript></entry> | ||
591 | <entry>b<subscript>4</subscript></entry> | ||
592 | <entry>b<subscript>3</subscript></entry> | ||
593 | <entry>b<subscript>2</subscript></entry> | ||
594 | <entry>b<subscript>1</subscript></entry> | ||
595 | <entry>b<subscript>0</subscript></entry> | ||
596 | <entry>r<subscript>7</subscript></entry> | ||
597 | <entry>r<subscript>6</subscript></entry> | ||
598 | <entry>r<subscript>5</subscript></entry> | ||
599 | <entry>r<subscript>4</subscript></entry> | ||
600 | <entry>r<subscript>3</subscript></entry> | ||
601 | <entry>r<subscript>2</subscript></entry> | ||
602 | <entry>r<subscript>1</subscript></entry> | ||
603 | <entry>r<subscript>0</subscript></entry> | ||
604 | </row> | ||
473 | <row id="MEDIA-BUS-FMT-RGB888-1X24"> | 605 | <row id="MEDIA-BUS-FMT-RGB888-1X24"> |
474 | <entry>MEDIA_BUS_FMT_RGB888_1X24</entry> | 606 | <entry>MEDIA_BUS_FMT_RGB888_1X24</entry> |
475 | <entry>0x100a</entry> | 607 | <entry>0x100a</entry> |
@@ -649,6 +781,261 @@ see <xref linkend="colorspaces" />.</entry> | |||
649 | </tbody> | 781 | </tbody> |
650 | </tgroup> | 782 | </tgroup> |
651 | </table> | 783 | </table> |
784 | |||
785 | <para>On LVDS buses, usually each sample is transferred serialized in | ||
786 | seven time slots per pixel clock, on three (18-bit) or four (24-bit) | ||
787 | differential data pairs at the same time. The remaining bits are used for | ||
788 | control signals as defined by SPWG/PSWG/VESA or JEIDA standards. | ||
789 | The 24-bit RGB format serialized in seven time slots on four lanes using | ||
790 | JEIDA defined bit mapping will be named | ||
791 | <constant>MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA</constant>, for example. | ||
792 | </para> | ||
793 | |||
794 | <table pgwide="0" frame="none" id="v4l2-mbus-pixelcode-rgb-lvds"> | ||
795 | <title>LVDS RGB formats</title> | ||
796 | <tgroup cols="8"> | ||
797 | <colspec colname="id" align="left" /> | ||
798 | <colspec colname="code" align="center" /> | ||
799 | <colspec colname="slot" align="center" /> | ||
800 | <colspec colname="lane" /> | ||
801 | <colspec colnum="5" colname="l03" align="center" /> | ||
802 | <colspec colnum="6" colname="l02" align="center" /> | ||
803 | <colspec colnum="7" colname="l01" align="center" /> | ||
804 | <colspec colnum="8" colname="l00" align="center" /> | ||
805 | <spanspec namest="l03" nameend="l00" spanname="l0" /> | ||
806 | <thead> | ||
807 | <row> | ||
808 | <entry>Identifier</entry> | ||
809 | <entry>Code</entry> | ||
810 | <entry></entry> | ||
811 | <entry></entry> | ||
812 | <entry spanname="l0">Data organization</entry> | ||
813 | </row> | ||
814 | <row> | ||
815 | <entry></entry> | ||
816 | <entry></entry> | ||
817 | <entry>Timeslot</entry> | ||
818 | <entry>Lane</entry> | ||
819 | <entry>3</entry> | ||
820 | <entry>2</entry> | ||
821 | <entry>1</entry> | ||
822 | <entry>0</entry> | ||
823 | </row> | ||
824 | </thead> | ||
825 | <tbody valign="top"> | ||
826 | <row id="MEDIA-BUS-FMT-RGB666-1X7X3-SPWG"> | ||
827 | <entry>MEDIA_BUS_FMT_RGB666_1X7X3_SPWG</entry> | ||
828 | <entry>0x1010</entry> | ||
829 | <entry>0</entry> | ||
830 | <entry></entry> | ||
831 | <entry>-</entry> | ||
832 | <entry>d</entry> | ||
833 | <entry>b<subscript>1</subscript></entry> | ||
834 | <entry>g<subscript>0</subscript></entry> | ||
835 | </row> | ||
836 | <row> | ||
837 | <entry></entry> | ||
838 | <entry></entry> | ||
839 | <entry>1</entry> | ||
840 | <entry></entry> | ||
841 | <entry>-</entry> | ||
842 | <entry>d</entry> | ||
843 | <entry>b<subscript>0</subscript></entry> | ||
844 | <entry>r<subscript>5</subscript></entry> | ||
845 | </row> | ||
846 | <row> | ||
847 | <entry></entry> | ||
848 | <entry></entry> | ||
849 | <entry>2</entry> | ||
850 | <entry></entry> | ||
851 | <entry>-</entry> | ||
852 | <entry>d</entry> | ||
853 | <entry>g<subscript>5</subscript></entry> | ||
854 | <entry>r<subscript>4</subscript></entry> | ||
855 | </row> | ||
856 | <row> | ||
857 | <entry></entry> | ||
858 | <entry></entry> | ||
859 | <entry>3</entry> | ||
860 | <entry></entry> | ||
861 | <entry>-</entry> | ||
862 | <entry>b<subscript>5</subscript></entry> | ||
863 | <entry>g<subscript>4</subscript></entry> | ||
864 | <entry>r<subscript>3</subscript></entry> | ||
865 | </row> | ||
866 | <row> | ||
867 | <entry></entry> | ||
868 | <entry></entry> | ||
869 | <entry>4</entry> | ||
870 | <entry></entry> | ||
871 | <entry>-</entry> | ||
872 | <entry>b<subscript>4</subscript></entry> | ||
873 | <entry>g<subscript>3</subscript></entry> | ||
874 | <entry>r<subscript>2</subscript></entry> | ||
875 | </row> | ||
876 | <row> | ||
877 | <entry></entry> | ||
878 | <entry></entry> | ||
879 | <entry>5</entry> | ||
880 | <entry></entry> | ||
881 | <entry>-</entry> | ||
882 | <entry>b<subscript>3</subscript></entry> | ||
883 | <entry>g<subscript>2</subscript></entry> | ||
884 | <entry>r<subscript>1</subscript></entry> | ||
885 | </row> | ||
886 | <row> | ||
887 | <entry></entry> | ||
888 | <entry></entry> | ||
889 | <entry>6</entry> | ||
890 | <entry></entry> | ||
891 | <entry>-</entry> | ||
892 | <entry>b<subscript>2</subscript></entry> | ||
893 | <entry>g<subscript>1</subscript></entry> | ||
894 | <entry>r<subscript>0</subscript></entry> | ||
895 | </row> | ||
896 | <row id="MEDIA-BUS-FMT-RGB888-1X7X4-SPWG"> | ||
897 | <entry>MEDIA_BUS_FMT_RGB888_1X7X4_SPWG</entry> | ||
898 | <entry>0x1011</entry> | ||
899 | <entry>0</entry> | ||
900 | <entry></entry> | ||
901 | <entry>d</entry> | ||
902 | <entry>d</entry> | ||
903 | <entry>b<subscript>1</subscript></entry> | ||
904 | <entry>g<subscript>0</subscript></entry> | ||
905 | </row> | ||
906 | <row> | ||
907 | <entry></entry> | ||
908 | <entry></entry> | ||
909 | <entry>1</entry> | ||
910 | <entry></entry> | ||
911 | <entry>b<subscript>7</subscript></entry> | ||
912 | <entry>d</entry> | ||
913 | <entry>b<subscript>0</subscript></entry> | ||
914 | <entry>r<subscript>5</subscript></entry> | ||
915 | </row> | ||
916 | <row> | ||
917 | <entry></entry> | ||
918 | <entry></entry> | ||
919 | <entry>2</entry> | ||
920 | <entry></entry> | ||
921 | <entry>b<subscript>6</subscript></entry> | ||
922 | <entry>d</entry> | ||
923 | <entry>g<subscript>5</subscript></entry> | ||
924 | <entry>r<subscript>4</subscript></entry> | ||
925 | </row> | ||
926 | <row> | ||
927 | <entry></entry> | ||
928 | <entry></entry> | ||
929 | <entry>3</entry> | ||
930 | <entry></entry> | ||
931 | <entry>g<subscript>7</subscript></entry> | ||
932 | <entry>b<subscript>5</subscript></entry> | ||
933 | <entry>g<subscript>4</subscript></entry> | ||
934 | <entry>r<subscript>3</subscript></entry> | ||
935 | </row> | ||
936 | <row> | ||
937 | <entry></entry> | ||
938 | <entry></entry> | ||
939 | <entry>4</entry> | ||
940 | <entry></entry> | ||
941 | <entry>g<subscript>6</subscript></entry> | ||
942 | <entry>b<subscript>4</subscript></entry> | ||
943 | <entry>g<subscript>3</subscript></entry> | ||
944 | <entry>r<subscript>2</subscript></entry> | ||
945 | </row> | ||
946 | <row> | ||
947 | <entry></entry> | ||
948 | <entry></entry> | ||
949 | <entry>5</entry> | ||
950 | <entry></entry> | ||
951 | <entry>r<subscript>7</subscript></entry> | ||
952 | <entry>b<subscript>3</subscript></entry> | ||
953 | <entry>g<subscript>2</subscript></entry> | ||
954 | <entry>r<subscript>1</subscript></entry> | ||
955 | </row> | ||
956 | <row> | ||
957 | <entry></entry> | ||
958 | <entry></entry> | ||
959 | <entry>6</entry> | ||
960 | <entry></entry> | ||
961 | <entry>r<subscript>6</subscript></entry> | ||
962 | <entry>b<subscript>2</subscript></entry> | ||
963 | <entry>g<subscript>1</subscript></entry> | ||
964 | <entry>r<subscript>0</subscript></entry> | ||
965 | </row> | ||
966 | <row id="MEDIA-BUS-FMT-RGB888-1X7X4-JEIDA"> | ||
967 | <entry>MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA</entry> | ||
968 | <entry>0x1012</entry> | ||
969 | <entry>0</entry> | ||
970 | <entry></entry> | ||
971 | <entry>d</entry> | ||
972 | <entry>d</entry> | ||
973 | <entry>b<subscript>3</subscript></entry> | ||
974 | <entry>g<subscript>2</subscript></entry> | ||
975 | </row> | ||
976 | <row> | ||
977 | <entry></entry> | ||
978 | <entry></entry> | ||
979 | <entry>1</entry> | ||
980 | <entry></entry> | ||
981 | <entry>b<subscript>1</subscript></entry> | ||
982 | <entry>d</entry> | ||
983 | <entry>b<subscript>2</subscript></entry> | ||
984 | <entry>r<subscript>7</subscript></entry> | ||
985 | </row> | ||
986 | <row> | ||
987 | <entry></entry> | ||
988 | <entry></entry> | ||
989 | <entry>2</entry> | ||
990 | <entry></entry> | ||
991 | <entry>b<subscript>0</subscript></entry> | ||
992 | <entry>d</entry> | ||
993 | <entry>g<subscript>7</subscript></entry> | ||
994 | <entry>r<subscript>6</subscript></entry> | ||
995 | </row> | ||
996 | <row> | ||
997 | <entry></entry> | ||
998 | <entry></entry> | ||
999 | <entry>3</entry> | ||
1000 | <entry></entry> | ||
1001 | <entry>g<subscript>1</subscript></entry> | ||
1002 | <entry>b<subscript>7</subscript></entry> | ||
1003 | <entry>g<subscript>6</subscript></entry> | ||
1004 | <entry>r<subscript>5</subscript></entry> | ||
1005 | </row> | ||
1006 | <row> | ||
1007 | <entry></entry> | ||
1008 | <entry></entry> | ||
1009 | <entry>4</entry> | ||
1010 | <entry></entry> | ||
1011 | <entry>g<subscript>0</subscript></entry> | ||
1012 | <entry>b<subscript>6</subscript></entry> | ||
1013 | <entry>g<subscript>5</subscript></entry> | ||
1014 | <entry>r<subscript>4</subscript></entry> | ||
1015 | </row> | ||
1016 | <row> | ||
1017 | <entry></entry> | ||
1018 | <entry></entry> | ||
1019 | <entry>5</entry> | ||
1020 | <entry></entry> | ||
1021 | <entry>r<subscript>1</subscript></entry> | ||
1022 | <entry>b<subscript>5</subscript></entry> | ||
1023 | <entry>g<subscript>4</subscript></entry> | ||
1024 | <entry>r<subscript>3</subscript></entry> | ||
1025 | </row> | ||
1026 | <row> | ||
1027 | <entry></entry> | ||
1028 | <entry></entry> | ||
1029 | <entry>6</entry> | ||
1030 | <entry></entry> | ||
1031 | <entry>r<subscript>0</subscript></entry> | ||
1032 | <entry>b<subscript>4</subscript></entry> | ||
1033 | <entry>g<subscript>3</subscript></entry> | ||
1034 | <entry>r<subscript>2</subscript></entry> | ||
1035 | </row> | ||
1036 | </tbody> | ||
1037 | </tgroup> | ||
1038 | </table> | ||
652 | </section> | 1039 | </section> |
653 | 1040 | ||
654 | <section> | 1041 | <section> |
@@ -3045,6 +3432,43 @@ see <xref linkend="colorspaces" />.</entry> | |||
3045 | <entry>y<subscript>1</subscript></entry> | 3432 | <entry>y<subscript>1</subscript></entry> |
3046 | <entry>y<subscript>0</subscript></entry> | 3433 | <entry>y<subscript>0</subscript></entry> |
3047 | </row> | 3434 | </row> |
3435 | <row id="MEDIA-BUS-FMT-YUV8-1X24"> | ||
3436 | <entry>MEDIA_BUS_FMT_YUV8_1X24</entry> | ||
3437 | <entry>0x2025</entry> | ||
3438 | <entry></entry> | ||
3439 | <entry>-</entry> | ||
3440 | <entry>-</entry> | ||
3441 | <entry>-</entry> | ||
3442 | <entry>-</entry> | ||
3443 | <entry>-</entry> | ||
3444 | <entry>-</entry> | ||
3445 | <entry>-</entry> | ||
3446 | <entry>-</entry> | ||
3447 | <entry>y<subscript>7</subscript></entry> | ||
3448 | <entry>y<subscript>6</subscript></entry> | ||
3449 | <entry>y<subscript>5</subscript></entry> | ||
3450 | <entry>y<subscript>4</subscript></entry> | ||
3451 | <entry>y<subscript>3</subscript></entry> | ||
3452 | <entry>y<subscript>2</subscript></entry> | ||
3453 | <entry>y<subscript>1</subscript></entry> | ||
3454 | <entry>y<subscript>0</subscript></entry> | ||
3455 | <entry>u<subscript>7</subscript></entry> | ||
3456 | <entry>u<subscript>6</subscript></entry> | ||
3457 | <entry>u<subscript>5</subscript></entry> | ||
3458 | <entry>u<subscript>4</subscript></entry> | ||
3459 | <entry>u<subscript>3</subscript></entry> | ||
3460 | <entry>u<subscript>2</subscript></entry> | ||
3461 | <entry>u<subscript>1</subscript></entry> | ||
3462 | <entry>u<subscript>0</subscript></entry> | ||
3463 | <entry>v<subscript>7</subscript></entry> | ||
3464 | <entry>v<subscript>6</subscript></entry> | ||
3465 | <entry>v<subscript>5</subscript></entry> | ||
3466 | <entry>v<subscript>4</subscript></entry> | ||
3467 | <entry>v<subscript>3</subscript></entry> | ||
3468 | <entry>v<subscript>2</subscript></entry> | ||
3469 | <entry>v<subscript>1</subscript></entry> | ||
3470 | <entry>v<subscript>0</subscript></entry> | ||
3471 | </row> | ||
3048 | <row id="MEDIA-BUS-FMT-UYVY12-1X24"> | 3472 | <row id="MEDIA-BUS-FMT-UYVY12-1X24"> |
3049 | <entry>MEDIA_BUS_FMT_UYVY12_1X24</entry> | 3473 | <entry>MEDIA_BUS_FMT_UYVY12_1X24</entry> |
3050 | <entry>0x2020</entry> | 3474 | <entry>0x2020</entry> |
diff --git a/Documentation/IRQ-domain.txt b/Documentation/IRQ-domain.txt index 39cfa72732ff..3a8e15cba816 100644 --- a/Documentation/IRQ-domain.txt +++ b/Documentation/IRQ-domain.txt | |||
@@ -95,8 +95,7 @@ since it doesn't need to allocate a table as large as the largest | |||
95 | hwirq number. The disadvantage is that hwirq to IRQ number lookup is | 95 | hwirq number. The disadvantage is that hwirq to IRQ number lookup is |
96 | dependent on how many entries are in the table. | 96 | dependent on how many entries are in the table. |
97 | 97 | ||
98 | Very few drivers should need this mapping. At the moment, powerpc | 98 | Very few drivers should need this mapping. |
99 | iseries is the only user. | ||
100 | 99 | ||
101 | ==== No Map ===- | 100 | ==== No Map ===- |
102 | irq_domain_add_nomap() | 101 | irq_domain_add_nomap() |
diff --git a/Documentation/PCI/MSI-HOWTO.txt b/Documentation/PCI/MSI-HOWTO.txt index 0d920d54536d..1179850f453c 100644 --- a/Documentation/PCI/MSI-HOWTO.txt +++ b/Documentation/PCI/MSI-HOWTO.txt | |||
@@ -353,7 +353,7 @@ retry: | |||
353 | rc = pci_enable_msix_range(adapter->pdev, adapter->msix_entries, | 353 | rc = pci_enable_msix_range(adapter->pdev, adapter->msix_entries, |
354 | maxvec, maxvec); | 354 | maxvec, maxvec); |
355 | /* | 355 | /* |
356 | * -ENOSPC is the only error code allowed to be analized | 356 | * -ENOSPC is the only error code allowed to be analyzed |
357 | */ | 357 | */ |
358 | if (rc == -ENOSPC) { | 358 | if (rc == -ENOSPC) { |
359 | if (maxvec == 1) | 359 | if (maxvec == 1) |
@@ -370,7 +370,7 @@ retry: | |||
370 | return rc; | 370 | return rc; |
371 | } | 371 | } |
372 | 372 | ||
373 | Note how pci_enable_msix_range() return value is analized for a fallback - | 373 | Note how pci_enable_msix_range() return value is analyzed for a fallback - |
374 | any error code other than -ENOSPC indicates a fatal error and should not | 374 | any error code other than -ENOSPC indicates a fatal error and should not |
375 | be retried. | 375 | be retried. |
376 | 376 | ||
@@ -486,7 +486,7 @@ during development. | |||
486 | If your device supports both MSI-X and MSI capabilities, you should use | 486 | If your device supports both MSI-X and MSI capabilities, you should use |
487 | the MSI-X facilities in preference to the MSI facilities. As mentioned | 487 | the MSI-X facilities in preference to the MSI facilities. As mentioned |
488 | above, MSI-X supports any number of interrupts between 1 and 2048. | 488 | above, MSI-X supports any number of interrupts between 1 and 2048. |
489 | In constrast, MSI is restricted to a maximum of 32 interrupts (and | 489 | In contrast, MSI is restricted to a maximum of 32 interrupts (and |
490 | must be a power of two). In addition, the MSI interrupt vectors must | 490 | must be a power of two). In addition, the MSI interrupt vectors must |
491 | be allocated consecutively, so the system might not be able to allocate | 491 | be allocated consecutively, so the system might not be able to allocate |
492 | as many vectors for MSI as it could for MSI-X. On some platforms, MSI | 492 | as many vectors for MSI as it could for MSI-X. On some platforms, MSI |
@@ -501,18 +501,9 @@ necessary to disable interrupts (Linux guarantees the same interrupt will | |||
501 | not be re-entered). If a device uses multiple interrupts, the driver | 501 | not be re-entered). If a device uses multiple interrupts, the driver |
502 | must disable interrupts while the lock is held. If the device sends | 502 | must disable interrupts while the lock is held. If the device sends |
503 | a different interrupt, the driver will deadlock trying to recursively | 503 | a different interrupt, the driver will deadlock trying to recursively |
504 | acquire the spinlock. | 504 | acquire the spinlock. Such deadlocks can be avoided by using |
505 | 505 | spin_lock_irqsave() or spin_lock_irq() which disable local interrupts | |
506 | There are two solutions. The first is to take the lock with | 506 | and acquire the lock (see Documentation/DocBook/kernel-locking). |
507 | spin_lock_irqsave() or spin_lock_irq() (see | ||
508 | Documentation/DocBook/kernel-locking). The second is to specify | ||
509 | IRQF_DISABLED to request_irq() so that the kernel runs the entire | ||
510 | interrupt routine with interrupts disabled. | ||
511 | |||
512 | If your MSI interrupt routine does not hold the lock for the whole time | ||
513 | it is running, the first solution may be best. The second solution is | ||
514 | normally preferred as it avoids making two transitions from interrupt | ||
515 | disabled to enabled and back again. | ||
516 | 507 | ||
517 | 4.6 How to tell whether MSI/MSI-X is enabled on a device | 508 | 4.6 How to tell whether MSI/MSI-X is enabled on a device |
518 | 509 | ||
diff --git a/Documentation/PCI/pci-error-recovery.txt b/Documentation/PCI/pci-error-recovery.txt index 898ded24510d..ac26869c7db4 100644 --- a/Documentation/PCI/pci-error-recovery.txt +++ b/Documentation/PCI/pci-error-recovery.txt | |||
@@ -256,7 +256,7 @@ STEP 4: Slot Reset | |||
256 | ------------------ | 256 | ------------------ |
257 | 257 | ||
258 | In response to a return value of PCI_ERS_RESULT_NEED_RESET, the | 258 | In response to a return value of PCI_ERS_RESULT_NEED_RESET, the |
259 | the platform will peform a slot reset on the requesting PCI device(s). | 259 | the platform will perform a slot reset on the requesting PCI device(s). |
260 | The actual steps taken by a platform to perform a slot reset | 260 | The actual steps taken by a platform to perform a slot reset |
261 | will be platform-dependent. Upon completion of slot reset, the | 261 | will be platform-dependent. Upon completion of slot reset, the |
262 | platform will call the device slot_reset() callback. | 262 | platform will call the device slot_reset() callback. |
diff --git a/Documentation/PCI/pci.txt b/Documentation/PCI/pci.txt index 9518006f6675..123881f62219 100644 --- a/Documentation/PCI/pci.txt +++ b/Documentation/PCI/pci.txt | |||
@@ -564,14 +564,14 @@ to be handled by platform and generic code, not individual drivers. | |||
564 | 8. Vendor and device identifications | 564 | 8. Vendor and device identifications |
565 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 565 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
566 | 566 | ||
567 | One is not required to add new device ids to include/linux/pci_ids.h. | 567 | Do not add new device or vendor IDs to include/linux/pci_ids.h unless they |
568 | Please add PCI_VENDOR_ID_xxx for vendors and a hex constant for device ids. | 568 | are shared across multiple drivers. You can add private definitions in |
569 | your driver if they're helpful, or just use plain hex constants. | ||
569 | 570 | ||
570 | PCI_VENDOR_ID_xxx constants are re-used. The device ids are arbitrary | 571 | The device IDs are arbitrary hex numbers (vendor controlled) and normally used |
571 | hex numbers (vendor controlled) and normally used only in a single | 572 | only in a single location, the pci_device_id table. |
572 | location, the pci_device_id table. | ||
573 | 573 | ||
574 | Please DO submit new vendor/device ids to pciids.sourceforge.net project. | 574 | Please DO submit new vendor/device IDs to http://pciids.sourceforge.net/. |
575 | 575 | ||
576 | 576 | ||
577 | 577 | ||
diff --git a/Documentation/PCI/pcieaer-howto.txt b/Documentation/PCI/pcieaer-howto.txt index 26d3d945c3c2..b4987c0bcb20 100644 --- a/Documentation/PCI/pcieaer-howto.txt +++ b/Documentation/PCI/pcieaer-howto.txt | |||
@@ -66,8 +66,8 @@ hardware (mostly chipsets) has root ports that cannot obtain the reporting | |||
66 | source ID. nosourceid=n by default. | 66 | source ID. nosourceid=n by default. |
67 | 67 | ||
68 | 2.3 AER error output | 68 | 2.3 AER error output |
69 | When a PCI-E AER error is captured, an error message will be outputed to | 69 | When a PCI-E AER error is captured, an error message will be outputted to |
70 | console. If it's a correctable error, it is outputed as a warning. | 70 | console. If it's a correctable error, it is outputted as a warning. |
71 | Otherwise, it is printed as an error. So users could choose different | 71 | Otherwise, it is printed as an error. So users could choose different |
72 | log level to filter out correctable error messages. | 72 | log level to filter out correctable error messages. |
73 | 73 | ||
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index 447671bd2927..b03a832a08e2 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches | |||
@@ -614,8 +614,8 @@ The canonical patch message body contains the following: | |||
614 | 614 | ||
615 | - An empty line. | 615 | - An empty line. |
616 | 616 | ||
617 | - The body of the explanation, which will be copied to the | 617 | - The body of the explanation, line wrapped at 75 columns, which will |
618 | permanent changelog to describe this patch. | 618 | be copied to the permanent changelog to describe this patch. |
619 | 619 | ||
620 | - The "Signed-off-by:" lines, described above, which will | 620 | - The "Signed-off-by:" lines, described above, which will |
621 | also go in the changelog. | 621 | also go in the changelog. |
diff --git a/Documentation/acpi/apei/einj.txt b/Documentation/acpi/apei/einj.txt index f51861bcb07b..e550c8b98139 100644 --- a/Documentation/acpi/apei/einj.txt +++ b/Documentation/acpi/apei/einj.txt | |||
@@ -1,129 +1,177 @@ | |||
1 | APEI Error INJection | 1 | APEI Error INJection |
2 | ~~~~~~~~~~~~~~~~~~~~ | 2 | ~~~~~~~~~~~~~~~~~~~~ |
3 | 3 | ||
4 | EINJ provides a hardware error injection mechanism | 4 | EINJ provides a hardware error injection mechanism. It is very useful |
5 | It is very useful for debugging and testing of other APEI and RAS features. | 5 | for debugging and testing APEI and RAS features in general. |
6 | 6 | ||
7 | To use EINJ, make sure the following are enabled in your kernel | 7 | You need to check whether your BIOS supports EINJ first. For that, look |
8 | for early boot messages similar to this one: | ||
9 | |||
10 | ACPI: EINJ 0x000000007370A000 000150 (v01 INTEL 00000001 INTL 00000001) | ||
11 | |||
12 | which shows that the BIOS is exposing an EINJ table - it is the | ||
13 | mechanism through which the injection is done. | ||
14 | |||
15 | Alternatively, look in /sys/firmware/acpi/tables for an "EINJ" file, | ||
16 | which is a different representation of the same thing. | ||
17 | |||
18 | It doesn't necessarily mean that EINJ is not supported if those above | ||
19 | don't exist: before you give up, go into BIOS setup to see if the BIOS | ||
20 | has an option to enable error injection. Look for something called WHEA | ||
21 | or similar. Often, you need to enable an ACPI5 support option prior, in | ||
22 | order to see the APEI,EINJ,... functionality supported and exposed by | ||
23 | the BIOS menu. | ||
24 | |||
25 | To use EINJ, make sure the following are options enabled in your kernel | ||
8 | configuration: | 26 | configuration: |
9 | 27 | ||
10 | CONFIG_DEBUG_FS | 28 | CONFIG_DEBUG_FS |
11 | CONFIG_ACPI_APEI | 29 | CONFIG_ACPI_APEI |
12 | CONFIG_ACPI_APEI_EINJ | 30 | CONFIG_ACPI_APEI_EINJ |
13 | 31 | ||
14 | The user interface of EINJ is debug file system, under the | 32 | The EINJ user interface is in <debugfs mount point>/apei/einj. |
15 | directory apei/einj. The following files are provided. | 33 | |
34 | The following files belong to it: | ||
16 | 35 | ||
17 | - available_error_type | 36 | - available_error_type |
18 | Reading this file returns the error injection capability of the | 37 | |
19 | platform, that is, which error types are supported. The error type | 38 | This file shows which error types are supported: |
20 | definition is as follow, the left field is the error type value, the | 39 | |
21 | right field is error description. | 40 | Error Type Value Error Description |
22 | 41 | ================ ================= | |
23 | 0x00000001 Processor Correctable | 42 | 0x00000001 Processor Correctable |
24 | 0x00000002 Processor Uncorrectable non-fatal | 43 | 0x00000002 Processor Uncorrectable non-fatal |
25 | 0x00000004 Processor Uncorrectable fatal | 44 | 0x00000004 Processor Uncorrectable fatal |
26 | 0x00000008 Memory Correctable | 45 | 0x00000008 Memory Correctable |
27 | 0x00000010 Memory Uncorrectable non-fatal | 46 | 0x00000010 Memory Uncorrectable non-fatal |
28 | 0x00000020 Memory Uncorrectable fatal | 47 | 0x00000020 Memory Uncorrectable fatal |
29 | 0x00000040 PCI Express Correctable | 48 | 0x00000040 PCI Express Correctable |
30 | 0x00000080 PCI Express Uncorrectable fatal | 49 | 0x00000080 PCI Express Uncorrectable fatal |
31 | 0x00000100 PCI Express Uncorrectable non-fatal | 50 | 0x00000100 PCI Express Uncorrectable non-fatal |
32 | 0x00000200 Platform Correctable | 51 | 0x00000200 Platform Correctable |
33 | 0x00000400 Platform Uncorrectable non-fatal | 52 | 0x00000400 Platform Uncorrectable non-fatal |
34 | 0x00000800 Platform Uncorrectable fatal | 53 | 0x00000800 Platform Uncorrectable fatal |
35 | 54 | ||
36 | The format of file contents are as above, except there are only the | 55 | The format of the file contents are as above, except present are only |
37 | available error type lines. | 56 | the available error types. |
38 | 57 | ||
39 | - error_type | 58 | - error_type |
40 | This file is used to set the error type value. The error type value | 59 | |
41 | is defined in "available_error_type" description. | 60 | Set the value of the error type being injected. Possible error types |
61 | are defined in the file available_error_type above. | ||
42 | 62 | ||
43 | - error_inject | 63 | - error_inject |
44 | Write any integer to this file to trigger the error | 64 | |
45 | injection. Before this, please specify all necessary error | 65 | Write any integer to this file to trigger the error injection. Make |
46 | parameters. | 66 | sure you have specified all necessary error parameters, i.e. this |
67 | write should be the last step when injecting errors. | ||
47 | 68 | ||
48 | - flags | 69 | - flags |
49 | Present for kernel version 3.13 and above. Used to specify which | 70 | |
50 | of param{1..4} are valid and should be used by BIOS during injection. | 71 | Present for kernel versions 3.13 and above. Used to specify which |
51 | Value is a bitmask as specified in ACPI5.0 spec for the | 72 | of param{1..4} are valid and should be used by the firmware during |
73 | injection. Value is a bitmask as specified in ACPI5.0 spec for the | ||
52 | SET_ERROR_TYPE_WITH_ADDRESS data structure: | 74 | SET_ERROR_TYPE_WITH_ADDRESS data structure: |
53 | Bit 0 - Processor APIC field valid (see param3 below) | 75 | |
54 | Bit 1 - Memory address and mask valid (param1 and param2) | 76 | Bit 0 - Processor APIC field valid (see param3 below). |
55 | Bit 2 - PCIe (seg,bus,dev,fn) valid (param4 below) | 77 | Bit 1 - Memory address and mask valid (param1 and param2). |
56 | If set to zero, legacy behaviour is used where the type of injection | 78 | Bit 2 - PCIe (seg,bus,dev,fn) valid (see param4 below). |
57 | specifies just one bit set, and param1 is multiplexed. | 79 | |
80 | If set to zero, legacy behavior is mimicked where the type of | ||
81 | injection specifies just one bit set, and param1 is multiplexed. | ||
58 | 82 | ||
59 | - param1 | 83 | - param1 |
60 | This file is used to set the first error parameter value. Effect of | 84 | |
61 | parameter depends on error_type specified. For example, if error | 85 | This file is used to set the first error parameter value. Its effect |
62 | type is memory related type, the param1 should be a valid physical | 86 | depends on the error type specified in error_type. For example, if |
63 | memory address. [Unless "flag" is set - see above] | 87 | error type is memory related type, the param1 should be a valid |
88 | physical memory address. [Unless "flag" is set - see above] | ||
64 | 89 | ||
65 | - param2 | 90 | - param2 |
66 | This file is used to set the second error parameter value. Effect of | 91 | |
67 | parameter depends on error_type specified. For example, if error | 92 | Same use as param1 above. For example, if error type is of memory |
68 | type is memory related type, the param2 should be a physical memory | 93 | related type, then param2 should be a physical memory address mask. |
69 | address mask. Linux requires page or narrower granularity, say, | 94 | Linux requires page or narrower granularity, say, 0xfffffffffffff000. |
70 | 0xfffffffffffff000. | ||
71 | 95 | ||
72 | - param3 | 96 | - param3 |
73 | Used when the 0x1 bit is set in "flag" to specify the APIC id | 97 | |
98 | Used when the 0x1 bit is set in "flags" to specify the APIC id | ||
74 | 99 | ||
75 | - param4 | 100 | - param4 |
76 | Used when the 0x4 bit is set in "flag" to specify target PCIe device | 101 | Used when the 0x4 bit is set in "flags" to specify target PCIe device |
77 | 102 | ||
78 | - notrigger | 103 | - notrigger |
79 | The EINJ mechanism is a two step process. First inject the error, then | 104 | |
80 | perform some actions to trigger it. Setting "notrigger" to 1 skips the | 105 | The error injection mechanism is a two-step process. First inject the |
81 | trigger phase, which *may* allow the user to cause the error in some other | 106 | error, then perform some actions to trigger it. Setting "notrigger" |
82 | context by a simple access to the cpu, memory location, or device that is | 107 | to 1 skips the trigger phase, which *may* allow the user to cause the |
83 | the target of the error injection. Whether this actually works depends | 108 | error in some other context by a simple access to the CPU, memory |
84 | on what operations the BIOS actually includes in the trigger phase. | 109 | location, or device that is the target of the error injection. Whether |
85 | 110 | this actually works depends on what operations the BIOS actually | |
86 | BIOS versions based in the ACPI 4.0 specification have limited options | 111 | includes in the trigger phase. |
87 | to control where the errors are injected. Your BIOS may support an | 112 | |
88 | extension (enabled with the param_extension=1 module parameter, or | 113 | BIOS versions based on the ACPI 4.0 specification have limited options |
89 | boot command line einj.param_extension=1). This allows the address | 114 | in controlling where the errors are injected. Your BIOS may support an |
90 | and mask for memory injections to be specified by the param1 and | 115 | extension (enabled with the param_extension=1 module parameter, or boot |
91 | param2 files in apei/einj. | 116 | command line einj.param_extension=1). This allows the address and mask |
92 | 117 | for memory injections to be specified by the param1 and param2 files in | |
93 | BIOS versions using the ACPI 5.0 specification have more control over | 118 | apei/einj. |
94 | the target of the injection. For processor related errors (type 0x1, | 119 | |
95 | 0x2 and 0x4) the APICID of the target should be provided using the | 120 | BIOS versions based on the ACPI 5.0 specification have more control over |
96 | param1 file in apei/einj. For memory errors (type 0x8, 0x10 and 0x20) | 121 | the target of the injection. For processor-related errors (type 0x1, 0x2 |
97 | the address is set using param1 with a mask in param2 (0x0 is equivalent | 122 | and 0x4), you can set flags to 0x3 (param3 for bit 0, and param1 and |
98 | to all ones). For PCI express errors (type 0x40, 0x80 and 0x100) the | 123 | param2 for bit 1) so that you have more information added to the error |
99 | segment, bus, device and function are specified using param1: | 124 | signature being injected. The actual data passed is this: |
125 | |||
126 | memory_address = param1; | ||
127 | memory_address_range = param2; | ||
128 | apicid = param3; | ||
129 | pcie_sbdf = param4; | ||
130 | |||
131 | For memory errors (type 0x8, 0x10 and 0x20) the address is set using | ||
132 | param1 with a mask in param2 (0x0 is equivalent to all ones). For PCI | ||
133 | express errors (type 0x40, 0x80 and 0x100) the segment, bus, device and | ||
134 | function are specified using param1: | ||
100 | 135 | ||
101 | 31 24 23 16 15 11 10 8 7 0 | 136 | 31 24 23 16 15 11 10 8 7 0 |
102 | +-------------------------------------------------+ | 137 | +-------------------------------------------------+ |
103 | | segment | bus | device | function | reserved | | 138 | | segment | bus | device | function | reserved | |
104 | +-------------------------------------------------+ | 139 | +-------------------------------------------------+ |
105 | 140 | ||
106 | An ACPI 5.0 BIOS may also allow vendor specific errors to be injected. | 141 | Anyway, you get the idea, if there's doubt just take a look at the code |
142 | in drivers/acpi/apei/einj.c. | ||
143 | |||
144 | An ACPI 5.0 BIOS may also allow vendor-specific errors to be injected. | ||
107 | In this case a file named vendor will contain identifying information | 145 | In this case a file named vendor will contain identifying information |
108 | from the BIOS that hopefully will allow an application wishing to use | 146 | from the BIOS that hopefully will allow an application wishing to use |
109 | the vendor specific extension to tell that they are running on a BIOS | 147 | the vendor-specific extension to tell that they are running on a BIOS |
110 | that supports it. All vendor extensions have the 0x80000000 bit set in | 148 | that supports it. All vendor extensions have the 0x80000000 bit set in |
111 | error_type. A file vendor_flags controls the interpretation of param1 | 149 | error_type. A file vendor_flags controls the interpretation of param1 |
112 | and param2 (1 = PROCESSOR, 2 = MEMORY, 4 = PCI). See your BIOS vendor | 150 | and param2 (1 = PROCESSOR, 2 = MEMORY, 4 = PCI). See your BIOS vendor |
113 | documentation for details (and expect changes to this API if vendors | 151 | documentation for details (and expect changes to this API if vendors |
114 | creativity in using this feature expands beyond our expectations). | 152 | creativity in using this feature expands beyond our expectations). |
115 | 153 | ||
116 | Example: | 154 | |
155 | An error injection example: | ||
156 | |||
117 | # cd /sys/kernel/debug/apei/einj | 157 | # cd /sys/kernel/debug/apei/einj |
118 | # cat available_error_type # See which errors can be injected | 158 | # cat available_error_type # See which errors can be injected |
119 | 0x00000002 Processor Uncorrectable non-fatal | 159 | 0x00000002 Processor Uncorrectable non-fatal |
120 | 0x00000008 Memory Correctable | 160 | 0x00000008 Memory Correctable |
121 | 0x00000010 Memory Uncorrectable non-fatal | 161 | 0x00000010 Memory Uncorrectable non-fatal |
122 | # echo 0x12345000 > param1 # Set memory address for injection | 162 | # echo 0x12345000 > param1 # Set memory address for injection |
123 | # echo 0xfffffffffffff000 > param2 # Mask - anywhere in this page | 163 | # echo $((-1 << 12)) > param2 # Mask 0xfffffffffffff000 - anywhere in this page |
124 | # echo 0x8 > error_type # Choose correctable memory error | 164 | # echo 0x8 > error_type # Choose correctable memory error |
125 | # echo 1 > error_inject # Inject now | 165 | # echo 1 > error_inject # Inject now |
126 | 166 | ||
167 | You should see something like this in dmesg: | ||
168 | |||
169 | [22715.830801] EDAC sbridge MC3: HANDLING MCE MEMORY ERROR | ||
170 | [22715.834759] EDAC sbridge MC3: CPU 0: Machine Check Event: 0 Bank 7: 8c00004000010090 | ||
171 | [22715.834759] EDAC sbridge MC3: TSC 0 | ||
172 | [22715.834759] EDAC sbridge MC3: ADDR 12345000 EDAC sbridge MC3: MISC 144780c86 | ||
173 | [22715.834759] EDAC sbridge MC3: PROCESSOR 0:306e7 TIME 1422553404 SOCKET 0 APIC 0 | ||
174 | [22716.616173] EDAC MC3: 1 CE memory read error on CPU_SrcID#0_Channel#0_DIMM#0 (channel:0 slot:0 page:0x12345 offset:0x0 grain:32 syndrome:0x0 - area:DRAM err_code:0001:0090 socket:0 channel_mask:1 rank:0) | ||
127 | 175 | ||
128 | For more information about EINJ, please refer to ACPI specification | 176 | For more information about EINJ, please refer to ACPI specification |
129 | version 4.0, section 17.5 and ACPI 5.0, section 18.6. | 177 | version 4.0, section 17.5 and ACPI 5.0, section 18.6. |
diff --git a/Documentation/acpi/enumeration.txt b/Documentation/acpi/enumeration.txt index 9b121a569ab4..750401f91341 100644 --- a/Documentation/acpi/enumeration.txt +++ b/Documentation/acpi/enumeration.txt | |||
@@ -254,8 +254,13 @@ GPIO support | |||
254 | ~~~~~~~~~~~~ | 254 | ~~~~~~~~~~~~ |
255 | ACPI 5 introduced two new resources to describe GPIO connections: GpioIo | 255 | ACPI 5 introduced two new resources to describe GPIO connections: GpioIo |
256 | and GpioInt. These resources are used be used to pass GPIO numbers used by | 256 | and GpioInt. These resources are used be used to pass GPIO numbers used by |
257 | the device to the driver. For example: | 257 | the device to the driver. ACPI 5.1 extended this with _DSD (Device |
258 | Specific Data) which made it possible to name the GPIOs among other things. | ||
258 | 259 | ||
260 | For example: | ||
261 | |||
262 | Device (DEV) | ||
263 | { | ||
259 | Method (_CRS, 0, NotSerialized) | 264 | Method (_CRS, 0, NotSerialized) |
260 | { | 265 | { |
261 | Name (SBUF, ResourceTemplate() | 266 | Name (SBUF, ResourceTemplate() |
@@ -285,6 +290,18 @@ the device to the driver. For example: | |||
285 | Return (SBUF) | 290 | Return (SBUF) |
286 | } | 291 | } |
287 | 292 | ||
293 | // ACPI 5.1 _DSD used for naming the GPIOs | ||
294 | Name (_DSD, Package () | ||
295 | { | ||
296 | ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), | ||
297 | Package () | ||
298 | { | ||
299 | Package () {"power-gpios", Package() {^DEV, 0, 0, 0 }}, | ||
300 | Package () {"irq-gpios", Package() {^DEV, 1, 0, 0 }}, | ||
301 | } | ||
302 | }) | ||
303 | ... | ||
304 | |||
288 | These GPIO numbers are controller relative and path "\\_SB.PCI0.GPI0" | 305 | These GPIO numbers are controller relative and path "\\_SB.PCI0.GPI0" |
289 | specifies the path to the controller. In order to use these GPIOs in Linux | 306 | specifies the path to the controller. In order to use these GPIOs in Linux |
290 | we need to translate them to the corresponding Linux GPIO descriptors. | 307 | we need to translate them to the corresponding Linux GPIO descriptors. |
@@ -300,11 +317,11 @@ a code like this: | |||
300 | 317 | ||
301 | struct gpio_desc *irq_desc, *power_desc; | 318 | struct gpio_desc *irq_desc, *power_desc; |
302 | 319 | ||
303 | irq_desc = gpiod_get_index(dev, NULL, 1); | 320 | irq_desc = gpiod_get(dev, "irq"); |
304 | if (IS_ERR(irq_desc)) | 321 | if (IS_ERR(irq_desc)) |
305 | /* handle error */ | 322 | /* handle error */ |
306 | 323 | ||
307 | power_desc = gpiod_get_index(dev, NULL, 0); | 324 | power_desc = gpiod_get(dev, "power"); |
308 | if (IS_ERR(power_desc)) | 325 | if (IS_ERR(power_desc)) |
309 | /* handle error */ | 326 | /* handle error */ |
310 | 327 | ||
@@ -313,6 +330,9 @@ a code like this: | |||
313 | There are also devm_* versions of these functions which release the | 330 | There are also devm_* versions of these functions which release the |
314 | descriptors once the device is released. | 331 | descriptors once the device is released. |
315 | 332 | ||
333 | See Documentation/acpi/gpio-properties.txt for more information about the | ||
334 | _DSD binding related to GPIOs. | ||
335 | |||
316 | MFD devices | 336 | MFD devices |
317 | ~~~~~~~~~~~ | 337 | ~~~~~~~~~~~ |
318 | The MFD devices register their children as platform devices. For the child | 338 | The MFD devices register their children as platform devices. For the child |
diff --git a/Documentation/arm/Booting b/Documentation/arm/Booting index 371814a36719..83c1df2fc758 100644 --- a/Documentation/arm/Booting +++ b/Documentation/arm/Booting | |||
@@ -58,13 +58,18 @@ serial format options as described in | |||
58 | -------------------------- | 58 | -------------------------- |
59 | 59 | ||
60 | Existing boot loaders: OPTIONAL | 60 | Existing boot loaders: OPTIONAL |
61 | New boot loaders: MANDATORY | 61 | New boot loaders: MANDATORY except for DT-only platforms |
62 | 62 | ||
63 | The boot loader should detect the machine type its running on by some | 63 | The boot loader should detect the machine type its running on by some |
64 | method. Whether this is a hard coded value or some algorithm that | 64 | method. Whether this is a hard coded value or some algorithm that |
65 | looks at the connected hardware is beyond the scope of this document. | 65 | looks at the connected hardware is beyond the scope of this document. |
66 | The boot loader must ultimately be able to provide a MACH_TYPE_xxx | 66 | The boot loader must ultimately be able to provide a MACH_TYPE_xxx |
67 | value to the kernel. (see linux/arch/arm/tools/mach-types). | 67 | value to the kernel. (see linux/arch/arm/tools/mach-types). This |
68 | should be passed to the kernel in register r1. | ||
69 | |||
70 | For DT-only platforms, the machine type will be determined by device | ||
71 | tree. set the machine type to all ones (~0). This is not strictly | ||
72 | necessary, but assures that it will not match any existing types. | ||
68 | 73 | ||
69 | 4. Setup boot data | 74 | 4. Setup boot data |
70 | ------------------ | 75 | ------------------ |
diff --git a/Documentation/arm/README b/Documentation/arm/README index aea34095cdcf..9d1e5b2c92e6 100644 --- a/Documentation/arm/README +++ b/Documentation/arm/README | |||
@@ -185,13 +185,20 @@ Kernel entry (head.S) | |||
185 | board devices are used, or the device is setup, and provides that | 185 | board devices are used, or the device is setup, and provides that |
186 | machine specific "personality." | 186 | machine specific "personality." |
187 | 187 | ||
188 | This fine-grained machine specific selection is controlled by the machine | 188 | For platforms that support device tree (DT), the machine selection is |
189 | type ID, which acts both as a run-time and a compile-time code selection | 189 | controlled at runtime by passing the device tree blob to the kernel. At |
190 | method. | 190 | compile-time, support for the machine type must be selected. This allows for |
191 | a single multiplatform kernel build to be used for several machine types. | ||
191 | 192 | ||
192 | You can register a new machine via the web site at: | 193 | For platforms that do not use device tree, this machine selection is |
194 | controlled by the machine type ID, which acts both as a run-time and a | ||
195 | compile-time code selection method. You can register a new machine via the | ||
196 | web site at: | ||
193 | 197 | ||
194 | <http://www.arm.linux.org.uk/developer/machines/> | 198 | <http://www.arm.linux.org.uk/developer/machines/> |
195 | 199 | ||
200 | Note: Please do not register a machine type for DT-only platforms. If your | ||
201 | platform is DT-only, you do not need a registered machine type. | ||
202 | |||
196 | --- | 203 | --- |
197 | Russell King (15/03/2004) | 204 | Russell King (15/03/2004) |
diff --git a/Documentation/atomic_ops.txt b/Documentation/atomic_ops.txt index 183e41bdcb69..dab6da3382d9 100644 --- a/Documentation/atomic_ops.txt +++ b/Documentation/atomic_ops.txt | |||
@@ -201,11 +201,11 @@ These routines add 1 and subtract 1, respectively, from the given | |||
201 | atomic_t and return the new counter value after the operation is | 201 | atomic_t and return the new counter value after the operation is |
202 | performed. | 202 | performed. |
203 | 203 | ||
204 | Unlike the above routines, it is required that explicit memory | 204 | Unlike the above routines, it is required that these primitives |
205 | barriers are performed before and after the operation. It must be | 205 | include explicit memory barriers that are performed before and after |
206 | done such that all memory operations before and after the atomic | 206 | the operation. It must be done such that all memory operations before |
207 | operation calls are strongly ordered with respect to the atomic | 207 | and after the atomic operation calls are strongly ordered with respect |
208 | operation itself. | 208 | to the atomic operation itself. |
209 | 209 | ||
210 | For example, it should behave as if a smp_mb() call existed both | 210 | For example, it should behave as if a smp_mb() call existed both |
211 | before and after the atomic operation. | 211 | before and after the atomic operation. |
@@ -233,21 +233,21 @@ These two routines increment and decrement by 1, respectively, the | |||
233 | given atomic counter. They return a boolean indicating whether the | 233 | given atomic counter. They return a boolean indicating whether the |
234 | resulting counter value was zero or not. | 234 | resulting counter value was zero or not. |
235 | 235 | ||
236 | It requires explicit memory barrier semantics around the operation as | 236 | Again, these primitives provide explicit memory barrier semantics around |
237 | above. | 237 | the atomic operation. |
238 | 238 | ||
239 | int atomic_sub_and_test(int i, atomic_t *v); | 239 | int atomic_sub_and_test(int i, atomic_t *v); |
240 | 240 | ||
241 | This is identical to atomic_dec_and_test() except that an explicit | 241 | This is identical to atomic_dec_and_test() except that an explicit |
242 | decrement is given instead of the implicit "1". It requires explicit | 242 | decrement is given instead of the implicit "1". This primitive must |
243 | memory barrier semantics around the operation. | 243 | provide explicit memory barrier semantics around the operation. |
244 | 244 | ||
245 | int atomic_add_negative(int i, atomic_t *v); | 245 | int atomic_add_negative(int i, atomic_t *v); |
246 | 246 | ||
247 | The given increment is added to the given atomic counter value. A | 247 | The given increment is added to the given atomic counter value. A boolean |
248 | boolean is return which indicates whether the resulting counter value | 248 | is return which indicates whether the resulting counter value is negative. |
249 | is negative. It requires explicit memory barrier semantics around the | 249 | This primitive must provide explicit memory barrier semantics around |
250 | operation. | 250 | the operation. |
251 | 251 | ||
252 | Then: | 252 | Then: |
253 | 253 | ||
@@ -257,7 +257,7 @@ This performs an atomic exchange operation on the atomic variable v, setting | |||
257 | the given new value. It returns the old value that the atomic variable v had | 257 | the given new value. It returns the old value that the atomic variable v had |
258 | just before the operation. | 258 | just before the operation. |
259 | 259 | ||
260 | atomic_xchg requires explicit memory barriers around the operation. | 260 | atomic_xchg must provide explicit memory barriers around the operation. |
261 | 261 | ||
262 | int atomic_cmpxchg(atomic_t *v, int old, int new); | 262 | int atomic_cmpxchg(atomic_t *v, int old, int new); |
263 | 263 | ||
@@ -266,7 +266,7 @@ with the given old and new values. Like all atomic_xxx operations, | |||
266 | atomic_cmpxchg will only satisfy its atomicity semantics as long as all | 266 | atomic_cmpxchg will only satisfy its atomicity semantics as long as all |
267 | other accesses of *v are performed through atomic_xxx operations. | 267 | other accesses of *v are performed through atomic_xxx operations. |
268 | 268 | ||
269 | atomic_cmpxchg requires explicit memory barriers around the operation. | 269 | atomic_cmpxchg must provide explicit memory barriers around the operation. |
270 | 270 | ||
271 | The semantics for atomic_cmpxchg are the same as those defined for 'cas' | 271 | The semantics for atomic_cmpxchg are the same as those defined for 'cas' |
272 | below. | 272 | below. |
@@ -279,8 +279,8 @@ If the atomic value v is not equal to u, this function adds a to v, and | |||
279 | returns non zero. If v is equal to u then it returns zero. This is done as | 279 | returns non zero. If v is equal to u then it returns zero. This is done as |
280 | an atomic operation. | 280 | an atomic operation. |
281 | 281 | ||
282 | atomic_add_unless requires explicit memory barriers around the operation | 282 | atomic_add_unless must provide explicit memory barriers around the |
283 | unless it fails (returns 0). | 283 | operation unless it fails (returns 0). |
284 | 284 | ||
285 | atomic_inc_not_zero, equivalent to atomic_add_unless(v, 1, 0) | 285 | atomic_inc_not_zero, equivalent to atomic_add_unless(v, 1, 0) |
286 | 286 | ||
@@ -460,9 +460,9 @@ the return value into an int. There are other places where things | |||
460 | like this occur as well. | 460 | like this occur as well. |
461 | 461 | ||
462 | These routines, like the atomic_t counter operations returning values, | 462 | These routines, like the atomic_t counter operations returning values, |
463 | require explicit memory barrier semantics around their execution. All | 463 | must provide explicit memory barrier semantics around their execution. |
464 | memory operations before the atomic bit operation call must be made | 464 | All memory operations before the atomic bit operation call must be |
465 | visible globally before the atomic bit operation is made visible. | 465 | made visible globally before the atomic bit operation is made visible. |
466 | Likewise, the atomic bit operation must be visible globally before any | 466 | Likewise, the atomic bit operation must be visible globally before any |
467 | subsequent memory operation is made visible. For example: | 467 | subsequent memory operation is made visible. For example: |
468 | 468 | ||
@@ -536,8 +536,9 @@ except that two underscores are prefixed to the interface name. | |||
536 | These non-atomic variants also do not require any special memory | 536 | These non-atomic variants also do not require any special memory |
537 | barrier semantics. | 537 | barrier semantics. |
538 | 538 | ||
539 | The routines xchg() and cmpxchg() need the same exact memory barriers | 539 | The routines xchg() and cmpxchg() must provide the same exact |
540 | as the atomic and bit operations returning values. | 540 | memory-barrier semantics as the atomic and bit operations returning |
541 | values. | ||
541 | 542 | ||
542 | Spinlocks and rwlocks have memory barrier expectations as well. | 543 | Spinlocks and rwlocks have memory barrier expectations as well. |
543 | The rule to follow is simple: | 544 | The rule to follow is simple: |
diff --git a/Documentation/blackfin/Makefile b/Documentation/blackfin/Makefile index 03f78059d6f5..6782c58fbc29 100644 --- a/Documentation/blackfin/Makefile +++ b/Documentation/blackfin/Makefile | |||
@@ -1,5 +1,5 @@ | |||
1 | ifneq ($(CONFIG_BLACKFIN),) | 1 | ifneq ($(CONFIG_BLACKFIN),) |
2 | ifneq ($(CONFIG_BFIN_GPTIMERS,) | 2 | ifneq ($(CONFIG_BFIN_GPTIMERS),) |
3 | obj-m := gptimers-example.o | 3 | obj-m := gptimers-example.o |
4 | endif | 4 | endif |
5 | endif | 5 | endif |
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt index 5aabc08de811..fd12c0d835fd 100644 --- a/Documentation/block/biodoc.txt +++ b/Documentation/block/biodoc.txt | |||
@@ -48,8 +48,7 @@ Description of Contents: | |||
48 | - Highmem I/O support | 48 | - Highmem I/O support |
49 | - I/O scheduler modularization | 49 | - I/O scheduler modularization |
50 | 1.2 Tuning based on high level requirements/capabilities | 50 | 1.2 Tuning based on high level requirements/capabilities |
51 | 1.2.1 I/O Barriers | 51 | 1.2.1 Request Priority/Latency |
52 | 1.2.2 Request Priority/Latency | ||
53 | 1.3 Direct access/bypass to lower layers for diagnostics and special | 52 | 1.3 Direct access/bypass to lower layers for diagnostics and special |
54 | device operations | 53 | device operations |
55 | 1.3.1 Pre-built commands | 54 | 1.3.1 Pre-built commands |
@@ -255,29 +254,12 @@ some control over i/o ordering. | |||
255 | What kind of support exists at the generic block layer for this ? | 254 | What kind of support exists at the generic block layer for this ? |
256 | 255 | ||
257 | The flags and rw fields in the bio structure can be used for some tuning | 256 | The flags and rw fields in the bio structure can be used for some tuning |
258 | from above e.g indicating that an i/o is just a readahead request, or for | 257 | from above e.g indicating that an i/o is just a readahead request, or priority |
259 | marking barrier requests (discussed next), or priority settings (currently | 258 | settings (currently unused). As far as user applications are concerned they |
260 | unused). As far as user applications are concerned they would need an | 259 | would need an additional mechanism either via open flags or ioctls, or some |
261 | additional mechanism either via open flags or ioctls, or some other upper | 260 | other upper level mechanism to communicate such settings to block. |
262 | level mechanism to communicate such settings to block. | 261 | |
263 | 262 | 1.2.1 Request Priority/Latency | |
264 | 1.2.1 I/O Barriers | ||
265 | |||
266 | There is a way to enforce strict ordering for i/os through barriers. | ||
267 | All requests before a barrier point must be serviced before the barrier | ||
268 | request and any other requests arriving after the barrier will not be | ||
269 | serviced until after the barrier has completed. This is useful for higher | ||
270 | level control on write ordering, e.g flushing a log of committed updates | ||
271 | to disk before the corresponding updates themselves. | ||
272 | |||
273 | A flag in the bio structure, BIO_BARRIER is used to identify a barrier i/o. | ||
274 | The generic i/o scheduler would make sure that it places the barrier request and | ||
275 | all other requests coming after it after all the previous requests in the | ||
276 | queue. Barriers may be implemented in different ways depending on the | ||
277 | driver. For more details regarding I/O barriers, please read barrier.txt | ||
278 | in this directory. | ||
279 | |||
280 | 1.2.2 Request Priority/Latency | ||
281 | 263 | ||
282 | Todo/Under discussion: | 264 | Todo/Under discussion: |
283 | Arjan's proposed request priority scheme allows higher levels some broad | 265 | Arjan's proposed request priority scheme allows higher levels some broad |
@@ -906,8 +888,8 @@ queue and specific I/O schedulers. Unless stated otherwise, elevator is used | |||
906 | to refer to both parts and I/O scheduler to specific I/O schedulers. | 888 | to refer to both parts and I/O scheduler to specific I/O schedulers. |
907 | 889 | ||
908 | Block layer implements generic dispatch queue in block/*.c. | 890 | Block layer implements generic dispatch queue in block/*.c. |
909 | The generic dispatch queue is responsible for properly ordering barrier | 891 | The generic dispatch queue is responsible for requeueing, handling non-fs |
910 | requests, requeueing, handling non-fs requests and all other subtleties. | 892 | requests and all other subtleties. |
911 | 893 | ||
912 | Specific I/O schedulers are responsible for ordering normal filesystem | 894 | Specific I/O schedulers are responsible for ordering normal filesystem |
913 | requests. They can also choose to delay certain requests to improve | 895 | requests. They can also choose to delay certain requests to improve |
diff --git a/Documentation/blockdev/nbd.txt b/Documentation/blockdev/nbd.txt index 271e607304da..db242ea2bce8 100644 --- a/Documentation/blockdev/nbd.txt +++ b/Documentation/blockdev/nbd.txt | |||
@@ -1,17 +1,31 @@ | |||
1 | Network Block Device (TCP version) | 1 | Network Block Device (TCP version) |
2 | 2 | ================================== | |
3 | What is it: With this compiled in the kernel (or as a module), Linux | 3 | |
4 | can use a remote server as one of its block devices. So every time | 4 | 1) Overview |
5 | the client computer wants to read, e.g., /dev/nb0, it sends a | 5 | ----------- |
6 | request over TCP to the server, which will reply with the data read. | 6 | |
7 | This can be used for stations with low disk space (or even diskless) | 7 | What is it: With this compiled in the kernel (or as a module), Linux |
8 | to borrow disk space from another computer. | 8 | can use a remote server as one of its block devices. So every time |
9 | Unlike NFS, it is possible to put any filesystem on it, etc. | 9 | the client computer wants to read, e.g., /dev/nb0, it sends a |
10 | 10 | request over TCP to the server, which will reply with the data read. | |
11 | For more information, or to download the nbd-client and nbd-server | 11 | This can be used for stations with low disk space (or even diskless) |
12 | tools, go to http://nbd.sf.net/. | 12 | to borrow disk space from another computer. |
13 | 13 | Unlike NFS, it is possible to put any filesystem on it, etc. | |
14 | The nbd kernel module need only be installed on the client | 14 | |
15 | system, as the nbd-server is completely in userspace. In fact, | 15 | For more information, or to download the nbd-client and nbd-server |
16 | the nbd-server has been successfully ported to other operating | 16 | tools, go to http://nbd.sf.net/. |
17 | systems, including Windows. | 17 | |
18 | The nbd kernel module need only be installed on the client | ||
19 | system, as the nbd-server is completely in userspace. In fact, | ||
20 | the nbd-server has been successfully ported to other operating | ||
21 | systems, including Windows. | ||
22 | |||
23 | A) NBD parameters | ||
24 | ----------------- | ||
25 | |||
26 | max_part | ||
27 | Number of partitions per device (default: 0). | ||
28 | |||
29 | nbds_max | ||
30 | Number of block devices that should be initialized (default: 16). | ||
31 | |||
diff --git a/Documentation/blockdev/zram.txt b/Documentation/blockdev/zram.txt index 7fcf9c6592ec..48a183e29988 100644 --- a/Documentation/blockdev/zram.txt +++ b/Documentation/blockdev/zram.txt | |||
@@ -98,20 +98,79 @@ size of the disk when not in use so a huge zram is wasteful. | |||
98 | mount /dev/zram1 /tmp | 98 | mount /dev/zram1 /tmp |
99 | 99 | ||
100 | 7) Stats: | 100 | 7) Stats: |
101 | Per-device statistics are exported as various nodes under | 101 | Per-device statistics are exported as various nodes under /sys/block/zram<id>/ |
102 | /sys/block/zram<id>/ | 102 | |
103 | disksize | 103 | A brief description of exported device attritbutes. For more details please |
104 | num_reads | 104 | read Documentation/ABI/testing/sysfs-block-zram. |
105 | num_writes | 105 | |
106 | failed_reads | 106 | Name access description |
107 | failed_writes | 107 | ---- ------ ----------- |
108 | invalid_io | 108 | disksize RW show and set the device's disk size |
109 | notify_free | 109 | initstate RO shows the initialization state of the device |
110 | zero_pages | 110 | reset WO trigger device reset |
111 | orig_data_size | 111 | num_reads RO the number of reads |
112 | compr_data_size | 112 | failed_reads RO the number of failed reads |
113 | mem_used_total | 113 | num_write RO the number of writes |
114 | mem_used_max | 114 | failed_writes RO the number of failed writes |
115 | invalid_io RO the number of non-page-size-aligned I/O requests | ||
116 | max_comp_streams RW the number of possible concurrent compress operations | ||
117 | comp_algorithm RW show and change the compression algorithm | ||
118 | notify_free RO the number of notifications to free pages (either | ||
119 | slot free notifications or REQ_DISCARD requests) | ||
120 | zero_pages RO the number of zero filled pages written to this disk | ||
121 | orig_data_size RO uncompressed size of data stored in this disk | ||
122 | compr_data_size RO compressed size of data stored in this disk | ||
123 | mem_used_total RO the amount of memory allocated for this disk | ||
124 | mem_used_max RW the maximum amount memory zram have consumed to | ||
125 | store compressed data | ||
126 | mem_limit RW the maximum amount of memory ZRAM can use to store | ||
127 | the compressed data | ||
128 | num_migrated RO the number of objects migrated migrated by compaction | ||
129 | |||
130 | |||
131 | WARNING | ||
132 | ======= | ||
133 | per-stat sysfs attributes are considered to be deprecated. | ||
134 | The basic strategy is: | ||
135 | -- the existing RW nodes will be downgraded to WO nodes (in linux 4.11) | ||
136 | -- deprecated RO sysfs nodes will eventually be removed (in linux 4.11) | ||
137 | |||
138 | The list of deprecated attributes can be found here: | ||
139 | Documentation/ABI/obsolete/sysfs-block-zram | ||
140 | |||
141 | Basically, every attribute that has its own read accessible sysfs node | ||
142 | (e.g. num_reads) *AND* is accessible via one of the stat files (zram<id>/stat | ||
143 | or zram<id>/io_stat or zram<id>/mm_stat) is considered to be deprecated. | ||
144 | |||
145 | User space is advised to use the following files to read the device statistics. | ||
146 | |||
147 | File /sys/block/zram<id>/stat | ||
148 | |||
149 | Represents block layer statistics. Read Documentation/block/stat.txt for | ||
150 | details. | ||
151 | |||
152 | File /sys/block/zram<id>/io_stat | ||
153 | |||
154 | The stat file represents device's I/O statistics not accounted by block | ||
155 | layer and, thus, not available in zram<id>/stat file. It consists of a | ||
156 | single line of text and contains the following stats separated by | ||
157 | whitespace: | ||
158 | failed_reads | ||
159 | failed_writes | ||
160 | invalid_io | ||
161 | notify_free | ||
162 | |||
163 | File /sys/block/zram<id>/mm_stat | ||
164 | |||
165 | The stat file represents device's mm statistics. It consists of a single | ||
166 | line of text and contains the following stats separated by whitespace: | ||
167 | orig_data_size | ||
168 | compr_data_size | ||
169 | mem_used_total | ||
170 | mem_limit | ||
171 | mem_used_max | ||
172 | zero_pages | ||
173 | num_migrated | ||
115 | 174 | ||
116 | 8) Deactivate: | 175 | 8) Deactivate: |
117 | swapoff /dev/zram0 | 176 | swapoff /dev/zram0 |
diff --git a/Documentation/cgroups/cpusets.txt b/Documentation/cgroups/cpusets.txt index f2235a162529..fdf7dff3f607 100644 --- a/Documentation/cgroups/cpusets.txt +++ b/Documentation/cgroups/cpusets.txt | |||
@@ -392,8 +392,10 @@ Put simply, it costs less to balance between two smaller sched domains | |||
392 | than one big one, but doing so means that overloads in one of the | 392 | than one big one, but doing so means that overloads in one of the |
393 | two domains won't be load balanced to the other one. | 393 | two domains won't be load balanced to the other one. |
394 | 394 | ||
395 | By default, there is one sched domain covering all CPUs, except those | 395 | By default, there is one sched domain covering all CPUs, including those |
396 | marked isolated using the kernel boot time "isolcpus=" argument. | 396 | marked isolated using the kernel boot time "isolcpus=" argument. However, |
397 | the isolated CPUs will not participate in load balancing, and will not | ||
398 | have tasks running on them unless explicitly assigned. | ||
397 | 399 | ||
398 | This default load balancing across all CPUs is not well suited for | 400 | This default load balancing across all CPUs is not well suited for |
399 | the following two situations: | 401 | the following two situations: |
@@ -465,6 +467,10 @@ such partially load balanced cpusets, as they may be artificially | |||
465 | constrained to some subset of the CPUs allowed to them, for lack of | 467 | constrained to some subset of the CPUs allowed to them, for lack of |
466 | load balancing to the other CPUs. | 468 | load balancing to the other CPUs. |
467 | 469 | ||
470 | CPUs in "cpuset.isolcpus" were excluded from load balancing by the | ||
471 | isolcpus= kernel boot option, and will never be load balanced regardless | ||
472 | of the value of "cpuset.sched_load_balance" in any cpuset. | ||
473 | |||
468 | 1.7.1 sched_load_balance implementation details. | 474 | 1.7.1 sched_load_balance implementation details. |
469 | ------------------------------------------------ | 475 | ------------------------------------------------ |
470 | 476 | ||
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt index a22df3ad35ff..f456b4315e86 100644 --- a/Documentation/cgroups/memory.txt +++ b/Documentation/cgroups/memory.txt | |||
@@ -275,11 +275,6 @@ When oom event notifier is registered, event will be delivered. | |||
275 | 275 | ||
276 | 2.7 Kernel Memory Extension (CONFIG_MEMCG_KMEM) | 276 | 2.7 Kernel Memory Extension (CONFIG_MEMCG_KMEM) |
277 | 277 | ||
278 | WARNING: Current implementation lacks reclaim support. That means allocation | ||
279 | attempts will fail when close to the limit even if there are plenty of | ||
280 | kmem available for reclaim. That makes this option unusable in real | ||
281 | life so DO NOT SELECT IT unless for development purposes. | ||
282 | |||
283 | With the Kernel memory extension, the Memory Controller is able to limit | 278 | With the Kernel memory extension, the Memory Controller is able to limit |
284 | the amount of kernel memory used by the system. Kernel memory is fundamentally | 279 | the amount of kernel memory used by the system. Kernel memory is fundamentally |
285 | different than user memory, since it can't be swapped out, which makes it | 280 | different than user memory, since it can't be swapped out, which makes it |
@@ -345,6 +340,9 @@ set: | |||
345 | In this case, the admin could set up K so that the sum of all groups is | 340 | In this case, the admin could set up K so that the sum of all groups is |
346 | never greater than the total memory, and freely set U at the cost of his | 341 | never greater than the total memory, and freely set U at the cost of his |
347 | QoS. | 342 | QoS. |
343 | WARNING: In the current implementation, memory reclaim will NOT be | ||
344 | triggered for a cgroup when it hits K while staying below U, which makes | ||
345 | this setup impractical. | ||
348 | 346 | ||
349 | U != 0, K >= U: | 347 | U != 0, K >= U: |
350 | Since kmem charges will also be fed to the user counter and reclaim will be | 348 | Since kmem charges will also be fed to the user counter and reclaim will be |
diff --git a/Documentation/cgroups/unified-hierarchy.txt b/Documentation/cgroups/unified-hierarchy.txt index 71daa35ec2d9..eb102fb72213 100644 --- a/Documentation/cgroups/unified-hierarchy.txt +++ b/Documentation/cgroups/unified-hierarchy.txt | |||
@@ -404,8 +404,8 @@ supported and the interface files "release_agent" and | |||
404 | be understood as an underflow into the highest possible value, -2 or | 404 | be understood as an underflow into the highest possible value, -2 or |
405 | -10M etc. do not work, so it's not consistent. | 405 | -10M etc. do not work, so it's not consistent. |
406 | 406 | ||
407 | memory.low, memory.high, and memory.max will use the string | 407 | memory.low, memory.high, and memory.max will use the string "max" to |
408 | "infinity" to indicate and set the highest possible value. | 408 | indicate and set the highest possible value. |
409 | 409 | ||
410 | 5. Planned Changes | 410 | 5. Planned Changes |
411 | 411 | ||
diff --git a/Documentation/cma/debugfs.txt b/Documentation/cma/debugfs.txt new file mode 100644 index 000000000000..6cef20a8cedc --- /dev/null +++ b/Documentation/cma/debugfs.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | The CMA debugfs interface is useful to retrieve basic information out of the | ||
2 | different CMA areas and to test allocation/release in each of the areas. | ||
3 | |||
4 | Each CMA zone represents a directory under <debugfs>/cma/, indexed by the | ||
5 | kernel's CMA index. So the first CMA zone would be: | ||
6 | |||
7 | <debugfs>/cma/cma-0 | ||
8 | |||
9 | The structure of the files created under that directory is as follows: | ||
10 | |||
11 | - [RO] base_pfn: The base PFN (Page Frame Number) of the zone. | ||
12 | - [RO] count: Amount of memory in the CMA area. | ||
13 | - [RO] order_per_bit: Order of pages represented by one bit. | ||
14 | - [RO] bitmap: The bitmap of page states in the zone. | ||
15 | - [WO] alloc: Allocate N pages from that CMA area. For example: | ||
16 | |||
17 | echo 5 > <debugfs>/cma/cma-2/alloc | ||
18 | |||
19 | would try to allocate 5 pages from the cma-2 area. | ||
20 | |||
21 | - [WO] free: Free N pages from that CMA area, similar to the above. | ||
diff --git a/Documentation/crypto/crypto-API-userspace.txt b/Documentation/crypto/crypto-API-userspace.txt deleted file mode 100644 index ac619cd90300..000000000000 --- a/Documentation/crypto/crypto-API-userspace.txt +++ /dev/null | |||
@@ -1,205 +0,0 @@ | |||
1 | Introduction | ||
2 | ============ | ||
3 | |||
4 | The concepts of the kernel crypto API visible to kernel space is fully | ||
5 | applicable to the user space interface as well. Therefore, the kernel crypto API | ||
6 | high level discussion for the in-kernel use cases applies here as well. | ||
7 | |||
8 | The major difference, however, is that user space can only act as a consumer | ||
9 | and never as a provider of a transformation or cipher algorithm. | ||
10 | |||
11 | The following covers the user space interface exported by the kernel crypto | ||
12 | API. A working example of this description is libkcapi that can be obtained from | ||
13 | [1]. That library can be used by user space applications that require | ||
14 | cryptographic services from the kernel. | ||
15 | |||
16 | Some details of the in-kernel kernel crypto API aspects do not | ||
17 | apply to user space, however. This includes the difference between synchronous | ||
18 | and asynchronous invocations. The user space API call is fully synchronous. | ||
19 | In addition, only a subset of all cipher types are available as documented | ||
20 | below. | ||
21 | |||
22 | |||
23 | User space API general remarks | ||
24 | ============================== | ||
25 | |||
26 | The kernel crypto API is accessible from user space. Currently, the following | ||
27 | ciphers are accessible: | ||
28 | |||
29 | * Message digest including keyed message digest (HMAC, CMAC) | ||
30 | |||
31 | * Symmetric ciphers | ||
32 | |||
33 | Note, AEAD ciphers are currently not supported via the symmetric cipher | ||
34 | interface. | ||
35 | |||
36 | The interface is provided via Netlink using the type AF_ALG. In addition, the | ||
37 | setsockopt option type is SOL_ALG. In case the user space header files do not | ||
38 | export these flags yet, use the following macros: | ||
39 | |||
40 | #ifndef AF_ALG | ||
41 | #define AF_ALG 38 | ||
42 | #endif | ||
43 | #ifndef SOL_ALG | ||
44 | #define SOL_ALG 279 | ||
45 | #endif | ||
46 | |||
47 | A cipher is accessed with the same name as done for the in-kernel API calls. | ||
48 | This includes the generic vs. unique naming schema for ciphers as well as the | ||
49 | enforcement of priorities for generic names. | ||
50 | |||
51 | To interact with the kernel crypto API, a Netlink socket must be created by | ||
52 | the user space application. User space invokes the cipher operation with the | ||
53 | send/write system call family. The result of the cipher operation is obtained | ||
54 | with the read/recv system call family. | ||
55 | |||
56 | The following API calls assume that the Netlink socket descriptor is already | ||
57 | opened by the user space application and discusses only the kernel crypto API | ||
58 | specific invocations. | ||
59 | |||
60 | To initialize a Netlink interface, the following sequence has to be performed | ||
61 | by the consumer: | ||
62 | |||
63 | 1. Create a socket of type AF_ALG with the struct sockaddr_alg parameter | ||
64 | specified below for the different cipher types. | ||
65 | |||
66 | 2. Invoke bind with the socket descriptor | ||
67 | |||
68 | 3. Invoke accept with the socket descriptor. The accept system call | ||
69 | returns a new file descriptor that is to be used to interact with | ||
70 | the particular cipher instance. When invoking send/write or recv/read | ||
71 | system calls to send data to the kernel or obtain data from the | ||
72 | kernel, the file descriptor returned by accept must be used. | ||
73 | |||
74 | In-place cipher operation | ||
75 | ========================= | ||
76 | |||
77 | Just like the in-kernel operation of the kernel crypto API, the user space | ||
78 | interface allows the cipher operation in-place. That means that the input buffer | ||
79 | used for the send/write system call and the output buffer used by the read/recv | ||
80 | system call may be one and the same. This is of particular interest for | ||
81 | symmetric cipher operations where a copying of the output data to its final | ||
82 | destination can be avoided. | ||
83 | |||
84 | If a consumer on the other hand wants to maintain the plaintext and the | ||
85 | ciphertext in different memory locations, all a consumer needs to do is to | ||
86 | provide different memory pointers for the encryption and decryption operation. | ||
87 | |||
88 | Message digest API | ||
89 | ================== | ||
90 | |||
91 | The message digest type to be used for the cipher operation is selected when | ||
92 | invoking the bind syscall. bind requires the caller to provide a filled | ||
93 | struct sockaddr data structure. This data structure must be filled as follows: | ||
94 | |||
95 | struct sockaddr_alg sa = { | ||
96 | .salg_family = AF_ALG, | ||
97 | .salg_type = "hash", /* this selects the hash logic in the kernel */ | ||
98 | .salg_name = "sha1" /* this is the cipher name */ | ||
99 | }; | ||
100 | |||
101 | The salg_type value "hash" applies to message digests and keyed message digests. | ||
102 | Though, a keyed message digest is referenced by the appropriate salg_name. | ||
103 | Please see below for the setsockopt interface that explains how the key can be | ||
104 | set for a keyed message digest. | ||
105 | |||
106 | Using the send() system call, the application provides the data that should be | ||
107 | processed with the message digest. The send system call allows the following | ||
108 | flags to be specified: | ||
109 | |||
110 | * MSG_MORE: If this flag is set, the send system call acts like a | ||
111 | message digest update function where the final hash is not | ||
112 | yet calculated. If the flag is not set, the send system call | ||
113 | calculates the final message digest immediately. | ||
114 | |||
115 | With the recv() system call, the application can read the message digest from | ||
116 | the kernel crypto API. If the buffer is too small for the message digest, the | ||
117 | flag MSG_TRUNC is set by the kernel. | ||
118 | |||
119 | In order to set a message digest key, the calling application must use the | ||
120 | setsockopt() option of ALG_SET_KEY. If the key is not set the HMAC operation is | ||
121 | performed without the initial HMAC state change caused by the key. | ||
122 | |||
123 | |||
124 | Symmetric cipher API | ||
125 | ==================== | ||
126 | |||
127 | The operation is very similar to the message digest discussion. During | ||
128 | initialization, the struct sockaddr data structure must be filled as follows: | ||
129 | |||
130 | struct sockaddr_alg sa = { | ||
131 | .salg_family = AF_ALG, | ||
132 | .salg_type = "skcipher", /* this selects the symmetric cipher */ | ||
133 | .salg_name = "cbc(aes)" /* this is the cipher name */ | ||
134 | }; | ||
135 | |||
136 | Before data can be sent to the kernel using the write/send system call family, | ||
137 | the consumer must set the key. The key setting is described with the setsockopt | ||
138 | invocation below. | ||
139 | |||
140 | Using the sendmsg() system call, the application provides the data that should | ||
141 | be processed for encryption or decryption. In addition, the IV is specified | ||
142 | with the data structure provided by the sendmsg() system call. | ||
143 | |||
144 | The sendmsg system call parameter of struct msghdr is embedded into the | ||
145 | struct cmsghdr data structure. See recv(2) and cmsg(3) for more information | ||
146 | on how the cmsghdr data structure is used together with the send/recv system | ||
147 | call family. That cmsghdr data structure holds the following information | ||
148 | specified with a separate header instances: | ||
149 | |||
150 | * specification of the cipher operation type with one of these flags: | ||
151 | ALG_OP_ENCRYPT - encryption of data | ||
152 | ALG_OP_DECRYPT - decryption of data | ||
153 | |||
154 | * specification of the IV information marked with the flag ALG_SET_IV | ||
155 | |||
156 | The send system call family allows the following flag to be specified: | ||
157 | |||
158 | * MSG_MORE: If this flag is set, the send system call acts like a | ||
159 | cipher update function where more input data is expected | ||
160 | with a subsequent invocation of the send system call. | ||
161 | |||
162 | Note: The kernel reports -EINVAL for any unexpected data. The caller must | ||
163 | make sure that all data matches the constraints given in /proc/crypto for the | ||
164 | selected cipher. | ||
165 | |||
166 | With the recv() system call, the application can read the result of the | ||
167 | cipher operation from the kernel crypto API. The output buffer must be at least | ||
168 | as large as to hold all blocks of the encrypted or decrypted data. If the output | ||
169 | data size is smaller, only as many blocks are returned that fit into that | ||
170 | output buffer size. | ||
171 | |||
172 | Setsockopt interface | ||
173 | ==================== | ||
174 | |||
175 | In addition to the read/recv and send/write system call handling to send and | ||
176 | retrieve data subject to the cipher operation, a consumer also needs to set | ||
177 | the additional information for the cipher operation. This additional information | ||
178 | is set using the setsockopt system call that must be invoked with the file | ||
179 | descriptor of the open cipher (i.e. the file descriptor returned by the | ||
180 | accept system call). | ||
181 | |||
182 | Each setsockopt invocation must use the level SOL_ALG. | ||
183 | |||
184 | The setsockopt interface allows setting the following data using the mentioned | ||
185 | optname: | ||
186 | |||
187 | * ALG_SET_KEY -- Setting the key. Key setting is applicable to: | ||
188 | |||
189 | - the skcipher cipher type (symmetric ciphers) | ||
190 | |||
191 | - the hash cipher type (keyed message digests) | ||
192 | |||
193 | User space API example | ||
194 | ====================== | ||
195 | |||
196 | Please see [1] for libkcapi which provides an easy-to-use wrapper around the | ||
197 | aforementioned Netlink kernel interface. [1] also contains a test application | ||
198 | that invokes all libkcapi API calls. | ||
199 | |||
200 | [1] http://www.chronox.de/libkcapi.html | ||
201 | |||
202 | Author | ||
203 | ====== | ||
204 | |||
205 | Stephan Mueller <smueller@chronox.de> | ||
diff --git a/Documentation/device-mapper/dm-crypt.txt b/Documentation/device-mapper/dm-crypt.txt index ad697781f9ac..692171fe9da0 100644 --- a/Documentation/device-mapper/dm-crypt.txt +++ b/Documentation/device-mapper/dm-crypt.txt | |||
@@ -5,7 +5,7 @@ Device-Mapper's "crypt" target provides transparent encryption of block devices | |||
5 | using the kernel crypto API. | 5 | using the kernel crypto API. |
6 | 6 | ||
7 | For a more detailed description of supported parameters see: | 7 | For a more detailed description of supported parameters see: |
8 | http://code.google.com/p/cryptsetup/wiki/DMCrypt | 8 | https://gitlab.com/cryptsetup/cryptsetup/wikis/DMCrypt |
9 | 9 | ||
10 | Parameters: <cipher> <key> <iv_offset> <device path> \ | 10 | Parameters: <cipher> <key> <iv_offset> <device path> \ |
11 | <offset> [<#opt_params> <opt_params>] | 11 | <offset> [<#opt_params> <opt_params>] |
@@ -80,7 +80,7 @@ Example scripts | |||
80 | =============== | 80 | =============== |
81 | LUKS (Linux Unified Key Setup) is now the preferred way to set up disk | 81 | LUKS (Linux Unified Key Setup) is now the preferred way to set up disk |
82 | encryption with dm-crypt using the 'cryptsetup' utility, see | 82 | encryption with dm-crypt using the 'cryptsetup' utility, see |
83 | http://code.google.com/p/cryptsetup/ | 83 | https://gitlab.com/cryptsetup/cryptsetup |
84 | 84 | ||
85 | [[ | 85 | [[ |
86 | #!/bin/sh | 86 | #!/bin/sh |
diff --git a/Documentation/device-mapper/log-writes.txt b/Documentation/device-mapper/log-writes.txt new file mode 100644 index 000000000000..c10f30c9b534 --- /dev/null +++ b/Documentation/device-mapper/log-writes.txt | |||
@@ -0,0 +1,140 @@ | |||
1 | dm-log-writes | ||
2 | ============= | ||
3 | |||
4 | This target takes 2 devices, one to pass all IO to normally, and one to log all | ||
5 | of the write operations to. This is intended for file system developers wishing | ||
6 | to verify the integrity of metadata or data as the file system is written to. | ||
7 | There is a log_write_entry written for every WRITE request and the target is | ||
8 | able to take arbitrary data from userspace to insert into the log. The data | ||
9 | that is in the WRITE requests is copied into the log to make the replay happen | ||
10 | exactly as it happened originally. | ||
11 | |||
12 | Log Ordering | ||
13 | ============ | ||
14 | |||
15 | We log things in order of completion once we are sure the write is no longer in | ||
16 | cache. This means that normal WRITE requests are not actually logged until the | ||
17 | next REQ_FLUSH request. This is to make it easier for userspace to replay the | ||
18 | log in a way that correlates to what is on disk and not what is in cache, to | ||
19 | make it easier to detect improper waiting/flushing. | ||
20 | |||
21 | This works by attaching all WRITE requests to a list once the write completes. | ||
22 | Once we see a REQ_FLUSH request we splice this list onto the request and once | ||
23 | the FLUSH request completes we log all of the WRITEs and then the FLUSH. Only | ||
24 | completed WRITEs, at the time the REQ_FLUSH is issued, are added in order to | ||
25 | simulate the worst case scenario with regard to power failures. Consider the | ||
26 | following example (W means write, C means complete): | ||
27 | |||
28 | W1,W2,W3,C3,C2,Wflush,C1,Cflush | ||
29 | |||
30 | The log would show the following | ||
31 | |||
32 | W3,W2,flush,W1.... | ||
33 | |||
34 | Again this is to simulate what is actually on disk, this allows us to detect | ||
35 | cases where a power failure at a particular point in time would create an | ||
36 | inconsistent file system. | ||
37 | |||
38 | Any REQ_FUA requests bypass this flushing mechanism and are logged as soon as | ||
39 | they complete as those requests will obviously bypass the device cache. | ||
40 | |||
41 | Any REQ_DISCARD requests are treated like WRITE requests. Otherwise we would | ||
42 | have all the DISCARD requests, and then the WRITE requests and then the FLUSH | ||
43 | request. Consider the following example: | ||
44 | |||
45 | WRITE block 1, DISCARD block 1, FLUSH | ||
46 | |||
47 | If we logged DISCARD when it completed, the replay would look like this | ||
48 | |||
49 | DISCARD 1, WRITE 1, FLUSH | ||
50 | |||
51 | which isn't quite what happened and wouldn't be caught during the log replay. | ||
52 | |||
53 | Target interface | ||
54 | ================ | ||
55 | |||
56 | i) Constructor | ||
57 | |||
58 | log-writes <dev_path> <log_dev_path> | ||
59 | |||
60 | dev_path : Device that all of the IO will go to normally. | ||
61 | log_dev_path : Device where the log entries are written to. | ||
62 | |||
63 | ii) Status | ||
64 | |||
65 | <#logged entries> <highest allocated sector> | ||
66 | |||
67 | #logged entries : Number of logged entries | ||
68 | highest allocated sector : Highest allocated sector | ||
69 | |||
70 | iii) Messages | ||
71 | |||
72 | mark <description> | ||
73 | |||
74 | You can use a dmsetup message to set an arbitrary mark in a log. | ||
75 | For example say you want to fsck a file system after every | ||
76 | write, but first you need to replay up to the mkfs to make sure | ||
77 | we're fsck'ing something reasonable, you would do something like | ||
78 | this: | ||
79 | |||
80 | mkfs.btrfs -f /dev/mapper/log | ||
81 | dmsetup message log 0 mark mkfs | ||
82 | <run test> | ||
83 | |||
84 | This would allow you to replay the log up to the mkfs mark and | ||
85 | then replay from that point on doing the fsck check in the | ||
86 | interval that you want. | ||
87 | |||
88 | Every log has a mark at the end labeled "dm-log-writes-end". | ||
89 | |||
90 | Userspace component | ||
91 | =================== | ||
92 | |||
93 | There is a userspace tool that will replay the log for you in various ways. | ||
94 | It can be found here: https://github.com/josefbacik/log-writes | ||
95 | |||
96 | Example usage | ||
97 | ============= | ||
98 | |||
99 | Say you want to test fsync on your file system. You would do something like | ||
100 | this: | ||
101 | |||
102 | TABLE="0 $(blockdev --getsz /dev/sdb) log-writes /dev/sdb /dev/sdc" | ||
103 | dmsetup create log --table "$TABLE" | ||
104 | mkfs.btrfs -f /dev/mapper/log | ||
105 | dmsetup message log 0 mark mkfs | ||
106 | |||
107 | mount /dev/mapper/log /mnt/btrfs-test | ||
108 | <some test that does fsync at the end> | ||
109 | dmsetup message log 0 mark fsync | ||
110 | md5sum /mnt/btrfs-test/foo | ||
111 | umount /mnt/btrfs-test | ||
112 | |||
113 | dmsetup remove log | ||
114 | replay-log --log /dev/sdc --replay /dev/sdb --end-mark fsync | ||
115 | mount /dev/sdb /mnt/btrfs-test | ||
116 | md5sum /mnt/btrfs-test/foo | ||
117 | <verify md5sum's are correct> | ||
118 | |||
119 | Another option is to do a complicated file system operation and verify the file | ||
120 | system is consistent during the entire operation. You could do this with: | ||
121 | |||
122 | TABLE="0 $(blockdev --getsz /dev/sdb) log-writes /dev/sdb /dev/sdc" | ||
123 | dmsetup create log --table "$TABLE" | ||
124 | mkfs.btrfs -f /dev/mapper/log | ||
125 | dmsetup message log 0 mark mkfs | ||
126 | |||
127 | mount /dev/mapper/log /mnt/btrfs-test | ||
128 | <fsstress to dirty the fs> | ||
129 | btrfs filesystem balance /mnt/btrfs-test | ||
130 | umount /mnt/btrfs-test | ||
131 | dmsetup remove log | ||
132 | |||
133 | replay-log --log /dev/sdc --replay /dev/sdb --end-mark mkfs | ||
134 | btrfsck /dev/sdb | ||
135 | replay-log --log /dev/sdc --replay /dev/sdb --start-mark mkfs \ | ||
136 | --fsck "btrfsck /dev/sdb" --check fua | ||
137 | |||
138 | And that will replay the log until it sees a FUA request, run the fsck command | ||
139 | and if the fsck passes it will replay to the next FUA, until it is completed or | ||
140 | the fsck command exists abnormally. | ||
diff --git a/Documentation/device-mapper/switch.txt b/Documentation/device-mapper/switch.txt index 8897d0494838..424835e57f27 100644 --- a/Documentation/device-mapper/switch.txt +++ b/Documentation/device-mapper/switch.txt | |||
@@ -47,8 +47,8 @@ consume far too much memory. | |||
47 | Using this device-mapper switch target we can now build a two-layer | 47 | Using this device-mapper switch target we can now build a two-layer |
48 | device hierarchy: | 48 | device hierarchy: |
49 | 49 | ||
50 | Upper Tier – Determine which array member the I/O should be sent to. | 50 | Upper Tier - Determine which array member the I/O should be sent to. |
51 | Lower Tier – Load balance amongst paths to a particular member. | 51 | Lower Tier - Load balance amongst paths to a particular member. |
52 | 52 | ||
53 | The lower tier consists of a single dm multipath device for each member. | 53 | The lower tier consists of a single dm multipath device for each member. |
54 | Each of these multipath devices contains the set of paths directly to | 54 | Each of these multipath devices contains the set of paths directly to |
diff --git a/Documentation/device-mapper/thin-provisioning.txt b/Documentation/device-mapper/thin-provisioning.txt index 2f5173500bd9..4f67578b2954 100644 --- a/Documentation/device-mapper/thin-provisioning.txt +++ b/Documentation/device-mapper/thin-provisioning.txt | |||
@@ -380,9 +380,6 @@ then you'll have no access to blocks mapped beyond the end. If you | |||
380 | load a target that is bigger than before, then extra blocks will be | 380 | load a target that is bigger than before, then extra blocks will be |
381 | provisioned as and when needed. | 381 | provisioned as and when needed. |
382 | 382 | ||
383 | If you wish to reduce the size of your thin device and potentially | ||
384 | regain some space then send the 'trim' message to the pool. | ||
385 | |||
386 | ii) Status | 383 | ii) Status |
387 | 384 | ||
388 | <nr mapped sectors> <highest mapped sector> | 385 | <nr mapped sectors> <highest mapped sector> |
diff --git a/Documentation/device-mapper/verity.txt b/Documentation/device-mapper/verity.txt index 9884681535ee..e15bc1a0fb98 100644 --- a/Documentation/device-mapper/verity.txt +++ b/Documentation/device-mapper/verity.txt | |||
@@ -11,6 +11,7 @@ Construction Parameters | |||
11 | <data_block_size> <hash_block_size> | 11 | <data_block_size> <hash_block_size> |
12 | <num_data_blocks> <hash_start_block> | 12 | <num_data_blocks> <hash_start_block> |
13 | <algorithm> <digest> <salt> | 13 | <algorithm> <digest> <salt> |
14 | [<#opt_params> <opt_params>] | ||
14 | 15 | ||
15 | <version> | 16 | <version> |
16 | This is the type of the on-disk hash format. | 17 | This is the type of the on-disk hash format. |
@@ -62,6 +63,22 @@ Construction Parameters | |||
62 | <salt> | 63 | <salt> |
63 | The hexadecimal encoding of the salt value. | 64 | The hexadecimal encoding of the salt value. |
64 | 65 | ||
66 | <#opt_params> | ||
67 | Number of optional parameters. If there are no optional parameters, | ||
68 | the optional paramaters section can be skipped or #opt_params can be zero. | ||
69 | Otherwise #opt_params is the number of following arguments. | ||
70 | |||
71 | Example of optional parameters section: | ||
72 | 1 ignore_corruption | ||
73 | |||
74 | ignore_corruption | ||
75 | Log corrupted blocks, but allow read operations to proceed normally. | ||
76 | |||
77 | restart_on_corruption | ||
78 | Restart the system when a corrupted block is discovered. This option is | ||
79 | not compatible with ignore_corruption and requires user space support to | ||
80 | avoid restart loops. | ||
81 | |||
65 | Theory of operation | 82 | Theory of operation |
66 | =================== | 83 | =================== |
67 | 84 | ||
@@ -125,7 +142,7 @@ block boundary) are the hash blocks which are stored a depth at a time | |||
125 | 142 | ||
126 | The full specification of kernel parameters and on-disk metadata format | 143 | The full specification of kernel parameters and on-disk metadata format |
127 | is available at the cryptsetup project's wiki page | 144 | is available at the cryptsetup project's wiki page |
128 | http://code.google.com/p/cryptsetup/wiki/DMVerity | 145 | https://gitlab.com/cryptsetup/cryptsetup/wikis/DMVerity |
129 | 146 | ||
130 | Status | 147 | Status |
131 | ====== | 148 | ====== |
@@ -142,7 +159,7 @@ Set up a device: | |||
142 | 159 | ||
143 | A command line tool veritysetup is available to compute or verify | 160 | A command line tool veritysetup is available to compute or verify |
144 | the hash tree or activate the kernel device. This is available from | 161 | the hash tree or activate the kernel device. This is available from |
145 | the cryptsetup upstream repository http://code.google.com/p/cryptsetup/ | 162 | the cryptsetup upstream repository https://gitlab.com/cryptsetup/cryptsetup/ |
146 | (as a libcryptsetup extension). | 163 | (as a libcryptsetup extension). |
147 | 164 | ||
148 | Create hash on the device: | 165 | Create hash on the device: |
diff --git a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm11351-cpu-method b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm11351-cpu-method.txt index 8240c023e202..8240c023e202 100644 --- a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm11351-cpu-method +++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm11351-cpu-method.txt | |||
diff --git a/Documentation/devicetree/bindings/arm/bcm/bcm11351.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm11351.txt index 0ff6560e6094..0ff6560e6094 100644 --- a/Documentation/devicetree/bindings/arm/bcm/bcm11351.txt +++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm11351.txt | |||
diff --git a/Documentation/devicetree/bindings/arm/bcm/bcm21664.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm21664.txt index e0774255e1a6..e0774255e1a6 100644 --- a/Documentation/devicetree/bindings/arm/bcm/bcm21664.txt +++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm21664.txt | |||
diff --git a/Documentation/devicetree/bindings/arm/bcm2835.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt index ac683480c486..ac683480c486 100644 --- a/Documentation/devicetree/bindings/arm/bcm2835.txt +++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt | |||
diff --git a/Documentation/devicetree/bindings/arm/bcm4708.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.txt index 6b0f49f6f499..6b0f49f6f499 100644 --- a/Documentation/devicetree/bindings/arm/bcm4708.txt +++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.txt | |||
diff --git a/Documentation/devicetree/bindings/arm/bcm/bcm63138.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm63138.txt index bd49987a8812..bd49987a8812 100644 --- a/Documentation/devicetree/bindings/arm/bcm/bcm63138.txt +++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm63138.txt | |||
diff --git a/Documentation/devicetree/bindings/arm/brcm-brcmstb.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,brcmstb.txt index 430608ec09f0..430608ec09f0 100644 --- a/Documentation/devicetree/bindings/arm/brcm-brcmstb.txt +++ b/Documentation/devicetree/bindings/arm/bcm/brcm,brcmstb.txt | |||
diff --git a/Documentation/devicetree/bindings/arm/bcm/cygnus.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,cygnus.txt index 4c77169bb534..4c77169bb534 100644 --- a/Documentation/devicetree/bindings/arm/bcm/cygnus.txt +++ b/Documentation/devicetree/bindings/arm/bcm/brcm,cygnus.txt | |||
diff --git a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt index f4445e5a2bbb..1e097037349c 100644 --- a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt +++ b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt | |||
@@ -22,6 +22,8 @@ Optional Properties: | |||
22 | - pclkN, clkN: Pairs of parent of input clock and input clock to the | 22 | - pclkN, clkN: Pairs of parent of input clock and input clock to the |
23 | devices in this power domain. Maximum of 4 pairs (N = 0 to 3) | 23 | devices in this power domain. Maximum of 4 pairs (N = 0 to 3) |
24 | are supported currently. | 24 | are supported currently. |
25 | - power-domains: phandle pointing to the parent power domain, for more details | ||
26 | see Documentation/devicetree/bindings/power/power_domain.txt | ||
25 | 27 | ||
26 | Node of a device using power domains must have a power-domains property | 28 | Node of a device using power domains must have a power-domains property |
27 | defined with a phandle to respective power domain. | 29 | defined with a phandle to respective power domain. |
diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,vf610-mscm-cpucfg.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,vf610-mscm-cpucfg.txt new file mode 100644 index 000000000000..44aa3c451ccf --- /dev/null +++ b/Documentation/devicetree/bindings/arm/freescale/fsl,vf610-mscm-cpucfg.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | Freescale Vybrid Miscellaneous System Control - CPU Configuration | ||
2 | |||
3 | The MSCM IP contains multiple sub modules, this binding describes the first | ||
4 | block of registers which contains CPU configuration information. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: "fsl,vf610-mscm-cpucfg", "syscon" | ||
8 | - reg: the register range of the MSCM CPU configuration registers | ||
9 | |||
10 | Example: | ||
11 | mscm_cpucfg: cpucfg@40001000 { | ||
12 | compatible = "fsl,vf610-mscm-cpucfg", "syscon"; | ||
13 | reg = <0x40001000 0x800>; | ||
14 | } | ||
diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,vf610-mscm-ir.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,vf610-mscm-ir.txt new file mode 100644 index 000000000000..669808b2af49 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/freescale/fsl,vf610-mscm-ir.txt | |||
@@ -0,0 +1,33 @@ | |||
1 | Freescale Vybrid Miscellaneous System Control - Interrupt Router | ||
2 | |||
3 | The MSCM IP contains multiple sub modules, this binding describes the second | ||
4 | block of registers which control the interrupt router. The interrupt router | ||
5 | allows to configure the recipient of each peripheral interrupt. Furthermore | ||
6 | it controls the directed processor interrupts. The module is available in all | ||
7 | Vybrid SoC's but is only really useful in dual core configurations (VF6xx | ||
8 | which comes with a Cortex-A5/Cortex-M4 combination). | ||
9 | |||
10 | Required properties: | ||
11 | - compatible: "fsl,vf610-mscm-ir" | ||
12 | - reg: the register range of the MSCM Interrupt Router | ||
13 | - fsl,cpucfg: The handle to the MSCM CPU configuration node, required | ||
14 | to get the current CPU ID | ||
15 | - interrupt-controller: Identifies the node as an interrupt controller | ||
16 | - #interrupt-cells: Two cells, interrupt number and cells. | ||
17 | The hardware interrupt number according to interrupt | ||
18 | assignment of the interrupt router is required. | ||
19 | Flags get passed only when using GIC as parent. Flags | ||
20 | encoding as documented by the GIC bindings. | ||
21 | - interrupt-parent: Should be the phandle for the interrupt controller of | ||
22 | the CPU the device tree is intended to be used on. This | ||
23 | is either the node of the GIC or NVIC controller. | ||
24 | |||
25 | Example: | ||
26 | mscm_ir: interrupt-controller@40001800 { | ||
27 | compatible = "fsl,vf610-mscm-ir"; | ||
28 | reg = <0x40001800 0x400>; | ||
29 | fsl,cpucfg = <&mscm_cpucfg>; | ||
30 | interrupt-controller; | ||
31 | #interrupt-cells = <2>; | ||
32 | interrupt-parent = <&intc>; | ||
33 | } | ||
diff --git a/Documentation/devicetree/bindings/arm/gic.txt b/Documentation/devicetree/bindings/arm/gic.txt index c97484b73e72..1e0d21201d3a 100644 --- a/Documentation/devicetree/bindings/arm/gic.txt +++ b/Documentation/devicetree/bindings/arm/gic.txt | |||
@@ -56,11 +56,6 @@ Optional | |||
56 | regions, used when the GIC doesn't have banked registers. The offset is | 56 | regions, used when the GIC doesn't have banked registers. The offset is |
57 | cpu-offset * cpu-nr. | 57 | cpu-offset * cpu-nr. |
58 | 58 | ||
59 | - arm,routable-irqs : Total number of gic irq inputs which are not directly | ||
60 | connected from the peripherals, but are routed dynamically | ||
61 | by a crossbar/multiplexer preceding the GIC. The GIC irq | ||
62 | input line is assigned dynamically when the corresponding | ||
63 | peripheral's crossbar line is mapped. | ||
64 | Example: | 59 | Example: |
65 | 60 | ||
66 | intc: interrupt-controller@fff11000 { | 61 | intc: interrupt-controller@fff11000 { |
@@ -68,7 +63,6 @@ Example: | |||
68 | #interrupt-cells = <3>; | 63 | #interrupt-cells = <3>; |
69 | #address-cells = <1>; | 64 | #address-cells = <1>; |
70 | interrupt-controller; | 65 | interrupt-controller; |
71 | arm,routable-irqs = <160>; | ||
72 | reg = <0xfff11000 0x1000>, | 66 | reg = <0xfff11000 0x1000>, |
73 | <0xfff10100 0x100>; | 67 | <0xfff10100 0x100>; |
74 | }; | 68 | }; |
diff --git a/Documentation/devicetree/bindings/arm/omap/crossbar.txt b/Documentation/devicetree/bindings/arm/omap/crossbar.txt index 4139db353d0a..a9b28d74d902 100644 --- a/Documentation/devicetree/bindings/arm/omap/crossbar.txt +++ b/Documentation/devicetree/bindings/arm/omap/crossbar.txt | |||
@@ -9,7 +9,9 @@ inputs. | |||
9 | Required properties: | 9 | Required properties: |
10 | - compatible : Should be "ti,irq-crossbar" | 10 | - compatible : Should be "ti,irq-crossbar" |
11 | - reg: Base address and the size of the crossbar registers. | 11 | - reg: Base address and the size of the crossbar registers. |
12 | - ti,max-irqs: Total number of irqs available at the interrupt controller. | 12 | - interrupt-controller: indicates that this block is an interrupt controller. |
13 | - interrupt-parent: the interrupt controller this block is connected to. | ||
14 | - ti,max-irqs: Total number of irqs available at the parent interrupt controller. | ||
13 | - ti,max-crossbar-sources: Maximum number of crossbar sources that can be routed. | 15 | - ti,max-crossbar-sources: Maximum number of crossbar sources that can be routed. |
14 | - ti,reg-size: Size of a individual register in bytes. Every individual | 16 | - ti,reg-size: Size of a individual register in bytes. Every individual |
15 | register is assumed to be of same size. Valid sizes are 1, 2, 4. | 17 | register is assumed to be of same size. Valid sizes are 1, 2, 4. |
@@ -27,13 +29,13 @@ Optional properties: | |||
27 | when the interrupt controller irq is unused (when not provided, default is 0) | 29 | when the interrupt controller irq is unused (when not provided, default is 0) |
28 | 30 | ||
29 | Examples: | 31 | Examples: |
30 | crossbar_mpu: @4a020000 { | 32 | crossbar_mpu: crossbar@4a002a48 { |
31 | compatible = "ti,irq-crossbar"; | 33 | compatible = "ti,irq-crossbar"; |
32 | reg = <0x4a002a48 0x130>; | 34 | reg = <0x4a002a48 0x130>; |
33 | ti,max-irqs = <160>; | 35 | ti,max-irqs = <160>; |
34 | ti,max-crossbar-sources = <400>; | 36 | ti,max-crossbar-sources = <400>; |
35 | ti,reg-size = <2>; | 37 | ti,reg-size = <2>; |
36 | ti,irqs-reserved = <0 1 2 3 5 6 131 132 139 140>; | 38 | ti,irqs-reserved = <0 1 2 3 5 6 131 132>; |
37 | ti,irqs-skip = <10 133 139 140>; | 39 | ti,irqs-skip = <10 133 139 140>; |
38 | }; | 40 | }; |
39 | 41 | ||
@@ -44,10 +46,6 @@ Documentation/devicetree/bindings/arm/gic.txt for further details. | |||
44 | 46 | ||
45 | An interrupt consumer on an SoC using crossbar will use: | 47 | An interrupt consumer on an SoC using crossbar will use: |
46 | interrupts = <GIC_SPI request_number interrupt_level> | 48 | interrupts = <GIC_SPI request_number interrupt_level> |
47 | When the request number is between 0 to that described by | ||
48 | "ti,max-crossbar-sources", it is assumed to be a crossbar mapping. If the | ||
49 | request_number is greater than "ti,max-crossbar-sources", then it is mapped as a | ||
50 | quirky hardware mapping direct to GIC. | ||
51 | 49 | ||
52 | Example: | 50 | Example: |
53 | device_x@0x4a023000 { | 51 | device_x@0x4a023000 { |
@@ -55,9 +53,3 @@ Example: | |||
55 | interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>; | 53 | interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>; |
56 | ... | 54 | ... |
57 | }; | 55 | }; |
58 | |||
59 | device_y@0x4a033000 { | ||
60 | /* Direct mapped GIC SPI 1 used */ | ||
61 | interrupts = <GIC_SPI DIRECT_IRQ(1) IRQ_TYPE_LEVEL_HIGH>; | ||
62 | ... | ||
63 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/pmu.txt b/Documentation/devicetree/bindings/arm/pmu.txt index 75ef91d08f3b..3b5f5d1088c6 100644 --- a/Documentation/devicetree/bindings/arm/pmu.txt +++ b/Documentation/devicetree/bindings/arm/pmu.txt | |||
@@ -18,12 +18,21 @@ Required properties: | |||
18 | "arm,arm11mpcore-pmu" | 18 | "arm,arm11mpcore-pmu" |
19 | "arm,arm1176-pmu" | 19 | "arm,arm1176-pmu" |
20 | "arm,arm1136-pmu" | 20 | "arm,arm1136-pmu" |
21 | "qcom,scorpion-pmu" | ||
22 | "qcom,scorpion-mp-pmu" | ||
21 | "qcom,krait-pmu" | 23 | "qcom,krait-pmu" |
22 | - interrupts : 1 combined interrupt or 1 per core. If the interrupt is a per-cpu | 24 | - interrupts : 1 combined interrupt or 1 per core. If the interrupt is a per-cpu |
23 | interrupt (PPI) then 1 interrupt should be specified. | 25 | interrupt (PPI) then 1 interrupt should be specified. |
24 | 26 | ||
25 | Optional properties: | 27 | Optional properties: |
26 | 28 | ||
29 | - interrupt-affinity : Valid only when using SPIs, specifies a list of phandles | ||
30 | to CPU nodes corresponding directly to the affinity of | ||
31 | the SPIs listed in the interrupts property. | ||
32 | |||
33 | This property should be present when there is more than | ||
34 | a single SPI. | ||
35 | |||
27 | - qcom,no-pc-write : Indicates that this PMU doesn't support the 0xc and 0xd | 36 | - qcom,no-pc-write : Indicates that this PMU doesn't support the 0xc and 0xd |
28 | events. | 37 | events. |
29 | 38 | ||
diff --git a/Documentation/devicetree/bindings/arm/samsung/pmu.txt b/Documentation/devicetree/bindings/arm/samsung/pmu.txt index 67b211381f2b..2d6356d8daf4 100644 --- a/Documentation/devicetree/bindings/arm/samsung/pmu.txt +++ b/Documentation/devicetree/bindings/arm/samsung/pmu.txt | |||
@@ -29,10 +29,27 @@ Properties: | |||
29 | - clocks : list of phandles and specifiers to all input clocks listed in | 29 | - clocks : list of phandles and specifiers to all input clocks listed in |
30 | clock-names property. | 30 | clock-names property. |
31 | 31 | ||
32 | Optional properties: | ||
33 | |||
34 | Some PMUs are capable of behaving as an interrupt controller (mostly | ||
35 | to wake up a suspended PMU). In which case, they can have the | ||
36 | following properties: | ||
37 | |||
38 | - interrupt-controller: indicate that said PMU is an interrupt controller | ||
39 | |||
40 | - #interrupt-cells: must be identical to the that of the parent interrupt | ||
41 | controller. | ||
42 | |||
43 | - interrupt-parent: a phandle indicating which interrupt controller | ||
44 | this PMU signals interrupts to. | ||
45 | |||
32 | Example : | 46 | Example : |
33 | pmu_system_controller: system-controller@10040000 { | 47 | pmu_system_controller: system-controller@10040000 { |
34 | compatible = "samsung,exynos5250-pmu", "syscon"; | 48 | compatible = "samsung,exynos5250-pmu", "syscon"; |
35 | reg = <0x10040000 0x5000>; | 49 | reg = <0x10040000 0x5000>; |
50 | interrupt-controller; | ||
51 | #interrupt-cells = <3>; | ||
52 | interrupt-parent = <&gic>; | ||
36 | #clock-cells = <1>; | 53 | #clock-cells = <1>; |
37 | clock-names = "clkout0", "clkout1", "clkout2", "clkout3", | 54 | clock-names = "clkout0", "clkout1", "clkout2", "clkout3", |
38 | "clkout4", "clkout8", "clkout9"; | 55 | "clkout4", "clkout8", "clkout9"; |
diff --git a/Documentation/devicetree/bindings/arm/sti.txt b/Documentation/devicetree/bindings/arm/sti.txt index d70ec358736c..8d27f6b084c7 100644 --- a/Documentation/devicetree/bindings/arm/sti.txt +++ b/Documentation/devicetree/bindings/arm/sti.txt | |||
@@ -13,6 +13,10 @@ Boards with the ST STiH407 SoC shall have the following properties: | |||
13 | Required root node property: | 13 | Required root node property: |
14 | compatible = "st,stih407"; | 14 | compatible = "st,stih407"; |
15 | 15 | ||
16 | Boards with the ST STiH410 SoC shall have the following properties: | ||
17 | Required root node property: | ||
18 | compatible = "st,stih410"; | ||
19 | |||
16 | Boards with the ST STiH418 SoC shall have the following properties: | 20 | Boards with the ST STiH418 SoC shall have the following properties: |
17 | Required root node property: | 21 | Required root node property: |
18 | compatible = "st,stih418"; | 22 | compatible = "st,stih418"; |
diff --git a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-ahb.txt b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-ahb.txt index 067c9790062f..9a4295b54539 100644 --- a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-ahb.txt +++ b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-ahb.txt | |||
@@ -5,9 +5,12 @@ Required properties: | |||
5 | Tegra30, must contain "nvidia,tegra30-ahb". Otherwise, must contain | 5 | Tegra30, must contain "nvidia,tegra30-ahb". Otherwise, must contain |
6 | '"nvidia,<chip>-ahb", "nvidia,tegra30-ahb"' where <chip> is tegra124, | 6 | '"nvidia,<chip>-ahb", "nvidia,tegra30-ahb"' where <chip> is tegra124, |
7 | tegra132, or tegra210. | 7 | tegra132, or tegra210. |
8 | - reg : Should contain 1 register ranges(address and length) | 8 | - reg : Should contain 1 register ranges(address and length). For |
9 | Tegra20, Tegra30, and Tegra114 chips, the value must be <0x6000c004 | ||
10 | 0x10c>. For Tegra124, Tegra132 and Tegra210 chips, the value should | ||
11 | be be <0x6000c000 0x150>. | ||
9 | 12 | ||
10 | Example: | 13 | Example (for a Tegra20 chip): |
11 | ahb: ahb@6000c004 { | 14 | ahb: ahb@6000c004 { |
12 | compatible = "nvidia,tegra20-ahb"; | 15 | compatible = "nvidia,tegra20-ahb"; |
13 | reg = <0x6000c004 0x10c>; /* AHB Arbitration + Gizmo Controller */ | 16 | reg = <0x6000c004 0x10c>; /* AHB Arbitration + Gizmo Controller */ |
diff --git a/Documentation/devicetree/bindings/ata/ahci-st.txt b/Documentation/devicetree/bindings/ata/ahci-st.txt index 0574a77a0b9f..e1d01df8e3c1 100644 --- a/Documentation/devicetree/bindings/ata/ahci-st.txt +++ b/Documentation/devicetree/bindings/ata/ahci-st.txt | |||
@@ -3,29 +3,48 @@ STMicroelectronics STi SATA controller | |||
3 | This binding describes a SATA device. | 3 | This binding describes a SATA device. |
4 | 4 | ||
5 | Required properties: | 5 | Required properties: |
6 | - compatible : Must be "st,sti-ahci" | 6 | - compatible : Must be "st,ahci" |
7 | - reg : Physical base addresses and length of register sets | 7 | - reg : Physical base addresses and length of register sets |
8 | - interrupts : Interrupt associated with the SATA device | 8 | - interrupts : Interrupt associated with the SATA device |
9 | - interrupt-names : Associated name must be; "hostc" | 9 | - interrupt-names : Associated name must be; "hostc" |
10 | - resets : The power-down and soft-reset lines of SATA IP | ||
11 | - reset-names : Associated names must be; "pwr-dwn" and "sw-rst" | ||
12 | - clocks : The phandle for the clock | 10 | - clocks : The phandle for the clock |
13 | - clock-names : Associated name must be; "ahci_clk" | 11 | - clock-names : Associated name must be; "ahci_clk" |
14 | - phys : The phandle for the PHY device | 12 | - phys : The phandle for the PHY port |
15 | - phy-names : Associated name must be; "ahci_phy" | 13 | - phy-names : Associated name must be; "ahci_phy" |
16 | 14 | ||
15 | Optional properties: | ||
16 | - resets : The power-down, soft-reset and power-reset lines of SATA IP | ||
17 | - reset-names : Associated names must be; "pwr-dwn", "sw-rst" and "pwr-rst" | ||
18 | |||
17 | Example: | 19 | Example: |
18 | 20 | ||
21 | /* Example for stih416 */ | ||
19 | sata0: sata@fe380000 { | 22 | sata0: sata@fe380000 { |
20 | compatible = "st,sti-ahci"; | 23 | compatible = "st,ahci"; |
21 | reg = <0xfe380000 0x1000>; | 24 | reg = <0xfe380000 0x1000>; |
22 | interrupts = <GIC_SPI 157 IRQ_TYPE_NONE>; | 25 | interrupts = <GIC_SPI 157 IRQ_TYPE_NONE>; |
23 | interrupt-names = "hostc"; | 26 | interrupt-names = "hostc"; |
24 | phys = <&miphy365x_phy MIPHY_PORT_0 MIPHY_TYPE_SATA>; | 27 | phys = <&phy_port0 PHY_TYPE_SATA>; |
25 | phy-names = "ahci_phy"; | 28 | phy-names = "ahci_phy"; |
26 | resets = <&powerdown STIH416_SATA0_POWERDOWN>, | 29 | resets = <&powerdown STIH416_SATA0_POWERDOWN>, |
27 | <&softreset STIH416_SATA0_SOFTRESET>; | 30 | <&softreset STIH416_SATA0_SOFTRESET>; |
28 | reset-names = "pwr-dwn", "sw-rst"; | 31 | reset-names = "pwr-dwn", "sw-rst"; |
29 | clocks = <&clk_s_a0_ls CLK_ICN_REG>; | 32 | clocks = <&clk_s_a0_ls CLK_ICN_REG>; |
30 | clock-names = "ahci_clk"; | 33 | clock-names = "ahci_clk"; |
34 | }; | ||
35 | |||
36 | /* Example for stih407 family silicon */ | ||
37 | sata0: sata@9b20000 { | ||
38 | compatible = "st,ahci"; | ||
39 | reg = <0x9b20000 0x1000>; | ||
40 | interrupts = <GIC_SPI 159 IRQ_TYPE_NONE>; | ||
41 | interrupt-names = "hostc"; | ||
42 | phys = <&phy_port0 PHY_TYPE_SATA>; | ||
43 | phy-names = "ahci_phy"; | ||
44 | resets = <&powerdown STIH407_SATA0_POWERDOWN>, | ||
45 | <&softreset STIH407_SATA0_SOFTRESET>, | ||
46 | <&softreset STIH407_SATA0_PWR_SOFTRESET>; | ||
47 | reset-names = "pwr-dwn", "sw-rst", "pwr-rst"; | ||
48 | clocks = <&clk_s_c0_flexgen CLK_ICN_REG>; | ||
49 | clock-names = "ahci_clk"; | ||
31 | }; | 50 | }; |
diff --git a/Documentation/devicetree/bindings/bus/bcma.txt b/Documentation/devicetree/bindings/bus/brcm,bus-axi.txt index edd44d802139..edd44d802139 100644 --- a/Documentation/devicetree/bindings/bus/bcma.txt +++ b/Documentation/devicetree/bindings/bus/brcm,bus-axi.txt | |||
diff --git a/Documentation/devicetree/bindings/clock/bcm-kona-clock.txt b/Documentation/devicetree/bindings/clock/brcm,kona-ccu.txt index 5286e260fcae..5286e260fcae 100644 --- a/Documentation/devicetree/bindings/clock/bcm-kona-clock.txt +++ b/Documentation/devicetree/bindings/clock/brcm,kona-ccu.txt | |||
diff --git a/Documentation/devicetree/bindings/clock/pistachio-clock.txt b/Documentation/devicetree/bindings/clock/pistachio-clock.txt new file mode 100644 index 000000000000..868db499eed2 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/pistachio-clock.txt | |||
@@ -0,0 +1,123 @@ | |||
1 | Imagination Technologies Pistachio SoC clock controllers | ||
2 | ======================================================== | ||
3 | |||
4 | Pistachio has four clock controllers (core clock, peripheral clock, peripheral | ||
5 | general control, and top general control) which are instantiated individually | ||
6 | from the device-tree. | ||
7 | |||
8 | External clocks: | ||
9 | ---------------- | ||
10 | |||
11 | There are three external inputs to the clock controllers which should be | ||
12 | defined with the following clock-output-names: | ||
13 | - "xtal": External 52Mhz oscillator (required) | ||
14 | - "audio_clk_in": Alternate audio reference clock (optional) | ||
15 | - "enet_clk_in": Alternate ethernet PHY clock (optional) | ||
16 | |||
17 | Core clock controller: | ||
18 | ---------------------- | ||
19 | |||
20 | The core clock controller generates clocks for the CPU, RPU (WiFi + BT | ||
21 | co-processor), audio, and several peripherals. | ||
22 | |||
23 | Required properties: | ||
24 | - compatible: Must be "img,pistachio-clk". | ||
25 | - reg: Must contain the base address and length of the core clock controller. | ||
26 | - #clock-cells: Must be 1. The single cell is the clock identifier. | ||
27 | See dt-bindings/clock/pistachio-clk.h for the list of valid identifiers. | ||
28 | - clocks: Must contain an entry for each clock in clock-names. | ||
29 | - clock-names: Must include "xtal" (see "External clocks") and | ||
30 | "audio_clk_in_gate", "enet_clk_in_gate" which are generated by the | ||
31 | top-level general control. | ||
32 | |||
33 | Example: | ||
34 | clk_core: clock-controller@18144000 { | ||
35 | compatible = "img,pistachio-clk"; | ||
36 | reg = <0x18144000 0x800>; | ||
37 | clocks = <&xtal>, <&cr_top EXT_CLK_AUDIO_IN>, | ||
38 | <&cr_top EXT_CLK_ENET_IN>; | ||
39 | clock-names = "xtal", "audio_clk_in_gate", "enet_clk_in_gate"; | ||
40 | |||
41 | #clock-cells = <1>; | ||
42 | }; | ||
43 | |||
44 | Peripheral clock controller: | ||
45 | ---------------------------- | ||
46 | |||
47 | The peripheral clock controller generates clocks for the DDR, ROM, and other | ||
48 | peripherals. The peripheral system clock ("periph_sys") generated by the core | ||
49 | clock controller is the input clock to the peripheral clock controller. | ||
50 | |||
51 | Required properties: | ||
52 | - compatible: Must be "img,pistachio-periph-clk". | ||
53 | - reg: Must contain the base address and length of the peripheral clock | ||
54 | controller. | ||
55 | - #clock-cells: Must be 1. The single cell is the clock identifier. | ||
56 | See dt-bindings/clock/pistachio-clk.h for the list of valid identifiers. | ||
57 | - clocks: Must contain an entry for each clock in clock-names. | ||
58 | - clock-names: Must include "periph_sys", the peripheral system clock generated | ||
59 | by the core clock controller. | ||
60 | |||
61 | Example: | ||
62 | clk_periph: clock-controller@18144800 { | ||
63 | compatible = "img,pistachio-clk-periph"; | ||
64 | reg = <0x18144800 0x800>; | ||
65 | clocks = <&clk_core CLK_PERIPH_SYS>; | ||
66 | clock-names = "periph_sys"; | ||
67 | |||
68 | #clock-cells = <1>; | ||
69 | }; | ||
70 | |||
71 | Peripheral general control: | ||
72 | --------------------------- | ||
73 | |||
74 | The peripheral general control block generates system interface clocks and | ||
75 | resets for various peripherals. It also contains miscellaneous peripheral | ||
76 | control registers. The system clock ("sys") generated by the peripheral clock | ||
77 | controller is the input clock to the system clock controller. | ||
78 | |||
79 | Required properties: | ||
80 | - compatible: Must include "img,pistachio-periph-cr" and "syscon". | ||
81 | - reg: Must contain the base address and length of the peripheral general | ||
82 | control registers. | ||
83 | - #clock-cells: Must be 1. The single cell is the clock identifier. | ||
84 | See dt-bindings/clock/pistachio-clk.h for the list of valid identifiers. | ||
85 | - clocks: Must contain an entry for each clock in clock-names. | ||
86 | - clock-names: Must include "sys", the system clock generated by the peripheral | ||
87 | clock controller. | ||
88 | |||
89 | Example: | ||
90 | cr_periph: syscon@18144800 { | ||
91 | compatible = "img,pistachio-cr-periph", "syscon"; | ||
92 | reg = <0x18148000 0x1000>; | ||
93 | clocks = <&clock_periph PERIPH_CLK_PERIPH_SYS>; | ||
94 | clock-names = "sys"; | ||
95 | |||
96 | #clock-cells = <1>; | ||
97 | }; | ||
98 | |||
99 | Top-level general control: | ||
100 | -------------------------- | ||
101 | |||
102 | The top-level general control block contains miscellaneous control registers and | ||
103 | gates for the external clocks "audio_clk_in" and "enet_clk_in". | ||
104 | |||
105 | Required properties: | ||
106 | - compatible: Must include "img,pistachio-cr-top" and "syscon". | ||
107 | - reg: Must contain the base address and length of the top-level | ||
108 | control registers. | ||
109 | - clocks: Must contain an entry for each clock in clock-names. | ||
110 | - clock-names: Two optional clocks, "audio_clk_in" and "enet_clk_in" (see | ||
111 | "External clocks"). | ||
112 | - #clock-cells: Must be 1. The single cell is the clock identifier. | ||
113 | See dt-bindings/clock/pistachio-clk.h for the list of valid identifiers. | ||
114 | |||
115 | Example: | ||
116 | cr_top: syscon@18144800 { | ||
117 | compatible = "img,pistachio-cr-top", "syscon"; | ||
118 | reg = <0x18149000 0x200>; | ||
119 | clocks = <&audio_refclk>, <&ext_enet_in>; | ||
120 | clock-names = "audio_clk_in", "enet_clk_in"; | ||
121 | |||
122 | #clock-cells = <1>; | ||
123 | }; | ||
diff --git a/Documentation/devicetree/bindings/crypto/img-hash.txt b/Documentation/devicetree/bindings/crypto/img-hash.txt new file mode 100644 index 000000000000..91a3d757d641 --- /dev/null +++ b/Documentation/devicetree/bindings/crypto/img-hash.txt | |||
@@ -0,0 +1,27 @@ | |||
1 | Imagination Technologies hardware hash accelerator | ||
2 | |||
3 | The hash accelerator provides hardware hashing acceleration for | ||
4 | SHA1, SHA224, SHA256 and MD5 hashes | ||
5 | |||
6 | Required properties: | ||
7 | |||
8 | - compatible : "img,hash-accelerator" | ||
9 | - reg : Offset and length of the register set for the module, and the DMA port | ||
10 | - interrupts : The designated IRQ line for the hashing module. | ||
11 | - dmas : DMA specifier as per Documentation/devicetree/bindings/dma/dma.txt | ||
12 | - dma-names : Should be "tx" | ||
13 | - clocks : Clock specifiers | ||
14 | - clock-names : "sys" Used to clock the hash block registers | ||
15 | "hash" Used to clock data through the accelerator | ||
16 | |||
17 | Example: | ||
18 | |||
19 | hash: hash@18149600 { | ||
20 | compatible = "img,hash-accelerator"; | ||
21 | reg = <0x18149600 0x100>, <0x18101100 0x4>; | ||
22 | interrupts = <GIC_SHARED 59 IRQ_TYPE_LEVEL_HIGH>; | ||
23 | dmas = <&dma 8 0xffffffff 0>; | ||
24 | dma-names = "tx"; | ||
25 | clocks = <&cr_periph SYS_CLK_HASH>, <&clk_periph PERIPH_CLK_ROM>; | ||
26 | clock-names = "sys", "hash"; | ||
27 | }; | ||
diff --git a/Documentation/devicetree/bindings/dma/bcm2835-dma.txt b/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt index 1396078d15ac..1396078d15ac 100644 --- a/Documentation/devicetree/bindings/dma/bcm2835-dma.txt +++ b/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt | |||
diff --git a/Documentation/devicetree/bindings/drm/imx/ldb.txt b/Documentation/devicetree/bindings/drm/imx/ldb.txt index 443bcb6134d5..9a21366436f6 100644 --- a/Documentation/devicetree/bindings/drm/imx/ldb.txt +++ b/Documentation/devicetree/bindings/drm/imx/ldb.txt | |||
@@ -44,23 +44,30 @@ Optional properties: | |||
44 | LVDS Channel | 44 | LVDS Channel |
45 | ============ | 45 | ============ |
46 | 46 | ||
47 | Each LVDS Channel has to contain a display-timings node that describes the | 47 | Each LVDS Channel has to contain either an of graph link to a panel device node |
48 | video timings for the connected LVDS display. For detailed information, also | 48 | or a display-timings node that describes the video timings for the connected |
49 | have a look at Documentation/devicetree/bindings/video/display-timing.txt. | 49 | LVDS display as well as the fsl,data-mapping and fsl,data-width properties. |
50 | 50 | ||
51 | Required properties: | 51 | Required properties: |
52 | - reg : should be <0> or <1> | 52 | - reg : should be <0> or <1> |
53 | - port: Input and output port nodes with endpoint definitions as defined in | ||
54 | Documentation/devicetree/bindings/graph.txt. | ||
55 | On i.MX5, the internal two-input-multiplexer is used. Due to hardware | ||
56 | limitations, only one input port (port@[0,1]) can be used for each channel | ||
57 | (lvds-channel@[0,1], respectively). | ||
58 | On i.MX6, there should be four input ports (port@[0-3]) that correspond | ||
59 | to the four LVDS multiplexer inputs. | ||
60 | A single output port (port@2 on i.MX5, port@4 on i.MX6) must be connected | ||
61 | to a panel input port. Optionally, the output port can be left out if | ||
62 | display-timings are used instead. | ||
63 | |||
64 | Optional properties (required if display-timings are used): | ||
65 | - display-timings : A node that describes the display timings as defined in | ||
66 | Documentation/devicetree/bindings/video/display-timing.txt. | ||
53 | - fsl,data-mapping : should be "spwg" or "jeida" | 67 | - fsl,data-mapping : should be "spwg" or "jeida" |
54 | This describes how the color bits are laid out in the | 68 | This describes how the color bits are laid out in the |
55 | serialized LVDS signal. | 69 | serialized LVDS signal. |
56 | - fsl,data-width : should be <18> or <24> | 70 | - fsl,data-width : should be <18> or <24> |
57 | - port: A port node with endpoint definitions as defined in | ||
58 | Documentation/devicetree/bindings/media/video-interfaces.txt. | ||
59 | On i.MX5, the internal two-input-multiplexer is used. | ||
60 | Due to hardware limitations, only one port (port@[0,1]) | ||
61 | can be used for each channel (lvds-channel@[0,1], respectively) | ||
62 | On i.MX6, there should be four ports (port@[0-3]) that correspond | ||
63 | to the four LVDS multiplexer inputs. | ||
64 | 71 | ||
65 | example: | 72 | example: |
66 | 73 | ||
@@ -73,23 +80,21 @@ ldb: ldb@53fa8008 { | |||
73 | #size-cells = <0>; | 80 | #size-cells = <0>; |
74 | compatible = "fsl,imx53-ldb"; | 81 | compatible = "fsl,imx53-ldb"; |
75 | gpr = <&gpr>; | 82 | gpr = <&gpr>; |
76 | clocks = <&clks 122>, <&clks 120>, | 83 | clocks = <&clks IMX5_CLK_LDB_DI0_SEL>, |
77 | <&clks 115>, <&clks 116>, | 84 | <&clks IMX5_CLK_LDB_DI1_SEL>, |
78 | <&clks 123>, <&clks 85>; | 85 | <&clks IMX5_CLK_IPU_DI0_SEL>, |
86 | <&clks IMX5_CLK_IPU_DI1_SEL>, | ||
87 | <&clks IMX5_CLK_LDB_DI0_GATE>, | ||
88 | <&clks IMX5_CLK_LDB_DI1_GATE>; | ||
79 | clock-names = "di0_pll", "di1_pll", | 89 | clock-names = "di0_pll", "di1_pll", |
80 | "di0_sel", "di1_sel", | 90 | "di0_sel", "di1_sel", |
81 | "di0", "di1"; | 91 | "di0", "di1"; |
82 | 92 | ||
93 | /* Using an of-graph endpoint link to connect the panel */ | ||
83 | lvds-channel@0 { | 94 | lvds-channel@0 { |
84 | #address-cells = <1>; | 95 | #address-cells = <1>; |
85 | #size-cells = <0>; | 96 | #size-cells = <0>; |
86 | reg = <0>; | 97 | reg = <0>; |
87 | fsl,data-mapping = "spwg"; | ||
88 | fsl,data-width = <24>; | ||
89 | |||
90 | display-timings { | ||
91 | /* ... */ | ||
92 | }; | ||
93 | 98 | ||
94 | port@0 { | 99 | port@0 { |
95 | reg = <0>; | 100 | reg = <0>; |
@@ -98,8 +103,17 @@ ldb: ldb@53fa8008 { | |||
98 | remote-endpoint = <&ipu_di0_lvds0>; | 103 | remote-endpoint = <&ipu_di0_lvds0>; |
99 | }; | 104 | }; |
100 | }; | 105 | }; |
106 | |||
107 | port@2 { | ||
108 | reg = <2>; | ||
109 | |||
110 | lvds0_out: endpoint { | ||
111 | remote-endpoint = <&panel_in>; | ||
112 | }; | ||
113 | }; | ||
101 | }; | 114 | }; |
102 | 115 | ||
116 | /* Using display-timings and fsl,data-mapping/width instead */ | ||
103 | lvds-channel@1 { | 117 | lvds-channel@1 { |
104 | #address-cells = <1>; | 118 | #address-cells = <1>; |
105 | #size-cells = <0>; | 119 | #size-cells = <0>; |
@@ -120,3 +134,13 @@ ldb: ldb@53fa8008 { | |||
120 | }; | 134 | }; |
121 | }; | 135 | }; |
122 | }; | 136 | }; |
137 | |||
138 | panel: lvds-panel { | ||
139 | /* ... */ | ||
140 | |||
141 | port { | ||
142 | panel_in: endpoint { | ||
143 | remote-endpoint = <&lvds0_out>; | ||
144 | }; | ||
145 | }; | ||
146 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-bcm-kona.txt b/Documentation/devicetree/bindings/gpio/brcm,kona-gpio.txt index 4a63bc96b687..4a63bc96b687 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-bcm-kona.txt +++ b/Documentation/devicetree/bindings/gpio/brcm,kona-gpio.txt | |||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-altera.txt b/Documentation/devicetree/bindings/gpio/gpio-altera.txt new file mode 100644 index 000000000000..12f50149e1ed --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-altera.txt | |||
@@ -0,0 +1,43 @@ | |||
1 | Altera GPIO controller bindings | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: | ||
5 | - "altr,pio-1.0" | ||
6 | - reg: Physical base address and length of the controller's registers. | ||
7 | - #gpio-cells : Should be 2 | ||
8 | - The first cell is the gpio offset number. | ||
9 | - The second cell is reserved and is currently unused. | ||
10 | - gpio-controller : Marks the device node as a GPIO controller. | ||
11 | - interrupt-controller: Mark the device node as an interrupt controller | ||
12 | - #interrupt-cells : Should be 1. The interrupt type is fixed in the hardware. | ||
13 | - The first cell is the GPIO offset number within the GPIO controller. | ||
14 | - interrupts: Specify the interrupt. | ||
15 | - altr,interrupt-trigger: Specifies the interrupt trigger type the GPIO | ||
16 | hardware is synthesized. This field is required if the Altera GPIO controller | ||
17 | used has IRQ enabled as the interrupt type is not software controlled, | ||
18 | but hardware synthesized. Required if GPIO is used as an interrupt | ||
19 | controller. The value is defined in <dt-bindings/interrupt-controller/irq.h> | ||
20 | Only the following flags are supported: | ||
21 | IRQ_TYPE_EDGE_RISING | ||
22 | IRQ_TYPE_EDGE_FALLING | ||
23 | IRQ_TYPE_EDGE_BOTH | ||
24 | IRQ_TYPE_LEVEL_HIGH | ||
25 | |||
26 | Optional properties: | ||
27 | - altr,ngpio: Width of the GPIO bank. This defines how many pins the | ||
28 | GPIO device has. Ranges between 1-32. Optional and defaults to 32 if not | ||
29 | specified. | ||
30 | |||
31 | Example: | ||
32 | |||
33 | gpio_altr: gpio@0xff200000 { | ||
34 | compatible = "altr,pio-1.0"; | ||
35 | reg = <0xff200000 0x10>; | ||
36 | interrupts = <0 45 4>; | ||
37 | altr,ngpio = <32>; | ||
38 | altr,interrupt-trigger = <IRQ_TYPE_EDGE_RISING>; | ||
39 | #gpio-cells = <2>; | ||
40 | gpio-controller; | ||
41 | #interrupt-cells = <1>; | ||
42 | interrupt-controller; | ||
43 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-fan.txt b/Documentation/devicetree/bindings/gpio/gpio-fan.txt index 2dd457a3469a..439a7430fc68 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-fan.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-fan.txt | |||
@@ -2,15 +2,20 @@ Bindings for fan connected to GPIO lines | |||
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "gpio-fan" | 4 | - compatible : "gpio-fan" |
5 | |||
6 | Optional properties: | ||
5 | - gpios: Specifies the pins that map to bits in the control value, | 7 | - gpios: Specifies the pins that map to bits in the control value, |
6 | ordered MSB-->LSB. | 8 | ordered MSB-->LSB. |
7 | - gpio-fan,speed-map: A mapping of possible fan RPM speeds and the | 9 | - gpio-fan,speed-map: A mapping of possible fan RPM speeds and the |
8 | control value that should be set to achieve them. This array | 10 | control value that should be set to achieve them. This array |
9 | must have the RPM values in ascending order. | 11 | must have the RPM values in ascending order. |
10 | |||
11 | Optional properties: | ||
12 | - alarm-gpios: This pin going active indicates something is wrong with | 12 | - alarm-gpios: This pin going active indicates something is wrong with |
13 | the fan, and a udev event will be fired. | 13 | the fan, and a udev event will be fired. |
14 | - cooling-cells: If used as a cooling device, must be <2> | ||
15 | Also see: Documentation/devicetree/bindings/thermal/thermal.txt | ||
16 | min and max states are derived from the speed-map of the fan. | ||
17 | |||
18 | Note: At least one the "gpios" or "alarm-gpios" properties must be set. | ||
14 | 19 | ||
15 | Examples: | 20 | Examples: |
16 | 21 | ||
@@ -23,3 +28,13 @@ Examples: | |||
23 | 6000 2>; | 28 | 6000 2>; |
24 | alarm-gpios = <&gpio1 15 1>; | 29 | alarm-gpios = <&gpio1 15 1>; |
25 | }; | 30 | }; |
31 | gpio_fan_cool: gpio_fan { | ||
32 | compatible = "gpio-fan"; | ||
33 | gpios = <&gpio2 14 1 | ||
34 | &gpio2 13 1>; | ||
35 | gpio-fan,speed-map = <0 0>, | ||
36 | <3000 1>, | ||
37 | <6000 2>; | ||
38 | alarm-gpios = <&gpio2 15 1>; | ||
39 | #cooling-cells = <2>; /* min followed by max */ | ||
40 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt b/Documentation/devicetree/bindings/gpio/gpio.txt index f7a158d85862..5788d5cf1252 100644 --- a/Documentation/devicetree/bindings/gpio/gpio.txt +++ b/Documentation/devicetree/bindings/gpio/gpio.txt | |||
@@ -116,6 +116,29 @@ Every GPIO controller node must contain both an empty "gpio-controller" | |||
116 | property, and a #gpio-cells integer property, which indicates the number of | 116 | property, and a #gpio-cells integer property, which indicates the number of |
117 | cells in a gpio-specifier. | 117 | cells in a gpio-specifier. |
118 | 118 | ||
119 | The GPIO chip may contain GPIO hog definitions. GPIO hogging is a mechanism | ||
120 | providing automatic GPIO request and configuration as part of the | ||
121 | gpio-controller's driver probe function. | ||
122 | |||
123 | Each GPIO hog definition is represented as a child node of the GPIO controller. | ||
124 | Required properties: | ||
125 | - gpio-hog: A property specifying that this child node represent a GPIO hog. | ||
126 | - gpios: Store the GPIO information (id, flags, ...). Shall contain the | ||
127 | number of cells specified in its parent node (GPIO controller | ||
128 | node). | ||
129 | Only one of the following properties scanned in the order shown below. | ||
130 | This means that when multiple properties are present they will be searched | ||
131 | in the order presented below and the first match is taken as the intended | ||
132 | configuration. | ||
133 | - input: A property specifying to set the GPIO direction as input. | ||
134 | - output-low A property specifying to set the GPIO direction as output with | ||
135 | the value low. | ||
136 | - output-high A property specifying to set the GPIO direction as output with | ||
137 | the value high. | ||
138 | |||
139 | Optional properties: | ||
140 | - line-name: The GPIO label name. If not present the node name is used. | ||
141 | |||
119 | Example of two SOC GPIO banks defined as gpio-controller nodes: | 142 | Example of two SOC GPIO banks defined as gpio-controller nodes: |
120 | 143 | ||
121 | qe_pio_a: gpio-controller@1400 { | 144 | qe_pio_a: gpio-controller@1400 { |
@@ -123,6 +146,13 @@ Example of two SOC GPIO banks defined as gpio-controller nodes: | |||
123 | reg = <0x1400 0x18>; | 146 | reg = <0x1400 0x18>; |
124 | gpio-controller; | 147 | gpio-controller; |
125 | #gpio-cells = <2>; | 148 | #gpio-cells = <2>; |
149 | |||
150 | line_b { | ||
151 | gpio-hog; | ||
152 | gpios = <6 0>; | ||
153 | output-low; | ||
154 | line-name = "foo-bar-gpio"; | ||
155 | }; | ||
126 | }; | 156 | }; |
127 | 157 | ||
128 | qe_pio_e: gpio-controller@1460 { | 158 | qe_pio_e: gpio-controller@1460 { |
diff --git a/Documentation/devicetree/bindings/gpio/mrvl-gpio.txt b/Documentation/devicetree/bindings/gpio/mrvl-gpio.txt index 67a2e4e414a5..98d198396956 100644 --- a/Documentation/devicetree/bindings/gpio/mrvl-gpio.txt +++ b/Documentation/devicetree/bindings/gpio/mrvl-gpio.txt | |||
@@ -12,7 +12,7 @@ Required properties: | |||
12 | gpio_mux. | 12 | gpio_mux. |
13 | - interrupt-names : Should be the names of irq resources. Each interrupt | 13 | - interrupt-names : Should be the names of irq resources. Each interrupt |
14 | uses its own interrupt name, so there should be as many interrupt names | 14 | uses its own interrupt name, so there should be as many interrupt names |
15 | as referenced interrups. | 15 | as referenced interrupts. |
16 | - interrupt-controller : Identifies the node as an interrupt controller. | 16 | - interrupt-controller : Identifies the node as an interrupt controller. |
17 | - #interrupt-cells: Specifies the number of cells needed to encode an | 17 | - #interrupt-cells: Specifies the number of cells needed to encode an |
18 | interrupt source. | 18 | interrupt source. |
diff --git a/Documentation/devicetree/bindings/hwrng/brcm,iproc-rng200.txt b/Documentation/devicetree/bindings/hwrng/brcm,iproc-rng200.txt new file mode 100644 index 000000000000..e25a456664b9 --- /dev/null +++ b/Documentation/devicetree/bindings/hwrng/brcm,iproc-rng200.txt | |||
@@ -0,0 +1,12 @@ | |||
1 | HWRNG support for the iproc-rng200 driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "brcm,iproc-rng200" | ||
5 | - reg : base address and size of control register block | ||
6 | |||
7 | Example: | ||
8 | |||
9 | rng { | ||
10 | compatible = "brcm,iproc-rng200"; | ||
11 | reg = <0x18032000 0x28>; | ||
12 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-bcm-kona.txt b/Documentation/devicetree/bindings/i2c/brcm,kona-i2c.txt index 1b87b741fa8e..1b87b741fa8e 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-bcm-kona.txt +++ b/Documentation/devicetree/bindings/i2c/brcm,kona-i2c.txt | |||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-davinci.txt b/Documentation/devicetree/bindings/i2c/i2c-davinci.txt index 2dc935b4113d..a4e1cbc810c1 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-davinci.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-davinci.txt | |||
@@ -10,6 +10,9 @@ Required properties: | |||
10 | Recommended properties : | 10 | Recommended properties : |
11 | - interrupts : standard interrupt property. | 11 | - interrupts : standard interrupt property. |
12 | - clock-frequency : desired I2C bus clock frequency in Hz. | 12 | - clock-frequency : desired I2C bus clock frequency in Hz. |
13 | - ti,has-pfunc: boolean; if defined, it indicates that SoC supports PFUNC | ||
14 | registers. PFUNC registers allow to switch I2C pins to function as | ||
15 | GPIOs, so they can by toggled manually. | ||
13 | 16 | ||
14 | Example (enbw_cmc board): | 17 | Example (enbw_cmc board): |
15 | i2c@1c22000 { | 18 | i2c@1c22000 { |
diff --git a/Documentation/devicetree/bindings/i2c/i2c-digicolor.txt b/Documentation/devicetree/bindings/i2c/i2c-digicolor.txt new file mode 100644 index 000000000000..457a098d4f7e --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-digicolor.txt | |||
@@ -0,0 +1,25 @@ | |||
1 | Conexant Digicolor I2C controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: must be "cnxt,cx92755-i2c" | ||
5 | - reg: physical address and length of the device registers | ||
6 | - interrupts: a single interrupt specifier | ||
7 | - clocks: clock for the device | ||
8 | - #address-cells: should be <1> | ||
9 | - #size-cells: should be <0> | ||
10 | |||
11 | Optional properties: | ||
12 | - clock-frequency: the desired I2C bus clock frequency in Hz; in | ||
13 | absence of this property the default value is used (100 kHz). | ||
14 | |||
15 | Example: | ||
16 | |||
17 | i2c: i2c@f0000120 { | ||
18 | compatible = "cnxt,cx92755-i2c"; | ||
19 | reg = <0xf0000120 0x10>; | ||
20 | interrupts = <28>; | ||
21 | clocks = <&main_clk>; | ||
22 | clock-frequency = <100000>; | ||
23 | #address-cells = <1>; | ||
24 | #size-cells = <0>; | ||
25 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-imx.txt b/Documentation/devicetree/bindings/i2c/i2c-imx.txt index 52d37fd8d3e5..ce4311d726ae 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-imx.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-imx.txt | |||
@@ -7,6 +7,7 @@ Required properties: | |||
7 | - "fsl,vf610-i2c" for I2C compatible with the one integrated on Vybrid vf610 SoC | 7 | - "fsl,vf610-i2c" for I2C compatible with the one integrated on Vybrid vf610 SoC |
8 | - reg : Should contain I2C/HS-I2C registers location and length | 8 | - reg : Should contain I2C/HS-I2C registers location and length |
9 | - interrupts : Should contain I2C/HS-I2C interrupt | 9 | - interrupts : Should contain I2C/HS-I2C interrupt |
10 | - clocks : Should contain the I2C/HS-I2C clock specifier | ||
10 | 11 | ||
11 | Optional properties: | 12 | Optional properties: |
12 | - clock-frequency : Constains desired I2C/HS-I2C bus clock frequency in Hz. | 13 | - clock-frequency : Constains desired I2C/HS-I2C bus clock frequency in Hz. |
diff --git a/Documentation/devicetree/bindings/i2c/i2c-jz4780.txt b/Documentation/devicetree/bindings/i2c/i2c-jz4780.txt new file mode 100644 index 000000000000..231e4cc4008c --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-jz4780.txt | |||
@@ -0,0 +1,35 @@ | |||
1 | * Ingenic JZ4780 I2C Bus controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "ingenic,jz4780-i2c" | ||
5 | - reg: Should contain the address & size of the I2C controller registers. | ||
6 | - interrupts: Should specify the interrupt provided by parent. | ||
7 | - clocks: Should contain a single clock specifier for the JZ4780 I2C clock. | ||
8 | - clock-frequency: desired I2C bus clock frequency in Hz. | ||
9 | |||
10 | Recommended properties: | ||
11 | - pinctrl-names: should be "default"; | ||
12 | - pinctrl-0: phandle to pinctrl function | ||
13 | |||
14 | Optional properties: | ||
15 | - interrupt-parent: Should be the phandle of the interrupt controller that | ||
16 | delivers interrupts to the I2C block. | ||
17 | |||
18 | Example | ||
19 | |||
20 | / { | ||
21 | i2c4: i2c4@0x10054000 { | ||
22 | compatible = "ingenic,jz4780-i2c"; | ||
23 | reg = <0x10054000 0x1000>; | ||
24 | |||
25 | interrupt-parent = <&intc>; | ||
26 | interrupts = <56>; | ||
27 | |||
28 | clocks = <&cgu JZ4780_CLK_SMB4>; | ||
29 | clock-frequency = <100000>; | ||
30 | pinctrl-names = "default"; | ||
31 | pinctrl-0 = <&pins_i2c4_data>; | ||
32 | |||
33 | }; | ||
34 | }; | ||
35 | |||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-xlp9xx.txt b/Documentation/devicetree/bindings/i2c/i2c-xlp9xx.txt new file mode 100644 index 000000000000..f818ef507ab7 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-xlp9xx.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | Device tree configuration for the I2C controller on the XLP9xx/5xx SoC | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : should be "netlogic,xlp980-i2c" | ||
5 | - reg : bus address start and address range size of device | ||
6 | - interrupts : interrupt number | ||
7 | |||
8 | Optional properties: | ||
9 | - clock-frequency : frequency of bus clock in Hz | ||
10 | Defaults to 100 KHz when the property is not specified | ||
11 | |||
12 | Example: | ||
13 | |||
14 | i2c0: i2c@113100 { | ||
15 | compatible = "netlogic,xlp980-i2c"; | ||
16 | #address-cells = <1>; | ||
17 | #size-cells = <0>; | ||
18 | reg = <0 0x113100 0x100>; | ||
19 | clock-frequency = <400000>; | ||
20 | interrupts = <30>; | ||
21 | interrupt-parent = <&pic>; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt b/Documentation/devicetree/bindings/i2c/trivial-devices.txt index aaa8325004d2..003bd77b4595 100644 --- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt +++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt | |||
@@ -89,6 +89,7 @@ ricoh,rv5c386 I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC | |||
89 | ricoh,rv5c387a I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC | 89 | ricoh,rv5c387a I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC |
90 | samsung,24ad0xd1 S524AD0XF1 (128K/256K-bit Serial EEPROM for Low Power) | 90 | samsung,24ad0xd1 S524AD0XF1 (128K/256K-bit Serial EEPROM for Low Power) |
91 | sii,s35390a 2-wire CMOS real-time clock | 91 | sii,s35390a 2-wire CMOS real-time clock |
92 | skyworks,sky81452 Skyworks SKY81452: Six-Channel White LED Driver with Touch Panel Bias Supply | ||
92 | st-micro,24c256 i2c serial eeprom (24cxx) | 93 | st-micro,24c256 i2c serial eeprom (24cxx) |
93 | stm,m41t00 Serial Access TIMEKEEPER | 94 | stm,m41t00 Serial Access TIMEKEEPER |
94 | stm,m41t62 Serial real-time clock (RTC) with alarm | 95 | stm,m41t62 Serial real-time clock (RTC) with alarm |
diff --git a/Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt b/Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt new file mode 100644 index 000000000000..c07228da92ac --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | Dialog Semiconductor DA9150 IIO GPADC bindings | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "dlg,da9150-gpadc" for DA9150 IIO GPADC | ||
5 | - #io-channel-cells: Should be set to <1> | ||
6 | (See Documentation/devicetree/bindings/iio/iio-bindings.txt for further info) | ||
7 | |||
8 | For further information on GPADC channels, see device datasheet. | ||
9 | |||
10 | |||
11 | Example: | ||
12 | |||
13 | gpadc: da9150-gpadc { | ||
14 | compatible = "dlg,da9150-gpadc"; | ||
15 | #io-channel-cells = <1>; | ||
16 | }; | ||
diff --git a/Documentation/devicetree/bindings/iio/adc/mcp320x.txt b/Documentation/devicetree/bindings/iio/adc/mcp320x.txt new file mode 100644 index 000000000000..b85184391b78 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/mcp320x.txt | |||
@@ -0,0 +1,30 @@ | |||
1 | * Microchip Analog to Digital Converter (ADC) | ||
2 | |||
3 | The node for this driver must be a child node of a SPI controller, hence | ||
4 | all mandatory properties described in | ||
5 | |||
6 | Documentation/devicetree/bindings/spi/spi-bus.txt | ||
7 | |||
8 | must be specified. | ||
9 | |||
10 | Required properties: | ||
11 | - compatible: Must be one of the following, depending on the | ||
12 | model: | ||
13 | "mcp3001" | ||
14 | "mcp3002" | ||
15 | "mcp3004" | ||
16 | "mcp3008" | ||
17 | "mcp3201" | ||
18 | "mcp3202" | ||
19 | "mcp3204" | ||
20 | "mcp3208" | ||
21 | |||
22 | |||
23 | Examples: | ||
24 | spi_controller { | ||
25 | mcp3x0x@0 { | ||
26 | compatible = "mcp3002"; | ||
27 | reg = <0>; | ||
28 | spi-max-frequency = <1000000>; | ||
29 | }; | ||
30 | }; | ||
diff --git a/Documentation/devicetree/bindings/iio/adc/mcp3422.txt b/Documentation/devicetree/bindings/iio/adc/mcp3422.txt new file mode 100644 index 000000000000..333139cc0bfb --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/mcp3422.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | * Microchip mcp3422/3/4/6/7/8 chip family (ADC) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be | ||
5 | "microchip,mcp3422" or | ||
6 | "microchip,mcp3423" or | ||
7 | "microchip,mcp3424" or | ||
8 | "microchip,mcp3426" or | ||
9 | "microchip,mcp3427" or | ||
10 | "microchip,mcp3428" | ||
11 | - reg: I2C address for the device | ||
12 | |||
13 | Example: | ||
14 | adc@0 { | ||
15 | compatible = "microchip,mcp3424"; | ||
16 | reg = <0x68>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt b/Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt new file mode 100644 index 000000000000..42ca7deec97d --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt | |||
@@ -0,0 +1,18 @@ | |||
1 | * Texas Instruments' ADC128S052 ADC chip | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "ti,adc128s052" | ||
5 | - reg: spi chip select number for the device | ||
6 | - vref-supply: The regulator supply for ADC reference voltage | ||
7 | |||
8 | Recommended properties: | ||
9 | - spi-max-frequency: Definition as per | ||
10 | Documentation/devicetree/bindings/spi/spi-bus.txt | ||
11 | |||
12 | Example: | ||
13 | adc@0 { | ||
14 | compatible = "ti,adc128s052"; | ||
15 | reg = <0>; | ||
16 | vref-supply = <&vdd_supply>; | ||
17 | spi-max-frequency = <1000000>; | ||
18 | }; | ||
diff --git a/Documentation/devicetree/bindings/iio/st-sensors.txt b/Documentation/devicetree/bindings/iio/st-sensors.txt index a7a0a15913ad..d2aaca974531 100644 --- a/Documentation/devicetree/bindings/iio/st-sensors.txt +++ b/Documentation/devicetree/bindings/iio/st-sensors.txt | |||
@@ -23,6 +23,7 @@ standard bindings from pinctrl/pinctrl-bindings.txt. | |||
23 | Valid compatible strings: | 23 | Valid compatible strings: |
24 | 24 | ||
25 | Accelerometers: | 25 | Accelerometers: |
26 | - st,lis3lv02dl-accel | ||
26 | - st,lsm303dlh-accel | 27 | - st,lsm303dlh-accel |
27 | - st,lsm303dlhc-accel | 28 | - st,lsm303dlhc-accel |
28 | - st,lis3dh-accel | 29 | - st,lis3dh-accel |
diff --git a/Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt b/Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt new file mode 100644 index 000000000000..b77f50bd6403 --- /dev/null +++ b/Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt | |||
@@ -0,0 +1,108 @@ | |||
1 | * Broadcom Keypad Controller device tree bindings | ||
2 | |||
3 | Broadcom Keypad controller is used to interface a SoC with a matrix-type | ||
4 | keypad device. The keypad controller supports multiple row and column lines. | ||
5 | A key can be placed at each intersection of a unique row and a unique column. | ||
6 | The keypad controller can sense a key-press and key-release and report the | ||
7 | event using a interrupt to the cpu. | ||
8 | |||
9 | This binding is based on the matrix-keymap binding with the following | ||
10 | changes: | ||
11 | |||
12 | keypad,num-rows and keypad,num-columns are required. | ||
13 | |||
14 | Required SoC Specific Properties: | ||
15 | - compatible: should be "brcm,bcm-keypad" | ||
16 | |||
17 | - reg: physical base address of the controller and length of memory mapped | ||
18 | region. | ||
19 | |||
20 | - interrupts: The interrupt number to the cpu. | ||
21 | |||
22 | Board Specific Properties: | ||
23 | - keypad,num-rows: Number of row lines connected to the keypad | ||
24 | controller. | ||
25 | |||
26 | - keypad,num-columns: Number of column lines connected to the | ||
27 | keypad controller. | ||
28 | |||
29 | - col-debounce-filter-period: The debounce period for the Column filter. | ||
30 | |||
31 | KEYPAD_DEBOUNCE_1_ms = 0 | ||
32 | KEYPAD_DEBOUNCE_2_ms = 1 | ||
33 | KEYPAD_DEBOUNCE_4_ms = 2 | ||
34 | KEYPAD_DEBOUNCE_8_ms = 3 | ||
35 | KEYPAD_DEBOUNCE_16_ms = 4 | ||
36 | KEYPAD_DEBOUNCE_32_ms = 5 | ||
37 | KEYPAD_DEBOUNCE_64_ms = 6 | ||
38 | KEYPAD_DEBOUNCE_128_ms = 7 | ||
39 | |||
40 | - status-debounce-filter-period: The debounce period for the Status filter. | ||
41 | |||
42 | KEYPAD_DEBOUNCE_1_ms = 0 | ||
43 | KEYPAD_DEBOUNCE_2_ms = 1 | ||
44 | KEYPAD_DEBOUNCE_4_ms = 2 | ||
45 | KEYPAD_DEBOUNCE_8_ms = 3 | ||
46 | KEYPAD_DEBOUNCE_16_ms = 4 | ||
47 | KEYPAD_DEBOUNCE_32_ms = 5 | ||
48 | KEYPAD_DEBOUNCE_64_ms = 6 | ||
49 | KEYPAD_DEBOUNCE_128_ms = 7 | ||
50 | |||
51 | - row-output-enabled: An optional property indicating whether the row or | ||
52 | column is being used as output. If specified the row is being used | ||
53 | as the output. Else defaults to column. | ||
54 | |||
55 | - pull-up-enabled: An optional property indicating the Keypad scan mode. | ||
56 | If specified implies the keypad scan pull-up has been enabled. | ||
57 | |||
58 | - autorepeat: Boolean, Enable auto repeat feature of Linux input | ||
59 | subsystem (optional). | ||
60 | |||
61 | - linux,keymap: The keymap for keys as described in the binding document | ||
62 | devicetree/bindings/input/matrix-keymap.txt. | ||
63 | |||
64 | Example: | ||
65 | #include "dt-bindings/input/input.h" | ||
66 | |||
67 | / { | ||
68 | keypad: keypad@180ac000 { | ||
69 | /* Required SoC specific properties */ | ||
70 | compatible = "brcm,bcm-keypad"; | ||
71 | |||
72 | /* Required Board specific properties */ | ||
73 | keypad,num-rows = <5>; | ||
74 | keypad,num-columns = <5>; | ||
75 | status = "okay"; | ||
76 | |||
77 | linux,keymap = <MATRIX_KEY(0x00, 0x02, KEY_F) /* key_forward */ | ||
78 | MATRIX_KEY(0x00, 0x03, KEY_HOME) /* key_home */ | ||
79 | MATRIX_KEY(0x00, 0x04, KEY_M) /* key_message */ | ||
80 | MATRIX_KEY(0x01, 0x00, KEY_A) /* key_contacts */ | ||
81 | MATRIX_KEY(0x01, 0x01, KEY_1) /* key_1 */ | ||
82 | MATRIX_KEY(0x01, 0x02, KEY_2) /* key_2 */ | ||
83 | MATRIX_KEY(0x01, 0x03, KEY_3) /* key_3 */ | ||
84 | MATRIX_KEY(0x01, 0x04, KEY_S) /* key_speaker */ | ||
85 | MATRIX_KEY(0x02, 0x00, KEY_P) /* key_phone */ | ||
86 | MATRIX_KEY(0x02, 0x01, KEY_4) /* key_4 */ | ||
87 | MATRIX_KEY(0x02, 0x02, KEY_5) /* key_5 */ | ||
88 | MATRIX_KEY(0x02, 0x03, KEY_6) /* key_6 */ | ||
89 | MATRIX_KEY(0x02, 0x04, KEY_VOLUMEUP) /* key_vol_up */ | ||
90 | MATRIX_KEY(0x03, 0x00, KEY_C) /* key_call_log */ | ||
91 | MATRIX_KEY(0x03, 0x01, KEY_7) /* key_7 */ | ||
92 | MATRIX_KEY(0x03, 0x02, KEY_8) /* key_8 */ | ||
93 | MATRIX_KEY(0x03, 0x03, KEY_9) /* key_9 */ | ||
94 | MATRIX_KEY(0x03, 0x04, KEY_VOLUMEDOWN) /* key_vol_down */ | ||
95 | MATRIX_KEY(0x04, 0x00, KEY_H) /* key_headset */ | ||
96 | MATRIX_KEY(0x04, 0x01, KEY_KPASTERISK) /* key_* */ | ||
97 | MATRIX_KEY(0x04, 0x02, KEY_0) /* key_0 */ | ||
98 | MATRIX_KEY(0x04, 0x03, KEY_GRAVE) /* key_# */ | ||
99 | MATRIX_KEY(0x04, 0x04, KEY_MUTE) /* key_mute */ | ||
100 | >; | ||
101 | |||
102 | /* Optional board specific properties */ | ||
103 | col-debounce-filter-period = <5>; | ||
104 | row-output-enabled; | ||
105 | pull-up-enabled; | ||
106 | |||
107 | }; | ||
108 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt new file mode 100644 index 000000000000..07bf55f6e0b9 --- /dev/null +++ b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt | |||
@@ -0,0 +1,43 @@ | |||
1 | Qualcomm PM8941 PMIC Power Key | ||
2 | |||
3 | PROPERTIES | ||
4 | |||
5 | - compatible: | ||
6 | Usage: required | ||
7 | Value type: <string> | ||
8 | Definition: must be one of: | ||
9 | "qcom,pm8941-pwrkey" | ||
10 | |||
11 | - reg: | ||
12 | Usage: required | ||
13 | Value type: <prop-encoded-array> | ||
14 | Definition: base address of registers for block | ||
15 | |||
16 | - interrupts: | ||
17 | Usage: required | ||
18 | Value type: <prop-encoded-array> | ||
19 | Definition: key change interrupt; The format of the specifier is | ||
20 | defined by the binding document describing the node's | ||
21 | interrupt parent. | ||
22 | |||
23 | - debounce: | ||
24 | Usage: optional | ||
25 | Value type: <u32> | ||
26 | Definition: time in microseconds that key must be pressed or released | ||
27 | for state change interrupt to trigger. | ||
28 | |||
29 | - bias-pull-up: | ||
30 | Usage: optional | ||
31 | Value type: <empty> | ||
32 | Definition: presence of this property indicates that the KPDPWR_N pin | ||
33 | should be configured for pull up. | ||
34 | |||
35 | EXAMPLE | ||
36 | |||
37 | pwrkey@800 { | ||
38 | compatible = "qcom,pm8941-pwrkey"; | ||
39 | reg = <0x800>; | ||
40 | interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; | ||
41 | debounce = <15625>; | ||
42 | bias-pull-up; | ||
43 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/touchscreen/brcm,iproc-touchscreen.txt b/Documentation/devicetree/bindings/input/touchscreen/brcm,iproc-touchscreen.txt new file mode 100644 index 000000000000..34e3382a0659 --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/brcm,iproc-touchscreen.txt | |||
@@ -0,0 +1,76 @@ | |||
1 | * Broadcom's IPROC Touchscreen Controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: must be "brcm,iproc-touchscreen" | ||
5 | - reg: physical base address of the controller and length of memory mapped | ||
6 | region. | ||
7 | - clocks: The clock provided by the SOC to driver the tsc | ||
8 | - clock-name: name for the clock | ||
9 | - interrupts: The touchscreen controller's interrupt | ||
10 | |||
11 | Optional properties: | ||
12 | - scanning_period: Time between scans. Each step is 1024 us. Valid 1-256. | ||
13 | - debounce_timeout: Each step is 512 us. Valid 0-255 | ||
14 | - settling_timeout: The settling duration (in ms) is the amount of time | ||
15 | the tsc waits to allow the voltage to settle after | ||
16 | turning on the drivers in detection mode. | ||
17 | Valid values: 0-11 | ||
18 | 0 = 0.008 ms | ||
19 | 1 = 0.01 ms | ||
20 | 2 = 0.02 ms | ||
21 | 3 = 0.04 ms | ||
22 | 4 = 0.08 ms | ||
23 | 5 = 0.16 ms | ||
24 | 6 = 0.32 ms | ||
25 | 7 = 0.64 ms | ||
26 | 8 = 1.28 ms | ||
27 | 9 = 2.56 ms | ||
28 | 10 = 5.12 ms | ||
29 | 11 = 10.24 ms | ||
30 | - touch_timeout: The continuous number of scan periods in which touch is | ||
31 | not detected before the controller returns to idle state. | ||
32 | Valid values 0-255. | ||
33 | - average_data: Number of data samples which are averaged before a final | ||
34 | data point is placed into the FIFO | ||
35 | Valid values 0-7 | ||
36 | 0 = 1 sample | ||
37 | 1 = 2 samples | ||
38 | 2 = 4 samples | ||
39 | 3 = 8 samples | ||
40 | 4 = 16 samples | ||
41 | 5 = 32 samples | ||
42 | 6 = 64 samples | ||
43 | 7 = 128 samples | ||
44 | - fifo_threshold: Interrupt is generated whenever the number of fifo | ||
45 | entries exceeds this value | ||
46 | Valid values 0-31 | ||
47 | - touchscreen-size-x: horizontal resolution of touchscreen (in pixels) | ||
48 | - touchscreen-size-y: vertical resolution of touchscreen (in pixels) | ||
49 | - touchscreen-fuzz-x: horizontal noise value of the absolute input | ||
50 | device (in pixels) | ||
51 | - touchscreen-fuzz-y: vertical noise value of the absolute input | ||
52 | device (in pixels) | ||
53 | - touchscreen-inverted-x: X axis is inverted (boolean) | ||
54 | - touchscreen-inverted-y: Y axis is inverted (boolean) | ||
55 | |||
56 | Example: | ||
57 | |||
58 | touchscreen: tsc@0x180A6000 { | ||
59 | compatible = "brcm,iproc-touchscreen"; | ||
60 | #address-cells = <1>; | ||
61 | #size-cells = <1>; | ||
62 | reg = <0x180A6000 0x40>; | ||
63 | clocks = <&adc_clk>; | ||
64 | clock-names = "tsc_clk"; | ||
65 | interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>; | ||
66 | |||
67 | scanning_period = <5>; | ||
68 | debounce_timeout = <40>; | ||
69 | settling_timeout = <7>; | ||
70 | touch_timeout = <10>; | ||
71 | average_data = <5>; | ||
72 | fifo_threshold = <1>; | ||
73 | /* Touchscreen is rotated 180 degrees. */ | ||
74 | touchscreen-inverted-x; | ||
75 | touchscreen-inverted-y; | ||
76 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/touchscreen/chipone_icn8318.txt b/Documentation/devicetree/bindings/input/touchscreen/chipone_icn8318.txt new file mode 100644 index 000000000000..d11f8d615b5d --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/chipone_icn8318.txt | |||
@@ -0,0 +1,46 @@ | |||
1 | * ChipOne icn8318 I2C touchscreen controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "chipone,icn8318" | ||
5 | - reg : I2C slave address of the chip (0x40) | ||
6 | - interrupt-parent : a phandle pointing to the interrupt controller | ||
7 | serving the interrupt for this chip | ||
8 | - interrupts : interrupt specification for the icn8318 interrupt | ||
9 | - wake-gpios : GPIO specification for the WAKE input | ||
10 | - touchscreen-size-x : horizontal resolution of touchscreen (in pixels) | ||
11 | - touchscreen-size-y : vertical resolution of touchscreen (in pixels) | ||
12 | |||
13 | Optional properties: | ||
14 | - pinctrl-names : should be "default" | ||
15 | - pinctrl-0: : a phandle pointing to the pin settings for the | ||
16 | control gpios | ||
17 | - touchscreen-fuzz-x : horizontal noise value of the absolute input | ||
18 | device (in pixels) | ||
19 | - touchscreen-fuzz-y : vertical noise value of the absolute input | ||
20 | device (in pixels) | ||
21 | - touchscreen-inverted-x : X axis is inverted (boolean) | ||
22 | - touchscreen-inverted-y : Y axis is inverted (boolean) | ||
23 | - touchscreen-swapped-x-y : X and Y axis are swapped (boolean) | ||
24 | Swapping is done after inverting the axis | ||
25 | |||
26 | Example: | ||
27 | |||
28 | i2c@00000000 { | ||
29 | /* ... */ | ||
30 | |||
31 | chipone_icn8318@40 { | ||
32 | compatible = "chipone,icn8318"; | ||
33 | reg = <0x40>; | ||
34 | interrupt-parent = <&pio>; | ||
35 | interrupts = <9 IRQ_TYPE_EDGE_FALLING>; /* EINT9 (PG9) */ | ||
36 | pinctrl-names = "default"; | ||
37 | pinctrl-0 = <&ts_wake_pin_p66>; | ||
38 | wake-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */ | ||
39 | touchscreen-size-x = <800>; | ||
40 | touchscreen-size-y = <480>; | ||
41 | touchscreen-inverted-x; | ||
42 | touchscreen-swapped-x-y; | ||
43 | }; | ||
44 | |||
45 | /* ... */ | ||
46 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt new file mode 100644 index 000000000000..8ba98eec765b --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt | |||
@@ -0,0 +1,29 @@ | |||
1 | Device tree bindings for Goodix GT9xx series touchscreen controller | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible : Should be "goodix,gt911" | ||
6 | or "goodix,gt9110" | ||
7 | or "goodix,gt912" | ||
8 | or "goodix,gt927" | ||
9 | or "goodix,gt9271" | ||
10 | or "goodix,gt928" | ||
11 | or "goodix,gt967" | ||
12 | - reg : I2C address of the chip. Should be 0x5d or 0x14 | ||
13 | - interrupt-parent : Interrupt controller to which the chip is connected | ||
14 | - interrupts : Interrupt to which the chip is connected | ||
15 | |||
16 | Example: | ||
17 | |||
18 | i2c@00000000 { | ||
19 | /* ... */ | ||
20 | |||
21 | gt928@5d { | ||
22 | compatible = "goodix,gt928"; | ||
23 | reg = <0x5d>; | ||
24 | interrupt-parent = <&gpio>; | ||
25 | interrupts = <0 0>; | ||
26 | }; | ||
27 | |||
28 | /* ... */ | ||
29 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt b/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt index 433332d3b2ba..89abecd938cb 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt +++ b/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt | |||
@@ -2,14 +2,27 @@ sun4i resistive touchscreen controller | |||
2 | -------------------------------------- | 2 | -------------------------------------- |
3 | 3 | ||
4 | Required properties: | 4 | Required properties: |
5 | - compatible: "allwinner,sun4i-a10-ts" or "allwinner,sun6i-a31-ts" | 5 | - compatible: "allwinner,sun4i-a10-ts", "allwinner,sun5i-a13-ts" or |
6 | "allwinner,sun6i-a31-ts" | ||
6 | - reg: mmio address range of the chip | 7 | - reg: mmio address range of the chip |
7 | - interrupts: interrupt to which the chip is connected | 8 | - interrupts: interrupt to which the chip is connected |
8 | - #thermal-sensor-cells: shall be 0 | 9 | - #thermal-sensor-cells: shall be 0 |
9 | 10 | ||
10 | Optional properties: | 11 | Optional properties: |
11 | - allwinner,ts-attached: boolean indicating that an actual touchscreen is | 12 | - allwinner,ts-attached : boolean indicating that an actual touchscreen |
12 | attached to the controller | 13 | is attached to the controller |
14 | - allwinner,tp-sensitive-adjust : integer (4 bits) | ||
15 | adjust sensitivity of pen down detection | ||
16 | between 0 (least sensitive) and 15 | ||
17 | (defaults to 15) | ||
18 | - allwinner,filter-type : integer (2 bits) | ||
19 | select median and averaging filter | ||
20 | samples used for median / averaging filter | ||
21 | 0: 4/2 | ||
22 | 1: 5/3 | ||
23 | 2: 8/4 | ||
24 | 3: 16/8 | ||
25 | (defaults to 1) | ||
13 | 26 | ||
14 | Example: | 27 | Example: |
15 | 28 | ||
@@ -19,4 +32,7 @@ Example: | |||
19 | interrupts = <29>; | 32 | interrupts = <29>; |
20 | allwinner,ts-attached; | 33 | allwinner,ts-attached; |
21 | #thermal-sensor-cells = <0>; | 34 | #thermal-sensor-cells = <0>; |
35 | /* sensitive/noisy touch panel */ | ||
36 | allwinner,tp-sensitive-adjust = <0>; | ||
37 | allwinner,filter-type = <3>; | ||
22 | }; | 38 | }; |
diff --git a/Documentation/devicetree/bindings/input/touchscreen/sx8654.txt b/Documentation/devicetree/bindings/input/touchscreen/sx8654.txt new file mode 100644 index 000000000000..5aaa6b3aa90c --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/sx8654.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | * Semtech SX8654 I2C Touchscreen Controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: must be "semtech,sx8654" | ||
5 | - reg: i2c slave address | ||
6 | - interrupt-parent: the phandle for the interrupt controller | ||
7 | - interrupts: touch controller interrupt | ||
8 | |||
9 | Example: | ||
10 | |||
11 | sx8654@48 { | ||
12 | compatible = "semtech,sx8654"; | ||
13 | reg = <0x48>; | ||
14 | interrupt-parent = <&gpio6>; | ||
15 | interrupts = <3 IRQ_TYPE_EDGE_FALLING>; | ||
16 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt index d8e06163c54e..ac23caf518ad 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt +++ b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt | |||
@@ -16,6 +16,8 @@ Optional properties for Touchscreens: | |||
16 | controller) | 16 | controller) |
17 | - touchscreen-inverted-x : X axis is inverted (boolean) | 17 | - touchscreen-inverted-x : X axis is inverted (boolean) |
18 | - touchscreen-inverted-y : Y axis is inverted (boolean) | 18 | - touchscreen-inverted-y : Y axis is inverted (boolean) |
19 | - touchscreen-swapped-x-y : X and Y axis are swapped (boolean) | ||
20 | Swapping is done after inverting the axis | ||
19 | 21 | ||
20 | Deprecated properties for Touchscreens: | 22 | Deprecated properties for Touchscreens: |
21 | - x-size : deprecated name for touchscreen-size-x | 23 | - x-size : deprecated name for touchscreen-size-x |
diff --git a/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm3380-l2-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm3380-l2-intc.txt new file mode 100644 index 000000000000..8f48aad50868 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm3380-l2-intc.txt | |||
@@ -0,0 +1,41 @@ | |||
1 | Broadcom BCM3380-style Level 1 / Level 2 interrupt controller | ||
2 | |||
3 | This interrupt controller shows up in various forms on many BCM338x/BCM63xx | ||
4 | chipsets. It has the following properties: | ||
5 | |||
6 | - outputs a single interrupt signal to its interrupt controller parent | ||
7 | |||
8 | - contains one or more enable/status word pairs, which often appear at | ||
9 | different offsets in different blocks | ||
10 | |||
11 | - no atomic set/clear operations | ||
12 | |||
13 | Required properties: | ||
14 | |||
15 | - compatible: should be "brcm,bcm3380-l2-intc" | ||
16 | - reg: specifies one or more enable/status pairs, in the following format: | ||
17 | <enable_reg 0x4 status_reg 0x4>... | ||
18 | - interrupt-controller: identifies the node as an interrupt controller | ||
19 | - #interrupt-cells: specifies the number of cells needed to encode an interrupt | ||
20 | source, should be 1. | ||
21 | - interrupt-parent: specifies the phandle to the parent interrupt controller | ||
22 | this one is cascaded from | ||
23 | - interrupts: specifies the interrupt line in the interrupt-parent controller | ||
24 | node, valid values depend on the type of parent interrupt controller | ||
25 | |||
26 | Optional properties: | ||
27 | |||
28 | - brcm,irq-can-wake: if present, this means the L2 controller can be used as a | ||
29 | wakeup source for system suspend/resume. | ||
30 | |||
31 | Example: | ||
32 | |||
33 | irq0_intc: interrupt-controller@10000020 { | ||
34 | compatible = "brcm,bcm3380-l2-intc"; | ||
35 | reg = <0x10000024 0x4 0x1000002c 0x4>, | ||
36 | <0x10000020 0x4 0x10000028 0x4>; | ||
37 | interrupt-controller; | ||
38 | #interrupt-cells = <1>; | ||
39 | interrupt-parent = <&cpu_intc>; | ||
40 | interrupts = <2>; | ||
41 | }; | ||
diff --git a/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm7038-l1-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm7038-l1-intc.txt new file mode 100644 index 000000000000..cc217b22dccd --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm7038-l1-intc.txt | |||
@@ -0,0 +1,52 @@ | |||
1 | Broadcom BCM7038-style Level 1 interrupt controller | ||
2 | |||
3 | This block is a first level interrupt controller that is typically connected | ||
4 | directly to one of the HW INT lines on each CPU. Every BCM7xxx set-top chip | ||
5 | since BCM7038 has contained this hardware. | ||
6 | |||
7 | Key elements of the hardware design include: | ||
8 | |||
9 | - 64, 96, 128, or 160 incoming level IRQ lines | ||
10 | |||
11 | - Most onchip peripherals are wired directly to an L1 input | ||
12 | |||
13 | - A separate instance of the register set for each CPU, allowing individual | ||
14 | peripheral IRQs to be routed to any CPU | ||
15 | |||
16 | - Atomic mask/unmask operations | ||
17 | |||
18 | - No polarity/level/edge settings | ||
19 | |||
20 | - No FIFO or priority encoder logic; software is expected to read all | ||
21 | 2-5 status words to determine which IRQs are pending | ||
22 | |||
23 | Required properties: | ||
24 | |||
25 | - compatible: should be "brcm,bcm7038-l1-intc" | ||
26 | - reg: specifies the base physical address and size of the registers; | ||
27 | the number of supported IRQs is inferred from the size argument | ||
28 | - interrupt-controller: identifies the node as an interrupt controller | ||
29 | - #interrupt-cells: specifies the number of cells needed to encode an interrupt | ||
30 | source, should be 1. | ||
31 | - interrupt-parent: specifies the phandle to the parent interrupt controller(s) | ||
32 | this one is cascaded from | ||
33 | - interrupts: specifies the interrupt line(s) in the interrupt-parent controller | ||
34 | node; valid values depend on the type of parent interrupt controller | ||
35 | |||
36 | If multiple reg ranges and interrupt-parent entries are present on an SMP | ||
37 | system, the driver will allow IRQ SMP affinity to be set up through the | ||
38 | /proc/irq/ interface. In the simplest possible configuration, only one | ||
39 | reg range and one interrupt-parent is needed. | ||
40 | |||
41 | Example: | ||
42 | |||
43 | periph_intc: periph_intc@1041a400 { | ||
44 | compatible = "brcm,bcm7038-l1-intc"; | ||
45 | reg = <0x1041a400 0x30 0x1041a600 0x30>; | ||
46 | |||
47 | interrupt-controller; | ||
48 | #interrupt-cells = <1>; | ||
49 | |||
50 | interrupt-parent = <&cpu_intc>; | ||
51 | interrupts = <2>, <3>; | ||
52 | }; | ||
diff --git a/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm7120-l2-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm7120-l2-intc.txt index bae1f2187226..44a9bb15dd56 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm7120-l2-intc.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm7120-l2-intc.txt | |||
@@ -13,8 +13,7 @@ Such an interrupt controller has the following hardware design: | |||
13 | or if they will output an interrupt signal at this 2nd level interrupt | 13 | or if they will output an interrupt signal at this 2nd level interrupt |
14 | controller, in particular for UARTs | 14 | controller, in particular for UARTs |
15 | 15 | ||
16 | - typically has one 32-bit enable word and one 32-bit status word, but on | 16 | - has one 32-bit enable word and one 32-bit status word |
17 | some hardware may have more than one enable/status pair | ||
18 | 17 | ||
19 | - no atomic set/clear operations | 18 | - no atomic set/clear operations |
20 | 19 | ||
@@ -53,9 +52,7 @@ The typical hardware layout for this controller is represented below: | |||
53 | Required properties: | 52 | Required properties: |
54 | 53 | ||
55 | - compatible: should be "brcm,bcm7120-l2-intc" | 54 | - compatible: should be "brcm,bcm7120-l2-intc" |
56 | - reg: specifies the base physical address and size of the registers; | 55 | - reg: specifies the base physical address and size of the registers |
57 | multiple pairs may be specified, with the first pair handling IRQ offsets | ||
58 | 0..31 and the second pair handling 32..63 | ||
59 | - interrupt-controller: identifies the node as an interrupt controller | 56 | - interrupt-controller: identifies the node as an interrupt controller |
60 | - #interrupt-cells: specifies the number of cells needed to encode an interrupt | 57 | - #interrupt-cells: specifies the number of cells needed to encode an interrupt |
61 | source, should be 1. | 58 | source, should be 1. |
@@ -66,10 +63,7 @@ Required properties: | |||
66 | - brcm,int-map-mask: 32-bits bit mask describing how many and which interrupts | 63 | - brcm,int-map-mask: 32-bits bit mask describing how many and which interrupts |
67 | are wired to this 2nd level interrupt controller, and how they match their | 64 | are wired to this 2nd level interrupt controller, and how they match their |
68 | respective interrupt parents. Should match exactly the number of interrupts | 65 | respective interrupt parents. Should match exactly the number of interrupts |
69 | specified in the 'interrupts' property, multiplied by the number of | 66 | specified in the 'interrupts' property. |
70 | enable/status register pairs implemented by this controller. For | ||
71 | multiple parent IRQs with multiple enable/status words, this looks like: | ||
72 | <irq0_w0 irq0_w1 irq1_w0 irq1_w1 ...> | ||
73 | 67 | ||
74 | Optional properties: | 68 | Optional properties: |
75 | 69 | ||
diff --git a/Documentation/devicetree/bindings/interrupt-controller/cdns,xtensa-mx.txt b/Documentation/devicetree/bindings/interrupt-controller/cdns,xtensa-mx.txt new file mode 100644 index 000000000000..d4de980e55fa --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/cdns,xtensa-mx.txt | |||
@@ -0,0 +1,18 @@ | |||
1 | * Xtensa Interrupt Distributor and Programmable Interrupt Controller (MX) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "cdns,xtensa-mx". | ||
5 | |||
6 | Remaining properties have exact same meaning as in Xtensa PIC | ||
7 | (see cdns,xtensa-pic.txt). | ||
8 | |||
9 | Examples: | ||
10 | pic: pic { | ||
11 | compatible = "cdns,xtensa-mx"; | ||
12 | /* one cell: internal irq number, | ||
13 | * two cells: second cell == 0: internal irq number | ||
14 | * second cell == 1: external irq number | ||
15 | */ | ||
16 | #interrupt-cells = <2>; | ||
17 | interrupt-controller; | ||
18 | }; | ||
diff --git a/Documentation/devicetree/bindings/interrupt-controller/cdns,xtensa-pic.txt b/Documentation/devicetree/bindings/interrupt-controller/cdns,xtensa-pic.txt new file mode 100644 index 000000000000..026ef4cfc1d5 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/cdns,xtensa-pic.txt | |||
@@ -0,0 +1,25 @@ | |||
1 | * Xtensa built-in Programmable Interrupt Controller (PIC) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "cdns,xtensa-pic". | ||
5 | - interrupt-controller: Identifies the node as an interrupt controller. | ||
6 | - #interrupt-cells: The number of cells to define the interrupts. | ||
7 | It may be either 1 or 2. | ||
8 | When it's 1, the first cell is the internal IRQ number. | ||
9 | When it's 2, the first cell is the IRQ number, and the second cell | ||
10 | specifies whether it's internal (0) or external (1). | ||
11 | Periferals are usually connected to a fixed external IRQ, but for different | ||
12 | core variants it may be mapped to different internal IRQ. | ||
13 | IRQ sensitivity and priority are fixed for each core variant and may not be | ||
14 | changed at runtime. | ||
15 | |||
16 | Examples: | ||
17 | pic: pic { | ||
18 | compatible = "cdns,xtensa-pic"; | ||
19 | /* one cell: internal irq number, | ||
20 | * two cells: second cell == 0: internal irq number | ||
21 | * second cell == 1: external irq number | ||
22 | */ | ||
23 | #interrupt-cells = <2>; | ||
24 | interrupt-controller; | ||
25 | }; | ||
diff --git a/Documentation/devicetree/bindings/interrupt-controller/mips-gic.txt b/Documentation/devicetree/bindings/interrupt-controller/mips-gic.txt index 5a65478e5d40..aae4c384ee1f 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/mips-gic.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/mips-gic.txt | |||
@@ -27,8 +27,13 @@ Optional properties: | |||
27 | Required properties for timer sub-node: | 27 | Required properties for timer sub-node: |
28 | - compatible : Should be "mti,gic-timer". | 28 | - compatible : Should be "mti,gic-timer". |
29 | - interrupts : Interrupt for the GIC local timer. | 29 | - interrupts : Interrupt for the GIC local timer. |
30 | |||
31 | Optional properties for timer sub-node: | ||
32 | - clocks : GIC timer operating clock. | ||
30 | - clock-frequency : Clock frequency at which the GIC timers operate. | 33 | - clock-frequency : Clock frequency at which the GIC timers operate. |
31 | 34 | ||
35 | Note that one of clocks or clock-frequency must be specified. | ||
36 | |||
32 | Example: | 37 | Example: |
33 | 38 | ||
34 | gic: interrupt-controller@1bdc0000 { | 39 | gic: interrupt-controller@1bdc0000 { |
diff --git a/Documentation/devicetree/bindings/interrupt-controller/nvidia,tegra-ictlr.txt b/Documentation/devicetree/bindings/interrupt-controller/nvidia,tegra-ictlr.txt new file mode 100644 index 000000000000..1099fe0788fa --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/nvidia,tegra-ictlr.txt | |||
@@ -0,0 +1,43 @@ | |||
1 | NVIDIA Legacy Interrupt Controller | ||
2 | |||
3 | All Tegra SoCs contain a legacy interrupt controller that routes | ||
4 | interrupts to the GIC, and also serves as a wakeup source. It is also | ||
5 | referred to as "ictlr", hence the name of the binding. | ||
6 | |||
7 | The HW block exposes a number of interrupt controllers, each | ||
8 | implementing a set of 32 interrupts. | ||
9 | |||
10 | Required properties: | ||
11 | |||
12 | - compatible : should be: "nvidia,tegra<chip>-ictlr". The LIC on | ||
13 | subsequent SoCs remained backwards-compatible with Tegra30, so on | ||
14 | Tegra generations later than Tegra30 the compatible value should | ||
15 | include "nvidia,tegra30-ictlr". | ||
16 | - reg : Specifies base physical address and size of the registers. | ||
17 | Each controller must be described separately (Tegra20 has 4 of them, | ||
18 | whereas Tegra30 and later have 5" | ||
19 | - interrupt-controller : Identifies the node as an interrupt controller. | ||
20 | - #interrupt-cells : Specifies the number of cells needed to encode an | ||
21 | interrupt source. The value must be 3. | ||
22 | - interrupt-parent : a phandle to the GIC these interrupts are routed | ||
23 | to. | ||
24 | |||
25 | Notes: | ||
26 | |||
27 | - Because this HW ultimately routes interrupts to the GIC, the | ||
28 | interrupt specifier must be that of the GIC. | ||
29 | - Only SPIs can use the ictlr as an interrupt parent. SGIs and PPIs | ||
30 | are explicitly forbidden. | ||
31 | |||
32 | Example: | ||
33 | |||
34 | ictlr: interrupt-controller@60004000 { | ||
35 | compatible = "nvidia,tegra20-ictlr", "nvidia,tegra-ictlr"; | ||
36 | reg = <0x60004000 64>, | ||
37 | <0x60004100 64>, | ||
38 | <0x60004200 64>, | ||
39 | <0x60004300 64>; | ||
40 | interrupt-controller; | ||
41 | #interrupt-cells = <3>; | ||
42 | interrupt-parent = <&intc>; | ||
43 | }; | ||
diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt b/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt index 1a88e62228e5..63633bdea7e4 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt | |||
@@ -4,7 +4,7 @@ Required properties: | |||
4 | 4 | ||
5 | - compatible: has to be "renesas,irqc-<soctype>", "renesas,irqc" as fallback. | 5 | - compatible: has to be "renesas,irqc-<soctype>", "renesas,irqc" as fallback. |
6 | Examples with soctypes are: | 6 | Examples with soctypes are: |
7 | - "renesas,irqc-r8a73a4" (R-Mobile AP6) | 7 | - "renesas,irqc-r8a73a4" (R-Mobile APE6) |
8 | - "renesas,irqc-r8a7790" (R-Car H2) | 8 | - "renesas,irqc-r8a7790" (R-Car H2) |
9 | - "renesas,irqc-r8a7791" (R-Car M2-W) | 9 | - "renesas,irqc-r8a7791" (R-Car M2-W) |
10 | - "renesas,irqc-r8a7792" (R-Car V2H) | 10 | - "renesas,irqc-r8a7792" (R-Car V2H) |
@@ -12,6 +12,7 @@ Required properties: | |||
12 | - "renesas,irqc-r8a7794" (R-Car E2) | 12 | - "renesas,irqc-r8a7794" (R-Car E2) |
13 | - #interrupt-cells: has to be <2>: an interrupt index and flags, as defined in | 13 | - #interrupt-cells: has to be <2>: an interrupt index and flags, as defined in |
14 | interrupts.txt in this directory | 14 | interrupts.txt in this directory |
15 | - clocks: Must contain a reference to the functional clock. | ||
15 | 16 | ||
16 | Optional properties: | 17 | Optional properties: |
17 | 18 | ||
@@ -29,4 +30,5 @@ Example: | |||
29 | <0 1 IRQ_TYPE_LEVEL_HIGH>, | 30 | <0 1 IRQ_TYPE_LEVEL_HIGH>, |
30 | <0 2 IRQ_TYPE_LEVEL_HIGH>, | 31 | <0 2 IRQ_TYPE_LEVEL_HIGH>, |
31 | <0 3 IRQ_TYPE_LEVEL_HIGH>; | 32 | <0 3 IRQ_TYPE_LEVEL_HIGH>; |
33 | clocks = <&mstp4_clks R8A7790_CLK_IRQC>; | ||
32 | }; | 34 | }; |
diff --git a/Documentation/devicetree/bindings/interrupt-controller/st,sti-irq-syscfg.txt b/Documentation/devicetree/bindings/interrupt-controller/st,sti-irq-syscfg.txt new file mode 100644 index 000000000000..ced6014061a3 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/st,sti-irq-syscfg.txt | |||
@@ -0,0 +1,35 @@ | |||
1 | STMicroelectronics STi System Configuration Controlled IRQs | ||
2 | ----------------------------------------------------------- | ||
3 | |||
4 | On STi based systems; External, CTI (Core Sight), PMU (Performance Management), | ||
5 | and PL310 L2 Cache IRQs are controlled using System Configuration registers. | ||
6 | This driver is used to unmask them prior to use. | ||
7 | |||
8 | Required properties: | ||
9 | - compatible : Should be set to one of: | ||
10 | "st,stih415-irq-syscfg" | ||
11 | "st,stih416-irq-syscfg" | ||
12 | "st,stih407-irq-syscfg" | ||
13 | "st,stid127-irq-syscfg" | ||
14 | - st,syscfg : Phandle to Cortex-A9 IRQ system config registers | ||
15 | - st,irq-device : Array of IRQs to enable - should be 2 in length | ||
16 | - st,fiq-device : Array of FIQs to enable - should be 2 in length | ||
17 | |||
18 | Optional properties: | ||
19 | - st,invert-ext : External IRQs can be inverted at will. This property inverts | ||
20 | these IRQs using bitwise logic. A number of defines have been | ||
21 | provided for convenience: | ||
22 | ST_IRQ_SYSCFG_EXT_1_INV | ||
23 | ST_IRQ_SYSCFG_EXT_2_INV | ||
24 | ST_IRQ_SYSCFG_EXT_3_INV | ||
25 | Example: | ||
26 | |||
27 | irq-syscfg { | ||
28 | compatible = "st,stih416-irq-syscfg"; | ||
29 | st,syscfg = <&syscfg_cpu>; | ||
30 | st,irq-device = <ST_IRQ_SYSCFG_PMU_0>, | ||
31 | <ST_IRQ_SYSCFG_PMU_1>; | ||
32 | st,fiq-device = <ST_IRQ_SYSCFG_DISABLED>, | ||
33 | <ST_IRQ_SYSCFG_DISABLED>; | ||
34 | st,invert-ext = <(ST_IRQ_SYSCFG_EXT_1_INV | ST_IRQ_SYSCFG_EXT_3_INV)>; | ||
35 | }; | ||
diff --git a/Documentation/devicetree/bindings/interrupt-controller/ti,omap4-wugen-mpu b/Documentation/devicetree/bindings/interrupt-controller/ti,omap4-wugen-mpu new file mode 100644 index 000000000000..43effa0a4fe7 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/ti,omap4-wugen-mpu | |||
@@ -0,0 +1,33 @@ | |||
1 | TI OMAP4 Wake-up Generator | ||
2 | |||
3 | All TI OMAP4/5 (and their derivatives) an interrupt controller that | ||
4 | routes interrupts to the GIC, and also serves as a wakeup source. It | ||
5 | is also referred to as "WUGEN-MPU", hence the name of the binding. | ||
6 | |||
7 | Reguired properties: | ||
8 | |||
9 | - compatible : should contain at least "ti,omap4-wugen-mpu" or | ||
10 | "ti,omap5-wugen-mpu" | ||
11 | - reg : Specifies base physical address and size of the registers. | ||
12 | - interrupt-controller : Identifies the node as an interrupt controller. | ||
13 | - #interrupt-cells : Specifies the number of cells needed to encode an | ||
14 | interrupt source. The value must be 3. | ||
15 | - interrupt-parent : a phandle to the GIC these interrupts are routed | ||
16 | to. | ||
17 | |||
18 | Notes: | ||
19 | |||
20 | - Because this HW ultimately routes interrupts to the GIC, the | ||
21 | interrupt specifier must be that of the GIC. | ||
22 | - Only SPIs can use the WUGEN as an interrupt parent. SGIs and PPIs | ||
23 | are explicitly forbiden. | ||
24 | |||
25 | Example: | ||
26 | |||
27 | wakeupgen: interrupt-controller@48281000 { | ||
28 | compatible = "ti,omap5-wugen-mpu", "ti,omap4-wugen-mpu"; | ||
29 | interrupt-controller; | ||
30 | #interrupt-cells = <3>; | ||
31 | reg = <0x48281000 0x1000>; | ||
32 | interrupt-parent = <&gic>; | ||
33 | }; | ||
diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Documentation/devicetree/bindings/leds/common.txt index 34811c57db69..747c53805eec 100644 --- a/Documentation/devicetree/bindings/leds/common.txt +++ b/Documentation/devicetree/bindings/leds/common.txt | |||
@@ -14,8 +14,10 @@ Optional properties for child nodes: | |||
14 | - led-sources : List of device current outputs the LED is connected to. The | 14 | - led-sources : List of device current outputs the LED is connected to. The |
15 | outputs are identified by the numbers that must be defined | 15 | outputs are identified by the numbers that must be defined |
16 | in the LED device binding documentation. | 16 | in the LED device binding documentation. |
17 | - label : The label for this LED. If omitted, the label is | 17 | - label : The label for this LED. If omitted, the label is taken from the node |
18 | taken from the node name (excluding the unit address). | 18 | name (excluding the unit address). It has to uniquely identify |
19 | a device, i.e. no other LED class device can be assigned the same | ||
20 | label. | ||
19 | 21 | ||
20 | - linux,default-trigger : This parameter, if present, is a | 22 | - linux,default-trigger : This parameter, if present, is a |
21 | string defining the trigger assigned to the LED. Current triggers are: | 23 | string defining the trigger assigned to the LED. Current triggers are: |
diff --git a/Documentation/devicetree/bindings/leds/leds-gpio.txt b/Documentation/devicetree/bindings/leds/leds-gpio.txt index f77148f372ea..fea1ebfe24a9 100644 --- a/Documentation/devicetree/bindings/leds/leds-gpio.txt +++ b/Documentation/devicetree/bindings/leds/leds-gpio.txt | |||
@@ -26,16 +26,18 @@ LED sub-node properties: | |||
26 | 26 | ||
27 | Examples: | 27 | Examples: |
28 | 28 | ||
29 | #include <dt-bindings/gpio/gpio.h> | ||
30 | |||
29 | leds { | 31 | leds { |
30 | compatible = "gpio-leds"; | 32 | compatible = "gpio-leds"; |
31 | hdd { | 33 | hdd { |
32 | label = "IDE Activity"; | 34 | label = "IDE Activity"; |
33 | gpios = <&mcu_pio 0 1>; /* Active low */ | 35 | gpios = <&mcu_pio 0 GPIO_ACTIVE_LOW>; |
34 | linux,default-trigger = "ide-disk"; | 36 | linux,default-trigger = "ide-disk"; |
35 | }; | 37 | }; |
36 | 38 | ||
37 | fault { | 39 | fault { |
38 | gpios = <&mcu_pio 1 0>; | 40 | gpios = <&mcu_pio 1 GPIO_ACTIVE_HIGH>; |
39 | /* Keep LED on if BIOS detected hardware fault */ | 41 | /* Keep LED on if BIOS detected hardware fault */ |
40 | default-state = "keep"; | 42 | default-state = "keep"; |
41 | }; | 43 | }; |
@@ -44,11 +46,11 @@ leds { | |||
44 | run-control { | 46 | run-control { |
45 | compatible = "gpio-leds"; | 47 | compatible = "gpio-leds"; |
46 | red { | 48 | red { |
47 | gpios = <&mpc8572 6 0>; | 49 | gpios = <&mpc8572 6 GPIO_ACTIVE_HIGH>; |
48 | default-state = "off"; | 50 | default-state = "off"; |
49 | }; | 51 | }; |
50 | green { | 52 | green { |
51 | gpios = <&mpc8572 7 0>; | 53 | gpios = <&mpc8572 7 GPIO_ACTIVE_HIGH>; |
52 | default-state = "on"; | 54 | default-state = "on"; |
53 | }; | 55 | }; |
54 | }; | 56 | }; |
@@ -57,7 +59,7 @@ leds { | |||
57 | compatible = "gpio-leds"; | 59 | compatible = "gpio-leds"; |
58 | 60 | ||
59 | charger-led { | 61 | charger-led { |
60 | gpios = <&gpio1 2 0>; | 62 | gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>; |
61 | linux,default-trigger = "max8903-charger-charging"; | 63 | linux,default-trigger = "max8903-charger-charging"; |
62 | retain-state-suspended; | 64 | retain-state-suspended; |
63 | }; | 65 | }; |
diff --git a/Documentation/devicetree/bindings/leds/leds-pm8941-wled.txt b/Documentation/devicetree/bindings/leds/leds-pm8941-wled.txt new file mode 100644 index 000000000000..a85a964d61f5 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-pm8941-wled.txt | |||
@@ -0,0 +1,43 @@ | |||
1 | Binding for Qualcomm PM8941 WLED driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "qcom,pm8941-wled" | ||
5 | - reg: slave address | ||
6 | |||
7 | Optional properties: | ||
8 | - label: The label for this led | ||
9 | See Documentation/devicetree/bindings/leds/common.txt | ||
10 | - linux,default-trigger: Default trigger assigned to the LED | ||
11 | See Documentation/devicetree/bindings/leds/common.txt | ||
12 | - qcom,cs-out: bool; enable current sink output | ||
13 | - qcom,cabc: bool; enable content adaptive backlight control | ||
14 | - qcom,ext-gen: bool; use externally generated modulator signal to dim | ||
15 | - qcom,current-limit: mA; per-string current limit; value from 0 to 25 | ||
16 | default: 20mA | ||
17 | - qcom,current-boost-limit: mA; boost current limit; one of: | ||
18 | 105, 385, 525, 805, 980, 1260, 1400, 1680 | ||
19 | default: 805mA | ||
20 | - qcom,switching-freq: kHz; switching frequency; one of: | ||
21 | 600, 640, 685, 738, 800, 872, 960, 1066, 1200, 1371, | ||
22 | 1600, 1920, 2400, 3200, 4800, 9600, | ||
23 | default: 1600kHz | ||
24 | - qcom,ovp: V; Over-voltage protection limit; one of: | ||
25 | 27, 29, 32, 35 | ||
26 | default: 29V | ||
27 | - qcom,num-strings: #; number of led strings attached; value from 1 to 3 | ||
28 | default: 2 | ||
29 | |||
30 | Example: | ||
31 | |||
32 | pm8941-wled@d800 { | ||
33 | compatible = "qcom,pm8941-wled"; | ||
34 | reg = <0xd800>; | ||
35 | label = "backlight"; | ||
36 | |||
37 | qcom,cs-out; | ||
38 | qcom,current-limit = <20>; | ||
39 | qcom,current-boost-limit = <805>; | ||
40 | qcom,switching-freq = <1600>; | ||
41 | qcom,ovp = <29>; | ||
42 | qcom,num-strings = <2>; | ||
43 | }; | ||
diff --git a/Documentation/devicetree/bindings/mailbox/arm-mhu.txt b/Documentation/devicetree/bindings/mailbox/arm-mhu.txt new file mode 100644 index 000000000000..4971f03f0b33 --- /dev/null +++ b/Documentation/devicetree/bindings/mailbox/arm-mhu.txt | |||
@@ -0,0 +1,43 @@ | |||
1 | ARM MHU Mailbox Driver | ||
2 | ====================== | ||
3 | |||
4 | The ARM's Message-Handling-Unit (MHU) is a mailbox controller that has | ||
5 | 3 independent channels/links to communicate with remote processor(s). | ||
6 | MHU links are hardwired on a platform. A link raises interrupt for any | ||
7 | received data. However, there is no specified way of knowing if the sent | ||
8 | data has been read by the remote. This driver assumes the sender polls | ||
9 | STAT register and the remote clears it after having read the data. | ||
10 | The last channel is specified to be a 'Secure' resource, hence can't be | ||
11 | used by Linux running NS. | ||
12 | |||
13 | Mailbox Device Node: | ||
14 | ==================== | ||
15 | |||
16 | Required properties: | ||
17 | -------------------- | ||
18 | - compatible: Shall be "arm,mhu" & "arm,primecell" | ||
19 | - reg: Contains the mailbox register address range (base | ||
20 | address and length) | ||
21 | - #mbox-cells Shall be 1 - the index of the channel needed. | ||
22 | - interrupts: Contains the interrupt information corresponding to | ||
23 | each of the 3 links of MHU. | ||
24 | |||
25 | Example: | ||
26 | -------- | ||
27 | |||
28 | mhu: mailbox@2b1f0000 { | ||
29 | #mbox-cells = <1>; | ||
30 | compatible = "arm,mhu", "arm,primecell"; | ||
31 | reg = <0 0x2b1f0000 0x1000>; | ||
32 | interrupts = <0 36 4>, /* LP-NonSecure */ | ||
33 | <0 35 4>, /* HP-NonSecure */ | ||
34 | <0 37 4>; /* Secure */ | ||
35 | clocks = <&clock 0 2 1>; | ||
36 | clock-names = "apb_pclk"; | ||
37 | }; | ||
38 | |||
39 | mhu_client: scb@2e000000 { | ||
40 | compatible = "fujitsu,mb86s70-scb-1.0"; | ||
41 | reg = <0 0x2e000000 0x4000>; | ||
42 | mboxes = <&mhu 1>; /* HP-NonSecure */ | ||
43 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/arizona.txt b/Documentation/devicetree/bindings/mfd/arizona.txt index 7bd1273f571a..7665aa95979f 100644 --- a/Documentation/devicetree/bindings/mfd/arizona.txt +++ b/Documentation/devicetree/bindings/mfd/arizona.txt | |||
@@ -8,6 +8,7 @@ Required properties: | |||
8 | - compatible : One of the following chip-specific strings: | 8 | - compatible : One of the following chip-specific strings: |
9 | "wlf,wm5102" | 9 | "wlf,wm5102" |
10 | "wlf,wm5110" | 10 | "wlf,wm5110" |
11 | "wlf,wm8280" | ||
11 | "wlf,wm8997" | 12 | "wlf,wm8997" |
12 | - reg : I2C slave address when connected using I2C, chip select number when | 13 | - reg : I2C slave address when connected using I2C, chip select number when |
13 | using SPI. | 14 | using SPI. |
@@ -26,21 +27,27 @@ Required properties: | |||
26 | - #gpio-cells : Must be 2. The first cell is the pin number and the | 27 | - #gpio-cells : Must be 2. The first cell is the pin number and the |
27 | second cell is used to specify optional parameters (currently unused). | 28 | second cell is used to specify optional parameters (currently unused). |
28 | 29 | ||
29 | - AVDD-supply, DBVDD1-supply, DBVDD2-supply, DBVDD3-supply (wm5102, wm5110), | 30 | - AVDD-supply, DBVDD1-supply, CPVDD-supply : Power supplies for the device, |
30 | CPVDD-supply, SPKVDDL-supply (wm5102, wm5110), SPKVDDR-supply (wm5102, | 31 | as covered in Documentation/devicetree/bindings/regulator/regulator.txt |
31 | wm5110), SPKVDD-supply (wm8997) : Power supplies for the device, as covered | 32 | |
32 | in Documentation/devicetree/bindings/regulator/regulator.txt | 33 | - DBVDD2-supply, DBVDD3-supply : Additional databus power supplies (wm5102, |
34 | wm5110, wm8280) | ||
35 | |||
36 | - SPKVDDL-supply, SPKVDDR-supply : Speaker driver power supplies (wm5102, | ||
37 | wm5110, wm8280) | ||
38 | |||
39 | - SPKVDD-supply : Speaker driver power supply (wm8997) | ||
33 | 40 | ||
34 | Optional properties: | 41 | Optional properties: |
35 | 42 | ||
36 | - wlf,reset : GPIO specifier for the GPIO controlling /RESET | 43 | - wlf,reset : GPIO specifier for the GPIO controlling /RESET |
37 | - wlf,ldoena : GPIO specifier for the GPIO controlling LDOENA | 44 | - wlf,ldoena : GPIO specifier for the GPIO controlling LDOENA |
38 | 45 | ||
39 | - wlf,gpio-defaults : A list of GPIO configuration register values. If | 46 | - wlf,gpio-defaults : A list of GPIO configuration register values. Defines |
40 | absent, no configuration of these registers is performed. If any | 47 | for the appropriate values can found in <dt-bindings/mfd/arizona.txt>. If |
41 | entry has a value that is out of range for a 16 bit register then | 48 | absent, no configuration of these registers is performed. If any entry has |
42 | the chip default will be used. If present exactly five values must | 49 | a value that is out of range for a 16 bit register then the chip default |
43 | be specified. | 50 | will be used. If present exactly five values must be specified. |
44 | 51 | ||
45 | - wlf,inmode : A list of INn_MODE register values, where n is the number | 52 | - wlf,inmode : A list of INn_MODE register values, where n is the number |
46 | of input signals. Valid values are 0 (Differential), 1 (Single-ended) and | 53 | of input signals. Valid values are 0 (Differential), 1 (Single-ended) and |
@@ -49,6 +56,12 @@ Optional properties: | |||
49 | input singals. If values less than the number of input signals, elements | 56 | input singals. If values less than the number of input signals, elements |
50 | that has not been specifed are set to 0 by default. | 57 | that has not been specifed are set to 0 by default. |
51 | 58 | ||
59 | - wlf,dmic-ref : DMIC reference voltage source for each input, can be | ||
60 | selected from either MICVDD or one of the MICBIAS's, defines | ||
61 | (ARIZONA_DMIC_xxxx) are provided in <dt-bindings/mfd/arizona.txt>. If | ||
62 | present, the number of values should be less than or equal to the | ||
63 | number of inputs, unspecified inputs will use the chip default. | ||
64 | |||
52 | - DCVDD-supply, MICVDD-supply : Power supplies, only need to be specified if | 65 | - DCVDD-supply, MICVDD-supply : Power supplies, only need to be specified if |
53 | they are being externally supplied. As covered in | 66 | they are being externally supplied. As covered in |
54 | Documentation/devicetree/bindings/regulator/regulator.txt | 67 | Documentation/devicetree/bindings/regulator/regulator.txt |
@@ -73,10 +86,10 @@ codec: wm5102@1a { | |||
73 | #gpio-cells = <2>; | 86 | #gpio-cells = <2>; |
74 | 87 | ||
75 | wlf,gpio-defaults = < | 88 | wlf,gpio-defaults = < |
76 | 0x00000000 /* AIF1TXLRCLK */ | 89 | ARIZONA_GP_FN_TXLRCLK |
77 | 0xffffffff | 90 | ARIZONA_GP_DEFAULT |
78 | 0xffffffff | 91 | ARIZONA_GP_DEFAULT |
79 | 0xffffffff | 92 | ARIZONA_GP_DEFAULT |
80 | 0xffffffff | 93 | ARIZONA_GP_DEFAULT |
81 | >; | 94 | >; |
82 | }; | 95 | }; |
diff --git a/Documentation/devicetree/bindings/mfd/axp20x.txt b/Documentation/devicetree/bindings/mfd/axp20x.txt new file mode 100644 index 000000000000..98685f291a72 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/axp20x.txt | |||
@@ -0,0 +1,96 @@ | |||
1 | AXP202/AXP209 device tree bindings | ||
2 | |||
3 | The axp20x family current members : | ||
4 | axp202 (X-Powers) | ||
5 | axp209 (X-Powers) | ||
6 | |||
7 | Required properties: | ||
8 | - compatible: "x-powers,axp202" or "x-powers,axp209" | ||
9 | - reg: The I2C slave address for the AXP chip | ||
10 | - interrupt-parent: The parent interrupt controller | ||
11 | - interrupts: SoC NMI / GPIO interrupt connected to the PMIC's IRQ pin | ||
12 | - interrupt-controller: axp20x has its own internal IRQs | ||
13 | - #interrupt-cells: Should be set to 1 | ||
14 | |||
15 | Optional properties: | ||
16 | - x-powers,dcdc-freq: defines the work frequency of DC-DC in KHz | ||
17 | (range: 750-1875). Default: 1.5MHz | ||
18 | - <input>-supply: a phandle to the regulator supply node. May be omitted if | ||
19 | inputs are unregulated, such as using the IPSOUT output | ||
20 | from the PMIC. | ||
21 | |||
22 | - regulators: A node that houses a sub-node for each regulator. Regulators | ||
23 | not used but preferred to be managed by the OS should be | ||
24 | listed as well. | ||
25 | See Documentation/devicetree/bindings/regulator/regulator.txt | ||
26 | for more information on standard regulator bindings. | ||
27 | |||
28 | Optional properties for DCDC regulators: | ||
29 | - x-powers,dcdc-workmode: 1 for PWM mode, 0 for AUTO (PWM/PFM) mode | ||
30 | Default: Current hardware setting | ||
31 | The DCDC regulators work in a mixed PWM/PFM mode, | ||
32 | using PFM under light loads and switching to PWM | ||
33 | for heavier loads. Forcing PWM mode trades efficiency | ||
34 | under light loads for lower output noise. This | ||
35 | probably makes sense for HiFi audio related | ||
36 | applications that aren't battery constrained. | ||
37 | |||
38 | |||
39 | AXP202/AXP209 regulators, type, and corresponding input supply names: | ||
40 | |||
41 | Regulator Type Supply Name Notes | ||
42 | --------- ---- ----------- ----- | ||
43 | DCDC2 : DC-DC buck : vin2-supply | ||
44 | DCDC3 : DC-DC buck : vin3-supply | ||
45 | LDO1 : LDO : acin-supply : always on | ||
46 | LDO2 : LDO : ldo24in-supply : shared supply | ||
47 | LDO3 : LDO : ldo3in-supply | ||
48 | LDO4 : LDO : ldo24in-supply : shared supply | ||
49 | LDO5 : LDO : ldo5in-supply | ||
50 | |||
51 | Example: | ||
52 | |||
53 | axp209: pmic@34 { | ||
54 | compatible = "x-powers,axp209"; | ||
55 | reg = <0x34>; | ||
56 | interrupt-parent = <&nmi_intc>; | ||
57 | interrupts = <0 IRQ_TYPE_LEVEL_LOW>; | ||
58 | interrupt-controller; | ||
59 | #interrupt-cells = <1>; | ||
60 | |||
61 | regulators { | ||
62 | x-powers,dcdc-freq = <1500>; | ||
63 | |||
64 | vdd_cpu: dcdc2 { | ||
65 | regulator-always-on; | ||
66 | regulator-min-microvolt = <1000000>; | ||
67 | regulator-max-microvolt = <1450000>; | ||
68 | regulator-name = "vdd-cpu"; | ||
69 | }; | ||
70 | |||
71 | vdd_int_dll: dcdc3 { | ||
72 | regulator-always-on; | ||
73 | regulator-min-microvolt = <1000000>; | ||
74 | regulator-max-microvolt = <1400000>; | ||
75 | regulator-name = "vdd-int-dll"; | ||
76 | }; | ||
77 | |||
78 | vdd_rtc: ldo1 { | ||
79 | regulator-always-on; | ||
80 | regulator-min-microvolt = <1200000>; | ||
81 | regulator-max-microvolt = <1400000>; | ||
82 | regulator-name = "vdd-rtc"; | ||
83 | }; | ||
84 | |||
85 | avcc: ldo2 { | ||
86 | regulator-always-on; | ||
87 | regulator-min-microvolt = <2700000>; | ||
88 | regulator-max-microvolt = <3300000>; | ||
89 | regulator-name = "avcc"; | ||
90 | }; | ||
91 | |||
92 | ldo3 { | ||
93 | /* unused but preferred to be managed by OS */ | ||
94 | }; | ||
95 | }; | ||
96 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/bcm590xx.txt b/Documentation/devicetree/bindings/mfd/brcm,bcm59056.txt index be51a15e05f9..be51a15e05f9 100644 --- a/Documentation/devicetree/bindings/mfd/bcm590xx.txt +++ b/Documentation/devicetree/bindings/mfd/brcm,bcm59056.txt | |||
diff --git a/Documentation/devicetree/bindings/mfd/da9150.txt b/Documentation/devicetree/bindings/mfd/da9150.txt new file mode 100644 index 000000000000..d0588eaa0d71 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/da9150.txt | |||
@@ -0,0 +1,43 @@ | |||
1 | Dialog Semiconductor DA9150 Combined Charger/Fuel-Gauge MFD bindings | ||
2 | |||
3 | DA9150 consists of a group of sub-devices: | ||
4 | |||
5 | Device Description | ||
6 | ------ ----------- | ||
7 | da9150-gpadc : General Purpose ADC | ||
8 | da9150-charger : Battery Charger | ||
9 | |||
10 | ====== | ||
11 | |||
12 | Required properties: | ||
13 | - compatible : Should be "dlg,da9150" | ||
14 | - reg: Specifies the I2C slave address | ||
15 | - interrupt-parent: Specifies the phandle of the interrupt controller to which | ||
16 | the IRQs from da9150 are delivered to. | ||
17 | - interrupts: IRQ line info for da9150 chip. | ||
18 | - interrupt-controller: da9150 has internal IRQs (own IRQ domain). | ||
19 | (See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt for | ||
20 | further information relating to interrupt properties) | ||
21 | |||
22 | Sub-devices: | ||
23 | - da9150-gpadc: See Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt | ||
24 | - da9150-charger: See Documentation/devicetree/bindings/power/da9150-charger.txt | ||
25 | |||
26 | |||
27 | Example: | ||
28 | |||
29 | charger_fg: da9150@58 { | ||
30 | compatible = "dlg,da9150"; | ||
31 | reg = <0x58>; | ||
32 | interrupt-parent = <&gpio6>; | ||
33 | interrupts = <11 IRQ_TYPE_LEVEL_LOW>; | ||
34 | interrupt-controller; | ||
35 | |||
36 | gpadc: da9150-gpadc { | ||
37 | ... | ||
38 | }; | ||
39 | |||
40 | da9150-charger { | ||
41 | ... | ||
42 | }; | ||
43 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/mt6397.txt b/Documentation/devicetree/bindings/mfd/mt6397.txt new file mode 100644 index 000000000000..15043e652699 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/mt6397.txt | |||
@@ -0,0 +1,70 @@ | |||
1 | MediaTek MT6397 Multifunction Device Driver | ||
2 | |||
3 | MT6397 is a multifunction device with the following sub modules: | ||
4 | - Regulator | ||
5 | - RTC | ||
6 | - Audio codec | ||
7 | - GPIO | ||
8 | - Clock | ||
9 | |||
10 | It is interfaced to host controller using SPI interface by a proprietary hardware | ||
11 | called PMIC wrapper or pwrap. MT6397 MFD is a child device of pwrap. | ||
12 | See the following for pwarp node definitions: | ||
13 | Documentation/devicetree/bindings/soc/pwrap.txt | ||
14 | |||
15 | This document describes the binding for MFD device and its sub module. | ||
16 | |||
17 | Required properties: | ||
18 | compatible: "mediatek,mt6397" | ||
19 | |||
20 | Optional subnodes: | ||
21 | |||
22 | - rtc | ||
23 | Required properties: | ||
24 | - compatible: "mediatek,mt6397-rtc" | ||
25 | - regulators | ||
26 | Required properties: | ||
27 | - compatible: "mediatek,mt6397-regulator" | ||
28 | see Documentation/devicetree/bindings/regulator/mt6397-regulator.txt | ||
29 | - codec | ||
30 | Required properties: | ||
31 | - compatible: "mediatek,mt6397-codec" | ||
32 | - clk | ||
33 | Required properties: | ||
34 | - compatible: "mediatek,mt6397-clk" | ||
35 | |||
36 | Example: | ||
37 | pwrap: pwrap@1000f000 { | ||
38 | compatible = "mediatek,mt8135-pwrap"; | ||
39 | |||
40 | ... | ||
41 | |||
42 | pmic { | ||
43 | compatible = "mediatek,mt6397"; | ||
44 | |||
45 | codec: mt6397codec { | ||
46 | compatible = "mediatek,mt6397-codec"; | ||
47 | }; | ||
48 | |||
49 | regulators { | ||
50 | compatible = "mediatek,mt6397-regulator"; | ||
51 | |||
52 | mt6397_vpca15_reg: buck_vpca15 { | ||
53 | regulator-compatible = "buck_vpca15"; | ||
54 | regulator-name = "vpca15"; | ||
55 | regulator-min-microvolt = <850000>; | ||
56 | regulator-max-microvolt = <1400000>; | ||
57 | regulator-ramp-delay = <12500>; | ||
58 | regulator-always-on; | ||
59 | }; | ||
60 | |||
61 | mt6397_vgp4_reg: ldo_vgp4 { | ||
62 | regulator-compatible = "ldo_vgp4"; | ||
63 | regulator-name = "vgp4"; | ||
64 | regulator-min-microvolt = <1200000>; | ||
65 | regulator-max-microvolt = <3300000>; | ||
66 | regulator-enable-ramp-delay = <218>; | ||
67 | }; | ||
68 | }; | ||
69 | }; | ||
70 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt index 7182b8857f57..6ac06c1b9aec 100644 --- a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt +++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt | |||
@@ -15,10 +15,21 @@ each. A function can consume one or more of these fixed-size register regions. | |||
15 | 15 | ||
16 | Required properties: | 16 | Required properties: |
17 | - compatible: Should contain one of: | 17 | - compatible: Should contain one of: |
18 | "qcom,pm8941" | 18 | "qcom,pm8941", |
19 | "qcom,pm8841" | 19 | "qcom,pm8841", |
20 | "qcom,pma8084" | 20 | "qcom,pma8084", |
21 | or generalized "qcom,spmi-pmic". | 21 | "qcom,pm8019", |
22 | "qcom,pm8226", | ||
23 | "qcom,pm8110", | ||
24 | "qcom,pma8084", | ||
25 | "qcom,pmi8962", | ||
26 | "qcom,pmd9635", | ||
27 | "qcom,pm8994", | ||
28 | "qcom,pmi8994", | ||
29 | "qcom,pm8916", | ||
30 | "qcom,pm8004", | ||
31 | "qcom,pm8909", | ||
32 | or generalized "qcom,spmi-pmic". | ||
22 | - reg: Specifies the SPMI USID slave address for this device. | 33 | - reg: Specifies the SPMI USID slave address for this device. |
23 | For more information see: | 34 | For more information see: |
24 | Documentation/devicetree/bindings/spmi/spmi.txt | 35 | Documentation/devicetree/bindings/spmi/spmi.txt |
diff --git a/Documentation/devicetree/bindings/mfd/qcom-rpm.txt b/Documentation/devicetree/bindings/mfd/qcom-rpm.txt index 85e31980017a..5e97a9593ad7 100644 --- a/Documentation/devicetree/bindings/mfd/qcom-rpm.txt +++ b/Documentation/devicetree/bindings/mfd/qcom-rpm.txt | |||
@@ -12,6 +12,7 @@ frequencies. | |||
12 | "qcom,rpm-apq8064" | 12 | "qcom,rpm-apq8064" |
13 | "qcom,rpm-msm8660" | 13 | "qcom,rpm-msm8660" |
14 | "qcom,rpm-msm8960" | 14 | "qcom,rpm-msm8960" |
15 | "qcom,rpm-ipq8064" | ||
15 | 16 | ||
16 | - reg: | 17 | - reg: |
17 | Usage: required | 18 | Usage: required |
@@ -31,16 +32,6 @@ frequencies. | |||
31 | Value type: <string-array> | 32 | Value type: <string-array> |
32 | Definition: must be the three strings "ack", "err" and "wakeup", in order | 33 | Definition: must be the three strings "ack", "err" and "wakeup", in order |
33 | 34 | ||
34 | - #address-cells: | ||
35 | Usage: required | ||
36 | Value type: <u32> | ||
37 | Definition: must be 1 | ||
38 | |||
39 | - #size-cells: | ||
40 | Usage: required | ||
41 | Value type: <u32> | ||
42 | Definition: must be 0 | ||
43 | |||
44 | - qcom,ipc: | 35 | - qcom,ipc: |
45 | Usage: required | 36 | Usage: required |
46 | Value type: <prop-encoded-array> | 37 | Value type: <prop-encoded-array> |
@@ -52,6 +43,188 @@ frequencies. | |||
52 | - u32 representing the ipc bit within the register | 43 | - u32 representing the ipc bit within the register |
53 | 44 | ||
54 | 45 | ||
46 | = SUBNODES | ||
47 | |||
48 | The RPM exposes resources to its subnodes. The below bindings specify the set | ||
49 | of valid subnodes that can operate on these resources. | ||
50 | |||
51 | == Regulators | ||
52 | |||
53 | Regulator nodes are identified by their compatible: | ||
54 | |||
55 | - compatible: | ||
56 | Usage: required | ||
57 | Value type: <string> | ||
58 | Definition: must be one of: | ||
59 | "qcom,rpm-pm8058-regulators" | ||
60 | "qcom,rpm-pm8901-regulators" | ||
61 | "qcom,rpm-pm8921-regulators" | ||
62 | |||
63 | - vdd_l0_l1_lvs-supply: | ||
64 | - vdd_l2_l11_l12-supply: | ||
65 | - vdd_l3_l4_l5-supply: | ||
66 | - vdd_l6_l7-supply: | ||
67 | - vdd_l8-supply: | ||
68 | - vdd_l9-supply: | ||
69 | - vdd_l10-supply: | ||
70 | - vdd_l13_l16-supply: | ||
71 | - vdd_l14_l15-supply: | ||
72 | - vdd_l17_l18-supply: | ||
73 | - vdd_l19_l20-supply: | ||
74 | - vdd_l21-supply: | ||
75 | - vdd_l22-supply: | ||
76 | - vdd_l23_l24_l25-supply: | ||
77 | - vdd_ncp-supply: | ||
78 | - vdd_s0-supply: | ||
79 | - vdd_s1-supply: | ||
80 | - vdd_s2-supply: | ||
81 | - vdd_s3-supply: | ||
82 | - vdd_s4-supply: | ||
83 | Usage: optional (pm8058 only) | ||
84 | Value type: <phandle> | ||
85 | Definition: reference to regulator supplying the input pin, as | ||
86 | described in the data sheet | ||
87 | |||
88 | - lvs0_in-supply: | ||
89 | - lvs1_in-supply: | ||
90 | - lvs2_in-supply: | ||
91 | - lvs3_in-supply: | ||
92 | - mvs_in-supply: | ||
93 | - vdd_l0-supply: | ||
94 | - vdd_l1-supply: | ||
95 | - vdd_l2-supply: | ||
96 | - vdd_l3-supply: | ||
97 | - vdd_l4-supply: | ||
98 | - vdd_l5-supply: | ||
99 | - vdd_l6-supply: | ||
100 | - vdd_s0-supply: | ||
101 | - vdd_s1-supply: | ||
102 | - vdd_s2-supply: | ||
103 | - vdd_s3-supply: | ||
104 | - vdd_s4-supply: | ||
105 | Usage: optional (pm8901 only) | ||
106 | Value type: <phandle> | ||
107 | Definition: reference to regulator supplying the input pin, as | ||
108 | described in the data sheet | ||
109 | |||
110 | - vdd_l1_l2_l12_l18-supply: | ||
111 | - vdd_l3_l15_l17-supply: | ||
112 | - vdd_l4_l14-supply: | ||
113 | - vdd_l5_l8_l16-supply: | ||
114 | - vdd_l6_l7-supply: | ||
115 | - vdd_l9_l11-supply: | ||
116 | - vdd_l10_l22-supply: | ||
117 | - vdd_l21_l23_l29-supply: | ||
118 | - vdd_l24-supply: | ||
119 | - vdd_l25-supply: | ||
120 | - vdd_l26-supply: | ||
121 | - vdd_l27-supply: | ||
122 | - vdd_l28-supply: | ||
123 | - vdd_ncp-supply: | ||
124 | - vdd_s1-supply: | ||
125 | - vdd_s2-supply: | ||
126 | - vdd_s4-supply: | ||
127 | - vdd_s5-supply: | ||
128 | - vdd_s6-supply: | ||
129 | - vdd_s7-supply: | ||
130 | - vdd_s8-supply: | ||
131 | - vin_5vs-supply: | ||
132 | - vin_lvs1_3_6-supply: | ||
133 | - vin_lvs2-supply: | ||
134 | - vin_lvs4_5_7-supply: | ||
135 | Usage: optional (pm8921 only) | ||
136 | Value type: <phandle> | ||
137 | Definition: reference to regulator supplying the input pin, as | ||
138 | described in the data sheet | ||
139 | |||
140 | The regulator node houses sub-nodes for each regulator within the device. Each | ||
141 | sub-node is identified using the node's name, with valid values listed for each | ||
142 | of the pmics below. | ||
143 | |||
144 | pm8058: | ||
145 | l0, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, | ||
146 | l16, l17, l18, l19, l20, l21, l22, l23, l24, l25, s0, s1, s2, s3, s4, | ||
147 | lvs0, lvs1, ncp | ||
148 | |||
149 | pm8901: | ||
150 | l0, l1, l2, l3, l4, l5, l6, s0, s1, s2, s3, s4, lvs0, lvs1, lvs2, lvs3, | ||
151 | mvs | ||
152 | |||
153 | pm8921: | ||
154 | s1, s2, s3, s4, s7, s8, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, | ||
155 | l12, l14, l15, l16, l17, l18, l21, l22, l23, l24, l25, l26, l27, l28, | ||
156 | l29, lvs1, lvs2, lvs3, lvs4, lvs5, lvs6, lvs7, usb-switch, hdmi-switch, | ||
157 | ncp | ||
158 | |||
159 | The content of each sub-node is defined by the standard binding for regulators - | ||
160 | see regulator.txt - with additional custom properties described below: | ||
161 | |||
162 | === Switch-mode Power Supply regulator custom properties | ||
163 | |||
164 | - bias-pull-down: | ||
165 | Usage: optional | ||
166 | Value type: <empty> | ||
167 | Definition: enable pull down of the regulator when inactive | ||
168 | |||
169 | - qcom,switch-mode-frequency: | ||
170 | Usage: required | ||
171 | Value type: <u32> | ||
172 | Definition: Frequency (Hz) of the switch-mode power supply; | ||
173 | must be one of: | ||
174 | 19200000, 9600000, 6400000, 4800000, 3840000, 3200000, | ||
175 | 2740000, 2400000, 2130000, 1920000, 1750000, 1600000, | ||
176 | 1480000, 1370000, 1280000, 1200000 | ||
177 | |||
178 | - qcom,force-mode: | ||
179 | Usage: optional (default if no other qcom,force-mode is specified) | ||
180 | Value type: <u32> | ||
181 | Defintion: indicates that the regulator should be forced to a | ||
182 | particular mode, valid values are: | ||
183 | QCOM_RPM_FORCE_MODE_NONE - do not force any mode | ||
184 | QCOM_RPM_FORCE_MODE_LPM - force into low power mode | ||
185 | QCOM_RPM_FORCE_MODE_HPM - force into high power mode | ||
186 | QCOM_RPM_FORCE_MODE_AUTO - allow regulator to automatically | ||
187 | select its own mode based on | ||
188 | realtime current draw, only for: | ||
189 | pm8921 smps and ftsmps | ||
190 | |||
191 | - qcom,power-mode-hysteretic: | ||
192 | Usage: optional | ||
193 | Value type: <empty> | ||
194 | Definition: select that the power supply should operate in hysteretic | ||
195 | mode, instead of the default pwm mode | ||
196 | |||
197 | === Low-dropout regulator custom properties | ||
198 | |||
199 | - bias-pull-down: | ||
200 | Usage: optional | ||
201 | Value type: <empty> | ||
202 | Definition: enable pull down of the regulator when inactive | ||
203 | |||
204 | - qcom,force-mode: | ||
205 | Usage: optional | ||
206 | Value type: <u32> | ||
207 | Defintion: indicates that the regulator should not be forced to any | ||
208 | particular mode, valid values are: | ||
209 | QCOM_RPM_FORCE_MODE_NONE - do not force any mode | ||
210 | QCOM_RPM_FORCE_MODE_LPM - force into low power mode | ||
211 | QCOM_RPM_FORCE_MODE_HPM - force into high power mode | ||
212 | QCOM_RPM_FORCE_MODE_BYPASS - set regulator to use bypass | ||
213 | mode, i.e. to act as a switch | ||
214 | and not regulate, only for: | ||
215 | pm8921 pldo, nldo and nldo1200 | ||
216 | |||
217 | === Negative Charge Pump custom properties | ||
218 | |||
219 | - qcom,switch-mode-frequency: | ||
220 | Usage: required | ||
221 | Value type: <u32> | ||
222 | Definition: Frequency (Hz) of the swith mode power supply; | ||
223 | must be one of: | ||
224 | 19200000, 9600000, 6400000, 4800000, 3840000, 3200000, | ||
225 | 2740000, 2400000, 2130000, 1920000, 1750000, 1600000, | ||
226 | 1480000, 1370000, 1280000, 1200000 | ||
227 | |||
55 | = EXAMPLE | 228 | = EXAMPLE |
56 | 229 | ||
57 | #include <dt-bindings/mfd/qcom-rpm.h> | 230 | #include <dt-bindings/mfd/qcom-rpm.h> |
@@ -64,7 +237,28 @@ frequencies. | |||
64 | interrupts = <0 19 0>, <0 21 0>, <0 22 0>; | 237 | interrupts = <0 19 0>, <0 21 0>, <0 22 0>; |
65 | interrupt-names = "ack", "err", "wakeup"; | 238 | interrupt-names = "ack", "err", "wakeup"; |
66 | 239 | ||
67 | #address-cells = <1>; | 240 | regulators { |
68 | #size-cells = <0>; | 241 | compatible = "qcom,rpm-pm8921-regulators"; |
242 | vdd_l1_l2_l12_l18-supply = <&pm8921_s4>; | ||
243 | |||
244 | s1 { | ||
245 | regulator-min-microvolt = <1225000>; | ||
246 | regulator-max-microvolt = <1225000>; | ||
247 | |||
248 | bias-pull-down; | ||
249 | |||
250 | qcom,switch-mode-frequency = <3200000>; | ||
251 | }; | ||
252 | |||
253 | pm8921_s4: s4 { | ||
254 | regulator-min-microvolt = <1800000>; | ||
255 | regulator-max-microvolt = <1800000>; | ||
256 | |||
257 | qcom,switch-mode-frequency = <1600000>; | ||
258 | bias-pull-down; | ||
259 | |||
260 | qcom,force-mode = <QCOM_RPM_FORCE_MODE_AUTO>; | ||
261 | }; | ||
262 | }; | ||
69 | }; | 263 | }; |
70 | 264 | ||
diff --git a/Documentation/devicetree/bindings/mfd/sky81452.txt b/Documentation/devicetree/bindings/mfd/sky81452.txt new file mode 100644 index 000000000000..35181794aa24 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/sky81452.txt | |||
@@ -0,0 +1,35 @@ | |||
1 | SKY81452 bindings | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Must be "skyworks,sky81452" | ||
5 | - reg : I2C slave address | ||
6 | |||
7 | Required child nodes: | ||
8 | - backlight : container node for backlight following the binding | ||
9 | in video/backlight/sky81452-backlight.txt | ||
10 | - regulator : container node for regulators following the binding | ||
11 | in regulator/sky81452-regulator.txt | ||
12 | |||
13 | Example: | ||
14 | |||
15 | sky81452@2c { | ||
16 | compatible = "skyworks,sky81452"; | ||
17 | reg = <0x2c>; | ||
18 | |||
19 | backlight { | ||
20 | compatible = "skyworks,sky81452-backlight"; | ||
21 | name = "pwm-backlight"; | ||
22 | led-sources = <0 1 2 3 6>; | ||
23 | skyworks,ignore-pwm; | ||
24 | skyworks,phase-shift; | ||
25 | skyworks,current-limit = <2300>; | ||
26 | }; | ||
27 | |||
28 | regulator { | ||
29 | lout { | ||
30 | regulator-name = "sky81452-lout"; | ||
31 | regulator-min-microvolt = <4500000>; | ||
32 | regulator-max-microvolt = <8000000>; | ||
33 | }; | ||
34 | }; | ||
35 | }; | ||
diff --git a/Documentation/devicetree/bindings/mips/brcm/bcm3384-intc.txt b/Documentation/devicetree/bindings/mips/brcm/bcm3384-intc.txt deleted file mode 100644 index d4e0141d3620..000000000000 --- a/Documentation/devicetree/bindings/mips/brcm/bcm3384-intc.txt +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | * Interrupt Controller | ||
2 | |||
3 | Properties: | ||
4 | - compatible: "brcm,bcm3384-intc" | ||
5 | |||
6 | Compatibility with BCM3384 and possibly other BCM33xx/BCM63xx SoCs. | ||
7 | |||
8 | - reg: Address/length pairs for each mask/status register set. Length must | ||
9 | be 8. If multiple register sets are specified, the first set will | ||
10 | handle IRQ offsets 0..31, the second set 32..63, and so on. | ||
11 | |||
12 | - interrupt-controller: This is an interrupt controller. | ||
13 | |||
14 | - #interrupt-cells: Must be <1>. Just a simple IRQ offset; no level/edge | ||
15 | or polarity configuration is possible with this controller. | ||
16 | |||
17 | - interrupt-parent: This controller is cascaded from a MIPS CPU HW IRQ, or | ||
18 | from another INTC. | ||
19 | |||
20 | - interrupts: The IRQ on the parent controller. | ||
21 | |||
22 | Example: | ||
23 | periph_intc: periph_intc@14e00038 { | ||
24 | compatible = "brcm,bcm3384-intc"; | ||
25 | |||
26 | /* | ||
27 | * IRQs 0..31: mask reg 0x14e00038, status reg 0x14e0003c | ||
28 | * IRQs 32..63: mask reg 0x14e00340, status reg 0x14e00344 | ||
29 | */ | ||
30 | reg = <0x14e00038 0x8 0x14e00340 0x8>; | ||
31 | |||
32 | interrupt-controller; | ||
33 | #interrupt-cells = <1>; | ||
34 | |||
35 | interrupt-parent = <&cpu_intc>; | ||
36 | interrupts = <4>; | ||
37 | }; | ||
diff --git a/Documentation/devicetree/bindings/mips/brcm/bmips.txt b/Documentation/devicetree/bindings/mips/brcm/brcm,bmips.txt index 8ef71b4085ca..8ef71b4085ca 100644 --- a/Documentation/devicetree/bindings/mips/brcm/bmips.txt +++ b/Documentation/devicetree/bindings/mips/brcm/brcm,bmips.txt | |||
diff --git a/Documentation/devicetree/bindings/mips/brcm/cm-dsl.txt b/Documentation/devicetree/bindings/mips/brcm/cm-dsl.txt deleted file mode 100644 index 8a139cb3c0b5..000000000000 --- a/Documentation/devicetree/bindings/mips/brcm/cm-dsl.txt +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | * Broadcom cable/DSL platforms | ||
2 | |||
3 | SoCs: | ||
4 | |||
5 | Required properties: | ||
6 | - compatible: "brcm,bcm3384", "brcm,bcm33843" | ||
7 | |||
8 | Boards: | ||
9 | |||
10 | Required properties: | ||
11 | - compatible: "brcm,bcm93384wvg" | ||
diff --git a/Documentation/devicetree/bindings/mips/brcm/soc.txt b/Documentation/devicetree/bindings/mips/brcm/soc.txt new file mode 100644 index 000000000000..7bab90cc4a7b --- /dev/null +++ b/Documentation/devicetree/bindings/mips/brcm/soc.txt | |||
@@ -0,0 +1,12 @@ | |||
1 | * Broadcom cable/DSL/settop platforms | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible: "brcm,bcm3384", "brcm,bcm33843" | ||
6 | "brcm,bcm3384-viper", "brcm,bcm33843-viper" | ||
7 | "brcm,bcm6328", "brcm,bcm6368", | ||
8 | "brcm,bcm7125", "brcm,bcm7346", "brcm,bcm7358", "brcm,bcm7360", | ||
9 | "brcm,bcm7362", "brcm,bcm7420", "brcm,bcm7425" | ||
10 | |||
11 | The experimental -viper variants are for running Linux on the 3384's | ||
12 | BMIPS4355 cable modem CPU instead of the BMIPS5000 application processor. | ||
diff --git a/Documentation/devicetree/bindings/mips/img/pistachio.txt b/Documentation/devicetree/bindings/mips/img/pistachio.txt new file mode 100644 index 000000000000..a736d889c2b8 --- /dev/null +++ b/Documentation/devicetree/bindings/mips/img/pistachio.txt | |||
@@ -0,0 +1,42 @@ | |||
1 | Imagination Pistachio SoC | ||
2 | ========================= | ||
3 | |||
4 | Required properties: | ||
5 | -------------------- | ||
6 | - compatible: Must include "img,pistachio". | ||
7 | |||
8 | CPU nodes: | ||
9 | ---------- | ||
10 | A "cpus" node is required. Required properties: | ||
11 | - #address-cells: Must be 1. | ||
12 | - #size-cells: Must be 0. | ||
13 | A CPU sub-node is also required for at least CPU 0. Since the topology may | ||
14 | be probed via CPS, it is not necessary to specify secondary CPUs. Required | ||
15 | propertis: | ||
16 | - device_type: Must be "cpu". | ||
17 | - compatible: Must be "mti,interaptiv". | ||
18 | - reg: CPU number. | ||
19 | - clocks: Must include the CPU clock. See ../../clock/clock-bindings.txt for | ||
20 | details on clock bindings. | ||
21 | Example: | ||
22 | cpus { | ||
23 | #address-cells = <1>; | ||
24 | #size-cells = <0>; | ||
25 | |||
26 | cpu0: cpu@0 { | ||
27 | device_type = "cpu"; | ||
28 | compatible = "mti,interaptiv"; | ||
29 | reg = <0>; | ||
30 | clocks = <&clk_core CLK_MIPS>; | ||
31 | }; | ||
32 | }; | ||
33 | |||
34 | |||
35 | Boot protocol: | ||
36 | -------------- | ||
37 | In accordance with the MIPS UHI specification[1], the bootloader must pass the | ||
38 | following arguments to the kernel: | ||
39 | - $a0: -2. | ||
40 | - $a1: KSEG0 address of the flattened device-tree blob. | ||
41 | |||
42 | [1] http://prplfoundation.org/wiki/MIPS_documentation | ||
diff --git a/Documentation/devicetree/bindings/misc/smc.txt b/Documentation/devicetree/bindings/misc/brcm,kona-smc.txt index 6c9f176f3571..6c9f176f3571 100644 --- a/Documentation/devicetree/bindings/misc/smc.txt +++ b/Documentation/devicetree/bindings/misc/brcm,kona-smc.txt | |||
diff --git a/Documentation/devicetree/bindings/mmc/kona-sdhci.txt b/Documentation/devicetree/bindings/mmc/brcm,kona-sdhci.txt index aaba2483b4ff..aaba2483b4ff 100644 --- a/Documentation/devicetree/bindings/mmc/kona-sdhci.txt +++ b/Documentation/devicetree/bindings/mmc/brcm,kona-sdhci.txt | |||
diff --git a/Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt b/Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt new file mode 100644 index 000000000000..72cc9cc95880 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | Broadcom IPROC SDHCI controller | ||
2 | |||
3 | This file documents differences between the core properties described | ||
4 | by mmc.txt and the properties that represent the IPROC SDHCI controller. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible : Should be "brcm,sdhci-iproc-cygnus". | ||
8 | - clocks : The clock feeding the SDHCI controller. | ||
9 | |||
10 | Optional properties: | ||
11 | - sdhci,auto-cmd12: specifies that controller should use auto CMD12. | ||
12 | |||
13 | Example: | ||
14 | |||
15 | sdhci0: sdhci@0x18041000 { | ||
16 | compatible = "brcm,sdhci-iproc-cygnus"; | ||
17 | reg = <0x18041000 0x100>; | ||
18 | interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; | ||
19 | clocks = <&lcpll0_clks BCM_CYGNUS_LCPLL0_SDIO_CLK>; | ||
20 | bus-width = <4>; | ||
21 | sdhci,auto-cmd12; | ||
22 | no-1-8-v; | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt index ee4fc0576c7d..aad98442788b 100644 --- a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt +++ b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt | |||
@@ -36,6 +36,8 @@ Required Properties: | |||
36 | in transmit mode and CIU clock phase shift value in receive mode for double | 36 | in transmit mode and CIU clock phase shift value in receive mode for double |
37 | data rate mode operation. Refer notes below for the order of the cells and the | 37 | data rate mode operation. Refer notes below for the order of the cells and the |
38 | valid values. | 38 | valid values. |
39 | * samsung,dw-mshc-hs400-timing: Specifies the value of CIU TX and RX clock phase | ||
40 | shift value for hs400 mode operation. | ||
39 | 41 | ||
40 | Notes for the sdr-timing and ddr-timing values: | 42 | Notes for the sdr-timing and ddr-timing values: |
41 | 43 | ||
@@ -50,6 +52,9 @@ Required Properties: | |||
50 | - if CIU clock divider value is 0 (that is divide by 1), both tx and rx | 52 | - if CIU clock divider value is 0 (that is divide by 1), both tx and rx |
51 | phase shift clocks should be 0. | 53 | phase shift clocks should be 0. |
52 | 54 | ||
55 | * samsung,read-strobe-delay: RCLK (Data strobe) delay to control HS400 mode | ||
56 | (Latency value for delay line in Read path) | ||
57 | |||
53 | Required properties for a slot (Deprecated - Recommend to use one slot per host): | 58 | Required properties for a slot (Deprecated - Recommend to use one slot per host): |
54 | 59 | ||
55 | * gpios: specifies a list of gpios used for command, clock and data bus. The | 60 | * gpios: specifies a list of gpios used for command, clock and data bus. The |
@@ -82,5 +87,7 @@ Example: | |||
82 | samsung,dw-mshc-ciu-div = <3>; | 87 | samsung,dw-mshc-ciu-div = <3>; |
83 | samsung,dw-mshc-sdr-timing = <2 3>; | 88 | samsung,dw-mshc-sdr-timing = <2 3>; |
84 | samsung,dw-mshc-ddr-timing = <1 2>; | 89 | samsung,dw-mshc-ddr-timing = <1 2>; |
90 | samsung,dw-mshc-hs400-timing = <0 2>; | ||
91 | samsung,read-strobe-delay = <90>; | ||
85 | bus-width = <8>; | 92 | bus-width = <8>; |
86 | }; | 93 | }; |
diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt index 9046ba06c47a..415c5575cbf7 100644 --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt | |||
@@ -17,6 +17,10 @@ Optional properties: | |||
17 | to select a proper data sampling window in case the clock quality is not good | 17 | to select a proper data sampling window in case the clock quality is not good |
18 | due to signal path is too long on the board. Please refer to eSDHC/uSDHC | 18 | due to signal path is too long on the board. Please refer to eSDHC/uSDHC |
19 | chapter, DLL (Delay Line) section in RM for details. | 19 | chapter, DLL (Delay Line) section in RM for details. |
20 | - voltage-ranges : Specify the voltage range in case there are software | ||
21 | transparent level shifters on the outputs of the controller. Two cells are | ||
22 | required, first cell specifies minimum slot voltage (mV), second cell | ||
23 | specifies maximum slot voltage (mV). Several ranges could be specified. | ||
20 | 24 | ||
21 | Examples: | 25 | Examples: |
22 | 26 | ||
diff --git a/Documentation/devicetree/bindings/mmc/mmc-card.txt b/Documentation/devicetree/bindings/mmc/mmc-card.txt new file mode 100644 index 000000000000..a70fcd65b9ea --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/mmc-card.txt | |||
@@ -0,0 +1,31 @@ | |||
1 | mmc-card / eMMC bindings | ||
2 | ------------------------ | ||
3 | |||
4 | This documents describes the devicetree bindings for a mmc-host controller | ||
5 | child node describing a mmc-card / an eMMC, see "Use of Function subnodes" | ||
6 | in mmc.txt | ||
7 | |||
8 | Required properties: | ||
9 | -compatible : Must be "mmc-card" | ||
10 | -reg : Must be <0> | ||
11 | |||
12 | Optional properties: | ||
13 | -broken-hpi : Use this to indicate that the mmc-card has a broken hpi | ||
14 | implementation, and that hpi should not be used | ||
15 | |||
16 | Example: | ||
17 | |||
18 | &mmc2 { | ||
19 | pinctrl-names = "default"; | ||
20 | pinctrl-0 = <&mmc2_pins_a>; | ||
21 | vmmc-supply = <®_vcc3v3>; | ||
22 | bus-width = <8>; | ||
23 | non-removable; | ||
24 | status = "okay"; | ||
25 | |||
26 | mmccard: mmccard@0 { | ||
27 | reg = <0>; | ||
28 | compatible = "mmc-card"; | ||
29 | broken-hpi; | ||
30 | }; | ||
31 | }; | ||
diff --git a/Documentation/devicetree/bindings/mmc/sdhci-st.txt b/Documentation/devicetree/bindings/mmc/sdhci-st.txt index 7527db447a35..18d950df2749 100644 --- a/Documentation/devicetree/bindings/mmc/sdhci-st.txt +++ b/Documentation/devicetree/bindings/mmc/sdhci-st.txt | |||
@@ -5,20 +5,62 @@ Documentation/devicetree/bindings/mmc/mmc.txt and the properties | |||
5 | used by the sdhci-st driver. | 5 | used by the sdhci-st driver. |
6 | 6 | ||
7 | Required properties: | 7 | Required properties: |
8 | - compatible : Must be "st,sdhci" | 8 | - compatible: Must be "st,sdhci" and it can be compatible to "st,sdhci-stih407" |
9 | - clock-names : Should be "mmc" | 9 | to set the internal glue logic used for configuring the MMC |
10 | See: Documentation/devicetree/bindings/resource-names.txt | 10 | subsystem (mmcss) inside the FlashSS (available in STiH407 SoC |
11 | - clocks : Phandle of the clock used by the sdhci controler | 11 | family). |
12 | See: Documentation/devicetree/bindings/clock/clock-bindings.txt | 12 | |
13 | - clock-names: Should be "mmc". | ||
14 | See: Documentation/devicetree/bindings/resource-names.txt | ||
15 | - clocks: Phandle to the clock. | ||
16 | See: Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
17 | |||
18 | - interrupts: One mmc interrupt should be described here. | ||
19 | - interrupt-names: Should be "mmcirq". | ||
20 | |||
21 | - pinctrl-names: A pinctrl state names "default" must be defined. | ||
22 | - pinctrl-0: Phandle referencing pin configuration of the sd/emmc controller. | ||
23 | See: Documentation/devicetree/bindings/pinctrl/pinctrl-binding.txt | ||
24 | |||
25 | - reg: This must provide the host controller base address and it can also | ||
26 | contain the FlashSS Top register for TX/RX delay used by the driver | ||
27 | to configure DLL inside the flashSS, if so reg-names must also be | ||
28 | specified. | ||
13 | 29 | ||
14 | Optional properties: | 30 | Optional properties: |
15 | - non-removable: non-removable slot | 31 | - reg-names: Should be "mmc" and "top-mmc-delay". "top-mmc-delay" is optional |
16 | See: Documentation/devicetree/bindings/mmc/mmc.txt | 32 | for eMMC on stih407 family silicon to configure DLL inside FlashSS. |
17 | - bus-width: Number of data lines | 33 | |
18 | See: Documentation/devicetree/bindings/mmc/mmc.txt | 34 | - non-removable: Non-removable slot. Also used for configuring mmcss in STiH407 SoC |
35 | family. | ||
36 | See: Documentation/devicetree/bindings/mmc/mmc.txt. | ||
37 | |||
38 | - bus-width: Number of data lines. | ||
39 | See: Documentation/devicetree/bindings/mmc/mmc.txt. | ||
40 | |||
41 | - max-frequency: Can be 200MHz, 100Mz or 50MHz (default) and used for | ||
42 | configuring the CCONFIG3 in the mmcss. | ||
43 | See: Documentation/devicetree/bindings/mmc/mmc.txt. | ||
44 | |||
45 | - resets: Phandle and reset specifier pair to softreset line of HC IP. | ||
46 | See: Documentation/devicetree/bindings/reset/reset.txt | ||
47 | |||
48 | - vqmmc-supply: Phandle to the regulator dt node, mentioned as the vcc/vdd | ||
49 | supply in eMMC/SD specs. | ||
50 | |||
51 | - sd-uhs--sdr50: To enable the SDR50 in the mmcss. | ||
52 | See: Documentation/devicetree/bindings/mmc/mmc.txt. | ||
53 | |||
54 | - sd-uhs-sdr104: To enable the SDR104 in the mmcss. | ||
55 | See: Documentation/devicetree/bindings/mmc/mmc.txt. | ||
56 | |||
57 | - sd-uhs-ddr50: To enable the DDR50 in the mmcss. | ||
58 | See: Documentation/devicetree/bindings/mmc/mmc.txt. | ||
19 | 59 | ||
20 | Example: | 60 | Example: |
21 | 61 | ||
62 | /* Example stih416e eMMC configuration */ | ||
63 | |||
22 | mmc0: sdhci@fe81e000 { | 64 | mmc0: sdhci@fe81e000 { |
23 | compatible = "st,sdhci"; | 65 | compatible = "st,sdhci"; |
24 | status = "disabled"; | 66 | status = "disabled"; |
@@ -29,5 +71,43 @@ mmc0: sdhci@fe81e000 { | |||
29 | pinctrl-0 = <&pinctrl_mmc0>; | 71 | pinctrl-0 = <&pinctrl_mmc0>; |
30 | clock-names = "mmc"; | 72 | clock-names = "mmc"; |
31 | clocks = <&clk_s_a1_ls 1>; | 73 | clocks = <&clk_s_a1_ls 1>; |
32 | bus-width = <8> | 74 | bus-width = <8> |
75 | |||
76 | /* Example SD stih407 family configuration */ | ||
77 | |||
78 | mmc1: sdhci@09080000 { | ||
79 | compatible = "st,sdhci-stih407", "st,sdhci"; | ||
80 | status = "disabled"; | ||
81 | reg = <0x09080000 0x7ff>; | ||
82 | reg-names = "mmc"; | ||
83 | interrupts = <GIC_SPI 90 IRQ_TYPE_NONE>; | ||
84 | interrupt-names = "mmcirq"; | ||
85 | pinctrl-names = "default"; | ||
86 | pinctrl-0 = <&pinctrl_sd1>; | ||
87 | clock-names = "mmc"; | ||
88 | clocks = <&clk_s_c0_flexgen CLK_MMC_1>; | ||
89 | resets = <&softreset STIH407_MMC1_SOFTRESET>; | ||
90 | bus-width = <4>; | ||
91 | }; | ||
92 | |||
93 | /* Example eMMC stih407 family configuration */ | ||
94 | |||
95 | mmc0: sdhci@09060000 { | ||
96 | compatible = "st,sdhci-stih407", "st,sdhci"; | ||
97 | status = "disabled"; | ||
98 | reg = <0x09060000 0x7ff>, <0x9061008 0x20>; | ||
99 | reg-names = "mmc", "top-mmc-delay"; | ||
100 | interrupts = <GIC_SPI 92 IRQ_TYPE_NONE>; | ||
101 | interrupt-names = "mmcirq"; | ||
102 | pinctrl-names = "default"; | ||
103 | pinctrl-0 = <&pinctrl_mmc0>; | ||
104 | clock-names = "mmc"; | ||
105 | clocks = <&clk_s_c0_flexgen CLK_MMC_0>; | ||
106 | vqmmc-supply = <&vmmc_reg>; | ||
107 | max-frequency = <200000000>; | ||
108 | bus-width = <8>; | ||
109 | non-removable; | ||
110 | sd-uhs-sdr50; | ||
111 | sd-uhs-sdr104; | ||
112 | sd-uhs-ddr50; | ||
33 | }; | 113 | }; |
diff --git a/Documentation/devicetree/bindings/net/amd-xgbe-phy.txt b/Documentation/devicetree/bindings/net/amd-xgbe-phy.txt index 33df3932168e..8db32384a486 100644 --- a/Documentation/devicetree/bindings/net/amd-xgbe-phy.txt +++ b/Documentation/devicetree/bindings/net/amd-xgbe-phy.txt | |||
@@ -27,6 +27,8 @@ property is used. | |||
27 | - amd,serdes-cdr-rate: CDR rate speed selection | 27 | - amd,serdes-cdr-rate: CDR rate speed selection |
28 | - amd,serdes-pq-skew: PQ (data sampling) skew | 28 | - amd,serdes-pq-skew: PQ (data sampling) skew |
29 | - amd,serdes-tx-amp: TX amplitude boost | 29 | - amd,serdes-tx-amp: TX amplitude boost |
30 | - amd,serdes-dfe-tap-config: DFE taps available to run | ||
31 | - amd,serdes-dfe-tap-enable: DFE taps to enable | ||
30 | 32 | ||
31 | Example: | 33 | Example: |
32 | xgbe_phy@e1240800 { | 34 | xgbe_phy@e1240800 { |
@@ -41,4 +43,6 @@ Example: | |||
41 | amd,serdes-cdr-rate = <2>, <2>, <7>; | 43 | amd,serdes-cdr-rate = <2>, <2>, <7>; |
42 | amd,serdes-pq-skew = <10>, <10>, <30>; | 44 | amd,serdes-pq-skew = <10>, <10>, <30>; |
43 | amd,serdes-tx-amp = <15>, <15>, <10>; | 45 | amd,serdes-tx-amp = <15>, <15>, <10>; |
46 | amd,serdes-dfe-tap-config = <3>, <3>, <1>; | ||
47 | amd,serdes-dfe-tap-enable = <0>, <0>, <127>; | ||
44 | }; | 48 | }; |
diff --git a/Documentation/devicetree/bindings/net/apm-xgene-enet.txt b/Documentation/devicetree/bindings/net/apm-xgene-enet.txt index cfcc52705ed8..f55aa280d34f 100644 --- a/Documentation/devicetree/bindings/net/apm-xgene-enet.txt +++ b/Documentation/devicetree/bindings/net/apm-xgene-enet.txt | |||
@@ -4,14 +4,21 @@ Ethernet nodes are defined to describe on-chip ethernet interfaces in | |||
4 | APM X-Gene SoC. | 4 | APM X-Gene SoC. |
5 | 5 | ||
6 | Required properties for all the ethernet interfaces: | 6 | Required properties for all the ethernet interfaces: |
7 | - compatible: Should be "apm,xgene-enet" | 7 | - compatible: Should state binding information from the following list, |
8 | - "apm,xgene-enet": RGMII based 1G interface | ||
9 | - "apm,xgene1-sgenet": SGMII based 1G interface | ||
10 | - "apm,xgene1-xgenet": XFI based 10G interface | ||
8 | - reg: Address and length of the register set for the device. It contains the | 11 | - reg: Address and length of the register set for the device. It contains the |
9 | information of registers in the same order as described by reg-names | 12 | information of registers in the same order as described by reg-names |
10 | - reg-names: Should contain the register set names | 13 | - reg-names: Should contain the register set names |
11 | - "enet_csr": Ethernet control and status register address space | 14 | - "enet_csr": Ethernet control and status register address space |
12 | - "ring_csr": Descriptor ring control and status register address space | 15 | - "ring_csr": Descriptor ring control and status register address space |
13 | - "ring_cmd": Descriptor ring command register address space | 16 | - "ring_cmd": Descriptor ring command register address space |
14 | - interrupts: Ethernet main interrupt | 17 | - interrupts: Two interrupt specifiers can be specified. |
18 | - First is the Rx interrupt. This irq is mandatory. | ||
19 | - Second is the Tx completion interrupt. | ||
20 | This is supported only on SGMII based 1GbE and 10GbE interfaces. | ||
21 | - port-id: Port number (0 or 1) | ||
15 | - clocks: Reference to the clock entry. | 22 | - clocks: Reference to the clock entry. |
16 | - local-mac-address: MAC address assigned to this device | 23 | - local-mac-address: MAC address assigned to this device |
17 | - phy-connection-type: Interface type between ethernet device and PHY device | 24 | - phy-connection-type: Interface type between ethernet device and PHY device |
@@ -46,6 +53,7 @@ Example: | |||
46 | <0x0 0X10000000 0x0 0X200>; | 53 | <0x0 0X10000000 0x0 0X200>; |
47 | reg-names = "enet_csr", "ring_csr", "ring_cmd"; | 54 | reg-names = "enet_csr", "ring_csr", "ring_cmd"; |
48 | interrupts = <0x0 0x3c 0x4>; | 55 | interrupts = <0x0 0x3c 0x4>; |
56 | port-id = <0>; | ||
49 | clocks = <&menetclk 0>; | 57 | clocks = <&menetclk 0>; |
50 | local-mac-address = [00 01 73 00 00 01]; | 58 | local-mac-address = [00 01 73 00 00 01]; |
51 | phy-connection-type = "rgmii"; | 59 | phy-connection-type = "rgmii"; |
diff --git a/Documentation/devicetree/bindings/net/broadcom-sf2.txt b/Documentation/devicetree/bindings/net/brcm,bcm7445-switch-v4.0.txt index 30d487597ecb..30d487597ecb 100644 --- a/Documentation/devicetree/bindings/net/broadcom-sf2.txt +++ b/Documentation/devicetree/bindings/net/brcm,bcm7445-switch-v4.0.txt | |||
diff --git a/Documentation/devicetree/bindings/net/broadcom-bcmgenet.txt b/Documentation/devicetree/bindings/net/brcm,bcmgenet.txt index 451fef26b4df..451fef26b4df 100644 --- a/Documentation/devicetree/bindings/net/broadcom-bcmgenet.txt +++ b/Documentation/devicetree/bindings/net/brcm,bcmgenet.txt | |||
diff --git a/Documentation/devicetree/bindings/net/broadcom-systemport.txt b/Documentation/devicetree/bindings/net/brcm,systemport.txt index 877da34145b0..877da34145b0 100644 --- a/Documentation/devicetree/bindings/net/broadcom-systemport.txt +++ b/Documentation/devicetree/bindings/net/brcm,systemport.txt | |||
diff --git a/Documentation/devicetree/bindings/net/broadcom-mdio-unimac.txt b/Documentation/devicetree/bindings/net/brcm,unimac-mdio.txt index ab0bb4247d14..ab0bb4247d14 100644 --- a/Documentation/devicetree/bindings/net/broadcom-mdio-unimac.txt +++ b/Documentation/devicetree/bindings/net/brcm,unimac-mdio.txt | |||
diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.txt b/Documentation/devicetree/bindings/net/dsa/dsa.txt index e124847443f8..f0b4cd72411d 100644 --- a/Documentation/devicetree/bindings/net/dsa/dsa.txt +++ b/Documentation/devicetree/bindings/net/dsa/dsa.txt | |||
@@ -19,7 +19,9 @@ the parent DSA node. The maximum number of allowed child nodes is 4 | |||
19 | (DSA_MAX_SWITCHES). | 19 | (DSA_MAX_SWITCHES). |
20 | Each of these switch child nodes should have the following required properties: | 20 | Each of these switch child nodes should have the following required properties: |
21 | 21 | ||
22 | - reg : Describes the switch address on the MII bus | 22 | - reg : Contains two fields. The first one describes the |
23 | address on the MII bus. The second is the switch | ||
24 | number that must be unique in cascaded configurations | ||
23 | - #address-cells : Must be 1 | 25 | - #address-cells : Must be 1 |
24 | - #size-cells : Must be 0 | 26 | - #size-cells : Must be 0 |
25 | 27 | ||
diff --git a/Documentation/devicetree/bindings/net/ethernet.txt b/Documentation/devicetree/bindings/net/ethernet.txt index 3fc360523bc9..41b3f3f864e8 100644 --- a/Documentation/devicetree/bindings/net/ethernet.txt +++ b/Documentation/devicetree/bindings/net/ethernet.txt | |||
@@ -19,6 +19,12 @@ The following properties are common to the Ethernet controllers: | |||
19 | - phy: the same as "phy-handle" property, not recommended for new bindings. | 19 | - phy: the same as "phy-handle" property, not recommended for new bindings. |
20 | - phy-device: the same as "phy-handle" property, not recommended for new | 20 | - phy-device: the same as "phy-handle" property, not recommended for new |
21 | bindings. | 21 | bindings. |
22 | - rx-fifo-depth: the size of the controller's receive fifo in bytes. This | ||
23 | is used for components that can have configurable receive fifo sizes, | ||
24 | and is useful for determining certain configuration settings such as | ||
25 | flow control thresholds. | ||
26 | - tx-fifo-depth: the size of the controller's transmit fifo in bytes. This | ||
27 | is used for components that can have configurable fifo sizes. | ||
22 | 28 | ||
23 | Child nodes of the Ethernet controller are typically the individual PHY devices | 29 | Child nodes of the Ethernet controller are typically the individual PHY devices |
24 | connected via the MDIO bus (sometimes the MDIO bus controller is separate). | 30 | connected via the MDIO bus (sometimes the MDIO bus controller is separate). |
diff --git a/Documentation/devicetree/bindings/net/ieee802154/at86rf230.txt b/Documentation/devicetree/bindings/net/ieee802154/at86rf230.txt index d3bbdded4cbe..168f1be50912 100644 --- a/Documentation/devicetree/bindings/net/ieee802154/at86rf230.txt +++ b/Documentation/devicetree/bindings/net/ieee802154/at86rf230.txt | |||
@@ -6,11 +6,14 @@ Required properties: | |||
6 | - spi-max-frequency: maximal bus speed, should be set to 7500000 depends | 6 | - spi-max-frequency: maximal bus speed, should be set to 7500000 depends |
7 | sync or async operation mode | 7 | sync or async operation mode |
8 | - reg: the chipselect index | 8 | - reg: the chipselect index |
9 | - interrupts: the interrupt generated by the device | 9 | - interrupts: the interrupt generated by the device. Non high-level |
10 | can occur deadlocks while handling isr. | ||
10 | 11 | ||
11 | Optional properties: | 12 | Optional properties: |
12 | - reset-gpio: GPIO spec for the rstn pin | 13 | - reset-gpio: GPIO spec for the rstn pin |
13 | - sleep-gpio: GPIO spec for the slp_tr pin | 14 | - sleep-gpio: GPIO spec for the slp_tr pin |
15 | - xtal-trim: u8 value for fine tuning the internal capacitance | ||
16 | arrays of xtal pins: 0 = +0 pF, 0xf = +4.5 pF | ||
14 | 17 | ||
15 | Example: | 18 | Example: |
16 | 19 | ||
@@ -18,6 +21,7 @@ Example: | |||
18 | compatible = "atmel,at86rf231"; | 21 | compatible = "atmel,at86rf231"; |
19 | spi-max-frequency = <7500000>; | 22 | spi-max-frequency = <7500000>; |
20 | reg = <0>; | 23 | reg = <0>; |
21 | interrupts = <19 1>; | 24 | interrupts = <19 4>; |
22 | interrupt-parent = <&gpio3>; | 25 | interrupt-parent = <&gpio3>; |
26 | xtal-trim = /bits/ 8 <0x06>; | ||
23 | }; | 27 | }; |
diff --git a/Documentation/devicetree/bindings/net/ieee802154/cc2520.txt b/Documentation/devicetree/bindings/net/ieee802154/cc2520.txt index 0071883c08d8..fb6d49f184ed 100644 --- a/Documentation/devicetree/bindings/net/ieee802154/cc2520.txt +++ b/Documentation/devicetree/bindings/net/ieee802154/cc2520.txt | |||
@@ -13,11 +13,15 @@ Required properties: | |||
13 | - cca-gpio: GPIO spec for the CCA pin | 13 | - cca-gpio: GPIO spec for the CCA pin |
14 | - vreg-gpio: GPIO spec for the VREG pin | 14 | - vreg-gpio: GPIO spec for the VREG pin |
15 | - reset-gpio: GPIO spec for the RESET pin | 15 | - reset-gpio: GPIO spec for the RESET pin |
16 | Optional properties: | ||
17 | - amplified: include if the CC2520 is connected to a CC2591 amplifier | ||
18 | |||
16 | Example: | 19 | Example: |
17 | cc2520@0 { | 20 | cc2520@0 { |
18 | compatible = "ti,cc2520"; | 21 | compatible = "ti,cc2520"; |
19 | reg = <0>; | 22 | reg = <0>; |
20 | spi-max-frequency = <4000000>; | 23 | spi-max-frequency = <4000000>; |
24 | amplified; | ||
21 | pinctrl-names = "default"; | 25 | pinctrl-names = "default"; |
22 | pinctrl-0 = <&cc2520_cape_pins>; | 26 | pinctrl-0 = <&cc2520_cape_pins>; |
23 | fifo-gpio = <&gpio1 18 0>; | 27 | fifo-gpio = <&gpio1 18 0>; |
diff --git a/Documentation/devicetree/bindings/net/keystone-netcp.txt b/Documentation/devicetree/bindings/net/keystone-netcp.txt index f9c07710478d..d0e6fa38f335 100644 --- a/Documentation/devicetree/bindings/net/keystone-netcp.txt +++ b/Documentation/devicetree/bindings/net/keystone-netcp.txt | |||
@@ -49,6 +49,7 @@ Required properties: | |||
49 | - compatible: Should be "ti,netcp-1.0" | 49 | - compatible: Should be "ti,netcp-1.0" |
50 | - clocks: phandle to the reference clocks for the subsystem. | 50 | - clocks: phandle to the reference clocks for the subsystem. |
51 | - dma-id: Navigator packet dma instance id. | 51 | - dma-id: Navigator packet dma instance id. |
52 | - ranges: address range of NetCP (includes, Ethernet SS, PA and SA) | ||
52 | 53 | ||
53 | Optional properties: | 54 | Optional properties: |
54 | - reg: register location and the size for the following register | 55 | - reg: register location and the size for the following register |
@@ -64,10 +65,30 @@ NetCP device properties: Device specification for NetCP sub-modules. | |||
64 | 1Gb/10Gb (gbe/xgbe) ethernet switch sub-module specifications. | 65 | 1Gb/10Gb (gbe/xgbe) ethernet switch sub-module specifications. |
65 | Required properties: | 66 | Required properties: |
66 | - label: Must be "netcp-gbe" for 1Gb & "netcp-xgbe" for 10Gb. | 67 | - label: Must be "netcp-gbe" for 1Gb & "netcp-xgbe" for 10Gb. |
68 | - compatible: Must be one of below:- | ||
69 | "ti,netcp-gbe" for 1GbE on NetCP 1.4 | ||
70 | "ti,netcp-gbe-5" for 1GbE N NetCP 1.5 (N=5) | ||
71 | "ti,netcp-gbe-9" for 1GbE N NetCP 1.5 (N=9) | ||
72 | "ti,netcp-gbe-2" for 1GbE N NetCP 1.5 (N=2) | ||
73 | "ti,netcp-xgbe" for 10 GbE | ||
74 | |||
67 | - reg: register location and the size for the following register | 75 | - reg: register location and the size for the following register |
68 | regions in the specified order. | 76 | regions in the specified order. |
69 | - subsystem registers | 77 | - switch subsystem registers |
70 | - serdes registers | 78 | - sgmii port3/4 module registers (only for NetCP 1.4) |
79 | - switch module registers | ||
80 | - serdes registers (only for 10G) | ||
81 | |||
82 | NetCP 1.4 ethss, here is the order | ||
83 | index #0 - switch subsystem registers | ||
84 | index #1 - sgmii port3/4 module registers | ||
85 | index #2 - switch module registers | ||
86 | |||
87 | NetCP 1.5 ethss 9 port, 5 port and 2 port | ||
88 | index #0 - switch subsystem registers | ||
89 | index #1 - switch module registers | ||
90 | index #2 - serdes registers | ||
91 | |||
71 | - tx-channel: the navigator packet dma channel name for tx. | 92 | - tx-channel: the navigator packet dma channel name for tx. |
72 | - tx-queue: the navigator queue number associated with the tx dma channel. | 93 | - tx-queue: the navigator queue number associated with the tx dma channel. |
73 | - interfaces: specification for each of the switch port to be registered as a | 94 | - interfaces: specification for each of the switch port to be registered as a |
@@ -120,14 +141,13 @@ Optional properties: | |||
120 | 141 | ||
121 | Example binding: | 142 | Example binding: |
122 | 143 | ||
123 | netcp: netcp@2090000 { | 144 | netcp: netcp@2000000 { |
124 | reg = <0x2620110 0x8>; | 145 | reg = <0x2620110 0x8>; |
125 | reg-names = "efuse"; | 146 | reg-names = "efuse"; |
126 | compatible = "ti,netcp-1.0"; | 147 | compatible = "ti,netcp-1.0"; |
127 | #address-cells = <1>; | 148 | #address-cells = <1>; |
128 | #size-cells = <1>; | 149 | #size-cells = <1>; |
129 | ranges; | 150 | ranges = <0 0x2000000 0xfffff>; |
130 | |||
131 | clocks = <&papllclk>, <&clkcpgmac>, <&chipclk12>; | 151 | clocks = <&papllclk>, <&clkcpgmac>, <&chipclk12>; |
132 | dma-coherent; | 152 | dma-coherent; |
133 | /* big-endian; */ | 153 | /* big-endian; */ |
@@ -137,9 +157,9 @@ netcp: netcp@2090000 { | |||
137 | #address-cells = <1>; | 157 | #address-cells = <1>; |
138 | #size-cells = <1>; | 158 | #size-cells = <1>; |
139 | ranges; | 159 | ranges; |
140 | gbe@0x2090000 { | 160 | gbe@90000 { |
141 | label = "netcp-gbe"; | 161 | label = "netcp-gbe"; |
142 | reg = <0x2090000 0xf00>; | 162 | reg = <0x90000 0x300>, <0x90400 0x400>, <0x90800 0x700>; |
143 | /* enable-ale; */ | 163 | /* enable-ale; */ |
144 | tx-queue = <648>; | 164 | tx-queue = <648>; |
145 | tx-channel = <8>; | 165 | tx-channel = <8>; |
diff --git a/Documentation/devicetree/bindings/net/macb.txt b/Documentation/devicetree/bindings/net/macb.txt index aaa696414f57..ba19d671e808 100644 --- a/Documentation/devicetree/bindings/net/macb.txt +++ b/Documentation/devicetree/bindings/net/macb.txt | |||
@@ -2,10 +2,13 @@ | |||
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: Should be "cdns,[<chip>-]{macb|gem}" | 4 | - compatible: Should be "cdns,[<chip>-]{macb|gem}" |
5 | Use "cdns,at91sam9260-macb" Atmel at91sam9260 and at91sam9263 SoCs. | 5 | Use "cdns,at91sam9260-macb" for Atmel at91sam9 SoCs or the 10/100Mbit IP |
6 | available on sama5d3 SoCs. | ||
6 | Use "cdns,at32ap7000-macb" for other 10/100 usage or use the generic form: "cdns,macb". | 7 | Use "cdns,at32ap7000-macb" for other 10/100 usage or use the generic form: "cdns,macb". |
7 | Use "cdns,pc302-gem" for Picochip picoXcell pc302 and later devices based on | 8 | Use "cdns,pc302-gem" for Picochip picoXcell pc302 and later devices based on |
8 | the Cadence GEM, or the generic form: "cdns,gem". | 9 | the Cadence GEM, or the generic form: "cdns,gem". |
10 | Use "cdns,sama5d3-gem" for the Gigabit IP available on Atmel sama5d3 SoCs. | ||
11 | Use "cdns,sama5d4-gem" for the Gigabit IP available on Atmel sama5d4 SoCs. | ||
9 | - reg: Address and length of the register set for the device | 12 | - reg: Address and length of the register set for the device |
10 | - interrupts: Should contain macb interrupt | 13 | - interrupts: Should contain macb interrupt |
11 | - phy-mode: See ethernet.txt file in the same directory. | 14 | - phy-mode: See ethernet.txt file in the same directory. |
diff --git a/Documentation/devicetree/bindings/net/nfc/nxp-nci.txt b/Documentation/devicetree/bindings/net/nfc/nxp-nci.txt new file mode 100644 index 000000000000..5b6cd9b3f628 --- /dev/null +++ b/Documentation/devicetree/bindings/net/nfc/nxp-nci.txt | |||
@@ -0,0 +1,35 @@ | |||
1 | * NXP Semiconductors NXP NCI NFC Controllers | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "nxp,nxp-nci-i2c". | ||
5 | - clock-frequency: I²C work frequency. | ||
6 | - reg: address on the bus | ||
7 | - interrupt-parent: phandle for the interrupt gpio controller | ||
8 | - interrupts: GPIO interrupt to which the chip is connected | ||
9 | - enable-gpios: Output GPIO pin used for enabling/disabling the chip | ||
10 | - firmware-gpios: Output GPIO pin used to enter firmware download mode | ||
11 | |||
12 | Optional SoC Specific Properties: | ||
13 | - pinctrl-names: Contains only one value - "default". | ||
14 | - pintctrl-0: Specifies the pin control groups used for this controller. | ||
15 | |||
16 | Example (for ARM-based BeagleBone with NPC100 NFC controller on I2C2): | ||
17 | |||
18 | &i2c2 { | ||
19 | |||
20 | status = "okay"; | ||
21 | |||
22 | npc100: npc100@29 { | ||
23 | |||
24 | compatible = "nxp,nxp-nci-i2c"; | ||
25 | |||
26 | reg = <0x29>; | ||
27 | clock-frequency = <100000>; | ||
28 | |||
29 | interrupt-parent = <&gpio1>; | ||
30 | interrupts = <29 GPIO_ACTIVE_HIGH>; | ||
31 | |||
32 | enable-gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>; | ||
33 | firmware-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>; | ||
34 | }; | ||
35 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/stmmac.txt b/Documentation/devicetree/bindings/net/stmmac.txt index 8ca65cec52ae..f34fc3c81a75 100644 --- a/Documentation/devicetree/bindings/net/stmmac.txt +++ b/Documentation/devicetree/bindings/net/stmmac.txt | |||
@@ -35,15 +35,18 @@ Optional properties: | |||
35 | - reset-names: Should contain the reset signal name "stmmaceth", if a | 35 | - reset-names: Should contain the reset signal name "stmmaceth", if a |
36 | reset phandle is given | 36 | reset phandle is given |
37 | - max-frame-size: See ethernet.txt file in the same directory | 37 | - max-frame-size: See ethernet.txt file in the same directory |
38 | - clocks: If present, the first clock should be the GMAC main clock, | 38 | - clocks: If present, the first clock should be the GMAC main clock and |
39 | further clocks may be specified in derived bindings. | 39 | the second clock should be peripheral's register interface clock. Further |
40 | clocks may be specified in derived bindings. | ||
40 | - clock-names: One name for each entry in the clocks property, the | 41 | - clock-names: One name for each entry in the clocks property, the |
41 | first one should be "stmmaceth". | 42 | first one should be "stmmaceth" and the second one should be "pclk". |
42 | - clk_ptp_ref: this is the PTP reference clock; in case of the PTP is | 43 | - clk_ptp_ref: this is the PTP reference clock; in case of the PTP is |
43 | available this clock is used for programming the Timestamp Addend Register. | 44 | available this clock is used for programming the Timestamp Addend Register. |
44 | If not passed then the system clock will be used and this is fine on some | 45 | If not passed then the system clock will be used and this is fine on some |
45 | platforms. | 46 | platforms. |
46 | - snps,burst_len: The AXI burst lenth value of the AXI BUS MODE register. | 47 | - snps,burst_len: The AXI burst lenth value of the AXI BUS MODE register. |
48 | - tx-fifo-depth: See ethernet.txt file in the same directory | ||
49 | - rx-fifo-depth: See ethernet.txt file in the same directory | ||
47 | 50 | ||
48 | Examples: | 51 | Examples: |
49 | 52 | ||
@@ -58,6 +61,8 @@ Examples: | |||
58 | phy-mode = "gmii"; | 61 | phy-mode = "gmii"; |
59 | snps,multicast-filter-bins = <256>; | 62 | snps,multicast-filter-bins = <256>; |
60 | snps,perfect-filter-entries = <128>; | 63 | snps,perfect-filter-entries = <128>; |
64 | rx-fifo-depth = <16384>; | ||
65 | tx-fifo-depth = <16384>; | ||
61 | clocks = <&clock>; | 66 | clocks = <&clock>; |
62 | clock-names = "stmmaceth"; | 67 | clock-names = "stmmaceth"; |
63 | }; | 68 | }; |
diff --git a/Documentation/devicetree/bindings/panel/ampire,am800480r3tmqwa1h.txt b/Documentation/devicetree/bindings/panel/ampire,am800480r3tmqwa1h.txt new file mode 100644 index 000000000000..83e2cae1cc1b --- /dev/null +++ b/Documentation/devicetree/bindings/panel/ampire,am800480r3tmqwa1h.txt | |||
@@ -0,0 +1,7 @@ | |||
1 | Ampire AM-800480R3TMQW-A1H 7.0" WVGA TFT LCD panel | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "ampire,am800480r3tmqwa1h" | ||
5 | |||
6 | This binding is compatible with the simple-panel binding, which is specified | ||
7 | in simple-panel.txt in this directory. | ||
diff --git a/Documentation/devicetree/bindings/panel/auo,b101ean01.txt b/Documentation/devicetree/bindings/panel/auo,b101ean01.txt new file mode 100644 index 000000000000..3590b0741619 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/auo,b101ean01.txt | |||
@@ -0,0 +1,7 @@ | |||
1 | AU Optronics Corporation 10.1" WSVGA TFT LCD panel | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "auo,b101ean01" | ||
5 | |||
6 | This binding is compatible with the simple-panel binding, which is specified | ||
7 | in simple-panel.txt in this directory. | ||
diff --git a/Documentation/devicetree/bindings/panel/innolux,at043tn24.txt b/Documentation/devicetree/bindings/panel/innolux,at043tn24.txt new file mode 100644 index 000000000000..4104226b61bc --- /dev/null +++ b/Documentation/devicetree/bindings/panel/innolux,at043tn24.txt | |||
@@ -0,0 +1,7 @@ | |||
1 | Innolux AT043TN24 4.3" WQVGA TFT LCD panel | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "innolux,at043tn24" | ||
5 | |||
6 | This binding is compatible with the simple-panel binding, which is specified | ||
7 | in simple-panel.txt in this directory. | ||
diff --git a/Documentation/devicetree/bindings/panel/innolux,zj070na-01p.txt b/Documentation/devicetree/bindings/panel/innolux,zj070na-01p.txt new file mode 100644 index 000000000000..824f87f1526d --- /dev/null +++ b/Documentation/devicetree/bindings/panel/innolux,zj070na-01p.txt | |||
@@ -0,0 +1,7 @@ | |||
1 | Innolux Corporation 7.0" WSVGA (1024x600) TFT LCD panel | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "innolux,zj070na-01p" | ||
5 | |||
6 | This binding is compatible with the simple-panel binding, which is specified | ||
7 | in simple-panel.txt in this directory. | ||
diff --git a/Documentation/devicetree/bindings/panel/ortustech,com43h4m85ulc.txt b/Documentation/devicetree/bindings/panel/ortustech,com43h4m85ulc.txt new file mode 100644 index 000000000000..de19e9398618 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/ortustech,com43h4m85ulc.txt | |||
@@ -0,0 +1,7 @@ | |||
1 | OrtusTech COM43H4M85ULC Blanview 3.7" TFT-LCD panel | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "ortustech,com43h4m85ulc" | ||
5 | |||
6 | This binding is compatible with the simple-panel binding, which is specified | ||
7 | in simple-panel.txt in this directory. | ||
diff --git a/Documentation/devicetree/bindings/panel/samsung,ltn140at29-301.txt b/Documentation/devicetree/bindings/panel/samsung,ltn140at29-301.txt new file mode 100644 index 000000000000..e7f969d891cc --- /dev/null +++ b/Documentation/devicetree/bindings/panel/samsung,ltn140at29-301.txt | |||
@@ -0,0 +1,7 @@ | |||
1 | Samsung Electronics 14" WXGA (1366x768) TFT LCD panel | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "samsung,ltn140at29-301" | ||
5 | |||
6 | This binding is compatible with the simple-panel binding, which is specified | ||
7 | in simple-panel.txt in this directory. | ||
diff --git a/Documentation/devicetree/bindings/panel/shelly,sca07010-bfn-lnn.txt b/Documentation/devicetree/bindings/panel/shelly,sca07010-bfn-lnn.txt new file mode 100644 index 000000000000..fc1ea9e26c94 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/shelly,sca07010-bfn-lnn.txt | |||
@@ -0,0 +1,7 @@ | |||
1 | Shelly SCA07010-BFN-LNN 7.0" WVGA TFT LCD panel | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "shelly,sca07010-bfn-lnn" | ||
5 | |||
6 | This binding is compatible with the simple-panel binding, which is specified | ||
7 | in simple-panel.txt in this directory. | ||
diff --git a/Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt b/Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt new file mode 100644 index 000000000000..f7ce50e38ed4 --- /dev/null +++ b/Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt | |||
@@ -0,0 +1,63 @@ | |||
1 | * Broadcom iProc PCIe controller with the platform bus interface | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Must be "brcm,iproc-pcie" | ||
5 | - reg: base address and length of the PCIe controller I/O register space | ||
6 | - #interrupt-cells: set to <1> | ||
7 | - interrupt-map-mask and interrupt-map, standard PCI properties to define the | ||
8 | mapping of the PCIe interface to interrupt numbers | ||
9 | - linux,pci-domain: PCI domain ID. Should be unique for each host controller | ||
10 | - bus-range: PCI bus numbers covered | ||
11 | - #address-cells: set to <3> | ||
12 | - #size-cells: set to <2> | ||
13 | - device_type: set to "pci" | ||
14 | - ranges: ranges for the PCI memory and I/O regions | ||
15 | |||
16 | Optional properties: | ||
17 | - phys: phandle of the PCIe PHY device | ||
18 | - phy-names: must be "pcie-phy" | ||
19 | |||
20 | Example: | ||
21 | pcie0: pcie@18012000 { | ||
22 | compatible = "brcm,iproc-pcie"; | ||
23 | reg = <0x18012000 0x1000>; | ||
24 | |||
25 | #interrupt-cells = <1>; | ||
26 | interrupt-map-mask = <0 0 0 0>; | ||
27 | interrupt-map = <0 0 0 0 &gic GIC_SPI 100 IRQ_TYPE_NONE>; | ||
28 | |||
29 | linux,pci-domain = <0>; | ||
30 | |||
31 | bus-range = <0x00 0xff>; | ||
32 | |||
33 | #address-cells = <3>; | ||
34 | #size-cells = <2>; | ||
35 | device_type = "pci"; | ||
36 | ranges = <0x81000000 0 0 0x28000000 0 0x00010000 | ||
37 | 0x82000000 0 0x20000000 0x20000000 0 0x04000000>; | ||
38 | |||
39 | phys = <&phy 0 5>; | ||
40 | phy-names = "pcie-phy"; | ||
41 | }; | ||
42 | |||
43 | pcie1: pcie@18013000 { | ||
44 | compatible = "brcm,iproc-pcie"; | ||
45 | reg = <0x18013000 0x1000>; | ||
46 | |||
47 | #interrupt-cells = <1>; | ||
48 | interrupt-map-mask = <0 0 0 0>; | ||
49 | interrupt-map = <0 0 0 0 &gic GIC_SPI 106 IRQ_TYPE_NONE>; | ||
50 | |||
51 | linux,pci-domain = <1>; | ||
52 | |||
53 | bus-range = <0x00 0xff>; | ||
54 | |||
55 | #address-cells = <3>; | ||
56 | #size-cells = <2>; | ||
57 | device_type = "pci"; | ||
58 | ranges = <0x81000000 0 0 0x48000000 0 0x00010000 | ||
59 | 0x82000000 0 0x40000000 0x40000000 0 0x04000000>; | ||
60 | |||
61 | phys = <&phy 1 6>; | ||
62 | phy-names = "pcie-phy"; | ||
63 | }; | ||
diff --git a/Documentation/devicetree/bindings/phy/bcm-phy.txt b/Documentation/devicetree/bindings/phy/brcm,kona-usb2-phy.txt index 3dc8b3d2ffbb..3dc8b3d2ffbb 100644 --- a/Documentation/devicetree/bindings/phy/bcm-phy.txt +++ b/Documentation/devicetree/bindings/phy/brcm,kona-usb2-phy.txt | |||
diff --git a/Documentation/devicetree/bindings/phy/dm816x-phy.txt b/Documentation/devicetree/bindings/phy/dm816x-phy.txt new file mode 100644 index 000000000000..2fe3d11d063d --- /dev/null +++ b/Documentation/devicetree/bindings/phy/dm816x-phy.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | Device tree binding documentation for am816x USB PHY | ||
2 | ========================= | ||
3 | |||
4 | Required properties: | ||
5 | - compatible : should be "ti,dm816x-usb-phy" | ||
6 | - reg : offset and length of the PHY register set. | ||
7 | - reg-names : name for the phy registers | ||
8 | - clocks : phandle to the clock | ||
9 | - clock-names : name of the clock | ||
10 | - syscon: phandle for the syscon node to access misc registers | ||
11 | - #phy-cells : from the generic PHY bindings, must be 1 | ||
12 | - syscon: phandle for the syscon node to access misc registers | ||
13 | |||
14 | Example: | ||
15 | |||
16 | usb_phy0: usb-phy@20 { | ||
17 | compatible = "ti,dm8168-usb-phy"; | ||
18 | reg = <0x20 0x8>; | ||
19 | reg-names = "phy"; | ||
20 | clocks = <&main_fapll 6>; | ||
21 | clock-names = "refclk"; | ||
22 | #phy-cells = <0>; | ||
23 | syscon = <&scm_conf>; | ||
24 | }; | ||
diff --git a/Documentation/devicetree/bindings/phy/phy-miphy365x.txt b/Documentation/devicetree/bindings/phy/phy-miphy365x.txt index 9802d5d911aa..8772900e056a 100644 --- a/Documentation/devicetree/bindings/phy/phy-miphy365x.txt +++ b/Documentation/devicetree/bindings/phy/phy-miphy365x.txt | |||
@@ -20,8 +20,8 @@ Required nodes : A sub-node is required for each channel the controller | |||
20 | Required properties (port (child) node): | 20 | Required properties (port (child) node): |
21 | - #phy-cells : Should be 1 (See second example) | 21 | - #phy-cells : Should be 1 (See second example) |
22 | Cell after port phandle is device type from: | 22 | Cell after port phandle is device type from: |
23 | - MIPHY_TYPE_SATA | 23 | - PHY_TYPE_SATA |
24 | - MIPHY_TYPE_PCI | 24 | - PHY_TYPE_PCI |
25 | - reg : Address and length of register sets for each device in | 25 | - reg : Address and length of register sets for each device in |
26 | "reg-names" | 26 | "reg-names" |
27 | - reg-names : The names of the register addresses corresponding to the | 27 | - reg-names : The names of the register addresses corresponding to the |
@@ -68,10 +68,10 @@ property, containing a phandle to the phy port node and a device type. | |||
68 | 68 | ||
69 | Example: | 69 | Example: |
70 | 70 | ||
71 | #include <dt-bindings/phy/phy-miphy365x.h> | 71 | #include <dt-bindings/phy/phy.h> |
72 | 72 | ||
73 | sata0: sata@fe380000 { | 73 | sata0: sata@fe380000 { |
74 | ... | 74 | ... |
75 | phys = <&phy_port0 MIPHY_TYPE_SATA>; | 75 | phys = <&phy_port0 PHY_TYPE_SATA>; |
76 | ... | 76 | ... |
77 | }; | 77 | }; |
diff --git a/Documentation/devicetree/bindings/phy/samsung-phy.txt b/Documentation/devicetree/bindings/phy/samsung-phy.txt index 91e38cfe1f8f..60c6f2a633e0 100644 --- a/Documentation/devicetree/bindings/phy/samsung-phy.txt +++ b/Documentation/devicetree/bindings/phy/samsung-phy.txt | |||
@@ -128,6 +128,7 @@ Required properties: | |||
128 | - compatible : Should be set to one of the following supported values: | 128 | - compatible : Should be set to one of the following supported values: |
129 | - "samsung,exynos5250-usbdrd-phy" - for exynos5250 SoC, | 129 | - "samsung,exynos5250-usbdrd-phy" - for exynos5250 SoC, |
130 | - "samsung,exynos5420-usbdrd-phy" - for exynos5420 SoC. | 130 | - "samsung,exynos5420-usbdrd-phy" - for exynos5420 SoC. |
131 | - "samsung,exynos5433-usbdrd-phy" - for exynos5433 SoC. | ||
131 | - "samsung,exynos7-usbdrd-phy" - for exynos7 SoC. | 132 | - "samsung,exynos7-usbdrd-phy" - for exynos7 SoC. |
132 | - reg : Register offset and length of USB DRD PHY register set; | 133 | - reg : Register offset and length of USB DRD PHY register set; |
133 | - clocks: Clock IDs array as required by the controller | 134 | - clocks: Clock IDs array as required by the controller |
@@ -139,7 +140,7 @@ Required properties: | |||
139 | PHY operations, associated by phy name. It is used to | 140 | PHY operations, associated by phy name. It is used to |
140 | determine bit values for clock settings register. | 141 | determine bit values for clock settings register. |
141 | For Exynos5420 this is given as 'sclk_usbphy30' in CMU. | 142 | For Exynos5420 this is given as 'sclk_usbphy30' in CMU. |
142 | - optional clocks: Exynos7 SoC has now following additional | 143 | - optional clocks: Exynos5433 & Exynos7 SoC has now following additional |
143 | gate clocks available: | 144 | gate clocks available: |
144 | - phy_pipe: for PIPE3 phy | 145 | - phy_pipe: for PIPE3 phy |
145 | - phy_utmi: for UTMI+ phy | 146 | - phy_utmi: for UTMI+ phy |
diff --git a/Documentation/devicetree/bindings/phy/sun9i-usb-phy.txt b/Documentation/devicetree/bindings/phy/sun9i-usb-phy.txt new file mode 100644 index 000000000000..1cca85c709d1 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/sun9i-usb-phy.txt | |||
@@ -0,0 +1,38 @@ | |||
1 | Allwinner sun9i USB PHY | ||
2 | ----------------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible : should be one of | ||
6 | * allwinner,sun9i-a80-usb-phy | ||
7 | - reg : a list of offset + length pairs | ||
8 | - #phy-cells : from the generic phy bindings, must be 0 | ||
9 | - phy_type : "hsic" for HSIC usage; | ||
10 | other values or absence of this property indicates normal USB | ||
11 | - clocks : phandle + clock specifier for the phy clocks | ||
12 | - clock-names : depending on the "phy_type" property, | ||
13 | * "phy" for normal USB | ||
14 | * "hsic_480M", "hsic_12M" for HSIC | ||
15 | - resets : a list of phandle + reset specifier pairs | ||
16 | - reset-names : depending on the "phy_type" property, | ||
17 | * "phy" for normal USB | ||
18 | * "hsic" for HSIC | ||
19 | |||
20 | Optional Properties: | ||
21 | - phy-supply : from the generic phy bindings, a phandle to a regulator that | ||
22 | provides power to VBUS. | ||
23 | |||
24 | It is recommended to list all clocks and resets available. | ||
25 | The driver will only use those matching the phy_type. | ||
26 | |||
27 | Example: | ||
28 | usbphy1: phy@00a01800 { | ||
29 | compatible = "allwinner,sun9i-a80-usb-phy"; | ||
30 | reg = <0x00a01800 0x4>; | ||
31 | clocks = <&usb_phy_clk 2>, <&usb_phy_clk 10>, | ||
32 | <&usb_phy_clk 3>; | ||
33 | clock-names = "hsic_480M", "hsic_12M", "phy"; | ||
34 | resets = <&usb_phy_clk 18>, <&usb_phy_clk 19>; | ||
35 | reset-names = "hsic", "phy"; | ||
36 | status = "disabled"; | ||
37 | #phy-cells = <0>; | ||
38 | }; | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-gpio.txt b/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-gpio.txt new file mode 100644 index 000000000000..6540ca56be5e --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-gpio.txt | |||
@@ -0,0 +1,98 @@ | |||
1 | Broadcom Cygnus GPIO/PINCONF Controller | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible: | ||
6 | Must be "brcm,cygnus-ccm-gpio", "brcm,cygnus-asiu-gpio", or | ||
7 | "brcm,cygnus-crmu-gpio" | ||
8 | |||
9 | - reg: | ||
10 | Define the base and range of the I/O address space that contains the Cygnus | ||
11 | GPIO/PINCONF controller registers | ||
12 | |||
13 | - #gpio-cells: | ||
14 | Must be two. The first cell is the GPIO pin number (within the | ||
15 | controller's pin space) and the second cell is used for the following: | ||
16 | bit[0]: polarity (0 for active high and 1 for active low) | ||
17 | |||
18 | - gpio-controller: | ||
19 | Specifies that the node is a GPIO controller | ||
20 | |||
21 | Optional properties: | ||
22 | |||
23 | - interrupts: | ||
24 | Interrupt ID | ||
25 | |||
26 | - interrupt-controller: | ||
27 | Specifies that the node is an interrupt controller | ||
28 | |||
29 | - pinmux: | ||
30 | Specifies the phandle to the IOMUX device, where pins can be individually | ||
31 | muxed to GPIO | ||
32 | |||
33 | Supported generic PINCONF properties in child nodes: | ||
34 | |||
35 | - pins: | ||
36 | The list of pins (within the controller's own pin space) that properties | ||
37 | in the node apply to. Pin names are "gpio-<pin>" | ||
38 | |||
39 | - bias-disable: | ||
40 | Disable pin bias | ||
41 | |||
42 | - bias-pull-up: | ||
43 | Enable internal pull up resistor | ||
44 | |||
45 | - bias-pull-down: | ||
46 | Enable internal pull down resistor | ||
47 | |||
48 | - drive-strength: | ||
49 | Valid drive strength values include 2, 4, 6, 8, 10, 12, 14, 16 (mA) | ||
50 | |||
51 | Example: | ||
52 | gpio_ccm: gpio@1800a000 { | ||
53 | compatible = "brcm,cygnus-ccm-gpio"; | ||
54 | reg = <0x1800a000 0x50>, | ||
55 | <0x0301d164 0x20>; | ||
56 | #gpio-cells = <2>; | ||
57 | gpio-controller; | ||
58 | interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>; | ||
59 | interrupt-controller; | ||
60 | |||
61 | touch_pins: touch_pins { | ||
62 | pwr: pwr { | ||
63 | pins = "gpio-0"; | ||
64 | drive-strength = <16>; | ||
65 | }; | ||
66 | |||
67 | event: event { | ||
68 | pins = "gpio-1"; | ||
69 | bias-pull-up; | ||
70 | }; | ||
71 | }; | ||
72 | }; | ||
73 | |||
74 | gpio_asiu: gpio@180a5000 { | ||
75 | compatible = "brcm,cygnus-asiu-gpio"; | ||
76 | reg = <0x180a5000 0x668>; | ||
77 | #gpio-cells = <2>; | ||
78 | gpio-controller; | ||
79 | interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>; | ||
80 | interrupt-controller; | ||
81 | }; | ||
82 | |||
83 | /* | ||
84 | * Touchscreen that uses the CCM GPIO 0 and 1 | ||
85 | */ | ||
86 | tsc { | ||
87 | ... | ||
88 | ... | ||
89 | gpio-pwr = <&gpio_ccm 0 0>; | ||
90 | gpio-event = <&gpio_ccm 1 0>; | ||
91 | }; | ||
92 | |||
93 | /* Bluetooth that uses the ASIU GPIO 5, with polarity inverted */ | ||
94 | bluetooth { | ||
95 | ... | ||
96 | ... | ||
97 | bcm,rfkill-bank-sel = <&gpio_asiu 5 1> | ||
98 | } | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-pinmux.txt b/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-pinmux.txt new file mode 100644 index 000000000000..3600d5c6c4d7 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-pinmux.txt | |||
@@ -0,0 +1,132 @@ | |||
1 | Broadcom Cygnus IOMUX Controller | ||
2 | |||
3 | The Cygnus IOMUX controller supports group based mux configuration. In | ||
4 | addition, certain pins can be muxed to GPIO function individually. | ||
5 | |||
6 | Required properties: | ||
7 | |||
8 | - compatible: | ||
9 | Must be "brcm,cygnus-pinmux" | ||
10 | |||
11 | - reg: | ||
12 | Define the base and range of the I/O address space that contains the Cygnus | ||
13 | IOMUX registers | ||
14 | |||
15 | Properties in subnodes: | ||
16 | |||
17 | - function: | ||
18 | The mux function to select | ||
19 | |||
20 | - groups: | ||
21 | The list of groups to select with a given function | ||
22 | |||
23 | For more details, refer to | ||
24 | Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt | ||
25 | |||
26 | For example: | ||
27 | |||
28 | pinmux: pinmux@0x0301d0c8 { | ||
29 | compatible = "brcm,cygnus-pinmux"; | ||
30 | reg = <0x0301d0c8 0x1b0>; | ||
31 | |||
32 | pinctrl-names = "default"; | ||
33 | pinctrl-0 = <&i2s0_default>; | ||
34 | |||
35 | i2s0_default: i2s0_default { | ||
36 | mux { | ||
37 | function = "i2s0"; | ||
38 | groups = "i2s0_0_grp", "i2s0_1_grp"; | ||
39 | }; | ||
40 | }; | ||
41 | }; | ||
42 | |||
43 | List of supported functions and groups in Cygnus: | ||
44 | |||
45 | "i2s0": "i2s0_0_grp", "i2s0_1_grp" | ||
46 | |||
47 | "i2s1": "i2s1_0_grp", "i2s1_1_grp" | ||
48 | |||
49 | "i2s2": "i2s2_0_grp", "i2s2_1_grp", "i2s2_2_grp", "i2s2_3_grp", "i2s2_4_grp" | ||
50 | |||
51 | "spdif": "spdif_grp" | ||
52 | |||
53 | "pwm0": "pwm0_grp" | ||
54 | |||
55 | "pwm1": "pwm1_grp" | ||
56 | |||
57 | "pwm2": "pwm2_grp" | ||
58 | |||
59 | "pwm3": "pwm3_grp" | ||
60 | |||
61 | "pwm4": "pwm4_grp" | ||
62 | |||
63 | "pwm5": "pwm5_grp" | ||
64 | |||
65 | "key": "key0_grp", "key1_grp", "key2_grp", "key3_grp", "key4_grp", "key5_grp", | ||
66 | "key6_grp", "key7_grp", "key8_grp", "key9_grp", "key10_grp", "key11_grp", | ||
67 | "key12_grp", "key13_grp", "key14_grp", "key15_grp" | ||
68 | |||
69 | "audio_dte": "audio_dte0_grp", "audio_dte1_grp", "audio_dte2_grp", "audio_dte3_grp" | ||
70 | |||
71 | "smart_card0": "smart_card0_grp", "smart_card0_fcb_grp" | ||
72 | |||
73 | "smart_card1": "smart_card1_grp", "smart_card1_fcb_grp" | ||
74 | |||
75 | "spi0": "spi0_grp" | ||
76 | |||
77 | "spi1": "spi1_grp" | ||
78 | |||
79 | "spi2": "spi2_grp" | ||
80 | |||
81 | "spi3": "spi3_grp" | ||
82 | |||
83 | "spi4": "spi4_0_grp", "spi4_1_grp" | ||
84 | |||
85 | "spi5": "spi5_grp" | ||
86 | |||
87 | "sw_led0": "sw_led0_0_grp", "sw_led0_1_grp" | ||
88 | |||
89 | "sw_led1": "sw_led1_grp" | ||
90 | |||
91 | "sw_led2": "sw_led2_0_grp", "sw_led2_1_grp" | ||
92 | |||
93 | "d1w": "d1w_grp" | ||
94 | |||
95 | "lcd": "lcd_grp" | ||
96 | |||
97 | "sram": "sram_0_grp", "sram_1_grp" | ||
98 | |||
99 | "uart0": "uart0_grp" | ||
100 | |||
101 | "uart1": "uart1_grp", "uart1_dte_grp" | ||
102 | |||
103 | "uart2": "uart2_grp" | ||
104 | |||
105 | "uart3": "uart3_grp" | ||
106 | |||
107 | "uart4": "uart4_grp" | ||
108 | |||
109 | "qspi": "qspi_0_grp", "qspi_1_grp" | ||
110 | |||
111 | "nand": "nand_grp" | ||
112 | |||
113 | "sdio0": "sdio0_grp", "sdio0_cd_grp", "sdio0_mmc_grp" | ||
114 | |||
115 | "sdio1": "sdio1_data_0_grp", "sdio1_data_1_grp", "sdio1_cd_grp", | ||
116 | "sdio1_led_grp", "sdio1_mmc_grp" | ||
117 | |||
118 | "can0": "can0_grp" | ||
119 | |||
120 | "can1": "can1_grp" | ||
121 | |||
122 | "cam": "cam_led_grp", "cam_0_grp", "cam_1_grp" | ||
123 | |||
124 | "bsc1": "bsc1_grp" | ||
125 | |||
126 | "pcie_clkreq": "pcie_clkreq_grp" | ||
127 | |||
128 | "usb0_oc": "usb0_oc_grp" | ||
129 | |||
130 | "usb1_oc": "usb1_oc_grp" | ||
131 | |||
132 | "usb2_oc": "usb2_oc_grp" | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,armada-39x-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,armada-39x-pinctrl.txt new file mode 100644 index 000000000000..5b1a9dc004f4 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/marvell,armada-39x-pinctrl.txt | |||
@@ -0,0 +1,78 @@ | |||
1 | * Marvell Armada 39x SoC pinctrl driver for mpp | ||
2 | |||
3 | Please refer to marvell,mvebu-pinctrl.txt in this directory for common binding | ||
4 | part and usage. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: "marvell,88f6920-pinctrl", "marvell,88f6928-pinctrl" | ||
8 | depending on the specific variant of the SoC being used. | ||
9 | - reg: register specifier of MPP registers | ||
10 | |||
11 | Available mpp pins/groups and functions: | ||
12 | Note: brackets (x) are not part of the mpp name for marvell,function and given | ||
13 | only for more detailed description in this document. | ||
14 | |||
15 | name pins functions | ||
16 | ================================================================================ | ||
17 | mpp0 0 gpio, ua0(rxd) | ||
18 | mpp1 1 gpio, ua0(txd) | ||
19 | mpp2 2 gpio, i2c0(sck) | ||
20 | mpp3 3 gpio, i2c0(sda) | ||
21 | mpp4 4 gpio, ua1(txd), ua0(rts), smi(mdc) | ||
22 | mpp5 5 gpio, ua1(rxd), ua0(cts), smi(mdio) | ||
23 | mpp6 6 gpio, dev(cs3), xsmi(mdio) | ||
24 | mpp7 7 gpio, dev(ad9), xsmi(mdc) | ||
25 | mpp8 8 gpio, dev(ad10), ptp(trig) | ||
26 | mpp9 9 gpio, dev(ad11), ptp(clk) | ||
27 | mpp10 10 gpio, dev(ad12), ptp(event) | ||
28 | mpp11 11 gpio, dev(ad13), led(clk) | ||
29 | mpp12 12 gpio, pcie0(rstout), dev(ad14), led(stb) | ||
30 | mpp13 13 gpio, dev(ad15), led(data) | ||
31 | mpp14 14 gpio, m(vtt), dev(wen1), ua1(txd) | ||
32 | mpp15 15 gpio, pcie0(rstout), spi0(mosi), i2c1(sck) | ||
33 | mpp16 16 gpio, m(decc), spi0(miso), i2c1(sda) | ||
34 | mpp17 17 gpio, ua1(rxd), spi0(sck), smi(mdio) | ||
35 | mpp18 18 gpio, ua1(txd), spi0(cs0), i2c2(sck) | ||
36 | mpp19 19 gpio, sata1(present) [1], ua0(cts), ua1(rxd), i2c2(sda) | ||
37 | mpp20 20 gpio, sata0(present) [1], ua0(rts), ua1(txd), smi(mdc) | ||
38 | mpp21 21 gpio, spi0(cs1), sata0(present) [1], sd(cmd), dev(bootcs), ge(rxd0) | ||
39 | mpp22 22 gpio, spi0(mosi), dev(ad0) | ||
40 | mpp23 23 gpio, spi0(sck), dev(ad2) | ||
41 | mpp24 24 gpio, spi0(miso), ua0(cts), ua1(rxd), sd(d4), dev(readyn) | ||
42 | mpp25 25 gpio, spi0(cs0), ua0(rts), ua1(txd), sd(d5), dev(cs0) | ||
43 | mpp26 26 gpio, spi0(cs2), i2c1(sck), sd(d6), dev(cs1) | ||
44 | mpp27 27 gpio, spi0(cs3), i2c1(sda), sd(d7), dev(cs2), ge(txclkout) | ||
45 | mpp28 28 gpio, sd(clk), dev(ad5), ge(txd0) | ||
46 | mpp29 29 gpio, dev(ale0), ge(txd1) | ||
47 | mpp30 30 gpio, dev(oen), ge(txd2) | ||
48 | mpp31 31 gpio, dev(ale1), ge(txd3) | ||
49 | mpp32 32 gpio, dev(wen0), ge(txctl) | ||
50 | mpp33 33 gpio, m(decc), dev(ad3) | ||
51 | mpp34 34 gpio, dev(ad1) | ||
52 | mpp35 35 gpio, ref(clk), dev(a1) | ||
53 | mpp36 36 gpio, dev(a0) | ||
54 | mpp37 37 gpio, sd(d3), dev(ad8), ge(rxclk) | ||
55 | mpp38 38 gpio, ref(clk), sd(d0), dev(ad4), ge(rxd1) | ||
56 | mpp39 39 gpio, i2c1(sck), ua0(cts), sd(d1), dev(a2), ge(rxd2) | ||
57 | mpp40 40 gpio, i2c1(sda), ua0(rts), sd(d2), dev(ad6), ge(rxd3) | ||
58 | mpp41 41 gpio, ua1(rxd), ua0(cts), spi1(cs3), dev(burstn), nd(rbn0), ge(rxctl) | ||
59 | mpp42 42 gpio, ua1(txd), ua0(rts), dev(ad7) | ||
60 | mpp43 43 gpio, pcie0(clkreq), m(vtt), m(decc), spi1(cs2), dev(clkout), nd(rbn1) | ||
61 | mpp44 44 gpio, sata0(present) [1], sata1(present) [1], led(clk) | ||
62 | mpp45 45 gpio, ref(clk), pcie0(rstout), ua1(rxd) | ||
63 | mpp46 46 gpio, ref(clk), pcie0(rstout), ua1(txd), led(stb) | ||
64 | mpp47 47 gpio, sata0(present) [1], sata1(present) [1], led(data) | ||
65 | mpp48 48 gpio, sata0(present) [1], m(vtt), tdm(pclk) [1], audio(mclk) [1], sd(d4), pcie0(clkreq), ua1(txd) | ||
66 | mpp49 49 gpio, tdm(fsync) [1], audio(lrclk) [1], sd(d5), ua2(rxd) | ||
67 | mpp50 50 gpio, pcie0(rstout), tdm(drx) [1], audio(extclk) [1], sd(cmd), ua2(rxd) | ||
68 | mpp51 51 gpio, tdm(dtx) [1], audio(sdo) [1], m(decc), ua2(txd) | ||
69 | mpp52 52 gpio, pcie0(rstout), tdm(intn) [1], audio(sdi) [1], sd(d6), i2c3(sck) | ||
70 | mpp53 53 gpio, sata1(present) [1], sata0(present) [1], tdm(rstn) [1], audio(bclk) [1], sd(d7), i2c3(sda) | ||
71 | mpp54 54 gpio, sata0(present) [1], sata1(present) [1], pcie0(rstout), sd(d3), ua3(txd) | ||
72 | mpp55 55 gpio, ua1(cts), spi1(cs1), sd(d0), ua1(rxd), ua3(rxd) | ||
73 | mpp56 56 gpio, ua1(rts), m(decc), spi1(mosi), ua1(txd) | ||
74 | mpp57 57 gpio, spi1(sck), sd(clk), ua1(txd) | ||
75 | mpp58 58 gpio, i2c1(sck), pcie2(clkreq), spi1(miso), sd(d1), ua1(rxd) | ||
76 | mpp59 59 gpio, pcie0(rstout), i2c1(sda), spi1(cs0), sd(d2) | ||
77 | |||
78 | [1]: only available on 88F6928 | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt index 17e7240c6998..3f6a524cc5ff 100644 --- a/Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | == Amlogic Meson pinmux controller == | 1 | == Amlogic Meson pinmux controller == |
2 | 2 | ||
3 | Required properties for the root node: | 3 | Required properties for the root node: |
4 | - compatible: "amlogic,meson8-pinctrl" | 4 | - compatible: "amlogic,meson8-pinctrl" or "amlogic,meson8b-pinctrl" |
5 | - reg: address and size of registers controlling irq functionality | 5 | - reg: address and size of registers controlling irq functionality |
6 | 6 | ||
7 | === GPIO sub-nodes === | 7 | === GPIO sub-nodes === |
diff --git a/Documentation/devicetree/bindings/pinctrl/nvidia,tegra210-pinmux.txt b/Documentation/devicetree/bindings/pinctrl/nvidia,tegra210-pinmux.txt new file mode 100644 index 000000000000..a62d82d5fbe9 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/nvidia,tegra210-pinmux.txt | |||
@@ -0,0 +1,166 @@ | |||
1 | NVIDIA Tegra210 pinmux controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "nvidia,tegra210-pinmux" | ||
5 | - reg: Should contain a list of base address and size pairs for: | ||
6 | - first entry: The APB_MISC_GP_*_PADCTRL registers (pad control) | ||
7 | - second entry: The PINMUX_AUX_* registers (pinmux) | ||
8 | |||
9 | Please refer to pinctrl-bindings.txt in this directory for details of the | ||
10 | common pinctrl bindings used by client devices, including the meaning of the | ||
11 | phrase "pin configuration node". | ||
12 | |||
13 | Tegra's pin configuration nodes act as a container for an arbitrary number of | ||
14 | subnodes. Each of these subnodes represents some desired configuration for a | ||
15 | pin, a group, or a list of pins or groups. This configuration can include the | ||
16 | mux function to select on those pin(s)/group(s), and various pin configuration | ||
17 | parameters, such as pull-up, tristate, drive strength, etc. | ||
18 | |||
19 | The name of each subnode is not important; all subnodes should be enumerated | ||
20 | and processed purely based on their content. | ||
21 | |||
22 | Each subnode only affects those parameters that are explicitly listed. In | ||
23 | other words, a subnode that lists a mux function but no pin configuration | ||
24 | parameters implies no information about any pin configuration parameters. | ||
25 | Similarly, a pin subnode that describes a pullup parameter implies no | ||
26 | information about e.g. the mux function or tristate parameter. For this | ||
27 | reason, even seemingly boolean values are actually tristates in this binding: | ||
28 | unspecified, off, or on. Unspecified is represented as an absent property, | ||
29 | and off/on are represented as integer values 0 and 1. | ||
30 | |||
31 | See the TRM to determine which properties and values apply to each pin/group. | ||
32 | Macro values for property values are defined in | ||
33 | include/dt-binding/pinctrl/pinctrl-tegra.h. | ||
34 | |||
35 | Required subnode-properties: | ||
36 | - nvidia,pins : An array of strings. Each string contains the name of a pin or | ||
37 | group. Valid values for these names are listed below. | ||
38 | |||
39 | Optional subnode-properties: | ||
40 | - nvidia,function: A string containing the name of the function to mux to the | ||
41 | pin or group. | ||
42 | - nvidia,pull: Integer, representing the pull-down/up to apply to the pin. | ||
43 | 0: none, 1: down, 2: up. | ||
44 | - nvidia,tristate: Integer. | ||
45 | 0: drive, 1: tristate. | ||
46 | - nvidia,enable-input: Integer. Enable the pin's input path. | ||
47 | enable :TEGRA_PIN_ENABLE0 and | ||
48 | disable or output only: TEGRA_PIN_DISABLE. | ||
49 | - nvidia,open-drain: Integer. | ||
50 | enable: TEGRA_PIN_ENABLE. | ||
51 | disable: TEGRA_PIN_DISABLE. | ||
52 | - nvidia,lock: Integer. Lock the pin configuration against further changes | ||
53 | until reset. | ||
54 | enable: TEGRA_PIN_ENABLE. | ||
55 | disable: TEGRA_PIN_DISABLE. | ||
56 | - nvidia,io-hv: Integer. Select high-voltage receivers. | ||
57 | normal: TEGRA_PIN_DISABLE | ||
58 | high: TEGRA_PIN_ENABLE | ||
59 | - nvidia,high-speed-mode: Integer. Enable high speed mode the pins. | ||
60 | normal: TEGRA_PIN_DISABLE | ||
61 | high: TEGRA_PIN_ENABLE | ||
62 | - nvidia,schmitt: Integer. Enables Schmitt Trigger on the input. | ||
63 | normal: TEGRA_PIN_DISABLE | ||
64 | high: TEGRA_PIN_ENABLE | ||
65 | - nvidia,drive-type: Integer. Valid range 0...3. | ||
66 | - nvidia,pull-down-strength: Integer. Controls drive strength. 0 is weakest. | ||
67 | The range of valid values depends on the pingroup. See "CAL_DRVDN" in the | ||
68 | Tegra TRM. | ||
69 | - nvidia,pull-up-strength: Integer. Controls drive strength. 0 is weakest. | ||
70 | The range of valid values depends on the pingroup. See "CAL_DRVUP" in the | ||
71 | Tegra TRM. | ||
72 | - nvidia,slew-rate-rising: Integer. Controls rising signal slew rate. 0 is | ||
73 | fastest. The range of valid values depends on the pingroup. See | ||
74 | "DRVDN_SLWR" in the Tegra TRM. | ||
75 | - nvidia,slew-rate-falling: Integer. Controls falling signal slew rate. 0 is | ||
76 | fastest. The range of valid values depends on the pingroup. See | ||
77 | "DRVUP_SLWF" in the Tegra TRM. | ||
78 | |||
79 | Valid values for pin and group names (nvidia,pin) are: | ||
80 | |||
81 | Mux groups: | ||
82 | |||
83 | These correspond to Tegra PINMUX_AUX_* (pinmux) registers. Any property | ||
84 | that exists in those registers may be set for the following pin names. | ||
85 | |||
86 | In Tegra210, many pins also have a dedicated APB_MISC_GP_*_PADCTRL | ||
87 | register. Where that is true, and property that exists in that register | ||
88 | may also be set on the following pin names. | ||
89 | |||
90 | als_prox_int_px3, ap_ready_pv5, ap_wake_bt_ph3, ap_wake_nfc_ph7, | ||
91 | aud_mclk_pbb0, batt_bcl, bt_rst_ph4, bt_wake_ap_ph5, button_home_py1, | ||
92 | button_power_on_px5, button_slide_sw_py0, button_vol_down_px7, | ||
93 | button_vol_up_px6, cam1_mclk_ps0, cam1_pwdn_ps7, cam1_strobe_pt1, | ||
94 | cam2_mclk_ps1, cam2_pwdn_pt0, cam_af_en_ps5, cam_flash_en_ps6, | ||
95 | cam_i2c_scl_ps2, cam_i2c_sda_ps3, cam_rst_ps4cam_rst_ps4, clk_32k_in, | ||
96 | clk_32k_out_py5, clk_req, core_pwr_req, cpu_pwr_req, dap1_din_pb1, | ||
97 | dap1_dout_pb2, dap1_fs_pb0, dap1_sclk_pb3, dap2_din_paa2, dap2_dout_paa3, | ||
98 | dap2_fs_paa0, dap2_sclk_paa1, dap4_din_pj5, dap4_dout_pj6, dap4_fs_pj4, | ||
99 | dap4_sclk_pj7, dmic1_clk_pe0, dmic1_dat_pe1, dmic2_clk_pe2, dmic2_dat_pe3, | ||
100 | dmic3_clk_pe4, dmic3_dat_pe5, dp_hpd0_pcc6, dvfs_clk_pbb2, dvfs_pwm_pbb1, | ||
101 | gen1_i2c_scl_pj1, gen1_i2c_sda_pj0, gen2_i2c_scl_pj2, gen2_i2c_sda_pj3, | ||
102 | gen3_i2c_scl_pf0, gen3_i2c_sda_pf1, gpio_x1_aud_pbb3, gpio_x3_aud_pbb4, | ||
103 | gps_en_pi2, gps_rst_pi3, hdmi_cec_pcc0, hdmi_int_dp_hpd_pcc1, jtag_rtck, | ||
104 | lcd_bl_en_pv1, lcd_bl_pwm_pv0, lcd_gpio1_pv3, lcd_gpio2_pv4, lcd_rst_pv2, | ||
105 | lcd_te_py2, modem_wake_ap_px0, motion_int_px2, nfc_en_pi0, nfc_int_pi1, | ||
106 | pa6, pcc7, pe6, pe7, pex_l0_clkreq_n_pa1, pex_l0_rst_n_pa0, | ||
107 | pex_l1_clkreq_n_pa4, pex_l1_rst_n_pa3, pex_wake_n_pa2, ph6, pk0, pk1, pk2, | ||
108 | pk3, pk4, pk5, pk6, pk7, pl0, pl1, pwr_i2c_scl_py3, pwr_i2c_sda_py4, | ||
109 | pwr_int_n, pz0, pz1, pz2, pz3, pz4, pz5, qspi_cs_n_pee1, qspi_io0_pee2, | ||
110 | qspi_io1_pee3, qspi_io2_pee4, qspi_io3_pee5, qspi_sck_pee0, | ||
111 | sata_led_active_pa5, sdmmc1_clk_pm0, sdmmc1_cmd_pm1, sdmmc1_dat0_pm5, | ||
112 | sdmmc1_dat1_pm4, sdmmc1_dat2_pm3, sdmmc1_dat3_pm2, sdmmc3_clk_pp0, | ||
113 | sdmmc3_cmd_pp1, sdmmc3_dat0_pp5, sdmmc3_dat1_pp4, sdmmc3_dat2_pp3, | ||
114 | sdmmc3_dat3_pp2, shutdown, spdif_in_pcc3, spdif_out_pcc2, spi1_cs0_pc3, | ||
115 | spi1_cs1_pc4, spi1_miso_pc1, spi1_mosi_pc0, spi1_sck_pc2, spi2_cs0_pb7, | ||
116 | spi2_cs1_pdd0, spi2_miso_pb5, spi2_mosi_pb4, spi2_sck_pb6, spi4_cs0_pc6, | ||
117 | spi4_miso_pd0, spi4_mosi_pc7, spi4_sck_pc5, temp_alert_px4, touch_clk_pv7, | ||
118 | touch_int_px1, touch_rst_pv6, uart1_cts_pu3, uart1_rts_pu2, uart1_rx_pu1, | ||
119 | uart1_tx_pu0, uart2_cts_pg3, uart2_rts_pg2, uart2_rx_pg1, uart2_tx_pg0, | ||
120 | uart3_cts_pd4, uart3_rts_pd3, uart3_rx_pd2, uart3_tx_pd1, uart4_cts_pi7, | ||
121 | uart4_rts_pi6, uart4_rx_pi5, uart4_tx_pi4, usb_vbus_en0_pcc4, | ||
122 | usb_vbus_en1_pcc5, wifi_en_ph0, wifi_rst_ph1, wifi_wake_ap_ph2 | ||
123 | |||
124 | Drive groups: | ||
125 | |||
126 | These correspond to the Tegra APB_MISC_GP_*_PADCTRL (pad control) | ||
127 | registers. Note that where one of these registers controls a single pin | ||
128 | for which a PINMUX_AUX_* exists, see the list above for the pin name to | ||
129 | use when configuring the pinmux. | ||
130 | |||
131 | pa6, pcc7, pe6, pe7, ph6, pk0, pk1, pk2, pk3, pk4, pk5, pk6, pk7, pl0, pl1, | ||
132 | pz0, pz1, pz2, pz3, pz4, pz5, sdmmc1, sdmmc2, sdmmc3, sdmmc4 | ||
133 | |||
134 | Valid values for nvidia,functions are: | ||
135 | |||
136 | aud, bcl, blink, ccla, cec, cldvfs, clk, core, cpu, displaya, displayb, | ||
137 | dmic1, dmic2, dmic3, dp, dtv, extperiph3, i2c1, i2c2, i2c3, i2cpmu, i2cvi, | ||
138 | i2s1, i2s2, i2s3, i2s4a, i2s4b, i2s5a, i2s5b, iqc0, iqc1, jtag, pe, pe0, | ||
139 | pe1, pmi, pwm0, pwm1, pwm2, pwm3, qspi, rsvd0, rsvd1, rsvd2, rsvd3, sata, | ||
140 | sdmmc1, sdmmc3, shutdown, soc, sor0, sor1, spdif, spi1, spi2, spi3, spi4, | ||
141 | sys, touch, uart, uarta, uartb, uartc, uartd, usb, vgp1, vgp2, vgp3, vgp4, | ||
142 | vgp5, vgp6, vimclk, vimclk2 | ||
143 | |||
144 | Example: | ||
145 | |||
146 | pinmux: pinmux@70000800 { | ||
147 | compatible = "nvidia,tegra210-pinmux"; | ||
148 | reg = <0x0 0x700008d4 0x0 0x2a8>, /* Pad control registers */ | ||
149 | <0x0 0x70003000 0x0 0x1000>; /* Mux registers */ | ||
150 | |||
151 | pinctrl-names = "boot"; | ||
152 | pinctrl-0 = <&state_boot>; | ||
153 | |||
154 | state_boot: pinmux { | ||
155 | gen1_i2c_scl_pj1 { | ||
156 | nvidia,pins = "gen1_i2c_scl_pj1", | ||
157 | nvidia,function = "i2c1"; | ||
158 | nvidia,pull = <TEGRA_PIN_PULL_NONE>; | ||
159 | nvidia,tristate = <TEGRA_PIN_DISABLE>; | ||
160 | nvidia,enable-input = <TEGRA_PIN_ENABLE>; | ||
161 | nvidia,open-drain = <TEGRA_PIN_ENABLE>; | ||
162 | nvidia,io-hv = <TEGRA_PIN_ENABLE>; | ||
163 | }; | ||
164 | }; | ||
165 | }; | ||
166 | }; | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt index 47d84b6ee91b..b73c96d24f59 100644 --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt | |||
@@ -38,7 +38,7 @@ property exists to define the pin configuration. Each state may also be | |||
38 | assigned a name. When names are used, another property exists to map from | 38 | assigned a name. When names are used, another property exists to map from |
39 | those names to the integer IDs. | 39 | those names to the integer IDs. |
40 | 40 | ||
41 | Each client device's own binding determines the set of states the must be | 41 | Each client device's own binding determines the set of states that must be |
42 | defined in its device tree node, and whether to define the set of state | 42 | defined in its device tree node, and whether to define the set of state |
43 | IDs that must be provided, or whether to define the set of state names that | 43 | IDs that must be provided, or whether to define the set of state names that |
44 | must be provided. | 44 | must be provided. |
@@ -133,16 +133,27 @@ pin multiplexing nodes: | |||
133 | 133 | ||
134 | function - the mux function to select | 134 | function - the mux function to select |
135 | groups - the list of groups to select with this function | 135 | groups - the list of groups to select with this function |
136 | (either this or "pins" must be specified) | ||
137 | pins - the list of pins to select with this function (either | ||
138 | this or "groups" must be specified) | ||
136 | 139 | ||
137 | Example: | 140 | Example: |
138 | 141 | ||
139 | state_0_node_a { | 142 | state_0_node_a { |
140 | function = "uart0"; | 143 | uart0 { |
141 | groups = "u0rxtx", "u0rtscts"; | 144 | function = "uart0"; |
145 | groups = "u0rxtx", "u0rtscts"; | ||
146 | }; | ||
142 | }; | 147 | }; |
143 | state_1_node_a { | 148 | state_1_node_a { |
144 | function = "spi0"; | 149 | spi0 { |
145 | groups = "spi0pins"; | 150 | function = "spi0"; |
151 | groups = "spi0pins"; | ||
152 | }; | ||
153 | }; | ||
154 | state_2_node_a { | ||
155 | function = "i2c0"; | ||
156 | pins = "mfio29", "mfio30"; | ||
146 | }; | 157 | }; |
147 | 158 | ||
148 | == Generic pin configuration node content == | 159 | == Generic pin configuration node content == |
@@ -188,16 +199,22 @@ slew-rate - set the slew rate | |||
188 | For example: | 199 | For example: |
189 | 200 | ||
190 | state_0_node_a { | 201 | state_0_node_a { |
191 | pins = "GPIO0_AJ5", "GPIO2_AH4"; /* CTS+RXD */ | 202 | cts_rxd { |
192 | bias-pull-up; | 203 | pins = "GPIO0_AJ5", "GPIO2_AH4"; /* CTS+RXD */ |
204 | bias-pull-up; | ||
205 | }; | ||
193 | }; | 206 | }; |
194 | state_1_node_a { | 207 | state_1_node_a { |
195 | pins = "GPIO1_AJ3", "GPIO3_AH3"; /* RTS+TXD */ | 208 | rts_txd { |
196 | output-high; | 209 | pins = "GPIO1_AJ3", "GPIO3_AH3"; /* RTS+TXD */ |
210 | output-high; | ||
211 | }; | ||
197 | }; | 212 | }; |
198 | state_2_node_a { | 213 | state_2_node_a { |
199 | group = "foo-group"; | 214 | foo { |
200 | bias-pull-up; | 215 | group = "foo-group"; |
216 | bias-pull-up; | ||
217 | }; | ||
201 | }; | 218 | }; |
202 | 219 | ||
203 | Some of the generic properties take arguments. For those that do, the | 220 | Some of the generic properties take arguments. For those that do, the |
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt new file mode 100644 index 000000000000..5868a0f7255d --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt | |||
@@ -0,0 +1,145 @@ | |||
1 | * Mediatek MT65XX Pin Controller | ||
2 | |||
3 | The Mediatek's Pin controller is used to control SoC pins. | ||
4 | |||
5 | Required properties: | ||
6 | - compatible: value should be either of the following. | ||
7 | (a) "mediatek,mt8135-pinctrl", compatible with mt8135 pinctrl. | ||
8 | - mediatek,pctl-regmap: Should be a phandle of the syscfg node. | ||
9 | - pins-are-numbered: Specify the subnodes are using numbered pinmux to | ||
10 | specify pins. | ||
11 | - gpio-controller : Marks the device node as a gpio controller. | ||
12 | - #gpio-cells: number of cells in GPIO specifier. Since the generic GPIO | ||
13 | binding is used, the amount of cells must be specified as 2. See the below | ||
14 | mentioned gpio binding representation for description of particular cells. | ||
15 | |||
16 | Eg: <&pio 6 0> | ||
17 | <[phandle of the gpio controller node] | ||
18 | [line number within the gpio controller] | ||
19 | [flags]> | ||
20 | |||
21 | Values for gpio specifier: | ||
22 | - Line number: is a value between 0 to 202. | ||
23 | - Flags: bit field of flags, as defined in <dt-bindings/gpio/gpio.h>. | ||
24 | Only the following flags are supported: | ||
25 | 0 - GPIO_ACTIVE_HIGH | ||
26 | 1 - GPIO_ACTIVE_LOW | ||
27 | - reg: physicall address base for EINT registers | ||
28 | - interrupt-controller: Marks the device node as an interrupt controller | ||
29 | - #interrupt-cells: Should be two. | ||
30 | - interrupts : The interrupt outputs from the controller. | ||
31 | |||
32 | Please refer to pinctrl-bindings.txt in this directory for details of the | ||
33 | common pinctrl bindings used by client devices. | ||
34 | |||
35 | Subnode format | ||
36 | A pinctrl node should contain at least one subnodes representing the | ||
37 | pinctrl groups available on the machine. Each subnode will list the | ||
38 | pins it needs, and how they should be configured, with regard to muxer | ||
39 | configuration, pullups, drive strength, input enable/disable and input schmitt. | ||
40 | |||
41 | node { | ||
42 | pinmux = <PIN_NUMBER_PINMUX>; | ||
43 | GENERIC_PINCONFIG; | ||
44 | }; | ||
45 | |||
46 | Required properties: | ||
47 | - pinmux: integer array, represents gpio pin number and mux setting. | ||
48 | Supported pin number and mux varies for different SoCs, and are defined | ||
49 | as macros in boot/dts/<soc>-pinfunc.h directly. | ||
50 | |||
51 | Optional properties: | ||
52 | - GENERIC_PINCONFIG: is the generic pinconfig options to use, bias-disable, | ||
53 | bias-pull-down, bias-pull-up, input-enable, input-disable, output-low, output-high, | ||
54 | input-schmitt-enable, input-schmitt-disable and drive-strength are valid. | ||
55 | |||
56 | Some special pins have extra pull up strength, there are R0 and R1 pull-up | ||
57 | resistors available, but for user, it's only need to set R1R0 as 00, 01, 10 or 11. | ||
58 | So when config bias-pull-up, it support arguments for those special pins. | ||
59 | Some macros have been defined for this usage, such as MTK_PUPD_SET_R1R0_00. | ||
60 | See dt-bindings/pinctrl/mt65xx.h. | ||
61 | |||
62 | When config drive-strength, it can support some arguments, such as | ||
63 | MTK_DRIVE_4mA, MTK_DRIVE_6mA, etc. See dt-bindings/pinctrl/mt65xx.h. | ||
64 | |||
65 | Examples: | ||
66 | |||
67 | #include "mt8135-pinfunc.h" | ||
68 | |||
69 | ... | ||
70 | { | ||
71 | syscfg_pctl_a: syscfg_pctl_a@10005000 { | ||
72 | compatible = "mediatek,mt8135-pctl-a-syscfg", "syscon"; | ||
73 | reg = <0 0x10005000 0 0x1000>; | ||
74 | }; | ||
75 | |||
76 | syscfg_pctl_b: syscfg_pctl_b@1020C020 { | ||
77 | compatible = "mediatek,mt8135-pctl-b-syscfg", "syscon"; | ||
78 | reg = <0 0x1020C020 0 0x1000>; | ||
79 | }; | ||
80 | |||
81 | pinctrl@01c20800 { | ||
82 | compatible = "mediatek,mt8135-pinctrl"; | ||
83 | reg = <0 0x1000B000 0 0x1000>; | ||
84 | mediatek,pctl-regmap = <&syscfg_pctl_a &syscfg_pctl_b>; | ||
85 | pins-are-numbered; | ||
86 | gpio-controller; | ||
87 | #gpio-cells = <2>; | ||
88 | interrupt-controller; | ||
89 | #interrupt-cells = <2>; | ||
90 | interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>, | ||
91 | <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>, | ||
92 | <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>; | ||
93 | |||
94 | i2c0_pins_a: i2c0@0 { | ||
95 | pins1 { | ||
96 | pinmux = <MT8135_PIN_100_SDA0__FUNC_SDA0>, | ||
97 | <MT8135_PIN_101_SCL0__FUNC_SCL0>; | ||
98 | bias-disable; | ||
99 | }; | ||
100 | }; | ||
101 | |||
102 | i2c1_pins_a: i2c1@0 { | ||
103 | pins { | ||
104 | pinmux = <MT8135_PIN_195_SDA1__FUNC_SDA1>, | ||
105 | <MT8135_PIN_196_SCL1__FUNC_SCL1>; | ||
106 | bias-pull-up = <55>; | ||
107 | }; | ||
108 | }; | ||
109 | |||
110 | i2c2_pins_a: i2c2@0 { | ||
111 | pins1 { | ||
112 | pinmux = <MT8135_PIN_193_SDA2__FUNC_SDA2>; | ||
113 | bias-pull-down; | ||
114 | }; | ||
115 | |||
116 | pins2 { | ||
117 | pinmux = <MT8135_PIN_49_WATCHDOG__FUNC_GPIO49>; | ||
118 | bias-pull-up; | ||
119 | }; | ||
120 | }; | ||
121 | |||
122 | i2c3_pins_a: i2c3@0 { | ||
123 | pins1 { | ||
124 | pinmux = <MT8135_PIN_40_DAC_CLK__FUNC_GPIO40>, | ||
125 | <MT8135_PIN_41_DAC_WS__FUNC_GPIO41>; | ||
126 | bias-pull-up = <55>; | ||
127 | }; | ||
128 | |||
129 | pins2 { | ||
130 | pinmux = <MT8135_PIN_35_SCL3__FUNC_SCL3>, | ||
131 | <MT8135_PIN_36_SDA3__FUNC_SDA3>; | ||
132 | output-low; | ||
133 | bias-pull-up = <55>; | ||
134 | }; | ||
135 | |||
136 | pins3 { | ||
137 | pinmux = <MT8135_PIN_57_JTCK__FUNC_GPIO57>, | ||
138 | <MT8135_PIN_60_JTDI__FUNC_JTDI>; | ||
139 | drive-strength = <32>; | ||
140 | }; | ||
141 | }; | ||
142 | |||
143 | ... | ||
144 | } | ||
145 | }; | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt index 7ed08048516a..1ae63c0acd40 100644 --- a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt +++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt | |||
@@ -10,6 +10,7 @@ PMIC's from Qualcomm. | |||
10 | "qcom,pm8018-gpio" | 10 | "qcom,pm8018-gpio" |
11 | "qcom,pm8038-gpio" | 11 | "qcom,pm8038-gpio" |
12 | "qcom,pm8058-gpio" | 12 | "qcom,pm8058-gpio" |
13 | "qcom,pm8916-gpio" | ||
13 | "qcom,pm8917-gpio" | 14 | "qcom,pm8917-gpio" |
14 | "qcom,pm8921-gpio" | 15 | "qcom,pm8921-gpio" |
15 | "qcom,pm8941-gpio" | 16 | "qcom,pm8941-gpio" |
@@ -74,6 +75,7 @@ to specify in a pin configuration subnode: | |||
74 | gpio1-gpio6 for pm8018 | 75 | gpio1-gpio6 for pm8018 |
75 | gpio1-gpio12 for pm8038 | 76 | gpio1-gpio12 for pm8038 |
76 | gpio1-gpio40 for pm8058 | 77 | gpio1-gpio40 for pm8058 |
78 | gpio1-gpio4 for pm8916 | ||
77 | gpio1-gpio38 for pm8917 | 79 | gpio1-gpio38 for pm8917 |
78 | gpio1-gpio44 for pm8921 | 80 | gpio1-gpio44 for pm8921 |
79 | gpio1-gpio36 for pm8941 | 81 | gpio1-gpio36 for pm8941 |
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt index 854774b194ed..ed19991aad35 100644 --- a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt +++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt | |||
@@ -8,6 +8,7 @@ of PMIC's from Qualcomm. | |||
8 | Value type: <string> | 8 | Value type: <string> |
9 | Definition: Should contain one of: | 9 | Definition: Should contain one of: |
10 | "qcom,pm8841-mpp", | 10 | "qcom,pm8841-mpp", |
11 | "qcom,pm8916-mpp", | ||
11 | "qcom,pm8941-mpp", | 12 | "qcom,pm8941-mpp", |
12 | "qcom,pma8084-mpp", | 13 | "qcom,pma8084-mpp", |
13 | 14 | ||
@@ -67,6 +68,7 @@ to specify in a pin configuration subnode: | |||
67 | Definition: List of MPP pins affected by the properties specified in | 68 | Definition: List of MPP pins affected by the properties specified in |
68 | this subnode. Valid pins are: | 69 | this subnode. Valid pins are: |
69 | mpp1-mpp4 for pm8841 | 70 | mpp1-mpp4 for pm8841 |
71 | mpp1-mpp4 for pm8916 | ||
70 | mpp1-mpp8 for pm8941 | 72 | mpp1-mpp8 for pm8941 |
71 | mpp1-mpp4 for pma8084 | 73 | mpp1-mpp4 for pma8084 |
72 | 74 | ||
diff --git a/Documentation/devicetree/bindings/power/da9150-charger.txt b/Documentation/devicetree/bindings/power/da9150-charger.txt new file mode 100644 index 000000000000..f3906663c454 --- /dev/null +++ b/Documentation/devicetree/bindings/power/da9150-charger.txt | |||
@@ -0,0 +1,26 @@ | |||
1 | Dialog Semiconductor DA9150 Charger Power Supply bindings | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "dlg,da9150-charger" for DA9150 Charger Power Supply | ||
5 | |||
6 | Optional properties: | ||
7 | - io-channels: List of phandle and IIO specifier pairs | ||
8 | - io-channel-names: List of channel names used by charger | ||
9 | ["CHAN_IBUS", "CHAN_VBUS", "CHAN_TJUNC", "CHAN_VBAT"] | ||
10 | (See Documentation/devicetree/bindings/iio/iio-bindings.txt for further info) | ||
11 | |||
12 | |||
13 | Example: | ||
14 | |||
15 | da9150-charger { | ||
16 | compatible = "dlg,da9150-charger"; | ||
17 | |||
18 | io-channels = <&gpadc 0>, | ||
19 | <&gpadc 2>, | ||
20 | <&gpadc 8>, | ||
21 | <&gpadc 5>; | ||
22 | io-channel-names = "CHAN_IBUS", | ||
23 | "CHAN_VBUS", | ||
24 | "CHAN_TJUNC", | ||
25 | "CHAN_VBAT"; | ||
26 | }; | ||
diff --git a/Documentation/devicetree/bindings/power/power_domain.txt b/Documentation/devicetree/bindings/power/power_domain.txt index 98c16672ab5f..0f8ed3710c66 100644 --- a/Documentation/devicetree/bindings/power/power_domain.txt +++ b/Documentation/devicetree/bindings/power/power_domain.txt | |||
@@ -19,6 +19,16 @@ Required properties: | |||
19 | providing multiple PM domains (e.g. power controllers), but can be any value | 19 | providing multiple PM domains (e.g. power controllers), but can be any value |
20 | as specified by device tree binding documentation of particular provider. | 20 | as specified by device tree binding documentation of particular provider. |
21 | 21 | ||
22 | Optional properties: | ||
23 | - power-domains : A phandle and PM domain specifier as defined by bindings of | ||
24 | the power controller specified by phandle. | ||
25 | Some power domains might be powered from another power domain (or have | ||
26 | other hardware specific dependencies). For representing such dependency | ||
27 | a standard PM domain consumer binding is used. When provided, all domains | ||
28 | created by the given provider should be subdomains of the domain | ||
29 | specified by this binding. More details about power domain specifier are | ||
30 | available in the next section. | ||
31 | |||
22 | Example: | 32 | Example: |
23 | 33 | ||
24 | power: power-controller@12340000 { | 34 | power: power-controller@12340000 { |
@@ -30,6 +40,25 @@ Example: | |||
30 | The node above defines a power controller that is a PM domain provider and | 40 | The node above defines a power controller that is a PM domain provider and |
31 | expects one cell as its phandle argument. | 41 | expects one cell as its phandle argument. |
32 | 42 | ||
43 | Example 2: | ||
44 | |||
45 | parent: power-controller@12340000 { | ||
46 | compatible = "foo,power-controller"; | ||
47 | reg = <0x12340000 0x1000>; | ||
48 | #power-domain-cells = <1>; | ||
49 | }; | ||
50 | |||
51 | child: power-controller@12340000 { | ||
52 | compatible = "foo,power-controller"; | ||
53 | reg = <0x12341000 0x1000>; | ||
54 | power-domains = <&parent 0>; | ||
55 | #power-domain-cells = <1>; | ||
56 | }; | ||
57 | |||
58 | The nodes above define two power controllers: 'parent' and 'child'. | ||
59 | Domains created by the 'child' power controller are subdomains of '0' power | ||
60 | domain provided by the 'parent' power controller. | ||
61 | |||
33 | ==PM domain consumers== | 62 | ==PM domain consumers== |
34 | 63 | ||
35 | Required properties: | 64 | Required properties: |
diff --git a/Documentation/devicetree/bindings/power/reset/syscon-poweroff.txt b/Documentation/devicetree/bindings/power/reset/syscon-poweroff.txt new file mode 100644 index 000000000000..1e2546f8b08a --- /dev/null +++ b/Documentation/devicetree/bindings/power/reset/syscon-poweroff.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | Generic SYSCON mapped register poweroff driver | ||
2 | |||
3 | This is a generic poweroff driver using syscon to map the poweroff register. | ||
4 | The poweroff is generally performed with a write to the poweroff register | ||
5 | defined by the register map pointed by syscon reference plus the offset | ||
6 | with the mask defined in the poweroff node. | ||
7 | |||
8 | Required properties: | ||
9 | - compatible: should contain "syscon-poweroff" | ||
10 | - regmap: this is phandle to the register map node | ||
11 | - offset: offset in the register map for the poweroff register (in bytes) | ||
12 | - mask: the poweroff value written to the poweroff register (32 bit access) | ||
13 | |||
14 | Default will be little endian mode, 32 bit access only. | ||
15 | |||
16 | Examples: | ||
17 | |||
18 | poweroff { | ||
19 | compatible = "syscon-poweroff"; | ||
20 | regmap = <®mapnode>; | ||
21 | offset = <0x0>; | ||
22 | mask = <0x7a>; | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/pwm/bcm-kona-pwm.txt b/Documentation/devicetree/bindings/pwm/brcm,kona-pwm.txt index 8eae9fe7841c..8eae9fe7841c 100644 --- a/Documentation/devicetree/bindings/pwm/bcm-kona-pwm.txt +++ b/Documentation/devicetree/bindings/pwm/brcm,kona-pwm.txt | |||
diff --git a/Documentation/devicetree/bindings/regulator/act8865-regulator.txt b/Documentation/devicetree/bindings/regulator/act8865-regulator.txt index dad6358074ac..e91485d11241 100644 --- a/Documentation/devicetree/bindings/regulator/act8865-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/act8865-regulator.txt | |||
@@ -2,13 +2,35 @@ ACT88xx regulators | |||
2 | ------------------- | 2 | ------------------- |
3 | 3 | ||
4 | Required properties: | 4 | Required properties: |
5 | - compatible: "active-semi,act8846" or "active-semi,act8865" | 5 | - compatible: "active-semi,act8846" or "active-semi,act8865" or "active-semi,act8600" |
6 | - reg: I2C slave address | 6 | - reg: I2C slave address |
7 | 7 | ||
8 | Optional properties: | 8 | Optional properties: |
9 | - system-power-controller: Telling whether or not this pmic is controlling | 9 | - system-power-controller: Telling whether or not this pmic is controlling |
10 | the system power. See Documentation/devicetree/bindings/power/power-controller.txt . | 10 | the system power. See Documentation/devicetree/bindings/power/power-controller.txt . |
11 | 11 | ||
12 | Optional input supply properties: | ||
13 | - for act8600: | ||
14 | - vp1-supply: The input supply for DCDC_REG1 | ||
15 | - vp2-supply: The input supply for DCDC_REG2 | ||
16 | - vp3-supply: The input supply for DCDC_REG3 | ||
17 | - inl-supply: The input supply for LDO_REG5, LDO_REG6, LDO_REG7 and LDO_REG8 | ||
18 | SUDCDC_REG4, LDO_REG9 and LDO_REG10 do not have separate supplies. | ||
19 | - for act8846: | ||
20 | - vp1-supply: The input supply for REG1 | ||
21 | - vp2-supply: The input supply for REG2 | ||
22 | - vp3-supply: The input supply for REG3 | ||
23 | - vp4-supply: The input supply for REG4 | ||
24 | - inl1-supply: The input supply for REG5, REG6 and REG7 | ||
25 | - inl2-supply: The input supply for REG8 and LDO_REG9 | ||
26 | - inl3-supply: The input supply for REG10, REG11 and REG12 | ||
27 | - for act8865: | ||
28 | - vp1-supply: The input supply for DCDC_REG1 | ||
29 | - vp2-supply: The input supply for DCDC_REG2 | ||
30 | - vp3-supply: The input supply for DCDC_REG3 | ||
31 | - inl45-supply: The input supply for LDO_REG1 and LDO_REG2 | ||
32 | - inl67-supply: The input supply for LDO_REG3 and LDO_REG4 | ||
33 | |||
12 | Any standard regulator properties can be used to configure the single regulator. | 34 | Any standard regulator properties can be used to configure the single regulator. |
13 | 35 | ||
14 | The valid names for regulators are: | 36 | The valid names for regulators are: |
@@ -16,6 +38,9 @@ The valid names for regulators are: | |||
16 | REG1, REG2, REG3, REG4, REG5, REG6, REG7, REG8, REG9, REG10, REG11, REG12 | 38 | REG1, REG2, REG3, REG4, REG5, REG6, REG7, REG8, REG9, REG10, REG11, REG12 |
17 | - for act8865: | 39 | - for act8865: |
18 | DCDC_REG1, DCDC_REG2, DCDC_REG3, LDO_REG1, LDO_REG2, LDO_REG3, LDO_REG4. | 40 | DCDC_REG1, DCDC_REG2, DCDC_REG3, LDO_REG1, LDO_REG2, LDO_REG3, LDO_REG4. |
41 | - for act8600: | ||
42 | DCDC_REG1, DCDC_REG2, DCDC_REG3, SUDCDC_REG4, LDO_REG5, LDO_REG6, LDO_REG7, | ||
43 | LDO_REG8, LDO_REG9, LDO_REG10, | ||
19 | 44 | ||
20 | Example: | 45 | Example: |
21 | -------- | 46 | -------- |
diff --git a/Documentation/devicetree/bindings/arm/bcm/kona-resetmgr.txt b/Documentation/devicetree/bindings/reset/brcm,bcm21664-resetmgr.txt index 93f31ca1ef4b..93f31ca1ef4b 100644 --- a/Documentation/devicetree/bindings/arm/bcm/kona-resetmgr.txt +++ b/Documentation/devicetree/bindings/reset/brcm,bcm21664-resetmgr.txt | |||
diff --git a/Documentation/devicetree/bindings/rtc/digicolor-rtc.txt b/Documentation/devicetree/bindings/rtc/digicolor-rtc.txt new file mode 100644 index 000000000000..d464986012cd --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/digicolor-rtc.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | Conexant Digicolor Real Time Clock controller | ||
2 | |||
3 | This binding currently supports the CX92755 SoC. | ||
4 | |||
5 | Required properties: | ||
6 | - compatible: should be "cnxt,cx92755-rtc" | ||
7 | - reg: physical base address of the controller and length of memory mapped | ||
8 | region. | ||
9 | - interrupts: rtc alarm interrupt | ||
10 | |||
11 | Example: | ||
12 | |||
13 | rtc@f0000c30 { | ||
14 | compatible = "cnxt,cx92755-rtc"; | ||
15 | reg = <0xf0000c30 0x18>; | ||
16 | interrupts = <25>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt b/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt index b800070fe6e9..fa6a94226669 100644 --- a/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt +++ b/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt | |||
@@ -7,6 +7,11 @@ Required properties: | |||
7 | region. | 7 | region. |
8 | - interrupts: rtc alarm interrupt | 8 | - interrupts: rtc alarm interrupt |
9 | 9 | ||
10 | Optional properties: | ||
11 | - stmp,crystal-freq: override crystal frequency as determined from fuse bits. | ||
12 | Only <32000> and <32768> are possible for the hardware. Use <0> for | ||
13 | "no crystal". | ||
14 | |||
10 | Example: | 15 | Example: |
11 | 16 | ||
12 | rtc@80056000 { | 17 | rtc@80056000 { |
diff --git a/Documentation/devicetree/bindings/security/tpm/st33zp24-spi.txt b/Documentation/devicetree/bindings/security/tpm/st33zp24-spi.txt new file mode 100644 index 000000000000..158b0165e01c --- /dev/null +++ b/Documentation/devicetree/bindings/security/tpm/st33zp24-spi.txt | |||
@@ -0,0 +1,34 @@ | |||
1 | * STMicroelectronics SAS. ST33ZP24 TPM SoC | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "st,st33zp24-spi". | ||
5 | - spi-max-frequency: Maximum SPI frequency (<= 10000000). | ||
6 | |||
7 | Optional ST33ZP24 Properties: | ||
8 | - interrupt-parent: phandle for the interrupt gpio controller | ||
9 | - interrupts: GPIO interrupt to which the chip is connected | ||
10 | - lpcpd-gpios: Output GPIO pin used for ST33ZP24 power management D1/D2 state. | ||
11 | If set, power must be present when the platform is going into sleep/hibernate mode. | ||
12 | |||
13 | Optional SoC Specific Properties: | ||
14 | - pinctrl-names: Contains only one value - "default". | ||
15 | - pintctrl-0: Specifies the pin control groups used for this controller. | ||
16 | |||
17 | Example (for ARM-based BeagleBoard xM with ST33ZP24 on SPI4): | ||
18 | |||
19 | &mcspi4 { | ||
20 | |||
21 | status = "okay"; | ||
22 | |||
23 | st33zp24@0 { | ||
24 | |||
25 | compatible = "st,st33zp24-spi"; | ||
26 | |||
27 | spi-max-frequency = <10000000>; | ||
28 | |||
29 | interrupt-parent = <&gpio5>; | ||
30 | interrupts = <7 IRQ_TYPE_LEVEL_HIGH>; | ||
31 | |||
32 | lpcpd-gpios = <&gpio5 15 GPIO_ACTIVE_HIGH>; | ||
33 | }; | ||
34 | }; | ||
diff --git a/Documentation/devicetree/bindings/serial/of-serial.txt b/Documentation/devicetree/bindings/serial/8250.txt index 91d5ab0e60fc..91d5ab0e60fc 100644 --- a/Documentation/devicetree/bindings/serial/of-serial.txt +++ b/Documentation/devicetree/bindings/serial/8250.txt | |||
diff --git a/Documentation/devicetree/bindings/serial/axis,etraxfs-uart.txt b/Documentation/devicetree/bindings/serial/axis,etraxfs-uart.txt new file mode 100644 index 000000000000..ebcbb62c0a76 --- /dev/null +++ b/Documentation/devicetree/bindings/serial/axis,etraxfs-uart.txt | |||
@@ -0,0 +1,19 @@ | |||
1 | ETRAX FS UART | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "axis,etraxfs-uart" | ||
5 | - reg: offset and length of the register set for the device. | ||
6 | - interrupts: device interrupt | ||
7 | |||
8 | Optional properties: | ||
9 | - {dtr,dsr,ri,cd}-gpios: specify a GPIO for DTR/DSR/RI/CD | ||
10 | line respectively. | ||
11 | |||
12 | Example: | ||
13 | |||
14 | serial@b00260000 { | ||
15 | compatible = "axis,etraxfs-uart"; | ||
16 | reg = <0xb0026000 0x1000>; | ||
17 | interrupts = <68>; | ||
18 | status = "disabled"; | ||
19 | }; | ||
diff --git a/Documentation/devicetree/bindings/serial/bcm63xx-uart.txt b/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt index 5c52e5eef16d..5c52e5eef16d 100644 --- a/Documentation/devicetree/bindings/serial/bcm63xx-uart.txt +++ b/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt | |||
diff --git a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt index 7f76214f728a..289c40ed7470 100644 --- a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt +++ b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt | |||
@@ -21,6 +21,18 @@ Optional properties: | |||
21 | - reg-io-width : the size (in bytes) of the IO accesses that should be | 21 | - reg-io-width : the size (in bytes) of the IO accesses that should be |
22 | performed on the device. If this property is not present then single byte | 22 | performed on the device. If this property is not present then single byte |
23 | accesses are used. | 23 | accesses are used. |
24 | - dcd-override : Override the DCD modem status signal. This signal will always | ||
25 | be reported as active instead of being obtained from the modem status | ||
26 | register. Define this if your serial port does not use this pin. | ||
27 | - dsr-override : Override the DTS modem status signal. This signal will always | ||
28 | be reported as active instead of being obtained from the modem status | ||
29 | register. Define this if your serial port does not use this pin. | ||
30 | - cts-override : Override the CTS modem status signal. This signal will always | ||
31 | be reported as active instead of being obtained from the modem status | ||
32 | register. Define this if your serial port does not use this pin. | ||
33 | - ri-override : Override the RI modem status signal. This signal will always be | ||
34 | reported as inactive instead of being obtained from the modem status register. | ||
35 | Define this if your serial port does not use this pin. | ||
24 | 36 | ||
25 | Example: | 37 | Example: |
26 | 38 | ||
@@ -31,6 +43,10 @@ Example: | |||
31 | interrupts = <10>; | 43 | interrupts = <10>; |
32 | reg-shift = <2>; | 44 | reg-shift = <2>; |
33 | reg-io-width = <4>; | 45 | reg-io-width = <4>; |
46 | dcd-override; | ||
47 | dsr-override; | ||
48 | cts-override; | ||
49 | ri-override; | ||
34 | }; | 50 | }; |
35 | 51 | ||
36 | Example with one clock: | 52 | Example with one clock: |
diff --git a/Documentation/devicetree/bindings/sound/bcm2835-i2s.txt b/Documentation/devicetree/bindings/sound/brcm,bcm2835-i2s.txt index 65783de0aedf..65783de0aedf 100644 --- a/Documentation/devicetree/bindings/sound/bcm2835-i2s.txt +++ b/Documentation/devicetree/bindings/sound/brcm,bcm2835-i2s.txt | |||
diff --git a/Documentation/devicetree/bindings/sound/ingenic,jz4740-i2s.txt b/Documentation/devicetree/bindings/sound/ingenic,jz4740-i2s.txt index b41433386e2f..b623d50004fb 100644 --- a/Documentation/devicetree/bindings/sound/ingenic,jz4740-i2s.txt +++ b/Documentation/devicetree/bindings/sound/ingenic,jz4740-i2s.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | Ingenic JZ4740 I2S controller | 1 | Ingenic JZ4740 I2S controller |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "ingenic,jz4740-i2s" | 4 | - compatible : "ingenic,jz4740-i2s" or "ingenic,jz4780-i2s" |
5 | - reg : I2S registers location and length | 5 | - reg : I2S registers location and length |
6 | - clocks : AIC and I2S PLL clock specifiers. | 6 | - clocks : AIC and I2S PLL clock specifiers. |
7 | - clock-names: "aic" and "i2s" | 7 | - clock-names: "aic" and "i2s" |
diff --git a/Documentation/devicetree/bindings/sound/max98925.txt b/Documentation/devicetree/bindings/sound/max98925.txt new file mode 100644 index 000000000000..27be63e2aa0d --- /dev/null +++ b/Documentation/devicetree/bindings/sound/max98925.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | max98925 audio CODEC | ||
2 | |||
3 | This device supports I2C. | ||
4 | |||
5 | Required properties: | ||
6 | |||
7 | - compatible : "maxim,max98925" | ||
8 | |||
9 | - vmon-slot-no : slot number used to send voltage information | ||
10 | |||
11 | - imon-slot-no : slot number used to send current information | ||
12 | |||
13 | - reg : the I2C address of the device for I2C | ||
14 | |||
15 | Example: | ||
16 | |||
17 | codec: max98925@1a { | ||
18 | compatible = "maxim,max98925"; | ||
19 | vmon-slot-no = <0>; | ||
20 | imon-slot-no = <2>; | ||
21 | reg = <0x1a>; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max98090.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max98090.txt index c949abc2992f..c3495beba358 100644 --- a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max98090.txt +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max98090.txt | |||
@@ -18,6 +18,7 @@ Required properties: | |||
18 | * Headphones | 18 | * Headphones |
19 | * Speakers | 19 | * Speakers |
20 | * Mic Jack | 20 | * Mic Jack |
21 | * Int Mic | ||
21 | 22 | ||
22 | - nvidia,i2s-controller : The phandle of the Tegra I2S controller that's | 23 | - nvidia,i2s-controller : The phandle of the Tegra I2S controller that's |
23 | connected to the CODEC. | 24 | connected to the CODEC. |
diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-cpu.txt b/Documentation/devicetree/bindings/sound/qcom,lpass-cpu.txt new file mode 100644 index 000000000000..e00732dac939 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/qcom,lpass-cpu.txt | |||
@@ -0,0 +1,43 @@ | |||
1 | * Qualcomm Technologies LPASS CPU DAI | ||
2 | |||
3 | This node models the Qualcomm Technologies Low-Power Audio SubSystem (LPASS). | ||
4 | |||
5 | Required properties: | ||
6 | |||
7 | - compatible : "qcom,lpass-cpu" | ||
8 | - clocks : Must contain an entry for each entry in clock-names. | ||
9 | - clock-names : A list which must include the following entries: | ||
10 | * "ahbix-clk" | ||
11 | * "mi2s-osr-clk" | ||
12 | * "mi2s-bit-clk" | ||
13 | - interrupts : Must contain an entry for each entry in | ||
14 | interrupt-names. | ||
15 | - interrupt-names : A list which must include the following entries: | ||
16 | * "lpass-irq-lpaif" | ||
17 | - pinctrl-N : One property must exist for each entry in | ||
18 | pinctrl-names. See ../pinctrl/pinctrl-bindings.txt | ||
19 | for details of the property values. | ||
20 | - pinctrl-names : Must contain a "default" entry. | ||
21 | - reg : Must contain an address for each entry in reg-names. | ||
22 | - reg-names : A list which must include the following entries: | ||
23 | * "lpass-lpaif" | ||
24 | |||
25 | Optional properties: | ||
26 | |||
27 | - qcom,adsp : Phandle for the audio DSP node | ||
28 | |||
29 | Example: | ||
30 | |||
31 | lpass@28100000 { | ||
32 | compatible = "qcom,lpass-cpu"; | ||
33 | clocks = <&lcc AHBIX_CLK>, <&lcc MI2S_OSR_CLK>, <&lcc MI2S_BIT_CLK>; | ||
34 | clock-names = "ahbix-clk", "mi2s-osr-clk", "mi2s-bit-clk"; | ||
35 | interrupts = <0 85 1>; | ||
36 | interrupt-names = "lpass-irq-lpaif"; | ||
37 | pinctrl-names = "default", "idle"; | ||
38 | pinctrl-0 = <&mi2s_default>; | ||
39 | pinctrl-1 = <&mi2s_idle>; | ||
40 | reg = <0x28100000 0x10000>; | ||
41 | reg-names = "lpass-lpaif"; | ||
42 | qcom,adsp = <&adsp>; | ||
43 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt index 2dd690bc19cc..f316ce1f214a 100644 --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt | |||
@@ -29,9 +29,17 @@ SSI subnode properties: | |||
29 | - shared-pin : if shared clock pin | 29 | - shared-pin : if shared clock pin |
30 | - pio-transfer : use PIO transfer mode | 30 | - pio-transfer : use PIO transfer mode |
31 | - no-busif : BUSIF is not ussed when [mem -> SSI] via DMA case | 31 | - no-busif : BUSIF is not ussed when [mem -> SSI] via DMA case |
32 | - dma : Should contain Audio DMAC entry | ||
33 | - dma-names : SSI case "rx" (=playback), "tx" (=capture) | ||
34 | SSIU case "rxu" (=playback), "txu" (=capture) | ||
32 | 35 | ||
33 | SRC subnode properties: | 36 | SRC subnode properties: |
34 | no properties at this point | 37 | - dma : Should contain Audio DMAC entry |
38 | - dma-names : "rx" (=playback), "tx" (=capture) | ||
39 | |||
40 | DVC subnode properties: | ||
41 | - dma : Should contain Audio DMAC entry | ||
42 | - dma-names : "tx" (=playback/capture) | ||
35 | 43 | ||
36 | DAI subnode properties: | 44 | DAI subnode properties: |
37 | - playback : list of playback modules | 45 | - playback : list of playback modules |
@@ -45,56 +53,145 @@ rcar_sound: rcar_sound@ec500000 { | |||
45 | reg = <0 0xec500000 0 0x1000>, /* SCU */ | 53 | reg = <0 0xec500000 0 0x1000>, /* SCU */ |
46 | <0 0xec5a0000 0 0x100>, /* ADG */ | 54 | <0 0xec5a0000 0 0x100>, /* ADG */ |
47 | <0 0xec540000 0 0x1000>, /* SSIU */ | 55 | <0 0xec540000 0 0x1000>, /* SSIU */ |
48 | <0 0xec541000 0 0x1280>; /* SSI */ | 56 | <0 0xec541000 0 0x1280>, /* SSI */ |
57 | <0 0xec740000 0 0x200>; /* Audio DMAC peri peri*/ | ||
58 | reg-names = "scu", "adg", "ssiu", "ssi", "audmapp"; | ||
59 | |||
60 | clocks = <&mstp10_clks R8A7790_CLK_SSI_ALL>, | ||
61 | <&mstp10_clks R8A7790_CLK_SSI9>, <&mstp10_clks R8A7790_CLK_SSI8>, | ||
62 | <&mstp10_clks R8A7790_CLK_SSI7>, <&mstp10_clks R8A7790_CLK_SSI6>, | ||
63 | <&mstp10_clks R8A7790_CLK_SSI5>, <&mstp10_clks R8A7790_CLK_SSI4>, | ||
64 | <&mstp10_clks R8A7790_CLK_SSI3>, <&mstp10_clks R8A7790_CLK_SSI2>, | ||
65 | <&mstp10_clks R8A7790_CLK_SSI1>, <&mstp10_clks R8A7790_CLK_SSI0>, | ||
66 | <&mstp10_clks R8A7790_CLK_SCU_SRC9>, <&mstp10_clks R8A7790_CLK_SCU_SRC8>, | ||
67 | <&mstp10_clks R8A7790_CLK_SCU_SRC7>, <&mstp10_clks R8A7790_CLK_SCU_SRC6>, | ||
68 | <&mstp10_clks R8A7790_CLK_SCU_SRC5>, <&mstp10_clks R8A7790_CLK_SCU_SRC4>, | ||
69 | <&mstp10_clks R8A7790_CLK_SCU_SRC3>, <&mstp10_clks R8A7790_CLK_SCU_SRC2>, | ||
70 | <&mstp10_clks R8A7790_CLK_SCU_SRC1>, <&mstp10_clks R8A7790_CLK_SCU_SRC0>, | ||
71 | <&mstp10_clks R8A7790_CLK_SCU_DVC0>, <&mstp10_clks R8A7790_CLK_SCU_DVC1>, | ||
72 | <&audio_clk_a>, <&audio_clk_b>, <&audio_clk_c>, <&m2_clk>; | ||
73 | clock-names = "ssi-all", | ||
74 | "ssi.9", "ssi.8", "ssi.7", "ssi.6", "ssi.5", | ||
75 | "ssi.4", "ssi.3", "ssi.2", "ssi.1", "ssi.0", | ||
76 | "src.9", "src.8", "src.7", "src.6", "src.5", | ||
77 | "src.4", "src.3", "src.2", "src.1", "src.0", | ||
78 | "dvc.0", "dvc.1", | ||
79 | "clk_a", "clk_b", "clk_c", "clk_i"; | ||
49 | 80 | ||
50 | rcar_sound,dvc { | 81 | rcar_sound,dvc { |
51 | dvc0: dvc@0 { }; | 82 | dvc0: dvc@0 { |
52 | dvc1: dvc@1 { }; | 83 | dmas = <&audma0 0xbc>; |
84 | dma-names = "tx"; | ||
85 | }; | ||
86 | dvc1: dvc@1 { | ||
87 | dmas = <&audma0 0xbe>; | ||
88 | dma-names = "tx"; | ||
89 | }; | ||
53 | }; | 90 | }; |
54 | 91 | ||
55 | rcar_sound,src { | 92 | rcar_sound,src { |
56 | src0: src@0 { }; | 93 | src0: src@0 { |
57 | src1: src@1 { }; | 94 | interrupts = <0 352 IRQ_TYPE_LEVEL_HIGH>; |
58 | src2: src@2 { }; | 95 | dmas = <&audma0 0x85>, <&audma1 0x9a>; |
59 | src3: src@3 { }; | 96 | dma-names = "rx", "tx"; |
60 | src4: src@4 { }; | 97 | }; |
61 | src5: src@5 { }; | 98 | src1: src@1 { |
62 | src6: src@6 { }; | 99 | interrupts = <0 353 IRQ_TYPE_LEVEL_HIGH>; |
63 | src7: src@7 { }; | 100 | dmas = <&audma0 0x87>, <&audma1 0x9c>; |
64 | src8: src@8 { }; | 101 | dma-names = "rx", "tx"; |
65 | src9: src@9 { }; | 102 | }; |
103 | src2: src@2 { | ||
104 | interrupts = <0 354 IRQ_TYPE_LEVEL_HIGH>; | ||
105 | dmas = <&audma0 0x89>, <&audma1 0x9e>; | ||
106 | dma-names = "rx", "tx"; | ||
107 | }; | ||
108 | src3: src@3 { | ||
109 | interrupts = <0 355 IRQ_TYPE_LEVEL_HIGH>; | ||
110 | dmas = <&audma0 0x8b>, <&audma1 0xa0>; | ||
111 | dma-names = "rx", "tx"; | ||
112 | }; | ||
113 | src4: src@4 { | ||
114 | interrupts = <0 356 IRQ_TYPE_LEVEL_HIGH>; | ||
115 | dmas = <&audma0 0x8d>, <&audma1 0xb0>; | ||
116 | dma-names = "rx", "tx"; | ||
117 | }; | ||
118 | src5: src@5 { | ||
119 | interrupts = <0 357 IRQ_TYPE_LEVEL_HIGH>; | ||
120 | dmas = <&audma0 0x8f>, <&audma1 0xb2>; | ||
121 | dma-names = "rx", "tx"; | ||
122 | }; | ||
123 | src6: src@6 { | ||
124 | interrupts = <0 358 IRQ_TYPE_LEVEL_HIGH>; | ||
125 | dmas = <&audma0 0x91>, <&audma1 0xb4>; | ||
126 | dma-names = "rx", "tx"; | ||
127 | }; | ||
128 | src7: src@7 { | ||
129 | interrupts = <0 359 IRQ_TYPE_LEVEL_HIGH>; | ||
130 | dmas = <&audma0 0x93>, <&audma1 0xb6>; | ||
131 | dma-names = "rx", "tx"; | ||
132 | }; | ||
133 | src8: src@8 { | ||
134 | interrupts = <0 360 IRQ_TYPE_LEVEL_HIGH>; | ||
135 | dmas = <&audma0 0x95>, <&audma1 0xb8>; | ||
136 | dma-names = "rx", "tx"; | ||
137 | }; | ||
138 | src9: src@9 { | ||
139 | interrupts = <0 361 IRQ_TYPE_LEVEL_HIGH>; | ||
140 | dmas = <&audma0 0x97>, <&audma1 0xba>; | ||
141 | dma-names = "rx", "tx"; | ||
142 | }; | ||
66 | }; | 143 | }; |
67 | 144 | ||
68 | rcar_sound,ssi { | 145 | rcar_sound,ssi { |
69 | ssi0: ssi@0 { | 146 | ssi0: ssi@0 { |
70 | interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>; | 147 | interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>; |
148 | dmas = <&audma0 0x01>, <&audma1 0x02>, <&audma0 0x15>, <&audma1 0x16>; | ||
149 | dma-names = "rx", "tx", "rxu", "txu"; | ||
71 | }; | 150 | }; |
72 | ssi1: ssi@1 { | 151 | ssi1: ssi@1 { |
73 | interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>; | 152 | interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>; |
153 | dmas = <&audma0 0x03>, <&audma1 0x04>, <&audma0 0x49>, <&audma1 0x4a>; | ||
154 | dma-names = "rx", "tx", "rxu", "txu"; | ||
74 | }; | 155 | }; |
75 | ssi2: ssi@2 { | 156 | ssi2: ssi@2 { |
76 | interrupts = <0 372 IRQ_TYPE_LEVEL_HIGH>; | 157 | interrupts = <0 372 IRQ_TYPE_LEVEL_HIGH>; |
158 | dmas = <&audma0 0x05>, <&audma1 0x06>, <&audma0 0x63>, <&audma1 0x64>; | ||
159 | dma-names = "rx", "tx", "rxu", "txu"; | ||
77 | }; | 160 | }; |
78 | ssi3: ssi@3 { | 161 | ssi3: ssi@3 { |
79 | interrupts = <0 373 IRQ_TYPE_LEVEL_HIGH>; | 162 | interrupts = <0 373 IRQ_TYPE_LEVEL_HIGH>; |
163 | dmas = <&audma0 0x07>, <&audma1 0x08>, <&audma0 0x6f>, <&audma1 0x70>; | ||
164 | dma-names = "rx", "tx", "rxu", "txu"; | ||
80 | }; | 165 | }; |
81 | ssi4: ssi@4 { | 166 | ssi4: ssi@4 { |
82 | interrupts = <0 374 IRQ_TYPE_LEVEL_HIGH>; | 167 | interrupts = <0 374 IRQ_TYPE_LEVEL_HIGH>; |
168 | dmas = <&audma0 0x09>, <&audma1 0x0a>, <&audma0 0x71>, <&audma1 0x72>; | ||
169 | dma-names = "rx", "tx", "rxu", "txu"; | ||
83 | }; | 170 | }; |
84 | ssi5: ssi@5 { | 171 | ssi5: ssi@5 { |
85 | interrupts = <0 375 IRQ_TYPE_LEVEL_HIGH>; | 172 | interrupts = <0 375 IRQ_TYPE_LEVEL_HIGH>; |
173 | dmas = <&audma0 0x0b>, <&audma1 0x0c>, <&audma0 0x73>, <&audma1 0x74>; | ||
174 | dma-names = "rx", "tx", "rxu", "txu"; | ||
86 | }; | 175 | }; |
87 | ssi6: ssi@6 { | 176 | ssi6: ssi@6 { |
88 | interrupts = <0 376 IRQ_TYPE_LEVEL_HIGH>; | 177 | interrupts = <0 376 IRQ_TYPE_LEVEL_HIGH>; |
178 | dmas = <&audma0 0x0d>, <&audma1 0x0e>, <&audma0 0x75>, <&audma1 0x76>; | ||
179 | dma-names = "rx", "tx", "rxu", "txu"; | ||
89 | }; | 180 | }; |
90 | ssi7: ssi@7 { | 181 | ssi7: ssi@7 { |
91 | interrupts = <0 377 IRQ_TYPE_LEVEL_HIGH>; | 182 | interrupts = <0 377 IRQ_TYPE_LEVEL_HIGH>; |
183 | dmas = <&audma0 0x0f>, <&audma1 0x10>, <&audma0 0x79>, <&audma1 0x7a>; | ||
184 | dma-names = "rx", "tx", "rxu", "txu"; | ||
92 | }; | 185 | }; |
93 | ssi8: ssi@8 { | 186 | ssi8: ssi@8 { |
94 | interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>; | 187 | interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>; |
188 | dmas = <&audma0 0x11>, <&audma1 0x12>, <&audma0 0x7b>, <&audma1 0x7c>; | ||
189 | dma-names = "rx", "tx", "rxu", "txu"; | ||
95 | }; | 190 | }; |
96 | ssi9: ssi@9 { | 191 | ssi9: ssi@9 { |
97 | interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>; | 192 | interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>; |
193 | dmas = <&audma0 0x13>, <&audma1 0x14>, <&audma0 0x7d>, <&audma1 0x7e>; | ||
194 | dma-names = "rx", "tx", "rxu", "txu"; | ||
98 | }; | 195 | }; |
99 | }; | 196 | }; |
100 | 197 | ||
diff --git a/Documentation/devicetree/bindings/sound/renesas,rsrc-card.txt b/Documentation/devicetree/bindings/sound/renesas,rsrc-card.txt new file mode 100644 index 000000000000..c64155027288 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/renesas,rsrc-card.txt | |||
@@ -0,0 +1,67 @@ | |||
1 | Renesas Sampling Rate Convert Sound Card: | ||
2 | |||
3 | Renesas Sampling Rate Convert Sound Card specifies audio DAI connections of SoC <-> codec. | ||
4 | |||
5 | Required properties: | ||
6 | |||
7 | - compatible : "renesas,rsrc-card,<board>" | ||
8 | Examples with soctypes are: | ||
9 | - "renesas,rsrc-card,lager" | ||
10 | - "renesas,rsrc-card,koelsch" | ||
11 | Optional properties: | ||
12 | |||
13 | - card_name : User specified audio sound card name, one string | ||
14 | property. | ||
15 | - cpu : CPU sub-node | ||
16 | - codec : CODEC sub-node | ||
17 | |||
18 | Optional subnode properties: | ||
19 | |||
20 | - format : CPU/CODEC common audio format. | ||
21 | "i2s", "right_j", "left_j" , "dsp_a" | ||
22 | "dsp_b", "ac97", "pdm", "msb", "lsb" | ||
23 | - frame-master : Indicates dai-link frame master. | ||
24 | phandle to a cpu or codec subnode. | ||
25 | - bitclock-master : Indicates dai-link bit clock master. | ||
26 | phandle to a cpu or codec subnode. | ||
27 | - bitclock-inversion : bool property. Add this if the | ||
28 | dai-link uses bit clock inversion. | ||
29 | - frame-inversion : bool property. Add this if the | ||
30 | dai-link uses frame clock inversion. | ||
31 | - convert-rate : platform specified sampling rate convert | ||
32 | |||
33 | Required CPU/CODEC subnodes properties: | ||
34 | |||
35 | - sound-dai : phandle and port of CPU/CODEC | ||
36 | |||
37 | Optional CPU/CODEC subnodes properties: | ||
38 | |||
39 | - clocks / system-clock-frequency : specify subnode's clock if needed. | ||
40 | it can be specified via "clocks" if system has | ||
41 | clock node (= common clock), or "system-clock-frequency" | ||
42 | (if system doens't support common clock) | ||
43 | If a clock is specified, it is | ||
44 | enabled with clk_prepare_enable() | ||
45 | in dai startup() and disabled with | ||
46 | clk_disable_unprepare() in dai | ||
47 | shutdown(). | ||
48 | |||
49 | Example | ||
50 | |||
51 | sound { | ||
52 | compatible = "renesas,rsrc-card,lager"; | ||
53 | |||
54 | card-name = "rsnd-ak4643"; | ||
55 | format = "left_j"; | ||
56 | bitclock-master = <&sndcodec>; | ||
57 | frame-master = <&sndcodec>; | ||
58 | |||
59 | sndcpu: cpu { | ||
60 | sound-dai = <&rcar_sound>; | ||
61 | }; | ||
62 | |||
63 | sndcodec: codec { | ||
64 | sound-dai = <&ak4643>; | ||
65 | system-clock-frequency = <11289600>; | ||
66 | }; | ||
67 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/storm.txt b/Documentation/devicetree/bindings/sound/storm.txt new file mode 100644 index 000000000000..062a4c185fa9 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/storm.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | * Sound complex for Storm boards | ||
2 | |||
3 | Models a soundcard for Storm boards with the Qualcomm Technologies IPQ806x SOC | ||
4 | connected to a MAX98357A DAC via I2S. | ||
5 | |||
6 | Required properties: | ||
7 | |||
8 | - compatible : "google,storm-audio" | ||
9 | - cpu : Phandle of the CPU DAI | ||
10 | - codec : Phandle of the codec DAI | ||
11 | |||
12 | Optional properties: | ||
13 | |||
14 | - qcom,model : The user-visible name of this sound card. | ||
15 | |||
16 | Example: | ||
17 | |||
18 | sound { | ||
19 | compatible = "google,storm-audio"; | ||
20 | qcom,model = "ipq806x-storm"; | ||
21 | cpu = <&lpass_cpu>; | ||
22 | codec = <&max98357a>; | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/wm8804.txt b/Documentation/devicetree/bindings/sound/wm8804.txt index 4d3a56f38adc..6fd124b16496 100644 --- a/Documentation/devicetree/bindings/sound/wm8804.txt +++ b/Documentation/devicetree/bindings/sound/wm8804.txt | |||
@@ -10,6 +10,13 @@ Required properties: | |||
10 | - reg : the I2C address of the device for I2C, the chip select | 10 | - reg : the I2C address of the device for I2C, the chip select |
11 | number for SPI. | 11 | number for SPI. |
12 | 12 | ||
13 | - PVDD-supply, DVDD-supply : Power supplies for the device, as covered | ||
14 | in Documentation/devicetree/bindings/regulator/regulator.txt | ||
15 | |||
16 | Optional properties: | ||
17 | |||
18 | - wlf,reset-gpio: A GPIO specifier for the GPIO controlling the reset pin | ||
19 | |||
13 | Example: | 20 | Example: |
14 | 21 | ||
15 | codec: wm8804@1a { | 22 | codec: wm8804@1a { |
diff --git a/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt b/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt index aad527b357a0..523341a0e113 100644 --- a/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt +++ b/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt | |||
@@ -2,11 +2,21 @@ | |||
2 | (CSPI/eCSPI) for i.MX | 2 | (CSPI/eCSPI) for i.MX |
3 | 3 | ||
4 | Required properties: | 4 | Required properties: |
5 | - compatible : Should be "fsl,<soc>-cspi" or "fsl,<soc>-ecspi" | 5 | - compatible : |
6 | - "fsl,imx1-cspi" for SPI compatible with the one integrated on i.MX1 | ||
7 | - "fsl,imx21-cspi" for SPI compatible with the one integrated on i.MX21 | ||
8 | - "fsl,imx27-cspi" for SPI compatible with the one integrated on i.MX27 | ||
9 | - "fsl,imx31-cspi" for SPI compatible with the one integrated on i.MX31 | ||
10 | - "fsl,imx35-cspi" for SPI compatible with the one integrated on i.MX35 | ||
11 | - "fsl,imx51-ecspi" for SPI compatible with the one integrated on i.MX51 | ||
6 | - reg : Offset and length of the register set for the device | 12 | - reg : Offset and length of the register set for the device |
7 | - interrupts : Should contain CSPI/eCSPI interrupt | 13 | - interrupts : Should contain CSPI/eCSPI interrupt |
8 | - fsl,spi-num-chipselects : Contains the number of the chipselect | 14 | - fsl,spi-num-chipselects : Contains the number of the chipselect |
9 | - cs-gpios : Specifies the gpio pins to be used for chipselects. | 15 | - cs-gpios : Specifies the gpio pins to be used for chipselects. |
16 | - clocks : Clock specifiers for both ipg and per clocks. | ||
17 | - clock-names : Clock names should include both "ipg" and "per" | ||
18 | See the clock consumer binding, | ||
19 | Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
10 | - dmas: DMA specifiers for tx and rx dma. See the DMA client binding, | 20 | - dmas: DMA specifiers for tx and rx dma. See the DMA client binding, |
11 | Documentation/devicetree/bindings/dma/dma.txt | 21 | Documentation/devicetree/bindings/dma/dma.txt |
12 | - dma-names: DMA request names should include "tx" and "rx" if present. | 22 | - dma-names: DMA request names should include "tx" and "rx" if present. |
diff --git a/Documentation/devicetree/bindings/spi/qcom,spi-qup.txt b/Documentation/devicetree/bindings/spi/qcom,spi-qup.txt index e2c88df2cc15..5c090771c016 100644 --- a/Documentation/devicetree/bindings/spi/qcom,spi-qup.txt +++ b/Documentation/devicetree/bindings/spi/qcom,spi-qup.txt | |||
@@ -33,6 +33,11 @@ Optional properties: | |||
33 | nodes. If unspecified, a single SPI device without a chip | 33 | nodes. If unspecified, a single SPI device without a chip |
34 | select can be used. | 34 | select can be used. |
35 | 35 | ||
36 | - dmas: Two DMA channel specifiers following the convention outlined | ||
37 | in bindings/dma/dma.txt | ||
38 | - dma-names: Names for the dma channels, if present. There must be at | ||
39 | least one channel named "tx" for transmit and named "rx" for | ||
40 | receive. | ||
36 | 41 | ||
37 | SPI slave nodes must be children of the SPI master node and can contain | 42 | SPI slave nodes must be children of the SPI master node and can contain |
38 | properties described in Documentation/devicetree/bindings/spi/spi-bus.txt | 43 | properties described in Documentation/devicetree/bindings/spi/spi-bus.txt |
@@ -51,6 +56,9 @@ Example: | |||
51 | clocks = <&gcc GCC_BLSP2_QUP2_SPI_APPS_CLK>, <&gcc GCC_BLSP2_AHB_CLK>; | 56 | clocks = <&gcc GCC_BLSP2_QUP2_SPI_APPS_CLK>, <&gcc GCC_BLSP2_AHB_CLK>; |
52 | clock-names = "core", "iface"; | 57 | clock-names = "core", "iface"; |
53 | 58 | ||
59 | dmas = <&blsp1_bam 13>, <&blsp1_bam 12>; | ||
60 | dma-names = "rx", "tx"; | ||
61 | |||
54 | pinctrl-names = "default"; | 62 | pinctrl-names = "default"; |
55 | pinctrl-0 = <&spi8_default>; | 63 | pinctrl-0 = <&spi8_default>; |
56 | 64 | ||
diff --git a/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt b/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt index cbbe16ed3874..70af78a9185e 100644 --- a/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt +++ b/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt | |||
@@ -16,6 +16,12 @@ Optional property: | |||
16 | in big endian mode, otherwise in native mode(same with CPU), for more | 16 | in big endian mode, otherwise in native mode(same with CPU), for more |
17 | detail please see: Documentation/devicetree/bindings/regmap/regmap.txt. | 17 | detail please see: Documentation/devicetree/bindings/regmap/regmap.txt. |
18 | 18 | ||
19 | Optional SPI slave node properties: | ||
20 | - fsl,spi-cs-sck-delay: a delay in nanoseconds between activating chip | ||
21 | select and the start of clock signal, at the start of a transfer. | ||
22 | - fsl,spi-sck-cs-delay: a delay in nanoseconds between stopping the clock | ||
23 | signal and deactivating chip select, at the end of a transfer. | ||
24 | |||
19 | Example: | 25 | Example: |
20 | 26 | ||
21 | dspi0@4002c000 { | 27 | dspi0@4002c000 { |
@@ -43,6 +49,8 @@ dspi0@4002c000 { | |||
43 | reg = <0>; | 49 | reg = <0>; |
44 | linux,modalias = "m25p80"; | 50 | linux,modalias = "m25p80"; |
45 | modal = "at26df081a"; | 51 | modal = "at26df081a"; |
52 | fsl,spi-cs-sck-delay = <100>; | ||
53 | fsl,spi-sck-cs-delay = <50>; | ||
46 | }; | 54 | }; |
47 | }; | 55 | }; |
48 | 56 | ||
diff --git a/Documentation/devicetree/bindings/spi/spi-img-spfi.txt b/Documentation/devicetree/bindings/spi/spi-img-spfi.txt index c7dd50fb8eb2..e02fbf18c82c 100644 --- a/Documentation/devicetree/bindings/spi/spi-img-spfi.txt +++ b/Documentation/devicetree/bindings/spi/spi-img-spfi.txt | |||
@@ -14,6 +14,7 @@ Required properties: | |||
14 | - dma-names: Must include the following entries: | 14 | - dma-names: Must include the following entries: |
15 | - rx | 15 | - rx |
16 | - tx | 16 | - tx |
17 | - cs-gpios: Must specify the GPIOs used for chipselect lines. | ||
17 | - #address-cells: Must be 1. | 18 | - #address-cells: Must be 1. |
18 | - #size-cells: Must be 0. | 19 | - #size-cells: Must be 0. |
19 | 20 | ||
diff --git a/Documentation/devicetree/bindings/spi/spi-rockchip.txt b/Documentation/devicetree/bindings/spi/spi-rockchip.txt index 467dec441c62..0c491bda4c65 100644 --- a/Documentation/devicetree/bindings/spi/spi-rockchip.txt +++ b/Documentation/devicetree/bindings/spi/spi-rockchip.txt | |||
@@ -24,6 +24,9 @@ Optional Properties: | |||
24 | - dmas: DMA specifiers for tx and rx dma. See the DMA client binding, | 24 | - dmas: DMA specifiers for tx and rx dma. See the DMA client binding, |
25 | Documentation/devicetree/bindings/dma/dma.txt | 25 | Documentation/devicetree/bindings/dma/dma.txt |
26 | - dma-names: DMA request names should include "tx" and "rx" if present. | 26 | - dma-names: DMA request names should include "tx" and "rx" if present. |
27 | - rx-sample-delay-ns: nanoseconds to delay after the SCLK edge before sampling | ||
28 | Rx data (may need to be fine tuned for high capacitance lines). | ||
29 | No delay (0) by default. | ||
27 | 30 | ||
28 | 31 | ||
29 | Example: | 32 | Example: |
@@ -33,6 +36,7 @@ Example: | |||
33 | reg = <0xff110000 0x1000>; | 36 | reg = <0xff110000 0x1000>; |
34 | dmas = <&pdma1 11>, <&pdma1 12>; | 37 | dmas = <&pdma1 11>, <&pdma1 12>; |
35 | dma-names = "tx", "rx"; | 38 | dma-names = "tx", "rx"; |
39 | rx-sample-delay-ns = <10>; | ||
36 | #address-cells = <1>; | 40 | #address-cells = <1>; |
37 | #size-cells = <0>; | 41 | #size-cells = <0>; |
38 | interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>; | 42 | interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>; |
diff --git a/Documentation/devicetree/bindings/submitting-patches.txt b/Documentation/devicetree/bindings/submitting-patches.txt index 56742bc70218..7d44eae7ab0b 100644 --- a/Documentation/devicetree/bindings/submitting-patches.txt +++ b/Documentation/devicetree/bindings/submitting-patches.txt | |||
@@ -12,6 +12,9 @@ I. For patch submitters | |||
12 | 12 | ||
13 | devicetree@vger.kernel.org | 13 | devicetree@vger.kernel.org |
14 | 14 | ||
15 | and Cc: the DT maintainers. Use scripts/get_maintainer.pl to identify | ||
16 | all of the DT maintainers. | ||
17 | |||
15 | 3) The Documentation/ portion of the patch should come in the series before | 18 | 3) The Documentation/ portion of the patch should come in the series before |
16 | the code implementing the binding. | 19 | the code implementing the binding. |
17 | 20 | ||
diff --git a/Documentation/devicetree/bindings/thermal/rcar-thermal.txt b/Documentation/devicetree/bindings/thermal/rcar-thermal.txt index 43404b197933..332e625f6ed0 100644 --- a/Documentation/devicetree/bindings/thermal/rcar-thermal.txt +++ b/Documentation/devicetree/bindings/thermal/rcar-thermal.txt | |||
@@ -4,7 +4,7 @@ Required properties: | |||
4 | - compatible : "renesas,thermal-<soctype>", "renesas,rcar-thermal" | 4 | - compatible : "renesas,thermal-<soctype>", "renesas,rcar-thermal" |
5 | as fallback. | 5 | as fallback. |
6 | Examples with soctypes are: | 6 | Examples with soctypes are: |
7 | - "renesas,thermal-r8a73a4" (R-Mobile AP6) | 7 | - "renesas,thermal-r8a73a4" (R-Mobile APE6) |
8 | - "renesas,thermal-r8a7779" (R-Car H1) | 8 | - "renesas,thermal-r8a7779" (R-Car H1) |
9 | - "renesas,thermal-r8a7790" (R-Car H2) | 9 | - "renesas,thermal-r8a7790" (R-Car H2) |
10 | - "renesas,thermal-r8a7791" (R-Car M2-W) | 10 | - "renesas,thermal-r8a7791" (R-Car M2-W) |
diff --git a/Documentation/devicetree/bindings/arm/bcm/kona-timer.txt b/Documentation/devicetree/bindings/timer/brcm,kona-timer.txt index 39adf54b4388..39adf54b4388 100644 --- a/Documentation/devicetree/bindings/arm/bcm/kona-timer.txt +++ b/Documentation/devicetree/bindings/timer/brcm,kona-timer.txt | |||
diff --git a/Documentation/devicetree/bindings/unittest.txt b/Documentation/devicetree/bindings/unittest.txt index 8933211f32f9..3bf58c20fe94 100644 --- a/Documentation/devicetree/bindings/unittest.txt +++ b/Documentation/devicetree/bindings/unittest.txt | |||
@@ -1,60 +1,60 @@ | |||
1 | 1) OF selftest platform device | 1 | 1) OF unittest platform device |
2 | 2 | ||
3 | ** selftest | 3 | ** unittest |
4 | 4 | ||
5 | Required properties: | 5 | Required properties: |
6 | - compatible: must be "selftest" | 6 | - compatible: must be "unittest" |
7 | 7 | ||
8 | All other properties are optional. | 8 | All other properties are optional. |
9 | 9 | ||
10 | Example: | 10 | Example: |
11 | selftest { | 11 | unittest { |
12 | compatible = "selftest"; | 12 | compatible = "unittest"; |
13 | status = "okay"; | 13 | status = "okay"; |
14 | }; | 14 | }; |
15 | 15 | ||
16 | 2) OF selftest i2c adapter platform device | 16 | 2) OF unittest i2c adapter platform device |
17 | 17 | ||
18 | ** platform device unittest adapter | 18 | ** platform device unittest adapter |
19 | 19 | ||
20 | Required properties: | 20 | Required properties: |
21 | - compatible: must be selftest-i2c-bus | 21 | - compatible: must be unittest-i2c-bus |
22 | 22 | ||
23 | Children nodes contain selftest i2c devices. | 23 | Children nodes contain unittest i2c devices. |
24 | 24 | ||
25 | Example: | 25 | Example: |
26 | selftest-i2c-bus { | 26 | unittest-i2c-bus { |
27 | compatible = "selftest-i2c-bus"; | 27 | compatible = "unittest-i2c-bus"; |
28 | status = "okay"; | 28 | status = "okay"; |
29 | }; | 29 | }; |
30 | 30 | ||
31 | 3) OF selftest i2c device | 31 | 3) OF unittest i2c device |
32 | 32 | ||
33 | ** I2C selftest device | 33 | ** I2C unittest device |
34 | 34 | ||
35 | Required properties: | 35 | Required properties: |
36 | - compatible: must be selftest-i2c-dev | 36 | - compatible: must be unittest-i2c-dev |
37 | 37 | ||
38 | All other properties are optional | 38 | All other properties are optional |
39 | 39 | ||
40 | Example: | 40 | Example: |
41 | selftest-i2c-dev { | 41 | unittest-i2c-dev { |
42 | compatible = "selftest-i2c-dev"; | 42 | compatible = "unittest-i2c-dev"; |
43 | status = "okay"; | 43 | status = "okay"; |
44 | }; | 44 | }; |
45 | 45 | ||
46 | 4) OF selftest i2c mux device | 46 | 4) OF unittest i2c mux device |
47 | 47 | ||
48 | ** I2C selftest mux | 48 | ** I2C unittest mux |
49 | 49 | ||
50 | Required properties: | 50 | Required properties: |
51 | - compatible: must be selftest-i2c-mux | 51 | - compatible: must be unittest-i2c-mux |
52 | 52 | ||
53 | Children nodes contain selftest i2c bus nodes per channel. | 53 | Children nodes contain unittest i2c bus nodes per channel. |
54 | 54 | ||
55 | Example: | 55 | Example: |
56 | selftest-i2c-mux { | 56 | unittest-i2c-mux { |
57 | compatible = "selftest-i2c-mux"; | 57 | compatible = "unittest-i2c-mux"; |
58 | status = "okay"; | 58 | status = "okay"; |
59 | #address-cells = <1>; | 59 | #address-cells = <1>; |
60 | #size-cells = <0>; | 60 | #size-cells = <0>; |
@@ -64,7 +64,7 @@ Example: | |||
64 | #size-cells = <0>; | 64 | #size-cells = <0>; |
65 | i2c-dev { | 65 | i2c-dev { |
66 | reg = <8>; | 66 | reg = <8>; |
67 | compatible = "selftest-i2c-dev"; | 67 | compatible = "unittest-i2c-dev"; |
68 | status = "okay"; | 68 | status = "okay"; |
69 | }; | 69 | }; |
70 | }; | 70 | }; |
diff --git a/Documentation/devicetree/bindings/mips/brcm/usb.txt b/Documentation/devicetree/bindings/usb/brcm,bcm3384-usb.txt index 452c45c7bf29..452c45c7bf29 100644 --- a/Documentation/devicetree/bindings/mips/brcm/usb.txt +++ b/Documentation/devicetree/bindings/usb/brcm,bcm3384-usb.txt | |||
diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt index cd7f0454e13a..5cc364309edb 100644 --- a/Documentation/devicetree/bindings/usb/dwc3.txt +++ b/Documentation/devicetree/bindings/usb/dwc3.txt | |||
@@ -14,6 +14,7 @@ Optional properties: | |||
14 | - phys: from the *Generic PHY* bindings | 14 | - phys: from the *Generic PHY* bindings |
15 | - phy-names: from the *Generic PHY* bindings | 15 | - phy-names: from the *Generic PHY* bindings |
16 | - tx-fifo-resize: determines if the FIFO *has* to be reallocated. | 16 | - tx-fifo-resize: determines if the FIFO *has* to be reallocated. |
17 | - snps,usb3_lpm_capable: determines if platform is USB3 LPM capable | ||
17 | - snps,disable_scramble_quirk: true when SW should disable data scrambling. | 18 | - snps,disable_scramble_quirk: true when SW should disable data scrambling. |
18 | Only really useful for FPGA builds. | 19 | Only really useful for FPGA builds. |
19 | - snps,has-lpm-erratum: true when DWC3 was configured with LPM Erratum enabled | 20 | - snps,has-lpm-erratum: true when DWC3 was configured with LPM Erratum enabled |
diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt index 61b045b6d50e..dc2a18f0b3a1 100644 --- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt +++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt | |||
@@ -15,7 +15,10 @@ Optional properties: | |||
15 | - phys: phandle + phy specifier pair | 15 | - phys: phandle + phy specifier pair |
16 | - phy-names: must be "usb" | 16 | - phy-names: must be "usb" |
17 | - dmas: Must contain a list of references to DMA specifiers. | 17 | - dmas: Must contain a list of references to DMA specifiers. |
18 | - dma-names : Must contain a list of DMA names, "tx" or "rx". | 18 | - dma-names : Must contain a list of DMA names: |
19 | - tx0 ... tx<n> | ||
20 | - rx0 ... rx<n> | ||
21 | - This <n> means DnFIFO in USBHS module. | ||
19 | 22 | ||
20 | Example: | 23 | Example: |
21 | usbhs: usb@e6590000 { | 24 | usbhs: usb@e6590000 { |
diff --git a/Documentation/devicetree/bindings/usb/usbmisc-imx.txt b/Documentation/devicetree/bindings/usb/usbmisc-imx.txt index c101a4b17131..3539d4e7d23e 100644 --- a/Documentation/devicetree/bindings/usb/usbmisc-imx.txt +++ b/Documentation/devicetree/bindings/usb/usbmisc-imx.txt | |||
@@ -5,6 +5,7 @@ Required properties: | |||
5 | - compatible: Should be one of below: | 5 | - compatible: Should be one of below: |
6 | "fsl,imx6q-usbmisc" for imx6q | 6 | "fsl,imx6q-usbmisc" for imx6q |
7 | "fsl,vf610-usbmisc" for Vybrid vf610 | 7 | "fsl,vf610-usbmisc" for Vybrid vf610 |
8 | "fsl,imx6sx-usbmisc" for imx6sx | ||
8 | - reg: Should contain registers location and length | 9 | - reg: Should contain registers location and length |
9 | 10 | ||
10 | Examples: | 11 | Examples: |
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index 4326f52eba73..aecec35594ee 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt | |||
@@ -17,10 +17,12 @@ altr Altera Corp. | |||
17 | amcc Applied Micro Circuits Corporation (APM, formally AMCC) | 17 | amcc Applied Micro Circuits Corporation (APM, formally AMCC) |
18 | amd Advanced Micro Devices (AMD), Inc. | 18 | amd Advanced Micro Devices (AMD), Inc. |
19 | amlogic Amlogic, Inc. | 19 | amlogic Amlogic, Inc. |
20 | ampire Ampire Co., Ltd. | ||
20 | ams AMS AG | 21 | ams AMS AG |
21 | amstaos AMS-Taos Inc. | 22 | amstaos AMS-Taos Inc. |
22 | apm Applied Micro Circuits Corporation (APM) | 23 | apm Applied Micro Circuits Corporation (APM) |
23 | aptina Aptina Imaging | 24 | aptina Aptina Imaging |
25 | arasan Arasan Chip Systems | ||
24 | arm ARM Ltd. | 26 | arm ARM Ltd. |
25 | armadeus ARMadeus Systems SARL | 27 | armadeus ARMadeus Systems SARL |
26 | asahi-kasei Asahi Kasei Corp. | 28 | asahi-kasei Asahi Kasei Corp. |
@@ -28,6 +30,7 @@ atmel Atmel Corporation | |||
28 | auo AU Optronics Corporation | 30 | auo AU Optronics Corporation |
29 | avago Avago Technologies | 31 | avago Avago Technologies |
30 | avic Shanghai AVIC Optoelectronics Co., Ltd. | 32 | avic Shanghai AVIC Optoelectronics Co., Ltd. |
33 | axis Axis Communications AB | ||
31 | bosch Bosch Sensortec GmbH | 34 | bosch Bosch Sensortec GmbH |
32 | brcm Broadcom Corporation | 35 | brcm Broadcom Corporation |
33 | buffalo Buffalo, Inc. | 36 | buffalo Buffalo, Inc. |
@@ -36,6 +39,7 @@ capella Capella Microsystems, Inc | |||
36 | cavium Cavium, Inc. | 39 | cavium Cavium, Inc. |
37 | cdns Cadence Design Systems Inc. | 40 | cdns Cadence Design Systems Inc. |
38 | chipidea Chipidea, Inc | 41 | chipidea Chipidea, Inc |
42 | chipone ChipOne | ||
39 | chipspark ChipSPARK | 43 | chipspark ChipSPARK |
40 | chrp Common Hardware Reference Platform | 44 | chrp Common Hardware Reference Platform |
41 | chunghwa Chunghwa Picture Tubes Ltd. | 45 | chunghwa Chunghwa Picture Tubes Ltd. |
@@ -77,6 +81,7 @@ geniatech Geniatech, Inc. | |||
77 | giantplus Giantplus Technology Co., Ltd. | 81 | giantplus Giantplus Technology Co., Ltd. |
78 | globalscale Globalscale Technologies, Inc. | 82 | globalscale Globalscale Technologies, Inc. |
79 | gmt Global Mixed-mode Technology, Inc. | 83 | gmt Global Mixed-mode Technology, Inc. |
84 | goodix Shenzhen Huiding Technology Co., Ltd. | ||
80 | google Google, Inc. | 85 | google Google, Inc. |
81 | gumstix Gumstix, Inc. | 86 | gumstix Gumstix, Inc. |
82 | gw Gateworks Corporation | 87 | gw Gateworks Corporation |
@@ -124,6 +129,7 @@ mxicy Macronix International Co., Ltd. | |||
124 | national National Semiconductor | 129 | national National Semiconductor |
125 | neonode Neonode Inc. | 130 | neonode Neonode Inc. |
126 | netgear NETGEAR | 131 | netgear NETGEAR |
132 | netlogic Broadcom Corporation (formerly NetLogic Microsystems) | ||
127 | newhaven Newhaven Display International | 133 | newhaven Newhaven Display International |
128 | nintendo Nintendo | 134 | nintendo Nintendo |
129 | nokia Nokia | 135 | nokia Nokia |
@@ -131,6 +137,7 @@ nvidia NVIDIA | |||
131 | nxp NXP Semiconductors | 137 | nxp NXP Semiconductors |
132 | onnn ON Semiconductor Corp. | 138 | onnn ON Semiconductor Corp. |
133 | opencores OpenCores.org | 139 | opencores OpenCores.org |
140 | ortustech Ortus Technology Co., Ltd. | ||
134 | ovti OmniVision Technologies | 141 | ovti OmniVision Technologies |
135 | panasonic Panasonic Corporation | 142 | panasonic Panasonic Corporation |
136 | parade Parade Technologies Inc. | 143 | parade Parade Technologies Inc. |
@@ -166,6 +173,7 @@ sii Seiko Instruments, Inc. | |||
166 | silergy Silergy Corp. | 173 | silergy Silergy Corp. |
167 | sirf SiRF Technology, Inc. | 174 | sirf SiRF Technology, Inc. |
168 | sitronix Sitronix Technology Corporation | 175 | sitronix Sitronix Technology Corporation |
176 | skyworks Skyworks Solutions, Inc. | ||
169 | smsc Standard Microsystems Corporation | 177 | smsc Standard Microsystems Corporation |
170 | snps Synopsys, Inc. | 178 | snps Synopsys, Inc. |
171 | solidrun SolidRun | 179 | solidrun SolidRun |
@@ -193,6 +201,7 @@ voipac Voipac Technologies s.r.o. | |||
193 | winbond Winbond Electronics corp. | 201 | winbond Winbond Electronics corp. |
194 | wlf Wolfson Microelectronics | 202 | wlf Wolfson Microelectronics |
195 | wm Wondermedia Technologies, Inc. | 203 | wm Wondermedia Technologies, Inc. |
204 | x-powers X-Powers | ||
196 | xes Extreme Engineering Solutions (X-ES) | 205 | xes Extreme Engineering Solutions (X-ES) |
197 | xillybus Xillybus Ltd. | 206 | xillybus Xillybus Ltd. |
198 | xlnx Xilinx | 207 | xlnx Xilinx |
diff --git a/Documentation/devicetree/bindings/video/backlight/sky81452-backlight.txt b/Documentation/devicetree/bindings/video/backlight/sky81452-backlight.txt new file mode 100644 index 000000000000..8bf2940f54bc --- /dev/null +++ b/Documentation/devicetree/bindings/video/backlight/sky81452-backlight.txt | |||
@@ -0,0 +1,29 @@ | |||
1 | SKY81452-backlight bindings | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Must be "skyworks,sky81452-backlight" | ||
5 | |||
6 | Optional properties: | ||
7 | - name : Name of backlight device. Default is 'lcd-backlight'. | ||
8 | - gpios : GPIO to use to EN pin. | ||
9 | See Documentation/devicetree/bindings/gpio/gpio.txt | ||
10 | - led-sources : List of enabled channels from 0 to 5. | ||
11 | See Documentation/devicetree/bindings/leds/common.txt | ||
12 | - skyworks,ignore-pwm : Ignore both PWM input | ||
13 | - skyworks,dpwm-mode : Enable DPWM dimming mode, otherwise Analog dimming. | ||
14 | - skyworks,phase-shift : Enable phase shift mode | ||
15 | - skyworks,short-detection-threshold-volt | ||
16 | : It should be one of 4, 5, 6 and 7V. | ||
17 | - skyworks,current-limit-mA | ||
18 | : It should be 2300mA or 2750mA. | ||
19 | |||
20 | Example: | ||
21 | |||
22 | backlight { | ||
23 | compatible = "skyworks,sky81452-backlight"; | ||
24 | name = "pwm-backlight"; | ||
25 | led-sources = <0 1 2 5>; | ||
26 | skyworks,ignore-pwm; | ||
27 | skyworks,phase-shift; | ||
28 | skyworks,current-limit-mA = <2300>; | ||
29 | }; | ||
diff --git a/Documentation/devicetree/bindings/watchdog/atmel-wdt.txt b/Documentation/devicetree/bindings/watchdog/atmel-wdt.txt index f90e294d7631..a4d869744f59 100644 --- a/Documentation/devicetree/bindings/watchdog/atmel-wdt.txt +++ b/Documentation/devicetree/bindings/watchdog/atmel-wdt.txt | |||
@@ -26,6 +26,11 @@ Optional properties: | |||
26 | - atmel,disable : Should be present if you want to disable the watchdog. | 26 | - atmel,disable : Should be present if you want to disable the watchdog. |
27 | - atmel,idle-halt : Should be present if you want to stop the watchdog when | 27 | - atmel,idle-halt : Should be present if you want to stop the watchdog when |
28 | entering idle state. | 28 | entering idle state. |
29 | CAUTION: This property should be used with care, it actually makes the | ||
30 | watchdog not counting when the CPU is in idle state, therefore the | ||
31 | watchdog reset time depends on mean CPU usage and will not reset at all | ||
32 | if the CPU stop working while it is in idle state, which is probably | ||
33 | not what you want. | ||
29 | - atmel,dbg-halt : Should be present if you want to stop the watchdog when | 34 | - atmel,dbg-halt : Should be present if you want to stop the watchdog when |
30 | entering debug state. | 35 | entering debug state. |
31 | 36 | ||
diff --git a/Documentation/devicetree/bindings/arm/bcm/kona-wdt.txt b/Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.txt index 2b86a00e351d..2b86a00e351d 100644 --- a/Documentation/devicetree/bindings/arm/bcm/kona-wdt.txt +++ b/Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.txt | |||
diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt index 77685185cf3b..e49e423268c0 100644 --- a/Documentation/devicetree/booting-without-of.txt +++ b/Documentation/devicetree/booting-without-of.txt | |||
@@ -15,6 +15,7 @@ Table of Contents | |||
15 | 1) Entry point for arch/arm | 15 | 1) Entry point for arch/arm |
16 | 2) Entry point for arch/powerpc | 16 | 2) Entry point for arch/powerpc |
17 | 3) Entry point for arch/x86 | 17 | 3) Entry point for arch/x86 |
18 | 4) Entry point for arch/mips/bmips | ||
18 | 19 | ||
19 | II - The DT block format | 20 | II - The DT block format |
20 | 1) Header | 21 | 1) Header |
@@ -288,6 +289,33 @@ it with special cases. | |||
288 | or initrd address. It simply holds information which can not be retrieved | 289 | or initrd address. It simply holds information which can not be retrieved |
289 | otherwise like interrupt routing or a list of devices behind an I2C bus. | 290 | otherwise like interrupt routing or a list of devices behind an I2C bus. |
290 | 291 | ||
292 | 4) Entry point for arch/mips/bmips | ||
293 | ---------------------------------- | ||
294 | |||
295 | Some bootloaders only support a single entry point, at the start of the | ||
296 | kernel image. Other bootloaders will jump to the ELF start address. | ||
297 | Both schemes are supported; CONFIG_BOOT_RAW=y and CONFIG_NO_EXCEPT_FILL=y, | ||
298 | so the first instruction immediately jumps to kernel_entry(). | ||
299 | |||
300 | Similar to the arch/arm case (b), a DT-aware bootloader is expected to | ||
301 | set up the following registers: | ||
302 | |||
303 | a0 : 0 | ||
304 | |||
305 | a1 : 0xffffffff | ||
306 | |||
307 | a2 : Physical pointer to the device tree block (defined in chapter | ||
308 | II) in RAM. The device tree can be located anywhere in the first | ||
309 | 512MB of the physical address space (0x00000000 - 0x1fffffff), | ||
310 | aligned on a 64 bit boundary. | ||
311 | |||
312 | Legacy bootloaders do not use this convention, and they do not pass in a | ||
313 | DT block. In this case, Linux will look for a builtin DTB, selected via | ||
314 | CONFIG_DT_*. | ||
315 | |||
316 | This convention is defined for 32-bit systems only, as there are not | ||
317 | currently any 64-bit BMIPS implementations. | ||
318 | |||
291 | II - The DT block format | 319 | II - The DT block format |
292 | ======================== | 320 | ======================== |
293 | 321 | ||
diff --git a/Documentation/devicetree/of_selftest.txt b/Documentation/devicetree/of_unittest.txt index 57a808b588bf..3e4e7d48ae93 100644 --- a/Documentation/devicetree/of_selftest.txt +++ b/Documentation/devicetree/of_unittest.txt | |||
@@ -1,11 +1,11 @@ | |||
1 | Open Firmware Device Tree Selftest | 1 | Open Firmware Device Tree Unittest |
2 | ---------------------------------- | 2 | ---------------------------------- |
3 | 3 | ||
4 | Author: Gaurav Minocha <gaurav.minocha.os@gmail.com> | 4 | Author: Gaurav Minocha <gaurav.minocha.os@gmail.com> |
5 | 5 | ||
6 | 1. Introduction | 6 | 1. Introduction |
7 | 7 | ||
8 | This document explains how the test data required for executing OF selftest | 8 | This document explains how the test data required for executing OF unittest |
9 | is attached to the live tree dynamically, independent of the machine's | 9 | is attached to the live tree dynamically, independent of the machine's |
10 | architecture. | 10 | architecture. |
11 | 11 | ||
@@ -22,31 +22,31 @@ most of the device drivers in various use cases. | |||
22 | 22 | ||
23 | 2. Test-data | 23 | 2. Test-data |
24 | 24 | ||
25 | The Device Tree Source file (drivers/of/testcase-data/testcases.dts) contains | 25 | The Device Tree Source file (drivers/of/unittest-data/testcases.dts) contains |
26 | the test data required for executing the unit tests automated in | 26 | the test data required for executing the unit tests automated in |
27 | drivers/of/selftests.c. Currently, following Device Tree Source Include files | 27 | drivers/of/unittest.c. Currently, following Device Tree Source Include files |
28 | (.dtsi) are included in testcase.dts: | 28 | (.dtsi) are included in testcases.dts: |
29 | 29 | ||
30 | drivers/of/testcase-data/tests-interrupts.dtsi | 30 | drivers/of/unittest-data/tests-interrupts.dtsi |
31 | drivers/of/testcase-data/tests-platform.dtsi | 31 | drivers/of/unittest-data/tests-platform.dtsi |
32 | drivers/of/testcase-data/tests-phandle.dtsi | 32 | drivers/of/unittest-data/tests-phandle.dtsi |
33 | drivers/of/testcase-data/tests-match.dtsi | 33 | drivers/of/unittest-data/tests-match.dtsi |
34 | 34 | ||
35 | When the kernel is build with OF_SELFTEST enabled, then the following make rule | 35 | When the kernel is build with OF_SELFTEST enabled, then the following make rule |
36 | 36 | ||
37 | $(obj)/%.dtb: $(src)/%.dts FORCE | 37 | $(obj)/%.dtb: $(src)/%.dts FORCE |
38 | $(call if_changed_dep, dtc) | 38 | $(call if_changed_dep, dtc) |
39 | 39 | ||
40 | is used to compile the DT source file (testcase.dts) into a binary blob | 40 | is used to compile the DT source file (testcases.dts) into a binary blob |
41 | (testcase.dtb), also referred as flattened DT. | 41 | (testcases.dtb), also referred as flattened DT. |
42 | 42 | ||
43 | After that, using the following rule the binary blob above is wrapped as an | 43 | After that, using the following rule the binary blob above is wrapped as an |
44 | assembly file (testcase.dtb.S). | 44 | assembly file (testcases.dtb.S). |
45 | 45 | ||
46 | $(obj)/%.dtb.S: $(obj)/%.dtb | 46 | $(obj)/%.dtb.S: $(obj)/%.dtb |
47 | $(call cmd, dt_S_dtb) | 47 | $(call cmd, dt_S_dtb) |
48 | 48 | ||
49 | The assembly file is compiled into an object file (testcase.dtb.o), and is | 49 | The assembly file is compiled into an object file (testcases.dtb.o), and is |
50 | linked into the kernel image. | 50 | linked into the kernel image. |
51 | 51 | ||
52 | 52 | ||
@@ -98,7 +98,7 @@ child11 -> sibling12 -> sibling13 -> sibling14 -> null | |||
98 | Figure 1: Generic structure of un-flattened device tree | 98 | Figure 1: Generic structure of un-flattened device tree |
99 | 99 | ||
100 | 100 | ||
101 | Before executing OF selftest, it is required to attach the test data to | 101 | Before executing OF unittest, it is required to attach the test data to |
102 | machine's device tree (if present). So, when selftest_data_add() is called, | 102 | machine's device tree (if present). So, when selftest_data_add() is called, |
103 | at first it reads the flattened device tree data linked into the kernel image | 103 | at first it reads the flattened device tree data linked into the kernel image |
104 | via the following kernel symbols: | 104 | via the following kernel symbols: |
diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt index 6d1e8eeb5990..e1e2bbd7a404 100644 --- a/Documentation/driver-model/devres.txt +++ b/Documentation/driver-model/devres.txt | |||
@@ -289,6 +289,10 @@ IRQ | |||
289 | devm_request_irq() | 289 | devm_request_irq() |
290 | devm_request_threaded_irq() | 290 | devm_request_threaded_irq() |
291 | 291 | ||
292 | LED | ||
293 | devm_led_classdev_register() | ||
294 | devm_led_classdev_unregister() | ||
295 | |||
292 | MDIO | 296 | MDIO |
293 | devm_mdiobus_alloc() | 297 | devm_mdiobus_alloc() |
294 | devm_mdiobus_alloc_size() | 298 | devm_mdiobus_alloc_size() |
diff --git a/Documentation/email-clients.txt b/Documentation/email-clients.txt index eede6088f978..c7d49b885559 100644 --- a/Documentation/email-clients.txt +++ b/Documentation/email-clients.txt | |||
@@ -211,7 +211,7 @@ Thunderbird (GUI) | |||
211 | Thunderbird is an Outlook clone that likes to mangle text, but there are ways | 211 | Thunderbird is an Outlook clone that likes to mangle text, but there are ways |
212 | to coerce it into behaving. | 212 | to coerce it into behaving. |
213 | 213 | ||
214 | - Allows use of an external editor: | 214 | - Allow use of an external editor: |
215 | The easiest thing to do with Thunderbird and patches is to use an | 215 | The easiest thing to do with Thunderbird and patches is to use an |
216 | "external editor" extension and then just use your favorite $EDITOR | 216 | "external editor" extension and then just use your favorite $EDITOR |
217 | for reading/merging patches into the body text. To do this, download | 217 | for reading/merging patches into the body text. To do this, download |
@@ -219,6 +219,15 @@ to coerce it into behaving. | |||
219 | View->Toolbars->Customize... and finally just click on it when in the | 219 | View->Toolbars->Customize... and finally just click on it when in the |
220 | Compose dialog. | 220 | Compose dialog. |
221 | 221 | ||
222 | Please note that "external editor" requires that your editor must not | ||
223 | fork, or in other words, the editor must not return before closing. | ||
224 | You may have to pass additional flags or change the settings of your | ||
225 | editor. Most notably if you are using gvim then you must pass the -f | ||
226 | option to gvim by putting "/usr/bin/gvim -f" (if the binary is in | ||
227 | /usr/bin) to the text editor field in "external editor" settings. If you | ||
228 | are using some other editor then please read its manual to find out how | ||
229 | to do this. | ||
230 | |||
222 | To beat some sense out of the internal editor, do this: | 231 | To beat some sense out of the internal editor, do this: |
223 | 232 | ||
224 | - Edit your Thunderbird config settings so that it won't use format=flowed. | 233 | - Edit your Thunderbird config settings so that it won't use format=flowed. |
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index f91926f2f482..0a926e2ba3ab 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -196,7 +196,7 @@ prototypes: | |||
196 | void (*invalidatepage) (struct page *, unsigned int, unsigned int); | 196 | void (*invalidatepage) (struct page *, unsigned int, unsigned int); |
197 | int (*releasepage) (struct page *, int); | 197 | int (*releasepage) (struct page *, int); |
198 | void (*freepage)(struct page *); | 198 | void (*freepage)(struct page *); |
199 | int (*direct_IO)(int, struct kiocb *, struct iov_iter *iter, loff_t offset); | 199 | int (*direct_IO)(struct kiocb *, struct iov_iter *iter, loff_t offset); |
200 | int (*migratepage)(struct address_space *, struct page *, struct page *); | 200 | int (*migratepage)(struct address_space *, struct page *, struct page *); |
201 | int (*launder_page)(struct page *); | 201 | int (*launder_page)(struct page *); |
202 | int (*is_partially_uptodate)(struct page *, unsigned long, unsigned long); | 202 | int (*is_partially_uptodate)(struct page *, unsigned long, unsigned long); |
@@ -429,8 +429,6 @@ prototypes: | |||
429 | loff_t (*llseek) (struct file *, loff_t, int); | 429 | loff_t (*llseek) (struct file *, loff_t, int); |
430 | ssize_t (*read) (struct file *, char __user *, size_t, loff_t *); | 430 | ssize_t (*read) (struct file *, char __user *, size_t, loff_t *); |
431 | ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); | 431 | ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); |
432 | ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); | ||
433 | ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); | ||
434 | ssize_t (*read_iter) (struct kiocb *, struct iov_iter *); | 432 | ssize_t (*read_iter) (struct kiocb *, struct iov_iter *); |
435 | ssize_t (*write_iter) (struct kiocb *, struct iov_iter *); | 433 | ssize_t (*write_iter) (struct kiocb *, struct iov_iter *); |
436 | int (*iterate) (struct file *, struct dir_context *); | 434 | int (*iterate) (struct file *, struct dir_context *); |
@@ -525,6 +523,7 @@ prototypes: | |||
525 | void (*close)(struct vm_area_struct*); | 523 | void (*close)(struct vm_area_struct*); |
526 | int (*fault)(struct vm_area_struct*, struct vm_fault *); | 524 | int (*fault)(struct vm_area_struct*, struct vm_fault *); |
527 | int (*page_mkwrite)(struct vm_area_struct *, struct vm_fault *); | 525 | int (*page_mkwrite)(struct vm_area_struct *, struct vm_fault *); |
526 | int (*pfn_mkwrite)(struct vm_area_struct *, struct vm_fault *); | ||
528 | int (*access)(struct vm_area_struct *, unsigned long, void*, int, int); | 527 | int (*access)(struct vm_area_struct *, unsigned long, void*, int, int); |
529 | 528 | ||
530 | locking rules: | 529 | locking rules: |
@@ -534,6 +533,7 @@ close: yes | |||
534 | fault: yes can return with page locked | 533 | fault: yes can return with page locked |
535 | map_pages: yes | 534 | map_pages: yes |
536 | page_mkwrite: yes can return with page locked | 535 | page_mkwrite: yes can return with page locked |
536 | pfn_mkwrite: yes | ||
537 | access: yes | 537 | access: yes |
538 | 538 | ||
539 | ->fault() is called when a previously not present pte is about | 539 | ->fault() is called when a previously not present pte is about |
@@ -560,6 +560,12 @@ the page has been truncated, the filesystem should not look up a new page | |||
560 | like the ->fault() handler, but simply return with VM_FAULT_NOPAGE, which | 560 | like the ->fault() handler, but simply return with VM_FAULT_NOPAGE, which |
561 | will cause the VM to retry the fault. | 561 | will cause the VM to retry the fault. |
562 | 562 | ||
563 | ->pfn_mkwrite() is the same as page_mkwrite but when the pte is | ||
564 | VM_PFNMAP or VM_MIXEDMAP with a page-less entry. Expected return is | ||
565 | VM_FAULT_NOPAGE. Or one of the VM_FAULT_ERROR types. The default behavior | ||
566 | after this call is to make the pte read-write, unless pfn_mkwrite returns | ||
567 | an error. | ||
568 | |||
563 | ->access() is called when get_user_pages() fails in | 569 | ->access() is called when get_user_pages() fails in |
564 | access_process_vm(), typically used to debug a process through | 570 | access_process_vm(), typically used to debug a process through |
565 | /proc/pid/mem or ptrace. This function is needed only for | 571 | /proc/pid/mem or ptrace. This function is needed only for |
diff --git a/Documentation/filesystems/dlmfs.txt b/Documentation/filesystems/dlmfs.txt index 1b528b2ad809..fcf4d509d118 100644 --- a/Documentation/filesystems/dlmfs.txt +++ b/Documentation/filesystems/dlmfs.txt | |||
@@ -5,8 +5,8 @@ system. | |||
5 | 5 | ||
6 | dlmfs is built with OCFS2 as it requires most of its infrastructure. | 6 | dlmfs is built with OCFS2 as it requires most of its infrastructure. |
7 | 7 | ||
8 | Project web page: http://oss.oracle.com/projects/ocfs2 | 8 | Project web page: http://ocfs2.wiki.kernel.org |
9 | Tools web page: http://oss.oracle.com/projects/ocfs2-tools | 9 | Tools web page: https://github.com/markfasheh/ocfs2-tools |
10 | OCFS2 mailing lists: http://oss.oracle.com/projects/ocfs2/mailman/ | 10 | OCFS2 mailing lists: http://oss.oracle.com/projects/ocfs2/mailman/ |
11 | 11 | ||
12 | All code copyright 2005 Oracle except when otherwise noted. | 12 | All code copyright 2005 Oracle except when otherwise noted. |
diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt index dac11d7fef27..e9e750e59efc 100644 --- a/Documentation/filesystems/f2fs.txt +++ b/Documentation/filesystems/f2fs.txt | |||
@@ -140,6 +140,12 @@ nobarrier This option can be used if underlying storage guarantees | |||
140 | fastboot This option is used when a system wants to reduce mount | 140 | fastboot This option is used when a system wants to reduce mount |
141 | time as much as possible, even though normal performance | 141 | time as much as possible, even though normal performance |
142 | can be sacrificed. | 142 | can be sacrificed. |
143 | extent_cache Enable an extent cache based on rb-tree, it can cache | ||
144 | as many as extent which map between contiguous logical | ||
145 | address and physical address per inode, resulting in | ||
146 | increasing the cache hit ratio. | ||
147 | noinline_data Disable the inline data feature, inline data feature is | ||
148 | enabled by default. | ||
143 | 149 | ||
144 | ================================================================================ | 150 | ================================================================================ |
145 | DEBUGFS ENTRIES | 151 | DEBUGFS ENTRIES |
diff --git a/Documentation/filesystems/ocfs2.txt b/Documentation/filesystems/ocfs2.txt index 28f8c08201e2..4c49e5410595 100644 --- a/Documentation/filesystems/ocfs2.txt +++ b/Documentation/filesystems/ocfs2.txt | |||
@@ -8,8 +8,8 @@ also make it attractive for non-clustered use. | |||
8 | You'll want to install the ocfs2-tools package in order to at least | 8 | You'll want to install the ocfs2-tools package in order to at least |
9 | get "mount.ocfs2" and "ocfs2_hb_ctl". | 9 | get "mount.ocfs2" and "ocfs2_hb_ctl". |
10 | 10 | ||
11 | Project web page: http://oss.oracle.com/projects/ocfs2 | 11 | Project web page: http://ocfs2.wiki.kernel.org |
12 | Tools web page: http://oss.oracle.com/projects/ocfs2-tools | 12 | Tools git tree: https://github.com/markfasheh/ocfs2-tools |
13 | OCFS2 mailing lists: http://oss.oracle.com/projects/ocfs2/mailman/ | 13 | OCFS2 mailing lists: http://oss.oracle.com/projects/ocfs2/mailman/ |
14 | 14 | ||
15 | All code copyright 2005 Oracle except when otherwise noted. | 15 | All code copyright 2005 Oracle except when otherwise noted. |
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index fa2db081505e..e69274de8d0c 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting | |||
@@ -471,3 +471,15 @@ in your dentry operations instead. | |||
471 | [mandatory] | 471 | [mandatory] |
472 | f_dentry is gone; use f_path.dentry, or, better yet, see if you can avoid | 472 | f_dentry is gone; use f_path.dentry, or, better yet, see if you can avoid |
473 | it entirely. | 473 | it entirely. |
474 | -- | ||
475 | [mandatory] | ||
476 | never call ->read() and ->write() directly; use __vfs_{read,write} or | ||
477 | wrappers; instead of checking for ->write or ->read being NULL, look for | ||
478 | FMODE_CAN_{WRITE,READ} in file->f_mode. | ||
479 | -- | ||
480 | [mandatory] | ||
481 | do _not_ use new_sync_{read,write} for ->read/->write; leave it NULL | ||
482 | instead. | ||
483 | -- | ||
484 | [mandatory] | ||
485 | ->aio_read/->aio_write are gone. Use ->read_iter/->write_iter. | ||
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index a07ba61662ed..c3b6b301d8b0 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -200,12 +200,12 @@ contains details information about the process itself. Its fields are | |||
200 | explained in Table 1-4. | 200 | explained in Table 1-4. |
201 | 201 | ||
202 | (for SMP CONFIG users) | 202 | (for SMP CONFIG users) |
203 | For making accounting scalable, RSS related information are handled in | 203 | For making accounting scalable, RSS related information are handled in an |
204 | asynchronous manner and the vaule may not be very precise. To see a precise | 204 | asynchronous manner and the value may not be very precise. To see a precise |
205 | snapshot of a moment, you can see /proc/<pid>/smaps file and scan page table. | 205 | snapshot of a moment, you can see /proc/<pid>/smaps file and scan page table. |
206 | It's slow but very precise. | 206 | It's slow but very precise. |
207 | 207 | ||
208 | Table 1-2: Contents of the status files (as of 2.6.30-rc7) | 208 | Table 1-2: Contents of the status files (as of 3.20.0) |
209 | .............................................................................. | 209 | .............................................................................. |
210 | Field Content | 210 | Field Content |
211 | Name filename of the executable | 211 | Name filename of the executable |
@@ -213,6 +213,7 @@ Table 1-2: Contents of the status files (as of 2.6.30-rc7) | |||
213 | in an uninterruptible wait, Z is zombie, | 213 | in an uninterruptible wait, Z is zombie, |
214 | T is traced or stopped) | 214 | T is traced or stopped) |
215 | Tgid thread group ID | 215 | Tgid thread group ID |
216 | Ngid NUMA group ID (0 if none) | ||
216 | Pid process id | 217 | Pid process id |
217 | PPid process id of the parent process | 218 | PPid process id of the parent process |
218 | TracerPid PID of process tracing this process (0 if not) | 219 | TracerPid PID of process tracing this process (0 if not) |
@@ -220,6 +221,10 @@ Table 1-2: Contents of the status files (as of 2.6.30-rc7) | |||
220 | Gid Real, effective, saved set, and file system GIDs | 221 | Gid Real, effective, saved set, and file system GIDs |
221 | FDSize number of file descriptor slots currently allocated | 222 | FDSize number of file descriptor slots currently allocated |
222 | Groups supplementary group list | 223 | Groups supplementary group list |
224 | NStgid descendant namespace thread group ID hierarchy | ||
225 | NSpid descendant namespace process ID hierarchy | ||
226 | NSpgid descendant namespace process group ID hierarchy | ||
227 | NSsid descendant namespace session ID hierarchy | ||
223 | VmPeak peak virtual memory size | 228 | VmPeak peak virtual memory size |
224 | VmSize total program size | 229 | VmSize total program size |
225 | VmLck locked memory size | 230 | VmLck locked memory size |
@@ -1255,9 +1260,9 @@ Various pieces of information about kernel activity are available in the | |||
1255 | since the system first booted. For a quick look, simply cat the file: | 1260 | since the system first booted. For a quick look, simply cat the file: |
1256 | 1261 | ||
1257 | > cat /proc/stat | 1262 | > cat /proc/stat |
1258 | cpu 2255 34 2290 22625563 6290 127 456 0 0 | 1263 | cpu 2255 34 2290 22625563 6290 127 456 0 0 0 |
1259 | cpu0 1132 34 1441 11311718 3675 127 438 0 0 | 1264 | cpu0 1132 34 1441 11311718 3675 127 438 0 0 0 |
1260 | cpu1 1123 0 849 11313845 2614 0 18 0 0 | 1265 | cpu1 1123 0 849 11313845 2614 0 18 0 0 0 |
1261 | intr 114930548 113199788 3 0 5 263 0 4 [... lots more numbers ...] | 1266 | intr 114930548 113199788 3 0 5 263 0 4 [... lots more numbers ...] |
1262 | ctxt 1990473 | 1267 | ctxt 1990473 |
1263 | btime 1062191376 | 1268 | btime 1062191376 |
@@ -1704,6 +1709,10 @@ A typical output is | |||
1704 | flags: 0100002 | 1709 | flags: 0100002 |
1705 | mnt_id: 19 | 1710 | mnt_id: 19 |
1706 | 1711 | ||
1712 | All locks associated with a file descriptor are shown in its fdinfo too. | ||
1713 | |||
1714 | lock: 1: FLOCK ADVISORY WRITE 359 00:13:11691 0 EOF | ||
1715 | |||
1707 | The files such as eventfd, fsnotify, signalfd, epoll among the regular pos/flags | 1716 | The files such as eventfd, fsnotify, signalfd, epoll among the regular pos/flags |
1708 | pair provide additional information particular to the objects they represent. | 1717 | pair provide additional information particular to the objects they represent. |
1709 | 1718 | ||
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 966b22829f3b..5d833b32bbcd 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -590,7 +590,7 @@ struct address_space_operations { | |||
590 | void (*invalidatepage) (struct page *, unsigned int, unsigned int); | 590 | void (*invalidatepage) (struct page *, unsigned int, unsigned int); |
591 | int (*releasepage) (struct page *, int); | 591 | int (*releasepage) (struct page *, int); |
592 | void (*freepage)(struct page *); | 592 | void (*freepage)(struct page *); |
593 | ssize_t (*direct_IO)(int, struct kiocb *, struct iov_iter *iter, loff_t offset); | 593 | ssize_t (*direct_IO)(struct kiocb *, struct iov_iter *iter, loff_t offset); |
594 | /* migrate the contents of a page to the specified target */ | 594 | /* migrate the contents of a page to the specified target */ |
595 | int (*migratepage) (struct page *, struct page *); | 595 | int (*migratepage) (struct page *, struct page *); |
596 | int (*launder_page) (struct page *); | 596 | int (*launder_page) (struct page *); |
@@ -804,8 +804,6 @@ struct file_operations { | |||
804 | loff_t (*llseek) (struct file *, loff_t, int); | 804 | loff_t (*llseek) (struct file *, loff_t, int); |
805 | ssize_t (*read) (struct file *, char __user *, size_t, loff_t *); | 805 | ssize_t (*read) (struct file *, char __user *, size_t, loff_t *); |
806 | ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); | 806 | ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); |
807 | ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); | ||
808 | ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); | ||
809 | ssize_t (*read_iter) (struct kiocb *, struct iov_iter *); | 807 | ssize_t (*read_iter) (struct kiocb *, struct iov_iter *); |
810 | ssize_t (*write_iter) (struct kiocb *, struct iov_iter *); | 808 | ssize_t (*write_iter) (struct kiocb *, struct iov_iter *); |
811 | int (*iterate) (struct file *, struct dir_context *); | 809 | int (*iterate) (struct file *, struct dir_context *); |
@@ -838,14 +836,10 @@ otherwise noted. | |||
838 | 836 | ||
839 | read: called by read(2) and related system calls | 837 | read: called by read(2) and related system calls |
840 | 838 | ||
841 | aio_read: vectored, possibly asynchronous read | ||
842 | |||
843 | read_iter: possibly asynchronous read with iov_iter as destination | 839 | read_iter: possibly asynchronous read with iov_iter as destination |
844 | 840 | ||
845 | write: called by write(2) and related system calls | 841 | write: called by write(2) and related system calls |
846 | 842 | ||
847 | aio_write: vectored, possibly asynchronous write | ||
848 | |||
849 | write_iter: possibly asynchronous write with iov_iter as source | 843 | write_iter: possibly asynchronous write with iov_iter as source |
850 | 844 | ||
851 | iterate: called when the VFS needs to read the directory contents | 845 | iterate: called when the VFS needs to read the directory contents |
diff --git a/Documentation/gpio/board.txt b/Documentation/gpio/board.txt index 8b35f51fe7b6..b80606de545a 100644 --- a/Documentation/gpio/board.txt +++ b/Documentation/gpio/board.txt | |||
@@ -50,10 +50,43 @@ gpiod_is_active_low(power) will be true). | |||
50 | 50 | ||
51 | ACPI | 51 | ACPI |
52 | ---- | 52 | ---- |
53 | ACPI does not support function names for GPIOs. Therefore, only the "idx" | 53 | ACPI also supports function names for GPIOs in a similar fashion to DT. |
54 | argument of gpiod_get_index() is useful to discriminate between GPIOs assigned | 54 | The above DT example can be converted to an equivalent ACPI description |
55 | to a device. The "con_id" argument can still be set for debugging purposes (it | 55 | with the help of _DSD (Device Specific Data), introduced in ACPI 5.1: |
56 | will appear under error messages as well as debug and sysfs nodes). | 56 | |
57 | Device (FOO) { | ||
58 | Name (_CRS, ResourceTemplate () { | ||
59 | GpioIo (Exclusive, ..., IoRestrictionOutputOnly, | ||
60 | "\\_SB.GPI0") {15} // red | ||
61 | GpioIo (Exclusive, ..., IoRestrictionOutputOnly, | ||
62 | "\\_SB.GPI0") {16} // green | ||
63 | GpioIo (Exclusive, ..., IoRestrictionOutputOnly, | ||
64 | "\\_SB.GPI0") {17} // blue | ||
65 | GpioIo (Exclusive, ..., IoRestrictionOutputOnly, | ||
66 | "\\_SB.GPI0") {1} // power | ||
67 | }) | ||
68 | |||
69 | Name (_DSD, Package () { | ||
70 | ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), | ||
71 | Package () { | ||
72 | Package () { | ||
73 | "led-gpios", | ||
74 | Package () { | ||
75 | ^FOO, 0, 0, 1, | ||
76 | ^FOO, 1, 0, 1, | ||
77 | ^FOO, 2, 0, 1, | ||
78 | } | ||
79 | }, | ||
80 | Package () { | ||
81 | "power-gpios", | ||
82 | Package () {^FOO, 3, 0, 0}, | ||
83 | }, | ||
84 | } | ||
85 | }) | ||
86 | } | ||
87 | |||
88 | For more information about the ACPI GPIO bindings see | ||
89 | Documentation/acpi/gpio-properties.txt. | ||
57 | 90 | ||
58 | Platform Data | 91 | Platform Data |
59 | ------------- | 92 | ------------- |
diff --git a/Documentation/gpio/consumer.txt b/Documentation/gpio/consumer.txt index d85fbae451ea..c21c1313f09e 100644 --- a/Documentation/gpio/consumer.txt +++ b/Documentation/gpio/consumer.txt | |||
@@ -58,7 +58,6 @@ pattern where a GPIO is optional, the gpiod_get_optional() and | |||
58 | gpiod_get_index_optional() functions can be used. These functions return NULL | 58 | gpiod_get_index_optional() functions can be used. These functions return NULL |
59 | instead of -ENOENT if no GPIO has been assigned to the requested function: | 59 | instead of -ENOENT if no GPIO has been assigned to the requested function: |
60 | 60 | ||
61 | |||
62 | struct gpio_desc *gpiod_get_optional(struct device *dev, | 61 | struct gpio_desc *gpiod_get_optional(struct device *dev, |
63 | const char *con_id, | 62 | const char *con_id, |
64 | enum gpiod_flags flags) | 63 | enum gpiod_flags flags) |
@@ -68,6 +67,27 @@ instead of -ENOENT if no GPIO has been assigned to the requested function: | |||
68 | unsigned int index, | 67 | unsigned int index, |
69 | enum gpiod_flags flags) | 68 | enum gpiod_flags flags) |
70 | 69 | ||
70 | For a function using multiple GPIOs all of those can be obtained with one call: | ||
71 | |||
72 | struct gpio_descs *gpiod_get_array(struct device *dev, | ||
73 | const char *con_id, | ||
74 | enum gpiod_flags flags) | ||
75 | |||
76 | This function returns a struct gpio_descs which contains an array of | ||
77 | descriptors: | ||
78 | |||
79 | struct gpio_descs { | ||
80 | unsigned int ndescs; | ||
81 | struct gpio_desc *desc[]; | ||
82 | } | ||
83 | |||
84 | The following function returns NULL instead of -ENOENT if no GPIOs have been | ||
85 | assigned to the requested function: | ||
86 | |||
87 | struct gpio_descs *gpiod_get_array_optional(struct device *dev, | ||
88 | const char *con_id, | ||
89 | enum gpiod_flags flags) | ||
90 | |||
71 | Device-managed variants of these functions are also defined: | 91 | Device-managed variants of these functions are also defined: |
72 | 92 | ||
73 | struct gpio_desc *devm_gpiod_get(struct device *dev, const char *con_id, | 93 | struct gpio_desc *devm_gpiod_get(struct device *dev, const char *con_id, |
@@ -82,20 +102,37 @@ Device-managed variants of these functions are also defined: | |||
82 | const char *con_id, | 102 | const char *con_id, |
83 | enum gpiod_flags flags) | 103 | enum gpiod_flags flags) |
84 | 104 | ||
85 | struct gpio_desc * devm_gpiod_get_index_optional(struct device *dev, | 105 | struct gpio_desc *devm_gpiod_get_index_optional(struct device *dev, |
86 | const char *con_id, | 106 | const char *con_id, |
87 | unsigned int index, | 107 | unsigned int index, |
88 | enum gpiod_flags flags) | 108 | enum gpiod_flags flags) |
89 | 109 | ||
110 | struct gpio_descs *devm_gpiod_get_array(struct device *dev, | ||
111 | const char *con_id, | ||
112 | enum gpiod_flags flags) | ||
113 | |||
114 | struct gpio_descs *devm_gpiod_get_array_optional(struct device *dev, | ||
115 | const char *con_id, | ||
116 | enum gpiod_flags flags) | ||
117 | |||
90 | A GPIO descriptor can be disposed of using the gpiod_put() function: | 118 | A GPIO descriptor can be disposed of using the gpiod_put() function: |
91 | 119 | ||
92 | void gpiod_put(struct gpio_desc *desc) | 120 | void gpiod_put(struct gpio_desc *desc) |
93 | 121 | ||
94 | It is strictly forbidden to use a descriptor after calling this function. The | 122 | For an array of GPIOs this function can be used: |
95 | device-managed variant is, unsurprisingly: | 123 | |
124 | void gpiod_put_array(struct gpio_descs *descs) | ||
125 | |||
126 | It is strictly forbidden to use a descriptor after calling these functions. | ||
127 | It is also not allowed to individually release descriptors (using gpiod_put()) | ||
128 | from an array acquired with gpiod_get_array(). | ||
129 | |||
130 | The device-managed variants are, unsurprisingly: | ||
96 | 131 | ||
97 | void devm_gpiod_put(struct device *dev, struct gpio_desc *desc) | 132 | void devm_gpiod_put(struct device *dev, struct gpio_desc *desc) |
98 | 133 | ||
134 | void devm_gpiod_put_array(struct device *dev, struct gpio_descs *descs) | ||
135 | |||
99 | 136 | ||
100 | Using GPIOs | 137 | Using GPIOs |
101 | =========== | 138 | =========== |
@@ -222,6 +259,26 @@ GPIOs belonging to the same bank or chip simultaneously if supported by the | |||
222 | corresponding chip driver. In that case a significantly improved performance | 259 | corresponding chip driver. In that case a significantly improved performance |
223 | can be expected. If simultaneous setting is not possible the GPIOs will be set | 260 | can be expected. If simultaneous setting is not possible the GPIOs will be set |
224 | sequentially. | 261 | sequentially. |
262 | |||
263 | The gpiod_set_array() functions take three arguments: | ||
264 | * array_size - the number of array elements | ||
265 | * desc_array - an array of GPIO descriptors | ||
266 | * value_array - an array of values to assign to the GPIOs | ||
267 | |||
268 | The descriptor array can be obtained using the gpiod_get_array() function | ||
269 | or one of its variants. If the group of descriptors returned by that function | ||
270 | matches the desired group of GPIOs, those GPIOs can be set by simply using | ||
271 | the struct gpio_descs returned by gpiod_get_array(): | ||
272 | |||
273 | struct gpio_descs *my_gpio_descs = gpiod_get_array(...); | ||
274 | gpiod_set_array(my_gpio_descs->ndescs, my_gpio_descs->desc, | ||
275 | my_gpio_values); | ||
276 | |||
277 | It is also possible to set a completely arbitrary array of descriptors. The | ||
278 | descriptors may be obtained using any combination of gpiod_get() and | ||
279 | gpiod_get_array(). Afterwards the array of descriptors has to be setup | ||
280 | manually before it can be used with gpiod_set_array(). | ||
281 | |||
225 | Note that for optimal performance GPIOs belonging to the same chip should be | 282 | Note that for optimal performance GPIOs belonging to the same chip should be |
226 | contiguous within the array of descriptors. | 283 | contiguous within the array of descriptors. |
227 | 284 | ||
diff --git a/Documentation/hid/hid-sensor.txt b/Documentation/hid/hid-sensor.txt index 948b0989c433..b287752a31cd 100644 --- a/Documentation/hid/hid-sensor.txt +++ b/Documentation/hid/hid-sensor.txt | |||
@@ -138,3 +138,87 @@ accelerometer wants to poll X axis value, then it can call this function with | |||
138 | the usage id of X axis. HID sensors can provide events, so this is not necessary | 138 | the usage id of X axis. HID sensors can provide events, so this is not necessary |
139 | to poll for any field. If there is some new sample, the core driver will call | 139 | to poll for any field. If there is some new sample, the core driver will call |
140 | registered callback function to process the sample. | 140 | registered callback function to process the sample. |
141 | |||
142 | |||
143 | ---------- | ||
144 | |||
145 | HID Custom and generic Sensors | ||
146 | |||
147 | HID Sensor specification defines two special sensor usage types. Since they | ||
148 | don't represent a standard sensor, it is not possible to define using Linux IIO | ||
149 | type interfaces. | ||
150 | The purpose of these sensors is to extend the functionality or provide a | ||
151 | way to obfuscate the data being communicated by a sensor. Without knowing the | ||
152 | mapping between the data and its encapsulated form, it is difficult for | ||
153 | an application/driver to determine what data is being communicated by the sensor. | ||
154 | This allows some differentiating use cases, where vendor can provide applications. | ||
155 | Some common use cases are debug other sensors or to provide some events like | ||
156 | keyboard attached/detached or lid open/close. | ||
157 | |||
158 | To allow application to utilize these sensors, here they are exported uses sysfs | ||
159 | attribute groups, attributes and misc device interface. | ||
160 | |||
161 | An example of this representation on sysfs: | ||
162 | /sys/devices/pci0000:00/INT33C2:00/i2c-0/i2c-INT33D1:00/0018:8086:09FA.0001/HID-SENSOR-2000e1.6.auto$ tree -R | ||
163 | . | ||
164 | ????????? enable_sensor | ||
165 | ????????? feature-0-200316 | ||
166 | ??????? ????????? feature-0-200316-maximum | ||
167 | ??????? ????????? feature-0-200316-minimum | ||
168 | ??????? ????????? feature-0-200316-name | ||
169 | ??????? ????????? feature-0-200316-size | ||
170 | ??????? ????????? feature-0-200316-unit-expo | ||
171 | ??????? ????????? feature-0-200316-units | ||
172 | ??????? ????????? feature-0-200316-value | ||
173 | ????????? feature-1-200201 | ||
174 | ??????? ????????? feature-1-200201-maximum | ||
175 | ??????? ????????? feature-1-200201-minimum | ||
176 | ??????? ????????? feature-1-200201-name | ||
177 | ??????? ????????? feature-1-200201-size | ||
178 | ??????? ????????? feature-1-200201-unit-expo | ||
179 | ??????? ????????? feature-1-200201-units | ||
180 | ??????? ????????? feature-1-200201-value | ||
181 | ????????? input-0-200201 | ||
182 | ??????? ????????? input-0-200201-maximum | ||
183 | ??????? ????????? input-0-200201-minimum | ||
184 | ??????? ????????? input-0-200201-name | ||
185 | ??????? ????????? input-0-200201-size | ||
186 | ??????? ????????? input-0-200201-unit-expo | ||
187 | ??????? ????????? input-0-200201-units | ||
188 | ??????? ????????? input-0-200201-value | ||
189 | ????????? input-1-200202 | ||
190 | ??????? ????????? input-1-200202-maximum | ||
191 | ??????? ????????? input-1-200202-minimum | ||
192 | ??????? ????????? input-1-200202-name | ||
193 | ??????? ????????? input-1-200202-size | ||
194 | ??????? ????????? input-1-200202-unit-expo | ||
195 | ??????? ????????? input-1-200202-units | ||
196 | ??????? ????????? input-1-200202-value | ||
197 | |||
198 | Here there is a custom sensors with four fields, two feature and two inputs. | ||
199 | Each field is represented by a set of attributes. All fields except the "value" | ||
200 | are read only. The value field is a RW field. | ||
201 | Example | ||
202 | /sys/bus/platform/devices/HID-SENSOR-2000e1.6.auto/feature-0-200316$ grep -r . * | ||
203 | feature-0-200316-maximum:6 | ||
204 | feature-0-200316-minimum:0 | ||
205 | feature-0-200316-name:property-reporting-state | ||
206 | feature-0-200316-size:1 | ||
207 | feature-0-200316-unit-expo:0 | ||
208 | feature-0-200316-units:25 | ||
209 | feature-0-200316-value:1 | ||
210 | |||
211 | How to enable such sensor? | ||
212 | By default sensor can be power gated. To enable sysfs attribute "enable" can be | ||
213 | used. | ||
214 | $ echo 1 > enable_sensor | ||
215 | |||
216 | Once enabled and powered on, sensor can report value using HID reports. | ||
217 | These reports are pushed using misc device interface in a FIFO order. | ||
218 | /dev$ tree | grep HID-SENSOR-2000e1.6.auto | ||
219 | ??????? ????????? 10:53 -> ../HID-SENSOR-2000e1.6.auto | ||
220 | ????????? HID-SENSOR-2000e1.6.auto | ||
221 | |||
222 | Each reports can be of variable length preceded by a header. This header | ||
223 | consist of a 32 bit usage id, 64 bit time stamp and 32 bit length field of raw | ||
224 | data. | ||
diff --git a/Documentation/hwmon/it87 b/Documentation/hwmon/it87 index fe80e9adebfa..e87294878334 100644 --- a/Documentation/hwmon/it87 +++ b/Documentation/hwmon/it87 | |||
@@ -6,6 +6,10 @@ Supported chips: | |||
6 | Prefix: 'it8603' | 6 | Prefix: 'it8603' |
7 | Addresses scanned: from Super I/O config space (8 I/O ports) | 7 | Addresses scanned: from Super I/O config space (8 I/O ports) |
8 | Datasheet: Not publicly available | 8 | Datasheet: Not publicly available |
9 | * IT8620E | ||
10 | Prefix: 'it8620' | ||
11 | Addresses scanned: from Super I/O config space (8 I/O ports) | ||
12 | Datasheet: Not publicly available | ||
9 | * IT8705F | 13 | * IT8705F |
10 | Prefix: 'it87' | 14 | Prefix: 'it87' |
11 | Addresses scanned: from Super I/O config space (8 I/O ports) | 15 | Addresses scanned: from Super I/O config space (8 I/O ports) |
@@ -42,6 +46,10 @@ Supported chips: | |||
42 | Prefix: 'it8772' | 46 | Prefix: 'it8772' |
43 | Addresses scanned: from Super I/O config space (8 I/O ports) | 47 | Addresses scanned: from Super I/O config space (8 I/O ports) |
44 | Datasheet: Not publicly available | 48 | Datasheet: Not publicly available |
49 | * IT8781F | ||
50 | Prefix: 'it8781' | ||
51 | Addresses scanned: from Super I/O config space (8 I/O ports) | ||
52 | Datasheet: Not publicly available | ||
45 | * IT8782F | 53 | * IT8782F |
46 | Prefix: 'it8782' | 54 | Prefix: 'it8782' |
47 | Addresses scanned: from Super I/O config space (8 I/O ports) | 55 | Addresses scanned: from Super I/O config space (8 I/O ports) |
@@ -50,6 +58,14 @@ Supported chips: | |||
50 | Prefix: 'it8783' | 58 | Prefix: 'it8783' |
51 | Addresses scanned: from Super I/O config space (8 I/O ports) | 59 | Addresses scanned: from Super I/O config space (8 I/O ports) |
52 | Datasheet: Not publicly available | 60 | Datasheet: Not publicly available |
61 | * IT8786E | ||
62 | Prefix: 'it8786' | ||
63 | Addresses scanned: from Super I/O config space (8 I/O ports) | ||
64 | Datasheet: Not publicly available | ||
65 | * IT8790E | ||
66 | Prefix: 'it8790' | ||
67 | Addresses scanned: from Super I/O config space (8 I/O ports) | ||
68 | Datasheet: Not publicly available | ||
53 | * SiS950 [clone of IT8705F] | 69 | * SiS950 [clone of IT8705F] |
54 | Prefix: 'it87' | 70 | Prefix: 'it87' |
55 | Addresses scanned: from Super I/O config space (8 I/O ports) | 71 | Addresses scanned: from Super I/O config space (8 I/O ports) |
@@ -94,9 +110,10 @@ motherboard models. | |||
94 | Description | 110 | Description |
95 | ----------- | 111 | ----------- |
96 | 112 | ||
97 | This driver implements support for the IT8603E, IT8623E, IT8705F, IT8712F, | 113 | This driver implements support for the IT8603E, IT8620E, IT8623E, IT8705F, |
98 | IT8716F, IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8758E, IT8771E, | 114 | IT8712F, IT8716F, IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8758E, |
99 | IT8772E, IT8782F, IT8783E/F, and SiS950 chips. | 115 | IT8771E, IT8772E, IT8781F, IT8782F, IT8783E/F, IT8786E, IT8790E, and SiS950 |
116 | chips. | ||
100 | 117 | ||
101 | These chips are 'Super I/O chips', supporting floppy disks, infrared ports, | 118 | These chips are 'Super I/O chips', supporting floppy disks, infrared ports, |
102 | joysticks and other miscellaneous stuff. For hardware monitoring, they | 119 | joysticks and other miscellaneous stuff. For hardware monitoring, they |
@@ -120,11 +137,11 @@ The IT8716F, IT8718F, IT8720F, IT8721F/IT8758E and later IT8712F revisions | |||
120 | have support for 2 additional fans. The additional fans are supported by the | 137 | have support for 2 additional fans. The additional fans are supported by the |
121 | driver. | 138 | driver. |
122 | 139 | ||
123 | The IT8716F, IT8718F, IT8720F, IT8721F/IT8758E, IT8782F, IT8783E/F, and late | 140 | The IT8716F, IT8718F, IT8720F, IT8721F/IT8758E, IT8781F, IT8782F, IT8783E/F, |
124 | IT8712F and IT8705F also have optional 16-bit tachometer counters for fans 1 to | 141 | and late IT8712F and IT8705F also have optional 16-bit tachometer counters |
125 | 3. This is better (no more fan clock divider mess) but not compatible with the | 142 | for fans 1 to 3. This is better (no more fan clock divider mess) but not |
126 | older chips and revisions. The 16-bit tachometer mode is enabled by the driver | 143 | compatible with the older chips and revisions. The 16-bit tachometer mode |
127 | when one of the above chips is detected. | 144 | is enabled by the driver when one of the above chips is detected. |
128 | 145 | ||
129 | The IT8726F is just bit enhanced IT8716F with additional hardware | 146 | The IT8726F is just bit enhanced IT8716F with additional hardware |
130 | for AMD power sequencing. Therefore the chip will appear as IT8716F | 147 | for AMD power sequencing. Therefore the chip will appear as IT8716F |
@@ -134,8 +151,13 @@ The IT8728F, IT8771E, and IT8772E are considered compatible with the IT8721F, | |||
134 | until a datasheet becomes available (hopefully.) | 151 | until a datasheet becomes available (hopefully.) |
135 | 152 | ||
136 | The IT8603E/IT8623E is a custom design, hardware monitoring part is similar to | 153 | The IT8603E/IT8623E is a custom design, hardware monitoring part is similar to |
137 | IT8728F. It only supports 16-bit fan mode, the full speed mode of the | 154 | IT8728F. It only supports 3 fans, 16-bit fan mode, and the full speed mode |
138 | fan is not supported (value 0 of pwmX_enable). | 155 | of the fan is not supported (value 0 of pwmX_enable). |
156 | |||
157 | The IT8620E is another custom design, hardware monitoring part is similar to | ||
158 | IT8728F. It only supports 16-bit fan mode. | ||
159 | |||
160 | The IT8790E supports up to 3 fans. 16-bit fan mode is always enabled. | ||
139 | 161 | ||
140 | Temperatures are measured in degrees Celsius. An alarm is triggered once | 162 | Temperatures are measured in degrees Celsius. An alarm is triggered once |
141 | when the Overtemperature Shutdown limit is crossed. | 163 | when the Overtemperature Shutdown limit is crossed. |
@@ -156,10 +178,10 @@ inputs can measure voltages between 0 and 4.08 volts, with a resolution of | |||
156 | 0.016 volt (except IT8603E, IT8721F/IT8758E and IT8728F: 0.012 volt.) The | 178 | 0.016 volt (except IT8603E, IT8721F/IT8758E and IT8728F: 0.012 volt.) The |
157 | battery voltage in8 does not have limit registers. | 179 | battery voltage in8 does not have limit registers. |
158 | 180 | ||
159 | On the IT8603E, IT8721F/IT8758E, IT8782F, and IT8783E/F, some voltage inputs | 181 | On the IT8603E, IT8721F/IT8758E, IT8781F, IT8782F, and IT8783E/F, some |
160 | are internal and scaled inside the chip: | 182 | voltage inputs are internal and scaled inside the chip: |
161 | * in3 (optional) | 183 | * in3 (optional) |
162 | * in7 (optional for IT8782F and IT8783E/F) | 184 | * in7 (optional for IT8781F, IT8782F, and IT8783E/F) |
163 | * in8 (always) | 185 | * in8 (always) |
164 | * in9 (relevant for IT8603E only) | 186 | * in9 (relevant for IT8603E only) |
165 | The driver handles this transparently so user-space doesn't have to care. | 187 | The driver handles this transparently so user-space doesn't have to care. |
diff --git a/Documentation/hwmon/jc42 b/Documentation/hwmon/jc42 index f3893f7440de..f7f1830a2566 100644 --- a/Documentation/hwmon/jc42 +++ b/Documentation/hwmon/jc42 | |||
@@ -11,12 +11,10 @@ Supported chips: | |||
11 | http://www.atmel.com/Images/doc8711.pdf | 11 | http://www.atmel.com/Images/doc8711.pdf |
12 | http://www.atmel.com/Images/Atmel-8852-SEEPROM-AT30TSE002A-Datasheet.pdf | 12 | http://www.atmel.com/Images/Atmel-8852-SEEPROM-AT30TSE002A-Datasheet.pdf |
13 | http://www.atmel.com/Images/Atmel-8868-DTS-AT30TSE004A-Datasheet.pdf | 13 | http://www.atmel.com/Images/Atmel-8868-DTS-AT30TSE004A-Datasheet.pdf |
14 | * IDT TSE2002B3, TSE2002GB2, TS3000B3, TS3000GB2 | 14 | * IDT TSE2002B3, TSE2002GB2, TSE2004GB2, TS3000B3, TS3000GB0, TS3000GB2, |
15 | TS3001GB2 | ||
15 | Datasheets: | 16 | Datasheets: |
16 | http://www.idt.com/sites/default/files/documents/IDT_TSE2002B3C_DST_20100512_120303152056.pdf | 17 | Available from IDT web site |
17 | http://www.idt.com/sites/default/files/documents/IDT_TSE2002GB2A1_DST_20111107_120303145914.pdf | ||
18 | http://www.idt.com/sites/default/files/documents/IDT_TS3000B3A_DST_20101129_120303152013.pdf | ||
19 | http://www.idt.com/sites/default/files/documents/IDT_TS3000GB2A1_DST_20111104_120303151012.pdf | ||
20 | * Maxim MAX6604 | 18 | * Maxim MAX6604 |
21 | Datasheets: | 19 | Datasheets: |
22 | http://datasheets.maxim-ic.com/en/ds/MAX6604.pdf | 20 | http://datasheets.maxim-ic.com/en/ds/MAX6604.pdf |
diff --git a/Documentation/hwmon/nct7904 b/Documentation/hwmon/nct7904 new file mode 100644 index 000000000000..014f112e2a14 --- /dev/null +++ b/Documentation/hwmon/nct7904 | |||
@@ -0,0 +1,60 @@ | |||
1 | Kernel driver nct7904 | ||
2 | ==================== | ||
3 | |||
4 | Supported chip: | ||
5 | * Nuvoton NCT7904D | ||
6 | Prefix: nct7904 | ||
7 | Addresses: I2C 0x2d, 0x2e | ||
8 | Datasheet: Publicly available at Nuvoton website | ||
9 | http://www.nuvoton.com/ | ||
10 | |||
11 | Author: Vadim V. Vlasov <vvlasov@dev.rtsoft.ru> | ||
12 | |||
13 | |||
14 | Description | ||
15 | ----------- | ||
16 | |||
17 | The NCT7904D is a hardware monitor supporting up to 20 voltage sensors, | ||
18 | internal temperature sensor, Intel PECI and AMD SB-TSI CPU temperature | ||
19 | interface, up to 12 fan tachometer inputs, up to 4 fan control channels | ||
20 | with SmartFan. | ||
21 | |||
22 | |||
23 | Sysfs entries | ||
24 | ------------- | ||
25 | |||
26 | Currently, the driver supports only the following features: | ||
27 | |||
28 | in[1-20]_input Input voltage measurements (mV) | ||
29 | |||
30 | fan[1-12]_input Fan tachometer measurements (rpm) | ||
31 | |||
32 | temp1_input Local temperature (1/1000 degree, | ||
33 | 0.125 degree resolution) | ||
34 | |||
35 | temp[2-9]_input CPU temperatures (1/1000 degree, | ||
36 | 0.125 degree resolution) | ||
37 | |||
38 | fan[1-4]_mode R/W, 0/1 for manual or SmartFan mode | ||
39 | Setting SmartFan mode is supported only if it has been | ||
40 | previously configured by BIOS (or configuration EEPROM) | ||
41 | |||
42 | fan[1-4]_pwm R/O in SmartFan mode, R/W in manual control mode | ||
43 | |||
44 | The driver checks sensor control registers and does not export the sensors | ||
45 | that are not enabled. Anyway, a sensor that is enabled may actually be not | ||
46 | connected and thus provide zero readings. | ||
47 | |||
48 | |||
49 | Limitations | ||
50 | ----------- | ||
51 | |||
52 | The following features are not supported in current version: | ||
53 | |||
54 | - SmartFan control | ||
55 | - Watchdog | ||
56 | - GPIO | ||
57 | - external temperature sensors | ||
58 | - SMI | ||
59 | - min/max values | ||
60 | - many other... | ||
diff --git a/Documentation/i2c/slave-eeprom-backend b/Documentation/i2c/slave-eeprom-backend new file mode 100644 index 000000000000..c8444ef82acf --- /dev/null +++ b/Documentation/i2c/slave-eeprom-backend | |||
@@ -0,0 +1,14 @@ | |||
1 | Linux I2C slave eeprom backend | ||
2 | ============================== | ||
3 | |||
4 | by Wolfram Sang <wsa@sang-engineering.com> in 2014-15 | ||
5 | |||
6 | This is a proof-of-concept backend which acts like an EEPROM on the connected | ||
7 | I2C bus. The memory contents can be modified from userspace via this file | ||
8 | located in sysfs: | ||
9 | |||
10 | /sys/bus/i2c/devices/<device-direcory>/slave-eeprom | ||
11 | |||
12 | As of 2015, Linux doesn't support poll on binary sysfs files, so there is no | ||
13 | notfication when another master changed the content. | ||
14 | |||
diff --git a/Documentation/i2c/slave-interface b/Documentation/i2c/slave-interface new file mode 100644 index 000000000000..389bb5d61854 --- /dev/null +++ b/Documentation/i2c/slave-interface | |||
@@ -0,0 +1,179 @@ | |||
1 | Linux I2C slave interface description | ||
2 | ===================================== | ||
3 | |||
4 | by Wolfram Sang <wsa@sang-engineering.com> in 2014-15 | ||
5 | |||
6 | Linux can also be an I2C slave in case I2C controllers have slave support. | ||
7 | Besides this HW requirement, one also needs a software backend providing the | ||
8 | actual functionality. An example for this is the slave-eeprom driver, which | ||
9 | acts as a dual memory driver. While another I2C master on the bus can access it | ||
10 | like a regular EEPROM, the Linux I2C slave can access the content via sysfs and | ||
11 | retrieve/provide information as needed. The software backend driver and the I2C | ||
12 | bus driver communicate via events. Here is a small graph visualizing the data | ||
13 | flow and the means by which data is transported. The dotted line marks only one | ||
14 | example. The backend could also use e.g. a character device, be in-kernel | ||
15 | only, or something completely different: | ||
16 | |||
17 | |||
18 | e.g. sysfs I2C slave events I/O registers | ||
19 | +-----------+ v +---------+ v +--------+ v +------------+ | ||
20 | | Userspace +........+ Backend +-----------+ Driver +-----+ Controller | | ||
21 | +-----------+ +---------+ +--------+ +------------+ | ||
22 | | | | ||
23 | ----------------------------------------------------------------+-- I2C | ||
24 | --------------------------------------------------------------+---- Bus | ||
25 | |||
26 | Note: Technically, there is also the I2C core between the backend and the | ||
27 | driver. However, at this time of writing, the layer is transparent. | ||
28 | |||
29 | |||
30 | User manual | ||
31 | =========== | ||
32 | |||
33 | I2C slave backends behave like standard I2C clients. So, you can instantiate | ||
34 | them like described in the document 'instantiating-devices'. A quick example | ||
35 | for instantiating the slave-eeprom driver from userspace: | ||
36 | |||
37 | # echo 0-0064 > /sys/bus/i2c/drivers/i2c-slave-eeprom/bind | ||
38 | |||
39 | Each backend should come with separate documentation to describe its specific | ||
40 | behaviour and setup. | ||
41 | |||
42 | |||
43 | Developer manual | ||
44 | ================ | ||
45 | |||
46 | I2C slave events | ||
47 | ---------------- | ||
48 | |||
49 | The bus driver sends an event to the backend using the following function: | ||
50 | |||
51 | ret = i2c_slave_event(client, event, &val) | ||
52 | |||
53 | 'client' describes the i2c slave device. 'event' is one of the special event | ||
54 | types described hereafter. 'val' holds an u8 value for the data byte to be | ||
55 | read/written and is thus bidirectional. The pointer to val must always be | ||
56 | provided even if val is not used for an event, i.e. don't use NULL here. 'ret' | ||
57 | is the return value from the backend. Mandatory events must be provided by the | ||
58 | bus drivers and must be checked for by backend drivers. | ||
59 | |||
60 | Event types: | ||
61 | |||
62 | * I2C_SLAVE_WRITE_REQUESTED (mandatory) | ||
63 | |||
64 | 'val': unused | ||
65 | 'ret': always 0 | ||
66 | |||
67 | Another I2C master wants to write data to us. This event should be sent once | ||
68 | our own address and the write bit was detected. The data did not arrive yet, so | ||
69 | there is nothing to process or return. Wakeup or initialization probably needs | ||
70 | to be done, though. | ||
71 | |||
72 | * I2C_SLAVE_READ_REQUESTED (mandatory) | ||
73 | |||
74 | 'val': backend returns first byte to be sent | ||
75 | 'ret': always 0 | ||
76 | |||
77 | Another I2C master wants to read data from us. This event should be sent once | ||
78 | our own address and the read bit was detected. After returning, the bus driver | ||
79 | should transmit the first byte. | ||
80 | |||
81 | * I2C_SLAVE_WRITE_RECEIVED (mandatory) | ||
82 | |||
83 | 'val': bus driver delivers received byte | ||
84 | 'ret': 0 if the byte should be acked, some errno if the byte should be nacked | ||
85 | |||
86 | Another I2C master has sent a byte to us which needs to be set in 'val'. If 'ret' | ||
87 | is zero, the bus driver should ack this byte. If 'ret' is an errno, then the byte | ||
88 | should be nacked. | ||
89 | |||
90 | * I2C_SLAVE_READ_PROCESSED (mandatory) | ||
91 | |||
92 | 'val': backend returns next byte to be sent | ||
93 | 'ret': always 0 | ||
94 | |||
95 | The bus driver requests the next byte to be sent to another I2C master in | ||
96 | 'val'. Important: This does not mean that the previous byte has been acked, it | ||
97 | only means that the previous byte is shifted out to the bus! To ensure seamless | ||
98 | transmission, most hardware requests the next byte when the previous one is | ||
99 | still shifted out. If the master sends NACK and stops reading after the byte | ||
100 | currently shifted out, this byte requested here is never used. It very likely | ||
101 | needs to be sent again on the next I2C_SLAVE_READ_REQUEST, depending a bit on | ||
102 | your backend, though. | ||
103 | |||
104 | * I2C_SLAVE_STOP (mandatory) | ||
105 | |||
106 | 'val': unused | ||
107 | 'ret': always 0 | ||
108 | |||
109 | A stop condition was received. This can happen anytime and the backend should | ||
110 | reset its state machine for I2C transfers to be able to receive new requests. | ||
111 | |||
112 | |||
113 | Software backends | ||
114 | ----------------- | ||
115 | |||
116 | If you want to write a software backend: | ||
117 | |||
118 | * use a standard i2c_driver and its matching mechanisms | ||
119 | * write the slave_callback which handles the above slave events | ||
120 | (best using a state machine) | ||
121 | * register this callback via i2c_slave_register() | ||
122 | |||
123 | Check the i2c-slave-eeprom driver as an example. | ||
124 | |||
125 | |||
126 | Bus driver support | ||
127 | ------------------ | ||
128 | |||
129 | If you want to add slave support to the bus driver: | ||
130 | |||
131 | * implement calls to register/unregister the slave and add those to the | ||
132 | struct i2c_algorithm. When registering, you probably need to set the i2c | ||
133 | slave address and enable slave specific interrupts. If you use runtime pm, you | ||
134 | should use pm_runtime_forbid() because your device usually needs to be powered | ||
135 | on always to be able to detect its slave address. When unregistering, do the | ||
136 | inverse of the above. | ||
137 | |||
138 | * Catch the slave interrupts and send appropriate i2c_slave_events to the backend. | ||
139 | |||
140 | Check the i2c-rcar driver as an example. | ||
141 | |||
142 | |||
143 | About ACK/NACK | ||
144 | -------------- | ||
145 | |||
146 | It is good behaviour to always ACK the address phase, so the master knows if a | ||
147 | device is basically present or if it mysteriously disappeared. Using NACK to | ||
148 | state being busy is troublesome. SMBus demands to always ACK the address phase, | ||
149 | while the I2C specification is more loose on that. Most I2C controllers also | ||
150 | automatically ACK when detecting their slave addresses, so there is no option | ||
151 | to NACK them. For those reasons, this API does not support NACK in the address | ||
152 | phase. | ||
153 | |||
154 | Currently, there is no slave event to report if the master did ACK or NACK a | ||
155 | byte when it reads from us. We could make this an optional event if the need | ||
156 | arises. However, cases should be extremely rare because the master is expected | ||
157 | to send STOP after that and we have an event for that. Also, keep in mind not | ||
158 | all I2C controllers have the possibility to report that event. | ||
159 | |||
160 | |||
161 | About buffers | ||
162 | ------------- | ||
163 | |||
164 | During development of this API, the question of using buffers instead of just | ||
165 | bytes came up. Such an extension might be possible, usefulness is unclear at | ||
166 | this time of writing. Some points to keep in mind when using buffers: | ||
167 | |||
168 | * Buffers should be opt-in and slave drivers will always have to support | ||
169 | byte-based transactions as the ultimate fallback because this is how the | ||
170 | majority of HW works. | ||
171 | |||
172 | * For backends simulating hardware registers, buffers are not helpful because | ||
173 | on writes an action should be immediately triggered. For reads, the data in | ||
174 | the buffer might get stale. | ||
175 | |||
176 | * A master can send STOP at any time. For partially transferred buffers, this | ||
177 | means additional code to handle this exception. Such code tends to be | ||
178 | error-prone. | ||
179 | |||
diff --git a/Documentation/i2c/summary b/Documentation/i2c/summary index 13ab076dcd92..809541ab352f 100644 --- a/Documentation/i2c/summary +++ b/Documentation/i2c/summary | |||
@@ -41,7 +41,3 @@ integrated than Algorithm and Adapter. | |||
41 | 41 | ||
42 | For a given configuration, you will need a driver for your I2C bus, and | 42 | For a given configuration, you will need a driver for your I2C bus, and |
43 | drivers for your I2C devices (usually one driver for each device). | 43 | drivers for your I2C devices (usually one driver for each device). |
44 | |||
45 | At this time, Linux only operates I2C (or SMBus) in master mode; you can't | ||
46 | use these APIs to make a Linux system behave as a slave/device, either to | ||
47 | speak a custom protocol or to emulate some other device. | ||
diff --git a/Documentation/i2o/README b/Documentation/i2o/README deleted file mode 100644 index ee91e2626ff0..000000000000 --- a/Documentation/i2o/README +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | |||
2 | Linux I2O Support (c) Copyright 1999 Red Hat Software | ||
3 | and others. | ||
4 | |||
5 | This program is free software; you can redistribute it and/or | ||
6 | modify it under the terms of the GNU General Public License | ||
7 | as published by the Free Software Foundation; either version | ||
8 | 2 of the License, or (at your option) any later version. | ||
9 | |||
10 | AUTHORS (so far) | ||
11 | |||
12 | Alan Cox, Building Number Three Ltd. | ||
13 | Core code, SCSI and Block OSMs | ||
14 | |||
15 | Steve Ralston, LSI Logic Corp. | ||
16 | Debugging SCSI and Block OSM | ||
17 | |||
18 | Deepak Saxena, Intel Corp. | ||
19 | Various core/block extensions | ||
20 | /proc interface, bug fixes | ||
21 | Ioctl interfaces for control | ||
22 | Debugging LAN OSM | ||
23 | |||
24 | Philip Rumpf | ||
25 | Fixed assorted dumb SMP locking bugs | ||
26 | |||
27 | Juha Sievanen, University of Helsinki Finland | ||
28 | LAN OSM code | ||
29 | /proc interface to LAN class | ||
30 | Bug fixes | ||
31 | Core code extensions | ||
32 | |||
33 | Auvo Häkkinen, University of Helsinki Finland | ||
34 | LAN OSM code | ||
35 | /Proc interface to LAN class | ||
36 | Bug fixes | ||
37 | Core code extensions | ||
38 | |||
39 | Taneli Vähäkangas, University of Helsinki Finland | ||
40 | Fixes to i2o_config | ||
41 | |||
42 | CREDITS | ||
43 | |||
44 | This work was made possible by | ||
45 | |||
46 | Red Hat Software | ||
47 | Funding for the Building #3 part of the project | ||
48 | |||
49 | Symbios Logic (Now LSI) | ||
50 | Host adapters, hints, known to work platforms when I hit | ||
51 | compatibility problems | ||
52 | |||
53 | BoxHill Corporation | ||
54 | Loan of initial FibreChannel disk array used for development work. | ||
55 | |||
56 | European Commission | ||
57 | Funding the work done by the University of Helsinki | ||
58 | |||
59 | SysKonnect | ||
60 | Loan of FDDI and Gigabit Ethernet cards | ||
61 | |||
62 | ASUSTeK | ||
63 | Loan of I2O motherboard | ||
diff --git a/Documentation/i2o/ioctl b/Documentation/i2o/ioctl deleted file mode 100644 index 27c3c5493116..000000000000 --- a/Documentation/i2o/ioctl +++ /dev/null | |||
@@ -1,394 +0,0 @@ | |||
1 | |||
2 | Linux I2O User Space Interface | ||
3 | rev 0.3 - 04/20/99 | ||
4 | |||
5 | ============================================================================= | ||
6 | Originally written by Deepak Saxena(deepak@plexity.net) | ||
7 | Currently maintained by Deepak Saxena(deepak@plexity.net) | ||
8 | ============================================================================= | ||
9 | |||
10 | I. Introduction | ||
11 | |||
12 | The Linux I2O subsystem provides a set of ioctl() commands that can be | ||
13 | utilized by user space applications to communicate with IOPs and devices | ||
14 | on individual IOPs. This document defines the specific ioctl() commands | ||
15 | that are available to the user and provides examples of their uses. | ||
16 | |||
17 | This document assumes the reader is familiar with or has access to the | ||
18 | I2O specification as no I2O message parameters are outlined. For information | ||
19 | on the specification, see http://www.i2osig.org | ||
20 | |||
21 | This document and the I2O user space interface are currently maintained | ||
22 | by Deepak Saxena. Please send all comments, errata, and bug fixes to | ||
23 | deepak@csociety.purdue.edu | ||
24 | |||
25 | II. IOP Access | ||
26 | |||
27 | Access to the I2O subsystem is provided through the device file named | ||
28 | /dev/i2o/ctl. This file is a character file with major number 10 and minor | ||
29 | number 166. It can be created through the following command: | ||
30 | |||
31 | mknod /dev/i2o/ctl c 10 166 | ||
32 | |||
33 | III. Determining the IOP Count | ||
34 | |||
35 | SYNOPSIS | ||
36 | |||
37 | ioctl(fd, I2OGETIOPS, int *count); | ||
38 | |||
39 | u8 count[MAX_I2O_CONTROLLERS]; | ||
40 | |||
41 | DESCRIPTION | ||
42 | |||
43 | This function returns the system's active IOP table. count should | ||
44 | point to a buffer containing MAX_I2O_CONTROLLERS entries. Upon | ||
45 | returning, each entry will contain a non-zero value if the given | ||
46 | IOP unit is active, and NULL if it is inactive or non-existent. | ||
47 | |||
48 | RETURN VALUE. | ||
49 | |||
50 | Returns 0 if no errors occur, and -1 otherwise. If an error occurs, | ||
51 | errno is set appropriately: | ||
52 | |||
53 | EFAULT Invalid user space pointer was passed | ||
54 | |||
55 | IV. Getting Hardware Resource Table | ||
56 | |||
57 | SYNOPSIS | ||
58 | |||
59 | ioctl(fd, I2OHRTGET, struct i2o_cmd_hrt *hrt); | ||
60 | |||
61 | struct i2o_cmd_hrtlct | ||
62 | { | ||
63 | u32 iop; /* IOP unit number */ | ||
64 | void *resbuf; /* Buffer for result */ | ||
65 | u32 *reslen; /* Buffer length in bytes */ | ||
66 | }; | ||
67 | |||
68 | DESCRIPTION | ||
69 | |||
70 | This function returns the Hardware Resource Table of the IOP specified | ||
71 | by hrt->iop in the buffer pointed to by hrt->resbuf. The actual size of | ||
72 | the data is written into *(hrt->reslen). | ||
73 | |||
74 | RETURNS | ||
75 | |||
76 | This function returns 0 if no errors occur. If an error occurs, -1 | ||
77 | is returned and errno is set appropriately: | ||
78 | |||
79 | EFAULT Invalid user space pointer was passed | ||
80 | ENXIO Invalid IOP number | ||
81 | ENOBUFS Buffer not large enough. If this occurs, the required | ||
82 | buffer length is written into *(hrt->reslen) | ||
83 | |||
84 | V. Getting Logical Configuration Table | ||
85 | |||
86 | SYNOPSIS | ||
87 | |||
88 | ioctl(fd, I2OLCTGET, struct i2o_cmd_lct *lct); | ||
89 | |||
90 | struct i2o_cmd_hrtlct | ||
91 | { | ||
92 | u32 iop; /* IOP unit number */ | ||
93 | void *resbuf; /* Buffer for result */ | ||
94 | u32 *reslen; /* Buffer length in bytes */ | ||
95 | }; | ||
96 | |||
97 | DESCRIPTION | ||
98 | |||
99 | This function returns the Logical Configuration Table of the IOP specified | ||
100 | by lct->iop in the buffer pointed to by lct->resbuf. The actual size of | ||
101 | the data is written into *(lct->reslen). | ||
102 | |||
103 | RETURNS | ||
104 | |||
105 | This function returns 0 if no errors occur. If an error occurs, -1 | ||
106 | is returned and errno is set appropriately: | ||
107 | |||
108 | EFAULT Invalid user space pointer was passed | ||
109 | ENXIO Invalid IOP number | ||
110 | ENOBUFS Buffer not large enough. If this occurs, the required | ||
111 | buffer length is written into *(lct->reslen) | ||
112 | |||
113 | VI. Setting Parameters | ||
114 | |||
115 | SYNOPSIS | ||
116 | |||
117 | ioctl(fd, I2OPARMSET, struct i2o_parm_setget *ops); | ||
118 | |||
119 | struct i2o_cmd_psetget | ||
120 | { | ||
121 | u32 iop; /* IOP unit number */ | ||
122 | u32 tid; /* Target device TID */ | ||
123 | void *opbuf; /* Operation List buffer */ | ||
124 | u32 oplen; /* Operation List buffer length in bytes */ | ||
125 | void *resbuf; /* Result List buffer */ | ||
126 | u32 *reslen; /* Result List buffer length in bytes */ | ||
127 | }; | ||
128 | |||
129 | DESCRIPTION | ||
130 | |||
131 | This function posts a UtilParamsSet message to the device identified | ||
132 | by ops->iop and ops->tid. The operation list for the message is | ||
133 | sent through the ops->opbuf buffer, and the result list is written | ||
134 | into the buffer pointed to by ops->resbuf. The number of bytes | ||
135 | written is placed into *(ops->reslen). | ||
136 | |||
137 | RETURNS | ||
138 | |||
139 | The return value is the size in bytes of the data written into | ||
140 | ops->resbuf if no errors occur. If an error occurs, -1 is returned | ||
141 | and errno is set appropriately: | ||
142 | |||
143 | EFAULT Invalid user space pointer was passed | ||
144 | ENXIO Invalid IOP number | ||
145 | ENOBUFS Buffer not large enough. If this occurs, the required | ||
146 | buffer length is written into *(ops->reslen) | ||
147 | ETIMEDOUT Timeout waiting for reply message | ||
148 | ENOMEM Kernel memory allocation error | ||
149 | |||
150 | A return value of 0 does not mean that the value was actually | ||
151 | changed properly on the IOP. The user should check the result | ||
152 | list to determine the specific status of the transaction. | ||
153 | |||
154 | VII. Getting Parameters | ||
155 | |||
156 | SYNOPSIS | ||
157 | |||
158 | ioctl(fd, I2OPARMGET, struct i2o_parm_setget *ops); | ||
159 | |||
160 | struct i2o_parm_setget | ||
161 | { | ||
162 | u32 iop; /* IOP unit number */ | ||
163 | u32 tid; /* Target device TID */ | ||
164 | void *opbuf; /* Operation List buffer */ | ||
165 | u32 oplen; /* Operation List buffer length in bytes */ | ||
166 | void *resbuf; /* Result List buffer */ | ||
167 | u32 *reslen; /* Result List buffer length in bytes */ | ||
168 | }; | ||
169 | |||
170 | DESCRIPTION | ||
171 | |||
172 | This function posts a UtilParamsGet message to the device identified | ||
173 | by ops->iop and ops->tid. The operation list for the message is | ||
174 | sent through the ops->opbuf buffer, and the result list is written | ||
175 | into the buffer pointed to by ops->resbuf. The actual size of data | ||
176 | written is placed into *(ops->reslen). | ||
177 | |||
178 | RETURNS | ||
179 | |||
180 | EFAULT Invalid user space pointer was passed | ||
181 | ENXIO Invalid IOP number | ||
182 | ENOBUFS Buffer not large enough. If this occurs, the required | ||
183 | buffer length is written into *(ops->reslen) | ||
184 | ETIMEDOUT Timeout waiting for reply message | ||
185 | ENOMEM Kernel memory allocation error | ||
186 | |||
187 | A return value of 0 does not mean that the value was actually | ||
188 | properly retrieved. The user should check the result list | ||
189 | to determine the specific status of the transaction. | ||
190 | |||
191 | VIII. Downloading Software | ||
192 | |||
193 | SYNOPSIS | ||
194 | |||
195 | ioctl(fd, I2OSWDL, struct i2o_sw_xfer *sw); | ||
196 | |||
197 | struct i2o_sw_xfer | ||
198 | { | ||
199 | u32 iop; /* IOP unit number */ | ||
200 | u8 flags; /* DownloadFlags field */ | ||
201 | u8 sw_type; /* Software type */ | ||
202 | u32 sw_id; /* Software ID */ | ||
203 | void *buf; /* Pointer to software buffer */ | ||
204 | u32 *swlen; /* Length of software buffer */ | ||
205 | u32 *maxfrag; /* Number of fragments */ | ||
206 | u32 *curfrag; /* Current fragment number */ | ||
207 | }; | ||
208 | |||
209 | DESCRIPTION | ||
210 | |||
211 | This function downloads a software fragment pointed by sw->buf | ||
212 | to the iop identified by sw->iop. The DownloadFlags, SwID, SwType | ||
213 | and SwSize fields of the ExecSwDownload message are filled in with | ||
214 | the values of sw->flags, sw->sw_id, sw->sw_type and *(sw->swlen). | ||
215 | |||
216 | The fragments _must_ be sent in order and be 8K in size. The last | ||
217 | fragment _may_ be shorter, however. The kernel will compute its | ||
218 | size based on information in the sw->swlen field. | ||
219 | |||
220 | Please note that SW transfers can take a long time. | ||
221 | |||
222 | RETURNS | ||
223 | |||
224 | This function returns 0 no errors occur. If an error occurs, -1 | ||
225 | is returned and errno is set appropriately: | ||
226 | |||
227 | EFAULT Invalid user space pointer was passed | ||
228 | ENXIO Invalid IOP number | ||
229 | ETIMEDOUT Timeout waiting for reply message | ||
230 | ENOMEM Kernel memory allocation error | ||
231 | |||
232 | IX. Uploading Software | ||
233 | |||
234 | SYNOPSIS | ||
235 | |||
236 | ioctl(fd, I2OSWUL, struct i2o_sw_xfer *sw); | ||
237 | |||
238 | struct i2o_sw_xfer | ||
239 | { | ||
240 | u32 iop; /* IOP unit number */ | ||
241 | u8 flags; /* UploadFlags */ | ||
242 | u8 sw_type; /* Software type */ | ||
243 | u32 sw_id; /* Software ID */ | ||
244 | void *buf; /* Pointer to software buffer */ | ||
245 | u32 *swlen; /* Length of software buffer */ | ||
246 | u32 *maxfrag; /* Number of fragments */ | ||
247 | u32 *curfrag; /* Current fragment number */ | ||
248 | }; | ||
249 | |||
250 | DESCRIPTION | ||
251 | |||
252 | This function uploads a software fragment from the IOP identified | ||
253 | by sw->iop, sw->sw_type, sw->sw_id and optionally sw->swlen fields. | ||
254 | The UploadFlags, SwID, SwType and SwSize fields of the ExecSwUpload | ||
255 | message are filled in with the values of sw->flags, sw->sw_id, | ||
256 | sw->sw_type and *(sw->swlen). | ||
257 | |||
258 | The fragments _must_ be requested in order and be 8K in size. The | ||
259 | user is responsible for allocating memory pointed by sw->buf. The | ||
260 | last fragment _may_ be shorter. | ||
261 | |||
262 | Please note that SW transfers can take a long time. | ||
263 | |||
264 | RETURNS | ||
265 | |||
266 | This function returns 0 if no errors occur. If an error occurs, -1 | ||
267 | is returned and errno is set appropriately: | ||
268 | |||
269 | EFAULT Invalid user space pointer was passed | ||
270 | ENXIO Invalid IOP number | ||
271 | ETIMEDOUT Timeout waiting for reply message | ||
272 | ENOMEM Kernel memory allocation error | ||
273 | |||
274 | X. Removing Software | ||
275 | |||
276 | SYNOPSIS | ||
277 | |||
278 | ioctl(fd, I2OSWDEL, struct i2o_sw_xfer *sw); | ||
279 | |||
280 | struct i2o_sw_xfer | ||
281 | { | ||
282 | u32 iop; /* IOP unit number */ | ||
283 | u8 flags; /* RemoveFlags */ | ||
284 | u8 sw_type; /* Software type */ | ||
285 | u32 sw_id; /* Software ID */ | ||
286 | void *buf; /* Unused */ | ||
287 | u32 *swlen; /* Length of the software data */ | ||
288 | u32 *maxfrag; /* Unused */ | ||
289 | u32 *curfrag; /* Unused */ | ||
290 | }; | ||
291 | |||
292 | DESCRIPTION | ||
293 | |||
294 | This function removes software from the IOP identified by sw->iop. | ||
295 | The RemoveFlags, SwID, SwType and SwSize fields of the ExecSwRemove message | ||
296 | are filled in with the values of sw->flags, sw->sw_id, sw->sw_type and | ||
297 | *(sw->swlen). Give zero in *(sw->len) if the value is unknown. IOP uses | ||
298 | *(sw->swlen) value to verify correct identication of the module to remove. | ||
299 | The actual size of the module is written into *(sw->swlen). | ||
300 | |||
301 | RETURNS | ||
302 | |||
303 | This function returns 0 if no errors occur. If an error occurs, -1 | ||
304 | is returned and errno is set appropriately: | ||
305 | |||
306 | EFAULT Invalid user space pointer was passed | ||
307 | ENXIO Invalid IOP number | ||
308 | ETIMEDOUT Timeout waiting for reply message | ||
309 | ENOMEM Kernel memory allocation error | ||
310 | |||
311 | X. Validating Configuration | ||
312 | |||
313 | SYNOPSIS | ||
314 | |||
315 | ioctl(fd, I2OVALIDATE, int *iop); | ||
316 | u32 iop; | ||
317 | |||
318 | DESCRIPTION | ||
319 | |||
320 | This function posts an ExecConfigValidate message to the controller | ||
321 | identified by iop. This message indicates that the current | ||
322 | configuration is accepted. The iop changes the status of suspect drivers | ||
323 | to valid and may delete old drivers from its store. | ||
324 | |||
325 | RETURNS | ||
326 | |||
327 | This function returns 0 if no erro occur. If an error occurs, -1 is | ||
328 | returned and errno is set appropriately: | ||
329 | |||
330 | ETIMEDOUT Timeout waiting for reply message | ||
331 | ENXIO Invalid IOP number | ||
332 | |||
333 | XI. Configuration Dialog | ||
334 | |||
335 | SYNOPSIS | ||
336 | |||
337 | ioctl(fd, I2OHTML, struct i2o_html *htquery); | ||
338 | struct i2o_html | ||
339 | { | ||
340 | u32 iop; /* IOP unit number */ | ||
341 | u32 tid; /* Target device ID */ | ||
342 | u32 page; /* HTML page */ | ||
343 | void *resbuf; /* Buffer for reply HTML page */ | ||
344 | u32 *reslen; /* Length in bytes of reply buffer */ | ||
345 | void *qbuf; /* Pointer to HTTP query string */ | ||
346 | u32 qlen; /* Length in bytes of query string buffer */ | ||
347 | }; | ||
348 | |||
349 | DESCRIPTION | ||
350 | |||
351 | This function posts an UtilConfigDialog message to the device identified | ||
352 | by htquery->iop and htquery->tid. The requested HTML page number is | ||
353 | provided by the htquery->page field, and the resultant data is stored | ||
354 | in the buffer pointed to by htquery->resbuf. If there is an HTTP query | ||
355 | string that is to be sent to the device, it should be sent in the buffer | ||
356 | pointed to by htquery->qbuf. If there is no query string, this field | ||
357 | should be set to NULL. The actual size of the reply received is written | ||
358 | into *(htquery->reslen). | ||
359 | |||
360 | RETURNS | ||
361 | |||
362 | This function returns 0 if no error occur. If an error occurs, -1 | ||
363 | is returned and errno is set appropriately: | ||
364 | |||
365 | EFAULT Invalid user space pointer was passed | ||
366 | ENXIO Invalid IOP number | ||
367 | ENOBUFS Buffer not large enough. If this occurs, the required | ||
368 | buffer length is written into *(ops->reslen) | ||
369 | ETIMEDOUT Timeout waiting for reply message | ||
370 | ENOMEM Kernel memory allocation error | ||
371 | |||
372 | XII. Events | ||
373 | |||
374 | In the process of determining this. Current idea is to have use | ||
375 | the select() interface to allow user apps to periodically poll | ||
376 | the /dev/i2o/ctl device for events. When select() notifies the user | ||
377 | that an event is available, the user would call read() to retrieve | ||
378 | a list of all the events that are pending for the specific device. | ||
379 | |||
380 | ============================================================================= | ||
381 | Revision History | ||
382 | ============================================================================= | ||
383 | |||
384 | Rev 0.1 - 04/01/99 | ||
385 | - Initial revision | ||
386 | |||
387 | Rev 0.2 - 04/06/99 | ||
388 | - Changed return values to match UNIX ioctl() standard. Only return values | ||
389 | are 0 and -1. All errors are reported through errno. | ||
390 | - Added summary of proposed possible event interfaces | ||
391 | |||
392 | Rev 0.3 - 04/20/99 | ||
393 | - Changed all ioctls() to use pointers to user data instead of actual data | ||
394 | - Updated error values to match the code | ||
diff --git a/Documentation/input/alps.txt b/Documentation/input/alps.txt index a63e5e013a8c..b9d229fee6b9 100644 --- a/Documentation/input/alps.txt +++ b/Documentation/input/alps.txt | |||
@@ -58,7 +58,7 @@ To exit command mode, PSMOUSE_CMD_SETSTREAM (EA) is sent to the touchpad. | |||
58 | While in command mode, register addresses can be set by first sending a | 58 | While in command mode, register addresses can be set by first sending a |
59 | specific command, either EC for v3 devices or F5 for v4 devices. Then the | 59 | specific command, either EC for v3 devices or F5 for v4 devices. Then the |
60 | address is sent one nibble at a time, where each nibble is encoded as a | 60 | address is sent one nibble at a time, where each nibble is encoded as a |
61 | command with optional data. This enoding differs slightly between the v3 and | 61 | command with optional data. This encoding differs slightly between the v3 and |
62 | v4 protocols. | 62 | v4 protocols. |
63 | 63 | ||
64 | Once an address has been set, the addressed register can be read by sending | 64 | Once an address has been set, the addressed register can be read by sending |
@@ -114,6 +114,9 @@ ALPS Absolute Mode - Protocol Version 2 | |||
114 | byte 4: 0 y6 y5 y4 y3 y2 y1 y0 | 114 | byte 4: 0 y6 y5 y4 y3 y2 y1 y0 |
115 | byte 5: 0 z6 z5 z4 z3 z2 z1 z0 | 115 | byte 5: 0 z6 z5 z4 z3 z2 z1 z0 |
116 | 116 | ||
117 | Protocol Version 2 DualPoint devices send standard PS/2 mouse packets for | ||
118 | the DualPoint Stick. | ||
119 | |||
117 | Dualpoint device -- interleaved packet format | 120 | Dualpoint device -- interleaved packet format |
118 | --------------------------------------------- | 121 | --------------------------------------------- |
119 | 122 | ||
@@ -127,11 +130,16 @@ Dualpoint device -- interleaved packet format | |||
127 | byte 7: 0 y6 y5 y4 y3 y2 y1 y0 | 130 | byte 7: 0 y6 y5 y4 y3 y2 y1 y0 |
128 | byte 8: 0 z6 z5 z4 z3 z2 z1 z0 | 131 | byte 8: 0 z6 z5 z4 z3 z2 z1 z0 |
129 | 132 | ||
133 | Devices which use the interleaving format normally send standard PS/2 mouse | ||
134 | packets for the DualPoint Stick + ALPS Absolute Mode packets for the | ||
135 | touchpad, switching to the interleaved packet format when both the stick and | ||
136 | the touchpad are used at the same time. | ||
137 | |||
130 | ALPS Absolute Mode - Protocol Version 3 | 138 | ALPS Absolute Mode - Protocol Version 3 |
131 | --------------------------------------- | 139 | --------------------------------------- |
132 | 140 | ||
133 | ALPS protocol version 3 has three different packet formats. The first two are | 141 | ALPS protocol version 3 has three different packet formats. The first two are |
134 | associated with touchpad events, and the third is associatd with trackstick | 142 | associated with touchpad events, and the third is associated with trackstick |
135 | events. | 143 | events. |
136 | 144 | ||
137 | The first type is the touchpad position packet. | 145 | The first type is the touchpad position packet. |
diff --git a/Documentation/input/event-codes.txt b/Documentation/input/event-codes.txt index c587a966413e..3f0f5ce3338b 100644 --- a/Documentation/input/event-codes.txt +++ b/Documentation/input/event-codes.txt | |||
@@ -229,7 +229,7 @@ such device to feedback. | |||
229 | EV_PWR: | 229 | EV_PWR: |
230 | ---------- | 230 | ---------- |
231 | EV_PWR events are a special type of event used specifically for power | 231 | EV_PWR events are a special type of event used specifically for power |
232 | mangement. Its usage is not well defined. To be addressed later. | 232 | management. Its usage is not well defined. To be addressed later. |
233 | 233 | ||
234 | Device properties: | 234 | Device properties: |
235 | ================= | 235 | ================= |
@@ -294,6 +294,12 @@ accordingly. This property does not affect kernel behavior. | |||
294 | The kernel does not provide button emulation for such devices but treats | 294 | The kernel does not provide button emulation for such devices but treats |
295 | them as any other INPUT_PROP_BUTTONPAD device. | 295 | them as any other INPUT_PROP_BUTTONPAD device. |
296 | 296 | ||
297 | INPUT_PROP_ACCELEROMETER | ||
298 | ------------------------- | ||
299 | Directional axes on this device (absolute and/or relative x, y, z) represent | ||
300 | accelerometer data. All other axes retain their meaning. A device must not mix | ||
301 | regular directional axes and accelerometer axes on the same event node. | ||
302 | |||
297 | Guidelines: | 303 | Guidelines: |
298 | ========== | 304 | ========== |
299 | The guidelines below ensure proper single-touch and multi-finger functionality. | 305 | The guidelines below ensure proper single-touch and multi-finger functionality. |
diff --git a/Documentation/input/gpio-tilt.txt b/Documentation/input/gpio-tilt.txt index 06d60c3ff5e7..2cdfd9bcb1af 100644 --- a/Documentation/input/gpio-tilt.txt +++ b/Documentation/input/gpio-tilt.txt | |||
@@ -28,7 +28,7 @@ Example: | |||
28 | -------- | 28 | -------- |
29 | 29 | ||
30 | Example configuration for a single TS1003 tilt switch that rotates around | 30 | Example configuration for a single TS1003 tilt switch that rotates around |
31 | one axis in 4 steps and emitts the current tilt via two GPIOs. | 31 | one axis in 4 steps and emits the current tilt via two GPIOs. |
32 | 32 | ||
33 | static int sg060_tilt_enable(struct device *dev) { | 33 | static int sg060_tilt_enable(struct device *dev) { |
34 | /* code to enable the sensors */ | 34 | /* code to enable the sensors */ |
diff --git a/Documentation/input/iforce-protocol.txt b/Documentation/input/iforce-protocol.txt index 2d5fbfd6023e..66287151c54a 100644 --- a/Documentation/input/iforce-protocol.txt +++ b/Documentation/input/iforce-protocol.txt | |||
@@ -97,7 +97,7 @@ LEN= 0e | |||
97 | *** Attack and fade *** | 97 | *** Attack and fade *** |
98 | OP= 02 | 98 | OP= 02 |
99 | LEN= 08 | 99 | LEN= 08 |
100 | 00-01 Address where to store the parameteres | 100 | 00-01 Address where to store the parameters |
101 | 02-03 Duration of attack (little endian encoding, in ms) | 101 | 02-03 Duration of attack (little endian encoding, in ms) |
102 | 04 Level at end of attack. Signed byte. | 102 | 04 Level at end of attack. Signed byte. |
103 | 05-06 Duration of fade. | 103 | 05-06 Duration of fade. |
diff --git a/Documentation/input/multi-touch-protocol.txt b/Documentation/input/multi-touch-protocol.txt index 7b4f59c09ee2..b85d000faeb4 100644 --- a/Documentation/input/multi-touch-protocol.txt +++ b/Documentation/input/multi-touch-protocol.txt | |||
@@ -312,9 +312,12 @@ ABS_MT_TOOL_TYPE | |||
312 | 312 | ||
313 | The type of approaching tool. A lot of kernel drivers cannot distinguish | 313 | The type of approaching tool. A lot of kernel drivers cannot distinguish |
314 | between different tool types, such as a finger or a pen. In such cases, the | 314 | between different tool types, such as a finger or a pen. In such cases, the |
315 | event should be omitted. The protocol currently supports MT_TOOL_FINGER and | 315 | event should be omitted. The protocol currently supports MT_TOOL_FINGER, |
316 | MT_TOOL_PEN [2]. For type B devices, this event is handled by input core; | 316 | MT_TOOL_PEN, and MT_TOOL_PALM [2]. For type B devices, this event is handled |
317 | drivers should instead use input_mt_report_slot_state(). | 317 | by input core; drivers should instead use input_mt_report_slot_state(). |
318 | A contact's ABS_MT_TOOL_TYPE may change over time while still touching the | ||
319 | device, because the firmware may not be able to determine which tool is being | ||
320 | used when it first appears. | ||
318 | 321 | ||
319 | ABS_MT_BLOB_ID | 322 | ABS_MT_BLOB_ID |
320 | 323 | ||
diff --git a/Documentation/input/walkera0701.txt b/Documentation/input/walkera0701.txt index 561385d38482..49e3ac60dcef 100644 --- a/Documentation/input/walkera0701.txt +++ b/Documentation/input/walkera0701.txt | |||
@@ -91,7 +91,7 @@ absolute binary value. (10 bits per channel). Next nibble is checksum for | |||
91 | first ten nibbles. | 91 | first ten nibbles. |
92 | 92 | ||
93 | Next nibbles 12 .. 21 represents four channels (not all channels can be | 93 | Next nibbles 12 .. 21 represents four channels (not all channels can be |
94 | directly controlled from TX). Binary representations ar the same as in first | 94 | directly controlled from TX). Binary representations are the same as in first |
95 | four channels. In nibbles 22 and 23 is a special magic number. Nibble 24 is | 95 | four channels. In nibbles 22 and 23 is a special magic number. Nibble 24 is |
96 | checksum for nibbles 12..23. | 96 | checksum for nibbles 12..23. |
97 | 97 | ||
diff --git a/Documentation/input/yealink.txt b/Documentation/input/yealink.txt index 5360e434486c..8277b76ec506 100644 --- a/Documentation/input/yealink.txt +++ b/Documentation/input/yealink.txt | |||
@@ -93,7 +93,7 @@ Format description: | |||
93 | Format specifier | 93 | Format specifier |
94 | '8' : Generic 7 segment digit with individual addressable segments | 94 | '8' : Generic 7 segment digit with individual addressable segments |
95 | 95 | ||
96 | Reduced capability 7 segm digit, when segments are hard wired together. | 96 | Reduced capability 7 segment digit, when segments are hard wired together. |
97 | '1' : 2 segments digit only able to produce a 1. | 97 | '1' : 2 segments digit only able to produce a 1. |
98 | 'e' : Most significant day of the month digit, | 98 | 'e' : Most significant day of the month digit, |
99 | able to produce at least 1 2 3. | 99 | able to produce at least 1 2 3. |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index bfcb1a62a7b4..274252f205b7 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -928,6 +928,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
928 | Enable debug messages at boot time. See | 928 | Enable debug messages at boot time. See |
929 | Documentation/dynamic-debug-howto.txt for details. | 929 | Documentation/dynamic-debug-howto.txt for details. |
930 | 930 | ||
931 | eagerfpu= [X86] | ||
932 | on enable eager fpu restore | ||
933 | off disable eager fpu restore | ||
934 | auto selects the default scheme, which automatically | ||
935 | enables eagerfpu restore for xsaveopt. | ||
936 | |||
931 | early_ioremap_debug [KNL] | 937 | early_ioremap_debug [KNL] |
932 | Enable debug messages in early_ioremap support. This | 938 | Enable debug messages in early_ioremap support. This |
933 | is useful for tracking down temporary early mappings | 939 | is useful for tracking down temporary early mappings |
@@ -1036,7 +1042,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1036 | Format: {"off" | "on" | "skip[mbr]"} | 1042 | Format: {"off" | "on" | "skip[mbr]"} |
1037 | 1043 | ||
1038 | efi= [EFI] | 1044 | efi= [EFI] |
1039 | Format: { "old_map", "nochunk", "noruntime" } | 1045 | Format: { "old_map", "nochunk", "noruntime", "debug" } |
1040 | old_map [X86-64]: switch to the old ioremap-based EFI | 1046 | old_map [X86-64]: switch to the old ioremap-based EFI |
1041 | runtime services mapping. 32-bit still uses this one by | 1047 | runtime services mapping. 32-bit still uses this one by |
1042 | default. | 1048 | default. |
@@ -1044,6 +1050,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1044 | boot stub, as chunking can cause problems with some | 1050 | boot stub, as chunking can cause problems with some |
1045 | firmware implementations. | 1051 | firmware implementations. |
1046 | noruntime : disable EFI runtime services support | 1052 | noruntime : disable EFI runtime services support |
1053 | debug: enable misc debug output | ||
1047 | 1054 | ||
1048 | efi_no_storage_paranoia [EFI; X86] | 1055 | efi_no_storage_paranoia [EFI; X86] |
1049 | Using this parameter you can use more than 50% of | 1056 | Using this parameter you can use more than 50% of |
@@ -1965,6 +1972,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1965 | or | 1972 | or |
1966 | memmap=0x10000$0x18690000 | 1973 | memmap=0x10000$0x18690000 |
1967 | 1974 | ||
1975 | memmap=nn[KMG]!ss[KMG] | ||
1976 | [KNL,X86] Mark specific memory as protected. | ||
1977 | Region of memory to be used, from ss to ss+nn. | ||
1978 | The memory region may be marked as e820 type 12 (0xc) | ||
1979 | and is NVDIMM or ADR memory. | ||
1980 | |||
1968 | memory_corruption_check=0/1 [X86] | 1981 | memory_corruption_check=0/1 [X86] |
1969 | Some BIOSes seem to corrupt the first 64k of | 1982 | Some BIOSes seem to corrupt the first 64k of |
1970 | memory when doing things like suspend/resume. | 1983 | memory when doing things like suspend/resume. |
@@ -1988,7 +2001,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1988 | seconds. Use this parameter to check at some | 2001 | seconds. Use this parameter to check at some |
1989 | other rate. 0 disables periodic checking. | 2002 | other rate. 0 disables periodic checking. |
1990 | 2003 | ||
1991 | memtest= [KNL,X86] Enable memtest | 2004 | memtest= [KNL,X86,ARM] Enable memtest |
1992 | Format: <integer> | 2005 | Format: <integer> |
1993 | default : 0 <disable> | 2006 | default : 0 <disable> |
1994 | Specifies the number of memtest passes to be | 2007 | Specifies the number of memtest passes to be |
@@ -2235,8 +2248,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2235 | 2248 | ||
2236 | nmi_watchdog= [KNL,BUGS=X86] Debugging features for SMP kernels | 2249 | nmi_watchdog= [KNL,BUGS=X86] Debugging features for SMP kernels |
2237 | Format: [panic,][nopanic,][num] | 2250 | Format: [panic,][nopanic,][num] |
2238 | Valid num: 0 | 2251 | Valid num: 0 or 1 |
2239 | 0 - turn nmi_watchdog off | 2252 | 0 - turn nmi_watchdog off |
2253 | 1 - turn nmi_watchdog on | ||
2240 | When panic is specified, panic when an NMI watchdog | 2254 | When panic is specified, panic when an NMI watchdog |
2241 | timeout occurs (or 'nopanic' to override the opposite | 2255 | timeout occurs (or 'nopanic' to override the opposite |
2242 | default). | 2256 | default). |
@@ -2315,12 +2329,14 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2315 | noexec32=off: disable non-executable mappings | 2329 | noexec32=off: disable non-executable mappings |
2316 | read implies executable mappings | 2330 | read implies executable mappings |
2317 | 2331 | ||
2318 | nofpu [SH] Disable hardware FPU at boot time. | 2332 | nofpu [MIPS,SH] Disable hardware FPU at boot time. |
2319 | 2333 | ||
2320 | nofxsr [BUGS=X86-32] Disables x86 floating point extended | 2334 | nofxsr [BUGS=X86-32] Disables x86 floating point extended |
2321 | register save and restore. The kernel will only save | 2335 | register save and restore. The kernel will only save |
2322 | legacy floating-point registers on task switch. | 2336 | legacy floating-point registers on task switch. |
2323 | 2337 | ||
2338 | nohugeiomap [KNL,x86] Disable kernel huge I/O mappings. | ||
2339 | |||
2324 | noxsave [BUGS=X86] Disables x86 extended register state save | 2340 | noxsave [BUGS=X86] Disables x86 extended register state save |
2325 | and restore using xsave. The kernel will fallback to | 2341 | and restore using xsave. The kernel will fallback to |
2326 | enabling legacy floating-point and sse state. | 2342 | enabling legacy floating-point and sse state. |
@@ -2340,12 +2356,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2340 | parameter, xsave area per process might occupy more | 2356 | parameter, xsave area per process might occupy more |
2341 | memory on xsaves enabled systems. | 2357 | memory on xsaves enabled systems. |
2342 | 2358 | ||
2343 | eagerfpu= [X86] | ||
2344 | on enable eager fpu restore | ||
2345 | off disable eager fpu restore | ||
2346 | auto selects the default scheme, which automatically | ||
2347 | enables eagerfpu restore for xsaveopt. | ||
2348 | |||
2349 | nohlt [BUGS=ARM,SH] Tells the kernel that the sleep(SH) or | 2359 | nohlt [BUGS=ARM,SH] Tells the kernel that the sleep(SH) or |
2350 | wfi(ARM) instruction doesn't work correctly and not to | 2360 | wfi(ARM) instruction doesn't work correctly and not to |
2351 | use it. This is also useful when using JTAG debugger. | 2361 | use it. This is also useful when using JTAG debugger. |
@@ -2463,7 +2473,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2463 | 2473 | ||
2464 | nousb [USB] Disable the USB subsystem | 2474 | nousb [USB] Disable the USB subsystem |
2465 | 2475 | ||
2466 | nowatchdog [KNL] Disable the lockup detector (NMI watchdog). | 2476 | nowatchdog [KNL] Disable both lockup detectors, i.e. |
2477 | soft-lockup and NMI watchdog (hard-lockup). | ||
2467 | 2478 | ||
2468 | nowb [ARM] | 2479 | nowb [ARM] |
2469 | 2480 | ||
@@ -2968,6 +2979,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2968 | Set maximum number of finished RCU callbacks to | 2979 | Set maximum number of finished RCU callbacks to |
2969 | process in one batch. | 2980 | process in one batch. |
2970 | 2981 | ||
2982 | rcutree.gp_init_delay= [KNL] | ||
2983 | Set the number of jiffies to delay each step of | ||
2984 | RCU grace-period initialization. This only has | ||
2985 | effect when CONFIG_RCU_TORTURE_TEST_SLOW_INIT is | ||
2986 | set. | ||
2987 | |||
2971 | rcutree.rcu_fanout_leaf= [KNL] | 2988 | rcutree.rcu_fanout_leaf= [KNL] |
2972 | Increase the number of CPUs assigned to each | 2989 | Increase the number of CPUs assigned to each |
2973 | leaf rcu_node structure. Useful for very large | 2990 | leaf rcu_node structure. Useful for very large |
@@ -2991,11 +3008,15 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2991 | value is one, and maximum value is HZ. | 3008 | value is one, and maximum value is HZ. |
2992 | 3009 | ||
2993 | rcutree.kthread_prio= [KNL,BOOT] | 3010 | rcutree.kthread_prio= [KNL,BOOT] |
2994 | Set the SCHED_FIFO priority of the RCU | 3011 | Set the SCHED_FIFO priority of the RCU per-CPU |
2995 | per-CPU kthreads (rcuc/N). This value is also | 3012 | kthreads (rcuc/N). This value is also used for |
2996 | used for the priority of the RCU boost threads | 3013 | the priority of the RCU boost threads (rcub/N) |
2997 | (rcub/N). Valid values are 1-99 and the default | 3014 | and for the RCU grace-period kthreads (rcu_bh, |
2998 | is 1 (the least-favored priority). | 3015 | rcu_preempt, and rcu_sched). If RCU_BOOST is |
3016 | set, valid values are 1-99 and the default is 1 | ||
3017 | (the least-favored priority). Otherwise, when | ||
3018 | RCU_BOOST is not set, valid values are 0-99 and | ||
3019 | the default is zero (non-realtime operation). | ||
2999 | 3020 | ||
3000 | rcutree.rcu_nocb_leader_stride= [KNL] | 3021 | rcutree.rcu_nocb_leader_stride= [KNL] |
3001 | Set the number of NOCB kthread groups, which | 3022 | Set the number of NOCB kthread groups, which |
@@ -3462,6 +3483,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
3462 | improve throughput, but will also increase the | 3483 | improve throughput, but will also increase the |
3463 | amount of memory reserved for use by the client. | 3484 | amount of memory reserved for use by the client. |
3464 | 3485 | ||
3486 | suspend.pm_test_delay= | ||
3487 | [SUSPEND] | ||
3488 | Sets the number of seconds to remain in a suspend test | ||
3489 | mode before resuming the system (see | ||
3490 | /sys/power/pm_test). Only available when CONFIG_PM_DEBUG | ||
3491 | is set. Default value is 5. | ||
3492 | |||
3465 | swapaccount=[0|1] | 3493 | swapaccount=[0|1] |
3466 | [KNL] Enable accounting of swap in memory resource | 3494 | [KNL] Enable accounting of swap in memory resource |
3467 | controller if no parameter or 1 is given or disable | 3495 | controller if no parameter or 1 is given or disable |
diff --git a/Documentation/kernel-per-CPU-kthreads.txt b/Documentation/kernel-per-CPU-kthreads.txt index f3cd299fcc41..f4cbfe0ba108 100644 --- a/Documentation/kernel-per-CPU-kthreads.txt +++ b/Documentation/kernel-per-CPU-kthreads.txt | |||
@@ -190,20 +190,24 @@ To reduce its OS jitter, do any of the following: | |||
190 | on each CPU, including cs_dbs_timer() and od_dbs_timer(). | 190 | on each CPU, including cs_dbs_timer() and od_dbs_timer(). |
191 | WARNING: Please check your CPU specifications to | 191 | WARNING: Please check your CPU specifications to |
192 | make sure that this is safe on your particular system. | 192 | make sure that this is safe on your particular system. |
193 | d. It is not possible to entirely get rid of OS jitter | 193 | d. As of v3.18, Christoph Lameter's on-demand vmstat workers |
194 | from vmstat_update() on CONFIG_SMP=y systems, but you | 194 | commit prevents OS jitter due to vmstat_update() on |
195 | can decrease its frequency by writing a large value | 195 | CONFIG_SMP=y systems. Before v3.18, is not possible |
196 | to /proc/sys/vm/stat_interval. The default value is | 196 | to entirely get rid of the OS jitter, but you can |
197 | HZ, for an interval of one second. Of course, larger | 197 | decrease its frequency by writing a large value to |
198 | values will make your virtual-memory statistics update | 198 | /proc/sys/vm/stat_interval. The default value is HZ, |
199 | more slowly. Of course, you can also run your workload | 199 | for an interval of one second. Of course, larger values |
200 | at a real-time priority, thus preempting vmstat_update(), | 200 | will make your virtual-memory statistics update more |
201 | slowly. Of course, you can also run your workload at | ||
202 | a real-time priority, thus preempting vmstat_update(), | ||
201 | but if your workload is CPU-bound, this is a bad idea. | 203 | but if your workload is CPU-bound, this is a bad idea. |
202 | However, there is an RFC patch from Christoph Lameter | 204 | However, there is an RFC patch from Christoph Lameter |
203 | (based on an earlier one from Gilad Ben-Yossef) that | 205 | (based on an earlier one from Gilad Ben-Yossef) that |
204 | reduces or even eliminates vmstat overhead for some | 206 | reduces or even eliminates vmstat overhead for some |
205 | workloads at https://lkml.org/lkml/2013/9/4/379. | 207 | workloads at https://lkml.org/lkml/2013/9/4/379. |
206 | e. If running on high-end powerpc servers, build with | 208 | e. Boot with "elevator=noop" to avoid workqueue use by |
209 | the block layer. | ||
210 | f. If running on high-end powerpc servers, build with | ||
207 | CONFIG_PPC_RTAS_DAEMON=n. This prevents the RTAS | 211 | CONFIG_PPC_RTAS_DAEMON=n. This prevents the RTAS |
208 | daemon from running on each CPU every second or so. | 212 | daemon from running on each CPU every second or so. |
209 | (This will require editing Kconfig files and will defeat | 213 | (This will require editing Kconfig files and will defeat |
@@ -211,12 +215,12 @@ To reduce its OS jitter, do any of the following: | |||
211 | due to the rtas_event_scan() function. | 215 | due to the rtas_event_scan() function. |
212 | WARNING: Please check your CPU specifications to | 216 | WARNING: Please check your CPU specifications to |
213 | make sure that this is safe on your particular system. | 217 | make sure that this is safe on your particular system. |
214 | f. If running on Cell Processor, build your kernel with | 218 | g. If running on Cell Processor, build your kernel with |
215 | CBE_CPUFREQ_SPU_GOVERNOR=n to avoid OS jitter from | 219 | CBE_CPUFREQ_SPU_GOVERNOR=n to avoid OS jitter from |
216 | spu_gov_work(). | 220 | spu_gov_work(). |
217 | WARNING: Please check your CPU specifications to | 221 | WARNING: Please check your CPU specifications to |
218 | make sure that this is safe on your particular system. | 222 | make sure that this is safe on your particular system. |
219 | g. If running on PowerMAC, build your kernel with | 223 | h. If running on PowerMAC, build your kernel with |
220 | CONFIG_PMAC_RACKMETER=n to disable the CPU-meter, | 224 | CONFIG_PMAC_RACKMETER=n to disable the CPU-meter, |
221 | avoiding OS jitter from rackmeter_do_timer(). | 225 | avoiding OS jitter from rackmeter_do_timer(). |
222 | 226 | ||
@@ -258,8 +262,12 @@ Purpose: Detect software lockups on each CPU. | |||
258 | To reduce its OS jitter, do at least one of the following: | 262 | To reduce its OS jitter, do at least one of the following: |
259 | 1. Build with CONFIG_LOCKUP_DETECTOR=n, which will prevent these | 263 | 1. Build with CONFIG_LOCKUP_DETECTOR=n, which will prevent these |
260 | kthreads from being created in the first place. | 264 | kthreads from being created in the first place. |
261 | 2. Echo a zero to /proc/sys/kernel/watchdog to disable the | 265 | 2. Boot with "nosoftlockup=0", which will also prevent these kthreads |
266 | from being created. Other related watchdog and softlockup boot | ||
267 | parameters may be found in Documentation/kernel-parameters.txt | ||
268 | and Documentation/watchdog/watchdog-parameters.txt. | ||
269 | 3. Echo a zero to /proc/sys/kernel/watchdog to disable the | ||
262 | watchdog timer. | 270 | watchdog timer. |
263 | 3. Echo a large number of /proc/sys/kernel/watchdog_thresh in | 271 | 4. Echo a large number of /proc/sys/kernel/watchdog_thresh in |
264 | order to reduce the frequency of OS jitter due to the watchdog | 272 | order to reduce the frequency of OS jitter due to the watchdog |
265 | timer down to a level that is acceptable for your workload. | 273 | timer down to a level that is acceptable for your workload. |
diff --git a/Documentation/kmemcheck.txt b/Documentation/kmemcheck.txt index a41bdebbe87b..80aae85d8da6 100644 --- a/Documentation/kmemcheck.txt +++ b/Documentation/kmemcheck.txt | |||
@@ -82,8 +82,8 @@ menu to even appear in "menuconfig". These are: | |||
82 | 82 | ||
83 | o CONFIG_DEBUG_PAGEALLOC=n | 83 | o CONFIG_DEBUG_PAGEALLOC=n |
84 | 84 | ||
85 | This option is located under "Kernel hacking" / "Debug page memory | 85 | This option is located under "Kernel hacking" / "Memory Debugging" |
86 | allocations". | 86 | / "Debug page memory allocations". |
87 | 87 | ||
88 | In addition, I highly recommend turning on CONFIG_DEBUG_INFO=y. This is also | 88 | In addition, I highly recommend turning on CONFIG_DEBUG_INFO=y. This is also |
89 | located under "Kernel hacking". With this, you will be able to get line number | 89 | located under "Kernel hacking". With this, you will be able to get line number |
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt index 1488b6525eb6..1f9b3e2b98ae 100644 --- a/Documentation/kprobes.txt +++ b/Documentation/kprobes.txt | |||
@@ -305,8 +305,8 @@ architectures: | |||
305 | 3. Configuring Kprobes | 305 | 3. Configuring Kprobes |
306 | 306 | ||
307 | When configuring the kernel using make menuconfig/xconfig/oldconfig, | 307 | When configuring the kernel using make menuconfig/xconfig/oldconfig, |
308 | ensure that CONFIG_KPROBES is set to "y". Under "Instrumentation | 308 | ensure that CONFIG_KPROBES is set to "y". Under "General setup", look |
309 | Support", look for "Kprobes". | 309 | for "Kprobes". |
310 | 310 | ||
311 | So that you can load and unload Kprobes-based instrumentation modules, | 311 | So that you can load and unload Kprobes-based instrumentation modules, |
312 | make sure "Loadable module support" (CONFIG_MODULES) and "Module | 312 | make sure "Loadable module support" (CONFIG_MODULES) and "Module |
diff --git a/Documentation/leds/leds-class-flash.txt b/Documentation/leds/leds-class-flash.txt new file mode 100644 index 000000000000..19bb67355424 --- /dev/null +++ b/Documentation/leds/leds-class-flash.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | |||
2 | Flash LED handling under Linux | ||
3 | ============================== | ||
4 | |||
5 | Some LED devices provide two modes - torch and flash. In the LED subsystem | ||
6 | those modes are supported by LED class (see Documentation/leds/leds-class.txt) | ||
7 | and LED Flash class respectively. The torch mode related features are enabled | ||
8 | by default and the flash ones only if a driver declares it by setting | ||
9 | LED_DEV_CAP_FLASH flag. | ||
10 | |||
11 | In order to enable the support for flash LEDs CONFIG_LEDS_CLASS_FLASH symbol | ||
12 | must be defined in the kernel config. A LED Flash class driver must be | ||
13 | registered in the LED subsystem with led_classdev_flash_register function. | ||
14 | |||
15 | Following sysfs attributes are exposed for controlling flash LED devices: | ||
16 | (see Documentation/ABI/testing/sysfs-class-led-flash) | ||
17 | - flash_brightness | ||
18 | - max_flash_brightness | ||
19 | - flash_timeout | ||
20 | - max_flash_timeout | ||
21 | - flash_strobe | ||
22 | - flash_fault | ||
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt index ca2387ef27ab..f95746189b5d 100644 --- a/Documentation/memory-barriers.txt +++ b/Documentation/memory-barriers.txt | |||
@@ -592,9 +592,9 @@ See also the subsection on "Cache Coherency" for a more thorough example. | |||
592 | CONTROL DEPENDENCIES | 592 | CONTROL DEPENDENCIES |
593 | -------------------- | 593 | -------------------- |
594 | 594 | ||
595 | A control dependency requires a full read memory barrier, not simply a data | 595 | A load-load control dependency requires a full read memory barrier, not |
596 | dependency barrier to make it work correctly. Consider the following bit of | 596 | simply a data dependency barrier to make it work correctly. Consider the |
597 | code: | 597 | following bit of code: |
598 | 598 | ||
599 | q = ACCESS_ONCE(a); | 599 | q = ACCESS_ONCE(a); |
600 | if (q) { | 600 | if (q) { |
@@ -615,14 +615,15 @@ case what's actually required is: | |||
615 | } | 615 | } |
616 | 616 | ||
617 | However, stores are not speculated. This means that ordering -is- provided | 617 | However, stores are not speculated. This means that ordering -is- provided |
618 | in the following example: | 618 | for load-store control dependencies, as in the following example: |
619 | 619 | ||
620 | q = ACCESS_ONCE(a); | 620 | q = ACCESS_ONCE(a); |
621 | if (q) { | 621 | if (q) { |
622 | ACCESS_ONCE(b) = p; | 622 | ACCESS_ONCE(b) = p; |
623 | } | 623 | } |
624 | 624 | ||
625 | Please note that ACCESS_ONCE() is not optional! Without the | 625 | Control dependencies pair normally with other types of barriers. |
626 | That said, please note that ACCESS_ONCE() is not optional! Without the | ||
626 | ACCESS_ONCE(), might combine the load from 'a' with other loads from | 627 | ACCESS_ONCE(), might combine the load from 'a' with other loads from |
627 | 'a', and the store to 'b' with other stores to 'b', with possible highly | 628 | 'a', and the store to 'b' with other stores to 'b', with possible highly |
628 | counterintuitive effects on ordering. | 629 | counterintuitive effects on ordering. |
@@ -813,6 +814,8 @@ In summary: | |||
813 | barrier() can help to preserve your control dependency. Please | 814 | barrier() can help to preserve your control dependency. Please |
814 | see the Compiler Barrier section for more information. | 815 | see the Compiler Barrier section for more information. |
815 | 816 | ||
817 | (*) Control dependencies pair normally with other types of barriers. | ||
818 | |||
816 | (*) Control dependencies do -not- provide transitivity. If you | 819 | (*) Control dependencies do -not- provide transitivity. If you |
817 | need transitivity, use smp_mb(). | 820 | need transitivity, use smp_mb(). |
818 | 821 | ||
@@ -823,14 +826,14 @@ SMP BARRIER PAIRING | |||
823 | When dealing with CPU-CPU interactions, certain types of memory barrier should | 826 | When dealing with CPU-CPU interactions, certain types of memory barrier should |
824 | always be paired. A lack of appropriate pairing is almost certainly an error. | 827 | always be paired. A lack of appropriate pairing is almost certainly an error. |
825 | 828 | ||
826 | General barriers pair with each other, though they also pair with | 829 | General barriers pair with each other, though they also pair with most |
827 | most other types of barriers, albeit without transitivity. An acquire | 830 | other types of barriers, albeit without transitivity. An acquire barrier |
828 | barrier pairs with a release barrier, but both may also pair with other | 831 | pairs with a release barrier, but both may also pair with other barriers, |
829 | barriers, including of course general barriers. A write barrier pairs | 832 | including of course general barriers. A write barrier pairs with a data |
830 | with a data dependency barrier, an acquire barrier, a release barrier, | 833 | dependency barrier, a control dependency, an acquire barrier, a release |
831 | a read barrier, or a general barrier. Similarly a read barrier or a | 834 | barrier, a read barrier, or a general barrier. Similarly a read barrier, |
832 | data dependency barrier pairs with a write barrier, an acquire barrier, | 835 | control dependency, or a data dependency barrier pairs with a write |
833 | a release barrier, or a general barrier: | 836 | barrier, an acquire barrier, a release barrier, or a general barrier: |
834 | 837 | ||
835 | CPU 1 CPU 2 | 838 | CPU 1 CPU 2 |
836 | =============== =============== | 839 | =============== =============== |
@@ -850,6 +853,19 @@ Or: | |||
850 | <data dependency barrier> | 853 | <data dependency barrier> |
851 | y = *x; | 854 | y = *x; |
852 | 855 | ||
856 | Or even: | ||
857 | |||
858 | CPU 1 CPU 2 | ||
859 | =============== =============================== | ||
860 | r1 = ACCESS_ONCE(y); | ||
861 | <general barrier> | ||
862 | ACCESS_ONCE(y) = 1; if (r2 = ACCESS_ONCE(x)) { | ||
863 | <implicit control dependency> | ||
864 | ACCESS_ONCE(y) = 1; | ||
865 | } | ||
866 | |||
867 | assert(r1 == 0 || r2 == 0); | ||
868 | |||
853 | Basically, the read barrier always has to be there, even though it can be of | 869 | Basically, the read barrier always has to be there, even though it can be of |
854 | the "weaker" type. | 870 | the "weaker" type. |
855 | 871 | ||
@@ -1711,7 +1727,7 @@ There are some more advanced barrier functions: | |||
1711 | } | 1727 | } |
1712 | 1728 | ||
1713 | The dma_rmb() allows us guarantee the device has released ownership | 1729 | The dma_rmb() allows us guarantee the device has released ownership |
1714 | before we read the data from the descriptor, and he dma_wmb() allows | 1730 | before we read the data from the descriptor, and the dma_wmb() allows |
1715 | us to guarantee the data is written to the descriptor before the device | 1731 | us to guarantee the data is written to the descriptor before the device |
1716 | can see it now has ownership. The wmb() is needed to guarantee that the | 1732 | can see it now has ownership. The wmb() is needed to guarantee that the |
1717 | cache coherent memory writes have completed before attempting a write to | 1733 | cache coherent memory writes have completed before attempting a write to |
diff --git a/Documentation/memory-hotplug.txt b/Documentation/memory-hotplug.txt index ea03abfc97e9..ce2cfcf35c27 100644 --- a/Documentation/memory-hotplug.txt +++ b/Documentation/memory-hotplug.txt | |||
@@ -149,7 +149,7 @@ For example, assume 1GiB memory block size. A device for a memory starting at | |||
149 | (0x100000000 / 1Gib = 4) | 149 | (0x100000000 / 1Gib = 4) |
150 | This device covers address range [0x100000000 ... 0x140000000) | 150 | This device covers address range [0x100000000 ... 0x140000000) |
151 | 151 | ||
152 | Under each memory block, you can see 4 files: | 152 | Under each memory block, you can see 5 files: |
153 | 153 | ||
154 | /sys/devices/system/memory/memoryXXX/phys_index | 154 | /sys/devices/system/memory/memoryXXX/phys_index |
155 | /sys/devices/system/memory/memoryXXX/phys_device | 155 | /sys/devices/system/memory/memoryXXX/phys_device |
@@ -359,38 +359,51 @@ Need more implementation yet.... | |||
359 | -------------------------------- | 359 | -------------------------------- |
360 | 8. Memory hotplug event notifier | 360 | 8. Memory hotplug event notifier |
361 | -------------------------------- | 361 | -------------------------------- |
362 | Memory hotplug has event notifier. There are 6 types of notification. | 362 | Hotplugging events are sent to a notification queue. |
363 | 363 | ||
364 | MEMORY_GOING_ONLINE | 364 | There are six types of notification defined in include/linux/memory.h: |
365 | |||
366 | MEM_GOING_ONLINE | ||
365 | Generated before new memory becomes available in order to be able to | 367 | Generated before new memory becomes available in order to be able to |
366 | prepare subsystems to handle memory. The page allocator is still unable | 368 | prepare subsystems to handle memory. The page allocator is still unable |
367 | to allocate from the new memory. | 369 | to allocate from the new memory. |
368 | 370 | ||
369 | MEMORY_CANCEL_ONLINE | 371 | MEM_CANCEL_ONLINE |
370 | Generated if MEMORY_GOING_ONLINE fails. | 372 | Generated if MEMORY_GOING_ONLINE fails. |
371 | 373 | ||
372 | MEMORY_ONLINE | 374 | MEM_ONLINE |
373 | Generated when memory has successfully brought online. The callback may | 375 | Generated when memory has successfully brought online. The callback may |
374 | allocate pages from the new memory. | 376 | allocate pages from the new memory. |
375 | 377 | ||
376 | MEMORY_GOING_OFFLINE | 378 | MEM_GOING_OFFLINE |
377 | Generated to begin the process of offlining memory. Allocations are no | 379 | Generated to begin the process of offlining memory. Allocations are no |
378 | longer possible from the memory but some of the memory to be offlined | 380 | longer possible from the memory but some of the memory to be offlined |
379 | is still in use. The callback can be used to free memory known to a | 381 | is still in use. The callback can be used to free memory known to a |
380 | subsystem from the indicated memory block. | 382 | subsystem from the indicated memory block. |
381 | 383 | ||
382 | MEMORY_CANCEL_OFFLINE | 384 | MEM_CANCEL_OFFLINE |
383 | Generated if MEMORY_GOING_OFFLINE fails. Memory is available again from | 385 | Generated if MEMORY_GOING_OFFLINE fails. Memory is available again from |
384 | the memory block that we attempted to offline. | 386 | the memory block that we attempted to offline. |
385 | 387 | ||
386 | MEMORY_OFFLINE | 388 | MEM_OFFLINE |
387 | Generated after offlining memory is complete. | 389 | Generated after offlining memory is complete. |
388 | 390 | ||
389 | A callback routine can be registered by | 391 | A callback routine can be registered by calling |
392 | |||
390 | hotplug_memory_notifier(callback_func, priority) | 393 | hotplug_memory_notifier(callback_func, priority) |
391 | 394 | ||
392 | The second argument of callback function (action) is event types of above. | 395 | Callback functions with higher values of priority are called before callback |
393 | The third argument is passed by pointer of struct memory_notify. | 396 | functions with lower values. |
397 | |||
398 | A callback function must have the following prototype: | ||
399 | |||
400 | int callback_func( | ||
401 | struct notifier_block *self, unsigned long action, void *arg); | ||
402 | |||
403 | The first argument of the callback function (self) is a pointer to the block | ||
404 | of the notifier chain that points to the callback function itself. | ||
405 | The second argument (action) is one of the event types described above. | ||
406 | The third argument (arg) passes a pointer of struct memory_notify. | ||
394 | 407 | ||
395 | struct memory_notify { | 408 | struct memory_notify { |
396 | unsigned long start_pfn; | 409 | unsigned long start_pfn; |
@@ -412,6 +425,18 @@ node loses all memory. If this is -1, then nodemask status is not changed. | |||
412 | If status_changed_nid* >= 0, callback should create/discard structures for the | 425 | If status_changed_nid* >= 0, callback should create/discard structures for the |
413 | node if necessary. | 426 | node if necessary. |
414 | 427 | ||
428 | The callback routine shall return one of the values | ||
429 | NOTIFY_DONE, NOTIFY_OK, NOTIFY_BAD, NOTIFY_STOP | ||
430 | defined in include/linux/notifier.h | ||
431 | |||
432 | NOTIFY_DONE and NOTIFY_OK have no effect on the further processing. | ||
433 | |||
434 | NOTIFY_BAD is used as response to the MEM_GOING_ONLINE, MEM_GOING_OFFLINE, | ||
435 | MEM_ONLINE, or MEM_OFFLINE action to cancel hotplugging. It stops | ||
436 | further processing of the notification queue. | ||
437 | |||
438 | NOTIFY_STOP stops further processing of the notification queue. | ||
439 | |||
415 | -------------- | 440 | -------------- |
416 | 9. Future Work | 441 | 9. Future Work |
417 | -------------- | 442 | -------------- |
diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt index 0a2859a8ee7e..5abad1e921ca 100644 --- a/Documentation/networking/can.txt +++ b/Documentation/networking/can.txt | |||
@@ -22,7 +22,8 @@ This file contains | |||
22 | 4.1.3 RAW socket option CAN_RAW_LOOPBACK | 22 | 4.1.3 RAW socket option CAN_RAW_LOOPBACK |
23 | 4.1.4 RAW socket option CAN_RAW_RECV_OWN_MSGS | 23 | 4.1.4 RAW socket option CAN_RAW_RECV_OWN_MSGS |
24 | 4.1.5 RAW socket option CAN_RAW_FD_FRAMES | 24 | 4.1.5 RAW socket option CAN_RAW_FD_FRAMES |
25 | 4.1.6 RAW socket returned message flags | 25 | 4.1.6 RAW socket option CAN_RAW_JOIN_FILTERS |
26 | 4.1.7 RAW socket returned message flags | ||
26 | 4.2 Broadcast Manager protocol sockets (SOCK_DGRAM) | 27 | 4.2 Broadcast Manager protocol sockets (SOCK_DGRAM) |
27 | 4.2.1 Broadcast Manager operations | 28 | 4.2.1 Broadcast Manager operations |
28 | 4.2.2 Broadcast Manager message flags | 29 | 4.2.2 Broadcast Manager message flags |
@@ -601,7 +602,22 @@ solution for a couple of reasons: | |||
601 | CAN FD frames by checking if the device maximum transfer unit is CANFD_MTU. | 602 | CAN FD frames by checking if the device maximum transfer unit is CANFD_MTU. |
602 | The CAN device MTU can be retrieved e.g. with a SIOCGIFMTU ioctl() syscall. | 603 | The CAN device MTU can be retrieved e.g. with a SIOCGIFMTU ioctl() syscall. |
603 | 604 | ||
604 | 4.1.6 RAW socket returned message flags | 605 | 4.1.6 RAW socket option CAN_RAW_JOIN_FILTERS |
606 | |||
607 | The CAN_RAW socket can set multiple CAN identifier specific filters that | ||
608 | lead to multiple filters in the af_can.c filter processing. These filters | ||
609 | are indenpendent from each other which leads to logical OR'ed filters when | ||
610 | applied (see 4.1.1). | ||
611 | |||
612 | This socket option joines the given CAN filters in the way that only CAN | ||
613 | frames are passed to user space that matched *all* given CAN filters. The | ||
614 | semantic for the applied filters is therefore changed to a logical AND. | ||
615 | |||
616 | This is useful especially when the filterset is a combination of filters | ||
617 | where the CAN_INV_FILTER flag is set in order to notch single CAN IDs or | ||
618 | CAN ID ranges from the incoming traffic. | ||
619 | |||
620 | 4.1.7 RAW socket returned message flags | ||
605 | 621 | ||
606 | When using recvmsg() call, the msg->msg_flags may contain following flags: | 622 | When using recvmsg() call, the msg->msg_flags may contain following flags: |
607 | 623 | ||
diff --git a/Documentation/networking/filter.txt b/Documentation/networking/filter.txt index 9930ecfbb465..135581f015e1 100644 --- a/Documentation/networking/filter.txt +++ b/Documentation/networking/filter.txt | |||
@@ -280,7 +280,8 @@ Possible BPF extensions are shown in the following table: | |||
280 | rxhash skb->hash | 280 | rxhash skb->hash |
281 | cpu raw_smp_processor_id() | 281 | cpu raw_smp_processor_id() |
282 | vlan_tci skb_vlan_tag_get(skb) | 282 | vlan_tci skb_vlan_tag_get(skb) |
283 | vlan_pr skb_vlan_tag_present(skb) | 283 | vlan_avail skb_vlan_tag_present(skb) |
284 | vlan_tpid skb->vlan_proto | ||
284 | rand prandom_u32() | 285 | rand prandom_u32() |
285 | 286 | ||
286 | These extensions can also be prefixed with '#'. | 287 | These extensions can also be prefixed with '#'. |
diff --git a/Documentation/networking/igb.txt b/Documentation/networking/igb.txt index 43d3549366a0..15534fdd09a8 100644 --- a/Documentation/networking/igb.txt +++ b/Documentation/networking/igb.txt | |||
@@ -42,10 +42,10 @@ Additional Configurations | |||
42 | Jumbo Frames | 42 | Jumbo Frames |
43 | ------------ | 43 | ------------ |
44 | Jumbo Frames support is enabled by changing the MTU to a value larger than | 44 | Jumbo Frames support is enabled by changing the MTU to a value larger than |
45 | the default of 1500. Use the ifconfig command to increase the MTU size. | 45 | the default of 1500. Use the ip command to increase the MTU size. |
46 | For example: | 46 | For example: |
47 | 47 | ||
48 | ifconfig eth<x> mtu 9000 up | 48 | ip link set dev eth<x> mtu 9000 |
49 | 49 | ||
50 | This setting is not saved across reboots. | 50 | This setting is not saved across reboots. |
51 | 51 | ||
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index 1b8c964b0d17..071fb18dc57c 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -388,6 +388,16 @@ tcp_mtu_probing - INTEGER | |||
388 | 1 - Disabled by default, enabled when an ICMP black hole detected | 388 | 1 - Disabled by default, enabled when an ICMP black hole detected |
389 | 2 - Always enabled, use initial MSS of tcp_base_mss. | 389 | 2 - Always enabled, use initial MSS of tcp_base_mss. |
390 | 390 | ||
391 | tcp_probe_interval - INTEGER | ||
392 | Controls how often to start TCP Packetization-Layer Path MTU | ||
393 | Discovery reprobe. The default is reprobing every 10 minutes as | ||
394 | per RFC4821. | ||
395 | |||
396 | tcp_probe_threshold - INTEGER | ||
397 | Controls when TCP Packetization-Layer Path MTU Discovery probing | ||
398 | will stop in respect to the width of search range in bytes. Default | ||
399 | is 8 bytes. | ||
400 | |||
391 | tcp_no_metrics_save - BOOLEAN | 401 | tcp_no_metrics_save - BOOLEAN |
392 | By default, TCP saves various connection metrics in the route cache | 402 | By default, TCP saves various connection metrics in the route cache |
393 | when the connection closes, so that connections established in the | 403 | when the connection closes, so that connections established in the |
@@ -1116,11 +1126,23 @@ arp_accept - BOOLEAN | |||
1116 | gratuitous arp frame, the arp table will be updated regardless | 1126 | gratuitous arp frame, the arp table will be updated regardless |
1117 | if this setting is on or off. | 1127 | if this setting is on or off. |
1118 | 1128 | ||
1129 | mcast_solicit - INTEGER | ||
1130 | The maximum number of multicast probes in INCOMPLETE state, | ||
1131 | when the associated hardware address is unknown. Defaults | ||
1132 | to 3. | ||
1133 | |||
1134 | ucast_solicit - INTEGER | ||
1135 | The maximum number of unicast probes in PROBE state, when | ||
1136 | the hardware address is being reconfirmed. Defaults to 3. | ||
1119 | 1137 | ||
1120 | app_solicit - INTEGER | 1138 | app_solicit - INTEGER |
1121 | The maximum number of probes to send to the user space ARP daemon | 1139 | The maximum number of probes to send to the user space ARP daemon |
1122 | via netlink before dropping back to multicast probes (see | 1140 | via netlink before dropping back to multicast probes (see |
1123 | mcast_solicit). Defaults to 0. | 1141 | mcast_resolicit). Defaults to 0. |
1142 | |||
1143 | mcast_resolicit - INTEGER | ||
1144 | The maximum number of multicast probes after unicast and | ||
1145 | app probes in PROBE state. Defaults to 0. | ||
1124 | 1146 | ||
1125 | disable_policy - BOOLEAN | 1147 | disable_policy - BOOLEAN |
1126 | Disable IPSEC policy (SPD) for this interface | 1148 | Disable IPSEC policy (SPD) for this interface |
@@ -1198,6 +1220,17 @@ anycast_src_echo_reply - BOOLEAN | |||
1198 | FALSE: disabled | 1220 | FALSE: disabled |
1199 | Default: FALSE | 1221 | Default: FALSE |
1200 | 1222 | ||
1223 | idgen_delay - INTEGER | ||
1224 | Controls the delay in seconds after which time to retry | ||
1225 | privacy stable address generation if a DAD conflict is | ||
1226 | detected. | ||
1227 | Default: 1 (as specified in RFC7217) | ||
1228 | |||
1229 | idgen_retries - INTEGER | ||
1230 | Controls the number of retries to generate a stable privacy | ||
1231 | address if a DAD conflict is detected. | ||
1232 | Default: 3 (as specified in RFC7217) | ||
1233 | |||
1201 | mld_qrv - INTEGER | 1234 | mld_qrv - INTEGER |
1202 | Controls the MLD query robustness variable (see RFC3810 9.1). | 1235 | Controls the MLD query robustness variable (see RFC3810 9.1). |
1203 | Default: 2 (as specified by RFC3810 9.1) | 1236 | Default: 2 (as specified by RFC3810 9.1) |
@@ -1518,6 +1551,20 @@ use_optimistic - BOOLEAN | |||
1518 | 0: disabled (default) | 1551 | 0: disabled (default) |
1519 | 1: enabled | 1552 | 1: enabled |
1520 | 1553 | ||
1554 | stable_secret - IPv6 address | ||
1555 | This IPv6 address will be used as a secret to generate IPv6 | ||
1556 | addresses for link-local addresses and autoconfigured | ||
1557 | ones. All addresses generated after setting this secret will | ||
1558 | be stable privacy ones by default. This can be changed via the | ||
1559 | addrgenmode ip-link. conf/default/stable_secret is used as the | ||
1560 | secret for the namespace, the interface specific ones can | ||
1561 | overwrite that. Writes to conf/all/stable_secret are refused. | ||
1562 | |||
1563 | It is recommended to generate this secret during installation | ||
1564 | of a system and keep it stable after that. | ||
1565 | |||
1566 | By default the stable secret is unset. | ||
1567 | |||
1521 | icmp/*: | 1568 | icmp/*: |
1522 | ratelimit - INTEGER | 1569 | ratelimit - INTEGER |
1523 | Limit the maximal rates for sending ICMPv6 packets. | 1570 | Limit the maximal rates for sending ICMPv6 packets. |
diff --git a/Documentation/networking/ipvs-sysctl.txt b/Documentation/networking/ipvs-sysctl.txt index 7a3c04729591..3ba709531adb 100644 --- a/Documentation/networking/ipvs-sysctl.txt +++ b/Documentation/networking/ipvs-sysctl.txt | |||
@@ -22,6 +22,27 @@ backup_only - BOOLEAN | |||
22 | If set, disable the director function while the server is | 22 | If set, disable the director function while the server is |
23 | in backup mode to avoid packet loops for DR/TUN methods. | 23 | in backup mode to avoid packet loops for DR/TUN methods. |
24 | 24 | ||
25 | conn_reuse_mode - INTEGER | ||
26 | 1 - default | ||
27 | |||
28 | Controls how ipvs will deal with connections that are detected | ||
29 | port reuse. It is a bitmap, with the values being: | ||
30 | |||
31 | 0: disable any special handling on port reuse. The new | ||
32 | connection will be delivered to the same real server that was | ||
33 | servicing the previous connection. This will effectively | ||
34 | disable expire_nodest_conn. | ||
35 | |||
36 | bit 1: enable rescheduling of new connections when it is safe. | ||
37 | That is, whenever expire_nodest_conn and for TCP sockets, when | ||
38 | the connection is in TIME_WAIT state (which is only possible if | ||
39 | you use NAT mode). | ||
40 | |||
41 | bit 2: it is bit 1 plus, for TCP connections, when connections | ||
42 | are in FIN_WAIT state, as this is the last state seen by load | ||
43 | balancer in Direct Routing mode. This bit helps on adding new | ||
44 | real servers to a very busy cluster. | ||
45 | |||
25 | conntrack - BOOLEAN | 46 | conntrack - BOOLEAN |
26 | 0 - disabled (default) | 47 | 0 - disabled (default) |
27 | not 0 - enabled | 48 | not 0 - enabled |
diff --git a/Documentation/networking/ixgb.txt b/Documentation/networking/ixgb.txt index 1e0c045e89f7..9b4a10a1cf50 100644 --- a/Documentation/networking/ixgb.txt +++ b/Documentation/networking/ixgb.txt | |||
@@ -39,7 +39,7 @@ Channel Bonding documentation can be found in the Linux kernel source: | |||
39 | 39 | ||
40 | The driver information previously displayed in the /proc filesystem is not | 40 | The driver information previously displayed in the /proc filesystem is not |
41 | supported in this release. Alternatively, you can use ethtool (version 1.6 | 41 | supported in this release. Alternatively, you can use ethtool (version 1.6 |
42 | or later), lspci, and ifconfig to obtain the same information. | 42 | or later), lspci, and iproute2 to obtain the same information. |
43 | 43 | ||
44 | Instructions on updating ethtool can be found in the section "Additional | 44 | Instructions on updating ethtool can be found in the section "Additional |
45 | Configurations" later in this document. | 45 | Configurations" later in this document. |
@@ -90,7 +90,7 @@ select m for "Intel(R) PRO/10GbE support" located at: | |||
90 | 3. Assign an IP address to the interface by entering the following, where | 90 | 3. Assign an IP address to the interface by entering the following, where |
91 | x is the interface number: | 91 | x is the interface number: |
92 | 92 | ||
93 | ifconfig ethx <IP_address> | 93 | ip addr add ethx <IP_address> |
94 | 94 | ||
95 | 4. Verify that the interface works. Enter the following, where <IP_address> | 95 | 4. Verify that the interface works. Enter the following, where <IP_address> |
96 | is the IP address for another machine on the same subnet as the interface | 96 | is the IP address for another machine on the same subnet as the interface |
@@ -177,7 +177,7 @@ NOTE: These changes are only suggestions, and serve as a starting point for | |||
177 | tuning your network performance. | 177 | tuning your network performance. |
178 | 178 | ||
179 | The changes are made in three major ways, listed in order of greatest effect: | 179 | The changes are made in three major ways, listed in order of greatest effect: |
180 | - Use ifconfig to modify the mtu (maximum transmission unit) and the txqueuelen | 180 | - Use ip link to modify the mtu (maximum transmission unit) and the txqueuelen |
181 | parameter. | 181 | parameter. |
182 | - Use sysctl to modify /proc parameters (essentially kernel tuning) | 182 | - Use sysctl to modify /proc parameters (essentially kernel tuning) |
183 | - Use setpci to modify the MMRBC field in PCI-X configuration space to increase | 183 | - Use setpci to modify the MMRBC field in PCI-X configuration space to increase |
@@ -202,7 +202,7 @@ setpci -d 8086:1a48 e6.b=2e | |||
202 | # to change as well. | 202 | # to change as well. |
203 | # set the txqueuelen | 203 | # set the txqueuelen |
204 | # your ixgb adapter should be loaded as eth1 for this to work, change if needed | 204 | # your ixgb adapter should be loaded as eth1 for this to work, change if needed |
205 | ifconfig eth1 mtu 9000 txqueuelen 1000 up | 205 | ip li set dev eth1 mtu 9000 txqueuelen 1000 up |
206 | # call the sysctl utility to modify /proc/sys entries | 206 | # call the sysctl utility to modify /proc/sys entries |
207 | sysctl -p ./sysctl_ixgb.conf | 207 | sysctl -p ./sysctl_ixgb.conf |
208 | - END ixgb_perf.sh | 208 | - END ixgb_perf.sh |
@@ -297,10 +297,10 @@ Additional Configurations | |||
297 | ------------ | 297 | ------------ |
298 | The driver supports Jumbo Frames for all adapters. Jumbo Frames support is | 298 | The driver supports Jumbo Frames for all adapters. Jumbo Frames support is |
299 | enabled by changing the MTU to a value larger than the default of 1500. | 299 | enabled by changing the MTU to a value larger than the default of 1500. |
300 | The maximum value for the MTU is 16114. Use the ifconfig command to | 300 | The maximum value for the MTU is 16114. Use the ip command to |
301 | increase the MTU size. For example: | 301 | increase the MTU size. For example: |
302 | 302 | ||
303 | ifconfig ethx mtu 9000 up | 303 | ip li set dev ethx mtu 9000 |
304 | 304 | ||
305 | The maximum MTU setting for Jumbo Frames is 16114. This value coincides | 305 | The maximum MTU setting for Jumbo Frames is 16114. This value coincides |
306 | with the maximum Jumbo Frames size of 16128. | 306 | with the maximum Jumbo Frames size of 16128. |
diff --git a/Documentation/networking/ixgbe.txt b/Documentation/networking/ixgbe.txt index 0ace6e776ac8..6f0cb57b59c6 100644 --- a/Documentation/networking/ixgbe.txt +++ b/Documentation/networking/ixgbe.txt | |||
@@ -70,10 +70,10 @@ Avago 1000BASE-T SFP ABCU-5710RZ | |||
70 | 82599-based adapters support all passive and active limiting direct attach | 70 | 82599-based adapters support all passive and active limiting direct attach |
71 | cables that comply with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. | 71 | cables that comply with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. |
72 | 72 | ||
73 | Laser turns off for SFP+ when ifconfig down | 73 | Laser turns off for SFP+ when device is down |
74 | ------------------------------------------- | 74 | ------------------------------------------- |
75 | "ifconfig down" turns off the laser for 82599-based SFP+ fiber adapters. | 75 | "ip link set down" turns off the laser for 82599-based SFP+ fiber adapters. |
76 | "ifconfig up" turns on the laser. | 76 | "ip link set up" turns on the laser. |
77 | 77 | ||
78 | 78 | ||
79 | 82598-BASED ADAPTERS | 79 | 82598-BASED ADAPTERS |
@@ -213,13 +213,13 @@ Additional Configurations | |||
213 | ------------ | 213 | ------------ |
214 | The driver supports Jumbo Frames for all adapters. Jumbo Frames support is | 214 | The driver supports Jumbo Frames for all adapters. Jumbo Frames support is |
215 | enabled by changing the MTU to a value larger than the default of 1500. | 215 | enabled by changing the MTU to a value larger than the default of 1500. |
216 | The maximum value for the MTU is 16110. Use the ifconfig command to | 216 | The maximum value for the MTU is 16110. Use the ip command to |
217 | increase the MTU size. For example: | 217 | increase the MTU size. For example: |
218 | 218 | ||
219 | ifconfig ethx mtu 9000 up | 219 | ip link set dev ethx mtu 9000 |
220 | 220 | ||
221 | The maximum MTU setting for Jumbo Frames is 16110. This value coincides | 221 | The maximum MTU setting for Jumbo Frames is 9710. This value coincides |
222 | with the maximum Jumbo Frames size of 16128. | 222 | with the maximum Jumbo Frames size of 9728. |
223 | 223 | ||
224 | Generic Receive Offload, aka GRO | 224 | Generic Receive Offload, aka GRO |
225 | -------------------------------- | 225 | -------------------------------- |
diff --git a/Documentation/networking/mpls-sysctl.txt b/Documentation/networking/mpls-sysctl.txt new file mode 100644 index 000000000000..639ddf0ece9b --- /dev/null +++ b/Documentation/networking/mpls-sysctl.txt | |||
@@ -0,0 +1,20 @@ | |||
1 | /proc/sys/net/mpls/* Variables: | ||
2 | |||
3 | platform_labels - INTEGER | ||
4 | Number of entries in the platform label table. It is not | ||
5 | possible to configure forwarding for label values equal to or | ||
6 | greater than the number of platform labels. | ||
7 | |||
8 | A dense utliziation of the entries in the platform label table | ||
9 | is possible and expected aas the platform labels are locally | ||
10 | allocated. | ||
11 | |||
12 | If the number of platform label table entries is set to 0 no | ||
13 | label will be recognized by the kernel and mpls forwarding | ||
14 | will be disabled. | ||
15 | |||
16 | Reducing this value will remove all label routing entries that | ||
17 | no longer fit in the table. | ||
18 | |||
19 | Possible values: 0 - 1048575 | ||
20 | Default: 0 | ||
diff --git a/Documentation/networking/packet_mmap.txt b/Documentation/networking/packet_mmap.txt index a6d7cb91069e..daa015af16a0 100644 --- a/Documentation/networking/packet_mmap.txt +++ b/Documentation/networking/packet_mmap.txt | |||
@@ -440,9 +440,10 @@ and the following flags apply: | |||
440 | +++ Capture process: | 440 | +++ Capture process: |
441 | from include/linux/if_packet.h | 441 | from include/linux/if_packet.h |
442 | 442 | ||
443 | #define TP_STATUS_COPY 2 | 443 | #define TP_STATUS_COPY (1 << 1) |
444 | #define TP_STATUS_LOSING 4 | 444 | #define TP_STATUS_LOSING (1 << 2) |
445 | #define TP_STATUS_CSUMNOTREADY 8 | 445 | #define TP_STATUS_CSUMNOTREADY (1 << 3) |
446 | #define TP_STATUS_CSUM_VALID (1 << 7) | ||
446 | 447 | ||
447 | TP_STATUS_COPY : This flag indicates that the frame (and associated | 448 | TP_STATUS_COPY : This flag indicates that the frame (and associated |
448 | meta information) has been truncated because it's | 449 | meta information) has been truncated because it's |
@@ -466,6 +467,12 @@ TP_STATUS_CSUMNOTREADY: currently it's used for outgoing IP packets which | |||
466 | reading the packet we should not try to check the | 467 | reading the packet we should not try to check the |
467 | checksum. | 468 | checksum. |
468 | 469 | ||
470 | TP_STATUS_CSUM_VALID : This flag indicates that at least the transport | ||
471 | header checksum of the packet has been already | ||
472 | validated on the kernel side. If the flag is not set | ||
473 | then we are free to check the checksum by ourselves | ||
474 | provided that TP_STATUS_CSUMNOTREADY is also not set. | ||
475 | |||
469 | for convenience there are also the following defines: | 476 | for convenience there are also the following defines: |
470 | 477 | ||
471 | #define TP_STATUS_KERNEL 0 | 478 | #define TP_STATUS_KERNEL 0 |
diff --git a/Documentation/networking/pktgen.txt b/Documentation/networking/pktgen.txt index 6915c6b27869..0344f1d45b37 100644 --- a/Documentation/networking/pktgen.txt +++ b/Documentation/networking/pktgen.txt | |||
@@ -3,13 +3,11 @@ | |||
3 | HOWTO for the linux packet generator | 3 | HOWTO for the linux packet generator |
4 | ------------------------------------ | 4 | ------------------------------------ |
5 | 5 | ||
6 | Date: 041221 | 6 | Enable CONFIG_NET_PKTGEN to compile and build pktgen either in-kernel |
7 | 7 | or as a module. A module is preferred; modprobe pktgen if needed. Once | |
8 | Enable CONFIG_NET_PKTGEN to compile and build pktgen.o either in kernel | 8 | running, pktgen creates a thread for each CPU with affinity to that CPU. |
9 | or as module. Module is preferred. insmod pktgen if needed. Once running | 9 | Monitoring and controlling is done via /proc. It is easiest to select a |
10 | pktgen creates a thread on each CPU where each thread has affinity to its CPU. | 10 | suitable sample script and configure that. |
11 | Monitoring and controlling is done via /proc. Easiest to select a suitable | ||
12 | a sample script and configure. | ||
13 | 11 | ||
14 | On a dual CPU: | 12 | On a dual CPU: |
15 | 13 | ||
@@ -27,7 +25,7 @@ For monitoring and control pktgen creates: | |||
27 | Tuning NIC for max performance | 25 | Tuning NIC for max performance |
28 | ============================== | 26 | ============================== |
29 | 27 | ||
30 | The default NIC setting are (likely) not tuned for pktgen's artificial | 28 | The default NIC settings are (likely) not tuned for pktgen's artificial |
31 | overload type of benchmarking, as this could hurt the normal use-case. | 29 | overload type of benchmarking, as this could hurt the normal use-case. |
32 | 30 | ||
33 | Specifically increasing the TX ring buffer in the NIC: | 31 | Specifically increasing the TX ring buffer in the NIC: |
@@ -35,20 +33,20 @@ Specifically increasing the TX ring buffer in the NIC: | |||
35 | 33 | ||
36 | A larger TX ring can improve pktgen's performance, while it can hurt | 34 | A larger TX ring can improve pktgen's performance, while it can hurt |
37 | in the general case, 1) because the TX ring buffer might get larger | 35 | in the general case, 1) because the TX ring buffer might get larger |
38 | than the CPUs L1/L2 cache, 2) because it allow more queueing in the | 36 | than the CPU's L1/L2 cache, 2) because it allows more queueing in the |
39 | NIC HW layer (which is bad for bufferbloat). | 37 | NIC HW layer (which is bad for bufferbloat). |
40 | 38 | ||
41 | One should be careful to conclude, that packets/descriptors in the HW | 39 | One should hesitate to conclude that packets/descriptors in the HW |
42 | TX ring cause delay. Drivers usually delay cleaning up the | 40 | TX ring cause delay. Drivers usually delay cleaning up the |
43 | ring-buffers (for various performance reasons), thus packets stalling | 41 | ring-buffers for various performance reasons, and packets stalling |
44 | the TX ring, might just be waiting for cleanup. | 42 | the TX ring might just be waiting for cleanup. |
45 | 43 | ||
46 | This cleanup issues is specifically the case, for the driver ixgbe | 44 | This cleanup issue is specifically the case for the driver ixgbe |
47 | (Intel 82599 chip). This driver (ixgbe) combine TX+RX ring cleanups, | 45 | (Intel 82599 chip). This driver (ixgbe) combines TX+RX ring cleanups, |
48 | and the cleanup interval is affected by the ethtool --coalesce setting | 46 | and the cleanup interval is affected by the ethtool --coalesce setting |
49 | of parameter "rx-usecs". | 47 | of parameter "rx-usecs". |
50 | 48 | ||
51 | For ixgbe use e.g "30" resulting in approx 33K interrupts/sec (1/30*10^6): | 49 | For ixgbe use e.g. "30" resulting in approx 33K interrupts/sec (1/30*10^6): |
52 | # ethtool -C ethX rx-usecs 30 | 50 | # ethtool -C ethX rx-usecs 30 |
53 | 51 | ||
54 | 52 | ||
@@ -60,15 +58,16 @@ Running: | |||
60 | Stopped: eth1 | 58 | Stopped: eth1 |
61 | Result: OK: max_before_softirq=10000 | 59 | Result: OK: max_before_softirq=10000 |
62 | 60 | ||
63 | Most important the devices assigned to thread. Note! A device can only belong | 61 | Most important are the devices assigned to the thread. Note that a |
64 | to one thread. | 62 | device can only belong to one thread. |
65 | 63 | ||
66 | 64 | ||
67 | Viewing devices | 65 | Viewing devices |
68 | =============== | 66 | =============== |
69 | 67 | ||
70 | Parm section holds configured info. Current hold running stats. | 68 | The Params section holds configured information. The Current section |
71 | Result is printed after run or after interruption. Example: | 69 | holds running statistics. The Result is printed after a run or after |
70 | interruption. Example: | ||
72 | 71 | ||
73 | /proc/net/pktgen/eth1 | 72 | /proc/net/pktgen/eth1 |
74 | 73 | ||
@@ -93,7 +92,8 @@ Result: OK: 13101142(c12220741+d880401) usec, 10000000 (60byte,0frags) | |||
93 | 92 | ||
94 | Configuring threads and devices | 93 | Configuring threads and devices |
95 | ================================ | 94 | ================================ |
96 | This is done via the /proc interface easiest done via pgset in the scripts | 95 | This is done via the /proc interface, and most easily done via pgset |
96 | as defined in the sample scripts. | ||
97 | 97 | ||
98 | Examples: | 98 | Examples: |
99 | 99 | ||
@@ -192,10 +192,11 @@ Examples: | |||
192 | pgset "rate 300M" set rate to 300 Mb/s | 192 | pgset "rate 300M" set rate to 300 Mb/s |
193 | pgset "ratep 1000000" set rate to 1Mpps | 193 | pgset "ratep 1000000" set rate to 1Mpps |
194 | 194 | ||
195 | Example scripts | 195 | Sample scripts |
196 | =============== | 196 | ============== |
197 | 197 | ||
198 | A collection of small tutorial scripts for pktgen is in examples dir. | 198 | A collection of small tutorial scripts for pktgen is in the |
199 | samples/pktgen directory: | ||
199 | 200 | ||
200 | pktgen.conf-1-1 # 1 CPU 1 dev | 201 | pktgen.conf-1-1 # 1 CPU 1 dev |
201 | pktgen.conf-1-2 # 1 CPU 2 dev | 202 | pktgen.conf-1-2 # 1 CPU 2 dev |
@@ -206,25 +207,26 @@ pktgen.conf-1-1-ip6 # 1 CPU 1 dev ipv6 | |||
206 | pktgen.conf-1-1-ip6-rdos # 1 CPU 1 dev ipv6 w. route DoS | 207 | pktgen.conf-1-1-ip6-rdos # 1 CPU 1 dev ipv6 w. route DoS |
207 | pktgen.conf-1-1-flows # 1 CPU 1 dev multiple flows. | 208 | pktgen.conf-1-1-flows # 1 CPU 1 dev multiple flows. |
208 | 209 | ||
209 | Run in shell: ./pktgen.conf-X-Y It does all the setup including sending. | 210 | Run in shell: ./pktgen.conf-X-Y |
211 | This does all the setup including sending. | ||
210 | 212 | ||
211 | 213 | ||
212 | Interrupt affinity | 214 | Interrupt affinity |
213 | =================== | 215 | =================== |
214 | Note when adding devices to a specific CPU there good idea to also assign | 216 | Note that when adding devices to a specific CPU it is a good idea to |
215 | /proc/irq/XX/smp_affinity so the TX-interrupts gets bound to the same CPU. | 217 | also assign /proc/irq/XX/smp_affinity so that the TX interrupts are bound |
216 | as this reduces cache bouncing when freeing skb's. | 218 | to the same CPU. This reduces cache bouncing when freeing skbs. |
217 | 219 | ||
218 | Enable IPsec | 220 | Enable IPsec |
219 | ============ | 221 | ============ |
220 | Default IPsec transformation with ESP encapsulation plus Transport mode | 222 | Default IPsec transformation with ESP encapsulation plus transport mode |
221 | could be enabled by simply setting: | 223 | can be enabled by simply setting: |
222 | 224 | ||
223 | pgset "flag IPSEC" | 225 | pgset "flag IPSEC" |
224 | pgset "flows 1" | 226 | pgset "flows 1" |
225 | 227 | ||
226 | To avoid breaking existing testbed scripts for using AH type and tunnel mode, | 228 | To avoid breaking existing testbed scripts for using AH type and tunnel mode, |
227 | user could use "pgset spi SPI_VALUE" to specify which formal of transformation | 229 | you can use "pgset spi SPI_VALUE" to specify which transformation mode |
228 | to employ. | 230 | to employ. |
229 | 231 | ||
230 | 232 | ||
diff --git a/Documentation/networking/rds.txt b/Documentation/networking/rds.txt index c67077cbeb80..e1a3d59bbe0f 100644 --- a/Documentation/networking/rds.txt +++ b/Documentation/networking/rds.txt | |||
@@ -62,11 +62,10 @@ Socket Interface | |||
62 | ================ | 62 | ================ |
63 | 63 | ||
64 | AF_RDS, PF_RDS, SOL_RDS | 64 | AF_RDS, PF_RDS, SOL_RDS |
65 | These constants haven't been assigned yet, because RDS isn't in | 65 | AF_RDS and PF_RDS are the domain type to be used with socket(2) |
66 | mainline yet. Currently, the kernel module assigns some constant | 66 | to create RDS sockets. SOL_RDS is the socket-level to be used |
67 | and publishes it to user space through two sysctl files | 67 | with setsockopt(2) and getsockopt(2) for RDS specific socket |
68 | /proc/sys/net/rds/pf_rds | 68 | options. |
69 | /proc/sys/net/rds/sol_rds | ||
70 | 69 | ||
71 | fd = socket(PF_RDS, SOCK_SEQPACKET, 0); | 70 | fd = socket(PF_RDS, SOCK_SEQPACKET, 0); |
72 | This creates a new, unbound RDS socket. | 71 | This creates a new, unbound RDS socket. |
diff --git a/Documentation/networking/s2io.txt b/Documentation/networking/s2io.txt index d2a9f43b5546..0362a42f7cf4 100644 --- a/Documentation/networking/s2io.txt +++ b/Documentation/networking/s2io.txt | |||
@@ -38,7 +38,7 @@ The corresponding adapter's LED will blink multiple times. | |||
38 | 38 | ||
39 | 3. Features supported: | 39 | 3. Features supported: |
40 | a. Jumbo frames. Xframe I/II supports MTU up to 9600 bytes, | 40 | a. Jumbo frames. Xframe I/II supports MTU up to 9600 bytes, |
41 | modifiable using ifconfig command. | 41 | modifiable using ip command. |
42 | 42 | ||
43 | b. Offloads. Supports checksum offload(TCP/UDP/IP) on transmit | 43 | b. Offloads. Supports checksum offload(TCP/UDP/IP) on transmit |
44 | and receive, TSO. | 44 | and receive, TSO. |
diff --git a/Documentation/networking/scaling.txt b/Documentation/networking/scaling.txt index 99ca40e8e810..cbfac0949635 100644 --- a/Documentation/networking/scaling.txt +++ b/Documentation/networking/scaling.txt | |||
@@ -421,6 +421,15 @@ best CPUs to share a given queue are probably those that share the cache | |||
421 | with the CPU that processes transmit completions for that queue | 421 | with the CPU that processes transmit completions for that queue |
422 | (transmit interrupts). | 422 | (transmit interrupts). |
423 | 423 | ||
424 | Per TX Queue rate limitation: | ||
425 | ============================= | ||
426 | |||
427 | These are rate-limitation mechanisms implemented by HW, where currently | ||
428 | a max-rate attribute is supported, by setting a Mbps value to | ||
429 | |||
430 | /sys/class/net/<dev>/queues/tx-<n>/tx_maxrate | ||
431 | |||
432 | A value of zero means disabled, and this is the default. | ||
424 | 433 | ||
425 | Further Information | 434 | Further Information |
426 | =================== | 435 | =================== |
diff --git a/Documentation/networking/vxge.txt b/Documentation/networking/vxge.txt index bb76c667a476..abfec245f97c 100644 --- a/Documentation/networking/vxge.txt +++ b/Documentation/networking/vxge.txt | |||
@@ -39,7 +39,7 @@ iii) PCI-SIG's I/O Virtualization | |||
39 | 39 | ||
40 | iv) Jumbo frames | 40 | iv) Jumbo frames |
41 | X3100 Series supports MTU up to 9600 bytes, modifiable using | 41 | X3100 Series supports MTU up to 9600 bytes, modifiable using |
42 | ifconfig command. | 42 | ip command. |
43 | 43 | ||
44 | v) Offloads supported: (Enabled by default) | 44 | v) Offloads supported: (Enabled by default) |
45 | Checksum offload (TCP/UDP/IP) on transmit and receive paths | 45 | Checksum offload (TCP/UDP/IP) on transmit and receive paths |
diff --git a/Documentation/pinctrl.txt b/Documentation/pinctrl.txt index b8f2147b96dd..a9b47163bb5d 100644 --- a/Documentation/pinctrl.txt +++ b/Documentation/pinctrl.txt | |||
@@ -72,7 +72,6 @@ static struct pinctrl_desc foo_desc = { | |||
72 | .name = "foo", | 72 | .name = "foo", |
73 | .pins = foo_pins, | 73 | .pins = foo_pins, |
74 | .npins = ARRAY_SIZE(foo_pins), | 74 | .npins = ARRAY_SIZE(foo_pins), |
75 | .maxpin = 63, | ||
76 | .owner = THIS_MODULE, | 75 | .owner = THIS_MODULE, |
77 | }; | 76 | }; |
78 | 77 | ||
@@ -164,8 +163,8 @@ static const char *foo_get_group_name(struct pinctrl_dev *pctldev, | |||
164 | } | 163 | } |
165 | 164 | ||
166 | static int foo_get_group_pins(struct pinctrl_dev *pctldev, unsigned selector, | 165 | static int foo_get_group_pins(struct pinctrl_dev *pctldev, unsigned selector, |
167 | unsigned ** const pins, | 166 | const unsigned **pins, |
168 | unsigned * const num_pins) | 167 | unsigned *num_pins) |
169 | { | 168 | { |
170 | *pins = (unsigned *) foo_groups[selector].pins; | 169 | *pins = (unsigned *) foo_groups[selector].pins; |
171 | *num_pins = foo_groups[selector].num_pins; | 170 | *num_pins = foo_groups[selector].num_pins; |
@@ -570,9 +569,8 @@ is possible to perform the requested mux setting, poke the hardware so that | |||
570 | this happens. | 569 | this happens. |
571 | 570 | ||
572 | Pinmux drivers are required to supply a few callback functions, some are | 571 | Pinmux drivers are required to supply a few callback functions, some are |
573 | optional. Usually the enable() and disable() functions are implemented, | 572 | optional. Usually the set_mux() function is implemented, writing values into |
574 | writing values into some certain registers to activate a certain mux setting | 573 | some certain registers to activate a certain mux setting for a certain pin. |
575 | for a certain pin. | ||
576 | 574 | ||
577 | A simple driver for the above example will work by setting bits 0, 1, 2, 3 or 4 | 575 | A simple driver for the above example will work by setting bits 0, 1, 2, 3 or 4 |
578 | into some register named MUX to select a certain function with a certain | 576 | into some register named MUX to select a certain function with a certain |
@@ -683,12 +681,12 @@ static const struct foo_pmx_func foo_functions[] = { | |||
683 | }, | 681 | }, |
684 | }; | 682 | }; |
685 | 683 | ||
686 | int foo_get_functions_count(struct pinctrl_dev *pctldev) | 684 | static int foo_get_functions_count(struct pinctrl_dev *pctldev) |
687 | { | 685 | { |
688 | return ARRAY_SIZE(foo_functions); | 686 | return ARRAY_SIZE(foo_functions); |
689 | } | 687 | } |
690 | 688 | ||
691 | const char *foo_get_fname(struct pinctrl_dev *pctldev, unsigned selector) | 689 | static const char *foo_get_fname(struct pinctrl_dev *pctldev, unsigned selector) |
692 | { | 690 | { |
693 | return foo_functions[selector].name; | 691 | return foo_functions[selector].name; |
694 | } | 692 | } |
@@ -702,7 +700,7 @@ static int foo_get_groups(struct pinctrl_dev *pctldev, unsigned selector, | |||
702 | return 0; | 700 | return 0; |
703 | } | 701 | } |
704 | 702 | ||
705 | int foo_set_mux(struct pinctrl_dev *pctldev, unsigned selector, | 703 | static int foo_set_mux(struct pinctrl_dev *pctldev, unsigned selector, |
706 | unsigned group) | 704 | unsigned group) |
707 | { | 705 | { |
708 | u8 regbit = (1 << selector + group); | 706 | u8 regbit = (1 << selector + group); |
@@ -711,7 +709,7 @@ int foo_set_mux(struct pinctrl_dev *pctldev, unsigned selector, | |||
711 | return 0; | 709 | return 0; |
712 | } | 710 | } |
713 | 711 | ||
714 | struct pinmux_ops foo_pmxops = { | 712 | static struct pinmux_ops foo_pmxops = { |
715 | .get_functions_count = foo_get_functions_count, | 713 | .get_functions_count = foo_get_functions_count, |
716 | .get_function_name = foo_get_fname, | 714 | .get_function_name = foo_get_fname, |
717 | .get_function_groups = foo_get_groups, | 715 | .get_function_groups = foo_get_groups, |
@@ -1266,7 +1264,7 @@ The semantics of the pinctrl APIs are: | |||
1266 | 1264 | ||
1267 | Usually the pin control core handled the get/put pair and call out to the | 1265 | Usually the pin control core handled the get/put pair and call out to the |
1268 | device drivers bookkeeping operations, like checking available functions and | 1266 | device drivers bookkeeping operations, like checking available functions and |
1269 | the associated pins, whereas the enable/disable pass on to the pin controller | 1267 | the associated pins, whereas select_state pass on to the pin controller |
1270 | driver which takes care of activating and/or deactivating the mux setting by | 1268 | driver which takes care of activating and/or deactivating the mux setting by |
1271 | quickly poking some registers. | 1269 | quickly poking some registers. |
1272 | 1270 | ||
@@ -1363,8 +1361,9 @@ function, but with different named in the mapping as described under | |||
1363 | "Advanced mapping" above. So that for an SPI device, we have two states named | 1361 | "Advanced mapping" above. So that for an SPI device, we have two states named |
1364 | "pos-A" and "pos-B". | 1362 | "pos-A" and "pos-B". |
1365 | 1363 | ||
1366 | This snippet first muxes the function in the pins defined by group A, enables | 1364 | This snippet first initializes a state object for both groups (in foo_probe()), |
1367 | it, disables and releases it, and muxes it in on the pins defined by group B: | 1365 | then muxes the function in the pins defined by group A, and finally muxes it in |
1366 | on the pins defined by group B: | ||
1368 | 1367 | ||
1369 | #include <linux/pinctrl/consumer.h> | 1368 | #include <linux/pinctrl/consumer.h> |
1370 | 1369 | ||
diff --git a/Documentation/power/basic-pm-debugging.txt b/Documentation/power/basic-pm-debugging.txt index edeecd447d23..b96098ccfe69 100644 --- a/Documentation/power/basic-pm-debugging.txt +++ b/Documentation/power/basic-pm-debugging.txt | |||
@@ -75,12 +75,14 @@ you should do the following: | |||
75 | # echo platform > /sys/power/disk | 75 | # echo platform > /sys/power/disk |
76 | # echo disk > /sys/power/state | 76 | # echo disk > /sys/power/state |
77 | 77 | ||
78 | Then, the kernel will try to freeze processes, suspend devices, wait 5 seconds, | 78 | Then, the kernel will try to freeze processes, suspend devices, wait a few |
79 | resume devices and thaw processes. If "platform" is written to | 79 | seconds (5 by default, but configurable by the suspend.pm_test_delay module |
80 | parameter), resume devices and thaw processes. If "platform" is written to | ||
80 | /sys/power/pm_test , then after suspending devices the kernel will additionally | 81 | /sys/power/pm_test , then after suspending devices the kernel will additionally |
81 | invoke the global control methods (eg. ACPI global control methods) used to | 82 | invoke the global control methods (eg. ACPI global control methods) used to |
82 | prepare the platform firmware for hibernation. Next, it will wait 5 seconds and | 83 | prepare the platform firmware for hibernation. Next, it will wait a |
83 | invoke the platform (eg. ACPI) global methods used to cancel hibernation etc. | 84 | configurable number of seconds and invoke the platform (eg. ACPI) global |
85 | methods used to cancel hibernation etc. | ||
84 | 86 | ||
85 | Writing "none" to /sys/power/pm_test causes the kernel to switch to the normal | 87 | Writing "none" to /sys/power/pm_test causes the kernel to switch to the normal |
86 | hibernation/suspend operations. Also, when open for reading, /sys/power/pm_test | 88 | hibernation/suspend operations. Also, when open for reading, /sys/power/pm_test |
diff --git a/Documentation/power/regulator/consumer.txt b/Documentation/power/regulator/consumer.txt index 8afb236ca765..e51564c1a140 100644 --- a/Documentation/power/regulator/consumer.txt +++ b/Documentation/power/regulator/consumer.txt | |||
@@ -137,7 +137,7 @@ Indirect operating mode control. | |||
137 | Consumer drivers can request a change in their supply regulator operating mode | 137 | Consumer drivers can request a change in their supply regulator operating mode |
138 | by calling :- | 138 | by calling :- |
139 | 139 | ||
140 | int regulator_set_optimum_mode(struct regulator *regulator, int load_uA); | 140 | int regulator_set_load(struct regulator *regulator, int load_uA); |
141 | 141 | ||
142 | This will cause the core to recalculate the total load on the regulator (based | 142 | This will cause the core to recalculate the total load on the regulator (based |
143 | on all its consumers) and change operating mode (if necessary and permitted) | 143 | on all its consumers) and change operating mode (if necessary and permitted) |
diff --git a/Documentation/power/suspend-and-interrupts.txt b/Documentation/power/suspend-and-interrupts.txt index 2f9c5a5fcb25..8afb29a8604a 100644 --- a/Documentation/power/suspend-and-interrupts.txt +++ b/Documentation/power/suspend-and-interrupts.txt | |||
@@ -40,8 +40,10 @@ but also to IPIs and to some other special-purpose interrupts. | |||
40 | 40 | ||
41 | The IRQF_NO_SUSPEND flag is used to indicate that to the IRQ subsystem when | 41 | The IRQF_NO_SUSPEND flag is used to indicate that to the IRQ subsystem when |
42 | requesting a special-purpose interrupt. It causes suspend_device_irqs() to | 42 | requesting a special-purpose interrupt. It causes suspend_device_irqs() to |
43 | leave the corresponding IRQ enabled so as to allow the interrupt to work all | 43 | leave the corresponding IRQ enabled so as to allow the interrupt to work as |
44 | the time as expected. | 44 | expected during the suspend-resume cycle, but does not guarantee that the |
45 | interrupt will wake the system from a suspended state -- for such cases it is | ||
46 | necessary to use enable_irq_wake(). | ||
45 | 47 | ||
46 | Note that the IRQF_NO_SUSPEND flag affects the entire IRQ and not just one | 48 | Note that the IRQF_NO_SUSPEND flag affects the entire IRQ and not just one |
47 | user of it. Thus, if the IRQ is shared, all of the interrupt handlers installed | 49 | user of it. Thus, if the IRQ is shared, all of the interrupt handlers installed |
@@ -110,8 +112,9 @@ any special interrupt handling logic for it to work. | |||
110 | IRQF_NO_SUSPEND and enable_irq_wake() | 112 | IRQF_NO_SUSPEND and enable_irq_wake() |
111 | ------------------------------------- | 113 | ------------------------------------- |
112 | 114 | ||
113 | There are no valid reasons to use both enable_irq_wake() and the IRQF_NO_SUSPEND | 115 | There are very few valid reasons to use both enable_irq_wake() and the |
114 | flag on the same IRQ. | 116 | IRQF_NO_SUSPEND flag on the same IRQ, and it is never valid to use both for the |
117 | same device. | ||
115 | 118 | ||
116 | First of all, if the IRQ is not shared, the rules for handling IRQF_NO_SUSPEND | 119 | First of all, if the IRQ is not shared, the rules for handling IRQF_NO_SUSPEND |
117 | interrupts (interrupt handlers are invoked after suspend_device_irqs()) are | 120 | interrupts (interrupt handlers are invoked after suspend_device_irqs()) are |
@@ -120,4 +123,13 @@ handlers are not invoked after suspend_device_irqs()). | |||
120 | 123 | ||
121 | Second, both enable_irq_wake() and IRQF_NO_SUSPEND apply to entire IRQs and not | 124 | Second, both enable_irq_wake() and IRQF_NO_SUSPEND apply to entire IRQs and not |
122 | to individual interrupt handlers, so sharing an IRQ between a system wakeup | 125 | to individual interrupt handlers, so sharing an IRQ between a system wakeup |
123 | interrupt source and an IRQF_NO_SUSPEND interrupt source does not make sense. | 126 | interrupt source and an IRQF_NO_SUSPEND interrupt source does not generally |
127 | make sense. | ||
128 | |||
129 | In rare cases an IRQ can be shared between a wakeup device driver and an | ||
130 | IRQF_NO_SUSPEND user. In order for this to be safe, the wakeup device driver | ||
131 | must be able to discern spurious IRQs from genuine wakeup events (signalling | ||
132 | the latter to the core with pm_system_wakeup()), must use enable_irq_wake() to | ||
133 | ensure that the IRQ will function as a wakeup source, and must request the IRQ | ||
134 | with IRQF_COND_SUSPEND to tell the core that it meets these requirements. If | ||
135 | these requirements are not met, it is not valid to use IRQF_COND_SUSPEND. | ||
diff --git a/Documentation/powerpc/pci_iov_resource_on_powernv.txt b/Documentation/powerpc/pci_iov_resource_on_powernv.txt new file mode 100644 index 000000000000..b55c5cd83f8d --- /dev/null +++ b/Documentation/powerpc/pci_iov_resource_on_powernv.txt | |||
@@ -0,0 +1,301 @@ | |||
1 | Wei Yang <weiyang@linux.vnet.ibm.com> | ||
2 | Benjamin Herrenschmidt <benh@au1.ibm.com> | ||
3 | Bjorn Helgaas <bhelgaas@google.com> | ||
4 | 26 Aug 2014 | ||
5 | |||
6 | This document describes the requirement from hardware for PCI MMIO resource | ||
7 | sizing and assignment on PowerKVM and how generic PCI code handles this | ||
8 | requirement. The first two sections describe the concepts of Partitionable | ||
9 | Endpoints and the implementation on P8 (IODA2). The next two sections talks | ||
10 | about considerations on enabling SRIOV on IODA2. | ||
11 | |||
12 | 1. Introduction to Partitionable Endpoints | ||
13 | |||
14 | A Partitionable Endpoint (PE) is a way to group the various resources | ||
15 | associated with a device or a set of devices to provide isolation between | ||
16 | partitions (i.e., filtering of DMA, MSIs etc.) and to provide a mechanism | ||
17 | to freeze a device that is causing errors in order to limit the possibility | ||
18 | of propagation of bad data. | ||
19 | |||
20 | There is thus, in HW, a table of PE states that contains a pair of "frozen" | ||
21 | state bits (one for MMIO and one for DMA, they get set together but can be | ||
22 | cleared independently) for each PE. | ||
23 | |||
24 | When a PE is frozen, all stores in any direction are dropped and all loads | ||
25 | return all 1's value. MSIs are also blocked. There's a bit more state that | ||
26 | captures things like the details of the error that caused the freeze etc., but | ||
27 | that's not critical. | ||
28 | |||
29 | The interesting part is how the various PCIe transactions (MMIO, DMA, ...) | ||
30 | are matched to their corresponding PEs. | ||
31 | |||
32 | The following section provides a rough description of what we have on P8 | ||
33 | (IODA2). Keep in mind that this is all per PHB (PCI host bridge). Each PHB | ||
34 | is a completely separate HW entity that replicates the entire logic, so has | ||
35 | its own set of PEs, etc. | ||
36 | |||
37 | 2. Implementation of Partitionable Endpoints on P8 (IODA2) | ||
38 | |||
39 | P8 supports up to 256 Partitionable Endpoints per PHB. | ||
40 | |||
41 | * Inbound | ||
42 | |||
43 | For DMA, MSIs and inbound PCIe error messages, we have a table (in | ||
44 | memory but accessed in HW by the chip) that provides a direct | ||
45 | correspondence between a PCIe RID (bus/dev/fn) with a PE number. | ||
46 | We call this the RTT. | ||
47 | |||
48 | - For DMA we then provide an entire address space for each PE that can | ||
49 | contain two "windows", depending on the value of PCI address bit 59. | ||
50 | Each window can be configured to be remapped via a "TCE table" (IOMMU | ||
51 | translation table), which has various configurable characteristics | ||
52 | not described here. | ||
53 | |||
54 | - For MSIs, we have two windows in the address space (one at the top of | ||
55 | the 32-bit space and one much higher) which, via a combination of the | ||
56 | address and MSI value, will result in one of the 2048 interrupts per | ||
57 | bridge being triggered. There's a PE# in the interrupt controller | ||
58 | descriptor table as well which is compared with the PE# obtained from | ||
59 | the RTT to "authorize" the device to emit that specific interrupt. | ||
60 | |||
61 | - Error messages just use the RTT. | ||
62 | |||
63 | * Outbound. That's where the tricky part is. | ||
64 | |||
65 | Like other PCI host bridges, the Power8 IODA2 PHB supports "windows" | ||
66 | from the CPU address space to the PCI address space. There is one M32 | ||
67 | window and sixteen M64 windows. They have different characteristics. | ||
68 | First what they have in common: they forward a configurable portion of | ||
69 | the CPU address space to the PCIe bus and must be naturally aligned | ||
70 | power of two in size. The rest is different: | ||
71 | |||
72 | - The M32 window: | ||
73 | |||
74 | * Is limited to 4GB in size. | ||
75 | |||
76 | * Drops the top bits of the address (above the size) and replaces | ||
77 | them with a configurable value. This is typically used to generate | ||
78 | 32-bit PCIe accesses. We configure that window at boot from FW and | ||
79 | don't touch it from Linux; it's usually set to forward a 2GB | ||
80 | portion of address space from the CPU to PCIe | ||
81 | 0x8000_0000..0xffff_ffff. (Note: The top 64KB are actually | ||
82 | reserved for MSIs but this is not a problem at this point; we just | ||
83 | need to ensure Linux doesn't assign anything there, the M32 logic | ||
84 | ignores that however and will forward in that space if we try). | ||
85 | |||
86 | * It is divided into 256 segments of equal size. A table in the chip | ||
87 | maps each segment to a PE#. That allows portions of the MMIO space | ||
88 | to be assigned to PEs on a segment granularity. For a 2GB window, | ||
89 | the segment granularity is 2GB/256 = 8MB. | ||
90 | |||
91 | Now, this is the "main" window we use in Linux today (excluding | ||
92 | SR-IOV). We basically use the trick of forcing the bridge MMIO windows | ||
93 | onto a segment alignment/granularity so that the space behind a bridge | ||
94 | can be assigned to a PE. | ||
95 | |||
96 | Ideally we would like to be able to have individual functions in PEs | ||
97 | but that would mean using a completely different address allocation | ||
98 | scheme where individual function BARs can be "grouped" to fit in one or | ||
99 | more segments. | ||
100 | |||
101 | - The M64 windows: | ||
102 | |||
103 | * Must be at least 256MB in size. | ||
104 | |||
105 | * Do not translate addresses (the address on PCIe is the same as the | ||
106 | address on the PowerBus). There is a way to also set the top 14 | ||
107 | bits which are not conveyed by PowerBus but we don't use this. | ||
108 | |||
109 | * Can be configured to be segmented. When not segmented, we can | ||
110 | specify the PE# for the entire window. When segmented, a window | ||
111 | has 256 segments; however, there is no table for mapping a segment | ||
112 | to a PE#. The segment number *is* the PE#. | ||
113 | |||
114 | * Support overlaps. If an address is covered by multiple windows, | ||
115 | there's a defined ordering for which window applies. | ||
116 | |||
117 | We have code (fairly new compared to the M32 stuff) that exploits that | ||
118 | for large BARs in 64-bit space: | ||
119 | |||
120 | We configure an M64 window to cover the entire region of address space | ||
121 | that has been assigned by FW for the PHB (about 64GB, ignore the space | ||
122 | for the M32, it comes out of a different "reserve"). We configure it | ||
123 | as segmented. | ||
124 | |||
125 | Then we do the same thing as with M32, using the bridge alignment | ||
126 | trick, to match to those giant segments. | ||
127 | |||
128 | Since we cannot remap, we have two additional constraints: | ||
129 | |||
130 | - We do the PE# allocation *after* the 64-bit space has been assigned | ||
131 | because the addresses we use directly determine the PE#. We then | ||
132 | update the M32 PE# for the devices that use both 32-bit and 64-bit | ||
133 | spaces or assign the remaining PE# to 32-bit only devices. | ||
134 | |||
135 | - We cannot "group" segments in HW, so if a device ends up using more | ||
136 | than one segment, we end up with more than one PE#. There is a HW | ||
137 | mechanism to make the freeze state cascade to "companion" PEs but | ||
138 | that only works for PCIe error messages (typically used so that if | ||
139 | you freeze a switch, it freezes all its children). So we do it in | ||
140 | SW. We lose a bit of effectiveness of EEH in that case, but that's | ||
141 | the best we found. So when any of the PEs freezes, we freeze the | ||
142 | other ones for that "domain". We thus introduce the concept of | ||
143 | "master PE" which is the one used for DMA, MSIs, etc., and "secondary | ||
144 | PEs" that are used for the remaining M64 segments. | ||
145 | |||
146 | We would like to investigate using additional M64 windows in "single | ||
147 | PE" mode to overlay over specific BARs to work around some of that, for | ||
148 | example for devices with very large BARs, e.g., GPUs. It would make | ||
149 | sense, but we haven't done it yet. | ||
150 | |||
151 | 3. Considerations for SR-IOV on PowerKVM | ||
152 | |||
153 | * SR-IOV Background | ||
154 | |||
155 | The PCIe SR-IOV feature allows a single Physical Function (PF) to | ||
156 | support several Virtual Functions (VFs). Registers in the PF's SR-IOV | ||
157 | Capability control the number of VFs and whether they are enabled. | ||
158 | |||
159 | When VFs are enabled, they appear in Configuration Space like normal | ||
160 | PCI devices, but the BARs in VF config space headers are unusual. For | ||
161 | a non-VF device, software uses BARs in the config space header to | ||
162 | discover the BAR sizes and assign addresses for them. For VF devices, | ||
163 | software uses VF BAR registers in the *PF* SR-IOV Capability to | ||
164 | discover sizes and assign addresses. The BARs in the VF's config space | ||
165 | header are read-only zeros. | ||
166 | |||
167 | When a VF BAR in the PF SR-IOV Capability is programmed, it sets the | ||
168 | base address for all the corresponding VF(n) BARs. For example, if the | ||
169 | PF SR-IOV Capability is programmed to enable eight VFs, and it has a | ||
170 | 1MB VF BAR0, the address in that VF BAR sets the base of an 8MB region. | ||
171 | This region is divided into eight contiguous 1MB regions, each of which | ||
172 | is a BAR0 for one of the VFs. Note that even though the VF BAR | ||
173 | describes an 8MB region, the alignment requirement is for a single VF, | ||
174 | i.e., 1MB in this example. | ||
175 | |||
176 | There are several strategies for isolating VFs in PEs: | ||
177 | |||
178 | - M32 window: There's one M32 window, and it is split into 256 | ||
179 | equally-sized segments. The finest granularity possible is a 256MB | ||
180 | window with 1MB segments. VF BARs that are 1MB or larger could be | ||
181 | mapped to separate PEs in this window. Each segment can be | ||
182 | individually mapped to a PE via the lookup table, so this is quite | ||
183 | flexible, but it works best when all the VF BARs are the same size. If | ||
184 | they are different sizes, the entire window has to be small enough that | ||
185 | the segment size matches the smallest VF BAR, which means larger VF | ||
186 | BARs span several segments. | ||
187 | |||
188 | - Non-segmented M64 window: A non-segmented M64 window is mapped entirely | ||
189 | to a single PE, so it could only isolate one VF. | ||
190 | |||
191 | - Single segmented M64 windows: A segmented M64 window could be used just | ||
192 | like the M32 window, but the segments can't be individually mapped to | ||
193 | PEs (the segment number is the PE#), so there isn't as much | ||
194 | flexibility. A VF with multiple BARs would have to be in a "domain" of | ||
195 | multiple PEs, which is not as well isolated as a single PE. | ||
196 | |||
197 | - Multiple segmented M64 windows: As usual, each window is split into 256 | ||
198 | equally-sized segments, and the segment number is the PE#. But if we | ||
199 | use several M64 windows, they can be set to different base addresses | ||
200 | and different segment sizes. If we have VFs that each have a 1MB BAR | ||
201 | and a 32MB BAR, we could use one M64 window to assign 1MB segments and | ||
202 | another M64 window to assign 32MB segments. | ||
203 | |||
204 | Finally, the plan to use M64 windows for SR-IOV, which will be described | ||
205 | more in the next two sections. For a given VF BAR, we need to | ||
206 | effectively reserve the entire 256 segments (256 * VF BAR size) and | ||
207 | position the VF BAR to start at the beginning of a free range of | ||
208 | segments/PEs inside that M64 window. | ||
209 | |||
210 | The goal is of course to be able to give a separate PE for each VF. | ||
211 | |||
212 | The IODA2 platform has 16 M64 windows, which are used to map MMIO | ||
213 | range to PE#. Each M64 window defines one MMIO range and this range is | ||
214 | divided into 256 segments, with each segment corresponding to one PE. | ||
215 | |||
216 | We decide to leverage this M64 window to map VFs to individual PEs, since | ||
217 | SR-IOV VF BARs are all the same size. | ||
218 | |||
219 | But doing so introduces another problem: total_VFs is usually smaller | ||
220 | than the number of M64 window segments, so if we map one VF BAR directly | ||
221 | to one M64 window, some part of the M64 window will map to another | ||
222 | device's MMIO range. | ||
223 | |||
224 | IODA supports 256 PEs, so segmented windows contain 256 segments, so if | ||
225 | total_VFs is less than 256, we have the situation in Figure 1.0, where | ||
226 | segments [total_VFs, 255] of the M64 window may map to some MMIO range on | ||
227 | other devices: | ||
228 | |||
229 | 0 1 total_VFs - 1 | ||
230 | +------+------+- -+------+------+ | ||
231 | | | | ... | | | | ||
232 | +------+------+- -+------+------+ | ||
233 | |||
234 | VF(n) BAR space | ||
235 | |||
236 | 0 1 total_VFs - 1 255 | ||
237 | +------+------+- -+------+------+- -+------+------+ | ||
238 | | | | ... | | | ... | | | | ||
239 | +------+------+- -+------+------+- -+------+------+ | ||
240 | |||
241 | M64 window | ||
242 | |||
243 | Figure 1.0 Direct map VF(n) BAR space | ||
244 | |||
245 | Our current solution is to allocate 256 segments even if the VF(n) BAR | ||
246 | space doesn't need that much, as shown in Figure 1.1: | ||
247 | |||
248 | 0 1 total_VFs - 1 255 | ||
249 | +------+------+- -+------+------+- -+------+------+ | ||
250 | | | | ... | | | ... | | | | ||
251 | +------+------+- -+------+------+- -+------+------+ | ||
252 | |||
253 | VF(n) BAR space + extra | ||
254 | |||
255 | 0 1 total_VFs - 1 255 | ||
256 | +------+------+- -+------+------+- -+------+------+ | ||
257 | | | | ... | | | ... | | | | ||
258 | +------+------+- -+------+------+- -+------+------+ | ||
259 | |||
260 | M64 window | ||
261 | |||
262 | Figure 1.1 Map VF(n) BAR space + extra | ||
263 | |||
264 | Allocating the extra space ensures that the entire M64 window will be | ||
265 | assigned to this one SR-IOV device and none of the space will be | ||
266 | available for other devices. Note that this only expands the space | ||
267 | reserved in software; there are still only total_VFs VFs, and they only | ||
268 | respond to segments [0, total_VFs - 1]. There's nothing in hardware that | ||
269 | responds to segments [total_VFs, 255]. | ||
270 | |||
271 | 4. Implications for the Generic PCI Code | ||
272 | |||
273 | The PCIe SR-IOV spec requires that the base of the VF(n) BAR space be | ||
274 | aligned to the size of an individual VF BAR. | ||
275 | |||
276 | In IODA2, the MMIO address determines the PE#. If the address is in an M32 | ||
277 | window, we can set the PE# by updating the table that translates segments | ||
278 | to PE#s. Similarly, if the address is in an unsegmented M64 window, we can | ||
279 | set the PE# for the window. But if it's in a segmented M64 window, the | ||
280 | segment number is the PE#. | ||
281 | |||
282 | Therefore, the only way to control the PE# for a VF is to change the base | ||
283 | of the VF(n) BAR space in the VF BAR. If the PCI core allocates the exact | ||
284 | amount of space required for the VF(n) BAR space, the VF BAR value is fixed | ||
285 | and cannot be changed. | ||
286 | |||
287 | On the other hand, if the PCI core allocates additional space, the VF BAR | ||
288 | value can be changed as long as the entire VF(n) BAR space remains inside | ||
289 | the space allocated by the core. | ||
290 | |||
291 | Ideally the segment size will be the same as an individual VF BAR size. | ||
292 | Then each VF will be in its own PE. The VF BARs (and therefore the PE#s) | ||
293 | are contiguous. If VF0 is in PE(x), then VF(n) is in PE(x+n). If we | ||
294 | allocate 256 segments, there are (256 - numVFs) choices for the PE# of VF0. | ||
295 | |||
296 | If the segment size is smaller than the VF BAR size, it will take several | ||
297 | segments to cover a VF BAR, and a VF will be in several PEs. This is | ||
298 | possible, but the isolation isn't as good, and it reduces the number of PE# | ||
299 | choices because instead of consuming only numVFs segments, the VF(n) BAR | ||
300 | space will consume (numVFs * n) segments. That means there aren't as many | ||
301 | available segments for adjusting base of the VF(n) BAR space. | ||
diff --git a/Documentation/powerpc/transactional_memory.txt b/Documentation/powerpc/transactional_memory.txt index 9791e98ab49c..ba0a2a4a54ba 100644 --- a/Documentation/powerpc/transactional_memory.txt +++ b/Documentation/powerpc/transactional_memory.txt | |||
@@ -74,22 +74,23 @@ Causes of transaction aborts | |||
74 | Syscalls | 74 | Syscalls |
75 | ======== | 75 | ======== |
76 | 76 | ||
77 | Performing syscalls from within transaction is not recommended, and can lead | 77 | Syscalls made from within an active transaction will not be performed and the |
78 | to unpredictable results. | 78 | transaction will be doomed by the kernel with the failure code TM_CAUSE_SYSCALL |
79 | | TM_CAUSE_PERSISTENT. | ||
79 | 80 | ||
80 | Syscalls do not by design abort transactions, but beware: The kernel code will | 81 | Syscalls made from within a suspended transaction are performed as normal and |
81 | not be running in transactional state. The effect of syscalls will always | 82 | the transaction is not explicitly doomed by the kernel. However, what the |
82 | remain visible, but depending on the call they may abort your transaction as a | 83 | kernel does to perform the syscall may result in the transaction being doomed |
83 | side-effect, read soon-to-be-aborted transactional data that should not remain | 84 | by the hardware. The syscall is performed in suspended mode so any side |
84 | invisible, etc. If you constantly retry a transaction that constantly aborts | 85 | effects will be persistent, independent of transaction success or failure. No |
85 | itself by calling a syscall, you'll have a livelock & make no progress. | 86 | guarantees are provided by the kernel about which syscalls will affect |
87 | transaction success. | ||
86 | 88 | ||
87 | Simple syscalls (e.g. sigprocmask()) "could" be OK. Even things like write() | 89 | Care must be taken when relying on syscalls to abort during active transactions |
88 | from, say, printf() should be OK as long as the kernel does not access any | 90 | if the calls are made via a library. Libraries may cache values (which may |
89 | memory that was accessed transactionally. | 91 | give the appearance of success) or perform operations that cause transaction |
90 | 92 | failure before entering the kernel (which may produce different failure codes). | |
91 | Consider any syscalls that happen to work as debug-only -- not recommended for | 93 | Examples are glibc's getpid() and lazy symbol resolution. |
92 | production use. Best to queue them up till after the transaction is over. | ||
93 | 94 | ||
94 | 95 | ||
95 | Signals | 96 | Signals |
@@ -174,10 +175,9 @@ These are defined in <asm/reg.h>, and distinguish different reasons why the | |||
174 | kernel aborted a transaction: | 175 | kernel aborted a transaction: |
175 | 176 | ||
176 | TM_CAUSE_RESCHED Thread was rescheduled. | 177 | TM_CAUSE_RESCHED Thread was rescheduled. |
177 | TM_CAUSE_TLBI Software TLB invalide. | 178 | TM_CAUSE_TLBI Software TLB invalid. |
178 | TM_CAUSE_FAC_UNAV FP/VEC/VSX unavailable trap. | 179 | TM_CAUSE_FAC_UNAV FP/VEC/VSX unavailable trap. |
179 | TM_CAUSE_SYSCALL Currently unused; future syscalls that must abort | 180 | TM_CAUSE_SYSCALL Syscall from active transaction. |
180 | transactions for consistency will use this. | ||
181 | TM_CAUSE_SIGNAL Signal delivered. | 181 | TM_CAUSE_SIGNAL Signal delivered. |
182 | TM_CAUSE_MISC Currently unused. | 182 | TM_CAUSE_MISC Currently unused. |
183 | TM_CAUSE_ALIGNMENT Alignment fault. | 183 | TM_CAUSE_ALIGNMENT Alignment fault. |
@@ -185,7 +185,7 @@ kernel aborted a transaction: | |||
185 | 185 | ||
186 | These can be checked by the user program's abort handler as TEXASR[0:7]. If | 186 | These can be checked by the user program's abort handler as TEXASR[0:7]. If |
187 | bit 7 is set, it indicates that the error is consider persistent. For example | 187 | bit 7 is set, it indicates that the error is consider persistent. For example |
188 | a TM_CAUSE_ALIGNMENT will be persistent while a TM_CAUSE_RESCHED will not.q | 188 | a TM_CAUSE_ALIGNMENT will be persistent while a TM_CAUSE_RESCHED will not. |
189 | 189 | ||
190 | GDB | 190 | GDB |
191 | === | 191 | === |
diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt index 5a615c14f75d..2216eb187c21 100644 --- a/Documentation/printk-formats.txt +++ b/Documentation/printk-formats.txt | |||
@@ -8,6 +8,21 @@ If variable is of Type, use printk format specifier: | |||
8 | unsigned long long %llu or %llx | 8 | unsigned long long %llu or %llx |
9 | size_t %zu or %zx | 9 | size_t %zu or %zx |
10 | ssize_t %zd or %zx | 10 | ssize_t %zd or %zx |
11 | s32 %d or %x | ||
12 | u32 %u or %x | ||
13 | s64 %lld or %llx | ||
14 | u64 %llu or %llx | ||
15 | |||
16 | If <type> is dependent on a config option for its size (e.g., sector_t, | ||
17 | blkcnt_t) or is architecture-dependent for its size (e.g., tcflag_t), use a | ||
18 | format specifier of its largest possible type and explicitly cast to it. | ||
19 | Example: | ||
20 | |||
21 | printk("test: sector number/total blocks: %llu/%llu\n", | ||
22 | (unsigned long long)sector, (unsigned long long)blockcount); | ||
23 | |||
24 | Reminder: sizeof() result is of type size_t. | ||
25 | |||
11 | 26 | ||
12 | Raw pointer value SHOULD be printed with %p. The kernel supports | 27 | Raw pointer value SHOULD be printed with %p. The kernel supports |
13 | the following extended format specifiers for pointer types: | 28 | the following extended format specifiers for pointer types: |
@@ -54,6 +69,7 @@ Struct Resources: | |||
54 | 69 | ||
55 | For printing struct resources. The 'R' and 'r' specifiers result in a | 70 | For printing struct resources. The 'R' and 'r' specifiers result in a |
56 | printed resource with ('R') or without ('r') a decoded flags member. | 71 | printed resource with ('R') or without ('r') a decoded flags member. |
72 | Passed by reference. | ||
57 | 73 | ||
58 | Physical addresses types phys_addr_t: | 74 | Physical addresses types phys_addr_t: |
59 | 75 | ||
@@ -132,6 +148,8 @@ MAC/FDDI addresses: | |||
132 | specifier to use reversed byte order suitable for visual interpretation | 148 | specifier to use reversed byte order suitable for visual interpretation |
133 | of Bluetooth addresses which are in the little endian order. | 149 | of Bluetooth addresses which are in the little endian order. |
134 | 150 | ||
151 | Passed by reference. | ||
152 | |||
135 | IPv4 addresses: | 153 | IPv4 addresses: |
136 | 154 | ||
137 | %pI4 1.2.3.4 | 155 | %pI4 1.2.3.4 |
@@ -146,6 +164,8 @@ IPv4 addresses: | |||
146 | host, network, big or little endian order addresses respectively. Where | 164 | host, network, big or little endian order addresses respectively. Where |
147 | no specifier is provided the default network/big endian order is used. | 165 | no specifier is provided the default network/big endian order is used. |
148 | 166 | ||
167 | Passed by reference. | ||
168 | |||
149 | IPv6 addresses: | 169 | IPv6 addresses: |
150 | 170 | ||
151 | %pI6 0001:0002:0003:0004:0005:0006:0007:0008 | 171 | %pI6 0001:0002:0003:0004:0005:0006:0007:0008 |
@@ -160,6 +180,8 @@ IPv6 addresses: | |||
160 | print a compressed IPv6 address as described by | 180 | print a compressed IPv6 address as described by |
161 | http://tools.ietf.org/html/rfc5952 | 181 | http://tools.ietf.org/html/rfc5952 |
162 | 182 | ||
183 | Passed by reference. | ||
184 | |||
163 | IPv4/IPv6 addresses (generic, with port, flowinfo, scope): | 185 | IPv4/IPv6 addresses (generic, with port, flowinfo, scope): |
164 | 186 | ||
165 | %pIS 1.2.3.4 or 0001:0002:0003:0004:0005:0006:0007:0008 | 187 | %pIS 1.2.3.4 or 0001:0002:0003:0004:0005:0006:0007:0008 |
@@ -186,6 +208,8 @@ IPv4/IPv6 addresses (generic, with port, flowinfo, scope): | |||
186 | specifiers can be used as well and are ignored in case of an IPv6 | 208 | specifiers can be used as well and are ignored in case of an IPv6 |
187 | address. | 209 | address. |
188 | 210 | ||
211 | Passed by reference. | ||
212 | |||
189 | Further examples: | 213 | Further examples: |
190 | 214 | ||
191 | %pISfc 1.2.3.4 or [1:2:3:4:5:6:7:8]/123456789 | 215 | %pISfc 1.2.3.4 or [1:2:3:4:5:6:7:8]/123456789 |
@@ -204,9 +228,11 @@ UUID/GUID addresses: | |||
204 | lower ('l') or upper case ('L') hex characters - and big endian order | 228 | lower ('l') or upper case ('L') hex characters - and big endian order |
205 | in lower ('b') or upper case ('B') hex characters. | 229 | in lower ('b') or upper case ('B') hex characters. |
206 | 230 | ||
207 | Where no additional specifiers are used the default little endian | 231 | Where no additional specifiers are used the default big endian |
208 | order with lower case hex characters will be printed. | 232 | order with lower case hex characters will be printed. |
209 | 233 | ||
234 | Passed by reference. | ||
235 | |||
210 | dentry names: | 236 | dentry names: |
211 | %pd{,2,3,4} | 237 | %pd{,2,3,4} |
212 | %pD{,2,3,4} | 238 | %pD{,2,3,4} |
@@ -216,6 +242,8 @@ dentry names: | |||
216 | equivalent of %s dentry->d_name.name we used to use, %pd<n> prints | 242 | equivalent of %s dentry->d_name.name we used to use, %pd<n> prints |
217 | n last components. %pD does the same thing for struct file. | 243 | n last components. %pD does the same thing for struct file. |
218 | 244 | ||
245 | Passed by reference. | ||
246 | |||
219 | struct va_format: | 247 | struct va_format: |
220 | 248 | ||
221 | %pV | 249 | %pV |
@@ -231,23 +259,30 @@ struct va_format: | |||
231 | Do not use this feature without some mechanism to verify the | 259 | Do not use this feature without some mechanism to verify the |
232 | correctness of the format string and va_list arguments. | 260 | correctness of the format string and va_list arguments. |
233 | 261 | ||
234 | u64 SHOULD be printed with %llu/%llx: | 262 | Passed by reference. |
235 | 263 | ||
236 | printk("%llu", u64_var); | 264 | struct clk: |
237 | 265 | ||
238 | s64 SHOULD be printed with %lld/%llx: | 266 | %pC pll1 |
267 | %pCn pll1 | ||
268 | %pCr 1560000000 | ||
239 | 269 | ||
240 | printk("%lld", s64_var); | 270 | For printing struct clk structures. '%pC' and '%pCn' print the name |
271 | (Common Clock Framework) or address (legacy clock framework) of the | ||
272 | structure; '%pCr' prints the current clock rate. | ||
241 | 273 | ||
242 | If <type> is dependent on a config option for its size (e.g., sector_t, | 274 | Passed by reference. |
243 | blkcnt_t) or is architecture-dependent for its size (e.g., tcflag_t), use a | ||
244 | format specifier of its largest possible type and explicitly cast to it. | ||
245 | Example: | ||
246 | 275 | ||
247 | printk("test: sector number/total blocks: %llu/%llu\n", | 276 | bitmap and its derivatives such as cpumask and nodemask: |
248 | (unsigned long long)sector, (unsigned long long)blockcount); | ||
249 | 277 | ||
250 | Reminder: sizeof() result is of type size_t. | 278 | %*pb 0779 |
279 | %*pbl 0,3-6,8-10 | ||
280 | |||
281 | For printing bitmap and its derivatives such as cpumask and nodemask, | ||
282 | %*pb output the bitmap with field width as the number of bits and %*pbl | ||
283 | output the bitmap as range list with field width as the number of bits. | ||
284 | |||
285 | Passed by reference. | ||
251 | 286 | ||
252 | Thank you for your cooperation and attention. | 287 | Thank you for your cooperation and attention. |
253 | 288 | ||
diff --git a/Documentation/rtc.txt b/Documentation/rtc.txt index 596b60c08b74..8446f1ea1410 100644 --- a/Documentation/rtc.txt +++ b/Documentation/rtc.txt | |||
@@ -204,266 +204,4 @@ Some common examples: | |||
204 | 204 | ||
205 | * RTC_PIE_ON, RTC_PIE_OFF: These are also emulated by the generic code. | 205 | * RTC_PIE_ON, RTC_PIE_OFF: These are also emulated by the generic code. |
206 | 206 | ||
207 | If all else fails, check out the rtc-test.c driver! | 207 | If all else fails, check out the tools/testing/selftests/timers/rtctest.c test! |
208 | |||
209 | |||
210 | -------------------- 8< ---------------- 8< ----------------------------- | ||
211 | |||
212 | /* | ||
213 | * Real Time Clock Driver Test/Example Program | ||
214 | * | ||
215 | * Compile with: | ||
216 | * gcc -s -Wall -Wstrict-prototypes rtctest.c -o rtctest | ||
217 | * | ||
218 | * Copyright (C) 1996, Paul Gortmaker. | ||
219 | * | ||
220 | * Released under the GNU General Public License, version 2, | ||
221 | * included herein by reference. | ||
222 | * | ||
223 | */ | ||
224 | |||
225 | #include <stdio.h> | ||
226 | #include <linux/rtc.h> | ||
227 | #include <sys/ioctl.h> | ||
228 | #include <sys/time.h> | ||
229 | #include <sys/types.h> | ||
230 | #include <fcntl.h> | ||
231 | #include <unistd.h> | ||
232 | #include <stdlib.h> | ||
233 | #include <errno.h> | ||
234 | |||
235 | |||
236 | /* | ||
237 | * This expects the new RTC class driver framework, working with | ||
238 | * clocks that will often not be clones of what the PC-AT had. | ||
239 | * Use the command line to specify another RTC if you need one. | ||
240 | */ | ||
241 | static const char default_rtc[] = "/dev/rtc0"; | ||
242 | |||
243 | |||
244 | int main(int argc, char **argv) | ||
245 | { | ||
246 | int i, fd, retval, irqcount = 0; | ||
247 | unsigned long tmp, data; | ||
248 | struct rtc_time rtc_tm; | ||
249 | const char *rtc = default_rtc; | ||
250 | |||
251 | switch (argc) { | ||
252 | case 2: | ||
253 | rtc = argv[1]; | ||
254 | /* FALLTHROUGH */ | ||
255 | case 1: | ||
256 | break; | ||
257 | default: | ||
258 | fprintf(stderr, "usage: rtctest [rtcdev]\n"); | ||
259 | return 1; | ||
260 | } | ||
261 | |||
262 | fd = open(rtc, O_RDONLY); | ||
263 | |||
264 | if (fd == -1) { | ||
265 | perror(rtc); | ||
266 | exit(errno); | ||
267 | } | ||
268 | |||
269 | fprintf(stderr, "\n\t\t\tRTC Driver Test Example.\n\n"); | ||
270 | |||
271 | /* Turn on update interrupts (one per second) */ | ||
272 | retval = ioctl(fd, RTC_UIE_ON, 0); | ||
273 | if (retval == -1) { | ||
274 | if (errno == ENOTTY) { | ||
275 | fprintf(stderr, | ||
276 | "\n...Update IRQs not supported.\n"); | ||
277 | goto test_READ; | ||
278 | } | ||
279 | perror("RTC_UIE_ON ioctl"); | ||
280 | exit(errno); | ||
281 | } | ||
282 | |||
283 | fprintf(stderr, "Counting 5 update (1/sec) interrupts from reading %s:", | ||
284 | rtc); | ||
285 | fflush(stderr); | ||
286 | for (i=1; i<6; i++) { | ||
287 | /* This read will block */ | ||
288 | retval = read(fd, &data, sizeof(unsigned long)); | ||
289 | if (retval == -1) { | ||
290 | perror("read"); | ||
291 | exit(errno); | ||
292 | } | ||
293 | fprintf(stderr, " %d",i); | ||
294 | fflush(stderr); | ||
295 | irqcount++; | ||
296 | } | ||
297 | |||
298 | fprintf(stderr, "\nAgain, from using select(2) on /dev/rtc:"); | ||
299 | fflush(stderr); | ||
300 | for (i=1; i<6; i++) { | ||
301 | struct timeval tv = {5, 0}; /* 5 second timeout on select */ | ||
302 | fd_set readfds; | ||
303 | |||
304 | FD_ZERO(&readfds); | ||
305 | FD_SET(fd, &readfds); | ||
306 | /* The select will wait until an RTC interrupt happens. */ | ||
307 | retval = select(fd+1, &readfds, NULL, NULL, &tv); | ||
308 | if (retval == -1) { | ||
309 | perror("select"); | ||
310 | exit(errno); | ||
311 | } | ||
312 | /* This read won't block unlike the select-less case above. */ | ||
313 | retval = read(fd, &data, sizeof(unsigned long)); | ||
314 | if (retval == -1) { | ||
315 | perror("read"); | ||
316 | exit(errno); | ||
317 | } | ||
318 | fprintf(stderr, " %d",i); | ||
319 | fflush(stderr); | ||
320 | irqcount++; | ||
321 | } | ||
322 | |||
323 | /* Turn off update interrupts */ | ||
324 | retval = ioctl(fd, RTC_UIE_OFF, 0); | ||
325 | if (retval == -1) { | ||
326 | perror("RTC_UIE_OFF ioctl"); | ||
327 | exit(errno); | ||
328 | } | ||
329 | |||
330 | test_READ: | ||
331 | /* Read the RTC time/date */ | ||
332 | retval = ioctl(fd, RTC_RD_TIME, &rtc_tm); | ||
333 | if (retval == -1) { | ||
334 | perror("RTC_RD_TIME ioctl"); | ||
335 | exit(errno); | ||
336 | } | ||
337 | |||
338 | fprintf(stderr, "\n\nCurrent RTC date/time is %d-%d-%d, %02d:%02d:%02d.\n", | ||
339 | rtc_tm.tm_mday, rtc_tm.tm_mon + 1, rtc_tm.tm_year + 1900, | ||
340 | rtc_tm.tm_hour, rtc_tm.tm_min, rtc_tm.tm_sec); | ||
341 | |||
342 | /* Set the alarm to 5 sec in the future, and check for rollover */ | ||
343 | rtc_tm.tm_sec += 5; | ||
344 | if (rtc_tm.tm_sec >= 60) { | ||
345 | rtc_tm.tm_sec %= 60; | ||
346 | rtc_tm.tm_min++; | ||
347 | } | ||
348 | if (rtc_tm.tm_min == 60) { | ||
349 | rtc_tm.tm_min = 0; | ||
350 | rtc_tm.tm_hour++; | ||
351 | } | ||
352 | if (rtc_tm.tm_hour == 24) | ||
353 | rtc_tm.tm_hour = 0; | ||
354 | |||
355 | retval = ioctl(fd, RTC_ALM_SET, &rtc_tm); | ||
356 | if (retval == -1) { | ||
357 | if (errno == ENOTTY) { | ||
358 | fprintf(stderr, | ||
359 | "\n...Alarm IRQs not supported.\n"); | ||
360 | goto test_PIE; | ||
361 | } | ||
362 | perror("RTC_ALM_SET ioctl"); | ||
363 | exit(errno); | ||
364 | } | ||
365 | |||
366 | /* Read the current alarm settings */ | ||
367 | retval = ioctl(fd, RTC_ALM_READ, &rtc_tm); | ||
368 | if (retval == -1) { | ||
369 | perror("RTC_ALM_READ ioctl"); | ||
370 | exit(errno); | ||
371 | } | ||
372 | |||
373 | fprintf(stderr, "Alarm time now set to %02d:%02d:%02d.\n", | ||
374 | rtc_tm.tm_hour, rtc_tm.tm_min, rtc_tm.tm_sec); | ||
375 | |||
376 | /* Enable alarm interrupts */ | ||
377 | retval = ioctl(fd, RTC_AIE_ON, 0); | ||
378 | if (retval == -1) { | ||
379 | perror("RTC_AIE_ON ioctl"); | ||
380 | exit(errno); | ||
381 | } | ||
382 | |||
383 | fprintf(stderr, "Waiting 5 seconds for alarm..."); | ||
384 | fflush(stderr); | ||
385 | /* This blocks until the alarm ring causes an interrupt */ | ||
386 | retval = read(fd, &data, sizeof(unsigned long)); | ||
387 | if (retval == -1) { | ||
388 | perror("read"); | ||
389 | exit(errno); | ||
390 | } | ||
391 | irqcount++; | ||
392 | fprintf(stderr, " okay. Alarm rang.\n"); | ||
393 | |||
394 | /* Disable alarm interrupts */ | ||
395 | retval = ioctl(fd, RTC_AIE_OFF, 0); | ||
396 | if (retval == -1) { | ||
397 | perror("RTC_AIE_OFF ioctl"); | ||
398 | exit(errno); | ||
399 | } | ||
400 | |||
401 | test_PIE: | ||
402 | /* Read periodic IRQ rate */ | ||
403 | retval = ioctl(fd, RTC_IRQP_READ, &tmp); | ||
404 | if (retval == -1) { | ||
405 | /* not all RTCs support periodic IRQs */ | ||
406 | if (errno == ENOTTY) { | ||
407 | fprintf(stderr, "\nNo periodic IRQ support\n"); | ||
408 | goto done; | ||
409 | } | ||
410 | perror("RTC_IRQP_READ ioctl"); | ||
411 | exit(errno); | ||
412 | } | ||
413 | fprintf(stderr, "\nPeriodic IRQ rate is %ldHz.\n", tmp); | ||
414 | |||
415 | fprintf(stderr, "Counting 20 interrupts at:"); | ||
416 | fflush(stderr); | ||
417 | |||
418 | /* The frequencies 128Hz, 256Hz, ... 8192Hz are only allowed for root. */ | ||
419 | for (tmp=2; tmp<=64; tmp*=2) { | ||
420 | |||
421 | retval = ioctl(fd, RTC_IRQP_SET, tmp); | ||
422 | if (retval == -1) { | ||
423 | /* not all RTCs can change their periodic IRQ rate */ | ||
424 | if (errno == ENOTTY) { | ||
425 | fprintf(stderr, | ||
426 | "\n...Periodic IRQ rate is fixed\n"); | ||
427 | goto done; | ||
428 | } | ||
429 | perror("RTC_IRQP_SET ioctl"); | ||
430 | exit(errno); | ||
431 | } | ||
432 | |||
433 | fprintf(stderr, "\n%ldHz:\t", tmp); | ||
434 | fflush(stderr); | ||
435 | |||
436 | /* Enable periodic interrupts */ | ||
437 | retval = ioctl(fd, RTC_PIE_ON, 0); | ||
438 | if (retval == -1) { | ||
439 | perror("RTC_PIE_ON ioctl"); | ||
440 | exit(errno); | ||
441 | } | ||
442 | |||
443 | for (i=1; i<21; i++) { | ||
444 | /* This blocks */ | ||
445 | retval = read(fd, &data, sizeof(unsigned long)); | ||
446 | if (retval == -1) { | ||
447 | perror("read"); | ||
448 | exit(errno); | ||
449 | } | ||
450 | fprintf(stderr, " %d",i); | ||
451 | fflush(stderr); | ||
452 | irqcount++; | ||
453 | } | ||
454 | |||
455 | /* Disable periodic interrupts */ | ||
456 | retval = ioctl(fd, RTC_PIE_OFF, 0); | ||
457 | if (retval == -1) { | ||
458 | perror("RTC_PIE_OFF ioctl"); | ||
459 | exit(errno); | ||
460 | } | ||
461 | } | ||
462 | |||
463 | done: | ||
464 | fprintf(stderr, "\n\n\t\t\t *** Test complete ***\n"); | ||
465 | |||
466 | close(fd); | ||
467 | |||
468 | return 0; | ||
469 | } | ||
diff --git a/Documentation/scheduler/completion.txt b/Documentation/scheduler/completion.txt index f77651eca31e..2622bc7a188b 100644 --- a/Documentation/scheduler/completion.txt +++ b/Documentation/scheduler/completion.txt | |||
@@ -7,24 +7,24 @@ Introduction: | |||
7 | ------------- | 7 | ------------- |
8 | 8 | ||
9 | If you have one or more threads of execution that must wait for some process | 9 | If you have one or more threads of execution that must wait for some process |
10 | to have reached a point or a specific state, completions can provide a race | 10 | to have reached a point or a specific state, completions can provide a |
11 | free solution to this problem. Semantically they are somewhat like a | 11 | race-free solution to this problem. Semantically they are somewhat like a |
12 | pthread_barriers and have similar use-cases. | 12 | pthread_barrier and have similar use-cases. |
13 | 13 | ||
14 | Completions are a code synchronization mechanism that is preferable to any | 14 | Completions are a code synchronization mechanism which is preferable to any |
15 | misuse of locks. Any time you think of using yield() or some quirky | 15 | misuse of locks. Any time you think of using yield() or some quirky |
16 | msleep(1); loop to allow something else to proceed, you probably want to | 16 | msleep(1) loop to allow something else to proceed, you probably want to |
17 | look into using one of the wait_for_completion*() calls instead. The | 17 | look into using one of the wait_for_completion*() calls instead. The |
18 | advantage of using completions is clear intent of the code but also more | 18 | advantage of using completions is clear intent of the code, but also more |
19 | efficient code as both threads can continue until the result is actually | 19 | efficient code as both threads can continue until the result is actually |
20 | needed. | 20 | needed. |
21 | 21 | ||
22 | Completions are built on top of the generic event infrastructure in Linux, | 22 | Completions are built on top of the generic event infrastructure in Linux, |
23 | with the event reduced to a simple flag appropriately called "done" in | 23 | with the event reduced to a simple flag (appropriately called "done") in |
24 | struct completion, that tells the waiting threads of execution if they | 24 | struct completion that tells the waiting threads of execution if they |
25 | can continue safely. | 25 | can continue safely. |
26 | 26 | ||
27 | As completions are scheduling related the code is found in | 27 | As completions are scheduling related, the code is found in |
28 | kernel/sched/completion.c - for details on completion design and | 28 | kernel/sched/completion.c - for details on completion design and |
29 | implementation see completions-design.txt | 29 | implementation see completions-design.txt |
30 | 30 | ||
@@ -32,9 +32,9 @@ implementation see completions-design.txt | |||
32 | Usage: | 32 | Usage: |
33 | ------ | 33 | ------ |
34 | 34 | ||
35 | There are three parts to the using completions, the initialization of the | 35 | There are three parts to using completions, the initialization of the |
36 | struct completion, the waiting part through a call to one of the variants of | 36 | struct completion, the waiting part through a call to one of the variants of |
37 | wait_for_completion() and the signaling side through a call to complete(), | 37 | wait_for_completion() and the signaling side through a call to complete() |
38 | or complete_all(). Further there are some helper functions for checking the | 38 | or complete_all(). Further there are some helper functions for checking the |
39 | state of completions. | 39 | state of completions. |
40 | 40 | ||
@@ -50,7 +50,7 @@ handling of completions is: | |||
50 | providing the wait queue to place tasks on for waiting and the flag for | 50 | providing the wait queue to place tasks on for waiting and the flag for |
51 | indicating the state of affairs. | 51 | indicating the state of affairs. |
52 | 52 | ||
53 | Completions should be named to convey the intent of the waiter. A good | 53 | Completions should be named to convey the intent of the waiter. A good |
54 | example is: | 54 | example is: |
55 | 55 | ||
56 | wait_for_completion(&early_console_added); | 56 | wait_for_completion(&early_console_added); |
@@ -73,7 +73,7 @@ the default state to "not available", that is, "done" is set to 0. | |||
73 | 73 | ||
74 | The re-initialization function, reinit_completion(), simply resets the | 74 | The re-initialization function, reinit_completion(), simply resets the |
75 | done element to "not available", thus again to 0, without touching the | 75 | done element to "not available", thus again to 0, without touching the |
76 | wait queue. Calling init_completion() on the same completions object is | 76 | wait queue. Calling init_completion() twice on the same completion object is |
77 | most likely a bug as it re-initializes the queue to an empty queue and | 77 | most likely a bug as it re-initializes the queue to an empty queue and |
78 | enqueued tasks could get "lost" - use reinit_completion() in that case. | 78 | enqueued tasks could get "lost" - use reinit_completion() in that case. |
79 | 79 | ||
@@ -87,10 +87,17 @@ initialization should always use: | |||
87 | DECLARE_COMPLETION_ONSTACK(setup_done) | 87 | DECLARE_COMPLETION_ONSTACK(setup_done) |
88 | 88 | ||
89 | suitable for automatic/local variables on the stack and will make lockdep | 89 | suitable for automatic/local variables on the stack and will make lockdep |
90 | happy. Note also that one needs to making *sure* the completion passt to | 90 | happy. Note also that one needs to make *sure* the completion passed to |
91 | work threads remains in-scope, and no references remain to on-stack data | 91 | work threads remains in-scope, and no references remain to on-stack data |
92 | when the initiating function returns. | 92 | when the initiating function returns. |
93 | 93 | ||
94 | Using on-stack completions for code that calls any of the _timeout or | ||
95 | _interruptible/_killable variants is not advisable as they will require | ||
96 | additional synchronization to prevent the on-stack completion object in | ||
97 | the timeout/signal cases from going out of scope. Consider using dynamically | ||
98 | allocated completions when intending to use the _interruptible/_killable | ||
99 | or _timeout variants of wait_for_completion(). | ||
100 | |||
94 | 101 | ||
95 | Waiting for completions: | 102 | Waiting for completions: |
96 | ------------------------ | 103 | ------------------------ |
@@ -99,34 +106,38 @@ For a thread of execution to wait for some concurrent work to finish, it | |||
99 | calls wait_for_completion() on the initialized completion structure. | 106 | calls wait_for_completion() on the initialized completion structure. |
100 | A typical usage scenario is: | 107 | A typical usage scenario is: |
101 | 108 | ||
102 | structure completion setup_done; | 109 | struct completion setup_done; |
103 | init_completion(&setup_done); | 110 | init_completion(&setup_done); |
104 | initialze_work(...,&setup_done,...) | 111 | initialize_work(...,&setup_done,...) |
105 | 112 | ||
106 | /* run non-dependent code */ /* do setup */ | 113 | /* run non-dependent code */ /* do setup */ |
107 | 114 | ||
108 | wait_for_completion(&seupt_done); complete(setup_done) | 115 | wait_for_completion(&setup_done); complete(setup_done) |
109 | 116 | ||
110 | This is not implying any temporal order of wait_for_completion() and the | 117 | This is not implying any temporal order on wait_for_completion() and the |
111 | call to complete() - if the call to complete() happened before the call | 118 | call to complete() - if the call to complete() happened before the call |
112 | to wait_for_completion() then the waiting side simply will continue | 119 | to wait_for_completion() then the waiting side simply will continue |
113 | immediately as all dependencies are satisfied. | 120 | immediately as all dependencies are satisfied if not it will block until |
121 | completion is signaled by complete(). | ||
114 | 122 | ||
115 | Note that wait_for_completion() is calling spin_lock_irq/spin_unlock_irq | 123 | Note that wait_for_completion() is calling spin_lock_irq()/spin_unlock_irq(), |
116 | so it can only be called safely when you know that interrupts are enabled. | 124 | so it can only be called safely when you know that interrupts are enabled. |
117 | Calling it from hard-irq context will result in hard to detect spurious | 125 | Calling it from hard-irq or irqs-off atomic contexts will result in |
118 | enabling of interrupts. | 126 | hard-to-detect spurious enabling of interrupts. |
119 | 127 | ||
120 | wait_for_completion(): | 128 | wait_for_completion(): |
121 | 129 | ||
122 | void wait_for_completion(struct completion *done): | 130 | void wait_for_completion(struct completion *done): |
123 | 131 | ||
124 | The default behavior is to wait without a timeout and mark the task as | 132 | The default behavior is to wait without a timeout and to mark the task as |
125 | uninterruptible. wait_for_completion() and its variants are only safe | 133 | uninterruptible. wait_for_completion() and its variants are only safe |
126 | in soft-interrupt or process context but not in hard-irq context. | 134 | in process context (as they can sleep) but not in atomic context, |
135 | interrupt context, with disabled irqs. or preemption is disabled - see also | ||
136 | try_wait_for_completion() below for handling completion in atomic/interrupt | ||
137 | context. | ||
138 | |||
127 | As all variants of wait_for_completion() can (obviously) block for a long | 139 | As all variants of wait_for_completion() can (obviously) block for a long |
128 | time, you probably don't want to call this with held locks - see also | 140 | time, you probably don't want to call this with held mutexes. |
129 | try_wait_for_completion() below. | ||
130 | 141 | ||
131 | 142 | ||
132 | Variants available: | 143 | Variants available: |
@@ -141,43 +152,44 @@ A common problem that occurs is to have unclean assignment of return types, | |||
141 | so care should be taken with assigning return-values to variables of proper | 152 | so care should be taken with assigning return-values to variables of proper |
142 | type. Checking for the specific meaning of return values also has been found | 153 | type. Checking for the specific meaning of return values also has been found |
143 | to be quite inaccurate e.g. constructs like | 154 | to be quite inaccurate e.g. constructs like |
144 | if(!wait_for_completion_interruptible_timeout(...)) would execute the same | 155 | if (!wait_for_completion_interruptible_timeout(...)) would execute the same |
145 | code path for successful completion and for the interrupted case - which is | 156 | code path for successful completion and for the interrupted case - which is |
146 | probably not what you want. | 157 | probably not what you want. |
147 | 158 | ||
148 | int wait_for_completion_interruptible(struct completion *done) | 159 | int wait_for_completion_interruptible(struct completion *done) |
149 | 160 | ||
150 | marking the task TASK_INTERRUPTIBLE. If a signal was received while waiting. | 161 | This function marks the task TASK_INTERRUPTIBLE. If a signal was received |
151 | It will return -ERESTARTSYS and 0 otherwise. | 162 | while waiting it will return -ERESTARTSYS; 0 otherwise. |
152 | 163 | ||
153 | unsigned long wait_for_completion_timeout(struct completion *done, | 164 | unsigned long wait_for_completion_timeout(struct completion *done, |
154 | unsigned long timeout) | 165 | unsigned long timeout) |
155 | 166 | ||
156 | The task is marked as TASK_UNINTERRUPTIBLE and will wait at most timeout | 167 | The task is marked as TASK_UNINTERRUPTIBLE and will wait at most 'timeout' |
157 | (in jiffies). If timeout occurs it return 0 else the remaining time in | 168 | (in jiffies). If timeout occurs it returns 0 else the remaining time in |
158 | jiffies (but at least 1). Timeouts are preferably passed by msecs_to_jiffies() | 169 | jiffies (but at least 1). Timeouts are preferably calculated with |
159 | or usecs_to_jiffies(). If the returned timeout value is deliberately ignored | 170 | msecs_to_jiffies() or usecs_to_jiffies(). If the returned timeout value is |
160 | a comment should probably explain why (e.g. see drivers/mfd/wm8350-core.c | 171 | deliberately ignored a comment should probably explain why (e.g. see |
161 | wm8350_read_auxadc()) | 172 | drivers/mfd/wm8350-core.c wm8350_read_auxadc()) |
162 | 173 | ||
163 | long wait_for_completion_interruptible_timeout( | 174 | long wait_for_completion_interruptible_timeout( |
164 | struct completion *done, unsigned long timeout) | 175 | struct completion *done, unsigned long timeout) |
165 | 176 | ||
166 | passing a timeout in jiffies and marking the task as TASK_INTERRUPTIBLE. If a | 177 | This function passes a timeout in jiffies and marks the task as |
167 | signal was received it will return -ERESTARTSYS, 0 if completion timed-out and | 178 | TASK_INTERRUPTIBLE. If a signal was received it will return -ERESTARTSYS; |
168 | the remaining time in jiffies if completion occurred. | 179 | otherwise it returns 0 if the completion timed out or the remaining time in |
180 | jiffies if completion occurred. | ||
169 | 181 | ||
170 | Further variants include _killable which passes TASK_KILLABLE as the | 182 | Further variants include _killable which uses TASK_KILLABLE as the |
171 | designated tasks state and will return a -ERESTARTSYS if interrupted or | 183 | designated tasks state and will return -ERESTARTSYS if it is interrupted or |
172 | else 0 if completions was achieved as well as a _timeout variant. | 184 | else 0 if completion was achieved. There is a _timeout variant as well: |
173 | 185 | ||
174 | long wait_for_completion_killable(struct completion *done) | 186 | long wait_for_completion_killable(struct completion *done) |
175 | long wait_for_completion_killable_timeout(struct completion *done, | 187 | long wait_for_completion_killable_timeout(struct completion *done, |
176 | unsigned long timeout) | 188 | unsigned long timeout) |
177 | 189 | ||
178 | The _io variants wait_for_completion_io behave the same as the non-_io | 190 | The _io variants wait_for_completion_io() behave the same as the non-_io |
179 | variants, except for accounting waiting time as waiting on IO, which has | 191 | variants, except for accounting waiting time as waiting on IO, which has |
180 | an impact on how scheduling is calculated. | 192 | an impact on how the task is accounted in scheduling stats. |
181 | 193 | ||
182 | void wait_for_completion_io(struct completion *done) | 194 | void wait_for_completion_io(struct completion *done) |
183 | unsigned long wait_for_completion_io_timeout(struct completion *done | 195 | unsigned long wait_for_completion_io_timeout(struct completion *done |
@@ -187,13 +199,13 @@ an impact on how scheduling is calculated. | |||
187 | Signaling completions: | 199 | Signaling completions: |
188 | ---------------------- | 200 | ---------------------- |
189 | 201 | ||
190 | A thread of execution that wants to signal that the conditions for | 202 | A thread that wants to signal that the conditions for continuation have been |
191 | continuation have been achieved calls complete() to signal exactly one | 203 | achieved calls complete() to signal exactly one of the waiters that it can |
192 | of the waiters that it can continue. | 204 | continue. |
193 | 205 | ||
194 | void complete(struct completion *done) | 206 | void complete(struct completion *done) |
195 | 207 | ||
196 | or calls complete_all to signal all current and future waiters. | 208 | or calls complete_all() to signal all current and future waiters. |
197 | 209 | ||
198 | void complete_all(struct completion *done) | 210 | void complete_all(struct completion *done) |
199 | 211 | ||
@@ -205,32 +217,32 @@ wakeup order is the same in which they were enqueued (FIFO order). | |||
205 | If complete() is called multiple times then this will allow for that number | 217 | If complete() is called multiple times then this will allow for that number |
206 | of waiters to continue - each call to complete() will simply increment the | 218 | of waiters to continue - each call to complete() will simply increment the |
207 | done element. Calling complete_all() multiple times is a bug though. Both | 219 | done element. Calling complete_all() multiple times is a bug though. Both |
208 | complete() and complete_all() can be called in hard-irq context safely. | 220 | complete() and complete_all() can be called in hard-irq/atomic context safely. |
209 | 221 | ||
210 | There only can be one thread calling complete() or complete_all() on a | 222 | There only can be one thread calling complete() or complete_all() on a |
211 | particular struct completions at any time - serialized through the wait | 223 | particular struct completion at any time - serialized through the wait |
212 | queue spinlock. Any such concurrent calls to complete() or complete_all() | 224 | queue spinlock. Any such concurrent calls to complete() or complete_all() |
213 | probably are a design bug. | 225 | probably are a design bug. |
214 | 226 | ||
215 | Signaling completion from hard-irq context is fine as it will appropriately | 227 | Signaling completion from hard-irq context is fine as it will appropriately |
216 | lock with spin_lock_irqsave/spin_unlock_irqrestore. | 228 | lock with spin_lock_irqsave/spin_unlock_irqrestore and it will never sleep. |
217 | 229 | ||
218 | 230 | ||
219 | try_wait_for_completion()/completion_done(): | 231 | try_wait_for_completion()/completion_done(): |
220 | -------------------------------------------- | 232 | -------------------------------------------- |
221 | 233 | ||
222 | The try_wait_for_completion will not put the thread on the wait queue but | 234 | The try_wait_for_completion() function will not put the thread on the wait |
223 | rather returns false if it would need to enqueue (block) the thread, else it | 235 | queue but rather returns false if it would need to enqueue (block) the thread, |
224 | consumes any posted completions and returns true. | 236 | else it consumes one posted completion and returns true. |
225 | 237 | ||
226 | bool try_wait_for_completion(struct completion *done) | 238 | bool try_wait_for_completion(struct completion *done) |
227 | 239 | ||
228 | Finally to check state of a completions without changing it in any way is | 240 | Finally, to check the state of a completion without changing it in any way, |
229 | provided by completion_done() returning false if there are any posted | 241 | call completion_done(), which returns false if there are no posted |
230 | completion that was not yet consumed by waiters implying that there are | 242 | completions that were not yet consumed by waiters (implying that there are |
231 | waiters and true otherwise; | 243 | waiters) and true otherwise; |
232 | 244 | ||
233 | bool completion_done(struct completion *done) | 245 | bool completion_done(struct completion *done) |
234 | 246 | ||
235 | Both try_wait_for_completion() and completion_done() are safe to be called in | 247 | Both try_wait_for_completion() and completion_done() are safe to be called in |
236 | hard-irq context. | 248 | hard-irq or atomic context. |
diff --git a/Documentation/scsi/ncr53c8xx.txt b/Documentation/scsi/ncr53c8xx.txt index 1d508dcbf859..8586efff1e99 100644 --- a/Documentation/scsi/ncr53c8xx.txt +++ b/Documentation/scsi/ncr53c8xx.txt | |||
@@ -786,7 +786,6 @@ port address 0x1400. | |||
786 | irqm:1 same as initial settings (assumed BIOS settings) | 786 | irqm:1 same as initial settings (assumed BIOS settings) |
787 | irqm:2 always totem pole | 787 | irqm:2 always totem pole |
788 | irqm:0x10 driver will not use IRQF_SHARED flag when requesting irq | 788 | irqm:0x10 driver will not use IRQF_SHARED flag when requesting irq |
789 | irqm:0x20 driver will not use IRQF_DISABLED flag when requesting irq | ||
790 | 789 | ||
791 | (Bits 0x10 and 0x20 can be combined with hardware irq mode option) | 790 | (Bits 0x10 and 0x20 can be combined with hardware irq mode option) |
792 | 791 | ||
@@ -1231,30 +1230,6 @@ they only refer to system buffers that are well aligned. So, a work around | |||
1231 | may only be needed under Linux when a scatter/gather list is not used and | 1230 | may only be needed under Linux when a scatter/gather list is not used and |
1232 | when the SCSI DATA IN phase is reentered after a phase mismatch. | 1231 | when the SCSI DATA IN phase is reentered after a phase mismatch. |
1233 | 1232 | ||
1234 | 14.5 IRQ sharing problems | ||
1235 | |||
1236 | When an IRQ is shared by devices that are handled by different drivers, it | ||
1237 | may happen that one driver complains about the request of the IRQ having | ||
1238 | failed. Inder Linux-2.0, this may be due to one driver having requested the | ||
1239 | IRQ using the IRQF_DISABLED flag but some other having requested the same IRQ | ||
1240 | without this flag. Under both Linux-2.0 and linux-2.2, this may be caused by | ||
1241 | one driver not having requested the IRQ with the IRQF_SHARED flag. | ||
1242 | |||
1243 | By default, the ncr53c8xx and sym53c8xx drivers request IRQs with both the | ||
1244 | IRQF_DISABLED and the IRQF_SHARED flag under Linux-2.0 and with only the IRQF_SHARED | ||
1245 | flag under Linux-2.2. | ||
1246 | |||
1247 | Under Linux-2.0, you can disable use of IRQF_DISABLED flag from the boot | ||
1248 | command line by using the following option: | ||
1249 | |||
1250 | ncr53c8xx=irqm:0x20 (for the generic ncr53c8xx driver) | ||
1251 | sym53c8xx=irqm:0x20 (for the sym53c8xx driver) | ||
1252 | |||
1253 | If this does not fix the problem, then you may want to check how all other | ||
1254 | drivers are requesting the IRQ and report the problem. Note that if at least | ||
1255 | a single driver does not request the IRQ with the IRQF_SHARED flag (share IRQ), | ||
1256 | then the request of the IRQ obviously will not succeed for all the drivers. | ||
1257 | |||
1258 | 15. SCSI problem troubleshooting | 1233 | 15. SCSI problem troubleshooting |
1259 | 1234 | ||
1260 | 15.1 Problem tracking | 1235 | 15.1 Problem tracking |
diff --git a/Documentation/scsi/tmscsim.txt b/Documentation/scsi/tmscsim.txt index 0810132772a8..0e0322bf0020 100644 --- a/Documentation/scsi/tmscsim.txt +++ b/Documentation/scsi/tmscsim.txt | |||
@@ -107,10 +107,6 @@ produced errors and started to corrupt my disks. So don't do that! A 37.50 | |||
107 | MHz PCI bus works for me, though, but I don't recommend using higher clocks | 107 | MHz PCI bus works for me, though, but I don't recommend using higher clocks |
108 | than the 33.33 MHz being in the PCI spec. | 108 | than the 33.33 MHz being in the PCI spec. |
109 | 109 | ||
110 | If you want to share the IRQ with another device and the driver refuses to | ||
111 | do so, you might succeed with changing the DC390_IRQ type in tmscsim.c to | ||
112 | IRQF_SHARED | IRQF_DISABLED. | ||
113 | |||
114 | 110 | ||
115 | 3.Features | 111 | 3.Features |
116 | ---------- | 112 | ---------- |
diff --git a/Documentation/security/Smack.txt b/Documentation/security/Smack.txt index b6ef7e9dba30..abc82f85215b 100644 --- a/Documentation/security/Smack.txt +++ b/Documentation/security/Smack.txt | |||
@@ -33,11 +33,18 @@ The current git repository for Smack user space is: | |||
33 | git://github.com/smack-team/smack.git | 33 | git://github.com/smack-team/smack.git |
34 | 34 | ||
35 | This should make and install on most modern distributions. | 35 | This should make and install on most modern distributions. |
36 | There are three commands included in smackutil: | 36 | There are five commands included in smackutil: |
37 | 37 | ||
38 | smackload - properly formats data for writing to /smack/load | ||
39 | smackcipso - properly formats data for writing to /smack/cipso | ||
40 | chsmack - display or set Smack extended attribute values | 38 | chsmack - display or set Smack extended attribute values |
39 | smackctl - load the Smack access rules | ||
40 | smackaccess - report if a process with one label has access | ||
41 | to an object with another | ||
42 | |||
43 | These two commands are obsolete with the introduction of | ||
44 | the smackfs/load2 and smackfs/cipso2 interfaces. | ||
45 | |||
46 | smackload - properly formats data for writing to smackfs/load | ||
47 | smackcipso - properly formats data for writing to smackfs/cipso | ||
41 | 48 | ||
42 | In keeping with the intent of Smack, configuration data is | 49 | In keeping with the intent of Smack, configuration data is |
43 | minimal and not strictly required. The most important | 50 | minimal and not strictly required. The most important |
@@ -47,9 +54,9 @@ of this, but it can be manually as well. | |||
47 | 54 | ||
48 | Add this line to /etc/fstab: | 55 | Add this line to /etc/fstab: |
49 | 56 | ||
50 | smackfs /smack smackfs smackfsdef=* 0 0 | 57 | smackfs /sys/fs/smackfs smackfs defaults 0 0 |
51 | 58 | ||
52 | and create the /smack directory for mounting. | 59 | The /sys/fs/smackfs directory is created by the kernel. |
53 | 60 | ||
54 | Smack uses extended attributes (xattrs) to store labels on filesystem | 61 | Smack uses extended attributes (xattrs) to store labels on filesystem |
55 | objects. The attributes are stored in the extended attribute security | 62 | objects. The attributes are stored in the extended attribute security |
@@ -92,13 +99,13 @@ There are multiple ways to set a Smack label on a file: | |||
92 | # attr -S -s SMACK64 -V "value" path | 99 | # attr -S -s SMACK64 -V "value" path |
93 | # chsmack -a value path | 100 | # chsmack -a value path |
94 | 101 | ||
95 | A process can see the smack label it is running with by | 102 | A process can see the Smack label it is running with by |
96 | reading /proc/self/attr/current. A process with CAP_MAC_ADMIN | 103 | reading /proc/self/attr/current. A process with CAP_MAC_ADMIN |
97 | can set the process smack by writing there. | 104 | can set the process Smack by writing there. |
98 | 105 | ||
99 | Most Smack configuration is accomplished by writing to files | 106 | Most Smack configuration is accomplished by writing to files |
100 | in the smackfs filesystem. This pseudo-filesystem is usually | 107 | in the smackfs filesystem. This pseudo-filesystem is mounted |
101 | mounted on /smack. | 108 | on /sys/fs/smackfs. |
102 | 109 | ||
103 | access | 110 | access |
104 | This interface reports whether a subject with the specified | 111 | This interface reports whether a subject with the specified |
@@ -206,23 +213,30 @@ onlycap | |||
206 | file or cleared by writing "-" to the file. | 213 | file or cleared by writing "-" to the file. |
207 | ptrace | 214 | ptrace |
208 | This is used to define the current ptrace policy | 215 | This is used to define the current ptrace policy |
209 | 0 - default: this is the policy that relies on smack access rules. | 216 | 0 - default: this is the policy that relies on Smack access rules. |
210 | For the PTRACE_READ a subject needs to have a read access on | 217 | For the PTRACE_READ a subject needs to have a read access on |
211 | object. For the PTRACE_ATTACH a read-write access is required. | 218 | object. For the PTRACE_ATTACH a read-write access is required. |
212 | 1 - exact: this is the policy that limits PTRACE_ATTACH. Attach is | 219 | 1 - exact: this is the policy that limits PTRACE_ATTACH. Attach is |
213 | only allowed when subject's and object's labels are equal. | 220 | only allowed when subject's and object's labels are equal. |
214 | PTRACE_READ is not affected. Can be overriden with CAP_SYS_PTRACE. | 221 | PTRACE_READ is not affected. Can be overridden with CAP_SYS_PTRACE. |
215 | 2 - draconian: this policy behaves like the 'exact' above with an | 222 | 2 - draconian: this policy behaves like the 'exact' above with an |
216 | exception that it can't be overriden with CAP_SYS_PTRACE. | 223 | exception that it can't be overridden with CAP_SYS_PTRACE. |
217 | revoke-subject | 224 | revoke-subject |
218 | Writing a Smack label here sets the access to '-' for all access | 225 | Writing a Smack label here sets the access to '-' for all access |
219 | rules with that subject label. | 226 | rules with that subject label. |
227 | unconfined | ||
228 | If the kernel is configured with CONFIG_SECURITY_SMACK_BRINGUP | ||
229 | a process with CAP_MAC_ADMIN can write a label into this interface. | ||
230 | Thereafter, accesses that involve that label will be logged and | ||
231 | the access permitted if it wouldn't be otherwise. Note that this | ||
232 | is dangerous and can ruin the proper labeling of your system. | ||
233 | It should never be used in production. | ||
220 | 234 | ||
221 | You can add access rules in /etc/smack/accesses. They take the form: | 235 | You can add access rules in /etc/smack/accesses. They take the form: |
222 | 236 | ||
223 | subjectlabel objectlabel access | 237 | subjectlabel objectlabel access |
224 | 238 | ||
225 | access is a combination of the letters rwxa which specify the | 239 | access is a combination of the letters rwxatb which specify the |
226 | kind of access permitted a subject with subjectlabel on an | 240 | kind of access permitted a subject with subjectlabel on an |
227 | object with objectlabel. If there is no rule no access is allowed. | 241 | object with objectlabel. If there is no rule no access is allowed. |
228 | 242 | ||
@@ -318,8 +332,9 @@ each of the subject and the object. | |||
318 | 332 | ||
319 | Labels | 333 | Labels |
320 | 334 | ||
321 | Smack labels are ASCII character strings, one to twenty-three characters in | 335 | Smack labels are ASCII character strings. They can be up to 255 characters |
322 | length. Single character labels using special characters, that being anything | 336 | long, but keeping them to twenty-three characters is recommended. |
337 | Single character labels using special characters, that being anything | ||
323 | other than a letter or digit, are reserved for use by the Smack development | 338 | other than a letter or digit, are reserved for use by the Smack development |
324 | team. Smack labels are unstructured, case sensitive, and the only operation | 339 | team. Smack labels are unstructured, case sensitive, and the only operation |
325 | ever performed on them is comparison for equality. Smack labels cannot | 340 | ever performed on them is comparison for equality. Smack labels cannot |
@@ -335,10 +350,9 @@ There are some predefined labels: | |||
335 | ? Pronounced "huh", a single question mark character. | 350 | ? Pronounced "huh", a single question mark character. |
336 | @ Pronounced "web", a single at sign character. | 351 | @ Pronounced "web", a single at sign character. |
337 | 352 | ||
338 | Every task on a Smack system is assigned a label. System tasks, such as | 353 | Every task on a Smack system is assigned a label. The Smack label |
339 | init(8) and systems daemons, are run with the floor ("_") label. User tasks | 354 | of a process will usually be assigned by the system initialization |
340 | are assigned labels according to the specification found in the | 355 | mechanism. |
341 | /etc/smack/user configuration file. | ||
342 | 356 | ||
343 | Access Rules | 357 | Access Rules |
344 | 358 | ||
@@ -393,6 +407,7 @@ describe access modes: | |||
393 | w: indicates that write access should be granted. | 407 | w: indicates that write access should be granted. |
394 | x: indicates that execute access should be granted. | 408 | x: indicates that execute access should be granted. |
395 | t: indicates that the rule requests transmutation. | 409 | t: indicates that the rule requests transmutation. |
410 | b: indicates that the rule should be reported for bring-up. | ||
396 | 411 | ||
397 | Uppercase values for the specification letters are allowed as well. | 412 | Uppercase values for the specification letters are allowed as well. |
398 | Access mode specifications can be in any order. Examples of acceptable rules | 413 | Access mode specifications can be in any order. Examples of acceptable rules |
@@ -402,6 +417,7 @@ are: | |||
402 | Secret Unclass R | 417 | Secret Unclass R |
403 | Manager Game x | 418 | Manager Game x |
404 | User HR w | 419 | User HR w |
420 | Snap Crackle rwxatb | ||
405 | New Old rRrRr | 421 | New Old rRrRr |
406 | Closed Off - | 422 | Closed Off - |
407 | 423 | ||
@@ -413,7 +429,7 @@ Examples of unacceptable rules are: | |||
413 | 429 | ||
414 | Spaces are not allowed in labels. Since a subject always has access to files | 430 | Spaces are not allowed in labels. Since a subject always has access to files |
415 | with the same label specifying a rule for that case is pointless. Only | 431 | with the same label specifying a rule for that case is pointless. Only |
416 | valid letters (rwxatRWXAT) and the dash ('-') character are allowed in | 432 | valid letters (rwxatbRWXATB) and the dash ('-') character are allowed in |
417 | access specifications. The dash is a placeholder, so "a-r" is the same | 433 | access specifications. The dash is a placeholder, so "a-r" is the same |
418 | as "ar". A lone dash is used to specify that no access should be allowed. | 434 | as "ar". A lone dash is used to specify that no access should be allowed. |
419 | 435 | ||
@@ -462,16 +478,11 @@ receiver. The receiver is not required to have read access to the sender. | |||
462 | Setting Access Rules | 478 | Setting Access Rules |
463 | 479 | ||
464 | The configuration file /etc/smack/accesses contains the rules to be set at | 480 | The configuration file /etc/smack/accesses contains the rules to be set at |
465 | system startup. The contents are written to the special file /smack/load. | 481 | system startup. The contents are written to the special file |
466 | Rules can be written to /smack/load at any time and take effect immediately. | 482 | /sys/fs/smackfs/load2. Rules can be added at any time and take effect |
467 | For any pair of subject and object labels there can be only one rule, with the | 483 | immediately. For any pair of subject and object labels there can be only |
468 | most recently specified overriding any earlier specification. | 484 | one rule, with the most recently specified overriding any earlier |
469 | 485 | specification. | |
470 | The program smackload is provided to ensure data is formatted | ||
471 | properly when written to /smack/load. This program reads lines | ||
472 | of the form | ||
473 | |||
474 | subjectlabel objectlabel mode. | ||
475 | 486 | ||
476 | Task Attribute | 487 | Task Attribute |
477 | 488 | ||
@@ -488,7 +499,10 @@ only be changed by a process with privilege. | |||
488 | 499 | ||
489 | Privilege | 500 | Privilege |
490 | 501 | ||
491 | A process with CAP_MAC_OVERRIDE is privileged. | 502 | A process with CAP_MAC_OVERRIDE or CAP_MAC_ADMIN is privileged. |
503 | CAP_MAC_OVERRIDE allows the process access to objects it would | ||
504 | be denied otherwise. CAP_MAC_ADMIN allows a process to change | ||
505 | Smack data, including rules and attributes. | ||
492 | 506 | ||
493 | Smack Networking | 507 | Smack Networking |
494 | 508 | ||
@@ -510,14 +524,14 @@ intervention. Unlabeled packets that come into the system will be given the | |||
510 | ambient label. | 524 | ambient label. |
511 | 525 | ||
512 | Smack requires configuration in the case where packets from a system that is | 526 | Smack requires configuration in the case where packets from a system that is |
513 | not smack that speaks CIPSO may be encountered. Usually this will be a Trusted | 527 | not Smack that speaks CIPSO may be encountered. Usually this will be a Trusted |
514 | Solaris system, but there are other, less widely deployed systems out there. | 528 | Solaris system, but there are other, less widely deployed systems out there. |
515 | CIPSO provides 3 important values, a Domain Of Interpretation (DOI), a level, | 529 | CIPSO provides 3 important values, a Domain Of Interpretation (DOI), a level, |
516 | and a category set with each packet. The DOI is intended to identify a group | 530 | and a category set with each packet. The DOI is intended to identify a group |
517 | of systems that use compatible labeling schemes, and the DOI specified on the | 531 | of systems that use compatible labeling schemes, and the DOI specified on the |
518 | smack system must match that of the remote system or packets will be | 532 | Smack system must match that of the remote system or packets will be |
519 | discarded. The DOI is 3 by default. The value can be read from /smack/doi and | 533 | discarded. The DOI is 3 by default. The value can be read from |
520 | can be changed by writing to /smack/doi. | 534 | /sys/fs/smackfs/doi and can be changed by writing to /sys/fs/smackfs/doi. |
521 | 535 | ||
522 | The label and category set are mapped to a Smack label as defined in | 536 | The label and category set are mapped to a Smack label as defined in |
523 | /etc/smack/cipso. | 537 | /etc/smack/cipso. |
@@ -539,15 +553,13 @@ The ":" and "," characters are permitted in a Smack label but have no special | |||
539 | meaning. | 553 | meaning. |
540 | 554 | ||
541 | The mapping of Smack labels to CIPSO values is defined by writing to | 555 | The mapping of Smack labels to CIPSO values is defined by writing to |
542 | /smack/cipso. Again, the format of data written to this special file | 556 | /sys/fs/smackfs/cipso2. |
543 | is highly restrictive, so the program smackcipso is provided to | ||
544 | ensure the writes are done properly. This program takes mappings | ||
545 | on the standard input and sends them to /smack/cipso properly. | ||
546 | 557 | ||
547 | In addition to explicit mappings Smack supports direct CIPSO mappings. One | 558 | In addition to explicit mappings Smack supports direct CIPSO mappings. One |
548 | CIPSO level is used to indicate that the category set passed in the packet is | 559 | CIPSO level is used to indicate that the category set passed in the packet is |
549 | in fact an encoding of the Smack label. The level used is 250 by default. The | 560 | in fact an encoding of the Smack label. The level used is 250 by default. The |
550 | value can be read from /smack/direct and changed by writing to /smack/direct. | 561 | value can be read from /sys/fs/smackfs/direct and changed by writing to |
562 | /sys/fs/smackfs/direct. | ||
551 | 563 | ||
552 | Socket Attributes | 564 | Socket Attributes |
553 | 565 | ||
@@ -565,8 +577,8 @@ sockets. | |||
565 | Smack Netlabel Exceptions | 577 | Smack Netlabel Exceptions |
566 | 578 | ||
567 | You will often find that your labeled application has to talk to the outside, | 579 | You will often find that your labeled application has to talk to the outside, |
568 | unlabeled world. To do this there's a special file /smack/netlabel where you can | 580 | unlabeled world. To do this there's a special file /sys/fs/smackfs/netlabel |
569 | add some exceptions in the form of : | 581 | where you can add some exceptions in the form of : |
570 | @IP1 LABEL1 or | 582 | @IP1 LABEL1 or |
571 | @IP2/MASK LABEL2 | 583 | @IP2/MASK LABEL2 |
572 | 584 | ||
@@ -574,22 +586,22 @@ It means that your application will have unlabeled access to @IP1 if it has | |||
574 | write access on LABEL1, and access to the subnet @IP2/MASK if it has write | 586 | write access on LABEL1, and access to the subnet @IP2/MASK if it has write |
575 | access on LABEL2. | 587 | access on LABEL2. |
576 | 588 | ||
577 | Entries in the /smack/netlabel file are matched by longest mask first, like in | 589 | Entries in the /sys/fs/smackfs/netlabel file are matched by longest mask |
578 | classless IPv4 routing. | 590 | first, like in classless IPv4 routing. |
579 | 591 | ||
580 | A special label '@' and an option '-CIPSO' can be used there : | 592 | A special label '@' and an option '-CIPSO' can be used there : |
581 | @ means Internet, any application with any label has access to it | 593 | @ means Internet, any application with any label has access to it |
582 | -CIPSO means standard CIPSO networking | 594 | -CIPSO means standard CIPSO networking |
583 | 595 | ||
584 | If you don't know what CIPSO is and don't plan to use it, you can just do : | 596 | If you don't know what CIPSO is and don't plan to use it, you can just do : |
585 | echo 127.0.0.1 -CIPSO > /smack/netlabel | 597 | echo 127.0.0.1 -CIPSO > /sys/fs/smackfs/netlabel |
586 | echo 0.0.0.0/0 @ > /smack/netlabel | 598 | echo 0.0.0.0/0 @ > /sys/fs/smackfs/netlabel |
587 | 599 | ||
588 | If you use CIPSO on your 192.168.0.0/16 local network and need also unlabeled | 600 | If you use CIPSO on your 192.168.0.0/16 local network and need also unlabeled |
589 | Internet access, you can have : | 601 | Internet access, you can have : |
590 | echo 127.0.0.1 -CIPSO > /smack/netlabel | 602 | echo 127.0.0.1 -CIPSO > /sys/fs/smackfs/netlabel |
591 | echo 192.168.0.0/16 -CIPSO > /smack/netlabel | 603 | echo 192.168.0.0/16 -CIPSO > /sys/fs/smackfs/netlabel |
592 | echo 0.0.0.0/0 @ > /smack/netlabel | 604 | echo 0.0.0.0/0 @ > /sys/fs/smackfs/netlabel |
593 | 605 | ||
594 | 606 | ||
595 | Writing Applications for Smack | 607 | Writing Applications for Smack |
@@ -676,7 +688,7 @@ Smack auditing | |||
676 | If you want Smack auditing of security events, you need to set CONFIG_AUDIT | 688 | If you want Smack auditing of security events, you need to set CONFIG_AUDIT |
677 | in your kernel configuration. | 689 | in your kernel configuration. |
678 | By default, all denied events will be audited. You can change this behavior by | 690 | By default, all denied events will be audited. You can change this behavior by |
679 | writing a single character to the /smack/logging file : | 691 | writing a single character to the /sys/fs/smackfs/logging file : |
680 | 0 : no logging | 692 | 0 : no logging |
681 | 1 : log denied (default) | 693 | 1 : log denied (default) |
682 | 2 : log accepted | 694 | 2 : log accepted |
@@ -686,3 +698,20 @@ Events are logged as 'key=value' pairs, for each event you at least will get | |||
686 | the subject, the object, the rights requested, the action, the kernel function | 698 | the subject, the object, the rights requested, the action, the kernel function |
687 | that triggered the event, plus other pairs depending on the type of event | 699 | that triggered the event, plus other pairs depending on the type of event |
688 | audited. | 700 | audited. |
701 | |||
702 | Bringup Mode | ||
703 | |||
704 | Bringup mode provides logging features that can make application | ||
705 | configuration and system bringup easier. Configure the kernel with | ||
706 | CONFIG_SECURITY_SMACK_BRINGUP to enable these features. When bringup | ||
707 | mode is enabled accesses that succeed due to rules marked with the "b" | ||
708 | access mode will logged. When a new label is introduced for processes | ||
709 | rules can be added aggressively, marked with the "b". The logging allows | ||
710 | tracking of which rules actual get used for that label. | ||
711 | |||
712 | Another feature of bringup mode is the "unconfined" option. Writing | ||
713 | a label to /sys/fs/smackfs/unconfined makes subjects with that label | ||
714 | able to access any object, and objects with that label accessible to | ||
715 | all subjects. Any access that is granted because a label is unconfined | ||
716 | is logged. This feature is dangerous, as files and directories may | ||
717 | be created in places they couldn't if the policy were being enforced. | ||
diff --git a/Documentation/sound/alsa/ControlNames.txt b/Documentation/sound/alsa/ControlNames.txt index 79a6127863ca..3fc1cf50d28e 100644 --- a/Documentation/sound/alsa/ControlNames.txt +++ b/Documentation/sound/alsa/ControlNames.txt | |||
@@ -71,11 +71,11 @@ SOURCE: | |||
71 | HDMI/DP (either HDMI or DisplayPort) | 71 | HDMI/DP (either HDMI or DisplayPort) |
72 | 72 | ||
73 | Exceptions (deprecated): | 73 | Exceptions (deprecated): |
74 | [Digital] Capture Source | 74 | [Analogue|Digital] Capture Source |
75 | [Digital] Capture Switch (aka input gain switch) | 75 | [Analogue|Digital] Capture Switch (aka input gain switch) |
76 | [Digital] Capture Volume (aka input gain volume) | 76 | [Analogue|Digital] Capture Volume (aka input gain volume) |
77 | [Digital] Playback Switch (aka output gain switch) | 77 | [Analogue|Digital] Playback Switch (aka output gain switch) |
78 | [Digital] Playback Volume (aka output gain volume) | 78 | [Analogue|Digital] Playback Volume (aka output gain volume) |
79 | Tone Control - Switch | 79 | Tone Control - Switch |
80 | Tone Control - Bass | 80 | Tone Control - Bass |
81 | Tone Control - Treble | 81 | Tone Control - Treble |
diff --git a/Documentation/sound/alsa/HD-Audio.txt b/Documentation/sound/alsa/HD-Audio.txt index 42a0a39b77e6..e7193aac669c 100644 --- a/Documentation/sound/alsa/HD-Audio.txt +++ b/Documentation/sound/alsa/HD-Audio.txt | |||
@@ -466,7 +466,11 @@ The generic parser supports the following hints: | |||
466 | - add_jack_modes (bool): add "xxx Jack Mode" enum controls to each | 466 | - add_jack_modes (bool): add "xxx Jack Mode" enum controls to each |
467 | I/O jack for allowing to change the headphone amp and mic bias VREF | 467 | I/O jack for allowing to change the headphone amp and mic bias VREF |
468 | capabilities | 468 | capabilities |
469 | - power_down_unused (bool): power down the unused widgets | 469 | - power_save_node (bool): advanced power management for each widget, |
470 | controlling the power sate (D0/D3) of each widget node depending on | ||
471 | the actual pin and stream states | ||
472 | - power_down_unused (bool): power down the unused widgets, a subset of | ||
473 | power_save_node, and will be dropped in future | ||
470 | - add_hp_mic (bool): add the headphone to capture source if possible | 474 | - add_hp_mic (bool): add the headphone to capture source if possible |
471 | - hp_mic_detect (bool): enable/disable the hp/mic shared input for a | 475 | - hp_mic_detect (bool): enable/disable the hp/mic shared input for a |
472 | single built-in mic case; default true | 476 | single built-in mic case; default true |
diff --git a/Documentation/sound/alsa/timestamping.txt b/Documentation/sound/alsa/timestamping.txt new file mode 100644 index 000000000000..0b191a23f534 --- /dev/null +++ b/Documentation/sound/alsa/timestamping.txt | |||
@@ -0,0 +1,200 @@ | |||
1 | The ALSA API can provide two different system timestamps: | ||
2 | |||
3 | - Trigger_tstamp is the system time snapshot taken when the .trigger | ||
4 | callback is invoked. This snapshot is taken by the ALSA core in the | ||
5 | general case, but specific hardware may have synchronization | ||
6 | capabilities or conversely may only be able to provide a correct | ||
7 | estimate with a delay. In the latter two cases, the low-level driver | ||
8 | is responsible for updating the trigger_tstamp at the most appropriate | ||
9 | and precise moment. Applications should not rely solely on the first | ||
10 | trigger_tstamp but update their internal calculations if the driver | ||
11 | provides a refined estimate with a delay. | ||
12 | |||
13 | - tstamp is the current system timestamp updated during the last | ||
14 | event or application query. | ||
15 | The difference (tstamp - trigger_tstamp) defines the elapsed time. | ||
16 | |||
17 | The ALSA API provides reports two basic pieces of information, avail | ||
18 | and delay, which combined with the trigger and current system | ||
19 | timestamps allow for applications to keep track of the 'fullness' of | ||
20 | the ring buffer and the amount of queued samples. | ||
21 | |||
22 | The use of these different pointers and time information depends on | ||
23 | the application needs: | ||
24 | |||
25 | - 'avail' reports how much can be written in the ring buffer | ||
26 | - 'delay' reports the time it will take to hear a new sample after all | ||
27 | queued samples have been played out. | ||
28 | |||
29 | When timestamps are enabled, the avail/delay information is reported | ||
30 | along with a snapshot of system time. Applications can select from | ||
31 | CLOCK_REALTIME (NTP corrections including going backwards), | ||
32 | CLOCK_MONOTONIC (NTP corrections but never going backwards), | ||
33 | CLOCK_MONOTIC_RAW (without NTP corrections) and change the mode | ||
34 | dynamically with sw_params | ||
35 | |||
36 | |||
37 | The ALSA API also provide an audio_tstamp which reflects the passage | ||
38 | of time as measured by different components of audio hardware. In | ||
39 | ascii-art, this could be represented as follows (for the playback | ||
40 | case): | ||
41 | |||
42 | |||
43 | --------------------------------------------------------------> time | ||
44 | ^ ^ ^ ^ ^ | ||
45 | | | | | | | ||
46 | analog link dma app FullBuffer | ||
47 | time time time time time | ||
48 | | | | | | | ||
49 | |< codec delay >|<--hw delay-->|<queued samples>|<---avail->| | ||
50 | |<----------------- delay---------------------->| | | ||
51 | |<----ring buffer length---->| | ||
52 | |||
53 | The analog time is taken at the last stage of the playback, as close | ||
54 | as possible to the actual transducer | ||
55 | |||
56 | The link time is taken at the output of the SOC/chipset as the samples | ||
57 | are pushed on a link. The link time can be directly measured if | ||
58 | supported in hardware by sample counters or wallclocks (e.g. with | ||
59 | HDAudio 24MHz or PTP clock for networked solutions) or indirectly | ||
60 | estimated (e.g. with the frame counter in USB). | ||
61 | |||
62 | The DMA time is measured using counters - typically the least reliable | ||
63 | of all measurements due to the bursty natured of DMA transfers. | ||
64 | |||
65 | The app time corresponds to the time tracked by an application after | ||
66 | writing in the ring buffer. | ||
67 | |||
68 | The application can query what the hardware supports, define which | ||
69 | audio time it wants reported by selecting the relevant settings in | ||
70 | audio_tstamp_config fields, get an estimate of the timestamp | ||
71 | accuracy. It can also request the delay-to-analog be included in the | ||
72 | measurement. Direct access to the link time is very interesting on | ||
73 | platforms that provide an embedded DSP; measuring directly the link | ||
74 | time with dedicated hardware, possibly synchronized with system time, | ||
75 | removes the need to keep track of internal DSP processing times and | ||
76 | latency. | ||
77 | |||
78 | In case the application requests an audio tstamp that is not supported | ||
79 | in hardware/low-level driver, the type is overridden as DEFAULT and the | ||
80 | timestamp will report the DMA time based on the hw_pointer value. | ||
81 | |||
82 | For backwards compatibility with previous implementations that did not | ||
83 | provide timestamp selection, with a zero-valued COMPAT timestamp type | ||
84 | the results will default to the HDAudio wall clock for playback | ||
85 | streams and to the DMA time (hw_ptr) in all other cases. | ||
86 | |||
87 | The audio timestamp accuracy can be returned to user-space, so that | ||
88 | appropriate decisions are made: | ||
89 | |||
90 | - for dma time (default), the granularity of the transfers can be | ||
91 | inferred from the steps between updates and in turn provide | ||
92 | information on how much the application pointer can be rewound | ||
93 | safely. | ||
94 | |||
95 | - the link time can be used to track long-term drifts between audio | ||
96 | and system time using the (tstamp-trigger_tstamp)/audio_tstamp | ||
97 | ratio, the precision helps define how much smoothing/low-pass | ||
98 | filtering is required. The link time can be either reset on startup | ||
99 | or reported as is (the latter being useful to compare progress of | ||
100 | different streams - but may require the wallclock to be always | ||
101 | running and not wrap-around during idle periods). If supported in | ||
102 | hardware, the absolute link time could also be used to define a | ||
103 | precise start time (patches WIP) | ||
104 | |||
105 | - including the delay in the audio timestamp may | ||
106 | counter-intuitively not increase the precision of timestamps, e.g. if a | ||
107 | codec includes variable-latency DSP processing or a chain of | ||
108 | hardware components the delay is typically not known with precision. | ||
109 | |||
110 | The accuracy is reported in nanosecond units (using an unsigned 32-bit | ||
111 | word), which gives a max precision of 4.29s, more than enough for | ||
112 | audio applications... | ||
113 | |||
114 | Due to the varied nature of timestamping needs, even for a single | ||
115 | application, the audio_tstamp_config can be changed dynamically. In | ||
116 | the STATUS ioctl, the parameters are read-only and do not allow for | ||
117 | any application selection. To work around this limitation without | ||
118 | impacting legacy applications, a new STATUS_EXT ioctl is introduced | ||
119 | with read/write parameters. ALSA-lib will be modified to make use of | ||
120 | STATUS_EXT and effectively deprecate STATUS. | ||
121 | |||
122 | The ALSA API only allows for a single audio timestamp to be reported | ||
123 | at a time. This is a conscious design decision, reading the audio | ||
124 | timestamps from hardware registers or from IPC takes time, the more | ||
125 | timestamps are read the more imprecise the combined measurements | ||
126 | are. To avoid any interpretation issues, a single (system, audio) | ||
127 | timestamp is reported. Applications that need different timestamps | ||
128 | will be required to issue multiple queries and perform an | ||
129 | interpolation of the results | ||
130 | |||
131 | In some hardware-specific configuration, the system timestamp is | ||
132 | latched by a low-level audio subsytem, and the information provided | ||
133 | back to the driver. Due to potential delays in the communication with | ||
134 | the hardware, there is a risk of misalignment with the avail and delay | ||
135 | information. To make sure applications are not confused, a | ||
136 | driver_timestamp field is added in the snd_pcm_status structure; this | ||
137 | timestamp shows when the information is put together by the driver | ||
138 | before returning from the STATUS and STATUS_EXT ioctl. in most cases | ||
139 | this driver_timestamp will be identical to the regular system tstamp. | ||
140 | |||
141 | Examples of typestamping with HDaudio: | ||
142 | |||
143 | 1. DMA timestamp, no compensation for DMA+analog delay | ||
144 | $ ./audio_time -p --ts_type=1 | ||
145 | playback: systime: 341121338 nsec, audio time 342000000 nsec, systime delta -878662 | ||
146 | playback: systime: 426236663 nsec, audio time 427187500 nsec, systime delta -950837 | ||
147 | playback: systime: 597080580 nsec, audio time 598000000 nsec, systime delta -919420 | ||
148 | playback: systime: 682059782 nsec, audio time 683020833 nsec, systime delta -961051 | ||
149 | playback: systime: 852896415 nsec, audio time 853854166 nsec, systime delta -957751 | ||
150 | playback: systime: 937903344 nsec, audio time 938854166 nsec, systime delta -950822 | ||
151 | |||
152 | 2. DMA timestamp, compensation for DMA+analog delay | ||
153 | $ ./audio_time -p --ts_type=1 -d | ||
154 | playback: systime: 341053347 nsec, audio time 341062500 nsec, systime delta -9153 | ||
155 | playback: systime: 426072447 nsec, audio time 426062500 nsec, systime delta 9947 | ||
156 | playback: systime: 596899518 nsec, audio time 596895833 nsec, systime delta 3685 | ||
157 | playback: systime: 681915317 nsec, audio time 681916666 nsec, systime delta -1349 | ||
158 | playback: systime: 852741306 nsec, audio time 852750000 nsec, systime delta -8694 | ||
159 | |||
160 | 3. link timestamp, compensation for DMA+analog delay | ||
161 | $ ./audio_time -p --ts_type=2 -d | ||
162 | playback: systime: 341060004 nsec, audio time 341062791 nsec, systime delta -2787 | ||
163 | playback: systime: 426242074 nsec, audio time 426244875 nsec, systime delta -2801 | ||
164 | playback: systime: 597080992 nsec, audio time 597084583 nsec, systime delta -3591 | ||
165 | playback: systime: 682084512 nsec, audio time 682088291 nsec, systime delta -3779 | ||
166 | playback: systime: 852936229 nsec, audio time 852940916 nsec, systime delta -4687 | ||
167 | playback: systime: 938107562 nsec, audio time 938112708 nsec, systime delta -5146 | ||
168 | |||
169 | Example 1 shows that the timestamp at the DMA level is close to 1ms | ||
170 | ahead of the actual playback time (as a side time this sort of | ||
171 | measurement can help define rewind safeguards). Compensating for the | ||
172 | DMA-link delay in example 2 helps remove the hardware buffering abut | ||
173 | the information is still very jittery, with up to one sample of | ||
174 | error. In example 3 where the timestamps are measured with the link | ||
175 | wallclock, the timestamps show a monotonic behavior and a lower | ||
176 | dispersion. | ||
177 | |||
178 | Example 3 and 4 are with USB audio class. Example 3 shows a high | ||
179 | offset between audio time and system time due to buffering. Example 4 | ||
180 | shows how compensating for the delay exposes a 1ms accuracy (due to | ||
181 | the use of the frame counter by the driver) | ||
182 | |||
183 | Example 3: DMA timestamp, no compensation for delay, delta of ~5ms | ||
184 | $ ./audio_time -p -Dhw:1 -t1 | ||
185 | playback: systime: 120174019 nsec, audio time 125000000 nsec, systime delta -4825981 | ||
186 | playback: systime: 245041136 nsec, audio time 250000000 nsec, systime delta -4958864 | ||
187 | playback: systime: 370106088 nsec, audio time 375000000 nsec, systime delta -4893912 | ||
188 | playback: systime: 495040065 nsec, audio time 500000000 nsec, systime delta -4959935 | ||
189 | playback: systime: 620038179 nsec, audio time 625000000 nsec, systime delta -4961821 | ||
190 | playback: systime: 745087741 nsec, audio time 750000000 nsec, systime delta -4912259 | ||
191 | playback: systime: 870037336 nsec, audio time 875000000 nsec, systime delta -4962664 | ||
192 | |||
193 | Example 4: DMA timestamp, compensation for delay, delay of ~1ms | ||
194 | $ ./audio_time -p -Dhw:1 -t1 -d | ||
195 | playback: systime: 120190520 nsec, audio time 120000000 nsec, systime delta 190520 | ||
196 | playback: systime: 245036740 nsec, audio time 244000000 nsec, systime delta 1036740 | ||
197 | playback: systime: 370034081 nsec, audio time 369000000 nsec, systime delta 1034081 | ||
198 | playback: systime: 495159907 nsec, audio time 494000000 nsec, systime delta 1159907 | ||
199 | playback: systime: 620098824 nsec, audio time 619000000 nsec, systime delta 1098824 | ||
200 | playback: systime: 745031847 nsec, audio time 744000000 nsec, systime delta 1031847 | ||
diff --git a/Documentation/spi/spi-summary b/Documentation/spi/spi-summary index d29734bff28c..d1824b399b2d 100644 --- a/Documentation/spi/spi-summary +++ b/Documentation/spi/spi-summary | |||
@@ -342,12 +342,11 @@ SPI protocol drivers somewhat resemble platform device drivers: | |||
342 | .driver = { | 342 | .driver = { |
343 | .name = "CHIP", | 343 | .name = "CHIP", |
344 | .owner = THIS_MODULE, | 344 | .owner = THIS_MODULE, |
345 | .pm = &CHIP_pm_ops, | ||
345 | }, | 346 | }, |
346 | 347 | ||
347 | .probe = CHIP_probe, | 348 | .probe = CHIP_probe, |
348 | .remove = CHIP_remove, | 349 | .remove = CHIP_remove, |
349 | .suspend = CHIP_suspend, | ||
350 | .resume = CHIP_resume, | ||
351 | }; | 350 | }; |
352 | 351 | ||
353 | The driver core will automatically attempt to bind this driver to any SPI | 352 | The driver core will automatically attempt to bind this driver to any SPI |
diff --git a/Documentation/spi/spidev_test.c b/Documentation/spi/spidev_test.c index 3a2f9d59edab..135b3f592b83 100644 --- a/Documentation/spi/spidev_test.c +++ b/Documentation/spi/spidev_test.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <unistd.h> | 15 | #include <unistd.h> |
16 | #include <stdio.h> | 16 | #include <stdio.h> |
17 | #include <stdlib.h> | 17 | #include <stdlib.h> |
18 | #include <string.h> | ||
18 | #include <getopt.h> | 19 | #include <getopt.h> |
19 | #include <fcntl.h> | 20 | #include <fcntl.h> |
20 | #include <sys/ioctl.h> | 21 | #include <sys/ioctl.h> |
@@ -34,24 +35,79 @@ static uint32_t mode; | |||
34 | static uint8_t bits = 8; | 35 | static uint8_t bits = 8; |
35 | static uint32_t speed = 500000; | 36 | static uint32_t speed = 500000; |
36 | static uint16_t delay; | 37 | static uint16_t delay; |
38 | static int verbose; | ||
37 | 39 | ||
38 | static void transfer(int fd) | 40 | uint8_t default_tx[] = { |
41 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
42 | 0x40, 0x00, 0x00, 0x00, 0x00, 0x95, | ||
43 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
44 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
45 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
46 | 0xF0, 0x0D, | ||
47 | }; | ||
48 | |||
49 | uint8_t default_rx[ARRAY_SIZE(default_tx)] = {0, }; | ||
50 | char *input_tx; | ||
51 | |||
52 | static void hex_dump(const void *src, size_t length, size_t line_size, char *prefix) | ||
53 | { | ||
54 | int i = 0; | ||
55 | const unsigned char *address = src; | ||
56 | const unsigned char *line = address; | ||
57 | unsigned char c; | ||
58 | |||
59 | printf("%s | ", prefix); | ||
60 | while (length-- > 0) { | ||
61 | printf("%02X ", *address++); | ||
62 | if (!(++i % line_size) || (length == 0 && i % line_size)) { | ||
63 | if (length == 0) { | ||
64 | while (i++ % line_size) | ||
65 | printf("__ "); | ||
66 | } | ||
67 | printf(" | "); /* right close */ | ||
68 | while (line < address) { | ||
69 | c = *line++; | ||
70 | printf("%c", (c < 33 || c == 255) ? 0x2E : c); | ||
71 | } | ||
72 | printf("\n"); | ||
73 | if (length > 0) | ||
74 | printf("%s | ", prefix); | ||
75 | } | ||
76 | } | ||
77 | } | ||
78 | |||
79 | /* | ||
80 | * Unescape - process hexadecimal escape character | ||
81 | * converts shell input "\x23" -> 0x23 | ||
82 | */ | ||
83 | static int unescape(char *_dst, char *_src, size_t len) | ||
84 | { | ||
85 | int ret = 0; | ||
86 | char *src = _src; | ||
87 | char *dst = _dst; | ||
88 | unsigned int ch; | ||
89 | |||
90 | while (*src) { | ||
91 | if (*src == '\\' && *(src+1) == 'x') { | ||
92 | sscanf(src + 2, "%2x", &ch); | ||
93 | src += 4; | ||
94 | *dst++ = (unsigned char)ch; | ||
95 | } else { | ||
96 | *dst++ = *src++; | ||
97 | } | ||
98 | ret++; | ||
99 | } | ||
100 | return ret; | ||
101 | } | ||
102 | |||
103 | static void transfer(int fd, uint8_t const *tx, uint8_t const *rx, size_t len) | ||
39 | { | 104 | { |
40 | int ret; | 105 | int ret; |
41 | uint8_t tx[] = { | 106 | |
42 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
43 | 0x40, 0x00, 0x00, 0x00, 0x00, 0x95, | ||
44 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
45 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
46 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
47 | 0xDE, 0xAD, 0xBE, 0xEF, 0xBA, 0xAD, | ||
48 | 0xF0, 0x0D, | ||
49 | }; | ||
50 | uint8_t rx[ARRAY_SIZE(tx)] = {0, }; | ||
51 | struct spi_ioc_transfer tr = { | 107 | struct spi_ioc_transfer tr = { |
52 | .tx_buf = (unsigned long)tx, | 108 | .tx_buf = (unsigned long)tx, |
53 | .rx_buf = (unsigned long)rx, | 109 | .rx_buf = (unsigned long)rx, |
54 | .len = ARRAY_SIZE(tx), | 110 | .len = len, |
55 | .delay_usecs = delay, | 111 | .delay_usecs = delay, |
56 | .speed_hz = speed, | 112 | .speed_hz = speed, |
57 | .bits_per_word = bits, | 113 | .bits_per_word = bits, |
@@ -76,12 +132,9 @@ static void transfer(int fd) | |||
76 | if (ret < 1) | 132 | if (ret < 1) |
77 | pabort("can't send spi message"); | 133 | pabort("can't send spi message"); |
78 | 134 | ||
79 | for (ret = 0; ret < ARRAY_SIZE(tx); ret++) { | 135 | if (verbose) |
80 | if (!(ret % 6)) | 136 | hex_dump(tx, len, 32, "TX"); |
81 | puts(""); | 137 | hex_dump(rx, len, 32, "RX"); |
82 | printf("%.2X ", rx[ret]); | ||
83 | } | ||
84 | puts(""); | ||
85 | } | 138 | } |
86 | 139 | ||
87 | static void print_usage(const char *prog) | 140 | static void print_usage(const char *prog) |
@@ -97,6 +150,8 @@ static void print_usage(const char *prog) | |||
97 | " -L --lsb least significant bit first\n" | 150 | " -L --lsb least significant bit first\n" |
98 | " -C --cs-high chip select active high\n" | 151 | " -C --cs-high chip select active high\n" |
99 | " -3 --3wire SI/SO signals shared\n" | 152 | " -3 --3wire SI/SO signals shared\n" |
153 | " -v --verbose Verbose (show tx buffer)\n" | ||
154 | " -p Send data (e.g. \"1234\\xde\\xad\")\n" | ||
100 | " -N --no-cs no chip select\n" | 155 | " -N --no-cs no chip select\n" |
101 | " -R --ready slave pulls low to pause\n" | 156 | " -R --ready slave pulls low to pause\n" |
102 | " -2 --dual dual transfer\n" | 157 | " -2 --dual dual transfer\n" |
@@ -121,12 +176,13 @@ static void parse_opts(int argc, char *argv[]) | |||
121 | { "no-cs", 0, 0, 'N' }, | 176 | { "no-cs", 0, 0, 'N' }, |
122 | { "ready", 0, 0, 'R' }, | 177 | { "ready", 0, 0, 'R' }, |
123 | { "dual", 0, 0, '2' }, | 178 | { "dual", 0, 0, '2' }, |
179 | { "verbose", 0, 0, 'v' }, | ||
124 | { "quad", 0, 0, '4' }, | 180 | { "quad", 0, 0, '4' }, |
125 | { NULL, 0, 0, 0 }, | 181 | { NULL, 0, 0, 0 }, |
126 | }; | 182 | }; |
127 | int c; | 183 | int c; |
128 | 184 | ||
129 | c = getopt_long(argc, argv, "D:s:d:b:lHOLC3NR24", lopts, NULL); | 185 | c = getopt_long(argc, argv, "D:s:d:b:lHOLC3NR24p:v", lopts, NULL); |
130 | 186 | ||
131 | if (c == -1) | 187 | if (c == -1) |
132 | break; | 188 | break; |
@@ -165,9 +221,15 @@ static void parse_opts(int argc, char *argv[]) | |||
165 | case 'N': | 221 | case 'N': |
166 | mode |= SPI_NO_CS; | 222 | mode |= SPI_NO_CS; |
167 | break; | 223 | break; |
224 | case 'v': | ||
225 | verbose = 1; | ||
226 | break; | ||
168 | case 'R': | 227 | case 'R': |
169 | mode |= SPI_READY; | 228 | mode |= SPI_READY; |
170 | break; | 229 | break; |
230 | case 'p': | ||
231 | input_tx = optarg; | ||
232 | break; | ||
171 | case '2': | 233 | case '2': |
172 | mode |= SPI_TX_DUAL; | 234 | mode |= SPI_TX_DUAL; |
173 | break; | 235 | break; |
@@ -191,6 +253,9 @@ int main(int argc, char *argv[]) | |||
191 | { | 253 | { |
192 | int ret = 0; | 254 | int ret = 0; |
193 | int fd; | 255 | int fd; |
256 | uint8_t *tx; | ||
257 | uint8_t *rx; | ||
258 | int size; | ||
194 | 259 | ||
195 | parse_opts(argc, argv); | 260 | parse_opts(argc, argv); |
196 | 261 | ||
@@ -235,7 +300,17 @@ int main(int argc, char *argv[]) | |||
235 | printf("bits per word: %d\n", bits); | 300 | printf("bits per word: %d\n", bits); |
236 | printf("max speed: %d Hz (%d KHz)\n", speed, speed/1000); | 301 | printf("max speed: %d Hz (%d KHz)\n", speed, speed/1000); |
237 | 302 | ||
238 | transfer(fd); | 303 | if (input_tx) { |
304 | size = strlen(input_tx+1); | ||
305 | tx = malloc(size); | ||
306 | rx = malloc(size); | ||
307 | size = unescape((char *)tx, input_tx, size); | ||
308 | transfer(fd, tx, rx, size); | ||
309 | free(rx); | ||
310 | free(tx); | ||
311 | } else { | ||
312 | transfer(fd, default_tx, default_rx, sizeof(default_tx)); | ||
313 | } | ||
239 | 314 | ||
240 | close(fd); | 315 | close(fd); |
241 | 316 | ||
diff --git a/Documentation/stable_kernel_rules.txt b/Documentation/stable_kernel_rules.txt index 02f8331edb8b..58d0ac4df946 100644 --- a/Documentation/stable_kernel_rules.txt +++ b/Documentation/stable_kernel_rules.txt | |||
@@ -81,6 +81,16 @@ format in the sign-off area: | |||
81 | git cherry-pick fd21073 | 81 | git cherry-pick fd21073 |
82 | git cherry-pick <this commit> | 82 | git cherry-pick <this commit> |
83 | 83 | ||
84 | Also, some patches may have kernel version prerequisites. This can be | ||
85 | specified in the following format in the sign-off area: | ||
86 | |||
87 | Cc: <stable@vger.kernel.org> # 3.3.x- | ||
88 | |||
89 | The tag has the meaning of: | ||
90 | git cherry-pick <this commit> | ||
91 | |||
92 | For each "-stable" tree starting with the specified version. | ||
93 | |||
84 | Following the submission: | 94 | Following the submission: |
85 | 95 | ||
86 | - The sender will receive an ACK when the patch has been accepted into the | 96 | - The sender will receive an ACK when the patch has been accepted into the |
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index 83ab25660fc9..c831001c45f1 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt | |||
@@ -77,12 +77,14 @@ show up in /proc/sys/kernel: | |||
77 | - shmmax [ sysv ipc ] | 77 | - shmmax [ sysv ipc ] |
78 | - shmmni | 78 | - shmmni |
79 | - softlockup_all_cpu_backtrace | 79 | - softlockup_all_cpu_backtrace |
80 | - soft_watchdog | ||
80 | - stop-a [ SPARC only ] | 81 | - stop-a [ SPARC only ] |
81 | - sysrq ==> Documentation/sysrq.txt | 82 | - sysrq ==> Documentation/sysrq.txt |
82 | - sysctl_writes_strict | 83 | - sysctl_writes_strict |
83 | - tainted | 84 | - tainted |
84 | - threads-max | 85 | - threads-max |
85 | - unknown_nmi_panic | 86 | - unknown_nmi_panic |
87 | - watchdog | ||
86 | - watchdog_thresh | 88 | - watchdog_thresh |
87 | - version | 89 | - version |
88 | 90 | ||
@@ -417,16 +419,23 @@ successful IPC object allocation. | |||
417 | 419 | ||
418 | nmi_watchdog: | 420 | nmi_watchdog: |
419 | 421 | ||
420 | Enables/Disables the NMI watchdog on x86 systems. When the value is | 422 | This parameter can be used to control the NMI watchdog |
421 | non-zero the NMI watchdog is enabled and will continuously test all | 423 | (i.e. the hard lockup detector) on x86 systems. |
422 | online cpus to determine whether or not they are still functioning | ||
423 | properly. Currently, passing "nmi_watchdog=" parameter at boot time is | ||
424 | required for this function to work. | ||
425 | 424 | ||
426 | If LAPIC NMI watchdog method is in use (nmi_watchdog=2 kernel | 425 | 0 - disable the hard lockup detector |
427 | parameter), the NMI watchdog shares registers with oprofile. By | 426 | 1 - enable the hard lockup detector |
428 | disabling the NMI watchdog, oprofile may have more registers to | 427 | |
429 | utilize. | 428 | The hard lockup detector monitors each CPU for its ability to respond to |
429 | timer interrupts. The mechanism utilizes CPU performance counter registers | ||
430 | that are programmed to generate Non-Maskable Interrupts (NMIs) periodically | ||
431 | while a CPU is busy. Hence, the alternative name 'NMI watchdog'. | ||
432 | |||
433 | The NMI watchdog is disabled by default if the kernel is running as a guest | ||
434 | in a KVM virtual machine. This default can be overridden by adding | ||
435 | |||
436 | nmi_watchdog=1 | ||
437 | |||
438 | to the guest kernel command line (see Documentation/kernel-parameters.txt). | ||
430 | 439 | ||
431 | ============================================================== | 440 | ============================================================== |
432 | 441 | ||
@@ -816,6 +825,22 @@ NMI. | |||
816 | 825 | ||
817 | ============================================================== | 826 | ============================================================== |
818 | 827 | ||
828 | soft_watchdog | ||
829 | |||
830 | This parameter can be used to control the soft lockup detector. | ||
831 | |||
832 | 0 - disable the soft lockup detector | ||
833 | 1 - enable the soft lockup detector | ||
834 | |||
835 | The soft lockup detector monitors CPUs for threads that are hogging the CPUs | ||
836 | without rescheduling voluntarily, and thus prevent the 'watchdog/N' threads | ||
837 | from running. The mechanism depends on the CPUs ability to respond to timer | ||
838 | interrupts which are needed for the 'watchdog/N' threads to be woken up by | ||
839 | the watchdog timer function, otherwise the NMI watchdog - if enabled - can | ||
840 | detect a hard lockup condition. | ||
841 | |||
842 | ============================================================== | ||
843 | |||
819 | tainted: | 844 | tainted: |
820 | 845 | ||
821 | Non-zero if the kernel has been tainted. Numeric values, which | 846 | Non-zero if the kernel has been tainted. Numeric values, which |
@@ -847,6 +872,27 @@ can be ORed together: | |||
847 | 872 | ||
848 | ============================================================== | 873 | ============================================================== |
849 | 874 | ||
875 | threads-max | ||
876 | |||
877 | This value controls the maximum number of threads that can be created | ||
878 | using fork(). | ||
879 | |||
880 | During initialization the kernel sets this value such that even if the | ||
881 | maximum number of threads is created, the thread structures occupy only | ||
882 | a part (1/8th) of the available RAM pages. | ||
883 | |||
884 | The minimum value that can be written to threads-max is 20. | ||
885 | The maximum value that can be written to threads-max is given by the | ||
886 | constant FUTEX_TID_MASK (0x3fffffff). | ||
887 | If a value outside of this range is written to threads-max an error | ||
888 | EINVAL occurs. | ||
889 | |||
890 | The value written is checked against the available RAM pages. If the | ||
891 | thread structures would occupy too much (more than 1/8th) of the | ||
892 | available RAM pages threads-max is reduced accordingly. | ||
893 | |||
894 | ============================================================== | ||
895 | |||
850 | unknown_nmi_panic: | 896 | unknown_nmi_panic: |
851 | 897 | ||
852 | The value in this file affects behavior of handling NMI. When the | 898 | The value in this file affects behavior of handling NMI. When the |
@@ -858,6 +904,25 @@ example. If a system hangs up, try pressing the NMI switch. | |||
858 | 904 | ||
859 | ============================================================== | 905 | ============================================================== |
860 | 906 | ||
907 | watchdog: | ||
908 | |||
909 | This parameter can be used to disable or enable the soft lockup detector | ||
910 | _and_ the NMI watchdog (i.e. the hard lockup detector) at the same time. | ||
911 | |||
912 | 0 - disable both lockup detectors | ||
913 | 1 - enable both lockup detectors | ||
914 | |||
915 | The soft lockup detector and the NMI watchdog can also be disabled or | ||
916 | enabled individually, using the soft_watchdog and nmi_watchdog parameters. | ||
917 | If the watchdog parameter is read, for example by executing | ||
918 | |||
919 | cat /proc/sys/kernel/watchdog | ||
920 | |||
921 | the output of this command (0 or 1) shows the logical OR of soft_watchdog | ||
922 | and nmi_watchdog. | ||
923 | |||
924 | ============================================================== | ||
925 | |||
861 | watchdog_thresh: | 926 | watchdog_thresh: |
862 | 927 | ||
863 | This value can be used to control the frequency of hrtimer and NMI | 928 | This value can be used to control the frequency of hrtimer and NMI |
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index 902b4574acfb..9832ec52f859 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt | |||
@@ -21,6 +21,7 @@ Currently, these files are in /proc/sys/vm: | |||
21 | - admin_reserve_kbytes | 21 | - admin_reserve_kbytes |
22 | - block_dump | 22 | - block_dump |
23 | - compact_memory | 23 | - compact_memory |
24 | - compact_unevictable_allowed | ||
24 | - dirty_background_bytes | 25 | - dirty_background_bytes |
25 | - dirty_background_ratio | 26 | - dirty_background_ratio |
26 | - dirty_bytes | 27 | - dirty_bytes |
@@ -106,6 +107,16 @@ huge pages although processes will also directly compact memory as required. | |||
106 | 107 | ||
107 | ============================================================== | 108 | ============================================================== |
108 | 109 | ||
110 | compact_unevictable_allowed | ||
111 | |||
112 | Available only when CONFIG_COMPACTION is set. When set to 1, compaction is | ||
113 | allowed to examine the unevictable lru (mlocked pages) for pages to compact. | ||
114 | This should be used on systems where stalls for minor page faults are an | ||
115 | acceptable trade for large contiguous free memory. Set to 0 to prevent | ||
116 | compaction from moving pages that are unevictable. Default value is 1. | ||
117 | |||
118 | ============================================================== | ||
119 | |||
109 | dirty_background_bytes | 120 | dirty_background_bytes |
110 | 121 | ||
111 | Contains the amount of dirty memory at which the background kernel | 122 | Contains the amount of dirty memory at which the background kernel |
diff --git a/Documentation/timers/NO_HZ.txt b/Documentation/timers/NO_HZ.txt index cca122f25120..6eaf576294f3 100644 --- a/Documentation/timers/NO_HZ.txt +++ b/Documentation/timers/NO_HZ.txt | |||
@@ -158,13 +158,9 @@ not come for free: | |||
158 | to the need to inform kernel subsystems (such as RCU) about | 158 | to the need to inform kernel subsystems (such as RCU) about |
159 | the change in mode. | 159 | the change in mode. |
160 | 160 | ||
161 | 3. POSIX CPU timers on adaptive-tick CPUs may miss their deadlines | 161 | 3. POSIX CPU timers prevent CPUs from entering adaptive-tick mode. |
162 | (perhaps indefinitely) because they currently rely on | 162 | Real-time applications needing to take actions based on CPU time |
163 | scheduling-tick interrupts. This will likely be fixed in | 163 | consumption need to use other means of doing so. |
164 | one of two ways: (1) Prevent CPUs with POSIX CPU timers from | ||
165 | entering adaptive-tick mode, or (2) Use hrtimers or other | ||
166 | adaptive-ticks-immune mechanism to cause the POSIX CPU timer to | ||
167 | fire properly. | ||
168 | 164 | ||
169 | 4. If there are more perf events pending than the hardware can | 165 | 4. If there are more perf events pending than the hardware can |
170 | accommodate, they are normally round-robined so as to collect | 166 | accommodate, they are normally round-robined so as to collect |
diff --git a/Documentation/usb/chipidea.txt b/Documentation/usb/chipidea.txt index 995c8bca40e2..3f848c1f2940 100644 --- a/Documentation/usb/chipidea.txt +++ b/Documentation/usb/chipidea.txt | |||
@@ -69,3 +69,24 @@ cat /sys/kernel/debug/ci_hdrc.0/registers | |||
69 | ---------------------- | 69 | ---------------------- |
70 | "On-The-Go and Embedded Host Supplement to the USB Revision 2.0 Specification | 70 | "On-The-Go and Embedded Host Supplement to the USB Revision 2.0 Specification |
71 | July 27, 2012 Revision 2.0 version 1.1a" | 71 | July 27, 2012 Revision 2.0 version 1.1a" |
72 | |||
73 | 2. How to enable USB as system wakeup source | ||
74 | ----------------------------------- | ||
75 | Below is the example for how to enable USB as system wakeup source | ||
76 | at imx6 platform. | ||
77 | |||
78 | 2.1 Enable core's wakeup | ||
79 | echo enabled > /sys/bus/platform/devices/ci_hdrc.0/power/wakeup | ||
80 | 2.2 Enable glue layer's wakeup | ||
81 | echo enabled > /sys/bus/platform/devices/2184000.usb/power/wakeup | ||
82 | 2.3 Enable PHY's wakeup (optional) | ||
83 | echo enabled > /sys/bus/platform/devices/20c9000.usbphy/power/wakeup | ||
84 | 2.4 Enable roothub's wakeup | ||
85 | echo enabled > /sys/bus/usb/devices/usb1/power/wakeup | ||
86 | 2.5 Enable related device's wakeup | ||
87 | echo enabled > /sys/bus/usb/devices/1-1/power/wakeup | ||
88 | |||
89 | If the system has only one usb port, and you want usb wakeup at this port, you | ||
90 | can use below script to enable usb wakeup. | ||
91 | for i in $(find /sys -name wakeup | grep usb);do echo enabled > $i;done; | ||
92 | |||
diff --git a/Documentation/usb/gadget-testing.txt b/Documentation/usb/gadget-testing.txt index 076ac7ba7f93..f45b2bf4b41d 100644 --- a/Documentation/usb/gadget-testing.txt +++ b/Documentation/usb/gadget-testing.txt | |||
@@ -19,6 +19,7 @@ provided by gadgets. | |||
19 | 16. UAC1 function | 19 | 16. UAC1 function |
20 | 17. UAC2 function | 20 | 17. UAC2 function |
21 | 18. UVC function | 21 | 18. UVC function |
22 | 19. PRINTER function | ||
22 | 23 | ||
23 | 24 | ||
24 | 1. ACM function | 25 | 1. ACM function |
@@ -726,3 +727,49 @@ with these patches: | |||
726 | http://www.spinics.net/lists/linux-usb/msg99220.html | 727 | http://www.spinics.net/lists/linux-usb/msg99220.html |
727 | 728 | ||
728 | host: luvcview -f yuv | 729 | host: luvcview -f yuv |
730 | |||
731 | 19. PRINTER function | ||
732 | ==================== | ||
733 | |||
734 | The function is provided by usb_f_printer.ko module. | ||
735 | |||
736 | Function-specific configfs interface | ||
737 | ------------------------------------ | ||
738 | |||
739 | The function name to use when creating the function directory is "printer". | ||
740 | The printer function provides these attributes in its function directory: | ||
741 | |||
742 | pnp_string - Data to be passed to the host in pnp string | ||
743 | q_len - Number of requests per endpoint | ||
744 | |||
745 | Testing the PRINTER function | ||
746 | ---------------------------- | ||
747 | |||
748 | The most basic testing: | ||
749 | |||
750 | device: run the gadget | ||
751 | # ls -l /devices/virtual/usb_printer_gadget/ | ||
752 | |||
753 | should show g_printer<number>. | ||
754 | |||
755 | If udev is active, then /dev/g_printer<number> should appear automatically. | ||
756 | |||
757 | host: | ||
758 | |||
759 | If udev is active, then e.g. /dev/usb/lp0 should appear. | ||
760 | |||
761 | host->device transmission: | ||
762 | |||
763 | device: | ||
764 | # cat /dev/g_printer<number> | ||
765 | host: | ||
766 | # cat > /dev/usb/lp0 | ||
767 | |||
768 | device->host transmission: | ||
769 | |||
770 | # cat > /dev/g_printer<number> | ||
771 | host: | ||
772 | # cat /dev/usb/lp0 | ||
773 | |||
774 | More advanced testing can be done with the prn_example | ||
775 | described in Documentation/usb/gadget-printer.txt. | ||
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index b112efc816f1..bc9f6fe44e27 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt | |||
@@ -997,7 +997,7 @@ for vm-wide capabilities. | |||
997 | 4.38 KVM_GET_MP_STATE | 997 | 4.38 KVM_GET_MP_STATE |
998 | 998 | ||
999 | Capability: KVM_CAP_MP_STATE | 999 | Capability: KVM_CAP_MP_STATE |
1000 | Architectures: x86, s390 | 1000 | Architectures: x86, s390, arm, arm64 |
1001 | Type: vcpu ioctl | 1001 | Type: vcpu ioctl |
1002 | Parameters: struct kvm_mp_state (out) | 1002 | Parameters: struct kvm_mp_state (out) |
1003 | Returns: 0 on success; -1 on error | 1003 | Returns: 0 on success; -1 on error |
@@ -1011,7 +1011,7 @@ uniprocessor guests). | |||
1011 | 1011 | ||
1012 | Possible values are: | 1012 | Possible values are: |
1013 | 1013 | ||
1014 | - KVM_MP_STATE_RUNNABLE: the vcpu is currently running [x86] | 1014 | - KVM_MP_STATE_RUNNABLE: the vcpu is currently running [x86,arm/arm64] |
1015 | - KVM_MP_STATE_UNINITIALIZED: the vcpu is an application processor (AP) | 1015 | - KVM_MP_STATE_UNINITIALIZED: the vcpu is an application processor (AP) |
1016 | which has not yet received an INIT signal [x86] | 1016 | which has not yet received an INIT signal [x86] |
1017 | - KVM_MP_STATE_INIT_RECEIVED: the vcpu has received an INIT signal, and is | 1017 | - KVM_MP_STATE_INIT_RECEIVED: the vcpu has received an INIT signal, and is |
@@ -1020,7 +1020,7 @@ Possible values are: | |||
1020 | is waiting for an interrupt [x86] | 1020 | is waiting for an interrupt [x86] |
1021 | - KVM_MP_STATE_SIPI_RECEIVED: the vcpu has just received a SIPI (vector | 1021 | - KVM_MP_STATE_SIPI_RECEIVED: the vcpu has just received a SIPI (vector |
1022 | accessible via KVM_GET_VCPU_EVENTS) [x86] | 1022 | accessible via KVM_GET_VCPU_EVENTS) [x86] |
1023 | - KVM_MP_STATE_STOPPED: the vcpu is stopped [s390] | 1023 | - KVM_MP_STATE_STOPPED: the vcpu is stopped [s390,arm/arm64] |
1024 | - KVM_MP_STATE_CHECK_STOP: the vcpu is in a special error state [s390] | 1024 | - KVM_MP_STATE_CHECK_STOP: the vcpu is in a special error state [s390] |
1025 | - KVM_MP_STATE_OPERATING: the vcpu is operating (running or halted) | 1025 | - KVM_MP_STATE_OPERATING: the vcpu is operating (running or halted) |
1026 | [s390] | 1026 | [s390] |
@@ -1031,11 +1031,15 @@ On x86, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an | |||
1031 | in-kernel irqchip, the multiprocessing state must be maintained by userspace on | 1031 | in-kernel irqchip, the multiprocessing state must be maintained by userspace on |
1032 | these architectures. | 1032 | these architectures. |
1033 | 1033 | ||
1034 | For arm/arm64: | ||
1035 | |||
1036 | The only states that are valid are KVM_MP_STATE_STOPPED and | ||
1037 | KVM_MP_STATE_RUNNABLE which reflect if the vcpu is paused or not. | ||
1034 | 1038 | ||
1035 | 4.39 KVM_SET_MP_STATE | 1039 | 4.39 KVM_SET_MP_STATE |
1036 | 1040 | ||
1037 | Capability: KVM_CAP_MP_STATE | 1041 | Capability: KVM_CAP_MP_STATE |
1038 | Architectures: x86, s390 | 1042 | Architectures: x86, s390, arm, arm64 |
1039 | Type: vcpu ioctl | 1043 | Type: vcpu ioctl |
1040 | Parameters: struct kvm_mp_state (in) | 1044 | Parameters: struct kvm_mp_state (in) |
1041 | Returns: 0 on success; -1 on error | 1045 | Returns: 0 on success; -1 on error |
@@ -1047,6 +1051,10 @@ On x86, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an | |||
1047 | in-kernel irqchip, the multiprocessing state must be maintained by userspace on | 1051 | in-kernel irqchip, the multiprocessing state must be maintained by userspace on |
1048 | these architectures. | 1052 | these architectures. |
1049 | 1053 | ||
1054 | For arm/arm64: | ||
1055 | |||
1056 | The only states that are valid are KVM_MP_STATE_STOPPED and | ||
1057 | KVM_MP_STATE_RUNNABLE which reflect if the vcpu should be paused or not. | ||
1050 | 1058 | ||
1051 | 4.40 KVM_SET_IDENTITY_MAP_ADDR | 1059 | 4.40 KVM_SET_IDENTITY_MAP_ADDR |
1052 | 1060 | ||
@@ -1967,15 +1975,25 @@ registers, find a list below: | |||
1967 | MIPS | KVM_REG_MIPS_CP0_STATUS | 32 | 1975 | MIPS | KVM_REG_MIPS_CP0_STATUS | 32 |
1968 | MIPS | KVM_REG_MIPS_CP0_CAUSE | 32 | 1976 | MIPS | KVM_REG_MIPS_CP0_CAUSE | 32 |
1969 | MIPS | KVM_REG_MIPS_CP0_EPC | 64 | 1977 | MIPS | KVM_REG_MIPS_CP0_EPC | 64 |
1978 | MIPS | KVM_REG_MIPS_CP0_PRID | 32 | ||
1970 | MIPS | KVM_REG_MIPS_CP0_CONFIG | 32 | 1979 | MIPS | KVM_REG_MIPS_CP0_CONFIG | 32 |
1971 | MIPS | KVM_REG_MIPS_CP0_CONFIG1 | 32 | 1980 | MIPS | KVM_REG_MIPS_CP0_CONFIG1 | 32 |
1972 | MIPS | KVM_REG_MIPS_CP0_CONFIG2 | 32 | 1981 | MIPS | KVM_REG_MIPS_CP0_CONFIG2 | 32 |
1973 | MIPS | KVM_REG_MIPS_CP0_CONFIG3 | 32 | 1982 | MIPS | KVM_REG_MIPS_CP0_CONFIG3 | 32 |
1983 | MIPS | KVM_REG_MIPS_CP0_CONFIG4 | 32 | ||
1984 | MIPS | KVM_REG_MIPS_CP0_CONFIG5 | 32 | ||
1974 | MIPS | KVM_REG_MIPS_CP0_CONFIG7 | 32 | 1985 | MIPS | KVM_REG_MIPS_CP0_CONFIG7 | 32 |
1975 | MIPS | KVM_REG_MIPS_CP0_ERROREPC | 64 | 1986 | MIPS | KVM_REG_MIPS_CP0_ERROREPC | 64 |
1976 | MIPS | KVM_REG_MIPS_COUNT_CTL | 64 | 1987 | MIPS | KVM_REG_MIPS_COUNT_CTL | 64 |
1977 | MIPS | KVM_REG_MIPS_COUNT_RESUME | 64 | 1988 | MIPS | KVM_REG_MIPS_COUNT_RESUME | 64 |
1978 | MIPS | KVM_REG_MIPS_COUNT_HZ | 64 | 1989 | MIPS | KVM_REG_MIPS_COUNT_HZ | 64 |
1990 | MIPS | KVM_REG_MIPS_FPR_32(0..31) | 32 | ||
1991 | MIPS | KVM_REG_MIPS_FPR_64(0..31) | 64 | ||
1992 | MIPS | KVM_REG_MIPS_VEC_128(0..31) | 128 | ||
1993 | MIPS | KVM_REG_MIPS_FCR_IR | 32 | ||
1994 | MIPS | KVM_REG_MIPS_FCR_CSR | 32 | ||
1995 | MIPS | KVM_REG_MIPS_MSA_IR | 32 | ||
1996 | MIPS | KVM_REG_MIPS_MSA_CSR | 32 | ||
1979 | 1997 | ||
1980 | ARM registers are mapped using the lower 32 bits. The upper 16 of that | 1998 | ARM registers are mapped using the lower 32 bits. The upper 16 of that |
1981 | is the register group type, or coprocessor number: | 1999 | is the register group type, or coprocessor number: |
@@ -2029,6 +2047,25 @@ patterns depending on whether they're 32-bit or 64-bit registers: | |||
2029 | MIPS KVM control registers (see above) have the following id bit patterns: | 2047 | MIPS KVM control registers (see above) have the following id bit patterns: |
2030 | 0x7030 0000 0002 <reg:16> | 2048 | 0x7030 0000 0002 <reg:16> |
2031 | 2049 | ||
2050 | MIPS FPU registers (see KVM_REG_MIPS_FPR_{32,64}() above) have the following | ||
2051 | id bit patterns depending on the size of the register being accessed. They are | ||
2052 | always accessed according to the current guest FPU mode (Status.FR and | ||
2053 | Config5.FRE), i.e. as the guest would see them, and they become unpredictable | ||
2054 | if the guest FPU mode is changed. MIPS SIMD Architecture (MSA) vector | ||
2055 | registers (see KVM_REG_MIPS_VEC_128() above) have similar patterns as they | ||
2056 | overlap the FPU registers: | ||
2057 | 0x7020 0000 0003 00 <0:3> <reg:5> (32-bit FPU registers) | ||
2058 | 0x7030 0000 0003 00 <0:3> <reg:5> (64-bit FPU registers) | ||
2059 | 0x7040 0000 0003 00 <0:3> <reg:5> (128-bit MSA vector registers) | ||
2060 | |||
2061 | MIPS FPU control registers (see KVM_REG_MIPS_FCR_{IR,CSR} above) have the | ||
2062 | following id bit patterns: | ||
2063 | 0x7020 0000 0003 01 <0:3> <reg:5> | ||
2064 | |||
2065 | MIPS MSA control registers (see KVM_REG_MIPS_MSA_{IR,CSR} above) have the | ||
2066 | following id bit patterns: | ||
2067 | 0x7020 0000 0003 02 <0:3> <reg:5> | ||
2068 | |||
2032 | 2069 | ||
2033 | 4.69 KVM_GET_ONE_REG | 2070 | 4.69 KVM_GET_ONE_REG |
2034 | 2071 | ||
@@ -2234,7 +2271,7 @@ into the hash PTE second double word). | |||
2234 | 4.75 KVM_IRQFD | 2271 | 4.75 KVM_IRQFD |
2235 | 2272 | ||
2236 | Capability: KVM_CAP_IRQFD | 2273 | Capability: KVM_CAP_IRQFD |
2237 | Architectures: x86 s390 | 2274 | Architectures: x86 s390 arm arm64 |
2238 | Type: vm ioctl | 2275 | Type: vm ioctl |
2239 | Parameters: struct kvm_irqfd (in) | 2276 | Parameters: struct kvm_irqfd (in) |
2240 | Returns: 0 on success, -1 on error | 2277 | Returns: 0 on success, -1 on error |
@@ -2260,6 +2297,10 @@ Note that closing the resamplefd is not sufficient to disable the | |||
2260 | irqfd. The KVM_IRQFD_FLAG_RESAMPLE is only necessary on assignment | 2297 | irqfd. The KVM_IRQFD_FLAG_RESAMPLE is only necessary on assignment |
2261 | and need not be specified with KVM_IRQFD_FLAG_DEASSIGN. | 2298 | and need not be specified with KVM_IRQFD_FLAG_DEASSIGN. |
2262 | 2299 | ||
2300 | On ARM/ARM64, the gsi field in the kvm_irqfd struct specifies the Shared | ||
2301 | Peripheral Interrupt (SPI) index, such that the GIC interrupt ID is | ||
2302 | given by gsi + 32. | ||
2303 | |||
2263 | 4.76 KVM_PPC_ALLOCATE_HTAB | 2304 | 4.76 KVM_PPC_ALLOCATE_HTAB |
2264 | 2305 | ||
2265 | Capability: KVM_CAP_PPC_ALLOC_HTAB | 2306 | Capability: KVM_CAP_PPC_ALLOC_HTAB |
@@ -2716,6 +2757,227 @@ The fields in each entry are defined as follows: | |||
2716 | eax, ebx, ecx, edx: the values returned by the cpuid instruction for | 2757 | eax, ebx, ecx, edx: the values returned by the cpuid instruction for |
2717 | this function/index combination | 2758 | this function/index combination |
2718 | 2759 | ||
2760 | 4.89 KVM_S390_MEM_OP | ||
2761 | |||
2762 | Capability: KVM_CAP_S390_MEM_OP | ||
2763 | Architectures: s390 | ||
2764 | Type: vcpu ioctl | ||
2765 | Parameters: struct kvm_s390_mem_op (in) | ||
2766 | Returns: = 0 on success, | ||
2767 | < 0 on generic error (e.g. -EFAULT or -ENOMEM), | ||
2768 | > 0 if an exception occurred while walking the page tables | ||
2769 | |||
2770 | Read or write data from/to the logical (virtual) memory of a VPCU. | ||
2771 | |||
2772 | Parameters are specified via the following structure: | ||
2773 | |||
2774 | struct kvm_s390_mem_op { | ||
2775 | __u64 gaddr; /* the guest address */ | ||
2776 | __u64 flags; /* flags */ | ||
2777 | __u32 size; /* amount of bytes */ | ||
2778 | __u32 op; /* type of operation */ | ||
2779 | __u64 buf; /* buffer in userspace */ | ||
2780 | __u8 ar; /* the access register number */ | ||
2781 | __u8 reserved[31]; /* should be set to 0 */ | ||
2782 | }; | ||
2783 | |||
2784 | The type of operation is specified in the "op" field. It is either | ||
2785 | KVM_S390_MEMOP_LOGICAL_READ for reading from logical memory space or | ||
2786 | KVM_S390_MEMOP_LOGICAL_WRITE for writing to logical memory space. The | ||
2787 | KVM_S390_MEMOP_F_CHECK_ONLY flag can be set in the "flags" field to check | ||
2788 | whether the corresponding memory access would create an access exception | ||
2789 | (without touching the data in the memory at the destination). In case an | ||
2790 | access exception occurred while walking the MMU tables of the guest, the | ||
2791 | ioctl returns a positive error number to indicate the type of exception. | ||
2792 | This exception is also raised directly at the corresponding VCPU if the | ||
2793 | flag KVM_S390_MEMOP_F_INJECT_EXCEPTION is set in the "flags" field. | ||
2794 | |||
2795 | The start address of the memory region has to be specified in the "gaddr" | ||
2796 | field, and the length of the region in the "size" field. "buf" is the buffer | ||
2797 | supplied by the userspace application where the read data should be written | ||
2798 | to for KVM_S390_MEMOP_LOGICAL_READ, or where the data that should be written | ||
2799 | is stored for a KVM_S390_MEMOP_LOGICAL_WRITE. "buf" is unused and can be NULL | ||
2800 | when KVM_S390_MEMOP_F_CHECK_ONLY is specified. "ar" designates the access | ||
2801 | register number to be used. | ||
2802 | |||
2803 | The "reserved" field is meant for future extensions. It is not used by | ||
2804 | KVM with the currently defined set of flags. | ||
2805 | |||
2806 | 4.90 KVM_S390_GET_SKEYS | ||
2807 | |||
2808 | Capability: KVM_CAP_S390_SKEYS | ||
2809 | Architectures: s390 | ||
2810 | Type: vm ioctl | ||
2811 | Parameters: struct kvm_s390_skeys | ||
2812 | Returns: 0 on success, KVM_S390_GET_KEYS_NONE if guest is not using storage | ||
2813 | keys, negative value on error | ||
2814 | |||
2815 | This ioctl is used to get guest storage key values on the s390 | ||
2816 | architecture. The ioctl takes parameters via the kvm_s390_skeys struct. | ||
2817 | |||
2818 | struct kvm_s390_skeys { | ||
2819 | __u64 start_gfn; | ||
2820 | __u64 count; | ||
2821 | __u64 skeydata_addr; | ||
2822 | __u32 flags; | ||
2823 | __u32 reserved[9]; | ||
2824 | }; | ||
2825 | |||
2826 | The start_gfn field is the number of the first guest frame whose storage keys | ||
2827 | you want to get. | ||
2828 | |||
2829 | The count field is the number of consecutive frames (starting from start_gfn) | ||
2830 | whose storage keys to get. The count field must be at least 1 and the maximum | ||
2831 | allowed value is defined as KVM_S390_SKEYS_ALLOC_MAX. Values outside this range | ||
2832 | will cause the ioctl to return -EINVAL. | ||
2833 | |||
2834 | The skeydata_addr field is the address to a buffer large enough to hold count | ||
2835 | bytes. This buffer will be filled with storage key data by the ioctl. | ||
2836 | |||
2837 | 4.91 KVM_S390_SET_SKEYS | ||
2838 | |||
2839 | Capability: KVM_CAP_S390_SKEYS | ||
2840 | Architectures: s390 | ||
2841 | Type: vm ioctl | ||
2842 | Parameters: struct kvm_s390_skeys | ||
2843 | Returns: 0 on success, negative value on error | ||
2844 | |||
2845 | This ioctl is used to set guest storage key values on the s390 | ||
2846 | architecture. The ioctl takes parameters via the kvm_s390_skeys struct. | ||
2847 | See section on KVM_S390_GET_SKEYS for struct definition. | ||
2848 | |||
2849 | The start_gfn field is the number of the first guest frame whose storage keys | ||
2850 | you want to set. | ||
2851 | |||
2852 | The count field is the number of consecutive frames (starting from start_gfn) | ||
2853 | whose storage keys to get. The count field must be at least 1 and the maximum | ||
2854 | allowed value is defined as KVM_S390_SKEYS_ALLOC_MAX. Values outside this range | ||
2855 | will cause the ioctl to return -EINVAL. | ||
2856 | |||
2857 | The skeydata_addr field is the address to a buffer containing count bytes of | ||
2858 | storage keys. Each byte in the buffer will be set as the storage key for a | ||
2859 | single frame starting at start_gfn for count frames. | ||
2860 | |||
2861 | Note: If any architecturally invalid key value is found in the given data then | ||
2862 | the ioctl will return -EINVAL. | ||
2863 | |||
2864 | 4.92 KVM_S390_IRQ | ||
2865 | |||
2866 | Capability: KVM_CAP_S390_INJECT_IRQ | ||
2867 | Architectures: s390 | ||
2868 | Type: vcpu ioctl | ||
2869 | Parameters: struct kvm_s390_irq (in) | ||
2870 | Returns: 0 on success, -1 on error | ||
2871 | Errors: | ||
2872 | EINVAL: interrupt type is invalid | ||
2873 | type is KVM_S390_SIGP_STOP and flag parameter is invalid value | ||
2874 | type is KVM_S390_INT_EXTERNAL_CALL and code is bigger | ||
2875 | than the maximum of VCPUs | ||
2876 | EBUSY: type is KVM_S390_SIGP_SET_PREFIX and vcpu is not stopped | ||
2877 | type is KVM_S390_SIGP_STOP and a stop irq is already pending | ||
2878 | type is KVM_S390_INT_EXTERNAL_CALL and an external call interrupt | ||
2879 | is already pending | ||
2880 | |||
2881 | Allows to inject an interrupt to the guest. | ||
2882 | |||
2883 | Using struct kvm_s390_irq as a parameter allows | ||
2884 | to inject additional payload which is not | ||
2885 | possible via KVM_S390_INTERRUPT. | ||
2886 | |||
2887 | Interrupt parameters are passed via kvm_s390_irq: | ||
2888 | |||
2889 | struct kvm_s390_irq { | ||
2890 | __u64 type; | ||
2891 | union { | ||
2892 | struct kvm_s390_io_info io; | ||
2893 | struct kvm_s390_ext_info ext; | ||
2894 | struct kvm_s390_pgm_info pgm; | ||
2895 | struct kvm_s390_emerg_info emerg; | ||
2896 | struct kvm_s390_extcall_info extcall; | ||
2897 | struct kvm_s390_prefix_info prefix; | ||
2898 | struct kvm_s390_stop_info stop; | ||
2899 | struct kvm_s390_mchk_info mchk; | ||
2900 | char reserved[64]; | ||
2901 | } u; | ||
2902 | }; | ||
2903 | |||
2904 | type can be one of the following: | ||
2905 | |||
2906 | KVM_S390_SIGP_STOP - sigp stop; parameter in .stop | ||
2907 | KVM_S390_PROGRAM_INT - program check; parameters in .pgm | ||
2908 | KVM_S390_SIGP_SET_PREFIX - sigp set prefix; parameters in .prefix | ||
2909 | KVM_S390_RESTART - restart; no parameters | ||
2910 | KVM_S390_INT_CLOCK_COMP - clock comparator interrupt; no parameters | ||
2911 | KVM_S390_INT_CPU_TIMER - CPU timer interrupt; no parameters | ||
2912 | KVM_S390_INT_EMERGENCY - sigp emergency; parameters in .emerg | ||
2913 | KVM_S390_INT_EXTERNAL_CALL - sigp external call; parameters in .extcall | ||
2914 | KVM_S390_MCHK - machine check interrupt; parameters in .mchk | ||
2915 | |||
2916 | |||
2917 | Note that the vcpu ioctl is asynchronous to vcpu execution. | ||
2918 | |||
2919 | 4.94 KVM_S390_GET_IRQ_STATE | ||
2920 | |||
2921 | Capability: KVM_CAP_S390_IRQ_STATE | ||
2922 | Architectures: s390 | ||
2923 | Type: vcpu ioctl | ||
2924 | Parameters: struct kvm_s390_irq_state (out) | ||
2925 | Returns: >= number of bytes copied into buffer, | ||
2926 | -EINVAL if buffer size is 0, | ||
2927 | -ENOBUFS if buffer size is too small to fit all pending interrupts, | ||
2928 | -EFAULT if the buffer address was invalid | ||
2929 | |||
2930 | This ioctl allows userspace to retrieve the complete state of all currently | ||
2931 | pending interrupts in a single buffer. Use cases include migration | ||
2932 | and introspection. The parameter structure contains the address of a | ||
2933 | userspace buffer and its length: | ||
2934 | |||
2935 | struct kvm_s390_irq_state { | ||
2936 | __u64 buf; | ||
2937 | __u32 flags; | ||
2938 | __u32 len; | ||
2939 | __u32 reserved[4]; | ||
2940 | }; | ||
2941 | |||
2942 | Userspace passes in the above struct and for each pending interrupt a | ||
2943 | struct kvm_s390_irq is copied to the provided buffer. | ||
2944 | |||
2945 | If -ENOBUFS is returned the buffer provided was too small and userspace | ||
2946 | may retry with a bigger buffer. | ||
2947 | |||
2948 | 4.95 KVM_S390_SET_IRQ_STATE | ||
2949 | |||
2950 | Capability: KVM_CAP_S390_IRQ_STATE | ||
2951 | Architectures: s390 | ||
2952 | Type: vcpu ioctl | ||
2953 | Parameters: struct kvm_s390_irq_state (in) | ||
2954 | Returns: 0 on success, | ||
2955 | -EFAULT if the buffer address was invalid, | ||
2956 | -EINVAL for an invalid buffer length (see below), | ||
2957 | -EBUSY if there were already interrupts pending, | ||
2958 | errors occurring when actually injecting the | ||
2959 | interrupt. See KVM_S390_IRQ. | ||
2960 | |||
2961 | This ioctl allows userspace to set the complete state of all cpu-local | ||
2962 | interrupts currently pending for the vcpu. It is intended for restoring | ||
2963 | interrupt state after a migration. The input parameter is a userspace buffer | ||
2964 | containing a struct kvm_s390_irq_state: | ||
2965 | |||
2966 | struct kvm_s390_irq_state { | ||
2967 | __u64 buf; | ||
2968 | __u32 len; | ||
2969 | __u32 pad; | ||
2970 | }; | ||
2971 | |||
2972 | The userspace memory referenced by buf contains a struct kvm_s390_irq | ||
2973 | for each interrupt to be injected into the guest. | ||
2974 | If one of the interrupts could not be injected for some reason the | ||
2975 | ioctl aborts. | ||
2976 | |||
2977 | len must be a multiple of sizeof(struct kvm_s390_irq). It must be > 0 | ||
2978 | and it must not exceed (max_vcpus + 32) * sizeof(struct kvm_s390_irq), | ||
2979 | which is the maximum number of possibly pending cpu-local interrupts. | ||
2980 | |||
2719 | 5. The kvm_run structure | 2981 | 5. The kvm_run structure |
2720 | ------------------------ | 2982 | ------------------------ |
2721 | 2983 | ||
@@ -3189,6 +3451,31 @@ Parameters: none | |||
3189 | This capability enables the in-kernel irqchip for s390. Please refer to | 3451 | This capability enables the in-kernel irqchip for s390. Please refer to |
3190 | "4.24 KVM_CREATE_IRQCHIP" for details. | 3452 | "4.24 KVM_CREATE_IRQCHIP" for details. |
3191 | 3453 | ||
3454 | 6.9 KVM_CAP_MIPS_FPU | ||
3455 | |||
3456 | Architectures: mips | ||
3457 | Target: vcpu | ||
3458 | Parameters: args[0] is reserved for future use (should be 0). | ||
3459 | |||
3460 | This capability allows the use of the host Floating Point Unit by the guest. It | ||
3461 | allows the Config1.FP bit to be set to enable the FPU in the guest. Once this is | ||
3462 | done the KVM_REG_MIPS_FPR_* and KVM_REG_MIPS_FCR_* registers can be accessed | ||
3463 | (depending on the current guest FPU register mode), and the Status.FR, | ||
3464 | Config5.FRE bits are accessible via the KVM API and also from the guest, | ||
3465 | depending on them being supported by the FPU. | ||
3466 | |||
3467 | 6.10 KVM_CAP_MIPS_MSA | ||
3468 | |||
3469 | Architectures: mips | ||
3470 | Target: vcpu | ||
3471 | Parameters: args[0] is reserved for future use (should be 0). | ||
3472 | |||
3473 | This capability allows the use of the MIPS SIMD Architecture (MSA) by the guest. | ||
3474 | It allows the Config3.MSAP bit to be set to enable the use of MSA by the guest. | ||
3475 | Once this is done the KVM_REG_MIPS_VEC_* and KVM_REG_MIPS_MSA_* registers can be | ||
3476 | accessed, and the Config5.MSAEn bit is accessible via the KVM API and also from | ||
3477 | the guest. | ||
3478 | |||
3192 | 7. Capabilities that can be enabled on VMs | 3479 | 7. Capabilities that can be enabled on VMs |
3193 | ------------------------------------------ | 3480 | ------------------------------------------ |
3194 | 3481 | ||
@@ -3248,3 +3535,41 @@ All other orders will be handled completely in user space. | |||
3248 | Only privileged operation exceptions will be checked for in the kernel (or even | 3535 | Only privileged operation exceptions will be checked for in the kernel (or even |
3249 | in the hardware prior to interception). If this capability is not enabled, the | 3536 | in the hardware prior to interception). If this capability is not enabled, the |
3250 | old way of handling SIGP orders is used (partially in kernel and user space). | 3537 | old way of handling SIGP orders is used (partially in kernel and user space). |
3538 | |||
3539 | 7.3 KVM_CAP_S390_VECTOR_REGISTERS | ||
3540 | |||
3541 | Architectures: s390 | ||
3542 | Parameters: none | ||
3543 | Returns: 0 on success, negative value on error | ||
3544 | |||
3545 | Allows use of the vector registers introduced with z13 processor, and | ||
3546 | provides for the synchronization between host and user space. Will | ||
3547 | return -EINVAL if the machine does not support vectors. | ||
3548 | |||
3549 | 7.4 KVM_CAP_S390_USER_STSI | ||
3550 | |||
3551 | Architectures: s390 | ||
3552 | Parameters: none | ||
3553 | |||
3554 | This capability allows post-handlers for the STSI instruction. After | ||
3555 | initial handling in the kernel, KVM exits to user space with | ||
3556 | KVM_EXIT_S390_STSI to allow user space to insert further data. | ||
3557 | |||
3558 | Before exiting to userspace, kvm handlers should fill in s390_stsi field of | ||
3559 | vcpu->run: | ||
3560 | struct { | ||
3561 | __u64 addr; | ||
3562 | __u8 ar; | ||
3563 | __u8 reserved; | ||
3564 | __u8 fc; | ||
3565 | __u8 sel1; | ||
3566 | __u16 sel2; | ||
3567 | } s390_stsi; | ||
3568 | |||
3569 | @addr - guest address of STSI SYSIB | ||
3570 | @fc - function code | ||
3571 | @sel1 - selector 1 | ||
3572 | @sel2 - selector 2 | ||
3573 | @ar - access register number | ||
3574 | |||
3575 | KVM handlers should exit to userspace with rc = -EREMOTE. | ||
diff --git a/Documentation/virtual/kvm/devices/s390_flic.txt b/Documentation/virtual/kvm/devices/s390_flic.txt index 4ceef53164b0..d1ad9d5cae46 100644 --- a/Documentation/virtual/kvm/devices/s390_flic.txt +++ b/Documentation/virtual/kvm/devices/s390_flic.txt | |||
@@ -27,6 +27,9 @@ Groups: | |||
27 | Copies all floating interrupts into a buffer provided by userspace. | 27 | Copies all floating interrupts into a buffer provided by userspace. |
28 | When the buffer is too small it returns -ENOMEM, which is the indication | 28 | When the buffer is too small it returns -ENOMEM, which is the indication |
29 | for userspace to try again with a bigger buffer. | 29 | for userspace to try again with a bigger buffer. |
30 | -ENOBUFS is returned when the allocation of a kernelspace buffer has | ||
31 | failed. | ||
32 | -EFAULT is returned when copying data to userspace failed. | ||
30 | All interrupts remain pending, i.e. are not deleted from the list of | 33 | All interrupts remain pending, i.e. are not deleted from the list of |
31 | currently pending interrupts. | 34 | currently pending interrupts. |
32 | attr->addr contains the userspace address of the buffer into which all | 35 | attr->addr contains the userspace address of the buffer into which all |
diff --git a/Documentation/vm/cleancache.txt b/Documentation/vm/cleancache.txt index 01d76282444e..e4b49df7a048 100644 --- a/Documentation/vm/cleancache.txt +++ b/Documentation/vm/cleancache.txt | |||
@@ -28,9 +28,7 @@ IMPLEMENTATION OVERVIEW | |||
28 | A cleancache "backend" that provides transcendent memory registers itself | 28 | A cleancache "backend" that provides transcendent memory registers itself |
29 | to the kernel's cleancache "frontend" by calling cleancache_register_ops, | 29 | to the kernel's cleancache "frontend" by calling cleancache_register_ops, |
30 | passing a pointer to a cleancache_ops structure with funcs set appropriately. | 30 | passing a pointer to a cleancache_ops structure with funcs set appropriately. |
31 | Note that cleancache_register_ops returns the previous settings so that | 31 | The functions provided must conform to certain semantics as follows: |
32 | chaining can be performed if desired. The functions provided must conform to | ||
33 | certain semantics as follows: | ||
34 | 32 | ||
35 | Most important, cleancache is "ephemeral". Pages which are copied into | 33 | Most important, cleancache is "ephemeral". Pages which are copied into |
36 | cleancache have an indefinite lifetime which is completely unknowable | 34 | cleancache have an indefinite lifetime which is completely unknowable |
diff --git a/Documentation/vm/hugetlbpage.txt b/Documentation/vm/hugetlbpage.txt index f2d3a100fe38..030977fb8d2d 100644 --- a/Documentation/vm/hugetlbpage.txt +++ b/Documentation/vm/hugetlbpage.txt | |||
@@ -267,21 +267,34 @@ call, then it is required that system administrator mount a file system of | |||
267 | type hugetlbfs: | 267 | type hugetlbfs: |
268 | 268 | ||
269 | mount -t hugetlbfs \ | 269 | mount -t hugetlbfs \ |
270 | -o uid=<value>,gid=<value>,mode=<value>,size=<value>,nr_inodes=<value> \ | 270 | -o uid=<value>,gid=<value>,mode=<value>,pagesize=<value>,size=<value>,\ |
271 | none /mnt/huge | 271 | min_size=<value>,nr_inodes=<value> none /mnt/huge |
272 | 272 | ||
273 | This command mounts a (pseudo) filesystem of type hugetlbfs on the directory | 273 | This command mounts a (pseudo) filesystem of type hugetlbfs on the directory |
274 | /mnt/huge. Any files created on /mnt/huge uses huge pages. The uid and gid | 274 | /mnt/huge. Any files created on /mnt/huge uses huge pages. The uid and gid |
275 | options sets the owner and group of the root of the file system. By default | 275 | options sets the owner and group of the root of the file system. By default |
276 | the uid and gid of the current process are taken. The mode option sets the | 276 | the uid and gid of the current process are taken. The mode option sets the |
277 | mode of root of file system to value & 01777. This value is given in octal. | 277 | mode of root of file system to value & 01777. This value is given in octal. |
278 | By default the value 0755 is picked. The size option sets the maximum value of | 278 | By default the value 0755 is picked. If the paltform supports multiple huge |
279 | memory (huge pages) allowed for that filesystem (/mnt/huge). The size is | 279 | page sizes, the pagesize option can be used to specify the huge page size and |
280 | rounded down to HPAGE_SIZE. The option nr_inodes sets the maximum number of | 280 | associated pool. pagesize is specified in bytes. If pagesize is not specified |
281 | inodes that /mnt/huge can use. If the size or nr_inodes option is not | 281 | the paltform's default huge page size and associated pool will be used. The |
282 | provided on command line then no limits are set. For size and nr_inodes | 282 | size option sets the maximum value of memory (huge pages) allowed for that |
283 | options, you can use [G|g]/[M|m]/[K|k] to represent giga/mega/kilo. For | 283 | filesystem (/mnt/huge). The size option can be specified in bytes, or as a |
284 | example, size=2K has the same meaning as size=2048. | 284 | percentage of the specified huge page pool (nr_hugepages). The size is |
285 | rounded down to HPAGE_SIZE boundary. The min_size option sets the minimum | ||
286 | value of memory (huge pages) allowed for the filesystem. min_size can be | ||
287 | specified in the same way as size, either bytes or a percentage of the | ||
288 | huge page pool. At mount time, the number of huge pages specified by | ||
289 | min_size are reserved for use by the filesystem. If there are not enough | ||
290 | free huge pages available, the mount will fail. As huge pages are allocated | ||
291 | to the filesystem and freed, the reserve count is adjusted so that the sum | ||
292 | of allocated and reserved huge pages is always at least min_size. The option | ||
293 | nr_inodes sets the maximum number of inodes that /mnt/huge can use. If the | ||
294 | size, min_size or nr_inodes option is not provided on command line then | ||
295 | no limits are set. For pagesize, size, min_size and nr_inodes options, you | ||
296 | can use [G|g]/[M|m]/[K|k] to represent giga/mega/kilo. For example, size=2K | ||
297 | has the same meaning as size=2048. | ||
285 | 298 | ||
286 | While read system calls are supported on files that reside on hugetlb | 299 | While read system calls are supported on files that reside on hugetlb |
287 | file systems, write system calls are not. | 300 | file systems, write system calls are not. |
@@ -289,15 +302,23 @@ file systems, write system calls are not. | |||
289 | Regular chown, chgrp, and chmod commands (with right permissions) could be | 302 | Regular chown, chgrp, and chmod commands (with right permissions) could be |
290 | used to change the file attributes on hugetlbfs. | 303 | used to change the file attributes on hugetlbfs. |
291 | 304 | ||
292 | Also, it is important to note that no such mount command is required if the | 305 | Also, it is important to note that no such mount command is required if |
293 | applications are going to use only shmat/shmget system calls or mmap with | 306 | applications are going to use only shmat/shmget system calls or mmap with |
294 | MAP_HUGETLB. Users who wish to use hugetlb page via shared memory segment | 307 | MAP_HUGETLB. For an example of how to use mmap with MAP_HUGETLB see map_hugetlb |
295 | should be a member of a supplementary group and system admin needs to | 308 | below. |
296 | configure that gid into /proc/sys/vm/hugetlb_shm_group. It is possible for | 309 | |
297 | same or different applications to use any combination of mmaps and shm* | 310 | Users who wish to use hugetlb memory via shared memory segment should be a |
298 | calls, though the mount of filesystem will be required for using mmap calls | 311 | member of a supplementary group and system admin needs to configure that gid |
299 | without MAP_HUGETLB. For an example of how to use mmap with MAP_HUGETLB see | 312 | into /proc/sys/vm/hugetlb_shm_group. It is possible for same or different |
300 | map_hugetlb.c. | 313 | applications to use any combination of mmaps and shm* calls, though the mount of |
314 | filesystem will be required for using mmap calls without MAP_HUGETLB. | ||
315 | |||
316 | Syscalls that operate on memory backed by hugetlb pages only have their lengths | ||
317 | aligned to the native page size of the processor; they will normally fail with | ||
318 | errno set to EINVAL or exclude hugetlb pages that extend beyond the length if | ||
319 | not hugepage aligned. For example, munmap(2) will fail if memory is backed by | ||
320 | a hugetlb page and the length is smaller than the hugepage size. | ||
321 | |||
301 | 322 | ||
302 | Examples | 323 | Examples |
303 | ======== | 324 | ======== |
diff --git a/Documentation/vm/pagemap.txt b/Documentation/vm/pagemap.txt index 6fbd55ef6b45..6bfbc172cdb9 100644 --- a/Documentation/vm/pagemap.txt +++ b/Documentation/vm/pagemap.txt | |||
@@ -131,7 +131,8 @@ Short descriptions to the page flags: | |||
131 | 13. SWAPCACHE page is mapped to swap space, ie. has an associated swap entry | 131 | 13. SWAPCACHE page is mapped to swap space, ie. has an associated swap entry |
132 | 14. SWAPBACKED page is backed by swap/RAM | 132 | 14. SWAPBACKED page is backed by swap/RAM |
133 | 133 | ||
134 | The page-types tool in this directory can be used to query the above flags. | 134 | The page-types tool in the tools/vm directory can be used to query the |
135 | above flags. | ||
135 | 136 | ||
136 | Using pagemap to do something useful: | 137 | Using pagemap to do something useful: |
137 | 138 | ||
diff --git a/Documentation/vm/transhuge.txt b/Documentation/vm/transhuge.txt index 6b31cfbe2a9a..8143b9e8373d 100644 --- a/Documentation/vm/transhuge.txt +++ b/Documentation/vm/transhuge.txt | |||
@@ -159,6 +159,17 @@ for each pass: | |||
159 | 159 | ||
160 | /sys/kernel/mm/transparent_hugepage/khugepaged/full_scans | 160 | /sys/kernel/mm/transparent_hugepage/khugepaged/full_scans |
161 | 161 | ||
162 | max_ptes_none specifies how many extra small pages (that are | ||
163 | not already mapped) can be allocated when collapsing a group | ||
164 | of small pages into one large page. | ||
165 | |||
166 | /sys/kernel/mm/transparent_hugepage/khugepaged/max_ptes_none | ||
167 | |||
168 | A higher value leads to use additional memory for programs. | ||
169 | A lower value leads to gain less thp performance. Value of | ||
170 | max_ptes_none can waste cpu time very little, you can | ||
171 | ignore it. | ||
172 | |||
162 | == Boot parameter == | 173 | == Boot parameter == |
163 | 174 | ||
164 | You can change the sysfs boot time defaults of Transparent Hugepage | 175 | You can change the sysfs boot time defaults of Transparent Hugepage |
diff --git a/Documentation/vm/unevictable-lru.txt b/Documentation/vm/unevictable-lru.txt index 744f82f86c58..3be0bfc4738d 100644 --- a/Documentation/vm/unevictable-lru.txt +++ b/Documentation/vm/unevictable-lru.txt | |||
@@ -22,6 +22,7 @@ CONTENTS | |||
22 | - Filtering special vmas. | 22 | - Filtering special vmas. |
23 | - munlock()/munlockall() system call handling. | 23 | - munlock()/munlockall() system call handling. |
24 | - Migrating mlocked pages. | 24 | - Migrating mlocked pages. |
25 | - Compacting mlocked pages. | ||
25 | - mmap(MAP_LOCKED) system call handling. | 26 | - mmap(MAP_LOCKED) system call handling. |
26 | - munmap()/exit()/exec() system call handling. | 27 | - munmap()/exit()/exec() system call handling. |
27 | - try_to_unmap(). | 28 | - try_to_unmap(). |
@@ -317,7 +318,7 @@ If the VMA passes some filtering as described in "Filtering Special Vmas" | |||
317 | below, mlock_fixup() will attempt to merge the VMA with its neighbors or split | 318 | below, mlock_fixup() will attempt to merge the VMA with its neighbors or split |
318 | off a subset of the VMA if the range does not cover the entire VMA. Once the | 319 | off a subset of the VMA if the range does not cover the entire VMA. Once the |
319 | VMA has been merged or split or neither, mlock_fixup() will call | 320 | VMA has been merged or split or neither, mlock_fixup() will call |
320 | __mlock_vma_pages_range() to fault in the pages via get_user_pages() and to | 321 | populate_vma_page_range() to fault in the pages via get_user_pages() and to |
321 | mark the pages as mlocked via mlock_vma_page(). | 322 | mark the pages as mlocked via mlock_vma_page(). |
322 | 323 | ||
323 | Note that the VMA being mlocked might be mapped with PROT_NONE. In this case, | 324 | Note that the VMA being mlocked might be mapped with PROT_NONE. In this case, |
@@ -327,7 +328,7 @@ fault path or in vmscan. | |||
327 | 328 | ||
328 | Also note that a page returned by get_user_pages() could be truncated or | 329 | Also note that a page returned by get_user_pages() could be truncated or |
329 | migrated out from under us, while we're trying to mlock it. To detect this, | 330 | migrated out from under us, while we're trying to mlock it. To detect this, |
330 | __mlock_vma_pages_range() checks page_mapping() after acquiring the page lock. | 331 | populate_vma_page_range() checks page_mapping() after acquiring the page lock. |
331 | If the page is still associated with its mapping, we'll go ahead and call | 332 | If the page is still associated with its mapping, we'll go ahead and call |
332 | mlock_vma_page(). If the mapping is gone, we just unlock the page and move on. | 333 | mlock_vma_page(). If the mapping is gone, we just unlock the page and move on. |
333 | In the worst case, this will result in a page mapped in a VM_LOCKED VMA | 334 | In the worst case, this will result in a page mapped in a VM_LOCKED VMA |
@@ -392,7 +393,7 @@ ignored for munlock. | |||
392 | 393 | ||
393 | If the VMA is VM_LOCKED, mlock_fixup() again attempts to merge or split off the | 394 | If the VMA is VM_LOCKED, mlock_fixup() again attempts to merge or split off the |
394 | specified range. The range is then munlocked via the function | 395 | specified range. The range is then munlocked via the function |
395 | __mlock_vma_pages_range() - the same function used to mlock a VMA range - | 396 | populate_vma_page_range() - the same function used to mlock a VMA range - |
396 | passing a flag to indicate that munlock() is being performed. | 397 | passing a flag to indicate that munlock() is being performed. |
397 | 398 | ||
398 | Because the VMA access protections could have been changed to PROT_NONE after | 399 | Because the VMA access protections could have been changed to PROT_NONE after |
@@ -402,7 +403,7 @@ get_user_pages() was enhanced to accept a flag to ignore the permissions when | |||
402 | fetching the pages - all of which should be resident as a result of previous | 403 | fetching the pages - all of which should be resident as a result of previous |
403 | mlocking. | 404 | mlocking. |
404 | 405 | ||
405 | For munlock(), __mlock_vma_pages_range() unlocks individual pages by calling | 406 | For munlock(), populate_vma_page_range() unlocks individual pages by calling |
406 | munlock_vma_page(). munlock_vma_page() unconditionally clears the PG_mlocked | 407 | munlock_vma_page(). munlock_vma_page() unconditionally clears the PG_mlocked |
407 | flag using TestClearPageMlocked(). As with mlock_vma_page(), | 408 | flag using TestClearPageMlocked(). As with mlock_vma_page(), |
408 | munlock_vma_page() use the Test*PageMlocked() function to handle the case where | 409 | munlock_vma_page() use the Test*PageMlocked() function to handle the case where |
@@ -450,6 +451,17 @@ list because of a race between munlock and migration, page migration uses the | |||
450 | putback_lru_page() function to add migrated pages back to the LRU. | 451 | putback_lru_page() function to add migrated pages back to the LRU. |
451 | 452 | ||
452 | 453 | ||
454 | COMPACTING MLOCKED PAGES | ||
455 | ------------------------ | ||
456 | |||
457 | The unevictable LRU can be scanned for compactable regions and the default | ||
458 | behavior is to do so. /proc/sys/vm/compact_unevictable_allowed controls | ||
459 | this behavior (see Documentation/sysctl/vm.txt). Once scanning of the | ||
460 | unevictable LRU is enabled, the work of compaction is mostly handled by | ||
461 | the page migration code and the same work flow as described in MIGRATING | ||
462 | MLOCKED PAGES will apply. | ||
463 | |||
464 | |||
453 | mmap(MAP_LOCKED) SYSTEM CALL HANDLING | 465 | mmap(MAP_LOCKED) SYSTEM CALL HANDLING |
454 | ------------------------------------- | 466 | ------------------------------------- |
455 | 467 | ||
@@ -463,21 +475,11 @@ populate the page table. | |||
463 | 475 | ||
464 | To mlock a range of memory under the unevictable/mlock infrastructure, the | 476 | To mlock a range of memory under the unevictable/mlock infrastructure, the |
465 | mmap() handler and task address space expansion functions call | 477 | mmap() handler and task address space expansion functions call |
466 | mlock_vma_pages_range() specifying the vma and the address range to mlock. | 478 | populate_vma_page_range() specifying the vma and the address range to mlock. |
467 | mlock_vma_pages_range() filters VMAs like mlock_fixup(), as described above in | 479 | |
468 | "Filtering Special VMAs". It will clear the VM_LOCKED flag, which will have | 480 | The callers of populate_vma_page_range() will have already added the memory range |
469 | already been set by the caller, in filtered VMAs. Thus these VMA's need not be | ||
470 | visited for munlock when the region is unmapped. | ||
471 | |||
472 | For "normal" VMAs, mlock_vma_pages_range() calls __mlock_vma_pages_range() to | ||
473 | fault/allocate the pages and mlock them. Again, like mlock_fixup(), | ||
474 | mlock_vma_pages_range() downgrades the mmap semaphore to read mode before | ||
475 | attempting to fault/allocate and mlock the pages and "upgrades" the semaphore | ||
476 | back to write mode before returning. | ||
477 | |||
478 | The callers of mlock_vma_pages_range() will have already added the memory range | ||
479 | to be mlocked to the task's "locked_vm". To account for filtered VMAs, | 481 | to be mlocked to the task's "locked_vm". To account for filtered VMAs, |
480 | mlock_vma_pages_range() returns the number of pages NOT mlocked. All of the | 482 | populate_vma_page_range() returns the number of pages NOT mlocked. All of the |
481 | callers then subtract a non-negative return value from the task's locked_vm. A | 483 | callers then subtract a non-negative return value from the task's locked_vm. A |
482 | negative return value represent an error - for example, from get_user_pages() | 484 | negative return value represent an error - for example, from get_user_pages() |
483 | attempting to fault in a VMA with PROT_NONE access. In this case, we leave the | 485 | attempting to fault in a VMA with PROT_NONE access. In this case, we leave the |
diff --git a/Documentation/vm/zsmalloc.txt b/Documentation/vm/zsmalloc.txt new file mode 100644 index 000000000000..64ed63c4f69d --- /dev/null +++ b/Documentation/vm/zsmalloc.txt | |||
@@ -0,0 +1,70 @@ | |||
1 | zsmalloc | ||
2 | -------- | ||
3 | |||
4 | This allocator is designed for use with zram. Thus, the allocator is | ||
5 | supposed to work well under low memory conditions. In particular, it | ||
6 | never attempts higher order page allocation which is very likely to | ||
7 | fail under memory pressure. On the other hand, if we just use single | ||
8 | (0-order) pages, it would suffer from very high fragmentation -- | ||
9 | any object of size PAGE_SIZE/2 or larger would occupy an entire page. | ||
10 | This was one of the major issues with its predecessor (xvmalloc). | ||
11 | |||
12 | To overcome these issues, zsmalloc allocates a bunch of 0-order pages | ||
13 | and links them together using various 'struct page' fields. These linked | ||
14 | pages act as a single higher-order page i.e. an object can span 0-order | ||
15 | page boundaries. The code refers to these linked pages as a single entity | ||
16 | called zspage. | ||
17 | |||
18 | For simplicity, zsmalloc can only allocate objects of size up to PAGE_SIZE | ||
19 | since this satisfies the requirements of all its current users (in the | ||
20 | worst case, page is incompressible and is thus stored "as-is" i.e. in | ||
21 | uncompressed form). For allocation requests larger than this size, failure | ||
22 | is returned (see zs_malloc). | ||
23 | |||
24 | Additionally, zs_malloc() does not return a dereferenceable pointer. | ||
25 | Instead, it returns an opaque handle (unsigned long) which encodes actual | ||
26 | location of the allocated object. The reason for this indirection is that | ||
27 | zsmalloc does not keep zspages permanently mapped since that would cause | ||
28 | issues on 32-bit systems where the VA region for kernel space mappings | ||
29 | is very small. So, before using the allocating memory, the object has to | ||
30 | be mapped using zs_map_object() to get a usable pointer and subsequently | ||
31 | unmapped using zs_unmap_object(). | ||
32 | |||
33 | stat | ||
34 | ---- | ||
35 | |||
36 | With CONFIG_ZSMALLOC_STAT, we could see zsmalloc internal information via | ||
37 | /sys/kernel/debug/zsmalloc/<user name>. Here is a sample of stat output: | ||
38 | |||
39 | # cat /sys/kernel/debug/zsmalloc/zram0/classes | ||
40 | |||
41 | class size almost_full almost_empty obj_allocated obj_used pages_used pages_per_zspage | ||
42 | .. | ||
43 | .. | ||
44 | 9 176 0 1 186 129 8 4 | ||
45 | 10 192 1 0 2880 2872 135 3 | ||
46 | 11 208 0 1 819 795 42 2 | ||
47 | 12 224 0 1 219 159 12 4 | ||
48 | .. | ||
49 | .. | ||
50 | |||
51 | |||
52 | class: index | ||
53 | size: object size zspage stores | ||
54 | almost_empty: the number of ZS_ALMOST_EMPTY zspages(see below) | ||
55 | almost_full: the number of ZS_ALMOST_FULL zspages(see below) | ||
56 | obj_allocated: the number of objects allocated | ||
57 | obj_used: the number of objects allocated to the user | ||
58 | pages_used: the number of pages allocated for the class | ||
59 | pages_per_zspage: the number of 0-order pages to make a zspage | ||
60 | |||
61 | We assign a zspage to ZS_ALMOST_EMPTY fullness group when: | ||
62 | n <= N / f, where | ||
63 | n = number of allocated objects | ||
64 | N = total number of objects zspage can store | ||
65 | f = fullness_threshold_frac(ie, 4 at the moment) | ||
66 | |||
67 | Similarly, we assign zspage to: | ||
68 | ZS_ALMOST_FULL when n > N / f | ||
69 | ZS_EMPTY when n == 0 | ||
70 | ZS_FULL when n == N | ||
diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt index a75e3adaa39d..88b85899d309 100644 --- a/Documentation/x86/boot.txt +++ b/Documentation/x86/boot.txt | |||
@@ -406,6 +406,12 @@ Protocol: 2.00+ | |||
406 | - If 0, the protected-mode code is loaded at 0x10000. | 406 | - If 0, the protected-mode code is loaded at 0x10000. |
407 | - If 1, the protected-mode code is loaded at 0x100000. | 407 | - If 1, the protected-mode code is loaded at 0x100000. |
408 | 408 | ||
409 | Bit 1 (kernel internal): ALSR_FLAG | ||
410 | - Used internally by the compressed kernel to communicate | ||
411 | KASLR status to kernel proper. | ||
412 | If 1, KASLR enabled. | ||
413 | If 0, KASLR disabled. | ||
414 | |||
409 | Bit 5 (write): QUIET_FLAG | 415 | Bit 5 (write): QUIET_FLAG |
410 | - If 0, print early messages. | 416 | - If 0, print early messages. |
411 | - If 1, suppress early messages. | 417 | - If 1, suppress early messages. |
diff --git a/Documentation/zh_CN/arm64/booting.txt b/Documentation/zh_CN/arm64/booting.txt index 6f6d956ac1c9..7cd36af11e71 100644 --- a/Documentation/zh_CN/arm64/booting.txt +++ b/Documentation/zh_CN/arm64/booting.txt | |||
@@ -15,6 +15,8 @@ Documentation/arm64/booting.txt 的中文翻译 | |||
15 | 交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻 | 15 | 交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻 |
16 | 译存在问题,请联系中文版维护者。 | 16 | 译存在问题,请联系中文版维护者。 |
17 | 17 | ||
18 | 本文翻译提交时的 Git 检出点为: bc465aa9d045feb0e13b4a8f32cc33c1943f62d6 | ||
19 | |||
18 | 英文版维护者: Will Deacon <will.deacon@arm.com> | 20 | 英文版维护者: Will Deacon <will.deacon@arm.com> |
19 | 中文版维护者: 傅炜 Fu Wei <wefu@redhat.com> | 21 | 中文版维护者: 傅炜 Fu Wei <wefu@redhat.com> |
20 | 中文版翻译者: 傅炜 Fu Wei <wefu@redhat.com> | 22 | 中文版翻译者: 傅炜 Fu Wei <wefu@redhat.com> |
@@ -88,22 +90,44 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内 | |||
88 | 90 | ||
89 | u32 code0; /* 可执行代码 */ | 91 | u32 code0; /* 可执行代码 */ |
90 | u32 code1; /* 可执行代码 */ | 92 | u32 code1; /* 可执行代码 */ |
91 | u64 text_offset; /* 映像装载偏移 */ | 93 | u64 text_offset; /* 映像装载偏移,小端模式 */ |
92 | u64 res0 = 0; /* 保 */ | 94 | u64 image_size; /* 映像实大小, 小端模式 */ |
93 | u64 res1 = 0; /* 保 */ | 95 | u64 flags; /* 内核旗标, 小模式 * |
94 | u64 res2 = 0; /* 保留 */ | 96 | u64 res2 = 0; /* 保留 */ |
95 | u64 res3 = 0; /* 保留 */ | 97 | u64 res3 = 0; /* 保留 */ |
96 | u64 res4 = 0; /* 保留 */ | 98 | u64 res4 = 0; /* 保留 */ |
97 | u32 magic = 0x644d5241; /* 魔数, 小端, "ARM\x64" */ | 99 | u32 magic = 0x644d5241; /* 魔数, 小端, "ARM\x64" */ |
98 | u32 res5 = 0; /* 保留 */ | 100 | u32 res5; /* 保留 (用于 PE COFF 偏移) */ |
99 | 101 | ||
100 | 102 | ||
101 | 映像头注释: | 103 | 映像头注释: |
102 | 104 | ||
105 | - 自 v3.17 起,除非另有说明,所有域都是小端模式。 | ||
106 | |||
103 | - code0/code1 负责跳转到 stext. | 107 | - code0/code1 负责跳转到 stext. |
104 | 108 | ||
105 | 映像必须位于系统 RAM 起始处的特定偏移(当前是 0x80000)。系统 RAM | 109 | - 当通过 EFI 启动时, 最初 code0/code1 被跳过。 |
106 | 的起始地址必须是以 2MB 对齐的。 | 110 | res5 是到 PE 文件头的偏移,而 PE 文件头含有 EFI 的启动入口点 (efi_stub_entry)。 |
111 | 当 stub 代码完成了它的使命,它会跳转到 code0 继续正常的启动流程。 | ||
112 | |||
113 | - v3.17 之前,未明确指定 text_offset 的字节序。此时,image_size 为零, | ||
114 | 且 text_offset 依照内核字节序为 0x80000。 | ||
115 | 当 image_size 非零,text_offset 为小端模式且是有效值,应被引导加载程序使用。 | ||
116 | 当 image_size 为零,text_offset 可假定为 0x80000。 | ||
117 | |||
118 | - flags 域 (v3.17 引入) 为 64 位小端模式,其编码如下: | ||
119 | 位 0: 内核字节序。 1 表示大端模式,0 表示小端模式。 | ||
120 | 位 1-63: 保留。 | ||
121 | |||
122 | - 当 image_size 为零时,引导装载程序应该试图在内核映像末尾之后尽可能多地保留空闲内存 | ||
123 | 供内核直接使用。对内存空间的需求量因所选定的内核特性而异, 且无实际限制。 | ||
124 | |||
125 | 内核映像必须被放置在靠近可用系统内存起始的 2MB 对齐为基址的 text_offset 字节处,并从那里被调用。 | ||
126 | 当前,对 Linux 来说在此基址以下的内存是无法使用的,因此强烈建议将系统内存的起始作为这个基址。 | ||
127 | 从映像起始地址算起,最少必须为内核释放出 image_size 字节的空间。 | ||
128 | |||
129 | 任何提供给内核的内存(甚至在 2MB 对齐的基地址之前),若未从内核中标记为保留 | ||
130 | (如在设备树(dtb)的 memreserve 区域),都将被认为对内核是可用。 | ||
107 | 131 | ||
108 | 在跳转入内核前,必须符合以下状态: | 132 | 在跳转入内核前,必须符合以下状态: |
109 | 133 | ||
@@ -124,8 +148,12 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内 | |||
124 | - 高速缓存、MMU | 148 | - 高速缓存、MMU |
125 | MMU 必须关闭。 | 149 | MMU 必须关闭。 |
126 | 指令缓存开启或关闭都可以。 | 150 | 指令缓存开启或关闭都可以。 |
127 | 数据缓存必须关闭且无效。 | 151 | 已载入的内核映像的相应内存区必须被清理,以达到缓存一致性点(PoC)。 |
128 | 外部高速缓存(如果存在)必须配置并禁用。 | 152 | 当存在系统缓存或其他使能缓存的一致性主控器时,通常需使用虚拟地址维护其缓存,而非 set/way 操作。 |
153 | 遵从通过虚拟地址操作维护构架缓存的系统缓存必须被配置,并可以被使能。 | ||
154 | 而不通过虚拟地址操作维护构架缓存的系统缓存(不推荐),必须被配置且禁用。 | ||
155 | |||
156 | *译者注:对于 PoC 以及缓存相关内容,请参考 ARMv8 构架参考手册 ARM DDI 0487A | ||
129 | 157 | ||
130 | - 架构计时器 | 158 | - 架构计时器 |
131 | CNTFRQ 必须设定为计时器的频率,且 CNTVOFF 必须设定为对所有 CPU | 159 | CNTFRQ 必须设定为计时器的频率,且 CNTVOFF 必须设定为对所有 CPU |
@@ -141,6 +169,14 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内 | |||
141 | 在进入内核映像的异常级中,所有构架中可写的系统寄存器必须通过软件 | 169 | 在进入内核映像的异常级中,所有构架中可写的系统寄存器必须通过软件 |
142 | 在一个更高的异常级别下初始化,以防止在 未知 状态下运行。 | 170 | 在一个更高的异常级别下初始化,以防止在 未知 状态下运行。 |
143 | 171 | ||
172 | 对于拥有 GICv3 中断控制器的系统: | ||
173 | - 若当前在 EL3 : | ||
174 | ICC_SRE_EL3.Enable (位 3) 必须初始化为 0b1。 | ||
175 | ICC_SRE_EL3.SRE (位 0) 必须初始化为 0b1。 | ||
176 | - 若内核运行在 EL1: | ||
177 | ICC_SRE_EL2.Enable (位 3) 必须初始化为 0b1。 | ||
178 | ICC_SRE_EL2.SRE (位 0) 必须初始化为 0b1。 | ||
179 | |||
144 | 以上对于 CPU 模式、高速缓存、MMU、架构计时器、一致性、系统寄存器的 | 180 | 以上对于 CPU 模式、高速缓存、MMU、架构计时器、一致性、系统寄存器的 |
145 | 必要条件描述适用于所有 CPU。所有 CPU 必须在同一异常级别跳入内核。 | 181 | 必要条件描述适用于所有 CPU。所有 CPU 必须在同一异常级别跳入内核。 |
146 | 182 | ||
@@ -170,7 +206,7 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内 | |||
170 | ARM DEN 0022A:用于 ARM 上的电源状态协调接口系统软件)中描述的 | 206 | ARM DEN 0022A:用于 ARM 上的电源状态协调接口系统软件)中描述的 |
171 | CPU_ON 调用来将 CPU 带入内核。 | 207 | CPU_ON 调用来将 CPU 带入内核。 |
172 | 208 | ||
173 | *译者注:文档翻译时,此文档更新为 ARM DEN 0022B。 | 209 | *译者注: ARM DEN 0022A 已更新到 ARM DEN 0022C。 |
174 | 210 | ||
175 | 设备树必须包含一个 ‘psci’ 节点,请参考以下文档: | 211 | 设备树必须包含一个 ‘psci’ 节点,请参考以下文档: |
176 | Documentation/devicetree/bindings/arm/psci.txt | 212 | Documentation/devicetree/bindings/arm/psci.txt |
diff --git a/Documentation/zh_CN/arm64/legacy_instructions.txt b/Documentation/zh_CN/arm64/legacy_instructions.txt new file mode 100644 index 000000000000..68362a1ab717 --- /dev/null +++ b/Documentation/zh_CN/arm64/legacy_instructions.txt | |||
@@ -0,0 +1,72 @@ | |||
1 | Chinese translated version of Documentation/arm64/legacy_instructions.txt | ||
2 | |||
3 | If you have any comment or update to the content, please contact the | ||
4 | original document maintainer directly. However, if you have a problem | ||
5 | communicating in English you can also ask the Chinese maintainer for | ||
6 | help. Contact the Chinese maintainer if this translation is outdated | ||
7 | or if there is a problem with the translation. | ||
8 | |||
9 | Maintainer: Punit Agrawal <punit.agrawal@arm.com> | ||
10 | Suzuki K. Poulose <suzuki.poulose@arm.com> | ||
11 | Chinese maintainer: Fu Wei <wefu@redhat.com> | ||
12 | --------------------------------------------------------------------- | ||
13 | Documentation/arm64/legacy_instructions.txt 的中文翻译 | ||
14 | |||
15 | 如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文 | ||
16 | 交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻 | ||
17 | 译存在问题,请联系中文版维护者。 | ||
18 | |||
19 | 本文翻译提交时的 Git 检出点为: bc465aa9d045feb0e13b4a8f32cc33c1943f62d6 | ||
20 | |||
21 | 英文版维护者: Punit Agrawal <punit.agrawal@arm.com> | ||
22 | Suzuki K. Poulose <suzuki.poulose@arm.com> | ||
23 | 中文版维护者: 傅炜 Fu Wei <wefu@redhat.com> | ||
24 | 中文版翻译者: 傅炜 Fu Wei <wefu@redhat.com> | ||
25 | 中文版校译者: 傅炜 Fu Wei <wefu@redhat.com> | ||
26 | |||
27 | 以下为正文 | ||
28 | --------------------------------------------------------------------- | ||
29 | Linux 内核在 arm64 上的移植提供了一个基础框架,以支持构架中正在被淘汰或已废弃指令的模拟执行。 | ||
30 | 这个基础框架的代码使用未定义指令钩子(hooks)来支持模拟。如果指令存在,它也允许在硬件中启用该指令。 | ||
31 | |||
32 | 模拟模式可通过写 sysctl 节点(/proc/sys/abi)来控制。 | ||
33 | 不同的执行方式及 sysctl 节点的相应值,解释如下: | ||
34 | |||
35 | * Undef(未定义) | ||
36 | 值: 0 | ||
37 | 产生未定义指令终止异常。它是那些构架中已废弃的指令,如 SWP,的默认处理方式。 | ||
38 | |||
39 | * Emulate(模拟) | ||
40 | 值: 1 | ||
41 | 使用软件模拟方式。为解决软件迁移问题,这种模拟指令模式的使用是被跟踪的,并会发出速率限制警告。 | ||
42 | 它是那些构架中正在被淘汰的指令,如 CP15 barriers(隔离指令),的默认处理方式。 | ||
43 | |||
44 | * Hardware Execution(硬件执行) | ||
45 | 值: 2 | ||
46 | 虽然标记为正在被淘汰,但一些实现可能提供硬件执行这些指令的使能/禁用操作。 | ||
47 | 使用硬件执行一般会有更好的性能,但将无法收集运行时对正被淘汰指令的使用统计数据。 | ||
48 | |||
49 | 默认执行模式依赖于指令在构架中状态。正在被淘汰的指令应该以模拟(Emulate)作为默认模式, | ||
50 | 而已废弃的指令必须默认使用未定义(Undef)模式 | ||
51 | |||
52 | 注意:指令模拟可能无法应对所有情况。更多详情请参考单独的指令注释。 | ||
53 | |||
54 | 受支持的遗留指令 | ||
55 | ------------- | ||
56 | * SWP{B} | ||
57 | 节点: /proc/sys/abi/swp | ||
58 | 状态: 已废弃 | ||
59 | 默认执行方式: Undef (0) | ||
60 | |||
61 | * CP15 Barriers | ||
62 | 节点: /proc/sys/abi/cp15_barrier | ||
63 | 状态: 正被淘汰,不推荐使用 | ||
64 | 默认执行方式: Emulate (1) | ||
65 | |||
66 | * SETEND | ||
67 | 节点: /proc/sys/abi/setend | ||
68 | 状态: 正被淘汰,不推荐使用 | ||
69 | 默认执行方式: Emulate (1)* | ||
70 | 注:为了使能这个特性,系统中的所有 CPU 必须在 EL0 支持混合字节序。 | ||
71 | 如果一个新的 CPU (不支持混合字节序) 在使能这个特性后被热插入系统, | ||
72 | 在应用中可能会出现不可预期的结果。 | ||
diff --git a/Documentation/zh_CN/arm64/memory.txt b/Documentation/zh_CN/arm64/memory.txt index a782704c1cb5..19b3a52d5d94 100644 --- a/Documentation/zh_CN/arm64/memory.txt +++ b/Documentation/zh_CN/arm64/memory.txt | |||
@@ -15,6 +15,8 @@ Documentation/arm64/memory.txt 的中文翻译 | |||
15 | 交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻 | 15 | 交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻 |
16 | 译存在问题,请联系中文版维护者。 | 16 | 译存在问题,请联系中文版维护者。 |
17 | 17 | ||
18 | 本文翻译提交时的 Git 检出点为: bc465aa9d045feb0e13b4a8f32cc33c1943f62d6 | ||
19 | |||
18 | 英文版维护者: Catalin Marinas <catalin.marinas@arm.com> | 20 | 英文版维护者: Catalin Marinas <catalin.marinas@arm.com> |
19 | 中文版维护者: 傅炜 Fu Wei <wefu@redhat.com> | 21 | 中文版维护者: 傅炜 Fu Wei <wefu@redhat.com> |
20 | 中文版翻译者: 傅炜 Fu Wei <wefu@redhat.com> | 22 | 中文版翻译者: 傅炜 Fu Wei <wefu@redhat.com> |
@@ -26,69 +28,53 @@ Documentation/arm64/memory.txt 的中文翻译 | |||
26 | =========================== | 28 | =========================== |
27 | 29 | ||
28 | 作者: Catalin Marinas <catalin.marinas@arm.com> | 30 | 作者: Catalin Marinas <catalin.marinas@arm.com> |
29 | 日期: 2012 年 02 月 20 日 | ||
30 | 31 | ||
31 | 本文档描述 AArch64 Linux 内核所使用的虚拟内存布局。此构架可以实现 | 32 | 本文档描述 AArch64 Linux 内核所使用的虚拟内存布局。此构架可以实现 |
32 | 页大小为 4KB 的 4 级转换表和页大小为 64KB 的 3 级转换表。 | 33 | 页大小为 4KB 的 4 级转换表和页大小为 64KB 的 3 级转换表。 |
33 | 34 | ||
34 | AArch64 Linux 使用页大小为 4KB 3 级转换表配置,对于用户和内核 | 35 | AArch64 Linux 使用 3 或 4 级转换表,其大小置为 4KB,对于用户和内核 |
35 | 都有 39-bit (512GB) 的虚拟地址空间。对于页大小为 64KB的配置,仅 | 36 | 分别都有 39-bit (512GB) 或 48-bit (256TB) 的虚拟地址空间。 |
36 | 使用 2 级转换表,但内存布局相同。 | 37 | 对页大小为 64KB的配,仅用 2 级转换表,有 42-bit (4TB) 的虚拟地址空间,但内存布局相同。 |
37 | 38 | ||
38 | 用户地址空间的 63:39 位为 0,而内核地址空间的相应位为 1。TTBRx 的 | 39 | 用户地址空间的 63:48 位为 0,而内核地址空间的相应位为 1。TTBRx 的 |
39 | 选择由虚拟地址的 63 位给出。swapper_pg_dir 仅包含内核(全局)映射, | 40 | 选择由虚拟地址的 63 位给出。swapper_pg_dir 仅包含内核(全局)映射, |
40 | 而用户 pgd 仅包含用户(非全局)映射。swapper_pgd_dir 地址被写入 | 41 | 而用户 pgd 仅包含用户(非全局)映射。swapper_pg_dir 地址被写入 |
41 | TTBR1 中,且从不写入 TTBR0。 | 42 | TTBR1 中,且从不写入 TTBR0。 |
42 | 43 | ||
43 | 44 | ||
44 | AArch64 Linux 在页大小为 4KB 时的内存布局: | 45 | AArch64 Linux 在页大小为 4KB,并使用 3 级转表的内存布局: |
45 | 46 | ||
46 | 起始地址 结束地址 大小 用途 | 47 | 起始地址 结束地址 大小 用途 |
47 | ----------------------------------------------------------------------- | 48 | ----------------------------------------------------------------------- |
48 | 0000000000000000 0000007fffffffff 512GB 用户空间 | 49 | 0000000000000000 0000007fffffffff 512GB 用户空间 |
50 | ffffff8000000000 ffffffffffffffff 512GB 内核空间 | ||
49 | 51 | ||
50 | ffffff8000000000 ffffffbbfffeffff ~240GB vmalloc | ||
51 | |||
52 | ffffffbbffff0000 ffffffbbffffffff 64KB [防护页] | ||
53 | |||
54 | ffffffbc00000000 ffffffbdffffffff 8GB vmemmap | ||
55 | |||
56 | ffffffbe00000000 ffffffbffbbfffff ~8GB [防护页,未来用于 vmmemap] | ||
57 | 52 | ||
58 | ffffffbffbc00000 ffffffbffbdfffff 2MB earlyprintk | 53 | AArch64 Linux 在页大小为 4KB,并使用 4 级换表时的存布局: |
59 | 54 | ||
60 | ffffffbffbe00000 ffffffbffbe0ffff 64KB PCI I/O 空间 | 55 | 起始地址 结束地址 大小 用途 |
61 | 56 | ----------------------------------------------------------------------- | |
62 | ffffffbffbe10000 ffffffbcffffffff ~2MB [防护页] | 57 | 0000000000000000 0000ffffffffffff 256TB 用户空间 |
63 | 58 | ffff000000000000 ffffffffffffffff 256TB 内核空间 | |
64 | ffffffbffc000000 ffffffbfffffffff 64MB 模块 | ||
65 | |||
66 | ffffffc000000000 ffffffffffffffff 256GB 内核逻辑内存映射 | ||
67 | 59 | ||
68 | 60 | ||
69 | AArch64 Linux 在页大小为 64KB 时的内存布局: | 61 | AArch64 Linux 在页大小为 64KB,并使用 2 级转表的内存布局: |
70 | 62 | ||
71 | 起始地址 结束地址 大小 用途 | 63 | 起始地址 结束地址 大小 用途 |
72 | ----------------------------------------------------------------------- | 64 | ----------------------------------------------------------------------- |
73 | 0000000000000000 000003ffffffffff 4TB 用户空间 | 65 | 0000000000000000 000003ffffffffff 4TB 用户空间 |
66 | fffffc0000000000 ffffffffffffffff 4TB 内核空间 | ||
74 | 67 | ||
75 | fffffc0000000000 fffffdfbfffeffff ~2TB vmalloc | ||
76 | |||
77 | fffffdfbffff0000 fffffdfbffffffff 64KB [防护页] | ||
78 | |||
79 | fffffdfc00000000 fffffdfdffffffff 8GB vmemmap | ||
80 | |||
81 | fffffdfe00000000 fffffdfffbbfffff ~8GB [防护页,未来用于 vmmemap] | ||
82 | 68 | ||
83 | fffffdfffbc00000 fffffdfffbdfffff 2MB earlyprintk | 69 | AArch64 Linux 在页大小为 64KB,并使用 3 级换表时的存布局: |
84 | 70 | ||
85 | fffffdfffbe00000 fffffdfffbe0ffff 64KB PCI I/O 空间 | 71 | 起始地址 结束地址 大小 用途 |
86 | 72 | ----------------------------------------------------------------------- | |
87 | fffffdfffbe10000 fffffdfffbffffff ~2MB [防护页] | 73 | 0000000000000000 0000ffffffffffff 256TB 用户空间 |
74 | ffff000000000000 ffffffffffffffff 256TB 内核空间 | ||
88 | 75 | ||
89 | fffffdfffc000000 fffffdffffffffff 64MB 模块 | ||
90 | 76 | ||
91 | fffffe0000000000 ffffffffffffffff 2TB 内核逻内存 | 77 | 更详细的内核拟内存布局,请参内动信息。 |
92 | 78 | ||
93 | 79 | ||
94 | 4KB 页大小的转换表查找: | 80 | 4KB 页大小的转换表查找: |
@@ -102,7 +88,7 @@ fffffe0000000000 ffffffffffffffff 2TB 内核逻辑内存映射 | |||
102 | | | | | +-> [20:12] L3 索引 | 88 | | | | | +-> [20:12] L3 索引 |
103 | | | | +-----------> [29:21] L2 索引 | 89 | | | | +-----------> [29:21] L2 索引 |
104 | | | +---------------------> [38:30] L1 索引 | 90 | | | +---------------------> [38:30] L1 索引 |
105 | | +-------------------------------> [47:39] L0 索引 (未使用) | 91 | | +-------------------------------> [47:39] L0 索引 |
106 | +-------------------------------------------------> [63] TTBR0/1 | 92 | +-------------------------------------------------> [63] TTBR0/1 |
107 | 93 | ||
108 | 94 | ||
@@ -115,10 +101,11 @@ fffffe0000000000 ffffffffffffffff 2TB 内核逻辑内存映射 | |||
115 | | | | | v | 101 | | | | | v |
116 | | | | | [15:0] 页内偏移 | 102 | | | | | [15:0] 页内偏移 |
117 | | | | +----------> [28:16] L3 索引 | 103 | | | | +----------> [28:16] L3 索引 |
118 | | | +--------------------------> [41:29] L2 索引 (仅使用 38:29 ) | 104 | | | +--------------------------> [41:29] L2 索引 |
119 | | +-------------------------------> [47:42] L1 索引 (未使用) | 105 | | +-------------------------------> [47:42] L1 索引 |
120 | +-------------------------------------------------> [63] TTBR0/1 | 106 | +-------------------------------------------------> [63] TTBR0/1 |
121 | 107 | ||
108 | |||
122 | 当使用 KVM 时, 管理程序(hypervisor)在 EL2 中通过相对内核虚拟地址的 | 109 | 当使用 KVM 时, 管理程序(hypervisor)在 EL2 中通过相对内核虚拟地址的 |
123 | 一个固定偏移来映射内核页(内核虚拟地址的高 24 位设为零): | 110 | 一个固定偏移来映射内核页(内核虚拟地址的高 24 位设为零): |
124 | 111 | ||