diff options
Diffstat (limited to 'Documentation')
167 files changed, 8017 insertions, 1525 deletions
diff --git a/Documentation/ABI/testing/ima_policy b/Documentation/ABI/testing/ima_policy index 6cd6daefaaed..986946613542 100644 --- a/Documentation/ABI/testing/ima_policy +++ b/Documentation/ABI/testing/ima_policy | |||
@@ -12,11 +12,14 @@ Description: | |||
12 | then closing the file. The new policy takes effect after | 12 | then closing the file. The new policy takes effect after |
13 | the file ima/policy is closed. | 13 | the file ima/policy is closed. |
14 | 14 | ||
15 | IMA appraisal, if configured, uses these file measurements | ||
16 | for local measurement appraisal. | ||
17 | |||
15 | rule format: action [condition ...] | 18 | rule format: action [condition ...] |
16 | 19 | ||
17 | action: measure | dont_measure | 20 | action: measure | dont_measure | appraise | dont_appraise | audit |
18 | condition:= base | lsm | 21 | condition:= base | lsm |
19 | base: [[func=] [mask=] [fsmagic=] [uid=]] | 22 | base: [[func=] [mask=] [fsmagic=] [uid=] [fowner]] |
20 | lsm: [[subj_user=] [subj_role=] [subj_type=] | 23 | lsm: [[subj_user=] [subj_role=] [subj_type=] |
21 | [obj_user=] [obj_role=] [obj_type=]] | 24 | [obj_user=] [obj_role=] [obj_type=]] |
22 | 25 | ||
@@ -24,36 +27,50 @@ Description: | |||
24 | mask:= [MAY_READ] [MAY_WRITE] [MAY_APPEND] [MAY_EXEC] | 27 | mask:= [MAY_READ] [MAY_WRITE] [MAY_APPEND] [MAY_EXEC] |
25 | fsmagic:= hex value | 28 | fsmagic:= hex value |
26 | uid:= decimal value | 29 | uid:= decimal value |
30 | fowner:=decimal value | ||
27 | lsm: are LSM specific | 31 | lsm: are LSM specific |
28 | 32 | ||
29 | default policy: | 33 | default policy: |
30 | # PROC_SUPER_MAGIC | 34 | # PROC_SUPER_MAGIC |
31 | dont_measure fsmagic=0x9fa0 | 35 | dont_measure fsmagic=0x9fa0 |
36 | dont_appraise fsmagic=0x9fa0 | ||
32 | # SYSFS_MAGIC | 37 | # SYSFS_MAGIC |
33 | dont_measure fsmagic=0x62656572 | 38 | dont_measure fsmagic=0x62656572 |
39 | dont_appraise fsmagic=0x62656572 | ||
34 | # DEBUGFS_MAGIC | 40 | # DEBUGFS_MAGIC |
35 | dont_measure fsmagic=0x64626720 | 41 | dont_measure fsmagic=0x64626720 |
42 | dont_appraise fsmagic=0x64626720 | ||
36 | # TMPFS_MAGIC | 43 | # TMPFS_MAGIC |
37 | dont_measure fsmagic=0x01021994 | 44 | dont_measure fsmagic=0x01021994 |
45 | dont_appraise fsmagic=0x01021994 | ||
46 | # RAMFS_MAGIC | ||
47 | dont_measure fsmagic=0x858458f6 | ||
48 | dont_appraise fsmagic=0x858458f6 | ||
38 | # SECURITYFS_MAGIC | 49 | # SECURITYFS_MAGIC |
39 | dont_measure fsmagic=0x73636673 | 50 | dont_measure fsmagic=0x73636673 |
51 | dont_appraise fsmagic=0x73636673 | ||
40 | 52 | ||
41 | measure func=BPRM_CHECK | 53 | measure func=BPRM_CHECK |
42 | measure func=FILE_MMAP mask=MAY_EXEC | 54 | measure func=FILE_MMAP mask=MAY_EXEC |
43 | measure func=FILE_CHECK mask=MAY_READ uid=0 | 55 | measure func=FILE_CHECK mask=MAY_READ uid=0 |
56 | appraise fowner=0 | ||
44 | 57 | ||
45 | The default policy measures all executables in bprm_check, | 58 | The default policy measures all executables in bprm_check, |
46 | all files mmapped executable in file_mmap, and all files | 59 | all files mmapped executable in file_mmap, and all files |
47 | open for read by root in do_filp_open. | 60 | open for read by root in do_filp_open. The default appraisal |
61 | policy appraises all files owned by root. | ||
48 | 62 | ||
49 | Examples of LSM specific definitions: | 63 | Examples of LSM specific definitions: |
50 | 64 | ||
51 | SELinux: | 65 | SELinux: |
52 | # SELINUX_MAGIC | 66 | # SELINUX_MAGIC |
53 | dont_measure fsmagic=0xF97CFF8C | 67 | dont_measure fsmagic=0xf97cff8c |
68 | dont_appraise fsmagic=0xf97cff8c | ||
54 | 69 | ||
55 | dont_measure obj_type=var_log_t | 70 | dont_measure obj_type=var_log_t |
71 | dont_appraise obj_type=var_log_t | ||
56 | dont_measure obj_type=auditd_log_t | 72 | dont_measure obj_type=auditd_log_t |
73 | dont_appraise obj_type=auditd_log_t | ||
57 | measure subj_user=system_u func=FILE_CHECK mask=MAY_READ | 74 | measure subj_user=system_u func=FILE_CHECK mask=MAY_READ |
58 | measure subj_role=system_r func=FILE_CHECK mask=MAY_READ | 75 | measure subj_role=system_r func=FILE_CHECK mask=MAY_READ |
59 | 76 | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci index 34f51100f029..dff1f48d252d 100644 --- a/Documentation/ABI/testing/sysfs-bus-pci +++ b/Documentation/ABI/testing/sysfs-bus-pci | |||
@@ -210,3 +210,15 @@ Users: | |||
210 | firmware assigned instance number of the PCI | 210 | firmware assigned instance number of the PCI |
211 | device that can help in understanding the firmware | 211 | device that can help in understanding the firmware |
212 | intended order of the PCI device. | 212 | intended order of the PCI device. |
213 | |||
214 | What: /sys/bus/pci/devices/.../d3cold_allowed | ||
215 | Date: July 2012 | ||
216 | Contact: Huang Ying <ying.huang@intel.com> | ||
217 | Description: | ||
218 | d3cold_allowed is bit to control whether the corresponding PCI | ||
219 | device can be put into D3Cold state. If it is cleared, the | ||
220 | device will never be put into D3Cold state. If it is set, the | ||
221 | device may be put into D3Cold state if other requirements are | ||
222 | satisfied too. Reading this attribute will show the current | ||
223 | value of d3cold_allowed bit. Writing this attribute will set | ||
224 | the value of d3cold_allowed bit. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb index 5f75f8f7df34..b6fbe514a869 100644 --- a/Documentation/ABI/testing/sysfs-bus-usb +++ b/Documentation/ABI/testing/sysfs-bus-usb | |||
@@ -220,3 +220,10 @@ Description: | |||
220 | If the device doesn't support LTM, the file will read "no". | 220 | If the device doesn't support LTM, the file will read "no". |
221 | The file will be present for all speeds of USB devices, and will | 221 | The file will be present for all speeds of USB devices, and will |
222 | always read "no" for USB 1.1 and USB 2.0 devices. | 222 | always read "no" for USB 1.1 and USB 2.0 devices. |
223 | |||
224 | What: /sys/bus/usb/devices/.../(hub interface)/portX | ||
225 | Date: August 2012 | ||
226 | Contact: Lan Tianyu <tianyu.lan@intel.com> | ||
227 | Description: | ||
228 | The /sys/bus/usb/devices/.../(hub interface)/portX | ||
229 | is usb port device's sysfs directory. | ||
diff --git a/Documentation/ABI/testing/sysfs-class-extcon b/Documentation/ABI/testing/sysfs-class-extcon index 20ab361bd8c6..57a726232912 100644 --- a/Documentation/ABI/testing/sysfs-class-extcon +++ b/Documentation/ABI/testing/sysfs-class-extcon | |||
@@ -13,7 +13,7 @@ Description: | |||
13 | accessory cables have such capability. For example, | 13 | accessory cables have such capability. For example, |
14 | the 30-pin port of Nuri board (/arch/arm/mach-exynos) | 14 | the 30-pin port of Nuri board (/arch/arm/mach-exynos) |
15 | may have both HDMI and Charger attached, or analog audio, | 15 | may have both HDMI and Charger attached, or analog audio, |
16 | video, and USB cables attached simulteneously. | 16 | video, and USB cables attached simultaneously. |
17 | 17 | ||
18 | If there are cables mutually exclusive with each other, | 18 | If there are cables mutually exclusive with each other, |
19 | such binary relations may be expressed with extcon_dev's | 19 | such binary relations may be expressed with extcon_dev's |
@@ -35,7 +35,7 @@ Description: | |||
35 | The /sys/class/extcon/.../state shows and stores the cable | 35 | The /sys/class/extcon/.../state shows and stores the cable |
36 | attach/detach information of the corresponding extcon object. | 36 | attach/detach information of the corresponding extcon object. |
37 | If the extcon object has an optional callback "show_state" | 37 | If the extcon object has an optional callback "show_state" |
38 | defined, the showing function is overriden with the optional | 38 | defined, the showing function is overridden with the optional |
39 | callback. | 39 | callback. |
40 | 40 | ||
41 | If the default callback for showing function is used, the | 41 | If the default callback for showing function is used, the |
@@ -46,19 +46,19 @@ Description: | |||
46 | TA=1 | 46 | TA=1 |
47 | EAR_JACK=0 | 47 | EAR_JACK=0 |
48 | # | 48 | # |
49 | In this example, the extcon device have USB_OTG and TA | 49 | In this example, the extcon device has USB_OTG and TA |
50 | cables attached and HDMI and EAR_JACK cables detached. | 50 | cables attached and HDMI and EAR_JACK cables detached. |
51 | 51 | ||
52 | In order to update the state of an extcon device, enter a hex | 52 | In order to update the state of an extcon device, enter a hex |
53 | state number starting with 0x. | 53 | state number starting with 0x: |
54 | echo 0xHEX > state | 54 | # echo 0xHEX > state |
55 | 55 | ||
56 | This updates the whole state of the extcon dev. | 56 | This updates the whole state of the extcon device. |
57 | Inputs of all the methods are required to meet the | 57 | Inputs of all the methods are required to meet the |
58 | mutually_exclusive contidions if they exist. | 58 | mutually_exclusive conditions if they exist. |
59 | 59 | ||
60 | It is recommended to use this "global" state interface if | 60 | It is recommended to use this "global" state interface if |
61 | you need to enter the value atomically. The later state | 61 | you need to set the value atomically. The later state |
62 | interface associated with each cable cannot update | 62 | interface associated with each cable cannot update |
63 | multiple cable states of an extcon device simultaneously. | 63 | multiple cable states of an extcon device simultaneously. |
64 | 64 | ||
@@ -73,7 +73,7 @@ What: /sys/class/extcon/.../cable.x/state | |||
73 | Date: February 2012 | 73 | Date: February 2012 |
74 | Contact: MyungJoo Ham <myungjoo.ham@samsung.com> | 74 | Contact: MyungJoo Ham <myungjoo.ham@samsung.com> |
75 | Description: | 75 | Description: |
76 | The /sys/class/extcon/.../cable.x/name shows and stores the | 76 | The /sys/class/extcon/.../cable.x/state shows and stores the |
77 | state of cable "x" (integer between 0 and 31) of an extcon | 77 | state of cable "x" (integer between 0 and 31) of an extcon |
78 | device. The state value is either 0 (detached) or 1 | 78 | device. The state value is either 0 (detached) or 1 |
79 | (attached). | 79 | (attached). |
@@ -83,8 +83,8 @@ Date: December 2011 | |||
83 | Contact: MyungJoo Ham <myungjoo.ham@samsung.com> | 83 | Contact: MyungJoo Ham <myungjoo.ham@samsung.com> |
84 | Description: | 84 | Description: |
85 | Shows the relations of mutually exclusiveness. For example, | 85 | Shows the relations of mutually exclusiveness. For example, |
86 | if the mutually_exclusive array of extcon_dev is | 86 | if the mutually_exclusive array of extcon device is |
87 | {0x3, 0x5, 0xC, 0x0}, the, the output is: | 87 | {0x3, 0x5, 0xC, 0x0}, then the output is: |
88 | # ls mutually_exclusive/ | 88 | # ls mutually_exclusive/ |
89 | 0x3 | 89 | 0x3 |
90 | 0x5 | 90 | 0x5 |
diff --git a/Documentation/ABI/testing/sysfs-class-regulator b/Documentation/ABI/testing/sysfs-class-regulator index e091fa873792..bc578bc60628 100644 --- a/Documentation/ABI/testing/sysfs-class-regulator +++ b/Documentation/ABI/testing/sysfs-class-regulator | |||
@@ -349,3 +349,24 @@ Description: | |||
349 | 349 | ||
350 | This will be one of the same strings reported by | 350 | This will be one of the same strings reported by |
351 | the "state" attribute. | 351 | the "state" attribute. |
352 | |||
353 | What: /sys/class/regulator/.../bypass | ||
354 | Date: September 2012 | ||
355 | KernelVersion: 3.7 | ||
356 | Contact: Mark Brown <broonie@opensource.wolfsonmicro.com> | ||
357 | Description: | ||
358 | Some regulator directories will contain a field called | ||
359 | bypass. This indicates if the device is in bypass mode. | ||
360 | |||
361 | This will be one of the following strings: | ||
362 | |||
363 | 'enabled' | ||
364 | 'disabled' | ||
365 | 'unknown' | ||
366 | |||
367 | 'enabled' means the regulator is in bypass mode. | ||
368 | |||
369 | 'disabled' means that the regulator is regulating. | ||
370 | |||
371 | 'unknown' means software cannot determine the state, or | ||
372 | the reported state is invalid. | ||
diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu index 5dab36448b44..6943133afcb8 100644 --- a/Documentation/ABI/testing/sysfs-devices-system-cpu +++ b/Documentation/ABI/testing/sysfs-devices-system-cpu | |||
@@ -176,3 +176,14 @@ Description: Disable L3 cache indices | |||
176 | All AMD processors with L3 caches provide this functionality. | 176 | All AMD processors with L3 caches provide this functionality. |
177 | For details, see BKDGs at | 177 | For details, see BKDGs at |
178 | http://developer.amd.com/documentation/guides/Pages/default.aspx | 178 | http://developer.amd.com/documentation/guides/Pages/default.aspx |
179 | |||
180 | |||
181 | What: /sys/devices/system/cpu/cpufreq/boost | ||
182 | Date: August 2012 | ||
183 | Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org> | ||
184 | Description: Processor frequency boosting control | ||
185 | |||
186 | This switch controls the boost setting for the whole system. | ||
187 | Boosting allows the CPU and the firmware to run at a frequency | ||
188 | beyound it's nominal limit. | ||
189 | More details can be found in Documentation/cpu-freq/boost.txt | ||
diff --git a/Documentation/ABI/testing/sysfs-driver-ppi b/Documentation/ABI/testing/sysfs-driver-ppi new file mode 100644 index 000000000000..97a003ee058b --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-ppi | |||
@@ -0,0 +1,70 @@ | |||
1 | What: /sys/devices/pnp0/<bus-num>/ppi/ | ||
2 | Date: August 2012 | ||
3 | Kernel Version: 3.6 | ||
4 | Contact: xiaoyan.zhang@intel.com | ||
5 | Description: | ||
6 | This folder includes the attributes related with PPI (Physical | ||
7 | Presence Interface). Only if TPM is supported by BIOS, this | ||
8 | folder makes sence. The folder path can be got by command | ||
9 | 'find /sys/ -name 'pcrs''. For the detail information of PPI, | ||
10 | please refer to the PPI specification from | ||
11 | http://www.trustedcomputinggroup.org/ | ||
12 | |||
13 | What: /sys/devices/pnp0/<bus-num>/ppi/version | ||
14 | Date: August 2012 | ||
15 | Contact: xiaoyan.zhang@intel.com | ||
16 | Description: | ||
17 | This attribute shows the version of the PPI supported by the | ||
18 | platform. | ||
19 | This file is readonly. | ||
20 | |||
21 | What: /sys/devices/pnp0/<bus-num>/ppi/request | ||
22 | Date: August 2012 | ||
23 | Contact: xiaoyan.zhang@intel.com | ||
24 | Description: | ||
25 | This attribute shows the request for an operation to be | ||
26 | executed in the pre-OS environment. It is the only input from | ||
27 | the OS to the pre-OS environment. The request should be an | ||
28 | integer value range from 1 to 160, and 0 means no request. | ||
29 | This file can be read and written. | ||
30 | |||
31 | What: /sys/devices/pnp0/00:<bus-num>/ppi/response | ||
32 | Date: August 2012 | ||
33 | Contact: xiaoyan.zhang@intel.com | ||
34 | Description: | ||
35 | This attribute shows the response to the most recent operation | ||
36 | request it acted upon. The format is "<request> <response num> | ||
37 | : <response description>". | ||
38 | This file is readonly. | ||
39 | |||
40 | What: /sys/devices/pnp0/<bus-num>/ppi/transition_action | ||
41 | Date: August 2012 | ||
42 | Contact: xiaoyan.zhang@intel.com | ||
43 | Description: | ||
44 | This attribute shows the platform-specific action that should | ||
45 | take place in order to transition to the BIOS for execution of | ||
46 | a requested operation. The format is "<action num>: <action | ||
47 | description>". | ||
48 | This file is readonly. | ||
49 | |||
50 | What: /sys/devices/pnp0/<bus-num>/ppi/tcg_operations | ||
51 | Date: August 2012 | ||
52 | Contact: xiaoyan.zhang@intel.com | ||
53 | Description: | ||
54 | This attribute shows whether it is allowed to request an | ||
55 | operation to be executed in the pre-OS environment by the BIOS | ||
56 | for the requests defined by TCG, i.e. requests from 1 to 22. | ||
57 | The format is "<request> <status num>: <status description>". | ||
58 | This attribute is only supported by PPI version 1.2+. | ||
59 | This file is readonly. | ||
60 | |||
61 | What: /sys/devices/pnp0/<bus-num>/ppi/vs_operations | ||
62 | Date: August 2012 | ||
63 | Contact: xiaoyan.zhang@intel.com | ||
64 | Description: | ||
65 | This attribute shows whether it is allowed to request an | ||
66 | operation to be executed in the pre-OS environment by the BIOS | ||
67 | for the verdor specific requests, i.e. requests from 128 to | ||
68 | 255. The format is same with tcg_operations. This attribute | ||
69 | is also only supported by PPI version 1.2+. | ||
70 | This file is readonly. | ||
diff --git a/Documentation/ABI/testing/sysfs-driver-wacom b/Documentation/ABI/testing/sysfs-driver-wacom index 8d55a83d6921..7fc781048b79 100644 --- a/Documentation/ABI/testing/sysfs-driver-wacom +++ b/Documentation/ABI/testing/sysfs-driver-wacom | |||
@@ -1,3 +1,16 @@ | |||
1 | WWhat: /sys/class/hidraw/hidraw*/device/oled*_img | ||
2 | Date: June 2012 | ||
3 | Contact: linux-bluetooth@vger.kernel.org | ||
4 | Description: | ||
5 | The /sys/class/hidraw/hidraw*/device/oled*_img files control | ||
6 | OLED mocro displays on Intuos4 Wireless tablet. Accepted image | ||
7 | has to contain 256 bytes (64x32 px 1 bit colour). The format | ||
8 | is the same as PBM image 62x32px without header (64 bits per | ||
9 | horizontal line, 32 lines). An example of setting OLED No. 0: | ||
10 | dd bs=256 count=1 if=img_file of=[path to oled0_img]/oled0_img | ||
11 | The attribute is read only and no local copy of the image is | ||
12 | stored. | ||
13 | |||
1 | What: /sys/class/hidraw/hidraw*/device/speed | 14 | What: /sys/class/hidraw/hidraw*/device/speed |
2 | Date: April 2010 | 15 | Date: April 2010 |
3 | Kernel Version: 2.6.35 | 16 | Kernel Version: 2.6.35 |
diff --git a/Documentation/ABI/testing/sysfs-platform-ideapad-laptop b/Documentation/ABI/testing/sysfs-platform-ideapad-laptop index 814b01354c41..b31e782bd985 100644 --- a/Documentation/ABI/testing/sysfs-platform-ideapad-laptop +++ b/Documentation/ABI/testing/sysfs-platform-ideapad-laptop | |||
@@ -5,4 +5,15 @@ Contact: "Ike Panhc <ike.pan@canonical.com>" | |||
5 | Description: | 5 | Description: |
6 | Control the power of camera module. 1 means on, 0 means off. | 6 | Control the power of camera module. 1 means on, 0 means off. |
7 | 7 | ||
8 | What: /sys/devices/platform/ideapad/fan_mode | ||
9 | Date: June 2012 | ||
10 | KernelVersion: 3.6 | ||
11 | Contact: "Maxim Mikityanskiy <maxtram95@gmail.com>" | ||
12 | Description: | ||
13 | Change fan mode | ||
14 | There are four available modes: | ||
15 | * 0 -> Super Silent Mode | ||
16 | * 1 -> Standard Mode | ||
17 | * 2 -> Dust Cleaning | ||
18 | * 4 -> Efficient Thermal Dissipation Mode | ||
8 | 19 | ||
diff --git a/Documentation/ABI/testing/sysfs-ptp b/Documentation/ABI/testing/sysfs-ptp index d40d2b550502..05aeedf17794 100644 --- a/Documentation/ABI/testing/sysfs-ptp +++ b/Documentation/ABI/testing/sysfs-ptp | |||
@@ -19,7 +19,11 @@ Date: September 2010 | |||
19 | Contact: Richard Cochran <richardcochran@gmail.com> | 19 | Contact: Richard Cochran <richardcochran@gmail.com> |
20 | Description: | 20 | Description: |
21 | This file contains the name of the PTP hardware clock | 21 | This file contains the name of the PTP hardware clock |
22 | as a human readable string. | 22 | as a human readable string. The purpose of this |
23 | attribute is to provide the user with a "friendly | ||
24 | name" and to help distinguish PHY based devices from | ||
25 | MAC based ones. The string does not necessarily have | ||
26 | to be any kind of unique id. | ||
23 | 27 | ||
24 | What: /sys/class/ptp/ptpN/max_adjustment | 28 | What: /sys/class/ptp/ptpN/max_adjustment |
25 | Date: September 2010 | 29 | Date: September 2010 |
diff --git a/Documentation/ABI/testing/sysfs-tty b/Documentation/ABI/testing/sysfs-tty index b138b663bf54..0c430150d929 100644 --- a/Documentation/ABI/testing/sysfs-tty +++ b/Documentation/ABI/testing/sysfs-tty | |||
@@ -17,3 +17,12 @@ Description: | |||
17 | device, like 'tty1'. | 17 | device, like 'tty1'. |
18 | The file supports poll() to detect virtual | 18 | The file supports poll() to detect virtual |
19 | console switches. | 19 | console switches. |
20 | |||
21 | What: /sys/class/tty/ttyS0/uartclk | ||
22 | Date: Sep 2012 | ||
23 | Contact: Tomas Hlavacek <tmshlvck@gmail.com> | ||
24 | Description: | ||
25 | Shows the current uartclk value associated with the | ||
26 | UART port in serial_core, that is bound to TTY like ttyS0. | ||
27 | uartclk = 16 * baud_base | ||
28 | |||
diff --git a/Documentation/DocBook/filesystems.tmpl b/Documentation/DocBook/filesystems.tmpl index 3fca32c41927..25b58efd955d 100644 --- a/Documentation/DocBook/filesystems.tmpl +++ b/Documentation/DocBook/filesystems.tmpl | |||
@@ -224,8 +224,8 @@ all your transactions. | |||
224 | </para> | 224 | </para> |
225 | 225 | ||
226 | <para> | 226 | <para> |
227 | Then at umount time , in your put_super() (2.4) or write_super() (2.5) | 227 | Then at umount time , in your put_super() you can then call journal_destroy() |
228 | you can then call journal_destroy() to clean up your in-core journal object. | 228 | to clean up your in-core journal object. |
229 | </para> | 229 | </para> |
230 | 230 | ||
231 | <para> | 231 | <para> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml b/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml index 720395127904..701138f1209d 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml | |||
@@ -125,7 +125,7 @@ the structure refers to a radio tuner the | |||
125 | <constant>V4L2_TUNER_CAP_NORM</constant> flags can't be used.</para> | 125 | <constant>V4L2_TUNER_CAP_NORM</constant> flags can't be used.</para> |
126 | <para>If multiple frequency bands are supported, then | 126 | <para>If multiple frequency bands are supported, then |
127 | <structfield>capability</structfield> is the union of all | 127 | <structfield>capability</structfield> is the union of all |
128 | <structfield>capability></structfield> fields of each &v4l2-frequency-band;. | 128 | <structfield>capability</structfield> fields of each &v4l2-frequency-band;. |
129 | </para></entry> | 129 | </para></entry> |
130 | </row> | 130 | </row> |
131 | <row> | 131 | <row> |
diff --git a/Documentation/RCU/checklist.txt b/Documentation/RCU/checklist.txt index fc103d7a0474..cdb20d41a44a 100644 --- a/Documentation/RCU/checklist.txt +++ b/Documentation/RCU/checklist.txt | |||
@@ -310,6 +310,12 @@ over a rather long period of time, but improvements are always welcome! | |||
310 | code under the influence of preempt_disable(), you instead | 310 | code under the influence of preempt_disable(), you instead |
311 | need to use synchronize_irq() or synchronize_sched(). | 311 | need to use synchronize_irq() or synchronize_sched(). |
312 | 312 | ||
313 | This same limitation also applies to synchronize_rcu_bh() | ||
314 | and synchronize_srcu(), as well as to the asynchronous and | ||
315 | expedited forms of the three primitives, namely call_rcu(), | ||
316 | call_rcu_bh(), call_srcu(), synchronize_rcu_expedited(), | ||
317 | synchronize_rcu_bh_expedited(), and synchronize_srcu_expedited(). | ||
318 | |||
313 | 12. Any lock acquired by an RCU callback must be acquired elsewhere | 319 | 12. Any lock acquired by an RCU callback must be acquired elsewhere |
314 | with softirq disabled, e.g., via spin_lock_irqsave(), | 320 | with softirq disabled, e.g., via spin_lock_irqsave(), |
315 | spin_lock_bh(), etc. Failing to disable irq on a given | 321 | spin_lock_bh(), etc. Failing to disable irq on a given |
diff --git a/Documentation/RCU/stallwarn.txt b/Documentation/RCU/stallwarn.txt index 523364e4e1f1..1927151b386b 100644 --- a/Documentation/RCU/stallwarn.txt +++ b/Documentation/RCU/stallwarn.txt | |||
@@ -99,7 +99,7 @@ In kernels with CONFIG_RCU_FAST_NO_HZ, even more information is | |||
99 | printed: | 99 | printed: |
100 | 100 | ||
101 | INFO: rcu_preempt detected stall on CPU | 101 | INFO: rcu_preempt detected stall on CPU |
102 | 0: (64628 ticks this GP) idle=dd5/3fffffffffffffff/0 drain=0 . timer=-1 | 102 | 0: (64628 ticks this GP) idle=dd5/3fffffffffffffff/0 drain=0 . timer not pending |
103 | (t=65000 jiffies) | 103 | (t=65000 jiffies) |
104 | 104 | ||
105 | The "(64628 ticks this GP)" indicates that this CPU has taken more | 105 | The "(64628 ticks this GP)" indicates that this CPU has taken more |
@@ -116,13 +116,13 @@ number between the two "/"s is the value of the nesting, which will | |||
116 | be a small positive number if in the idle loop and a very large positive | 116 | be a small positive number if in the idle loop and a very large positive |
117 | number (as shown above) otherwise. | 117 | number (as shown above) otherwise. |
118 | 118 | ||
119 | For CONFIG_RCU_FAST_NO_HZ kernels, the "drain=0" indicates that the | 119 | For CONFIG_RCU_FAST_NO_HZ kernels, the "drain=0" indicates that the CPU is |
120 | CPU is not in the process of trying to force itself into dyntick-idle | 120 | not in the process of trying to force itself into dyntick-idle state, the |
121 | state, the "." indicates that the CPU has not given up forcing RCU | 121 | "." indicates that the CPU has not given up forcing RCU into dyntick-idle |
122 | into dyntick-idle mode (it would be "H" otherwise), and the "timer=-1" | 122 | mode (it would be "H" otherwise), and the "timer not pending" indicates |
123 | indicates that the CPU has not recented forced RCU into dyntick-idle | 123 | that the CPU has not recently forced RCU into dyntick-idle mode (it |
124 | mode (it would otherwise indicate the number of microseconds remaining | 124 | would otherwise indicate the number of microseconds remaining in this |
125 | in this forced state). | 125 | forced state). |
126 | 126 | ||
127 | 127 | ||
128 | Multiple Warnings From One Stall | 128 | Multiple Warnings From One Stall |
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt index f6f15ce39903..672d19083252 100644 --- a/Documentation/RCU/trace.txt +++ b/Documentation/RCU/trace.txt | |||
@@ -333,23 +333,23 @@ o Each element of the form "1/1 0:127 ^0" represents one struct | |||
333 | The output of "cat rcu/rcu_pending" looks as follows: | 333 | The output of "cat rcu/rcu_pending" looks as follows: |
334 | 334 | ||
335 | rcu_sched: | 335 | rcu_sched: |
336 | 0 np=255892 qsp=53936 rpq=85 cbr=0 cng=14417 gpc=10033 gps=24320 nf=6445 nn=146741 | 336 | 0 np=255892 qsp=53936 rpq=85 cbr=0 cng=14417 gpc=10033 gps=24320 nn=146741 |
337 | 1 np=261224 qsp=54638 rpq=33 cbr=0 cng=25723 gpc=16310 gps=2849 nf=5912 nn=155792 | 337 | 1 np=261224 qsp=54638 rpq=33 cbr=0 cng=25723 gpc=16310 gps=2849 nn=155792 |
338 | 2 np=237496 qsp=49664 rpq=23 cbr=0 cng=2762 gpc=45478 gps=1762 nf=1201 nn=136629 | 338 | 2 np=237496 qsp=49664 rpq=23 cbr=0 cng=2762 gpc=45478 gps=1762 nn=136629 |
339 | 3 np=236249 qsp=48766 rpq=98 cbr=0 cng=286 gpc=48049 gps=1218 nf=207 nn=137723 | 339 | 3 np=236249 qsp=48766 rpq=98 cbr=0 cng=286 gpc=48049 gps=1218 nn=137723 |
340 | 4 np=221310 qsp=46850 rpq=7 cbr=0 cng=26 gpc=43161 gps=4634 nf=3529 nn=123110 | 340 | 4 np=221310 qsp=46850 rpq=7 cbr=0 cng=26 gpc=43161 gps=4634 nn=123110 |
341 | 5 np=237332 qsp=48449 rpq=9 cbr=0 cng=54 gpc=47920 gps=3252 nf=201 nn=137456 | 341 | 5 np=237332 qsp=48449 rpq=9 cbr=0 cng=54 gpc=47920 gps=3252 nn=137456 |
342 | 6 np=219995 qsp=46718 rpq=12 cbr=0 cng=50 gpc=42098 gps=6093 nf=4202 nn=120834 | 342 | 6 np=219995 qsp=46718 rpq=12 cbr=0 cng=50 gpc=42098 gps=6093 nn=120834 |
343 | 7 np=249893 qsp=49390 rpq=42 cbr=0 cng=72 gpc=38400 gps=17102 nf=41 nn=144888 | 343 | 7 np=249893 qsp=49390 rpq=42 cbr=0 cng=72 gpc=38400 gps=17102 nn=144888 |
344 | rcu_bh: | 344 | rcu_bh: |
345 | 0 np=146741 qsp=1419 rpq=6 cbr=0 cng=6 gpc=0 gps=0 nf=2 nn=145314 | 345 | 0 np=146741 qsp=1419 rpq=6 cbr=0 cng=6 gpc=0 gps=0 nn=145314 |
346 | 1 np=155792 qsp=12597 rpq=3 cbr=0 cng=0 gpc=4 gps=8 nf=3 nn=143180 | 346 | 1 np=155792 qsp=12597 rpq=3 cbr=0 cng=0 gpc=4 gps=8 nn=143180 |
347 | 2 np=136629 qsp=18680 rpq=1 cbr=0 cng=0 gpc=7 gps=6 nf=0 nn=117936 | 347 | 2 np=136629 qsp=18680 rpq=1 cbr=0 cng=0 gpc=7 gps=6 nn=117936 |
348 | 3 np=137723 qsp=2843 rpq=0 cbr=0 cng=0 gpc=10 gps=7 nf=0 nn=134863 | 348 | 3 np=137723 qsp=2843 rpq=0 cbr=0 cng=0 gpc=10 gps=7 nn=134863 |
349 | 4 np=123110 qsp=12433 rpq=0 cbr=0 cng=0 gpc=4 gps=2 nf=0 nn=110671 | 349 | 4 np=123110 qsp=12433 rpq=0 cbr=0 cng=0 gpc=4 gps=2 nn=110671 |
350 | 5 np=137456 qsp=4210 rpq=1 cbr=0 cng=0 gpc=6 gps=5 nf=0 nn=133235 | 350 | 5 np=137456 qsp=4210 rpq=1 cbr=0 cng=0 gpc=6 gps=5 nn=133235 |
351 | 6 np=120834 qsp=9902 rpq=2 cbr=0 cng=0 gpc=6 gps=3 nf=2 nn=110921 | 351 | 6 np=120834 qsp=9902 rpq=2 cbr=0 cng=0 gpc=6 gps=3 nn=110921 |
352 | 7 np=144888 qsp=26336 rpq=0 cbr=0 cng=0 gpc=8 gps=2 nf=0 nn=118542 | 352 | 7 np=144888 qsp=26336 rpq=0 cbr=0 cng=0 gpc=8 gps=2 nn=118542 |
353 | 353 | ||
354 | As always, this is once again split into "rcu_sched" and "rcu_bh" | 354 | As always, this is once again split into "rcu_sched" and "rcu_bh" |
355 | portions, with CONFIG_TREE_PREEMPT_RCU kernels having an additional | 355 | portions, with CONFIG_TREE_PREEMPT_RCU kernels having an additional |
@@ -377,17 +377,6 @@ o "gpc" is the number of times that an old grace period had | |||
377 | o "gps" is the number of times that a new grace period had started, | 377 | o "gps" is the number of times that a new grace period had started, |
378 | but this CPU was not yet aware of it. | 378 | but this CPU was not yet aware of it. |
379 | 379 | ||
380 | o "nf" is the number of times that this CPU suspected that the | ||
381 | current grace period had run for too long, and thus needed to | ||
382 | be forced. | ||
383 | |||
384 | Please note that "forcing" consists of sending resched IPIs | ||
385 | to holdout CPUs. If that CPU really still is in an old RCU | ||
386 | read-side critical section, then we really do have to wait for it. | ||
387 | The assumption behing "forcing" is that the CPU is not still in | ||
388 | an old RCU read-side critical section, but has not yet responded | ||
389 | for some other reason. | ||
390 | |||
391 | o "nn" is the number of times that this CPU needed nothing. Alert | 380 | o "nn" is the number of times that this CPU needed nothing. Alert |
392 | readers will note that the rcu "nn" number for a given CPU very | 381 | readers will note that the rcu "nn" number for a given CPU very |
393 | closely matches the rcu_bh "np" number for that same CPU. This | 382 | closely matches the rcu_bh "np" number for that same CPU. This |
diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt index 69ee188515e7..bf0f6de2aa00 100644 --- a/Documentation/RCU/whatisRCU.txt +++ b/Documentation/RCU/whatisRCU.txt | |||
@@ -873,7 +873,7 @@ d. Do you need to treat NMI handlers, hardirq handlers, | |||
873 | and code segments with preemption disabled (whether | 873 | and code segments with preemption disabled (whether |
874 | via preempt_disable(), local_irq_save(), local_bh_disable(), | 874 | via preempt_disable(), local_irq_save(), local_bh_disable(), |
875 | or some other mechanism) as if they were explicit RCU readers? | 875 | or some other mechanism) as if they were explicit RCU readers? |
876 | If so, you need RCU-sched. | 876 | If so, RCU-sched is the only choice that will work for you. |
877 | 877 | ||
878 | e. Do you need RCU grace periods to complete even in the face | 878 | e. Do you need RCU grace periods to complete even in the face |
879 | of softirq monopolization of one or more of the CPUs? For | 879 | of softirq monopolization of one or more of the CPUs? For |
@@ -884,7 +884,12 @@ f. Is your workload too update-intensive for normal use of | |||
884 | RCU, but inappropriate for other synchronization mechanisms? | 884 | RCU, but inappropriate for other synchronization mechanisms? |
885 | If so, consider SLAB_DESTROY_BY_RCU. But please be careful! | 885 | If so, consider SLAB_DESTROY_BY_RCU. But please be careful! |
886 | 886 | ||
887 | g. Otherwise, use RCU. | 887 | g. Do you need read-side critical sections that are respected |
888 | even though they are in the middle of the idle loop, during | ||
889 | user-mode execution, or on an offlined CPU? If so, SRCU is the | ||
890 | only choice that will work for you. | ||
891 | |||
892 | h. Otherwise, use RCU. | ||
888 | 893 | ||
889 | Of course, this all assumes that you have determined that RCU is in fact | 894 | Of course, this all assumes that you have determined that RCU is in fact |
890 | the right tool for your job. | 895 | the right tool for your job. |
diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c index f6318f6d7baf..6f706aca2049 100644 --- a/Documentation/accounting/getdelays.c +++ b/Documentation/accounting/getdelays.c | |||
@@ -98,10 +98,9 @@ static int create_nl_socket(int protocol) | |||
98 | if (rcvbufsz) | 98 | if (rcvbufsz) |
99 | if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, | 99 | if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, |
100 | &rcvbufsz, sizeof(rcvbufsz)) < 0) { | 100 | &rcvbufsz, sizeof(rcvbufsz)) < 0) { |
101 | fprintf(stderr, "Unable to set socket rcv buf size " | 101 | fprintf(stderr, "Unable to set socket rcv buf size to %d\n", |
102 | "to %d\n", | ||
103 | rcvbufsz); | 102 | rcvbufsz); |
104 | return -1; | 103 | goto error; |
105 | } | 104 | } |
106 | 105 | ||
107 | memset(&local, 0, sizeof(local)); | 106 | memset(&local, 0, sizeof(local)); |
diff --git a/Documentation/arm/Marvell/README b/Documentation/arm/Marvell/README new file mode 100644 index 000000000000..8f08a86e03b7 --- /dev/null +++ b/Documentation/arm/Marvell/README | |||
@@ -0,0 +1,232 @@ | |||
1 | ARM Marvell SoCs | ||
2 | ================ | ||
3 | |||
4 | This document lists all the ARM Marvell SoCs that are currently | ||
5 | supported in mainline by the Linux kernel. As the Marvell families of | ||
6 | SoCs are large and complex, it is hard to understand where the support | ||
7 | for a particular SoC is available in the Linux kernel. This document | ||
8 | tries to help in understanding where those SoCs are supported, and to | ||
9 | match them with their corresponding public datasheet, when available. | ||
10 | |||
11 | Orion family | ||
12 | ------------ | ||
13 | |||
14 | Flavors: | ||
15 | 88F5082 | ||
16 | 88F5181 | ||
17 | 88F5181L | ||
18 | 88F5182 | ||
19 | Datasheet : http://www.embeddedarm.com/documentation/third-party/MV88F5182-datasheet.pdf | ||
20 | Programmer's User Guide : http://www.embeddedarm.com/documentation/third-party/MV88F5182-opensource-manual.pdf | ||
21 | User Manual : http://www.embeddedarm.com/documentation/third-party/MV88F5182-usermanual.pdf | ||
22 | 88F5281 | ||
23 | Datasheet : http://www.ocmodshop.com/images/reviews/networking/qnap_ts409u/marvel_88f5281_data_sheet.pdf | ||
24 | 88F6183 | ||
25 | Core: Feroceon ARMv5 compatible | ||
26 | Linux kernel mach directory: arch/arm/mach-orion5x | ||
27 | Linux kernel plat directory: arch/arm/plat-orion | ||
28 | |||
29 | Kirkwood family | ||
30 | --------------- | ||
31 | |||
32 | Flavors: | ||
33 | 88F6282 a.k.a Armada 300 | ||
34 | Product Brief : http://www.marvell.com/embedded-processors/armada-300/assets/armada_310.pdf | ||
35 | 88F6283 a.k.a Armada 310 | ||
36 | Product Brief : http://www.marvell.com/embedded-processors/armada-300/assets/armada_310.pdf | ||
37 | 88F6190 | ||
38 | Product Brief : http://www.marvell.com/embedded-processors/kirkwood/assets/88F6190-003_WEB.pdf | ||
39 | Hardware Spec : http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F619x_OpenSource.pdf | ||
40 | Functional Spec: http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf | ||
41 | 88F6192 | ||
42 | Product Brief : http://www.marvell.com/embedded-processors/kirkwood/assets/88F6192-003_ver1.pdf | ||
43 | Hardware Spec : http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F619x_OpenSource.pdf | ||
44 | Functional Spec: http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf | ||
45 | 88F6182 | ||
46 | 88F6180 | ||
47 | Product Brief : http://www.marvell.com/embedded-processors/kirkwood/assets/88F6180-003_ver1.pdf | ||
48 | Hardware Spec : http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F6180_OpenSource.pdf | ||
49 | Functional Spec: http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf | ||
50 | 88F6281 | ||
51 | Product Brief : http://www.marvell.com/embedded-processors/kirkwood/assets/88F6281-004_ver1.pdf | ||
52 | Hardware Spec : http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F6281_OpenSource.pdf | ||
53 | Functional Spec: http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf | ||
54 | Homepage: http://www.marvell.com/embedded-processors/kirkwood/ | ||
55 | Core: Feroceon ARMv5 compatible | ||
56 | Linux kernel mach directory: arch/arm/mach-kirkwood | ||
57 | Linux kernel plat directory: arch/arm/plat-orion | ||
58 | |||
59 | Discovery family | ||
60 | ---------------- | ||
61 | |||
62 | Flavors: | ||
63 | MV78100 | ||
64 | Product Brief : http://www.marvell.com/embedded-processors/discovery-innovation/assets/MV78100-003_WEB.pdf | ||
65 | Hardware Spec : http://www.marvell.com/embedded-processors/discovery-innovation/assets/HW_MV78100_OpenSource.pdf | ||
66 | Functional Spec: http://www.marvell.com/embedded-processors/discovery-innovation/assets/FS_MV76100_78100_78200_OpenSource.pdf | ||
67 | MV78200 | ||
68 | Product Brief : http://www.marvell.com/embedded-processors/discovery-innovation/assets/MV78200-002_WEB.pdf | ||
69 | Hardware Spec : http://www.marvell.com/embedded-processors/discovery-innovation/assets/HW_MV78200_OpenSource.pdf | ||
70 | Functional Spec: http://www.marvell.com/embedded-processors/discovery-innovation/assets/FS_MV76100_78100_78200_OpenSource.pdf | ||
71 | MV76100 | ||
72 | Not supported by the Linux kernel. | ||
73 | |||
74 | Core: Feroceon ARMv5 compatible | ||
75 | |||
76 | Linux kernel mach directory: arch/arm/mach-mv78xx0 | ||
77 | Linux kernel plat directory: arch/arm/plat-orion | ||
78 | |||
79 | EBU Armada family | ||
80 | ----------------- | ||
81 | |||
82 | Armada 370 Flavors: | ||
83 | 88F6710 | ||
84 | 88F6707 | ||
85 | 88F6W11 | ||
86 | |||
87 | Armada XP Flavors: | ||
88 | MV78230 | ||
89 | MV78260 | ||
90 | MV78460 | ||
91 | |||
92 | Product Brief: http://www.marvell.com/embedded-processors/armada-xp/assets/Marvell-ArmadaXP-SoC-product%20brief.pdf | ||
93 | No public datasheet available. | ||
94 | |||
95 | Core: Sheeva ARMv7 compatible | ||
96 | |||
97 | Linux kernel mach directory: arch/arm/mach-mvebu | ||
98 | Linux kernel plat directory: none | ||
99 | |||
100 | Avanta family | ||
101 | ------------- | ||
102 | |||
103 | Flavors: | ||
104 | 88F6510 | ||
105 | 88F6530P | ||
106 | 88F6550 | ||
107 | 88F6560 | ||
108 | Homepage : http://www.marvell.com/broadband/ | ||
109 | Product Brief: http://www.marvell.com/broadband/assets/Marvell_Avanta_88F6510_305_060-001_product_brief.pdf | ||
110 | No public datasheet available. | ||
111 | |||
112 | Core: ARMv5 compatible | ||
113 | |||
114 | Linux kernel mach directory: no code in mainline yet, planned for the future | ||
115 | Linux kernel plat directory: no code in mainline yet, planned for the future | ||
116 | |||
117 | Dove family (application processor) | ||
118 | ----------------------------------- | ||
119 | |||
120 | Flavors: | ||
121 | 88AP510 a.k.a Armada 510 | ||
122 | Product Brief : http://www.marvell.com/application-processors/armada-500/assets/Marvell_Armada510_SoC.pdf | ||
123 | Hardware Spec : http://www.marvell.com/application-processors/armada-500/assets/Armada-510-Hardware-Spec.pdf | ||
124 | Functional Spec : http://www.marvell.com/application-processors/armada-500/assets/Armada-510-Functional-Spec.pdf | ||
125 | Homepage: http://www.marvell.com/application-processors/armada-500/ | ||
126 | Core: ARMv7 compatible | ||
127 | Directory: arch/arm/mach-dove | ||
128 | |||
129 | PXA 2xx/3xx/93x/95x family | ||
130 | -------------------------- | ||
131 | |||
132 | Flavors: | ||
133 | PXA21x, PXA25x, PXA26x | ||
134 | Application processor only | ||
135 | Core: ARMv5 XScale core | ||
136 | PXA270, PXA271, PXA272 | ||
137 | Product Brief : http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_pb.pdf | ||
138 | Design guide : http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_design_guide.pdf | ||
139 | Developers manual : http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_dev_man.pdf | ||
140 | Specification : http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_emts.pdf | ||
141 | Specification update : http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_spec_update.pdf | ||
142 | Application processor only | ||
143 | Core: ARMv5 XScale core | ||
144 | PXA300, PXA310, PXA320 | ||
145 | PXA 300 Product Brief : http://www.marvell.com/application-processors/pxa-family/assets/PXA300_PB_R4.pdf | ||
146 | PXA 310 Product Brief : http://www.marvell.com/application-processors/pxa-family/assets/PXA310_PB_R4.pdf | ||
147 | PXA 320 Product Brief : http://www.marvell.com/application-processors/pxa-family/assets/PXA320_PB_R4.pdf | ||
148 | Design guide : http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_Design_Guide.pdf | ||
149 | Developers manual : http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_Developers_Manual.zip | ||
150 | Specifications : http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_EMTS.pdf | ||
151 | Specification Update : http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_Spec_Update.zip | ||
152 | Reference Manual : http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_TavorP_BootROM_Ref_Manual.pdf | ||
153 | Application processor only | ||
154 | Core: ARMv5 XScale core | ||
155 | PXA930, PXA935 | ||
156 | Application processor with Communication processor | ||
157 | Core: ARMv5 XScale core | ||
158 | PXA955 | ||
159 | Application processor with Communication processor | ||
160 | Core: ARMv7 compatible Sheeva PJ4 core | ||
161 | |||
162 | Comments: | ||
163 | |||
164 | * This line of SoCs originates from the XScale family developed by | ||
165 | Intel and acquired by Marvell in ~2006. The PXA21x, PXA25x, | ||
166 | PXA26x, PXA27x, PXA3xx and PXA93x were developed by Intel, while | ||
167 | the later PXA95x were developed by Marvell. | ||
168 | |||
169 | * Due to their XScale origin, these SoCs have virtually nothing in | ||
170 | common with the other (Kirkwood, Dove, etc.) families of Marvell | ||
171 | SoCs, except with the MMP/MMP2 family of SoCs. | ||
172 | |||
173 | Linux kernel mach directory: arch/arm/mach-pxa | ||
174 | Linux kernel plat directory: arch/arm/plat-pxa | ||
175 | |||
176 | MMP/MMP2 family (communication processor) | ||
177 | ----------------------------------------- | ||
178 | |||
179 | Flavors: | ||
180 | PXA168, a.k.a Armada 168 | ||
181 | Homepage : http://www.marvell.com/application-processors/armada-100/armada-168.jsp | ||
182 | Product brief : http://www.marvell.com/application-processors/armada-100/assets/pxa_168_pb.pdf | ||
183 | Hardware manual : http://www.marvell.com/application-processors/armada-100/assets/armada_16x_datasheet.pdf | ||
184 | Software manual : http://www.marvell.com/application-processors/armada-100/assets/armada_16x_software_manual.pdf | ||
185 | Specification update : http://www.marvell.com/application-processors/armada-100/assets/ARMADA16x_Spec_update.pdf | ||
186 | Boot ROM manual : http://www.marvell.com/application-processors/armada-100/assets/armada_16x_ref_manual.pdf | ||
187 | App node package : http://www.marvell.com/application-processors/armada-100/assets/armada_16x_app_note_package.pdf | ||
188 | Application processor only | ||
189 | Core: ARMv5 compatible Marvell PJ1 (Mohawk) | ||
190 | PXA910 | ||
191 | Homepage : http://www.marvell.com/communication-processors/pxa910/ | ||
192 | Product Brief : http://www.marvell.com/communication-processors/pxa910/assets/Marvell_PXA910_Platform-001_PB_final.pdf | ||
193 | Application processor with Communication processor | ||
194 | Core: ARMv5 compatible Marvell PJ1 (Mohawk) | ||
195 | MMP2, a.k.a Armada 610 | ||
196 | Product Brief : http://www.marvell.com/application-processors/armada-600/assets/armada610_pb.pdf | ||
197 | Application processor only | ||
198 | Core: ARMv7 compatible Sheeva PJ4 core | ||
199 | |||
200 | Comments: | ||
201 | |||
202 | * This line of SoCs originates from the XScale family developed by | ||
203 | Intel and acquired by Marvell in ~2006. All the processors of | ||
204 | this MMP/MMP2 family were developed by Marvell. | ||
205 | |||
206 | * Due to their XScale origin, these SoCs have virtually nothing in | ||
207 | common with the other (Kirkwood, Dove, etc.) families of Marvell | ||
208 | SoCs, except with the PXA family of SoCs listed above. | ||
209 | |||
210 | Linux kernel mach directory: arch/arm/mach-mmp | ||
211 | Linux kernel plat directory: arch/arm/plat-pxa | ||
212 | |||
213 | Long-term plans | ||
214 | --------------- | ||
215 | |||
216 | * Unify the mach-dove/, mach-mv78xx0/, mach-orion5x/ and | ||
217 | mach-kirkwood/ into the mach-mvebu/ to support all SoCs from the | ||
218 | Marvell EBU (Engineering Business Unit) in a single mach-<foo> | ||
219 | directory. The plat-orion/ would therefore disappear. | ||
220 | |||
221 | * Unify the mach-mmp/ and mach-pxa/ into the same mach-pxa | ||
222 | directory. The plat-pxa/ would therefore disappear. | ||
223 | |||
224 | Credits | ||
225 | ------- | ||
226 | |||
227 | Maen Suleiman <maen@marvell.com> | ||
228 | Lior Amsalem <alior@marvell.com> | ||
229 | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | ||
230 | Andrew Lunn <andrew@lunn.ch> | ||
231 | Nicolas Pitre <nico@fluxnic.net> | ||
232 | Eric Miao <eric.y.miao@gmail.com> | ||
diff --git a/Documentation/arm/Samsung-S3C24XX/GPIO.txt b/Documentation/arm/Samsung-S3C24XX/GPIO.txt index 816d6071669e..8b46c79679c4 100644 --- a/Documentation/arm/Samsung-S3C24XX/GPIO.txt +++ b/Documentation/arm/Samsung-S3C24XX/GPIO.txt | |||
@@ -1,4 +1,4 @@ | |||
1 | S3C2410 GPIO Control | 1 | S3C24XX GPIO Control |
2 | ==================== | 2 | ==================== |
3 | 3 | ||
4 | Introduction | 4 | Introduction |
@@ -12,7 +12,7 @@ Introduction | |||
12 | of the s3c2410 GPIO system, please read the Samsung provided | 12 | of the s3c2410 GPIO system, please read the Samsung provided |
13 | data-sheet/users manual to find out the complete list. | 13 | data-sheet/users manual to find out the complete list. |
14 | 14 | ||
15 | See Documentation/arm/Samsung/GPIO.txt for the core implemetation. | 15 | See Documentation/arm/Samsung/GPIO.txt for the core implementation. |
16 | 16 | ||
17 | 17 | ||
18 | GPIOLIB | 18 | GPIOLIB |
@@ -41,8 +41,8 @@ GPIOLIB | |||
41 | GPIOLIB conversion | 41 | GPIOLIB conversion |
42 | ------------------ | 42 | ------------------ |
43 | 43 | ||
44 | If you need to convert your board or driver to use gpiolib from the exiting | 44 | If you need to convert your board or driver to use gpiolib from the phased |
45 | s3c2410 api, then here are some notes on the process. | 45 | out s3c2410 API, then here are some notes on the process. |
46 | 46 | ||
47 | 1) If your board is exclusively using an GPIO, say to control peripheral | 47 | 1) If your board is exclusively using an GPIO, say to control peripheral |
48 | power, then it will require to claim the gpio with gpio_request() before | 48 | power, then it will require to claim the gpio with gpio_request() before |
@@ -55,7 +55,7 @@ s3c2410 api, then here are some notes on the process. | |||
55 | as they have the same arguments, and can either take the pin specific | 55 | as they have the same arguments, and can either take the pin specific |
56 | values, or the more generic special-function-number arguments. | 56 | values, or the more generic special-function-number arguments. |
57 | 57 | ||
58 | 3) s3c2410_gpio_pullup() changs have the problem that whilst the | 58 | 3) s3c2410_gpio_pullup() changes have the problem that whilst the |
59 | s3c2410_gpio_pullup(x, 1) can be easily translated to the | 59 | s3c2410_gpio_pullup(x, 1) can be easily translated to the |
60 | s3c_gpio_setpull(x, S3C_GPIO_PULL_NONE), the s3c2410_gpio_pullup(x, 0) | 60 | s3c_gpio_setpull(x, S3C_GPIO_PULL_NONE), the s3c2410_gpio_pullup(x, 0) |
61 | are not so easy. | 61 | are not so easy. |
@@ -74,7 +74,7 @@ s3c2410 api, then here are some notes on the process. | |||
74 | when using gpio_get_value() on an output pin (s3c2410_gpio_getpin | 74 | when using gpio_get_value() on an output pin (s3c2410_gpio_getpin |
75 | would return the value the pin is supposed to be outputting). | 75 | would return the value the pin is supposed to be outputting). |
76 | 76 | ||
77 | 6) s3c2410_gpio_getirq() should be directly replacable with the | 77 | 6) s3c2410_gpio_getirq() should be directly replaceable with the |
78 | gpio_to_irq() call. | 78 | gpio_to_irq() call. |
79 | 79 | ||
80 | The s3c2410_gpio and gpio_ calls have always operated on the same gpio | 80 | The s3c2410_gpio and gpio_ calls have always operated on the same gpio |
@@ -105,7 +105,7 @@ PIN Numbers | |||
105 | ----------- | 105 | ----------- |
106 | 106 | ||
107 | Each pin has an unique number associated with it in regs-gpio.h, | 107 | Each pin has an unique number associated with it in regs-gpio.h, |
108 | eg S3C2410_GPA(0) or S3C2410_GPF(1). These defines are used to tell | 108 | e.g. S3C2410_GPA(0) or S3C2410_GPF(1). These defines are used to tell |
109 | the GPIO functions which pin is to be used. | 109 | the GPIO functions which pin is to be used. |
110 | 110 | ||
111 | With the conversion to gpiolib, there is no longer a direct conversion | 111 | With the conversion to gpiolib, there is no longer a direct conversion |
@@ -120,31 +120,27 @@ Configuring a pin | |||
120 | The following function allows the configuration of a given pin to | 120 | The following function allows the configuration of a given pin to |
121 | be changed. | 121 | be changed. |
122 | 122 | ||
123 | void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function); | 123 | void s3c_gpio_cfgpin(unsigned int pin, unsigned int function); |
124 | 124 | ||
125 | Eg: | 125 | e.g.: |
126 | 126 | ||
127 | s3c2410_gpio_cfgpin(S3C2410_GPA(0), S3C2410_GPA0_ADDR0); | 127 | s3c_gpio_cfgpin(S3C2410_GPA(0), S3C_GPIO_SFN(1)); |
128 | s3c2410_gpio_cfgpin(S3C2410_GPE(8), S3C2410_GPE8_SDDAT1); | 128 | s3c_gpio_cfgpin(S3C2410_GPE(8), S3C_GPIO_SFN(2)); |
129 | 129 | ||
130 | which would turn GPA(0) into the lowest Address line A0, and set | 130 | which would turn GPA(0) into the lowest Address line A0, and set |
131 | GPE(8) to be connected to the SDIO/MMC controller's SDDAT1 line. | 131 | GPE(8) to be connected to the SDIO/MMC controller's SDDAT1 line. |
132 | 132 | ||
133 | The s3c_gpio_cfgpin() call is a functional replacement for this call. | ||
134 | |||
135 | 133 | ||
136 | Reading the current configuration | 134 | Reading the current configuration |
137 | --------------------------------- | 135 | --------------------------------- |
138 | 136 | ||
139 | The current configuration of a pin can be read by using: | 137 | The current configuration of a pin can be read by using standard |
138 | gpiolib function: | ||
140 | 139 | ||
141 | s3c2410_gpio_getcfg(unsigned int pin); | 140 | s3c_gpio_getcfg(unsigned int pin); |
142 | 141 | ||
143 | The return value will be from the same set of values which can be | 142 | The return value will be from the same set of values which can be |
144 | passed to s3c2410_gpio_cfgpin(). | 143 | passed to s3c_gpio_cfgpin(). |
145 | |||
146 | The s3c_gpio_getcfg() call should be a functional replacement for | ||
147 | this call. | ||
148 | 144 | ||
149 | 145 | ||
150 | Configuring a pull-up resistor | 146 | Configuring a pull-up resistor |
@@ -154,61 +150,33 @@ Configuring a pull-up resistor | |||
154 | pull-up resistors enabled. This can be configured by the following | 150 | pull-up resistors enabled. This can be configured by the following |
155 | function: | 151 | function: |
156 | 152 | ||
157 | void s3c2410_gpio_pullup(unsigned int pin, unsigned int to); | 153 | void s3c_gpio_setpull(unsigned int pin, unsigned int to); |
158 | |||
159 | Where the to value is zero to set the pull-up off, and 1 to enable | ||
160 | the specified pull-up. Any other values are currently undefined. | ||
161 | |||
162 | The s3c_gpio_setpull() offers similar functionality, but with the | ||
163 | ability to encode whether the pull is up or down. Currently there | ||
164 | is no 'just on' state, so up or down must be selected. | ||
165 | |||
166 | |||
167 | Getting the state of a PIN | ||
168 | -------------------------- | ||
169 | |||
170 | The state of a pin can be read by using the function: | ||
171 | |||
172 | unsigned int s3c2410_gpio_getpin(unsigned int pin); | ||
173 | 154 | ||
174 | This will return either zero or non-zero. Do not count on this | 155 | Where the to value is S3C_GPIO_PULL_NONE to set the pull-up off, |
175 | function returning 1 if the pin is set. | 156 | and S3C_GPIO_PULL_UP to enable the specified pull-up. Any other |
157 | values are currently undefined. | ||
176 | 158 | ||
177 | This call is now implemented by the relevant gpiolib calls, convert | ||
178 | your board or driver to use gpiolib. | ||
179 | |||
180 | |||
181 | Setting the state of a PIN | ||
182 | -------------------------- | ||
183 | |||
184 | The value an pin is outputing can be modified by using the following: | ||
185 | 159 | ||
186 | void s3c2410_gpio_setpin(unsigned int pin, unsigned int to); | 160 | Getting and setting the state of a PIN |
161 | -------------------------------------- | ||
187 | 162 | ||
188 | Which sets the given pin to the value. Use 0 to write 0, and 1 to | 163 | These calls are now implemented by the relevant gpiolib calls, convert |
189 | set the output to 1. | ||
190 | |||
191 | This call is now implemented by the relevant gpiolib calls, convert | ||
192 | your board or driver to use gpiolib. | 164 | your board or driver to use gpiolib. |
193 | 165 | ||
194 | 166 | ||
195 | Getting the IRQ number associated with a PIN | 167 | Getting the IRQ number associated with a PIN |
196 | -------------------------------------------- | 168 | -------------------------------------------- |
197 | 169 | ||
198 | The following function can map the given pin number to an IRQ | 170 | A standard gpiolib function can map the given pin number to an IRQ |
199 | number to pass to the IRQ system. | 171 | number to pass to the IRQ system. |
200 | 172 | ||
201 | int s3c2410_gpio_getirq(unsigned int pin); | 173 | int gpio_to_irq(unsigned int pin); |
202 | 174 | ||
203 | Note, not all pins have an IRQ. | 175 | Note, not all pins have an IRQ. |
204 | 176 | ||
205 | This call is now implemented by the relevant gpiolib calls, convert | ||
206 | your board or driver to use gpiolib. | ||
207 | |||
208 | 177 | ||
209 | Authour | 178 | Author |
210 | ------- | 179 | ------- |
211 | 180 | ||
212 | |||
213 | Ben Dooks, 03 October 2004 | 181 | Ben Dooks, 03 October 2004 |
214 | Copyright 2004 Ben Dooks, Simtec Electronics | 182 | Copyright 2004 Ben Dooks, Simtec Electronics |
diff --git a/Documentation/arm/Samsung/GPIO.txt b/Documentation/arm/Samsung/GPIO.txt index 513f2562c1a3..795adfd88081 100644 --- a/Documentation/arm/Samsung/GPIO.txt +++ b/Documentation/arm/Samsung/GPIO.txt | |||
@@ -5,14 +5,14 @@ Introduction | |||
5 | ------------ | 5 | ------------ |
6 | 6 | ||
7 | This outlines the Samsung GPIO implementation and the architecture | 7 | This outlines the Samsung GPIO implementation and the architecture |
8 | specific calls provided alongisde the drivers/gpio core. | 8 | specific calls provided alongside the drivers/gpio core. |
9 | 9 | ||
10 | 10 | ||
11 | S3C24XX (Legacy) | 11 | S3C24XX (Legacy) |
12 | ---------------- | 12 | ---------------- |
13 | 13 | ||
14 | See Documentation/arm/Samsung-S3C24XX/GPIO.txt for more information | 14 | See Documentation/arm/Samsung-S3C24XX/GPIO.txt for more information |
15 | about these devices. Their implementation is being brought into line | 15 | about these devices. Their implementation has been brought into line |
16 | with the core samsung implementation described in this document. | 16 | with the core samsung implementation described in this document. |
17 | 17 | ||
18 | 18 | ||
@@ -29,7 +29,7 @@ GPIO numbering is synchronised between the Samsung and gpiolib system. | |||
29 | PIN configuration | 29 | PIN configuration |
30 | ----------------- | 30 | ----------------- |
31 | 31 | ||
32 | Pin configuration is specific to the Samsung architecutre, with each SoC | 32 | Pin configuration is specific to the Samsung architecture, with each SoC |
33 | registering the necessary information for the core gpio configuration | 33 | registering the necessary information for the core gpio configuration |
34 | implementation to configure pins as necessary. | 34 | implementation to configure pins as necessary. |
35 | 35 | ||
@@ -38,5 +38,3 @@ driver or machine to change gpio configuration. | |||
38 | 38 | ||
39 | See arch/arm/plat-samsung/include/plat/gpio-cfg.h for more information | 39 | See arch/arm/plat-samsung/include/plat/gpio-cfg.h for more information |
40 | on these functions. | 40 | on these functions. |
41 | |||
42 | |||
diff --git a/Documentation/arm/memory.txt b/Documentation/arm/memory.txt index 208a2d465b92..4bfb9ffbdbc1 100644 --- a/Documentation/arm/memory.txt +++ b/Documentation/arm/memory.txt | |||
@@ -51,6 +51,9 @@ ffc00000 ffefffff DMA memory mapping region. Memory returned | |||
51 | ff000000 ffbfffff Reserved for future expansion of DMA | 51 | ff000000 ffbfffff Reserved for future expansion of DMA |
52 | mapping region. | 52 | mapping region. |
53 | 53 | ||
54 | fee00000 feffffff Mapping of PCI I/O space. This is a static | ||
55 | mapping within the vmalloc space. | ||
56 | |||
54 | VMALLOC_START VMALLOC_END-1 vmalloc() / ioremap() space. | 57 | VMALLOC_START VMALLOC_END-1 vmalloc() / ioremap() space. |
55 | Memory returned by vmalloc/ioremap will | 58 | Memory returned by vmalloc/ioremap will |
56 | be dynamically placed in this region. | 59 | be dynamically placed in this region. |
diff --git a/Documentation/arm64/booting.txt b/Documentation/arm64/booting.txt new file mode 100644 index 000000000000..9c4d388daddc --- /dev/null +++ b/Documentation/arm64/booting.txt | |||
@@ -0,0 +1,152 @@ | |||
1 | Booting AArch64 Linux | ||
2 | ===================== | ||
3 | |||
4 | Author: Will Deacon <will.deacon@arm.com> | ||
5 | Date : 07 September 2012 | ||
6 | |||
7 | This document is based on the ARM booting document by Russell King and | ||
8 | is relevant to all public releases of the AArch64 Linux kernel. | ||
9 | |||
10 | The AArch64 exception model is made up of a number of exception levels | ||
11 | (EL0 - EL3), with EL0 and EL1 having a secure and a non-secure | ||
12 | counterpart. EL2 is the hypervisor level and exists only in non-secure | ||
13 | mode. EL3 is the highest priority level and exists only in secure mode. | ||
14 | |||
15 | For the purposes of this document, we will use the term `boot loader' | ||
16 | simply to define all software that executes on the CPU(s) before control | ||
17 | is passed to the Linux kernel. This may include secure monitor and | ||
18 | hypervisor code, or it may just be a handful of instructions for | ||
19 | preparing a minimal boot environment. | ||
20 | |||
21 | Essentially, the boot loader should provide (as a minimum) the | ||
22 | following: | ||
23 | |||
24 | 1. Setup and initialise the RAM | ||
25 | 2. Setup the device tree | ||
26 | 3. Decompress the kernel image | ||
27 | 4. Call the kernel image | ||
28 | |||
29 | |||
30 | 1. Setup and initialise RAM | ||
31 | --------------------------- | ||
32 | |||
33 | Requirement: MANDATORY | ||
34 | |||
35 | The boot loader is expected to find and initialise all RAM that the | ||
36 | kernel will use for volatile data storage in the system. It performs | ||
37 | this in a machine dependent manner. (It may use internal algorithms | ||
38 | to automatically locate and size all RAM, or it may use knowledge of | ||
39 | the RAM in the machine, or any other method the boot loader designer | ||
40 | sees fit.) | ||
41 | |||
42 | |||
43 | 2. Setup the device tree | ||
44 | ------------------------- | ||
45 | |||
46 | Requirement: MANDATORY | ||
47 | |||
48 | The device tree blob (dtb) must be no bigger than 2 megabytes in size | ||
49 | and placed at a 2-megabyte boundary within the first 512 megabytes from | ||
50 | the start of the kernel image. This is to allow the kernel to map the | ||
51 | blob using a single section mapping in the initial page tables. | ||
52 | |||
53 | |||
54 | 3. Decompress the kernel image | ||
55 | ------------------------------ | ||
56 | |||
57 | Requirement: OPTIONAL | ||
58 | |||
59 | The AArch64 kernel does not currently provide a decompressor and | ||
60 | therefore requires decompression (gzip etc.) to be performed by the boot | ||
61 | loader if a compressed Image target (e.g. Image.gz) is used. For | ||
62 | bootloaders that do not implement this requirement, the uncompressed | ||
63 | Image target is available instead. | ||
64 | |||
65 | |||
66 | 4. Call the kernel image | ||
67 | ------------------------ | ||
68 | |||
69 | Requirement: MANDATORY | ||
70 | |||
71 | The decompressed kernel image contains a 32-byte header as follows: | ||
72 | |||
73 | u32 magic = 0x14000008; /* branch to stext, little-endian */ | ||
74 | u32 res0 = 0; /* reserved */ | ||
75 | u64 text_offset; /* Image load offset */ | ||
76 | u64 res1 = 0; /* reserved */ | ||
77 | u64 res2 = 0; /* reserved */ | ||
78 | |||
79 | The image must be placed at the specified offset (currently 0x80000) | ||
80 | from the start of the system RAM and called there. The start of the | ||
81 | system RAM must be aligned to 2MB. | ||
82 | |||
83 | Before jumping into the kernel, the following conditions must be met: | ||
84 | |||
85 | - Quiesce all DMA capable devices so that memory does not get | ||
86 | corrupted by bogus network packets or disk data. This will save | ||
87 | you many hours of debug. | ||
88 | |||
89 | - Primary CPU general-purpose register settings | ||
90 | x0 = physical address of device tree blob (dtb) in system RAM. | ||
91 | x1 = 0 (reserved for future use) | ||
92 | x2 = 0 (reserved for future use) | ||
93 | x3 = 0 (reserved for future use) | ||
94 | |||
95 | - CPU mode | ||
96 | All forms of interrupts must be masked in PSTATE.DAIF (Debug, SError, | ||
97 | IRQ and FIQ). | ||
98 | The CPU must be in either EL2 (RECOMMENDED in order to have access to | ||
99 | the virtualisation extensions) or non-secure EL1. | ||
100 | |||
101 | - Caches, MMUs | ||
102 | The MMU must be off. | ||
103 | Instruction cache may be on or off. | ||
104 | Data cache must be off and invalidated. | ||
105 | External caches (if present) must be configured and disabled. | ||
106 | |||
107 | - Architected timers | ||
108 | CNTFRQ must be programmed with the timer frequency. | ||
109 | If entering the kernel at EL1, CNTHCTL_EL2 must have EL1PCTEN (bit 0) | ||
110 | set where available. | ||
111 | |||
112 | - Coherency | ||
113 | All CPUs to be booted by the kernel must be part of the same coherency | ||
114 | domain on entry to the kernel. This may require IMPLEMENTATION DEFINED | ||
115 | initialisation to enable the receiving of maintenance operations on | ||
116 | each CPU. | ||
117 | |||
118 | - System registers | ||
119 | All writable architected system registers at the exception level where | ||
120 | the kernel image will be entered must be initialised by software at a | ||
121 | higher exception level to prevent execution in an UNKNOWN state. | ||
122 | |||
123 | The boot loader is expected to enter the kernel on each CPU in the | ||
124 | following manner: | ||
125 | |||
126 | - The primary CPU must jump directly to the first instruction of the | ||
127 | kernel image. The device tree blob passed by this CPU must contain | ||
128 | for each CPU node: | ||
129 | |||
130 | 1. An 'enable-method' property. Currently, the only supported value | ||
131 | for this field is the string "spin-table". | ||
132 | |||
133 | 2. A 'cpu-release-addr' property identifying a 64-bit, | ||
134 | zero-initialised memory location. | ||
135 | |||
136 | It is expected that the bootloader will generate these device tree | ||
137 | properties and insert them into the blob prior to kernel entry. | ||
138 | |||
139 | - Any secondary CPUs must spin outside of the kernel in a reserved area | ||
140 | of memory (communicated to the kernel by a /memreserve/ region in the | ||
141 | device tree) polling their cpu-release-addr location, which must be | ||
142 | contained in the reserved region. A wfe instruction may be inserted | ||
143 | to reduce the overhead of the busy-loop and a sev will be issued by | ||
144 | the primary CPU. When a read of the location pointed to by the | ||
145 | cpu-release-addr returns a non-zero value, the CPU must jump directly | ||
146 | to this value. | ||
147 | |||
148 | - Secondary CPU general-purpose register settings | ||
149 | x0 = 0 (reserved for future use) | ||
150 | x1 = 0 (reserved for future use) | ||
151 | x2 = 0 (reserved for future use) | ||
152 | x3 = 0 (reserved for future use) | ||
diff --git a/Documentation/arm64/memory.txt b/Documentation/arm64/memory.txt new file mode 100644 index 000000000000..dbbdcbba75a3 --- /dev/null +++ b/Documentation/arm64/memory.txt | |||
@@ -0,0 +1,73 @@ | |||
1 | Memory Layout on AArch64 Linux | ||
2 | ============================== | ||
3 | |||
4 | Author: Catalin Marinas <catalin.marinas@arm.com> | ||
5 | Date : 20 February 2012 | ||
6 | |||
7 | This document describes the virtual memory layout used by the AArch64 | ||
8 | Linux kernel. The architecture allows up to 4 levels of translation | ||
9 | tables with a 4KB page size and up to 3 levels with a 64KB page size. | ||
10 | |||
11 | AArch64 Linux uses 3 levels of translation tables with the 4KB page | ||
12 | configuration, allowing 39-bit (512GB) virtual addresses for both user | ||
13 | and kernel. With 64KB pages, only 2 levels of translation tables are | ||
14 | used but the memory layout is the same. | ||
15 | |||
16 | User addresses have bits 63:39 set to 0 while the kernel addresses have | ||
17 | the same bits set to 1. TTBRx selection is given by bit 63 of the | ||
18 | virtual address. The swapper_pg_dir contains only kernel (global) | ||
19 | mappings while the user pgd contains only user (non-global) mappings. | ||
20 | The swapper_pgd_dir address is written to TTBR1 and never written to | ||
21 | TTBR0. | ||
22 | |||
23 | |||
24 | AArch64 Linux memory layout: | ||
25 | |||
26 | Start End Size Use | ||
27 | ----------------------------------------------------------------------- | ||
28 | 0000000000000000 0000007fffffffff 512GB user | ||
29 | |||
30 | ffffff8000000000 ffffffbbfffcffff ~240GB vmalloc | ||
31 | |||
32 | ffffffbbfffd0000 ffffffbcfffdffff 64KB [guard page] | ||
33 | |||
34 | ffffffbbfffe0000 ffffffbcfffeffff 64KB PCI I/O space | ||
35 | |||
36 | ffffffbbffff0000 ffffffbcffffffff 64KB [guard page] | ||
37 | |||
38 | ffffffbc00000000 ffffffbdffffffff 8GB vmemmap | ||
39 | |||
40 | ffffffbe00000000 ffffffbffbffffff ~8GB [guard, future vmmemap] | ||
41 | |||
42 | ffffffbffc000000 ffffffbfffffffff 64MB modules | ||
43 | |||
44 | ffffffc000000000 ffffffffffffffff 256GB memory | ||
45 | |||
46 | |||
47 | Translation table lookup with 4KB pages: | ||
48 | |||
49 | +--------+--------+--------+--------+--------+--------+--------+--------+ | ||
50 | |63 56|55 48|47 40|39 32|31 24|23 16|15 8|7 0| | ||
51 | +--------+--------+--------+--------+--------+--------+--------+--------+ | ||
52 | | | | | | | | ||
53 | | | | | | v | ||
54 | | | | | | [11:0] in-page offset | ||
55 | | | | | +-> [20:12] L3 index | ||
56 | | | | +-----------> [29:21] L2 index | ||
57 | | | +---------------------> [38:30] L1 index | ||
58 | | +-------------------------------> [47:39] L0 index (not used) | ||
59 | +-------------------------------------------------> [63] TTBR0/1 | ||
60 | |||
61 | |||
62 | Translation table lookup with 64KB pages: | ||
63 | |||
64 | +--------+--------+--------+--------+--------+--------+--------+--------+ | ||
65 | |63 56|55 48|47 40|39 32|31 24|23 16|15 8|7 0| | ||
66 | +--------+--------+--------+--------+--------+--------+--------+--------+ | ||
67 | | | | | | | ||
68 | | | | | v | ||
69 | | | | | [15:0] in-page offset | ||
70 | | | | +----------> [28:16] L3 index | ||
71 | | | +--------------------------> [41:29] L2 index (only 38:29 used) | ||
72 | | +-------------------------------> [47:42] L1 index (not used) | ||
73 | +-------------------------------------------------> [63] TTBR0/1 | ||
diff --git a/Documentation/block/00-INDEX b/Documentation/block/00-INDEX index d111e3b23db0..d18ecd827c40 100644 --- a/Documentation/block/00-INDEX +++ b/Documentation/block/00-INDEX | |||
@@ -3,15 +3,21 @@ | |||
3 | biodoc.txt | 3 | biodoc.txt |
4 | - Notes on the Generic Block Layer Rewrite in Linux 2.5 | 4 | - Notes on the Generic Block Layer Rewrite in Linux 2.5 |
5 | capability.txt | 5 | capability.txt |
6 | - Generic Block Device Capability (/sys/block/<disk>/capability) | 6 | - Generic Block Device Capability (/sys/block/<device>/capability) |
7 | cfq-iosched.txt | ||
8 | - CFQ IO scheduler tunables | ||
9 | data-integrity.txt | ||
10 | - Block data integrity | ||
7 | deadline-iosched.txt | 11 | deadline-iosched.txt |
8 | - Deadline IO scheduler tunables | 12 | - Deadline IO scheduler tunables |
9 | ioprio.txt | 13 | ioprio.txt |
10 | - Block io priorities (in CFQ scheduler) | 14 | - Block io priorities (in CFQ scheduler) |
15 | queue-sysfs.txt | ||
16 | - Queue's sysfs entries | ||
11 | request.txt | 17 | request.txt |
12 | - The members of struct request (in include/linux/blkdev.h) | 18 | - The members of struct request (in include/linux/blkdev.h) |
13 | stat.txt | 19 | stat.txt |
14 | - Block layer statistics in /sys/block/<dev>/stat | 20 | - Block layer statistics in /sys/block/<device>/stat |
15 | switching-sched.txt | 21 | switching-sched.txt |
16 | - Switching I/O schedulers at runtime | 22 | - Switching I/O schedulers at runtime |
17 | writeback_cache_control.txt | 23 | writeback_cache_control.txt |
diff --git a/Documentation/block/cfq-iosched.txt b/Documentation/block/cfq-iosched.txt index 6d670f570451..d89b4fe724d7 100644 --- a/Documentation/block/cfq-iosched.txt +++ b/Documentation/block/cfq-iosched.txt | |||
@@ -1,3 +1,14 @@ | |||
1 | CFQ (Complete Fairness Queueing) | ||
2 | =============================== | ||
3 | |||
4 | The main aim of CFQ scheduler is to provide a fair allocation of the disk | ||
5 | I/O bandwidth for all the processes which requests an I/O operation. | ||
6 | |||
7 | CFQ maintains the per process queue for the processes which request I/O | ||
8 | operation(syncronous requests). In case of asynchronous requests, all the | ||
9 | requests from all the processes are batched together according to their | ||
10 | process's I/O priority. | ||
11 | |||
1 | CFQ ioscheduler tunables | 12 | CFQ ioscheduler tunables |
2 | ======================== | 13 | ======================== |
3 | 14 | ||
@@ -25,6 +36,72 @@ there are multiple spindles behind single LUN (Host based hardware RAID | |||
25 | controller or for storage arrays), setting slice_idle=0 might end up in better | 36 | controller or for storage arrays), setting slice_idle=0 might end up in better |
26 | throughput and acceptable latencies. | 37 | throughput and acceptable latencies. |
27 | 38 | ||
39 | back_seek_max | ||
40 | ------------- | ||
41 | This specifies, given in Kbytes, the maximum "distance" for backward seeking. | ||
42 | The distance is the amount of space from the current head location to the | ||
43 | sectors that are backward in terms of distance. | ||
44 | |||
45 | This parameter allows the scheduler to anticipate requests in the "backward" | ||
46 | direction and consider them as being the "next" if they are within this | ||
47 | distance from the current head location. | ||
48 | |||
49 | back_seek_penalty | ||
50 | ----------------- | ||
51 | This parameter is used to compute the cost of backward seeking. If the | ||
52 | backward distance of request is just 1/back_seek_penalty from a "front" | ||
53 | request, then the seeking cost of two requests is considered equivalent. | ||
54 | |||
55 | So scheduler will not bias toward one or the other request (otherwise scheduler | ||
56 | will bias toward front request). Default value of back_seek_penalty is 2. | ||
57 | |||
58 | fifo_expire_async | ||
59 | ----------------- | ||
60 | This parameter is used to set the timeout of asynchronous requests. Default | ||
61 | value of this is 248ms. | ||
62 | |||
63 | fifo_expire_sync | ||
64 | ---------------- | ||
65 | This parameter is used to set the timeout of synchronous requests. Default | ||
66 | value of this is 124ms. In case to favor synchronous requests over asynchronous | ||
67 | one, this value should be decreased relative to fifo_expire_async. | ||
68 | |||
69 | slice_async | ||
70 | ----------- | ||
71 | This parameter is same as of slice_sync but for asynchronous queue. The | ||
72 | default value is 40ms. | ||
73 | |||
74 | slice_async_rq | ||
75 | -------------- | ||
76 | This parameter is used to limit the dispatching of asynchronous request to | ||
77 | device request queue in queue's slice time. The maximum number of request that | ||
78 | are allowed to be dispatched also depends upon the io priority. Default value | ||
79 | for this is 2. | ||
80 | |||
81 | slice_sync | ||
82 | ---------- | ||
83 | When a queue is selected for execution, the queues IO requests are only | ||
84 | executed for a certain amount of time(time_slice) before switching to another | ||
85 | queue. This parameter is used to calculate the time slice of synchronous | ||
86 | queue. | ||
87 | |||
88 | time_slice is computed using the below equation:- | ||
89 | time_slice = slice_sync + (slice_sync/5 * (4 - prio)). To increase the | ||
90 | time_slice of synchronous queue, increase the value of slice_sync. Default | ||
91 | value is 100ms. | ||
92 | |||
93 | quantum | ||
94 | ------- | ||
95 | This specifies the number of request dispatched to the device queue. In a | ||
96 | queue's time slice, a request will not be dispatched if the number of request | ||
97 | in the device exceeds this parameter. This parameter is used for synchronous | ||
98 | request. | ||
99 | |||
100 | In case of storage with several disk, this setting can limit the parallel | ||
101 | processing of request. Therefore, increasing the value can imporve the | ||
102 | performace although this can cause the latency of some I/O to increase due | ||
103 | to more number of requests. | ||
104 | |||
28 | CFQ IOPS Mode for group scheduling | 105 | CFQ IOPS Mode for group scheduling |
29 | =================================== | 106 | =================================== |
30 | Basic CFQ design is to provide priority based time slices. Higher priority | 107 | Basic CFQ design is to provide priority based time slices. Higher priority |
diff --git a/Documentation/block/queue-sysfs.txt b/Documentation/block/queue-sysfs.txt index 6518a55273e7..e54ac1d53403 100644 --- a/Documentation/block/queue-sysfs.txt +++ b/Documentation/block/queue-sysfs.txt | |||
@@ -9,20 +9,71 @@ These files are the ones found in the /sys/block/xxx/queue/ directory. | |||
9 | Files denoted with a RO postfix are readonly and the RW postfix means | 9 | Files denoted with a RO postfix are readonly and the RW postfix means |
10 | read-write. | 10 | read-write. |
11 | 11 | ||
12 | add_random (RW) | ||
13 | ---------------- | ||
14 | This file allows to trun off the disk entropy contribution. Default | ||
15 | value of this file is '1'(on). | ||
16 | |||
17 | discard_granularity (RO) | ||
18 | ----------------------- | ||
19 | This shows the size of internal allocation of the device in bytes, if | ||
20 | reported by the device. A value of '0' means device does not support | ||
21 | the discard functionality. | ||
22 | |||
23 | discard_max_bytes (RO) | ||
24 | ---------------------- | ||
25 | Devices that support discard functionality may have internal limits on | ||
26 | the number of bytes that can be trimmed or unmapped in a single operation. | ||
27 | The discard_max_bytes parameter is set by the device driver to the maximum | ||
28 | number of bytes that can be discarded in a single operation. Discard | ||
29 | requests issued to the device must not exceed this limit. A discard_max_bytes | ||
30 | value of 0 means that the device does not support discard functionality. | ||
31 | |||
32 | discard_zeroes_data (RO) | ||
33 | ------------------------ | ||
34 | When read, this file will show if the discarded block are zeroed by the | ||
35 | device or not. If its value is '1' the blocks are zeroed otherwise not. | ||
36 | |||
12 | hw_sector_size (RO) | 37 | hw_sector_size (RO) |
13 | ------------------- | 38 | ------------------- |
14 | This is the hardware sector size of the device, in bytes. | 39 | This is the hardware sector size of the device, in bytes. |
15 | 40 | ||
41 | iostats (RW) | ||
42 | ------------- | ||
43 | This file is used to control (on/off) the iostats accounting of the | ||
44 | disk. | ||
45 | |||
46 | logical_block_size (RO) | ||
47 | ----------------------- | ||
48 | This is the logcal block size of the device, in bytes. | ||
49 | |||
16 | max_hw_sectors_kb (RO) | 50 | max_hw_sectors_kb (RO) |
17 | ---------------------- | 51 | ---------------------- |
18 | This is the maximum number of kilobytes supported in a single data transfer. | 52 | This is the maximum number of kilobytes supported in a single data transfer. |
19 | 53 | ||
54 | max_integrity_segments (RO) | ||
55 | --------------------------- | ||
56 | When read, this file shows the max limit of integrity segments as | ||
57 | set by block layer which a hardware controller can handle. | ||
58 | |||
20 | max_sectors_kb (RW) | 59 | max_sectors_kb (RW) |
21 | ------------------- | 60 | ------------------- |
22 | This is the maximum number of kilobytes that the block layer will allow | 61 | This is the maximum number of kilobytes that the block layer will allow |
23 | for a filesystem request. Must be smaller than or equal to the maximum | 62 | for a filesystem request. Must be smaller than or equal to the maximum |
24 | size allowed by the hardware. | 63 | size allowed by the hardware. |
25 | 64 | ||
65 | max_segments (RO) | ||
66 | ----------------- | ||
67 | Maximum number of segments of the device. | ||
68 | |||
69 | max_segment_size (RO) | ||
70 | --------------------- | ||
71 | Maximum segment size of the device. | ||
72 | |||
73 | minimum_io_size (RO) | ||
74 | -------------------- | ||
75 | This is the smallest preferred io size reported by the device. | ||
76 | |||
26 | nomerges (RW) | 77 | nomerges (RW) |
27 | ------------- | 78 | ------------- |
28 | This enables the user to disable the lookup logic involved with IO | 79 | This enables the user to disable the lookup logic involved with IO |
@@ -45,11 +96,24 @@ per-block-cgroup request pool. IOW, if there are N block cgroups, | |||
45 | each request queue may have upto N request pools, each independently | 96 | each request queue may have upto N request pools, each independently |
46 | regulated by nr_requests. | 97 | regulated by nr_requests. |
47 | 98 | ||
99 | optimal_io_size (RO) | ||
100 | -------------------- | ||
101 | This is the optimal io size reported by the device. | ||
102 | |||
103 | physical_block_size (RO) | ||
104 | ------------------------ | ||
105 | This is the physical block size of device, in bytes. | ||
106 | |||
48 | read_ahead_kb (RW) | 107 | read_ahead_kb (RW) |
49 | ------------------ | 108 | ------------------ |
50 | Maximum number of kilobytes to read-ahead for filesystems on this block | 109 | Maximum number of kilobytes to read-ahead for filesystems on this block |
51 | device. | 110 | device. |
52 | 111 | ||
112 | rotational (RW) | ||
113 | --------------- | ||
114 | This file is used to stat if the device is of rotational type or | ||
115 | non-rotational type. | ||
116 | |||
53 | rq_affinity (RW) | 117 | rq_affinity (RW) |
54 | ---------------- | 118 | ---------------- |
55 | If this option is '1', the block layer will migrate request completions to the | 119 | If this option is '1', the block layer will migrate request completions to the |
diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt index 4a0b64c605fc..9e04196c4d78 100644 --- a/Documentation/cgroups/cgroups.txt +++ b/Documentation/cgroups/cgroups.txt | |||
@@ -29,7 +29,8 @@ CONTENTS: | |||
29 | 3.1 Overview | 29 | 3.1 Overview |
30 | 3.2 Synchronization | 30 | 3.2 Synchronization |
31 | 3.3 Subsystem API | 31 | 3.3 Subsystem API |
32 | 4. Questions | 32 | 4. Extended attributes usage |
33 | 5. Questions | ||
33 | 34 | ||
34 | 1. Control Groups | 35 | 1. Control Groups |
35 | ================= | 36 | ================= |
@@ -62,9 +63,9 @@ an instance of the cgroup virtual filesystem associated with it. | |||
62 | At any one time there may be multiple active hierarchies of task | 63 | At any one time there may be multiple active hierarchies of task |
63 | cgroups. Each hierarchy is a partition of all tasks in the system. | 64 | cgroups. Each hierarchy is a partition of all tasks in the system. |
64 | 65 | ||
65 | User level code may create and destroy cgroups by name in an | 66 | User-level code may create and destroy cgroups by name in an |
66 | instance of the cgroup virtual file system, specify and query to | 67 | instance of the cgroup virtual file system, specify and query to |
67 | which cgroup a task is assigned, and list the task pids assigned to | 68 | which cgroup a task is assigned, and list the task PIDs assigned to |
68 | a cgroup. Those creations and assignments only affect the hierarchy | 69 | a cgroup. Those creations and assignments only affect the hierarchy |
69 | associated with that instance of the cgroup file system. | 70 | associated with that instance of the cgroup file system. |
70 | 71 | ||
@@ -72,7 +73,7 @@ On their own, the only use for cgroups is for simple job | |||
72 | tracking. The intention is that other subsystems hook into the generic | 73 | tracking. The intention is that other subsystems hook into the generic |
73 | cgroup support to provide new attributes for cgroups, such as | 74 | cgroup support to provide new attributes for cgroups, such as |
74 | accounting/limiting the resources which processes in a cgroup can | 75 | accounting/limiting the resources which processes in a cgroup can |
75 | access. For example, cpusets (see Documentation/cgroups/cpusets.txt) allows | 76 | access. For example, cpusets (see Documentation/cgroups/cpusets.txt) allow |
76 | you to associate a set of CPUs and a set of memory nodes with the | 77 | you to associate a set of CPUs and a set of memory nodes with the |
77 | tasks in each cgroup. | 78 | tasks in each cgroup. |
78 | 79 | ||
@@ -80,11 +81,11 @@ tasks in each cgroup. | |||
80 | ---------------------------- | 81 | ---------------------------- |
81 | 82 | ||
82 | There are multiple efforts to provide process aggregations in the | 83 | There are multiple efforts to provide process aggregations in the |
83 | Linux kernel, mainly for resource tracking purposes. Such efforts | 84 | Linux kernel, mainly for resource-tracking purposes. Such efforts |
84 | include cpusets, CKRM/ResGroups, UserBeanCounters, and virtual server | 85 | include cpusets, CKRM/ResGroups, UserBeanCounters, and virtual server |
85 | namespaces. These all require the basic notion of a | 86 | namespaces. These all require the basic notion of a |
86 | grouping/partitioning of processes, with newly forked processes ending | 87 | grouping/partitioning of processes, with newly forked processes ending |
87 | in the same group (cgroup) as their parent process. | 88 | up in the same group (cgroup) as their parent process. |
88 | 89 | ||
89 | The kernel cgroup patch provides the minimum essential kernel | 90 | The kernel cgroup patch provides the minimum essential kernel |
90 | mechanisms required to efficiently implement such groups. It has | 91 | mechanisms required to efficiently implement such groups. It has |
@@ -127,14 +128,14 @@ following lines: | |||
127 | / \ | 128 | / \ |
128 | Professors (15%) students (5%) | 129 | Professors (15%) students (5%) |
129 | 130 | ||
130 | Browsers like Firefox/Lynx go into the WWW network class, while (k)nfsd go | 131 | Browsers like Firefox/Lynx go into the WWW network class, while (k)nfsd goes |
131 | into NFS network class. | 132 | into the NFS network class. |
132 | 133 | ||
133 | At the same time Firefox/Lynx will share an appropriate CPU/Memory class | 134 | At the same time Firefox/Lynx will share an appropriate CPU/Memory class |
134 | depending on who launched it (prof/student). | 135 | depending on who launched it (prof/student). |
135 | 136 | ||
136 | With the ability to classify tasks differently for different resources | 137 | With the ability to classify tasks differently for different resources |
137 | (by putting those resource subsystems in different hierarchies) then | 138 | (by putting those resource subsystems in different hierarchies), |
138 | the admin can easily set up a script which receives exec notifications | 139 | the admin can easily set up a script which receives exec notifications |
139 | and depending on who is launching the browser he can | 140 | and depending on who is launching the browser he can |
140 | 141 | ||
@@ -145,19 +146,19 @@ a separate cgroup for every browser launched and associate it with | |||
145 | appropriate network and other resource class. This may lead to | 146 | appropriate network and other resource class. This may lead to |
146 | proliferation of such cgroups. | 147 | proliferation of such cgroups. |
147 | 148 | ||
148 | Also lets say that the administrator would like to give enhanced network | 149 | Also let's say that the administrator would like to give enhanced network |
149 | access temporarily to a student's browser (since it is night and the user | 150 | access temporarily to a student's browser (since it is night and the user |
150 | wants to do online gaming :)) OR give one of the students simulation | 151 | wants to do online gaming :)) OR give one of the student's simulation |
151 | apps enhanced CPU power, | 152 | apps enhanced CPU power. |
152 | 153 | ||
153 | With ability to write pids directly to resource classes, it's just a | 154 | With ability to write PIDs directly to resource classes, it's just a |
154 | matter of : | 155 | matter of: |
155 | 156 | ||
156 | # echo pid > /sys/fs/cgroup/network/<new_class>/tasks | 157 | # echo pid > /sys/fs/cgroup/network/<new_class>/tasks |
157 | (after some time) | 158 | (after some time) |
158 | # echo pid > /sys/fs/cgroup/network/<orig_class>/tasks | 159 | # echo pid > /sys/fs/cgroup/network/<orig_class>/tasks |
159 | 160 | ||
160 | Without this ability, he would have to split the cgroup into | 161 | Without this ability, the administrator would have to split the cgroup into |
161 | multiple separate ones and then associate the new cgroups with the | 162 | multiple separate ones and then associate the new cgroups with the |
162 | new resource classes. | 163 | new resource classes. |
163 | 164 | ||
@@ -184,20 +185,20 @@ Control Groups extends the kernel as follows: | |||
184 | field of each task_struct using the css_set, anchored at | 185 | field of each task_struct using the css_set, anchored at |
185 | css_set->tasks. | 186 | css_set->tasks. |
186 | 187 | ||
187 | - A cgroup hierarchy filesystem can be mounted for browsing and | 188 | - A cgroup hierarchy filesystem can be mounted for browsing and |
188 | manipulation from user space. | 189 | manipulation from user space. |
189 | 190 | ||
190 | - You can list all the tasks (by pid) attached to any cgroup. | 191 | - You can list all the tasks (by PID) attached to any cgroup. |
191 | 192 | ||
192 | The implementation of cgroups requires a few, simple hooks | 193 | The implementation of cgroups requires a few, simple hooks |
193 | into the rest of the kernel, none in performance critical paths: | 194 | into the rest of the kernel, none in performance-critical paths: |
194 | 195 | ||
195 | - in init/main.c, to initialize the root cgroups and initial | 196 | - in init/main.c, to initialize the root cgroups and initial |
196 | css_set at system boot. | 197 | css_set at system boot. |
197 | 198 | ||
198 | - in fork and exit, to attach and detach a task from its css_set. | 199 | - in fork and exit, to attach and detach a task from its css_set. |
199 | 200 | ||
200 | In addition a new file system, of type "cgroup" may be mounted, to | 201 | In addition, a new file system of type "cgroup" may be mounted, to |
201 | enable browsing and modifying the cgroups presently known to the | 202 | enable browsing and modifying the cgroups presently known to the |
202 | kernel. When mounting a cgroup hierarchy, you may specify a | 203 | kernel. When mounting a cgroup hierarchy, you may specify a |
203 | comma-separated list of subsystems to mount as the filesystem mount | 204 | comma-separated list of subsystems to mount as the filesystem mount |
@@ -230,13 +231,13 @@ as the path relative to the root of the cgroup file system. | |||
230 | Each cgroup is represented by a directory in the cgroup file system | 231 | Each cgroup is represented by a directory in the cgroup file system |
231 | containing the following files describing that cgroup: | 232 | containing the following files describing that cgroup: |
232 | 233 | ||
233 | - tasks: list of tasks (by pid) attached to that cgroup. This list | 234 | - tasks: list of tasks (by PID) attached to that cgroup. This list |
234 | is not guaranteed to be sorted. Writing a thread id into this file | 235 | is not guaranteed to be sorted. Writing a thread ID into this file |
235 | moves the thread into this cgroup. | 236 | moves the thread into this cgroup. |
236 | - cgroup.procs: list of tgids in the cgroup. This list is not | 237 | - cgroup.procs: list of thread group IDs in the cgroup. This list is |
237 | guaranteed to be sorted or free of duplicate tgids, and userspace | 238 | not guaranteed to be sorted or free of duplicate TGIDs, and userspace |
238 | should sort/uniquify the list if this property is required. | 239 | should sort/uniquify the list if this property is required. |
239 | Writing a thread group id into this file moves all threads in that | 240 | Writing a thread group ID into this file moves all threads in that |
240 | group into this cgroup. | 241 | group into this cgroup. |
241 | - notify_on_release flag: run the release agent on exit? | 242 | - notify_on_release flag: run the release agent on exit? |
242 | - release_agent: the path to use for release notifications (this file | 243 | - release_agent: the path to use for release notifications (this file |
@@ -261,7 +262,7 @@ cgroup file system directories. | |||
261 | 262 | ||
262 | When a task is moved from one cgroup to another, it gets a new | 263 | When a task is moved from one cgroup to another, it gets a new |
263 | css_set pointer - if there's an already existing css_set with the | 264 | css_set pointer - if there's an already existing css_set with the |
264 | desired collection of cgroups then that group is reused, else a new | 265 | desired collection of cgroups then that group is reused, otherwise a new |
265 | css_set is allocated. The appropriate existing css_set is located by | 266 | css_set is allocated. The appropriate existing css_set is located by |
266 | looking into a hash table. | 267 | looking into a hash table. |
267 | 268 | ||
@@ -292,7 +293,7 @@ file system) of the abandoned cgroup. This enables automatic | |||
292 | removal of abandoned cgroups. The default value of | 293 | removal of abandoned cgroups. The default value of |
293 | notify_on_release in the root cgroup at system boot is disabled | 294 | notify_on_release in the root cgroup at system boot is disabled |
294 | (0). The default value of other cgroups at creation is the current | 295 | (0). The default value of other cgroups at creation is the current |
295 | value of their parents notify_on_release setting. The default value of | 296 | value of their parents' notify_on_release settings. The default value of |
296 | a cgroup hierarchy's release_agent path is empty. | 297 | a cgroup hierarchy's release_agent path is empty. |
297 | 298 | ||
298 | 1.5 What does clone_children do ? | 299 | 1.5 What does clone_children do ? |
@@ -316,7 +317,7 @@ the "cpuset" cgroup subsystem, the steps are something like: | |||
316 | 4) Create the new cgroup by doing mkdir's and write's (or echo's) in | 317 | 4) Create the new cgroup by doing mkdir's and write's (or echo's) in |
317 | the /sys/fs/cgroup virtual file system. | 318 | the /sys/fs/cgroup virtual file system. |
318 | 5) Start a task that will be the "founding father" of the new job. | 319 | 5) Start a task that will be the "founding father" of the new job. |
319 | 6) Attach that task to the new cgroup by writing its pid to the | 320 | 6) Attach that task to the new cgroup by writing its PID to the |
320 | /sys/fs/cgroup/cpuset/tasks file for that cgroup. | 321 | /sys/fs/cgroup/cpuset/tasks file for that cgroup. |
321 | 7) fork, exec or clone the job tasks from this founding father task. | 322 | 7) fork, exec or clone the job tasks from this founding father task. |
322 | 323 | ||
@@ -344,7 +345,7 @@ and then start a subshell 'sh' in that cgroup: | |||
344 | 2.1 Basic Usage | 345 | 2.1 Basic Usage |
345 | --------------- | 346 | --------------- |
346 | 347 | ||
347 | Creating, modifying, using the cgroups can be done through the cgroup | 348 | Creating, modifying, using cgroups can be done through the cgroup |
348 | virtual filesystem. | 349 | virtual filesystem. |
349 | 350 | ||
350 | To mount a cgroup hierarchy with all available subsystems, type: | 351 | To mount a cgroup hierarchy with all available subsystems, type: |
@@ -441,7 +442,7 @@ You can attach the current shell task by echoing 0: | |||
441 | # echo 0 > tasks | 442 | # echo 0 > tasks |
442 | 443 | ||
443 | You can use the cgroup.procs file instead of the tasks file to move all | 444 | You can use the cgroup.procs file instead of the tasks file to move all |
444 | threads in a threadgroup at once. Echoing the pid of any task in a | 445 | threads in a threadgroup at once. Echoing the PID of any task in a |
445 | threadgroup to cgroup.procs causes all tasks in that threadgroup to be | 446 | threadgroup to cgroup.procs causes all tasks in that threadgroup to be |
446 | be attached to the cgroup. Writing 0 to cgroup.procs moves all tasks | 447 | be attached to the cgroup. Writing 0 to cgroup.procs moves all tasks |
447 | in the writing task's threadgroup. | 448 | in the writing task's threadgroup. |
@@ -479,7 +480,7 @@ in /proc/mounts and /proc/<pid>/cgroups. | |||
479 | There is mechanism which allows to get notifications about changing | 480 | There is mechanism which allows to get notifications about changing |
480 | status of a cgroup. | 481 | status of a cgroup. |
481 | 482 | ||
482 | To register new notification handler you need: | 483 | To register a new notification handler you need to: |
483 | - create a file descriptor for event notification using eventfd(2); | 484 | - create a file descriptor for event notification using eventfd(2); |
484 | - open a control file to be monitored (e.g. memory.usage_in_bytes); | 485 | - open a control file to be monitored (e.g. memory.usage_in_bytes); |
485 | - write "<event_fd> <control_fd> <args>" to cgroup.event_control. | 486 | - write "<event_fd> <control_fd> <args>" to cgroup.event_control. |
@@ -488,7 +489,7 @@ To register new notification handler you need: | |||
488 | eventfd will be woken up by control file implementation or when the | 489 | eventfd will be woken up by control file implementation or when the |
489 | cgroup is removed. | 490 | cgroup is removed. |
490 | 491 | ||
491 | To unregister notification handler just close eventfd. | 492 | To unregister a notification handler just close eventfd. |
492 | 493 | ||
493 | NOTE: Support of notifications should be implemented for the control | 494 | NOTE: Support of notifications should be implemented for the control |
494 | file. See documentation for the subsystem. | 495 | file. See documentation for the subsystem. |
@@ -502,7 +503,7 @@ file. See documentation for the subsystem. | |||
502 | Each kernel subsystem that wants to hook into the generic cgroup | 503 | Each kernel subsystem that wants to hook into the generic cgroup |
503 | system needs to create a cgroup_subsys object. This contains | 504 | system needs to create a cgroup_subsys object. This contains |
504 | various methods, which are callbacks from the cgroup system, along | 505 | various methods, which are callbacks from the cgroup system, along |
505 | with a subsystem id which will be assigned by the cgroup system. | 506 | with a subsystem ID which will be assigned by the cgroup system. |
506 | 507 | ||
507 | Other fields in the cgroup_subsys object include: | 508 | Other fields in the cgroup_subsys object include: |
508 | 509 | ||
@@ -516,7 +517,7 @@ Other fields in the cgroup_subsys object include: | |||
516 | at system boot. | 517 | at system boot. |
517 | 518 | ||
518 | Each cgroup object created by the system has an array of pointers, | 519 | Each cgroup object created by the system has an array of pointers, |
519 | indexed by subsystem id; this pointer is entirely managed by the | 520 | indexed by subsystem ID; this pointer is entirely managed by the |
520 | subsystem; the generic cgroup code will never touch this pointer. | 521 | subsystem; the generic cgroup code will never touch this pointer. |
521 | 522 | ||
522 | 3.2 Synchronization | 523 | 3.2 Synchronization |
@@ -639,7 +640,7 @@ void post_clone(struct cgroup *cgrp) | |||
639 | 640 | ||
640 | Called during cgroup_create() to do any parameter | 641 | Called during cgroup_create() to do any parameter |
641 | initialization which might be required before a task could attach. For | 642 | initialization which might be required before a task could attach. For |
642 | example in cpusets, no task may attach before 'cpus' and 'mems' are set | 643 | example, in cpusets, no task may attach before 'cpus' and 'mems' are set |
643 | up. | 644 | up. |
644 | 645 | ||
645 | void bind(struct cgroup *root) | 646 | void bind(struct cgroup *root) |
@@ -650,7 +651,26 @@ and root cgroup. Currently this will only involve movement between | |||
650 | the default hierarchy (which never has sub-cgroups) and a hierarchy | 651 | the default hierarchy (which never has sub-cgroups) and a hierarchy |
651 | that is being created/destroyed (and hence has no sub-cgroups). | 652 | that is being created/destroyed (and hence has no sub-cgroups). |
652 | 653 | ||
653 | 4. Questions | 654 | 4. Extended attribute usage |
655 | =========================== | ||
656 | |||
657 | cgroup filesystem supports certain types of extended attributes in its | ||
658 | directories and files. The current supported types are: | ||
659 | - Trusted (XATTR_TRUSTED) | ||
660 | - Security (XATTR_SECURITY) | ||
661 | |||
662 | Both require CAP_SYS_ADMIN capability to set. | ||
663 | |||
664 | Like in tmpfs, the extended attributes in cgroup filesystem are stored | ||
665 | using kernel memory and it's advised to keep the usage at minimum. This | ||
666 | is the reason why user defined extended attributes are not supported, since | ||
667 | any user can do it and there's no limit in the value size. | ||
668 | |||
669 | The current known users for this feature are SELinux to limit cgroup usage | ||
670 | in containers and systemd for assorted meta data like main PID in a cgroup | ||
671 | (systemd creates a cgroup per service). | ||
672 | |||
673 | 5. Questions | ||
654 | ============ | 674 | ============ |
655 | 675 | ||
656 | Q: what's up with this '/bin/echo' ? | 676 | Q: what's up with this '/bin/echo' ? |
@@ -660,5 +680,5 @@ A: bash's builtin 'echo' command does not check calls to write() against | |||
660 | 680 | ||
661 | Q: When I attach processes, only the first of the line gets really attached ! | 681 | Q: When I attach processes, only the first of the line gets really attached ! |
662 | A: We can only return one error code per call to write(). So you should also | 682 | A: We can only return one error code per call to write(). So you should also |
663 | put only ONE pid. | 683 | put only ONE PID. |
664 | 684 | ||
diff --git a/Documentation/cpu-freq/boost.txt b/Documentation/cpu-freq/boost.txt new file mode 100644 index 000000000000..9b4edfcf486f --- /dev/null +++ b/Documentation/cpu-freq/boost.txt | |||
@@ -0,0 +1,93 @@ | |||
1 | Processor boosting control | ||
2 | |||
3 | - information for users - | ||
4 | |||
5 | Quick guide for the impatient: | ||
6 | -------------------- | ||
7 | /sys/devices/system/cpu/cpufreq/boost | ||
8 | controls the boost setting for the whole system. You can read and write | ||
9 | that file with either "0" (boosting disabled) or "1" (boosting allowed). | ||
10 | Reading or writing 1 does not mean that the system is boosting at this | ||
11 | very moment, but only that the CPU _may_ raise the frequency at it's | ||
12 | discretion. | ||
13 | -------------------- | ||
14 | |||
15 | Introduction | ||
16 | ------------- | ||
17 | Some CPUs support a functionality to raise the operating frequency of | ||
18 | some cores in a multi-core package if certain conditions apply, mostly | ||
19 | if the whole chip is not fully utilized and below it's intended thermal | ||
20 | budget. This is done without operating system control by a combination | ||
21 | of hardware and firmware. | ||
22 | On Intel CPUs this is called "Turbo Boost", AMD calls it "Turbo-Core", | ||
23 | in technical documentation "Core performance boost". In Linux we use | ||
24 | the term "boost" for convenience. | ||
25 | |||
26 | Rationale for disable switch | ||
27 | ---------------------------- | ||
28 | |||
29 | Though the idea is to just give better performance without any user | ||
30 | intervention, sometimes the need arises to disable this functionality. | ||
31 | Most systems offer a switch in the (BIOS) firmware to disable the | ||
32 | functionality at all, but a more fine-grained and dynamic control would | ||
33 | be desirable: | ||
34 | 1. While running benchmarks, reproducible results are important. Since | ||
35 | the boosting functionality depends on the load of the whole package, | ||
36 | single thread performance can vary. By explicitly disabling the boost | ||
37 | functionality at least for the benchmark's run-time the system will run | ||
38 | at a fixed frequency and results are reproducible again. | ||
39 | 2. To examine the impact of the boosting functionality it is helpful | ||
40 | to do tests with and without boosting. | ||
41 | 3. Boosting means overclocking the processor, though under controlled | ||
42 | conditions. By raising the frequency and the voltage the processor | ||
43 | will consume more power than without the boosting, which may be | ||
44 | undesirable for instance for mobile users. Disabling boosting may | ||
45 | save power here, though this depends on the workload. | ||
46 | |||
47 | |||
48 | User controlled switch | ||
49 | ---------------------- | ||
50 | |||
51 | To allow the user to toggle the boosting functionality, the acpi-cpufreq | ||
52 | driver exports a sysfs knob to disable it. There is a file: | ||
53 | /sys/devices/system/cpu/cpufreq/boost | ||
54 | which can either read "0" (boosting disabled) or "1" (boosting enabled). | ||
55 | Reading the file is always supported, even if the processor does not | ||
56 | support boosting. In this case the file will be read-only and always | ||
57 | reads as "0". Explicitly changing the permissions and writing to that | ||
58 | file anyway will return EINVAL. | ||
59 | |||
60 | On supported CPUs one can write either a "0" or a "1" into this file. | ||
61 | This will either disable the boost functionality on all cores in the | ||
62 | whole system (0) or will allow the hardware to boost at will (1). | ||
63 | |||
64 | Writing a "1" does not explicitly boost the system, but just allows the | ||
65 | CPU (and the firmware) to boost at their discretion. Some implementations | ||
66 | take external factors like the chip's temperature into account, so | ||
67 | boosting once does not necessarily mean that it will occur every time | ||
68 | even using the exact same software setup. | ||
69 | |||
70 | |||
71 | AMD legacy cpb switch | ||
72 | --------------------- | ||
73 | The AMD powernow-k8 driver used to support a very similar switch to | ||
74 | disable or enable the "Core Performance Boost" feature of some AMD CPUs. | ||
75 | This switch was instantiated in each CPU's cpufreq directory | ||
76 | (/sys/devices/system/cpu[0-9]*/cpufreq) and was called "cpb". | ||
77 | Though the per CPU existence hints at a more fine grained control, the | ||
78 | actual implementation only supported a system-global switch semantics, | ||
79 | which was simply reflected into each CPU's file. Writing a 0 or 1 into it | ||
80 | would pull the other CPUs to the same state. | ||
81 | For compatibility reasons this file and its behavior is still supported | ||
82 | on AMD CPUs, though it is now protected by a config switch | ||
83 | (X86_ACPI_CPUFREQ_CPB). On Intel CPUs this file will never be created, | ||
84 | even with the config option set. | ||
85 | This functionality is considered legacy and will be removed in some future | ||
86 | kernel version. | ||
87 | |||
88 | More fine grained boosting control | ||
89 | ---------------------------------- | ||
90 | |||
91 | Technically it is possible to switch the boosting functionality at least | ||
92 | on a per package basis, for some CPUs even per core. Currently the driver | ||
93 | does not support it, but this may be implemented in the future. | ||
diff --git a/Documentation/cpuidle/sysfs.txt b/Documentation/cpuidle/sysfs.txt index 9d28a3406e74..b6f44f490ed7 100644 --- a/Documentation/cpuidle/sysfs.txt +++ b/Documentation/cpuidle/sysfs.txt | |||
@@ -76,9 +76,17 @@ total 0 | |||
76 | 76 | ||
77 | 77 | ||
78 | * desc : Small description about the idle state (string) | 78 | * desc : Small description about the idle state (string) |
79 | * disable : Option to disable this idle state (bool) | 79 | * disable : Option to disable this idle state (bool) -> see note below |
80 | * latency : Latency to exit out of this idle state (in microseconds) | 80 | * latency : Latency to exit out of this idle state (in microseconds) |
81 | * name : Name of the idle state (string) | 81 | * name : Name of the idle state (string) |
82 | * power : Power consumed while in this idle state (in milliwatts) | 82 | * power : Power consumed while in this idle state (in milliwatts) |
83 | * time : Total time spent in this idle state (in microseconds) | 83 | * time : Total time spent in this idle state (in microseconds) |
84 | * usage : Number of times this state was entered (count) | 84 | * usage : Number of times this state was entered (count) |
85 | |||
86 | Note: | ||
87 | The behavior and the effect of the disable variable depends on the | ||
88 | implementation of a particular governor. In the ladder governor, for | ||
89 | example, it is not coherent, i.e. if one is disabling a light state, | ||
90 | then all deeper states are disabled as well, but the disable variable | ||
91 | does not reflect it. Likewise, if one enables a deep state but a lighter | ||
92 | state still is disabled, then this has no effect. | ||
diff --git a/Documentation/devicetree/bindings/arm/bcm2835.txt b/Documentation/devicetree/bindings/arm/bcm2835.txt new file mode 100644 index 000000000000..ac683480c486 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/bcm2835.txt | |||
@@ -0,0 +1,8 @@ | |||
1 | Broadcom BCM2835 device tree bindings | ||
2 | ------------------------------------------- | ||
3 | |||
4 | Boards with the BCM2835 SoC shall have the following properties: | ||
5 | |||
6 | Required root node property: | ||
7 | |||
8 | compatible = "brcm,bcm2835"; | ||
diff --git a/Documentation/devicetree/bindings/arm/calxeda/combophy.txt b/Documentation/devicetree/bindings/arm/calxeda/combophy.txt new file mode 100644 index 000000000000..6622bdb2e8bc --- /dev/null +++ b/Documentation/devicetree/bindings/arm/calxeda/combophy.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | Calxeda Highbank Combination Phys for SATA | ||
2 | |||
3 | Properties: | ||
4 | - compatible : Should be "calxeda,hb-combophy" | ||
5 | - #phy-cells: Should be 1. | ||
6 | - reg : Address and size for Combination Phy registers. | ||
7 | - phydev: device ID for programming the combophy. | ||
8 | |||
9 | Example: | ||
10 | |||
11 | combophy5: combo-phy@fff5d000 { | ||
12 | compatible = "calxeda,hb-combophy"; | ||
13 | #phy-cells = <1>; | ||
14 | reg = <0xfff5d000 0x1000>; | ||
15 | phydev = <31>; | ||
16 | }; | ||
17 | |||
diff --git a/Documentation/devicetree/bindings/arm/mrvl/tauros2.txt b/Documentation/devicetree/bindings/arm/mrvl/tauros2.txt new file mode 100644 index 000000000000..31af1cbb60bd --- /dev/null +++ b/Documentation/devicetree/bindings/arm/mrvl/tauros2.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | * Marvell Tauros2 Cache | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should be "marvell,tauros2-cache". | ||
5 | - marvell,tauros2-cache-features : Specify the features supported for the | ||
6 | tauros2 cache. | ||
7 | The features including | ||
8 | CACHE_TAUROS2_PREFETCH_ON (1 << 0) | ||
9 | CACHE_TAUROS2_LINEFILL_BURST8 (1 << 1) | ||
10 | The definition can be found at | ||
11 | arch/arm/include/asm/hardware/cache-tauros2.h | ||
12 | |||
13 | Example: | ||
14 | L2: l2-cache { | ||
15 | compatible = "marvell,tauros2-cache"; | ||
16 | marvell,tauros2-cache-features = <0x3>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/msm/timer.txt b/Documentation/devicetree/bindings/arm/msm/timer.txt new file mode 100644 index 000000000000..8c5907b9cae8 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/msm/timer.txt | |||
@@ -0,0 +1,38 @@ | |||
1 | * MSM Timer | ||
2 | |||
3 | Properties: | ||
4 | |||
5 | - compatible : Should at least contain "qcom,msm-timer". More specific | ||
6 | properties such as "qcom,msm-gpt" and "qcom,msm-dgt" specify a general | ||
7 | purpose timer and a debug timer respectively. | ||
8 | |||
9 | - interrupts : Interrupt indicating a match event. | ||
10 | |||
11 | - reg : Specifies the base address of the timer registers. The second region | ||
12 | specifies an optional register used to configure the clock divider. | ||
13 | |||
14 | - clock-frequency : The frequency of the timer in Hz. | ||
15 | |||
16 | Optional: | ||
17 | |||
18 | - cpu-offset : per-cpu offset used when the timer is accessed without the | ||
19 | CPU remapping facilities. The offset is cpu-offset * cpu-nr. | ||
20 | |||
21 | Example: | ||
22 | |||
23 | timer@200a004 { | ||
24 | compatible = "qcom,msm-gpt", "qcom,msm-timer"; | ||
25 | interrupts = <1 2 0x301>; | ||
26 | reg = <0x0200a004 0x10>; | ||
27 | clock-frequency = <32768>; | ||
28 | cpu-offset = <0x40000>; | ||
29 | }; | ||
30 | |||
31 | timer@200a024 { | ||
32 | compatible = "qcom,msm-dgt", "qcom,msm-timer"; | ||
33 | interrupts = <1 3 0x301>; | ||
34 | reg = <0x0200a024 0x10>, | ||
35 | <0x0200a034 0x4>; | ||
36 | clock-frequency = <6750000>; | ||
37 | cpu-offset = <0x40000>; | ||
38 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt index ccdd0e53451f..d0051a750587 100644 --- a/Documentation/devicetree/bindings/arm/omap/omap.txt +++ b/Documentation/devicetree/bindings/arm/omap/omap.txt | |||
@@ -36,6 +36,9 @@ Boards: | |||
36 | - OMAP3 BeagleBoard : Low cost community board | 36 | - OMAP3 BeagleBoard : Low cost community board |
37 | compatible = "ti,omap3-beagle", "ti,omap3" | 37 | compatible = "ti,omap3-beagle", "ti,omap3" |
38 | 38 | ||
39 | - OMAP3 Tobi with Overo : Commercial expansion board with daughter board | ||
40 | compatible = "ti,omap3-tobi", "ti,omap3-overo", "ti,omap3" | ||
41 | |||
39 | - OMAP4 SDP : Software Developement Board | 42 | - OMAP4 SDP : Software Developement Board |
40 | compatible = "ti,omap4-sdp", "ti,omap4430" | 43 | compatible = "ti,omap4-sdp", "ti,omap4430" |
41 | 44 | ||
diff --git a/Documentation/devicetree/bindings/arm/pmu.txt b/Documentation/devicetree/bindings/arm/pmu.txt index 1c044eb320cc..343781b9f246 100644 --- a/Documentation/devicetree/bindings/arm/pmu.txt +++ b/Documentation/devicetree/bindings/arm/pmu.txt | |||
@@ -7,8 +7,12 @@ representation in the device tree should be done as under:- | |||
7 | Required properties: | 7 | Required properties: |
8 | 8 | ||
9 | - compatible : should be one of | 9 | - compatible : should be one of |
10 | "arm,cortex-a15-pmu" | ||
10 | "arm,cortex-a9-pmu" | 11 | "arm,cortex-a9-pmu" |
11 | "arm,cortex-a8-pmu" | 12 | "arm,cortex-a8-pmu" |
13 | "arm,cortex-a7-pmu" | ||
14 | "arm,cortex-a5-pmu" | ||
15 | "arm,arm11mpcore-pmu" | ||
12 | "arm,arm1176-pmu" | 16 | "arm,arm1176-pmu" |
13 | "arm,arm1136-pmu" | 17 | "arm,arm1136-pmu" |
14 | - interrupts : 1 combined interrupt or 1 per core. | 18 | - interrupts : 1 combined interrupt or 1 per core. |
diff --git a/Documentation/devicetree/bindings/arm/vt8500.txt b/Documentation/devicetree/bindings/arm/vt8500.txt new file mode 100644 index 000000000000..d657832c6819 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/vt8500.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | VIA/Wondermedia VT8500 Platforms Device Tree Bindings | ||
2 | --------------------------------------- | ||
3 | |||
4 | Boards with the VIA VT8500 SoC shall have the following properties: | ||
5 | Required root node property: | ||
6 | compatible = "via,vt8500"; | ||
7 | |||
8 | Boards with the Wondermedia WM8505 SoC shall have the following properties: | ||
9 | Required root node property: | ||
10 | compatible = "wm,wm8505"; | ||
11 | |||
12 | Boards with the Wondermedia WM8650 SoC shall have the following properties: | ||
13 | Required root node property: | ||
14 | compatible = "wm,wm8650"; | ||
diff --git a/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-intc.txt b/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-intc.txt new file mode 100644 index 000000000000..0a4ce1051b02 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-intc.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | VIA/Wondermedia VT8500 Interrupt Controller | ||
2 | ----------------------------------------------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible : "via,vt8500-intc" | ||
6 | - reg : Should contain 1 register ranges(address and length) | ||
7 | - #interrupt-cells : should be <1> | ||
8 | |||
9 | Example: | ||
10 | |||
11 | intc: interrupt-controller@d8140000 { | ||
12 | compatible = "via,vt8500-intc"; | ||
13 | interrupt-controller; | ||
14 | reg = <0xd8140000 0x10000>; | ||
15 | #interrupt-cells = <1>; | ||
16 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-pmc.txt b/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-pmc.txt new file mode 100644 index 000000000000..521b9c7de933 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-pmc.txt | |||
@@ -0,0 +1,13 @@ | |||
1 | VIA/Wondermedia VT8500 Power Management Controller | ||
2 | ----------------------------------------------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible : "via,vt8500-pmc" | ||
6 | - reg : Should contain 1 register ranges(address and length) | ||
7 | |||
8 | Example: | ||
9 | |||
10 | pmc@d8130000 { | ||
11 | compatible = "via,vt8500-pmc"; | ||
12 | reg = <0xd8130000 0x1000>; | ||
13 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-timer.txt b/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-timer.txt new file mode 100644 index 000000000000..901c73f0d8ef --- /dev/null +++ b/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-timer.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | VIA/Wondermedia VT8500 Timer | ||
2 | ----------------------------------------------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible : "via,vt8500-timer" | ||
6 | - reg : Should contain 1 register ranges(address and length) | ||
7 | - interrupts : interrupt for the timer | ||
8 | |||
9 | Example: | ||
10 | |||
11 | timer@d8130100 { | ||
12 | compatible = "via,vt8500-timer"; | ||
13 | reg = <0xd8130100 0x28>; | ||
14 | interrupts = <36>; | ||
15 | }; | ||
diff --git a/Documentation/devicetree/bindings/ata/ahci-platform.txt b/Documentation/devicetree/bindings/ata/ahci-platform.txt index 8bb8a76d42e8..b519f9b699c3 100644 --- a/Documentation/devicetree/bindings/ata/ahci-platform.txt +++ b/Documentation/devicetree/bindings/ata/ahci-platform.txt | |||
@@ -8,9 +8,18 @@ Required properties: | |||
8 | - interrupts : <interrupt mapping for SATA IRQ> | 8 | - interrupts : <interrupt mapping for SATA IRQ> |
9 | - reg : <registers mapping> | 9 | - reg : <registers mapping> |
10 | 10 | ||
11 | Optional properties: | ||
12 | - calxeda,port-phys: phandle-combophy and lane assignment, which maps each | ||
13 | SATA port to a combophy and a lane within that | ||
14 | combophy | ||
15 | - dma-coherent : Present if dma operations are coherent | ||
16 | |||
11 | Example: | 17 | Example: |
12 | sata@ffe08000 { | 18 | sata@ffe08000 { |
13 | compatible = "calxeda,hb-ahci"; | 19 | compatible = "calxeda,hb-ahci"; |
14 | reg = <0xffe08000 0x1000>; | 20 | reg = <0xffe08000 0x1000>; |
15 | interrupts = <115>; | 21 | interrupts = <115>; |
22 | calxeda,port-phys = <&combophy5 0 &combophy0 0 &combophy0 1 | ||
23 | &combophy0 2 &combophy0 3>; | ||
24 | |||
16 | }; | 25 | }; |
diff --git a/Documentation/devicetree/bindings/ata/pata-arasan.txt b/Documentation/devicetree/bindings/ata/pata-arasan.txt new file mode 100644 index 000000000000..95ec7f825ede --- /dev/null +++ b/Documentation/devicetree/bindings/ata/pata-arasan.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | * ARASAN PATA COMPACT FLASH CONTROLLER | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "arasan,cf-spear1340" | ||
5 | - reg: Address range of the CF registers | ||
6 | - interrupt-parent: Should be the phandle for the interrupt controller | ||
7 | that services interrupts for this device | ||
8 | - interrupt: Should contain the CF interrupt number | ||
9 | |||
10 | Example: | ||
11 | |||
12 | cf@fc000000 { | ||
13 | compatible = "arasan,cf-spear1340"; | ||
14 | reg = <0xfc000000 0x1000>; | ||
15 | interrupt-parent = <&vic1>; | ||
16 | interrupts = <12>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/bus/omap-ocp2scp.txt b/Documentation/devicetree/bindings/bus/omap-ocp2scp.txt new file mode 100644 index 000000000000..d2fe064a828b --- /dev/null +++ b/Documentation/devicetree/bindings/bus/omap-ocp2scp.txt | |||
@@ -0,0 +1,10 @@ | |||
1 | * OMAP OCP2SCP - ocp interface to scp interface | ||
2 | |||
3 | properties: | ||
4 | - compatible : Should be "ti,omap-ocp2scp" | ||
5 | - #address-cells, #size-cells : Must be present if the device has sub-nodes | ||
6 | - ranges : the child address space are mapped 1:1 onto the parent address space | ||
7 | - ti,hwmods : must be "ocp2scp_usb_phy" | ||
8 | |||
9 | Sub-nodes: | ||
10 | All the devices connected to ocp2scp are described using sub-node to ocp2scp | ||
diff --git a/Documentation/devicetree/bindings/clock/imx23-clock.txt b/Documentation/devicetree/bindings/clock/imx23-clock.txt new file mode 100644 index 000000000000..a0b867ef8d96 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/imx23-clock.txt | |||
@@ -0,0 +1,76 @@ | |||
1 | * Clock bindings for Freescale i.MX23 | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "fsl,imx23-clkctrl" | ||
5 | - reg: Address and length of the register set | ||
6 | - #clock-cells: Should be <1> | ||
7 | |||
8 | The clock consumer should specify the desired clock by having the clock | ||
9 | ID in its "clocks" phandle cell. The following is a full list of i.MX23 | ||
10 | clocks and IDs. | ||
11 | |||
12 | Clock ID | ||
13 | ------------------ | ||
14 | ref_xtal 0 | ||
15 | pll 1 | ||
16 | ref_cpu 2 | ||
17 | ref_emi 3 | ||
18 | ref_pix 4 | ||
19 | ref_io 5 | ||
20 | saif_sel 6 | ||
21 | lcdif_sel 7 | ||
22 | gpmi_sel 8 | ||
23 | ssp_sel 9 | ||
24 | emi_sel 10 | ||
25 | cpu 11 | ||
26 | etm_sel 12 | ||
27 | cpu_pll 13 | ||
28 | cpu_xtal 14 | ||
29 | hbus 15 | ||
30 | xbus 16 | ||
31 | lcdif_div 17 | ||
32 | ssp_div 18 | ||
33 | gpmi_div 19 | ||
34 | emi_pll 20 | ||
35 | emi_xtal 21 | ||
36 | etm_div 22 | ||
37 | saif_div 23 | ||
38 | clk32k_div 24 | ||
39 | rtc 25 | ||
40 | adc 26 | ||
41 | spdif_div 27 | ||
42 | clk32k 28 | ||
43 | dri 29 | ||
44 | pwm 30 | ||
45 | filt 31 | ||
46 | uart 32 | ||
47 | ssp 33 | ||
48 | gpmi 34 | ||
49 | spdif 35 | ||
50 | emi 36 | ||
51 | saif 37 | ||
52 | lcdif 38 | ||
53 | etm 39 | ||
54 | usb 40 | ||
55 | usb_pwr 41 | ||
56 | |||
57 | Examples: | ||
58 | |||
59 | clks: clkctrl@80040000 { | ||
60 | compatible = "fsl,imx23-clkctrl"; | ||
61 | reg = <0x80040000 0x2000>; | ||
62 | #clock-cells = <1>; | ||
63 | clock-output-names = | ||
64 | ... | ||
65 | "uart", /* 32 */ | ||
66 | ... | ||
67 | "end_of_list"; | ||
68 | }; | ||
69 | |||
70 | auart0: serial@8006c000 { | ||
71 | compatible = "fsl,imx23-auart"; | ||
72 | reg = <0x8006c000 0x2000>; | ||
73 | interrupts = <24 25 23>; | ||
74 | clocks = <&clks 32>; | ||
75 | status = "disabled"; | ||
76 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/imx28-clock.txt b/Documentation/devicetree/bindings/clock/imx28-clock.txt new file mode 100644 index 000000000000..aa2af2866fe8 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/imx28-clock.txt | |||
@@ -0,0 +1,99 @@ | |||
1 | * Clock bindings for Freescale i.MX28 | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "fsl,imx28-clkctrl" | ||
5 | - reg: Address and length of the register set | ||
6 | - #clock-cells: Should be <1> | ||
7 | |||
8 | The clock consumer should specify the desired clock by having the clock | ||
9 | ID in its "clocks" phandle cell. The following is a full list of i.MX28 | ||
10 | clocks and IDs. | ||
11 | |||
12 | Clock ID | ||
13 | ------------------ | ||
14 | ref_xtal 0 | ||
15 | pll0 1 | ||
16 | pll1 2 | ||
17 | pll2 3 | ||
18 | ref_cpu 4 | ||
19 | ref_emi 5 | ||
20 | ref_io0 6 | ||
21 | ref_io1 7 | ||
22 | ref_pix 8 | ||
23 | ref_hsadc 9 | ||
24 | ref_gpmi 10 | ||
25 | saif0_sel 11 | ||
26 | saif1_sel 12 | ||
27 | gpmi_sel 13 | ||
28 | ssp0_sel 14 | ||
29 | ssp1_sel 15 | ||
30 | ssp2_sel 16 | ||
31 | ssp3_sel 17 | ||
32 | emi_sel 18 | ||
33 | etm_sel 19 | ||
34 | lcdif_sel 20 | ||
35 | cpu 21 | ||
36 | ptp_sel 22 | ||
37 | cpu_pll 23 | ||
38 | cpu_xtal 24 | ||
39 | hbus 25 | ||
40 | xbus 26 | ||
41 | ssp0_div 27 | ||
42 | ssp1_div 28 | ||
43 | ssp2_div 29 | ||
44 | ssp3_div 30 | ||
45 | gpmi_div 31 | ||
46 | emi_pll 32 | ||
47 | emi_xtal 33 | ||
48 | lcdif_div 34 | ||
49 | etm_div 35 | ||
50 | ptp 36 | ||
51 | saif0_div 37 | ||
52 | saif1_div 38 | ||
53 | clk32k_div 39 | ||
54 | rtc 40 | ||
55 | lradc 41 | ||
56 | spdif_div 42 | ||
57 | clk32k 43 | ||
58 | pwm 44 | ||
59 | uart 45 | ||
60 | ssp0 46 | ||
61 | ssp1 47 | ||
62 | ssp2 48 | ||
63 | ssp3 49 | ||
64 | gpmi 50 | ||
65 | spdif 51 | ||
66 | emi 52 | ||
67 | saif0 53 | ||
68 | saif1 54 | ||
69 | lcdif 55 | ||
70 | etm 56 | ||
71 | fec 57 | ||
72 | can0 58 | ||
73 | can1 59 | ||
74 | usb0 60 | ||
75 | usb1 61 | ||
76 | usb0_pwr 62 | ||
77 | usb1_pwr 63 | ||
78 | enet_out 64 | ||
79 | |||
80 | Examples: | ||
81 | |||
82 | clks: clkctrl@80040000 { | ||
83 | compatible = "fsl,imx28-clkctrl"; | ||
84 | reg = <0x80040000 0x2000>; | ||
85 | #clock-cells = <1>; | ||
86 | clock-output-names = | ||
87 | ... | ||
88 | "uart", /* 45 */ | ||
89 | ... | ||
90 | "end_of_list"; | ||
91 | }; | ||
92 | |||
93 | auart0: serial@8006a000 { | ||
94 | compatible = "fsl,imx28-auart", "fsl,imx23-auart"; | ||
95 | reg = <0x8006a000 0x2000>; | ||
96 | interrupts = <112 70 71>; | ||
97 | clocks = <&clks 45>; | ||
98 | status = "disabled"; | ||
99 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/imx6q-clock.txt b/Documentation/devicetree/bindings/clock/imx6q-clock.txt new file mode 100644 index 000000000000..492bd991d52a --- /dev/null +++ b/Documentation/devicetree/bindings/clock/imx6q-clock.txt | |||
@@ -0,0 +1,222 @@ | |||
1 | * Clock bindings for Freescale i.MX6 Quad | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "fsl,imx6q-ccm" | ||
5 | - reg: Address and length of the register set | ||
6 | - interrupts: Should contain CCM interrupt | ||
7 | - #clock-cells: Should be <1> | ||
8 | |||
9 | The clock consumer should specify the desired clock by having the clock | ||
10 | ID in its "clocks" phandle cell. The following is a full list of i.MX6Q | ||
11 | clocks and IDs. | ||
12 | |||
13 | Clock ID | ||
14 | --------------------------- | ||
15 | dummy 0 | ||
16 | ckil 1 | ||
17 | ckih 2 | ||
18 | osc 3 | ||
19 | pll2_pfd0_352m 4 | ||
20 | pll2_pfd1_594m 5 | ||
21 | pll2_pfd2_396m 6 | ||
22 | pll3_pfd0_720m 7 | ||
23 | pll3_pfd1_540m 8 | ||
24 | pll3_pfd2_508m 9 | ||
25 | pll3_pfd3_454m 10 | ||
26 | pll2_198m 11 | ||
27 | pll3_120m 12 | ||
28 | pll3_80m 13 | ||
29 | pll3_60m 14 | ||
30 | twd 15 | ||
31 | step 16 | ||
32 | pll1_sw 17 | ||
33 | periph_pre 18 | ||
34 | periph2_pre 19 | ||
35 | periph_clk2_sel 20 | ||
36 | periph2_clk2_sel 21 | ||
37 | axi_sel 22 | ||
38 | esai_sel 23 | ||
39 | asrc_sel 24 | ||
40 | spdif_sel 25 | ||
41 | gpu2d_axi 26 | ||
42 | gpu3d_axi 27 | ||
43 | gpu2d_core_sel 28 | ||
44 | gpu3d_core_sel 29 | ||
45 | gpu3d_shader_sel 30 | ||
46 | ipu1_sel 31 | ||
47 | ipu2_sel 32 | ||
48 | ldb_di0_sel 33 | ||
49 | ldb_di1_sel 34 | ||
50 | ipu1_di0_pre_sel 35 | ||
51 | ipu1_di1_pre_sel 36 | ||
52 | ipu2_di0_pre_sel 37 | ||
53 | ipu2_di1_pre_sel 38 | ||
54 | ipu1_di0_sel 39 | ||
55 | ipu1_di1_sel 40 | ||
56 | ipu2_di0_sel 41 | ||
57 | ipu2_di1_sel 42 | ||
58 | hsi_tx_sel 43 | ||
59 | pcie_axi_sel 44 | ||
60 | ssi1_sel 45 | ||
61 | ssi2_sel 46 | ||
62 | ssi3_sel 47 | ||
63 | usdhc1_sel 48 | ||
64 | usdhc2_sel 49 | ||
65 | usdhc3_sel 50 | ||
66 | usdhc4_sel 51 | ||
67 | enfc_sel 52 | ||
68 | emi_sel 53 | ||
69 | emi_slow_sel 54 | ||
70 | vdo_axi_sel 55 | ||
71 | vpu_axi_sel 56 | ||
72 | cko1_sel 57 | ||
73 | periph 58 | ||
74 | periph2 59 | ||
75 | periph_clk2 60 | ||
76 | periph2_clk2 61 | ||
77 | ipg 62 | ||
78 | ipg_per 63 | ||
79 | esai_pred 64 | ||
80 | esai_podf 65 | ||
81 | asrc_pred 66 | ||
82 | asrc_podf 67 | ||
83 | spdif_pred 68 | ||
84 | spdif_podf 69 | ||
85 | can_root 70 | ||
86 | ecspi_root 71 | ||
87 | gpu2d_core_podf 72 | ||
88 | gpu3d_core_podf 73 | ||
89 | gpu3d_shader 74 | ||
90 | ipu1_podf 75 | ||
91 | ipu2_podf 76 | ||
92 | ldb_di0_podf 77 | ||
93 | ldb_di1_podf 78 | ||
94 | ipu1_di0_pre 79 | ||
95 | ipu1_di1_pre 80 | ||
96 | ipu2_di0_pre 81 | ||
97 | ipu2_di1_pre 82 | ||
98 | hsi_tx_podf 83 | ||
99 | ssi1_pred 84 | ||
100 | ssi1_podf 85 | ||
101 | ssi2_pred 86 | ||
102 | ssi2_podf 87 | ||
103 | ssi3_pred 88 | ||
104 | ssi3_podf 89 | ||
105 | uart_serial_podf 90 | ||
106 | usdhc1_podf 91 | ||
107 | usdhc2_podf 92 | ||
108 | usdhc3_podf 93 | ||
109 | usdhc4_podf 94 | ||
110 | enfc_pred 95 | ||
111 | enfc_podf 96 | ||
112 | emi_podf 97 | ||
113 | emi_slow_podf 98 | ||
114 | vpu_axi_podf 99 | ||
115 | cko1_podf 100 | ||
116 | axi 101 | ||
117 | mmdc_ch0_axi_podf 102 | ||
118 | mmdc_ch1_axi_podf 103 | ||
119 | arm 104 | ||
120 | ahb 105 | ||
121 | apbh_dma 106 | ||
122 | asrc 107 | ||
123 | can1_ipg 108 | ||
124 | can1_serial 109 | ||
125 | can2_ipg 110 | ||
126 | can2_serial 111 | ||
127 | ecspi1 112 | ||
128 | ecspi2 113 | ||
129 | ecspi3 114 | ||
130 | ecspi4 115 | ||
131 | ecspi5 116 | ||
132 | enet 117 | ||
133 | esai 118 | ||
134 | gpt_ipg 119 | ||
135 | gpt_ipg_per 120 | ||
136 | gpu2d_core 121 | ||
137 | gpu3d_core 122 | ||
138 | hdmi_iahb 123 | ||
139 | hdmi_isfr 124 | ||
140 | i2c1 125 | ||
141 | i2c2 126 | ||
142 | i2c3 127 | ||
143 | iim 128 | ||
144 | enfc 129 | ||
145 | ipu1 130 | ||
146 | ipu1_di0 131 | ||
147 | ipu1_di1 132 | ||
148 | ipu2 133 | ||
149 | ipu2_di0 134 | ||
150 | ldb_di0 135 | ||
151 | ldb_di1 136 | ||
152 | ipu2_di1 137 | ||
153 | hsi_tx 138 | ||
154 | mlb 139 | ||
155 | mmdc_ch0_axi 140 | ||
156 | mmdc_ch1_axi 141 | ||
157 | ocram 142 | ||
158 | openvg_axi 143 | ||
159 | pcie_axi 144 | ||
160 | pwm1 145 | ||
161 | pwm2 146 | ||
162 | pwm3 147 | ||
163 | pwm4 148 | ||
164 | per1_bch 149 | ||
165 | gpmi_bch_apb 150 | ||
166 | gpmi_bch 151 | ||
167 | gpmi_io 152 | ||
168 | gpmi_apb 153 | ||
169 | sata 154 | ||
170 | sdma 155 | ||
171 | spba 156 | ||
172 | ssi1 157 | ||
173 | ssi2 158 | ||
174 | ssi3 159 | ||
175 | uart_ipg 160 | ||
176 | uart_serial 161 | ||
177 | usboh3 162 | ||
178 | usdhc1 163 | ||
179 | usdhc2 164 | ||
180 | usdhc3 165 | ||
181 | usdhc4 166 | ||
182 | vdo_axi 167 | ||
183 | vpu_axi 168 | ||
184 | cko1 169 | ||
185 | pll1_sys 170 | ||
186 | pll2_bus 171 | ||
187 | pll3_usb_otg 172 | ||
188 | pll4_audio 173 | ||
189 | pll5_video 174 | ||
190 | pll6_mlb 175 | ||
191 | pll7_usb_host 176 | ||
192 | pll8_enet 177 | ||
193 | ssi1_ipg 178 | ||
194 | ssi2_ipg 179 | ||
195 | ssi3_ipg 180 | ||
196 | rom 181 | ||
197 | usbphy1 182 | ||
198 | usbphy2 183 | ||
199 | ldb_di0_div_3_5 184 | ||
200 | ldb_di1_div_3_5 185 | ||
201 | |||
202 | Examples: | ||
203 | |||
204 | clks: ccm@020c4000 { | ||
205 | compatible = "fsl,imx6q-ccm"; | ||
206 | reg = <0x020c4000 0x4000>; | ||
207 | interrupts = <0 87 0x04 0 88 0x04>; | ||
208 | #clock-cells = <1>; | ||
209 | clock-output-names = ... | ||
210 | "uart_ipg", | ||
211 | "uart_serial", | ||
212 | ...; | ||
213 | }; | ||
214 | |||
215 | uart1: serial@02020000 { | ||
216 | compatible = "fsl,imx6q-uart", "fsl,imx21-uart"; | ||
217 | reg = <0x02020000 0x4000>; | ||
218 | interrupts = <0 26 0x04>; | ||
219 | clocks = <&clks 160>, <&clks 161>; | ||
220 | clock-names = "ipg", "per"; | ||
221 | status = "disabled"; | ||
222 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/vt8500.txt b/Documentation/devicetree/bindings/clock/vt8500.txt new file mode 100644 index 000000000000..a880c70d0047 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/vt8500.txt | |||
@@ -0,0 +1,72 @@ | |||
1 | Device Tree Clock bindings for arch-vt8500 | ||
2 | |||
3 | This binding uses the common clock binding[1]. | ||
4 | |||
5 | [1] Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
6 | |||
7 | Required properties: | ||
8 | - compatible : shall be one of the following: | ||
9 | "via,vt8500-pll-clock" - for a VT8500/WM8505 PLL clock | ||
10 | "wm,wm8650-pll-clock" - for a WM8650 PLL clock | ||
11 | "via,vt8500-device-clock" - for a VT/WM device clock | ||
12 | |||
13 | Required properties for PLL clocks: | ||
14 | - reg : shall be the control register offset from PMC base for the pll clock. | ||
15 | - clocks : shall be the input parent clock phandle for the clock. This should | ||
16 | be the reference clock. | ||
17 | - #clock-cells : from common clock binding; shall be set to 0. | ||
18 | |||
19 | Required properties for device clocks: | ||
20 | - clocks : shall be the input parent clock phandle for the clock. This should | ||
21 | be a pll output. | ||
22 | - #clock-cells : from common clock binding; shall be set to 0. | ||
23 | |||
24 | |||
25 | Device Clocks | ||
26 | |||
27 | Device clocks are required to have one or both of the following sets of | ||
28 | properties: | ||
29 | |||
30 | |||
31 | Gated device clocks: | ||
32 | |||
33 | Required properties: | ||
34 | - enable-reg : shall be the register offset from PMC base for the enable | ||
35 | register. | ||
36 | - enable-bit : shall be the bit within enable-reg to enable/disable the clock. | ||
37 | |||
38 | |||
39 | Divisor device clocks: | ||
40 | |||
41 | Required property: | ||
42 | - divisor-reg : shall be the register offset from PMC base for the divisor | ||
43 | register. | ||
44 | Optional property: | ||
45 | - divisor-mask : shall be the mask for the divisor register. Defaults to 0x1f | ||
46 | if not specified. | ||
47 | |||
48 | |||
49 | For example: | ||
50 | |||
51 | ref25: ref25M { | ||
52 | #clock-cells = <0>; | ||
53 | compatible = "fixed-clock"; | ||
54 | clock-frequency = <25000000>; | ||
55 | }; | ||
56 | |||
57 | plla: plla { | ||
58 | #clock-cells = <0>; | ||
59 | compatible = "wm,wm8650-pll-clock"; | ||
60 | clocks = <&ref25>; | ||
61 | reg = <0x200>; | ||
62 | }; | ||
63 | |||
64 | sdhc: sdhc { | ||
65 | #clock-cells = <0>; | ||
66 | compatible = "via,vt8500-device-clock"; | ||
67 | clocks = <&pllb>; | ||
68 | divisor-reg = <0x328>; | ||
69 | divisor-mask = <0x3f>; | ||
70 | enable-reg = <0x254>; | ||
71 | enable-bit = <18>; | ||
72 | }; | ||
diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt new file mode 100644 index 000000000000..4416ccc33472 --- /dev/null +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt | |||
@@ -0,0 +1,55 @@ | |||
1 | Generic CPU0 cpufreq driver | ||
2 | |||
3 | It is a generic cpufreq driver for CPU0 frequency management. It | ||
4 | supports both uniprocessor (UP) and symmetric multiprocessor (SMP) | ||
5 | systems which share clock and voltage across all CPUs. | ||
6 | |||
7 | Both required and optional properties listed below must be defined | ||
8 | under node /cpus/cpu@0. | ||
9 | |||
10 | Required properties: | ||
11 | - operating-points: Refer to Documentation/devicetree/bindings/power/opp.txt | ||
12 | for details | ||
13 | |||
14 | Optional properties: | ||
15 | - clock-latency: Specify the possible maximum transition latency for clock, | ||
16 | in unit of nanoseconds. | ||
17 | - voltage-tolerance: Specify the CPU voltage tolerance in percentage. | ||
18 | |||
19 | Examples: | ||
20 | |||
21 | cpus { | ||
22 | #address-cells = <1>; | ||
23 | #size-cells = <0>; | ||
24 | |||
25 | cpu@0 { | ||
26 | compatible = "arm,cortex-a9"; | ||
27 | reg = <0>; | ||
28 | next-level-cache = <&L2>; | ||
29 | operating-points = < | ||
30 | /* kHz uV */ | ||
31 | 792000 1100000 | ||
32 | 396000 950000 | ||
33 | 198000 850000 | ||
34 | >; | ||
35 | transition-latency = <61036>; /* two CLK32 periods */ | ||
36 | }; | ||
37 | |||
38 | cpu@1 { | ||
39 | compatible = "arm,cortex-a9"; | ||
40 | reg = <1>; | ||
41 | next-level-cache = <&L2>; | ||
42 | }; | ||
43 | |||
44 | cpu@2 { | ||
45 | compatible = "arm,cortex-a9"; | ||
46 | reg = <2>; | ||
47 | next-level-cache = <&L2>; | ||
48 | }; | ||
49 | |||
50 | cpu@3 { | ||
51 | compatible = "arm,cortex-a9"; | ||
52 | reg = <3>; | ||
53 | next-level-cache = <&L2>; | ||
54 | }; | ||
55 | }; | ||
diff --git a/Documentation/devicetree/bindings/dma/arm-pl330.txt b/Documentation/devicetree/bindings/dma/arm-pl330.txt index a4cd273b2a67..36e27d54260b 100644 --- a/Documentation/devicetree/bindings/dma/arm-pl330.txt +++ b/Documentation/devicetree/bindings/dma/arm-pl330.txt | |||
@@ -9,6 +9,9 @@ Required properties: | |||
9 | region. | 9 | region. |
10 | - interrupts: interrupt number to the cpu. | 10 | - interrupts: interrupt number to the cpu. |
11 | 11 | ||
12 | Optional properties: | ||
13 | - dma-coherent : Present if dma operations are coherent | ||
14 | |||
12 | Example: | 15 | Example: |
13 | 16 | ||
14 | pdma0: pdma@12680000 { | 17 | pdma0: pdma@12680000 { |
diff --git a/Documentation/devicetree/bindings/dma/mmp-dma.txt b/Documentation/devicetree/bindings/dma/mmp-dma.txt new file mode 100644 index 000000000000..a4fa4efa1d83 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/mmp-dma.txt | |||
@@ -0,0 +1,74 @@ | |||
1 | * MARVELL MMP DMA controller | ||
2 | |||
3 | Marvell Peripheral DMA Controller | ||
4 | Used platfroms: pxa688, pxa910, pxa3xx, etc | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: Should be "marvell,pdma-1.0" | ||
8 | - reg: Should contain DMA registers location and length. | ||
9 | - interrupts: Either contain all of the per-channel DMA interrupts | ||
10 | or one irq for pdma device | ||
11 | - #dma-channels: Number of DMA channels supported by the controller. | ||
12 | |||
13 | "marvell,pdma-1.0" | ||
14 | Used platfroms: pxa25x, pxa27x, pxa3xx, pxa93x, pxa168, pxa910, pxa688. | ||
15 | |||
16 | Examples: | ||
17 | |||
18 | /* | ||
19 | * Each channel has specific irq | ||
20 | * ICU parse out irq channel from ICU register, | ||
21 | * while DMA controller may not able to distinguish the irq channel | ||
22 | * Using this method, interrupt-parent is required as demuxer | ||
23 | * For example, pxa688 icu register 0x128, bit 0~15 is PDMA channel irq, | ||
24 | * 18~21 is ADMA irq | ||
25 | */ | ||
26 | pdma: dma-controller@d4000000 { | ||
27 | compatible = "marvell,pdma-1.0"; | ||
28 | reg = <0xd4000000 0x10000>; | ||
29 | interrupts = <0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15>; | ||
30 | interrupt-parent = <&intcmux32>; | ||
31 | #dma-channels = <16>; | ||
32 | }; | ||
33 | |||
34 | /* | ||
35 | * One irq for all channels | ||
36 | * Dmaengine driver (DMA controller) distinguish irq channel via | ||
37 | * parsing internal register | ||
38 | */ | ||
39 | pdma: dma-controller@d4000000 { | ||
40 | compatible = "marvell,pdma-1.0"; | ||
41 | reg = <0xd4000000 0x10000>; | ||
42 | interrupts = <47>; | ||
43 | #dma-channels = <16>; | ||
44 | }; | ||
45 | |||
46 | |||
47 | Marvell Two Channel DMA Controller used specifically for audio | ||
48 | Used platfroms: pxa688, pxa910 | ||
49 | |||
50 | Required properties: | ||
51 | - compatible: Should be "marvell,adma-1.0" or "marvell,pxa910-squ" | ||
52 | - reg: Should contain DMA registers location and length. | ||
53 | - interrupts: Either contain all of the per-channel DMA interrupts | ||
54 | or one irq for dma device | ||
55 | |||
56 | "marvell,adma-1.0" used on pxa688 | ||
57 | "marvell,pxa910-squ" used on pxa910 | ||
58 | |||
59 | Examples: | ||
60 | |||
61 | /* each channel has specific irq */ | ||
62 | adma0: dma-controller@d42a0800 { | ||
63 | compatible = "marvell,adma-1.0"; | ||
64 | reg = <0xd42a0800 0x100>; | ||
65 | interrupts = <18 19>; | ||
66 | interrupt-parent = <&intcmux32>; | ||
67 | }; | ||
68 | |||
69 | /* One irq for all channels */ | ||
70 | squ: dma-controller@d42a0800 { | ||
71 | compatible = "marvell,pxa910-squ"; | ||
72 | reg = <0xd42a0800 0x100>; | ||
73 | interrupts = <46>; | ||
74 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-74x164.txt b/Documentation/devicetree/bindings/gpio/gpio-74x164.txt new file mode 100644 index 000000000000..cc2608021f26 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-74x164.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | * Generic 8-bits shift register GPIO driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should be "fairchild,74hc595" | ||
5 | - reg : chip select number | ||
6 | - gpio-controller : Marks the device node as a gpio controller. | ||
7 | - #gpio-cells : Should be two. The first cell is the pin number and | ||
8 | the second cell is used to specify the gpio polarity: | ||
9 | 0 = active high | ||
10 | 1 = active low | ||
11 | - registers-number: Number of daisy-chained shift registers | ||
12 | |||
13 | Example: | ||
14 | |||
15 | gpio5: gpio5@0 { | ||
16 | compatible = "fairchild,74hc595"; | ||
17 | reg = <0>; | ||
18 | gpio-controller; | ||
19 | #gpio-cells = <2>; | ||
20 | registers-number = <4>; | ||
21 | spi-max-frequency = <100000>; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-adnp.txt b/Documentation/devicetree/bindings/gpio/gpio-adnp.txt new file mode 100644 index 000000000000..af66b2724837 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-adnp.txt | |||
@@ -0,0 +1,34 @@ | |||
1 | Avionic Design N-bit GPIO expander bindings | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "ad,gpio-adnp" | ||
5 | - reg: The I2C slave address for this device. | ||
6 | - interrupt-parent: phandle of the parent interrupt controller. | ||
7 | - interrupts: Interrupt specifier for the controllers interrupt. | ||
8 | - #gpio-cells: Should be 2. The first cell is the GPIO number and the | ||
9 | second cell is used to specify optional parameters: | ||
10 | - bit 0: polarity (0: normal, 1: inverted) | ||
11 | - gpio-controller: Marks the device as a GPIO controller | ||
12 | - nr-gpios: The number of pins supported by the controller. | ||
13 | |||
14 | The GPIO expander can optionally be used as an interrupt controller, in | ||
15 | which case it uses the default two cell specifier as described in | ||
16 | Documentation/devicetree/bindings/interrupt-controller/interrupts.txt. | ||
17 | |||
18 | Example: | ||
19 | |||
20 | gpioext: gpio-controller@41 { | ||
21 | compatible = "ad,gpio-adnp"; | ||
22 | reg = <0x41>; | ||
23 | |||
24 | interrupt-parent = <&gpio>; | ||
25 | interrupts = <160 1>; | ||
26 | |||
27 | gpio-controller; | ||
28 | #gpio-cells = <2>; | ||
29 | |||
30 | interrupt-controller; | ||
31 | #interrupt-cells = <2>; | ||
32 | |||
33 | nr-gpios = <64>; | ||
34 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-samsung.txt b/Documentation/devicetree/bindings/gpio/gpio-samsung.txt index 5375625e8cd2..f1e5dfecf55d 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-samsung.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-samsung.txt | |||
@@ -39,3 +39,46 @@ Example: | |||
39 | #gpio-cells = <4>; | 39 | #gpio-cells = <4>; |
40 | gpio-controller; | 40 | gpio-controller; |
41 | }; | 41 | }; |
42 | |||
43 | |||
44 | Samsung S3C24XX GPIO Controller | ||
45 | |||
46 | Required properties: | ||
47 | - compatible: Compatible property value should be "samsung,s3c24xx-gpio". | ||
48 | |||
49 | - reg: Physical base address of the controller and length of memory mapped | ||
50 | region. | ||
51 | |||
52 | - #gpio-cells: Should be 3. The syntax of the gpio specifier used by client nodes | ||
53 | should be the following with values derived from the SoC user manual. | ||
54 | <[phandle of the gpio controller node] | ||
55 | [pin number within the gpio controller] | ||
56 | [mux function] | ||
57 | [flags and pull up/down] | ||
58 | |||
59 | Values for gpio specifier: | ||
60 | - Pin number: depending on the controller a number from 0 up to 15. | ||
61 | - Mux function: Depending on the SoC and the gpio bank the gpio can be set | ||
62 | as input, output or a special function | ||
63 | - Flags and Pull Up/Down: the values to use differ for the individual SoCs | ||
64 | example S3C2416/S3C2450: | ||
65 | 0 - Pull Up/Down Disabled. | ||
66 | 1 - Pull Down Enabled. | ||
67 | 2 - Pull Up Enabled. | ||
68 | Bit 16 (0x00010000) - Input is active low. | ||
69 | Consult the user manual for the correct values of Mux and Pull Up/Down. | ||
70 | |||
71 | - gpio-controller: Specifies that the node is a gpio controller. | ||
72 | - #address-cells: should be 1. | ||
73 | - #size-cells: should be 1. | ||
74 | |||
75 | Example: | ||
76 | |||
77 | gpa: gpio-controller@56000000 { | ||
78 | #address-cells = <1>; | ||
79 | #size-cells = <1>; | ||
80 | compatible = "samsung,s3c24xx-gpio"; | ||
81 | reg = <0x56000000 0x10>; | ||
82 | #gpio-cells = <3>; | ||
83 | gpio-controller; | ||
84 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-twl4030.txt b/Documentation/devicetree/bindings/gpio/gpio-twl4030.txt index 16695d9cf1e8..66788fda1db3 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-twl4030.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-twl4030.txt | |||
@@ -11,6 +11,11 @@ Required properties: | |||
11 | - interrupt-controller: Mark the device node as an interrupt controller | 11 | - interrupt-controller: Mark the device node as an interrupt controller |
12 | The first cell is the GPIO number. | 12 | The first cell is the GPIO number. |
13 | The second cell is not used. | 13 | The second cell is not used. |
14 | - ti,use-leds : Enables LEDA and LEDB outputs if set | ||
15 | - ti,debounce : if n-th bit is set, debounces GPIO-n | ||
16 | - ti,mmc-cd : if n-th bit is set, GPIO-n controls VMMC(n+1) | ||
17 | - ti,pullups : if n-th bit is set, set a pullup on GPIO-n | ||
18 | - ti,pulldowns : if n-th bit is set, set a pulldown on GPIO-n | ||
14 | 19 | ||
15 | Example: | 20 | Example: |
16 | 21 | ||
@@ -20,4 +25,5 @@ twl_gpio: gpio { | |||
20 | gpio-controller; | 25 | gpio-controller; |
21 | #interrupt-cells = <2>; | 26 | #interrupt-cells = <2>; |
22 | interrupt-controller; | 27 | interrupt-controller; |
28 | ti,use-leds; | ||
23 | }; | 29 | }; |
diff --git a/Documentation/devicetree/bindings/gpio/gpio-vt8500.txt b/Documentation/devicetree/bindings/gpio/gpio-vt8500.txt new file mode 100644 index 000000000000..f4dc5233167e --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-vt8500.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | VIA/Wondermedia VT8500 GPIO Controller | ||
2 | ----------------------------------------------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible : "via,vt8500-gpio", "wm,wm8505-gpio" | ||
6 | or "wm,wm8650-gpio" depending on your SoC | ||
7 | - reg : Should contain 1 register range (address and length) | ||
8 | - #gpio-cells : should be <3>. | ||
9 | 1) bank | ||
10 | 2) pin number | ||
11 | 3) flags - should be 0 | ||
12 | |||
13 | Example: | ||
14 | |||
15 | gpio: gpio-controller@d8110000 { | ||
16 | compatible = "via,vt8500-gpio"; | ||
17 | gpio-controller; | ||
18 | reg = <0xd8110000 0x10000>; | ||
19 | #gpio-cells = <3>; | ||
20 | }; | ||
21 | |||
22 | vibrate { | ||
23 | gpios = <&gpio 0 1 0>; /* Bank 0, Pin 1, No flags */ | ||
24 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/led.txt b/Documentation/devicetree/bindings/gpio/led.txt index 9bb308abd221..edc83c1c0d54 100644 --- a/Documentation/devicetree/bindings/gpio/led.txt +++ b/Documentation/devicetree/bindings/gpio/led.txt | |||
@@ -8,7 +8,7 @@ node's name represents the name of the corresponding LED. | |||
8 | 8 | ||
9 | LED sub-node properties: | 9 | LED sub-node properties: |
10 | - gpios : Should specify the LED's GPIO, see "gpios property" in | 10 | - gpios : Should specify the LED's GPIO, see "gpios property" in |
11 | Documentation/devicetree/gpio.txt. Active low LEDs should be | 11 | Documentation/devicetree/bindings/gpio/gpio.txt. Active low LEDs should be |
12 | indicated using flags in the GPIO specifier. | 12 | indicated using flags in the GPIO specifier. |
13 | - label : (optional) The label for this LED. If omitted, the label is | 13 | - label : (optional) The label for this LED. If omitted, the label is |
14 | taken from the node name (excluding the unit address). | 14 | taken from the node name (excluding the unit address). |
diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt b/Documentation/devicetree/bindings/i2c/trivial-devices.txt index 1a85f986961b..2f5322b119eb 100644 --- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt +++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt | |||
@@ -56,3 +56,4 @@ stm,m41t00 Serial Access TIMEKEEPER | |||
56 | stm,m41t62 Serial real-time clock (RTC) with alarm | 56 | stm,m41t62 Serial real-time clock (RTC) with alarm |
57 | stm,m41t80 M41T80 - SERIAL ACCESS RTC WITH ALARMS | 57 | stm,m41t80 M41T80 - SERIAL ACCESS RTC WITH ALARMS |
58 | ti,tsc2003 I2C Touch-Screen Controller | 58 | ti,tsc2003 I2C Touch-Screen Controller |
59 | ti,tmp102 Low Power Digital Temperature Sensor with SMBUS/Two Wire Serial Interface | ||
diff --git a/Documentation/devicetree/bindings/input/gpio-keys-polled.txt b/Documentation/devicetree/bindings/input/gpio-keys-polled.txt new file mode 100644 index 000000000000..313abefa37cc --- /dev/null +++ b/Documentation/devicetree/bindings/input/gpio-keys-polled.txt | |||
@@ -0,0 +1,38 @@ | |||
1 | Device-Tree bindings for input/gpio_keys_polled.c keyboard driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible = "gpio-keys-polled"; | ||
5 | - poll-interval: Poll interval time in milliseconds | ||
6 | |||
7 | Optional properties: | ||
8 | - autorepeat: Boolean, Enable auto repeat feature of Linux input | ||
9 | subsystem. | ||
10 | |||
11 | Each button (key) is represented as a sub-node of "gpio-keys-polled": | ||
12 | Subnode properties: | ||
13 | |||
14 | - gpios: OF device-tree gpio specification. | ||
15 | - label: Descriptive name of the key. | ||
16 | - linux,code: Keycode to emit. | ||
17 | |||
18 | Optional subnode-properties: | ||
19 | - linux,input-type: Specify event type this button/key generates. | ||
20 | If not specified defaults to <1> == EV_KEY. | ||
21 | - debounce-interval: Debouncing interval time in milliseconds. | ||
22 | If not specified defaults to 5. | ||
23 | - gpio-key,wakeup: Boolean, button can wake-up the system. | ||
24 | |||
25 | Example nodes: | ||
26 | |||
27 | gpio_keys_polled { | ||
28 | compatible = "gpio-keys-polled"; | ||
29 | #address-cells = <1>; | ||
30 | #size-cells = <0>; | ||
31 | poll-interval = <100>; | ||
32 | autorepeat; | ||
33 | button@21 { | ||
34 | label = "GPIO Key UP"; | ||
35 | linux,code = <103>; | ||
36 | gpios = <&gpio1 0 1>; | ||
37 | }; | ||
38 | ... | ||
diff --git a/Documentation/devicetree/bindings/input/rotary-encoder.txt b/Documentation/devicetree/bindings/input/rotary-encoder.txt new file mode 100644 index 000000000000..331549593ed5 --- /dev/null +++ b/Documentation/devicetree/bindings/input/rotary-encoder.txt | |||
@@ -0,0 +1,36 @@ | |||
1 | Rotary encoder DT bindings | ||
2 | |||
3 | Required properties: | ||
4 | - gpios: a spec for two GPIOs to be used | ||
5 | |||
6 | Optional properties: | ||
7 | - linux,axis: the input subsystem axis to map to this rotary encoder. | ||
8 | Defaults to 0 (ABS_X / REL_X) | ||
9 | - rotary-encoder,steps: Number of steps in a full turnaround of the | ||
10 | encoder. Only relevant for absolute axis. Defaults to 24 which is a | ||
11 | typical value for such devices. | ||
12 | - rotary-encoder,relative-axis: register a relative axis rather than an | ||
13 | absolute one. Relative axis will only generate +1/-1 events on the input | ||
14 | device, hence no steps need to be passed. | ||
15 | - rotary-encoder,rollover: Automatic rollove when the rotary value becomes | ||
16 | greater than the specified steps or smaller than 0. For absolute axis only. | ||
17 | - rotary-encoder,half-period: Makes the driver work on half-period mode. | ||
18 | |||
19 | See Documentation/input/rotary-encoder.txt for more information. | ||
20 | |||
21 | Example: | ||
22 | |||
23 | rotary@0 { | ||
24 | compatible = "rotary-encoder"; | ||
25 | gpios = <&gpio 19 1>, <&gpio 20 0>; /* GPIO19 is inverted */ | ||
26 | linux,axis = <0>; /* REL_X */ | ||
27 | rotary-encoder,relative-axis; | ||
28 | }; | ||
29 | |||
30 | rotary@1 { | ||
31 | compatible = "rotary-encoder"; | ||
32 | gpios = <&gpio 21 0>, <&gpio 22 0>; | ||
33 | linux,axis = <1>; /* ABS_Y */ | ||
34 | rotary-encoder,steps = <24>; | ||
35 | rotary-encoder,rollover; | ||
36 | }; | ||
diff --git a/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt b/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt new file mode 100644 index 000000000000..548892c08c59 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt | |||
@@ -0,0 +1,110 @@ | |||
1 | BCM2835 Top-Level ("ARMCTRL") Interrupt Controller | ||
2 | |||
3 | The BCM2835 contains a custom top-level interrupt controller, which supports | ||
4 | 72 interrupt sources using a 2-level register scheme. The interrupt | ||
5 | controller, or the HW block containing it, is referred to occasionally | ||
6 | as "armctrl" in the SoC documentation, hence naming of this binding. | ||
7 | |||
8 | Required properties: | ||
9 | |||
10 | - compatible : should be "brcm,bcm2835-armctrl-ic.txt" | ||
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 shall be 2. | ||
15 | |||
16 | The 1st cell is the interrupt bank; 0 for interrupts in the "IRQ basic | ||
17 | pending" register, or 1/2 respectively for interrupts in the "IRQ pending | ||
18 | 1/2" register. | ||
19 | |||
20 | The 2nd cell contains the interrupt number within the bank. Valid values | ||
21 | are 0..7 for bank 0, and 0..31 for bank 1. | ||
22 | |||
23 | The interrupt sources are as follows: | ||
24 | |||
25 | Bank 0: | ||
26 | 0: ARM_TIMER | ||
27 | 1: ARM_MAILBOX | ||
28 | 2: ARM_DOORBELL_0 | ||
29 | 3: ARM_DOORBELL_1 | ||
30 | 4: VPU0_HALTED | ||
31 | 5: VPU1_HALTED | ||
32 | 6: ILLEGAL_TYPE0 | ||
33 | 7: ILLEGAL_TYPE1 | ||
34 | |||
35 | Bank 1: | ||
36 | 0: TIMER0 | ||
37 | 1: TIMER1 | ||
38 | 2: TIMER2 | ||
39 | 3: TIMER3 | ||
40 | 4: CODEC0 | ||
41 | 5: CODEC1 | ||
42 | 6: CODEC2 | ||
43 | 7: VC_JPEG | ||
44 | 8: ISP | ||
45 | 9: VC_USB | ||
46 | 10: VC_3D | ||
47 | 11: TRANSPOSER | ||
48 | 12: MULTICORESYNC0 | ||
49 | 13: MULTICORESYNC1 | ||
50 | 14: MULTICORESYNC2 | ||
51 | 15: MULTICORESYNC3 | ||
52 | 16: DMA0 | ||
53 | 17: DMA1 | ||
54 | 18: VC_DMA2 | ||
55 | 19: VC_DMA3 | ||
56 | 20: DMA4 | ||
57 | 21: DMA5 | ||
58 | 22: DMA6 | ||
59 | 23: DMA7 | ||
60 | 24: DMA8 | ||
61 | 25: DMA9 | ||
62 | 26: DMA10 | ||
63 | 27: DMA11 | ||
64 | 28: DMA12 | ||
65 | 29: AUX | ||
66 | 30: ARM | ||
67 | 31: VPUDMA | ||
68 | |||
69 | Bank 2: | ||
70 | 0: HOSTPORT | ||
71 | 1: VIDEOSCALER | ||
72 | 2: CCP2TX | ||
73 | 3: SDC | ||
74 | 4: DSI0 | ||
75 | 5: AVE | ||
76 | 6: CAM0 | ||
77 | 7: CAM1 | ||
78 | 8: HDMI0 | ||
79 | 9: HDMI1 | ||
80 | 10: PIXELVALVE1 | ||
81 | 11: I2CSPISLV | ||
82 | 12: DSI1 | ||
83 | 13: PWA0 | ||
84 | 14: PWA1 | ||
85 | 15: CPR | ||
86 | 16: SMI | ||
87 | 17: GPIO0 | ||
88 | 18: GPIO1 | ||
89 | 19: GPIO2 | ||
90 | 20: GPIO3 | ||
91 | 21: VC_I2C | ||
92 | 22: VC_SPI | ||
93 | 23: VC_I2SPCM | ||
94 | 24: VC_SDIO | ||
95 | 25: VC_UART | ||
96 | 26: SLIMBUS | ||
97 | 27: VEC | ||
98 | 28: CPG | ||
99 | 29: RNG | ||
100 | 30: VC_ARASANSDIO | ||
101 | 31: AVSPMON | ||
102 | |||
103 | Example: | ||
104 | |||
105 | intc: interrupt-controller { | ||
106 | compatible = "brcm,bcm2835-armctrl-ic"; | ||
107 | reg = <0x7e00b200 0x200>; | ||
108 | interrupt-controller; | ||
109 | #interrupt-cells = <2>; | ||
110 | }; | ||
diff --git a/Documentation/devicetree/bindings/lpddr2/lpddr2-timings.txt b/Documentation/devicetree/bindings/lpddr2/lpddr2-timings.txt new file mode 100644 index 000000000000..9ceb19e0c7fd --- /dev/null +++ b/Documentation/devicetree/bindings/lpddr2/lpddr2-timings.txt | |||
@@ -0,0 +1,52 @@ | |||
1 | * AC timing parameters of LPDDR2(JESD209-2) memories for a given speed-bin | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should be "jedec,lpddr2-timings" | ||
5 | - min-freq : minimum DDR clock frequency for the speed-bin. Type is <u32> | ||
6 | - max-freq : maximum DDR clock frequency for the speed-bin. Type is <u32> | ||
7 | |||
8 | Optional properties: | ||
9 | |||
10 | The following properties represent AC timing parameters from the memory | ||
11 | data-sheet of the device for a given speed-bin. All these properties are | ||
12 | of type <u32> and the default unit is ps (pico seconds). Parameters with | ||
13 | a different unit have a suffix indicating the unit such as 'tRAS-max-ns' | ||
14 | - tRCD | ||
15 | - tWR | ||
16 | - tRAS-min | ||
17 | - tRRD | ||
18 | - tWTR | ||
19 | - tXP | ||
20 | - tRTP | ||
21 | - tDQSCK-max | ||
22 | - tFAW | ||
23 | - tZQCS | ||
24 | - tZQinit | ||
25 | - tRPab | ||
26 | - tZQCL | ||
27 | - tCKESR | ||
28 | - tRAS-max-ns | ||
29 | - tDQSCK-max-derated | ||
30 | |||
31 | Example: | ||
32 | |||
33 | timings_elpida_ECB240ABACN_400mhz: lpddr2-timings@0 { | ||
34 | compatible = "jedec,lpddr2-timings"; | ||
35 | min-freq = <10000000>; | ||
36 | max-freq = <400000000>; | ||
37 | tRPab = <21000>; | ||
38 | tRCD = <18000>; | ||
39 | tWR = <15000>; | ||
40 | tRAS-min = <42000>; | ||
41 | tRRD = <10000>; | ||
42 | tWTR = <7500>; | ||
43 | tXP = <7500>; | ||
44 | tRTP = <7500>; | ||
45 | tCKESR = <15000>; | ||
46 | tDQSCK-max = <5500>; | ||
47 | tFAW = <50000>; | ||
48 | tZQCS = <90000>; | ||
49 | tZQCL = <360000>; | ||
50 | tZQinit = <1000000>; | ||
51 | tRAS-max-ns = <70000>; | ||
52 | }; | ||
diff --git a/Documentation/devicetree/bindings/lpddr2/lpddr2.txt b/Documentation/devicetree/bindings/lpddr2/lpddr2.txt new file mode 100644 index 000000000000..58354a075e13 --- /dev/null +++ b/Documentation/devicetree/bindings/lpddr2/lpddr2.txt | |||
@@ -0,0 +1,102 @@ | |||
1 | * LPDDR2 SDRAM memories compliant to JEDEC JESD209-2 | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should be one of - "jedec,lpddr2-nvm", "jedec,lpddr2-s2", | ||
5 | "jedec,lpddr2-s4" | ||
6 | |||
7 | "ti,jedec-lpddr2-s2" should be listed if the memory part is LPDDR2-S2 type | ||
8 | |||
9 | "ti,jedec-lpddr2-s4" should be listed if the memory part is LPDDR2-S4 type | ||
10 | |||
11 | "ti,jedec-lpddr2-nvm" should be listed if the memory part is LPDDR2-NVM type | ||
12 | |||
13 | - density : <u32> representing density in Mb (Mega bits) | ||
14 | |||
15 | - io-width : <u32> representing bus width. Possible values are 8, 16, and 32 | ||
16 | |||
17 | Optional properties: | ||
18 | |||
19 | The following optional properties represent the minimum value of some AC | ||
20 | timing parameters of the DDR device in terms of number of clock cycles. | ||
21 | These values shall be obtained from the device data-sheet. | ||
22 | - tRRD-min-tck | ||
23 | - tWTR-min-tck | ||
24 | - tXP-min-tck | ||
25 | - tRTP-min-tck | ||
26 | - tCKE-min-tck | ||
27 | - tRPab-min-tck | ||
28 | - tRCD-min-tck | ||
29 | - tWR-min-tck | ||
30 | - tRASmin-min-tck | ||
31 | - tCKESR-min-tck | ||
32 | - tFAW-min-tck | ||
33 | |||
34 | Child nodes: | ||
35 | - The lpddr2 node may have one or more child nodes of type "lpddr2-timings". | ||
36 | "lpddr2-timings" provides AC timing parameters of the device for | ||
37 | a given speed-bin. The user may provide the timings for as many | ||
38 | speed-bins as is required. Please see Documentation/devicetree/ | ||
39 | bindings/lpddr2/lpddr2-timings.txt for more information on "lpddr2-timings" | ||
40 | |||
41 | Example: | ||
42 | |||
43 | elpida_ECB240ABACN : lpddr2 { | ||
44 | compatible = "Elpida,ECB240ABACN","jedec,lpddr2-s4"; | ||
45 | density = <2048>; | ||
46 | io-width = <32>; | ||
47 | |||
48 | tRPab-min-tck = <3>; | ||
49 | tRCD-min-tck = <3>; | ||
50 | tWR-min-tck = <3>; | ||
51 | tRASmin-min-tck = <3>; | ||
52 | tRRD-min-tck = <2>; | ||
53 | tWTR-min-tck = <2>; | ||
54 | tXP-min-tck = <2>; | ||
55 | tRTP-min-tck = <2>; | ||
56 | tCKE-min-tck = <3>; | ||
57 | tCKESR-min-tck = <3>; | ||
58 | tFAW-min-tck = <8>; | ||
59 | |||
60 | timings_elpida_ECB240ABACN_400mhz: lpddr2-timings@0 { | ||
61 | compatible = "jedec,lpddr2-timings"; | ||
62 | min-freq = <10000000>; | ||
63 | max-freq = <400000000>; | ||
64 | tRPab = <21000>; | ||
65 | tRCD = <18000>; | ||
66 | tWR = <15000>; | ||
67 | tRAS-min = <42000>; | ||
68 | tRRD = <10000>; | ||
69 | tWTR = <7500>; | ||
70 | tXP = <7500>; | ||
71 | tRTP = <7500>; | ||
72 | tCKESR = <15000>; | ||
73 | tDQSCK-max = <5500>; | ||
74 | tFAW = <50000>; | ||
75 | tZQCS = <90000>; | ||
76 | tZQCL = <360000>; | ||
77 | tZQinit = <1000000>; | ||
78 | tRAS-max-ns = <70000>; | ||
79 | }; | ||
80 | |||
81 | timings_elpida_ECB240ABACN_200mhz: lpddr2-timings@1 { | ||
82 | compatible = "jedec,lpddr2-timings"; | ||
83 | min-freq = <10000000>; | ||
84 | max-freq = <200000000>; | ||
85 | tRPab = <21000>; | ||
86 | tRCD = <18000>; | ||
87 | tWR = <15000>; | ||
88 | tRAS-min = <42000>; | ||
89 | tRRD = <10000>; | ||
90 | tWTR = <10000>; | ||
91 | tXP = <7500>; | ||
92 | tRTP = <7500>; | ||
93 | tCKESR = <15000>; | ||
94 | tDQSCK-max = <5500>; | ||
95 | tFAW = <50000>; | ||
96 | tZQCS = <90000>; | ||
97 | tZQCL = <360000>; | ||
98 | tZQinit = <1000000>; | ||
99 | tRAS-max-ns = <70000>; | ||
100 | }; | ||
101 | |||
102 | } | ||
diff --git a/Documentation/devicetree/bindings/media/exynos5-gsc.txt b/Documentation/devicetree/bindings/media/exynos5-gsc.txt new file mode 100644 index 000000000000..0604d42f38d1 --- /dev/null +++ b/Documentation/devicetree/bindings/media/exynos5-gsc.txt | |||
@@ -0,0 +1,30 @@ | |||
1 | * Samsung Exynos5 G-Scaler device | ||
2 | |||
3 | G-Scaler is used for scaling and color space conversion on EXYNOS5 SoCs. | ||
4 | |||
5 | Required properties: | ||
6 | - compatible: should be "samsung,exynos5-gsc" | ||
7 | - reg: should contain G-Scaler physical address location and length. | ||
8 | - interrupts: should contain G-Scaler interrupt number | ||
9 | |||
10 | Example: | ||
11 | |||
12 | gsc_0: gsc@0x13e00000 { | ||
13 | compatible = "samsung,exynos5-gsc"; | ||
14 | reg = <0x13e00000 0x1000>; | ||
15 | interrupts = <0 85 0>; | ||
16 | }; | ||
17 | |||
18 | Aliases: | ||
19 | Each G-Scaler node should have a numbered alias in the aliases node, | ||
20 | in the form of gscN, N = 0...3. G-Scaler driver uses these aliases | ||
21 | to retrieve the device IDs using "of_alias_get_id()" call. | ||
22 | |||
23 | Example: | ||
24 | |||
25 | aliases { | ||
26 | gsc0 =&gsc_0; | ||
27 | gsc1 =&gsc_1; | ||
28 | gsc2 =&gsc_2; | ||
29 | gsc3 =&gsc_3; | ||
30 | }; | ||
diff --git a/Documentation/devicetree/bindings/memory-controllers/ti/emif.txt b/Documentation/devicetree/bindings/memory-controllers/ti/emif.txt new file mode 100644 index 000000000000..938f8e1ba205 --- /dev/null +++ b/Documentation/devicetree/bindings/memory-controllers/ti/emif.txt | |||
@@ -0,0 +1,55 @@ | |||
1 | * EMIF family of TI SDRAM controllers | ||
2 | |||
3 | EMIF - External Memory Interface - is an SDRAM controller used in | ||
4 | TI SoCs. EMIF supports, based on the IP revision, one or more of | ||
5 | DDR2/DDR3/LPDDR2 protocols. This binding describes a given instance | ||
6 | of the EMIF IP and memory parts attached to it. | ||
7 | |||
8 | Required properties: | ||
9 | - compatible : Should be of the form "ti,emif-<ip-rev>" where <ip-rev> | ||
10 | is the IP revision of the specific EMIF instance. | ||
11 | |||
12 | - phy-type : <u32> indicating the DDR phy type. Following are the | ||
13 | allowed values | ||
14 | <1> : Attila PHY | ||
15 | <2> : Intelli PHY | ||
16 | |||
17 | - device-handle : phandle to a "lpddr2" node representing the memory part | ||
18 | |||
19 | - ti,hwmods : For TI hwmods processing and omap device creation | ||
20 | the value shall be "emif<n>" where <n> is the number of the EMIF | ||
21 | instance with base 1. | ||
22 | |||
23 | Optional properties: | ||
24 | - cs1-used : Have this property if CS1 of this EMIF | ||
25 | instance has a memory part attached to it. If there is a memory | ||
26 | part attached to CS1, it should be the same type as the one on CS0, | ||
27 | so there is no need to give the details of this memory part. | ||
28 | |||
29 | - cal-resistor-per-cs : Have this property if the board has one | ||
30 | calibration resistor per chip-select. | ||
31 | |||
32 | - hw-caps-read-idle-ctrl: Have this property if the controller | ||
33 | supports read idle window programming | ||
34 | |||
35 | - hw-caps-dll-calib-ctrl: Have this property if the controller | ||
36 | supports dll calibration control | ||
37 | |||
38 | - hw-caps-ll-interface : Have this property if the controller | ||
39 | has a low latency interface and corresponding interrupt events | ||
40 | |||
41 | - hw-caps-temp-alert : Have this property if the controller | ||
42 | has capability for generating SDRAM temperature alerts | ||
43 | |||
44 | Example: | ||
45 | |||
46 | emif1: emif@0x4c000000 { | ||
47 | compatible = "ti,emif-4d"; | ||
48 | ti,hwmods = "emif2"; | ||
49 | phy-type = <1>; | ||
50 | device-handle = <&elpida_ECB240ABACN>; | ||
51 | cs1-used; | ||
52 | hw-caps-read-idle-ctrl; | ||
53 | hw-caps-ll-interface; | ||
54 | hw-caps-temp-alert; | ||
55 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/ab8500.txt b/Documentation/devicetree/bindings/mfd/ab8500.txt index 69e757a657a0..ce83c8d3c00e 100644 --- a/Documentation/devicetree/bindings/mfd/ab8500.txt +++ b/Documentation/devicetree/bindings/mfd/ab8500.txt | |||
@@ -23,6 +23,7 @@ Device IRQ Names Supply Names Description | |||
23 | ab8500-bm : : : Battery Manager | 23 | ab8500-bm : : : Battery Manager |
24 | ab8500-btemp : : : Battery Temperature | 24 | ab8500-btemp : : : Battery Temperature |
25 | ab8500-charger : : : Battery Charger | 25 | ab8500-charger : : : Battery Charger |
26 | ab8500-codec : : : Audio Codec | ||
26 | ab8500-fg : : : Fuel Gauge | 27 | ab8500-fg : : : Fuel Gauge |
27 | ab8500-gpadc : HW_CONV_END : vddadc : Analogue to Digital Converter | 28 | ab8500-gpadc : HW_CONV_END : vddadc : Analogue to Digital Converter |
28 | SW_CONV_END : : | 29 | SW_CONV_END : : |
@@ -52,6 +53,14 @@ Optional child device properties: | |||
52 | supplied in the interrupts property | 53 | supplied in the interrupts property |
53 | - <supply_name>-supply : contains a phandle to the regulator supply node in Device Tree | 54 | - <supply_name>-supply : contains a phandle to the regulator supply node in Device Tree |
54 | 55 | ||
56 | Non-standard child device properties: | ||
57 | - Audio CODEC: | ||
58 | - stericsson,amic[1|2]-type-single-ended : Single-ended Analoge Mic (default: differential) | ||
59 | - stericsson,amic1a-bias-vamic2 : Analoge Mic wishes to use a non-standard Vamic | ||
60 | - stericsson,amic1b-bias-vamic2 : Analoge Mic wishes to use a non-standard Vamic | ||
61 | - stericsson,amic2-bias-vamic1 : Analoge Mic wishes to use a non-standard Vamic | ||
62 | - stericsson,earpeice-cmv : Earpeice voltage (only: 950 | 1100 | 1270 | 1580) | ||
63 | |||
55 | ab8500@5 { | 64 | ab8500@5 { |
56 | compatible = "stericsson,ab8500"; | 65 | compatible = "stericsson,ab8500"; |
57 | reg = <5>; /* mailbox 5 is i2c */ | 66 | reg = <5>; /* mailbox 5 is i2c */ |
@@ -110,6 +119,12 @@ ab8500@5 { | |||
110 | compatible = "stericsson,ab8500-pwm"; | 119 | compatible = "stericsson,ab8500-pwm"; |
111 | }; | 120 | }; |
112 | 121 | ||
122 | codec: ab8500-codec { | ||
123 | compatible = "stericsson,ab8500-codec"; | ||
124 | |||
125 | stericsson,earpeice-cmv = <950>; /* Units in mV. */ | ||
126 | }; | ||
127 | |||
113 | ab8500-regulators { | 128 | ab8500-regulators { |
114 | compatible = "stericsson,ab8500-regulator"; | 129 | compatible = "stericsson,ab8500-regulator"; |
115 | 130 | ||
diff --git a/Documentation/devicetree/bindings/misc/at25.txt b/Documentation/devicetree/bindings/misc/at25.txt index ab3c327929dd..1d3447165c37 100644 --- a/Documentation/devicetree/bindings/misc/at25.txt +++ b/Documentation/devicetree/bindings/misc/at25.txt | |||
@@ -1,21 +1,35 @@ | |||
1 | Atmel AT25 eeprom | 1 | EEPROMs (SPI) compatible with Atmel at25. |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "atmel,at25". | 4 | - compatible : "atmel,at25". |
5 | - reg : chip select number | 5 | - reg : chip select number |
6 | - spi-max-frequency : max spi frequency to use | 6 | - spi-max-frequency : max spi frequency to use |
7 | - pagesize : size of the eeprom page | ||
8 | - size : total eeprom size in bytes | ||
9 | - address-width : number of address bits (one of 8, 16, or 24) | ||
7 | 10 | ||
11 | Optional properties: | ||
12 | - spi-cpha : SPI shifted clock phase, as per spi-bus bindings. | ||
13 | - spi-cpol : SPI inverse clock polarity, as per spi-bus bindings. | ||
14 | - read-only : this parameter-less property disables writes to the eeprom | ||
15 | |||
16 | Obsolete legacy properties are can be used in place of "size", "pagesize", | ||
17 | "address-width", and "read-only": | ||
8 | - at25,byte-len : total eeprom size in bytes | 18 | - at25,byte-len : total eeprom size in bytes |
9 | - at25,addr-mode : addr-mode flags, as defined in include/linux/spi/eeprom.h | 19 | - at25,addr-mode : addr-mode flags, as defined in include/linux/spi/eeprom.h |
10 | - at25,page-size : size of the eeprom page | 20 | - at25,page-size : size of the eeprom page |
11 | 21 | ||
12 | Examples: | 22 | Additional compatible properties are also allowed. |
13 | at25@0 { | 23 | |
14 | compatible = "atmel,at25"; | 24 | Example: |
15 | reg = <0> | 25 | at25@0 { |
16 | spi-max-frequency = <5000000>; | 26 | compatible = "atmel,at25", "st,m95256"; |
27 | reg = <0> | ||
28 | spi-max-frequency = <5000000>; | ||
29 | spi-cpha; | ||
30 | spi-cpol; | ||
17 | 31 | ||
18 | at25,byte-len = <0x8000>; | 32 | pagesize = <64>; |
19 | at25,addr-mode = <2>; | 33 | size = <32768>; |
20 | at25,page-size = <64>; | 34 | address-width = <16>; |
21 | }; | 35 | }; |
diff --git a/Documentation/devicetree/bindings/misc/lis302.txt b/Documentation/devicetree/bindings/misc/lis302.txt new file mode 100644 index 000000000000..6def86f6b053 --- /dev/null +++ b/Documentation/devicetree/bindings/misc/lis302.txt | |||
@@ -0,0 +1,112 @@ | |||
1 | LIS302 accelerometer devicetree bindings | ||
2 | |||
3 | This device is matched via its bus drivers, and has a number of properties | ||
4 | that apply in on the generic device (independent from the bus). | ||
5 | |||
6 | |||
7 | Required properties for the SPI bindings: | ||
8 | - compatible: should be set to "st,lis3lv02d_spi" | ||
9 | - reg: the chipselect index | ||
10 | - spi-max-frequency: maximal bus speed, should be set to 1000000 unless | ||
11 | constrained by external circuitry | ||
12 | - interrupts: the interrupt generated by the device | ||
13 | |||
14 | Required properties for the I2C bindings: | ||
15 | - compatible: should be set to "st,lis3lv02d" | ||
16 | - reg: i2c slave address | ||
17 | - Vdd-supply: The input supply for Vdd | ||
18 | - Vdd_IO-supply: The input supply for Vdd_IO | ||
19 | |||
20 | |||
21 | Optional properties for all bus drivers: | ||
22 | |||
23 | - st,click-single-{x,y,z}: if present, tells the device to issue an | ||
24 | interrupt on single click events on the | ||
25 | x/y/z axis. | ||
26 | - st,click-double-{x,y,z}: if present, tells the device to issue an | ||
27 | interrupt on double click events on the | ||
28 | x/y/z axis. | ||
29 | - st,click-thresh-{x,y,z}: set the x/y/z axis threshold | ||
30 | - st,click-click-time-limit: click time limit, from 0 to 127.5msec | ||
31 | with step of 0.5 msec | ||
32 | - st,click-latency: click latency, from 0 to 255 msec with | ||
33 | step of 1 msec. | ||
34 | - st,click-window: click window, from 0 to 255 msec with | ||
35 | step of 1 msec. | ||
36 | - st,irq{1,2}-disable: disable IRQ 1/2 | ||
37 | - st,irq{1,2}-ff-wu-1: raise IRQ 1/2 on FF_WU_1 condition | ||
38 | - st,irq{1,2}-ff-wu-2: raise IRQ 1/2 on FF_WU_2 condition | ||
39 | - st,irq{1,2}-data-ready: raise IRQ 1/2 on data ready contition | ||
40 | - st,irq{1,2}-click: raise IRQ 1/2 on click condition | ||
41 | - st,irq-open-drain: consider IRQ lines open-drain | ||
42 | - st,irq-active-low: make IRQ lines active low | ||
43 | - st,wu-duration-1: duration register for Free-Fall/Wake-Up | ||
44 | interrupt 1 | ||
45 | - st,wu-duration-2: duration register for Free-Fall/Wake-Up | ||
46 | interrupt 2 | ||
47 | - st,wakeup-{x,y,z}-{lo,hi}: set wakeup condition on x/y/z axis for | ||
48 | upper/lower limit | ||
49 | - st,highpass-cutoff-hz=: 1, 2, 4 or 8 for 1Hz, 2Hz, 4Hz or 8Hz of | ||
50 | highpass cut-off frequency | ||
51 | - st,hipass{1,2}-disable: disable highpass 1/2. | ||
52 | - st,default-rate=: set the default rate | ||
53 | - st,axis-{x,y,z}=: set the axis to map to the three coordinates | ||
54 | - st,{min,max}-limit-{x,y,z} set the min/max limits for x/y/z axis | ||
55 | (used by self-test) | ||
56 | |||
57 | |||
58 | Example for a SPI device node: | ||
59 | |||
60 | lis302@0 { | ||
61 | compatible = "st,lis302dl-spi"; | ||
62 | reg = <0>; | ||
63 | spi-max-frequency = <1000000>; | ||
64 | interrupt-parent = <&gpio>; | ||
65 | interrupts = <104 0>; | ||
66 | |||
67 | st,click-single-x; | ||
68 | st,click-single-y; | ||
69 | st,click-single-z; | ||
70 | st,click-thresh-x = <10>; | ||
71 | st,click-thresh-y = <10>; | ||
72 | st,click-thresh-z = <10>; | ||
73 | st,irq1-click; | ||
74 | st,irq2-click; | ||
75 | st,wakeup-x-lo; | ||
76 | st,wakeup-x-hi; | ||
77 | st,wakeup-y-lo; | ||
78 | st,wakeup-y-hi; | ||
79 | st,wakeup-z-lo; | ||
80 | st,wakeup-z-hi; | ||
81 | }; | ||
82 | |||
83 | Example for a I2C device node: | ||
84 | |||
85 | lis331dlh: lis331dlh@18 { | ||
86 | compatible = "st,lis331dlh", "st,lis3lv02d"; | ||
87 | reg = <0x18>; | ||
88 | Vdd-supply = <&lis3_reg>; | ||
89 | Vdd_IO-supply = <&lis3_reg>; | ||
90 | |||
91 | st,click-single-x; | ||
92 | st,click-single-y; | ||
93 | st,click-single-z; | ||
94 | st,click-thresh-x = <10>; | ||
95 | st,click-thresh-y = <10>; | ||
96 | st,click-thresh-z = <10>; | ||
97 | st,irq1-click; | ||
98 | st,irq2-click; | ||
99 | st,wakeup-x-lo; | ||
100 | st,wakeup-x-hi; | ||
101 | st,wakeup-y-lo; | ||
102 | st,wakeup-y-hi; | ||
103 | st,wakeup-z-lo; | ||
104 | st,wakeup-z-hi; | ||
105 | st,min-limit-x = <120>; | ||
106 | st,min-limit-y = <120>; | ||
107 | st,min-limit-z = <140>; | ||
108 | st,max-limit-x = <550>; | ||
109 | st,max-limit-y = <550>; | ||
110 | st,max-limit-z = <750>; | ||
111 | }; | ||
112 | |||
diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt index 70cd49b1caa8..1dd622546d06 100644 --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt | |||
@@ -10,8 +10,8 @@ Required properties: | |||
10 | - compatible : Should be "fsl,<chip>-esdhc" | 10 | - compatible : Should be "fsl,<chip>-esdhc" |
11 | 11 | ||
12 | Optional properties: | 12 | Optional properties: |
13 | - fsl,cd-internal : Indicate to use controller internal card detection | 13 | - fsl,cd-controller : Indicate to use controller internal card detection |
14 | - fsl,wp-internal : Indicate to use controller internal write protection | 14 | - fsl,wp-controller : Indicate to use controller internal write protection |
15 | 15 | ||
16 | Examples: | 16 | Examples: |
17 | 17 | ||
@@ -19,8 +19,8 @@ esdhc@70004000 { | |||
19 | compatible = "fsl,imx51-esdhc"; | 19 | compatible = "fsl,imx51-esdhc"; |
20 | reg = <0x70004000 0x4000>; | 20 | reg = <0x70004000 0x4000>; |
21 | interrupts = <1>; | 21 | interrupts = <1>; |
22 | fsl,cd-internal; | 22 | fsl,cd-controller; |
23 | fsl,wp-internal; | 23 | fsl,wp-controller; |
24 | }; | 24 | }; |
25 | 25 | ||
26 | esdhc@70008000 { | 26 | esdhc@70008000 { |
diff --git a/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt b/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt new file mode 100644 index 000000000000..f1421e2bbab7 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt | |||
@@ -0,0 +1,31 @@ | |||
1 | PXA3xx NAND DT bindings | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible: Should be "marvell,pxa3xx-nand" | ||
6 | - reg: The register base for the controller | ||
7 | - interrupts: The interrupt to map | ||
8 | - #address-cells: Set to <1> if the node includes partitions | ||
9 | |||
10 | Optional properties: | ||
11 | |||
12 | - marvell,nand-enable-arbiter: Set to enable the bus arbiter | ||
13 | - marvell,nand-keep-config: Set to keep the NAND controller config as set | ||
14 | by the bootloader | ||
15 | - num-cs: Number of chipselect lines to usw | ||
16 | |||
17 | Example: | ||
18 | |||
19 | nand0: nand@43100000 { | ||
20 | compatible = "marvell,pxa3xx-nand"; | ||
21 | reg = <0x43100000 90>; | ||
22 | interrupts = <45>; | ||
23 | #address-cells = <1>; | ||
24 | |||
25 | marvell,nand-enable-arbiter; | ||
26 | marvell,nand-keep-config; | ||
27 | num-cs = <1>; | ||
28 | |||
29 | /* partitions (optional) */ | ||
30 | }; | ||
31 | |||
diff --git a/Documentation/devicetree/bindings/net/calxeda-xgmac.txt b/Documentation/devicetree/bindings/net/calxeda-xgmac.txt index 411727a3f82d..c8ae996bd8f2 100644 --- a/Documentation/devicetree/bindings/net/calxeda-xgmac.txt +++ b/Documentation/devicetree/bindings/net/calxeda-xgmac.txt | |||
@@ -6,6 +6,9 @@ Required properties: | |||
6 | - interrupts : Should contain 3 xgmac interrupts. The 1st is main interrupt. | 6 | - interrupts : Should contain 3 xgmac interrupts. The 1st is main interrupt. |
7 | The 2nd is pwr mgt interrupt. The 3rd is low power state interrupt. | 7 | The 2nd is pwr mgt interrupt. The 3rd is low power state interrupt. |
8 | 8 | ||
9 | Optional properties: | ||
10 | - dma-coherent : Present if dma operations are coherent | ||
11 | |||
9 | Example: | 12 | Example: |
10 | 13 | ||
11 | ethernet@fff50000 { | 14 | ethernet@fff50000 { |
diff --git a/Documentation/devicetree/bindings/net/can/c_can.txt b/Documentation/devicetree/bindings/net/can/c_can.txt new file mode 100644 index 000000000000..8f1ae81228e3 --- /dev/null +++ b/Documentation/devicetree/bindings/net/can/c_can.txt | |||
@@ -0,0 +1,49 @@ | |||
1 | Bosch C_CAN/D_CAN controller Device Tree Bindings | ||
2 | ------------------------------------------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible : Should be "bosch,c_can" for C_CAN controllers and | ||
6 | "bosch,d_can" for D_CAN controllers. | ||
7 | - reg : physical base address and size of the C_CAN/D_CAN | ||
8 | registers map | ||
9 | - interrupts : property with a value describing the interrupt | ||
10 | number | ||
11 | |||
12 | Optional properties: | ||
13 | - ti,hwmods : Must be "d_can<n>" or "c_can<n>", n being the | ||
14 | instance number | ||
15 | |||
16 | Note: "ti,hwmods" field is used to fetch the base address and irq | ||
17 | resources from TI, omap hwmod data base during device registration. | ||
18 | Future plan is to migrate hwmod data base contents into device tree | ||
19 | blob so that, all the required data will be used from device tree dts | ||
20 | file. | ||
21 | |||
22 | Example: | ||
23 | |||
24 | Step1: SoC common .dtsi file | ||
25 | |||
26 | dcan1: d_can@481d0000 { | ||
27 | compatible = "bosch,d_can"; | ||
28 | reg = <0x481d0000 0x2000>; | ||
29 | interrupts = <55>; | ||
30 | interrupt-parent = <&intc>; | ||
31 | status = "disabled"; | ||
32 | }; | ||
33 | |||
34 | (or) | ||
35 | |||
36 | dcan1: d_can@481d0000 { | ||
37 | compatible = "bosch,d_can"; | ||
38 | ti,hwmods = "d_can1"; | ||
39 | reg = <0x481d0000 0x2000>; | ||
40 | interrupts = <55>; | ||
41 | interrupt-parent = <&intc>; | ||
42 | status = "disabled"; | ||
43 | }; | ||
44 | |||
45 | Step 2: board specific .dts file | ||
46 | |||
47 | &dcan1 { | ||
48 | status = "okay"; | ||
49 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/cpsw.txt b/Documentation/devicetree/bindings/net/cpsw.txt new file mode 100644 index 000000000000..dcaabe9fe869 --- /dev/null +++ b/Documentation/devicetree/bindings/net/cpsw.txt | |||
@@ -0,0 +1,109 @@ | |||
1 | TI SoC Ethernet Switch Controller Device Tree Bindings | ||
2 | ------------------------------------------------------ | ||
3 | |||
4 | Required properties: | ||
5 | - compatible : Should be "ti,cpsw" | ||
6 | - reg : physical base address and size of the cpsw | ||
7 | registers map | ||
8 | - interrupts : property with a value describing the interrupt | ||
9 | number | ||
10 | - interrupt-parent : The parent interrupt controller | ||
11 | - cpdma_channels : Specifies number of channels in CPDMA | ||
12 | - host_port_no : Specifies host port shift | ||
13 | - cpdma_reg_ofs : Specifies CPDMA submodule register offset | ||
14 | - cpdma_sram_ofs : Specifies CPDMA SRAM offset | ||
15 | - ale_reg_ofs : Specifies ALE submodule register offset | ||
16 | - ale_entries : Specifies No of entries ALE can hold | ||
17 | - host_port_reg_ofs : Specifies host port register offset | ||
18 | - hw_stats_reg_ofs : Specifies hardware statistics register offset | ||
19 | - bd_ram_ofs : Specifies internal desciptor RAM offset | ||
20 | - bd_ram_size : Specifies internal descriptor RAM size | ||
21 | - rx_descs : Specifies number of Rx descriptors | ||
22 | - mac_control : Specifies Default MAC control register content | ||
23 | for the specific platform | ||
24 | - slaves : Specifies number for slaves | ||
25 | - slave_reg_ofs : Specifies slave register offset | ||
26 | - sliver_reg_ofs : Specifies slave sliver register offset | ||
27 | - phy_id : Specifies slave phy id | ||
28 | - mac-address : Specifies slave MAC address | ||
29 | |||
30 | Optional properties: | ||
31 | - ti,hwmods : Must be "cpgmac0" | ||
32 | - no_bd_ram : Must be 0 or 1 | ||
33 | |||
34 | Note: "ti,hwmods" field is used to fetch the base address and irq | ||
35 | resources from TI, omap hwmod data base during device registration. | ||
36 | Future plan is to migrate hwmod data base contents into device tree | ||
37 | blob so that, all the required data will be used from device tree dts | ||
38 | file. | ||
39 | |||
40 | Examples: | ||
41 | |||
42 | mac: ethernet@4A100000 { | ||
43 | compatible = "ti,cpsw"; | ||
44 | reg = <0x4A100000 0x1000>; | ||
45 | interrupts = <55 0x4>; | ||
46 | interrupt-parent = <&intc>; | ||
47 | cpdma_channels = <8>; | ||
48 | host_port_no = <0>; | ||
49 | cpdma_reg_ofs = <0x800>; | ||
50 | cpdma_sram_ofs = <0xa00>; | ||
51 | ale_reg_ofs = <0xd00>; | ||
52 | ale_entries = <1024>; | ||
53 | host_port_reg_ofs = <0x108>; | ||
54 | hw_stats_reg_ofs = <0x900>; | ||
55 | bd_ram_ofs = <0x2000>; | ||
56 | bd_ram_size = <0x2000>; | ||
57 | no_bd_ram = <0>; | ||
58 | rx_descs = <64>; | ||
59 | mac_control = <0x20>; | ||
60 | slaves = <2>; | ||
61 | cpsw_emac0: slave@0 { | ||
62 | slave_reg_ofs = <0x208>; | ||
63 | sliver_reg_ofs = <0xd80>; | ||
64 | phy_id = "davinci_mdio.16:00"; | ||
65 | /* Filled in by U-Boot */ | ||
66 | mac-address = [ 00 00 00 00 00 00 ]; | ||
67 | }; | ||
68 | cpsw_emac1: slave@1 { | ||
69 | slave_reg_ofs = <0x308>; | ||
70 | sliver_reg_ofs = <0xdc0>; | ||
71 | phy_id = "davinci_mdio.16:01"; | ||
72 | /* Filled in by U-Boot */ | ||
73 | mac-address = [ 00 00 00 00 00 00 ]; | ||
74 | }; | ||
75 | }; | ||
76 | |||
77 | (or) | ||
78 | mac: ethernet@4A100000 { | ||
79 | compatible = "ti,cpsw"; | ||
80 | ti,hwmods = "cpgmac0"; | ||
81 | cpdma_channels = <8>; | ||
82 | host_port_no = <0>; | ||
83 | cpdma_reg_ofs = <0x800>; | ||
84 | cpdma_sram_ofs = <0xa00>; | ||
85 | ale_reg_ofs = <0xd00>; | ||
86 | ale_entries = <1024>; | ||
87 | host_port_reg_ofs = <0x108>; | ||
88 | hw_stats_reg_ofs = <0x900>; | ||
89 | bd_ram_ofs = <0x2000>; | ||
90 | bd_ram_size = <0x2000>; | ||
91 | no_bd_ram = <0>; | ||
92 | rx_descs = <64>; | ||
93 | mac_control = <0x20>; | ||
94 | slaves = <2>; | ||
95 | cpsw_emac0: slave@0 { | ||
96 | slave_reg_ofs = <0x208>; | ||
97 | sliver_reg_ofs = <0xd80>; | ||
98 | phy_id = "davinci_mdio.16:00"; | ||
99 | /* Filled in by U-Boot */ | ||
100 | mac-address = [ 00 00 00 00 00 00 ]; | ||
101 | }; | ||
102 | cpsw_emac1: slave@1 { | ||
103 | slave_reg_ofs = <0x308>; | ||
104 | sliver_reg_ofs = <0xdc0>; | ||
105 | phy_id = "davinci_mdio.16:01"; | ||
106 | /* Filled in by U-Boot */ | ||
107 | mac-address = [ 00 00 00 00 00 00 ]; | ||
108 | }; | ||
109 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/davinci-mdio.txt b/Documentation/devicetree/bindings/net/davinci-mdio.txt new file mode 100644 index 000000000000..72efaaf764f7 --- /dev/null +++ b/Documentation/devicetree/bindings/net/davinci-mdio.txt | |||
@@ -0,0 +1,33 @@ | |||
1 | TI SoC Davinci MDIO Controller Device Tree Bindings | ||
2 | --------------------------------------------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible : Should be "ti,davinci_mdio" | ||
6 | - reg : physical base address and size of the davinci mdio | ||
7 | registers map | ||
8 | - bus_freq : Mdio Bus frequency | ||
9 | |||
10 | Optional properties: | ||
11 | - ti,hwmods : Must be "davinci_mdio" | ||
12 | |||
13 | Note: "ti,hwmods" field is used to fetch the base address and irq | ||
14 | resources from TI, omap hwmod data base during device registration. | ||
15 | Future plan is to migrate hwmod data base contents into device tree | ||
16 | blob so that, all the required data will be used from device tree dts | ||
17 | file. | ||
18 | |||
19 | Examples: | ||
20 | |||
21 | mdio: davinci_mdio@4A101000 { | ||
22 | compatible = "ti,cpsw"; | ||
23 | reg = <0x4A101000 0x1000>; | ||
24 | bus_freq = <1000000>; | ||
25 | }; | ||
26 | |||
27 | (or) | ||
28 | |||
29 | mdio: davinci_mdio@4A101000 { | ||
30 | compatible = "ti,cpsw"; | ||
31 | ti,hwmods = "davinci_mdio"; | ||
32 | bus_freq = <1000000>; | ||
33 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/mdio-mux-mmioreg.txt b/Documentation/devicetree/bindings/net/mdio-mux-mmioreg.txt new file mode 100644 index 000000000000..8516929c7251 --- /dev/null +++ b/Documentation/devicetree/bindings/net/mdio-mux-mmioreg.txt | |||
@@ -0,0 +1,75 @@ | |||
1 | Properties for an MDIO bus multiplexer controlled by a memory-mapped device | ||
2 | |||
3 | This is a special case of a MDIO bus multiplexer. A memory-mapped device, | ||
4 | like an FPGA, is used to control which child bus is connected. The mdio-mux | ||
5 | node must be a child of the memory-mapped device. The driver currently only | ||
6 | supports devices with eight-bit registers. | ||
7 | |||
8 | Required properties in addition to the generic multiplexer properties: | ||
9 | |||
10 | - compatible : string, must contain "mdio-mux-mmioreg" | ||
11 | |||
12 | - reg : integer, contains the offset of the register that controls the bus | ||
13 | multiplexer. The size field in the 'reg' property is the size of | ||
14 | register, and must therefore be 1. | ||
15 | |||
16 | - mux-mask : integer, contains an eight-bit mask that specifies which | ||
17 | bits in the register control the actual bus multiplexer. The | ||
18 | 'reg' property of each child mdio-mux node must be constrained by | ||
19 | this mask. | ||
20 | |||
21 | Example: | ||
22 | |||
23 | The FPGA node defines a memory-mapped FPGA with a register space of 0x30 bytes. | ||
24 | For the "EMI2" MDIO bus, register 9 (BRDCFG1) controls the mux on that bus. | ||
25 | A bitmask of 0x6 means that bits 1 and 2 (bit 0 is lsb) are the bits on | ||
26 | BRDCFG1 that control the actual mux. | ||
27 | |||
28 | /* The FPGA node */ | ||
29 | fpga: board-control@3,0 { | ||
30 | #address-cells = <1>; | ||
31 | #size-cells = <1>; | ||
32 | compatible = "fsl,p5020ds-fpga", "fsl,fpga-ngpixis"; | ||
33 | reg = <3 0 0x30>; | ||
34 | ranges = <0 3 0 0x30>; | ||
35 | |||
36 | mdio-mux-emi2 { | ||
37 | compatible = "mdio-mux-mmioreg", "mdio-mux"; | ||
38 | mdio-parent-bus = <&xmdio0>; | ||
39 | #address-cells = <1>; | ||
40 | #size-cells = <0>; | ||
41 | reg = <9 1>; // BRDCFG1 | ||
42 | mux-mask = <0x6>; // EMI2 | ||
43 | |||
44 | emi2_slot1: mdio@0 { // Slot 1 XAUI (FM2) | ||
45 | reg = <0>; | ||
46 | #address-cells = <1>; | ||
47 | #size-cells = <0>; | ||
48 | |||
49 | phy_xgmii_slot1: ethernet-phy@0 { | ||
50 | compatible = "ethernet-phy-ieee802.3-c45"; | ||
51 | reg = <4>; | ||
52 | }; | ||
53 | }; | ||
54 | |||
55 | emi2_slot2: mdio@2 { // Slot 2 XAUI (FM1) | ||
56 | reg = <2>; | ||
57 | #address-cells = <1>; | ||
58 | #size-cells = <0>; | ||
59 | |||
60 | phy_xgmii_slot2: ethernet-phy@4 { | ||
61 | compatible = "ethernet-phy-ieee802.3-c45"; | ||
62 | reg = <0>; | ||
63 | }; | ||
64 | }; | ||
65 | }; | ||
66 | }; | ||
67 | |||
68 | /* The parent MDIO bus. */ | ||
69 | xmdio0: mdio@f1000 { | ||
70 | #address-cells = <1>; | ||
71 | #size-cells = <0>; | ||
72 | compatible = "fsl,fman-xmdio"; | ||
73 | reg = <0xf1000 0x1000>; | ||
74 | interrupts = <100 1 0 0>; | ||
75 | }; | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt b/Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt new file mode 100644 index 000000000000..8edc20e1b09e --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt | |||
@@ -0,0 +1,74 @@ | |||
1 | Broadcom BCM2835 GPIO (and pinmux) controller | ||
2 | |||
3 | The BCM2835 GPIO module is a combined GPIO controller, (GPIO) interrupt | ||
4 | controller, and pinmux/control device. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: "brcm,bcm2835-gpio" | ||
8 | - reg: Should contain the physical address of the GPIO module's registes. | ||
9 | - gpio-controller: Marks the device node as a GPIO controller. | ||
10 | - #gpio-cells : Should be two. The first cell is the pin number and the | ||
11 | second cell is used to specify optional parameters: | ||
12 | - bit 0 specifies polarity (0 for normal, 1 for inverted) | ||
13 | - interrupts : The interrupt outputs from the controller. One interrupt per | ||
14 | individual bank followed by the "all banks" interrupt. | ||
15 | - interrupt-controller: Marks the device node as an interrupt controller. | ||
16 | - #interrupt-cells : Should be 2. | ||
17 | The first cell is the GPIO number. | ||
18 | The second cell is used to specify flags: | ||
19 | bits[3:0] trigger type and level flags: | ||
20 | 1 = low-to-high edge triggered. | ||
21 | 2 = high-to-low edge triggered. | ||
22 | 4 = active high level-sensitive. | ||
23 | 8 = active low level-sensitive. | ||
24 | Valid combinations are 1, 2, 3, 4, 8. | ||
25 | |||
26 | Please refer to ../gpio/gpio.txt for a general description of GPIO bindings. | ||
27 | |||
28 | Please refer to pinctrl-bindings.txt in this directory for details of the | ||
29 | common pinctrl bindings used by client devices, including the meaning of the | ||
30 | phrase "pin configuration node". | ||
31 | |||
32 | Each pin configuration node lists the pin(s) to which it applies, and one or | ||
33 | more of the mux function to select on those pin(s), and pull-up/down | ||
34 | configuration. Each subnode only affects those parameters that are explicitly | ||
35 | listed. In other words, a subnode that lists only a mux function implies no | ||
36 | information about any pull configuration. Similarly, a subnode that lists only | ||
37 | a pul parameter implies no information about the mux function. | ||
38 | |||
39 | Required subnode-properties: | ||
40 | - brcm,pins: An array of cells. Each cell contains the ID of a pin. Valid IDs | ||
41 | are the integer GPIO IDs; 0==GPIO0, 1==GPIO1, ... 53==GPIO53. | ||
42 | |||
43 | Optional subnode-properties: | ||
44 | - brcm,function: Integer, containing the function to mux to the pin(s): | ||
45 | 0: GPIO in | ||
46 | 1: GPIO out | ||
47 | 2: alt5 | ||
48 | 3: alt4 | ||
49 | 4: alt0 | ||
50 | 5: alt1 | ||
51 | 6: alt2 | ||
52 | 7: alt3 | ||
53 | - brcm,pull: Integer, representing the pull-down/up to apply to the pin(s): | ||
54 | 0: none | ||
55 | 1: down | ||
56 | 2: up | ||
57 | |||
58 | Each of brcm,function and brcm,pull may contain either a single value which | ||
59 | will be applied to all pins in brcm,pins, or 1 value for each entry in | ||
60 | brcm,pins. | ||
61 | |||
62 | Example: | ||
63 | |||
64 | gpio: gpio { | ||
65 | compatible = "brcm,bcm2835-gpio"; | ||
66 | reg = <0x2200000 0xb4>; | ||
67 | interrupts = <2 17>, <2 19>, <2 18>, <2 20>; | ||
68 | |||
69 | gpio-controller; | ||
70 | #gpio-cells = <2>; | ||
71 | |||
72 | interrupt-controller; | ||
73 | #interrupt-cells = <2>; | ||
74 | }; | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/fsl,imx35-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/fsl,imx35-pinctrl.txt new file mode 100644 index 000000000000..1183f1a3be33 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/fsl,imx35-pinctrl.txt | |||
@@ -0,0 +1,984 @@ | |||
1 | * Freescale IMX35 IOMUX Controller | ||
2 | |||
3 | Please refer to fsl,imx-pinctrl.txt in this directory for common binding part | ||
4 | and usage. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: "fsl,imx35-iomuxc" | ||
8 | - fsl,pins: two integers array, represents a group of pins mux and config | ||
9 | setting. The format is fsl,pins = <PIN_FUNC_ID CONFIG>, PIN_FUNC_ID is a | ||
10 | pin working on a specific function, CONFIG is the pad setting value like | ||
11 | pull-up for this pin. Please refer to imx35 datasheet for the valid pad | ||
12 | config settings. | ||
13 | |||
14 | CONFIG bits definition: | ||
15 | PAD_CTL_DRIVE_VOLAGAGE_18 (1 << 13) | ||
16 | PAD_CTL_DRIVE_VOLAGAGE_33 (0 << 13) | ||
17 | PAD_CTL_HYS (1 << 8) | ||
18 | PAD_CTL_PKE (1 << 7) | ||
19 | PAD_CTL_PUE (1 << 6) | ||
20 | PAD_CTL_PUS_100K_DOWN (0 << 4) | ||
21 | PAD_CTL_PUS_47K_UP (1 << 4) | ||
22 | PAD_CTL_PUS_100K_UP (2 << 4) | ||
23 | PAD_CTL_PUS_22K_UP (3 << 4) | ||
24 | PAD_CTL_ODE_CMOS (0 << 3) | ||
25 | PAD_CTL_ODE_OPENDRAIN (1 << 3) | ||
26 | PAD_CTL_DSE_NOMINAL (0 << 1) | ||
27 | PAD_CTL_DSE_HIGH (1 << 1) | ||
28 | PAD_CTL_DSE_MAX (2 << 1) | ||
29 | PAD_CTL_SRE_FAST (1 << 0) | ||
30 | PAD_CTL_SRE_SLOW (0 << 0) | ||
31 | |||
32 | See below for available PIN_FUNC_ID for imx35: | ||
33 | 0 MX35_PAD_CAPTURE__GPT_CAPIN1 | ||
34 | 1 MX35_PAD_CAPTURE__GPT_CMPOUT2 | ||
35 | 2 MX35_PAD_CAPTURE__CSPI2_SS1 | ||
36 | 3 MX35_PAD_CAPTURE__EPIT1_EPITO | ||
37 | 4 MX35_PAD_CAPTURE__CCM_CLK32K | ||
38 | 5 MX35_PAD_CAPTURE__GPIO1_4 | ||
39 | 6 MX35_PAD_COMPARE__GPT_CMPOUT1 | ||
40 | 7 MX35_PAD_COMPARE__GPT_CAPIN2 | ||
41 | 8 MX35_PAD_COMPARE__GPT_CMPOUT3 | ||
42 | 9 MX35_PAD_COMPARE__EPIT2_EPITO | ||
43 | 10 MX35_PAD_COMPARE__GPIO1_5 | ||
44 | 11 MX35_PAD_COMPARE__SDMA_EXTDMA_2 | ||
45 | 12 MX35_PAD_WDOG_RST__WDOG_WDOG_B | ||
46 | 13 MX35_PAD_WDOG_RST__IPU_FLASH_STROBE | ||
47 | 14 MX35_PAD_WDOG_RST__GPIO1_6 | ||
48 | 15 MX35_PAD_GPIO1_0__GPIO1_0 | ||
49 | 16 MX35_PAD_GPIO1_0__CCM_PMIC_RDY | ||
50 | 17 MX35_PAD_GPIO1_0__OWIRE_LINE | ||
51 | 18 MX35_PAD_GPIO1_0__SDMA_EXTDMA_0 | ||
52 | 19 MX35_PAD_GPIO1_1__GPIO1_1 | ||
53 | 20 MX35_PAD_GPIO1_1__PWM_PWMO | ||
54 | 21 MX35_PAD_GPIO1_1__CSPI1_SS2 | ||
55 | 22 MX35_PAD_GPIO1_1__SCC_TAMPER_DETECT | ||
56 | 23 MX35_PAD_GPIO1_1__SDMA_EXTDMA_1 | ||
57 | 24 MX35_PAD_GPIO2_0__GPIO2_0 | ||
58 | 25 MX35_PAD_GPIO2_0__USB_TOP_USBOTG_CLK | ||
59 | 26 MX35_PAD_GPIO3_0__GPIO3_0 | ||
60 | 27 MX35_PAD_GPIO3_0__USB_TOP_USBH2_CLK | ||
61 | 28 MX35_PAD_RESET_IN_B__CCM_RESET_IN_B | ||
62 | 29 MX35_PAD_POR_B__CCM_POR_B | ||
63 | 30 MX35_PAD_CLKO__CCM_CLKO | ||
64 | 31 MX35_PAD_CLKO__GPIO1_8 | ||
65 | 32 MX35_PAD_BOOT_MODE0__CCM_BOOT_MODE_0 | ||
66 | 33 MX35_PAD_BOOT_MODE1__CCM_BOOT_MODE_1 | ||
67 | 34 MX35_PAD_CLK_MODE0__CCM_CLK_MODE_0 | ||
68 | 35 MX35_PAD_CLK_MODE1__CCM_CLK_MODE_1 | ||
69 | 36 MX35_PAD_POWER_FAIL__CCM_DSM_WAKEUP_INT_26 | ||
70 | 37 MX35_PAD_VSTBY__CCM_VSTBY | ||
71 | 38 MX35_PAD_VSTBY__GPIO1_7 | ||
72 | 39 MX35_PAD_A0__EMI_EIM_DA_L_0 | ||
73 | 40 MX35_PAD_A1__EMI_EIM_DA_L_1 | ||
74 | 41 MX35_PAD_A2__EMI_EIM_DA_L_2 | ||
75 | 42 MX35_PAD_A3__EMI_EIM_DA_L_3 | ||
76 | 43 MX35_PAD_A4__EMI_EIM_DA_L_4 | ||
77 | 44 MX35_PAD_A5__EMI_EIM_DA_L_5 | ||
78 | 45 MX35_PAD_A6__EMI_EIM_DA_L_6 | ||
79 | 46 MX35_PAD_A7__EMI_EIM_DA_L_7 | ||
80 | 47 MX35_PAD_A8__EMI_EIM_DA_H_8 | ||
81 | 48 MX35_PAD_A9__EMI_EIM_DA_H_9 | ||
82 | 49 MX35_PAD_A10__EMI_EIM_DA_H_10 | ||
83 | 50 MX35_PAD_MA10__EMI_MA10 | ||
84 | 51 MX35_PAD_A11__EMI_EIM_DA_H_11 | ||
85 | 52 MX35_PAD_A12__EMI_EIM_DA_H_12 | ||
86 | 53 MX35_PAD_A13__EMI_EIM_DA_H_13 | ||
87 | 54 MX35_PAD_A14__EMI_EIM_DA_H2_14 | ||
88 | 55 MX35_PAD_A15__EMI_EIM_DA_H2_15 | ||
89 | 56 MX35_PAD_A16__EMI_EIM_A_16 | ||
90 | 57 MX35_PAD_A17__EMI_EIM_A_17 | ||
91 | 58 MX35_PAD_A18__EMI_EIM_A_18 | ||
92 | 59 MX35_PAD_A19__EMI_EIM_A_19 | ||
93 | 60 MX35_PAD_A20__EMI_EIM_A_20 | ||
94 | 61 MX35_PAD_A21__EMI_EIM_A_21 | ||
95 | 62 MX35_PAD_A22__EMI_EIM_A_22 | ||
96 | 63 MX35_PAD_A23__EMI_EIM_A_23 | ||
97 | 64 MX35_PAD_A24__EMI_EIM_A_24 | ||
98 | 65 MX35_PAD_A25__EMI_EIM_A_25 | ||
99 | 66 MX35_PAD_SDBA1__EMI_EIM_SDBA1 | ||
100 | 67 MX35_PAD_SDBA0__EMI_EIM_SDBA0 | ||
101 | 68 MX35_PAD_SD0__EMI_DRAM_D_0 | ||
102 | 69 MX35_PAD_SD1__EMI_DRAM_D_1 | ||
103 | 70 MX35_PAD_SD2__EMI_DRAM_D_2 | ||
104 | 71 MX35_PAD_SD3__EMI_DRAM_D_3 | ||
105 | 72 MX35_PAD_SD4__EMI_DRAM_D_4 | ||
106 | 73 MX35_PAD_SD5__EMI_DRAM_D_5 | ||
107 | 74 MX35_PAD_SD6__EMI_DRAM_D_6 | ||
108 | 75 MX35_PAD_SD7__EMI_DRAM_D_7 | ||
109 | 76 MX35_PAD_SD8__EMI_DRAM_D_8 | ||
110 | 77 MX35_PAD_SD9__EMI_DRAM_D_9 | ||
111 | 78 MX35_PAD_SD10__EMI_DRAM_D_10 | ||
112 | 79 MX35_PAD_SD11__EMI_DRAM_D_11 | ||
113 | 80 MX35_PAD_SD12__EMI_DRAM_D_12 | ||
114 | 81 MX35_PAD_SD13__EMI_DRAM_D_13 | ||
115 | 82 MX35_PAD_SD14__EMI_DRAM_D_14 | ||
116 | 83 MX35_PAD_SD15__EMI_DRAM_D_15 | ||
117 | 84 MX35_PAD_SD16__EMI_DRAM_D_16 | ||
118 | 85 MX35_PAD_SD17__EMI_DRAM_D_17 | ||
119 | 86 MX35_PAD_SD18__EMI_DRAM_D_18 | ||
120 | 87 MX35_PAD_SD19__EMI_DRAM_D_19 | ||
121 | 88 MX35_PAD_SD20__EMI_DRAM_D_20 | ||
122 | 89 MX35_PAD_SD21__EMI_DRAM_D_21 | ||
123 | 90 MX35_PAD_SD22__EMI_DRAM_D_22 | ||
124 | 91 MX35_PAD_SD23__EMI_DRAM_D_23 | ||
125 | 92 MX35_PAD_SD24__EMI_DRAM_D_24 | ||
126 | 93 MX35_PAD_SD25__EMI_DRAM_D_25 | ||
127 | 94 MX35_PAD_SD26__EMI_DRAM_D_26 | ||
128 | 95 MX35_PAD_SD27__EMI_DRAM_D_27 | ||
129 | 96 MX35_PAD_SD28__EMI_DRAM_D_28 | ||
130 | 97 MX35_PAD_SD29__EMI_DRAM_D_29 | ||
131 | 98 MX35_PAD_SD30__EMI_DRAM_D_30 | ||
132 | 99 MX35_PAD_SD31__EMI_DRAM_D_31 | ||
133 | 100 MX35_PAD_DQM0__EMI_DRAM_DQM_0 | ||
134 | 101 MX35_PAD_DQM1__EMI_DRAM_DQM_1 | ||
135 | 102 MX35_PAD_DQM2__EMI_DRAM_DQM_2 | ||
136 | 103 MX35_PAD_DQM3__EMI_DRAM_DQM_3 | ||
137 | 104 MX35_PAD_EB0__EMI_EIM_EB0_B | ||
138 | 105 MX35_PAD_EB1__EMI_EIM_EB1_B | ||
139 | 106 MX35_PAD_OE__EMI_EIM_OE | ||
140 | 107 MX35_PAD_CS0__EMI_EIM_CS0 | ||
141 | 108 MX35_PAD_CS1__EMI_EIM_CS1 | ||
142 | 109 MX35_PAD_CS1__EMI_NANDF_CE3 | ||
143 | 110 MX35_PAD_CS2__EMI_EIM_CS2 | ||
144 | 111 MX35_PAD_CS3__EMI_EIM_CS3 | ||
145 | 112 MX35_PAD_CS4__EMI_EIM_CS4 | ||
146 | 113 MX35_PAD_CS4__EMI_DTACK_B | ||
147 | 114 MX35_PAD_CS4__EMI_NANDF_CE1 | ||
148 | 115 MX35_PAD_CS4__GPIO1_20 | ||
149 | 116 MX35_PAD_CS5__EMI_EIM_CS5 | ||
150 | 117 MX35_PAD_CS5__CSPI2_SS2 | ||
151 | 118 MX35_PAD_CS5__CSPI1_SS2 | ||
152 | 119 MX35_PAD_CS5__EMI_NANDF_CE2 | ||
153 | 120 MX35_PAD_CS5__GPIO1_21 | ||
154 | 121 MX35_PAD_NF_CE0__EMI_NANDF_CE0 | ||
155 | 122 MX35_PAD_NF_CE0__GPIO1_22 | ||
156 | 123 MX35_PAD_ECB__EMI_EIM_ECB | ||
157 | 124 MX35_PAD_LBA__EMI_EIM_LBA | ||
158 | 125 MX35_PAD_BCLK__EMI_EIM_BCLK | ||
159 | 126 MX35_PAD_RW__EMI_EIM_RW | ||
160 | 127 MX35_PAD_RAS__EMI_DRAM_RAS | ||
161 | 128 MX35_PAD_CAS__EMI_DRAM_CAS | ||
162 | 129 MX35_PAD_SDWE__EMI_DRAM_SDWE | ||
163 | 130 MX35_PAD_SDCKE0__EMI_DRAM_SDCKE_0 | ||
164 | 131 MX35_PAD_SDCKE1__EMI_DRAM_SDCKE_1 | ||
165 | 132 MX35_PAD_SDCLK__EMI_DRAM_SDCLK | ||
166 | 133 MX35_PAD_SDQS0__EMI_DRAM_SDQS_0 | ||
167 | 134 MX35_PAD_SDQS1__EMI_DRAM_SDQS_1 | ||
168 | 135 MX35_PAD_SDQS2__EMI_DRAM_SDQS_2 | ||
169 | 136 MX35_PAD_SDQS3__EMI_DRAM_SDQS_3 | ||
170 | 137 MX35_PAD_NFWE_B__EMI_NANDF_WE_B | ||
171 | 138 MX35_PAD_NFWE_B__USB_TOP_USBH2_DATA_3 | ||
172 | 139 MX35_PAD_NFWE_B__IPU_DISPB_D0_VSYNC | ||
173 | 140 MX35_PAD_NFWE_B__GPIO2_18 | ||
174 | 141 MX35_PAD_NFWE_B__ARM11P_TOP_TRACE_0 | ||
175 | 142 MX35_PAD_NFRE_B__EMI_NANDF_RE_B | ||
176 | 143 MX35_PAD_NFRE_B__USB_TOP_USBH2_DIR | ||
177 | 144 MX35_PAD_NFRE_B__IPU_DISPB_BCLK | ||
178 | 145 MX35_PAD_NFRE_B__GPIO2_19 | ||
179 | 146 MX35_PAD_NFRE_B__ARM11P_TOP_TRACE_1 | ||
180 | 147 MX35_PAD_NFALE__EMI_NANDF_ALE | ||
181 | 148 MX35_PAD_NFALE__USB_TOP_USBH2_STP | ||
182 | 149 MX35_PAD_NFALE__IPU_DISPB_CS0 | ||
183 | 150 MX35_PAD_NFALE__GPIO2_20 | ||
184 | 151 MX35_PAD_NFALE__ARM11P_TOP_TRACE_2 | ||
185 | 152 MX35_PAD_NFCLE__EMI_NANDF_CLE | ||
186 | 153 MX35_PAD_NFCLE__USB_TOP_USBH2_NXT | ||
187 | 154 MX35_PAD_NFCLE__IPU_DISPB_PAR_RS | ||
188 | 155 MX35_PAD_NFCLE__GPIO2_21 | ||
189 | 156 MX35_PAD_NFCLE__ARM11P_TOP_TRACE_3 | ||
190 | 157 MX35_PAD_NFWP_B__EMI_NANDF_WP_B | ||
191 | 158 MX35_PAD_NFWP_B__USB_TOP_USBH2_DATA_7 | ||
192 | 159 MX35_PAD_NFWP_B__IPU_DISPB_WR | ||
193 | 160 MX35_PAD_NFWP_B__GPIO2_22 | ||
194 | 161 MX35_PAD_NFWP_B__ARM11P_TOP_TRCTL | ||
195 | 162 MX35_PAD_NFRB__EMI_NANDF_RB | ||
196 | 163 MX35_PAD_NFRB__IPU_DISPB_RD | ||
197 | 164 MX35_PAD_NFRB__GPIO2_23 | ||
198 | 165 MX35_PAD_NFRB__ARM11P_TOP_TRCLK | ||
199 | 166 MX35_PAD_D15__EMI_EIM_D_15 | ||
200 | 167 MX35_PAD_D14__EMI_EIM_D_14 | ||
201 | 168 MX35_PAD_D13__EMI_EIM_D_13 | ||
202 | 169 MX35_PAD_D12__EMI_EIM_D_12 | ||
203 | 170 MX35_PAD_D11__EMI_EIM_D_11 | ||
204 | 171 MX35_PAD_D10__EMI_EIM_D_10 | ||
205 | 172 MX35_PAD_D9__EMI_EIM_D_9 | ||
206 | 173 MX35_PAD_D8__EMI_EIM_D_8 | ||
207 | 174 MX35_PAD_D7__EMI_EIM_D_7 | ||
208 | 175 MX35_PAD_D6__EMI_EIM_D_6 | ||
209 | 176 MX35_PAD_D5__EMI_EIM_D_5 | ||
210 | 177 MX35_PAD_D4__EMI_EIM_D_4 | ||
211 | 178 MX35_PAD_D3__EMI_EIM_D_3 | ||
212 | 179 MX35_PAD_D2__EMI_EIM_D_2 | ||
213 | 180 MX35_PAD_D1__EMI_EIM_D_1 | ||
214 | 181 MX35_PAD_D0__EMI_EIM_D_0 | ||
215 | 182 MX35_PAD_CSI_D8__IPU_CSI_D_8 | ||
216 | 183 MX35_PAD_CSI_D8__KPP_COL_0 | ||
217 | 184 MX35_PAD_CSI_D8__GPIO1_20 | ||
218 | 185 MX35_PAD_CSI_D8__ARM11P_TOP_EVNTBUS_13 | ||
219 | 186 MX35_PAD_CSI_D9__IPU_CSI_D_9 | ||
220 | 187 MX35_PAD_CSI_D9__KPP_COL_1 | ||
221 | 188 MX35_PAD_CSI_D9__GPIO1_21 | ||
222 | 189 MX35_PAD_CSI_D9__ARM11P_TOP_EVNTBUS_14 | ||
223 | 190 MX35_PAD_CSI_D10__IPU_CSI_D_10 | ||
224 | 191 MX35_PAD_CSI_D10__KPP_COL_2 | ||
225 | 192 MX35_PAD_CSI_D10__GPIO1_22 | ||
226 | 193 MX35_PAD_CSI_D10__ARM11P_TOP_EVNTBUS_15 | ||
227 | 194 MX35_PAD_CSI_D11__IPU_CSI_D_11 | ||
228 | 195 MX35_PAD_CSI_D11__KPP_COL_3 | ||
229 | 196 MX35_PAD_CSI_D11__GPIO1_23 | ||
230 | 197 MX35_PAD_CSI_D12__IPU_CSI_D_12 | ||
231 | 198 MX35_PAD_CSI_D12__KPP_ROW_0 | ||
232 | 199 MX35_PAD_CSI_D12__GPIO1_24 | ||
233 | 200 MX35_PAD_CSI_D13__IPU_CSI_D_13 | ||
234 | 201 MX35_PAD_CSI_D13__KPP_ROW_1 | ||
235 | 202 MX35_PAD_CSI_D13__GPIO1_25 | ||
236 | 203 MX35_PAD_CSI_D14__IPU_CSI_D_14 | ||
237 | 204 MX35_PAD_CSI_D14__KPP_ROW_2 | ||
238 | 205 MX35_PAD_CSI_D14__GPIO1_26 | ||
239 | 206 MX35_PAD_CSI_D15__IPU_CSI_D_15 | ||
240 | 207 MX35_PAD_CSI_D15__KPP_ROW_3 | ||
241 | 208 MX35_PAD_CSI_D15__GPIO1_27 | ||
242 | 209 MX35_PAD_CSI_MCLK__IPU_CSI_MCLK | ||
243 | 210 MX35_PAD_CSI_MCLK__GPIO1_28 | ||
244 | 211 MX35_PAD_CSI_VSYNC__IPU_CSI_VSYNC | ||
245 | 212 MX35_PAD_CSI_VSYNC__GPIO1_29 | ||
246 | 213 MX35_PAD_CSI_HSYNC__IPU_CSI_HSYNC | ||
247 | 214 MX35_PAD_CSI_HSYNC__GPIO1_30 | ||
248 | 215 MX35_PAD_CSI_PIXCLK__IPU_CSI_PIXCLK | ||
249 | 216 MX35_PAD_CSI_PIXCLK__GPIO1_31 | ||
250 | 217 MX35_PAD_I2C1_CLK__I2C1_SCL | ||
251 | 218 MX35_PAD_I2C1_CLK__GPIO2_24 | ||
252 | 219 MX35_PAD_I2C1_CLK__CCM_USB_BYP_CLK | ||
253 | 220 MX35_PAD_I2C1_DAT__I2C1_SDA | ||
254 | 221 MX35_PAD_I2C1_DAT__GPIO2_25 | ||
255 | 222 MX35_PAD_I2C2_CLK__I2C2_SCL | ||
256 | 223 MX35_PAD_I2C2_CLK__CAN1_TXCAN | ||
257 | 224 MX35_PAD_I2C2_CLK__USB_TOP_USBH2_PWR | ||
258 | 225 MX35_PAD_I2C2_CLK__GPIO2_26 | ||
259 | 226 MX35_PAD_I2C2_CLK__SDMA_DEBUG_BUS_DEVICE_2 | ||
260 | 227 MX35_PAD_I2C2_DAT__I2C2_SDA | ||
261 | 228 MX35_PAD_I2C2_DAT__CAN1_RXCAN | ||
262 | 229 MX35_PAD_I2C2_DAT__USB_TOP_USBH2_OC | ||
263 | 230 MX35_PAD_I2C2_DAT__GPIO2_27 | ||
264 | 231 MX35_PAD_I2C2_DAT__SDMA_DEBUG_BUS_DEVICE_3 | ||
265 | 232 MX35_PAD_STXD4__AUDMUX_AUD4_TXD | ||
266 | 233 MX35_PAD_STXD4__GPIO2_28 | ||
267 | 234 MX35_PAD_STXD4__ARM11P_TOP_ARM_COREASID0 | ||
268 | 235 MX35_PAD_SRXD4__AUDMUX_AUD4_RXD | ||
269 | 236 MX35_PAD_SRXD4__GPIO2_29 | ||
270 | 237 MX35_PAD_SRXD4__ARM11P_TOP_ARM_COREASID1 | ||
271 | 238 MX35_PAD_SCK4__AUDMUX_AUD4_TXC | ||
272 | 239 MX35_PAD_SCK4__GPIO2_30 | ||
273 | 240 MX35_PAD_SCK4__ARM11P_TOP_ARM_COREASID2 | ||
274 | 241 MX35_PAD_STXFS4__AUDMUX_AUD4_TXFS | ||
275 | 242 MX35_PAD_STXFS4__GPIO2_31 | ||
276 | 243 MX35_PAD_STXFS4__ARM11P_TOP_ARM_COREASID3 | ||
277 | 244 MX35_PAD_STXD5__AUDMUX_AUD5_TXD | ||
278 | 245 MX35_PAD_STXD5__SPDIF_SPDIF_OUT1 | ||
279 | 246 MX35_PAD_STXD5__CSPI2_MOSI | ||
280 | 247 MX35_PAD_STXD5__GPIO1_0 | ||
281 | 248 MX35_PAD_STXD5__ARM11P_TOP_ARM_COREASID4 | ||
282 | 249 MX35_PAD_SRXD5__AUDMUX_AUD5_RXD | ||
283 | 250 MX35_PAD_SRXD5__SPDIF_SPDIF_IN1 | ||
284 | 251 MX35_PAD_SRXD5__CSPI2_MISO | ||
285 | 252 MX35_PAD_SRXD5__GPIO1_1 | ||
286 | 253 MX35_PAD_SRXD5__ARM11P_TOP_ARM_COREASID5 | ||
287 | 254 MX35_PAD_SCK5__AUDMUX_AUD5_TXC | ||
288 | 255 MX35_PAD_SCK5__SPDIF_SPDIF_EXTCLK | ||
289 | 256 MX35_PAD_SCK5__CSPI2_SCLK | ||
290 | 257 MX35_PAD_SCK5__GPIO1_2 | ||
291 | 258 MX35_PAD_SCK5__ARM11P_TOP_ARM_COREASID6 | ||
292 | 259 MX35_PAD_STXFS5__AUDMUX_AUD5_TXFS | ||
293 | 260 MX35_PAD_STXFS5__CSPI2_RDY | ||
294 | 261 MX35_PAD_STXFS5__GPIO1_3 | ||
295 | 262 MX35_PAD_STXFS5__ARM11P_TOP_ARM_COREASID7 | ||
296 | 263 MX35_PAD_SCKR__ESAI_SCKR | ||
297 | 264 MX35_PAD_SCKR__GPIO1_4 | ||
298 | 265 MX35_PAD_SCKR__ARM11P_TOP_EVNTBUS_10 | ||
299 | 266 MX35_PAD_FSR__ESAI_FSR | ||
300 | 267 MX35_PAD_FSR__GPIO1_5 | ||
301 | 268 MX35_PAD_FSR__ARM11P_TOP_EVNTBUS_11 | ||
302 | 269 MX35_PAD_HCKR__ESAI_HCKR | ||
303 | 270 MX35_PAD_HCKR__AUDMUX_AUD5_RXFS | ||
304 | 271 MX35_PAD_HCKR__CSPI2_SS0 | ||
305 | 272 MX35_PAD_HCKR__IPU_FLASH_STROBE | ||
306 | 273 MX35_PAD_HCKR__GPIO1_6 | ||
307 | 274 MX35_PAD_HCKR__ARM11P_TOP_EVNTBUS_12 | ||
308 | 275 MX35_PAD_SCKT__ESAI_SCKT | ||
309 | 276 MX35_PAD_SCKT__GPIO1_7 | ||
310 | 277 MX35_PAD_SCKT__IPU_CSI_D_0 | ||
311 | 278 MX35_PAD_SCKT__KPP_ROW_2 | ||
312 | 279 MX35_PAD_FST__ESAI_FST | ||
313 | 280 MX35_PAD_FST__GPIO1_8 | ||
314 | 281 MX35_PAD_FST__IPU_CSI_D_1 | ||
315 | 282 MX35_PAD_FST__KPP_ROW_3 | ||
316 | 283 MX35_PAD_HCKT__ESAI_HCKT | ||
317 | 284 MX35_PAD_HCKT__AUDMUX_AUD5_RXC | ||
318 | 285 MX35_PAD_HCKT__GPIO1_9 | ||
319 | 286 MX35_PAD_HCKT__IPU_CSI_D_2 | ||
320 | 287 MX35_PAD_HCKT__KPP_COL_3 | ||
321 | 288 MX35_PAD_TX5_RX0__ESAI_TX5_RX0 | ||
322 | 289 MX35_PAD_TX5_RX0__AUDMUX_AUD4_RXC | ||
323 | 290 MX35_PAD_TX5_RX0__CSPI2_SS2 | ||
324 | 291 MX35_PAD_TX5_RX0__CAN2_TXCAN | ||
325 | 292 MX35_PAD_TX5_RX0__UART2_DTR | ||
326 | 293 MX35_PAD_TX5_RX0__GPIO1_10 | ||
327 | 294 MX35_PAD_TX5_RX0__EMI_M3IF_CHOSEN_MASTER_0 | ||
328 | 295 MX35_PAD_TX4_RX1__ESAI_TX4_RX1 | ||
329 | 296 MX35_PAD_TX4_RX1__AUDMUX_AUD4_RXFS | ||
330 | 297 MX35_PAD_TX4_RX1__CSPI2_SS3 | ||
331 | 298 MX35_PAD_TX4_RX1__CAN2_RXCAN | ||
332 | 299 MX35_PAD_TX4_RX1__UART2_DSR | ||
333 | 300 MX35_PAD_TX4_RX1__GPIO1_11 | ||
334 | 301 MX35_PAD_TX4_RX1__IPU_CSI_D_3 | ||
335 | 302 MX35_PAD_TX4_RX1__KPP_ROW_0 | ||
336 | 303 MX35_PAD_TX3_RX2__ESAI_TX3_RX2 | ||
337 | 304 MX35_PAD_TX3_RX2__I2C3_SCL | ||
338 | 305 MX35_PAD_TX3_RX2__EMI_NANDF_CE1 | ||
339 | 306 MX35_PAD_TX3_RX2__GPIO1_12 | ||
340 | 307 MX35_PAD_TX3_RX2__IPU_CSI_D_4 | ||
341 | 308 MX35_PAD_TX3_RX2__KPP_ROW_1 | ||
342 | 309 MX35_PAD_TX2_RX3__ESAI_TX2_RX3 | ||
343 | 310 MX35_PAD_TX2_RX3__I2C3_SDA | ||
344 | 311 MX35_PAD_TX2_RX3__EMI_NANDF_CE2 | ||
345 | 312 MX35_PAD_TX2_RX3__GPIO1_13 | ||
346 | 313 MX35_PAD_TX2_RX3__IPU_CSI_D_5 | ||
347 | 314 MX35_PAD_TX2_RX3__KPP_COL_0 | ||
348 | 315 MX35_PAD_TX1__ESAI_TX1 | ||
349 | 316 MX35_PAD_TX1__CCM_PMIC_RDY | ||
350 | 317 MX35_PAD_TX1__CSPI1_SS2 | ||
351 | 318 MX35_PAD_TX1__EMI_NANDF_CE3 | ||
352 | 319 MX35_PAD_TX1__UART2_RI | ||
353 | 320 MX35_PAD_TX1__GPIO1_14 | ||
354 | 321 MX35_PAD_TX1__IPU_CSI_D_6 | ||
355 | 322 MX35_PAD_TX1__KPP_COL_1 | ||
356 | 323 MX35_PAD_TX0__ESAI_TX0 | ||
357 | 324 MX35_PAD_TX0__SPDIF_SPDIF_EXTCLK | ||
358 | 325 MX35_PAD_TX0__CSPI1_SS3 | ||
359 | 326 MX35_PAD_TX0__EMI_DTACK_B | ||
360 | 327 MX35_PAD_TX0__UART2_DCD | ||
361 | 328 MX35_PAD_TX0__GPIO1_15 | ||
362 | 329 MX35_PAD_TX0__IPU_CSI_D_7 | ||
363 | 330 MX35_PAD_TX0__KPP_COL_2 | ||
364 | 331 MX35_PAD_CSPI1_MOSI__CSPI1_MOSI | ||
365 | 332 MX35_PAD_CSPI1_MOSI__GPIO1_16 | ||
366 | 333 MX35_PAD_CSPI1_MOSI__ECT_CTI_TRIG_OUT1_2 | ||
367 | 334 MX35_PAD_CSPI1_MISO__CSPI1_MISO | ||
368 | 335 MX35_PAD_CSPI1_MISO__GPIO1_17 | ||
369 | 336 MX35_PAD_CSPI1_MISO__ECT_CTI_TRIG_OUT1_3 | ||
370 | 337 MX35_PAD_CSPI1_SS0__CSPI1_SS0 | ||
371 | 338 MX35_PAD_CSPI1_SS0__OWIRE_LINE | ||
372 | 339 MX35_PAD_CSPI1_SS0__CSPI2_SS3 | ||
373 | 340 MX35_PAD_CSPI1_SS0__GPIO1_18 | ||
374 | 341 MX35_PAD_CSPI1_SS0__ECT_CTI_TRIG_OUT1_4 | ||
375 | 342 MX35_PAD_CSPI1_SS1__CSPI1_SS1 | ||
376 | 343 MX35_PAD_CSPI1_SS1__PWM_PWMO | ||
377 | 344 MX35_PAD_CSPI1_SS1__CCM_CLK32K | ||
378 | 345 MX35_PAD_CSPI1_SS1__GPIO1_19 | ||
379 | 346 MX35_PAD_CSPI1_SS1__IPU_DIAGB_29 | ||
380 | 347 MX35_PAD_CSPI1_SS1__ECT_CTI_TRIG_OUT1_5 | ||
381 | 348 MX35_PAD_CSPI1_SCLK__CSPI1_SCLK | ||
382 | 349 MX35_PAD_CSPI1_SCLK__GPIO3_4 | ||
383 | 350 MX35_PAD_CSPI1_SCLK__IPU_DIAGB_30 | ||
384 | 351 MX35_PAD_CSPI1_SCLK__EMI_M3IF_CHOSEN_MASTER_1 | ||
385 | 352 MX35_PAD_CSPI1_SPI_RDY__CSPI1_RDY | ||
386 | 353 MX35_PAD_CSPI1_SPI_RDY__GPIO3_5 | ||
387 | 354 MX35_PAD_CSPI1_SPI_RDY__IPU_DIAGB_31 | ||
388 | 355 MX35_PAD_CSPI1_SPI_RDY__EMI_M3IF_CHOSEN_MASTER_2 | ||
389 | 356 MX35_PAD_RXD1__UART1_RXD_MUX | ||
390 | 357 MX35_PAD_RXD1__CSPI2_MOSI | ||
391 | 358 MX35_PAD_RXD1__KPP_COL_4 | ||
392 | 359 MX35_PAD_RXD1__GPIO3_6 | ||
393 | 360 MX35_PAD_RXD1__ARM11P_TOP_EVNTBUS_16 | ||
394 | 361 MX35_PAD_TXD1__UART1_TXD_MUX | ||
395 | 362 MX35_PAD_TXD1__CSPI2_MISO | ||
396 | 363 MX35_PAD_TXD1__KPP_COL_5 | ||
397 | 364 MX35_PAD_TXD1__GPIO3_7 | ||
398 | 365 MX35_PAD_TXD1__ARM11P_TOP_EVNTBUS_17 | ||
399 | 366 MX35_PAD_RTS1__UART1_RTS | ||
400 | 367 MX35_PAD_RTS1__CSPI2_SCLK | ||
401 | 368 MX35_PAD_RTS1__I2C3_SCL | ||
402 | 369 MX35_PAD_RTS1__IPU_CSI_D_0 | ||
403 | 370 MX35_PAD_RTS1__KPP_COL_6 | ||
404 | 371 MX35_PAD_RTS1__GPIO3_8 | ||
405 | 372 MX35_PAD_RTS1__EMI_NANDF_CE1 | ||
406 | 373 MX35_PAD_RTS1__ARM11P_TOP_EVNTBUS_18 | ||
407 | 374 MX35_PAD_CTS1__UART1_CTS | ||
408 | 375 MX35_PAD_CTS1__CSPI2_RDY | ||
409 | 376 MX35_PAD_CTS1__I2C3_SDA | ||
410 | 377 MX35_PAD_CTS1__IPU_CSI_D_1 | ||
411 | 378 MX35_PAD_CTS1__KPP_COL_7 | ||
412 | 379 MX35_PAD_CTS1__GPIO3_9 | ||
413 | 380 MX35_PAD_CTS1__EMI_NANDF_CE2 | ||
414 | 381 MX35_PAD_CTS1__ARM11P_TOP_EVNTBUS_19 | ||
415 | 382 MX35_PAD_RXD2__UART2_RXD_MUX | ||
416 | 383 MX35_PAD_RXD2__KPP_ROW_4 | ||
417 | 384 MX35_PAD_RXD2__GPIO3_10 | ||
418 | 385 MX35_PAD_TXD2__UART2_TXD_MUX | ||
419 | 386 MX35_PAD_TXD2__SPDIF_SPDIF_EXTCLK | ||
420 | 387 MX35_PAD_TXD2__KPP_ROW_5 | ||
421 | 388 MX35_PAD_TXD2__GPIO3_11 | ||
422 | 389 MX35_PAD_RTS2__UART2_RTS | ||
423 | 390 MX35_PAD_RTS2__SPDIF_SPDIF_IN1 | ||
424 | 391 MX35_PAD_RTS2__CAN2_RXCAN | ||
425 | 392 MX35_PAD_RTS2__IPU_CSI_D_2 | ||
426 | 393 MX35_PAD_RTS2__KPP_ROW_6 | ||
427 | 394 MX35_PAD_RTS2__GPIO3_12 | ||
428 | 395 MX35_PAD_RTS2__AUDMUX_AUD5_RXC | ||
429 | 396 MX35_PAD_RTS2__UART3_RXD_MUX | ||
430 | 397 MX35_PAD_CTS2__UART2_CTS | ||
431 | 398 MX35_PAD_CTS2__SPDIF_SPDIF_OUT1 | ||
432 | 399 MX35_PAD_CTS2__CAN2_TXCAN | ||
433 | 400 MX35_PAD_CTS2__IPU_CSI_D_3 | ||
434 | 401 MX35_PAD_CTS2__KPP_ROW_7 | ||
435 | 402 MX35_PAD_CTS2__GPIO3_13 | ||
436 | 403 MX35_PAD_CTS2__AUDMUX_AUD5_RXFS | ||
437 | 404 MX35_PAD_CTS2__UART3_TXD_MUX | ||
438 | 405 MX35_PAD_RTCK__ARM11P_TOP_RTCK | ||
439 | 406 MX35_PAD_TCK__SJC_TCK | ||
440 | 407 MX35_PAD_TMS__SJC_TMS | ||
441 | 408 MX35_PAD_TDI__SJC_TDI | ||
442 | 409 MX35_PAD_TDO__SJC_TDO | ||
443 | 410 MX35_PAD_TRSTB__SJC_TRSTB | ||
444 | 411 MX35_PAD_DE_B__SJC_DE_B | ||
445 | 412 MX35_PAD_SJC_MOD__SJC_MOD | ||
446 | 413 MX35_PAD_USBOTG_PWR__USB_TOP_USBOTG_PWR | ||
447 | 414 MX35_PAD_USBOTG_PWR__USB_TOP_USBH2_PWR | ||
448 | 415 MX35_PAD_USBOTG_PWR__GPIO3_14 | ||
449 | 416 MX35_PAD_USBOTG_OC__USB_TOP_USBOTG_OC | ||
450 | 417 MX35_PAD_USBOTG_OC__USB_TOP_USBH2_OC | ||
451 | 418 MX35_PAD_USBOTG_OC__GPIO3_15 | ||
452 | 419 MX35_PAD_LD0__IPU_DISPB_DAT_0 | ||
453 | 420 MX35_PAD_LD0__GPIO2_0 | ||
454 | 421 MX35_PAD_LD0__SDMA_SDMA_DEBUG_PC_0 | ||
455 | 422 MX35_PAD_LD1__IPU_DISPB_DAT_1 | ||
456 | 423 MX35_PAD_LD1__GPIO2_1 | ||
457 | 424 MX35_PAD_LD1__SDMA_SDMA_DEBUG_PC_1 | ||
458 | 425 MX35_PAD_LD2__IPU_DISPB_DAT_2 | ||
459 | 426 MX35_PAD_LD2__GPIO2_2 | ||
460 | 427 MX35_PAD_LD2__SDMA_SDMA_DEBUG_PC_2 | ||
461 | 428 MX35_PAD_LD3__IPU_DISPB_DAT_3 | ||
462 | 429 MX35_PAD_LD3__GPIO2_3 | ||
463 | 430 MX35_PAD_LD3__SDMA_SDMA_DEBUG_PC_3 | ||
464 | 431 MX35_PAD_LD4__IPU_DISPB_DAT_4 | ||
465 | 432 MX35_PAD_LD4__GPIO2_4 | ||
466 | 433 MX35_PAD_LD4__SDMA_SDMA_DEBUG_PC_4 | ||
467 | 434 MX35_PAD_LD5__IPU_DISPB_DAT_5 | ||
468 | 435 MX35_PAD_LD5__GPIO2_5 | ||
469 | 436 MX35_PAD_LD5__SDMA_SDMA_DEBUG_PC_5 | ||
470 | 437 MX35_PAD_LD6__IPU_DISPB_DAT_6 | ||
471 | 438 MX35_PAD_LD6__GPIO2_6 | ||
472 | 439 MX35_PAD_LD6__SDMA_SDMA_DEBUG_PC_6 | ||
473 | 440 MX35_PAD_LD7__IPU_DISPB_DAT_7 | ||
474 | 441 MX35_PAD_LD7__GPIO2_7 | ||
475 | 442 MX35_PAD_LD7__SDMA_SDMA_DEBUG_PC_7 | ||
476 | 443 MX35_PAD_LD8__IPU_DISPB_DAT_8 | ||
477 | 444 MX35_PAD_LD8__GPIO2_8 | ||
478 | 445 MX35_PAD_LD8__SDMA_SDMA_DEBUG_PC_8 | ||
479 | 446 MX35_PAD_LD9__IPU_DISPB_DAT_9 | ||
480 | 447 MX35_PAD_LD9__GPIO2_9 | ||
481 | 448 MX35_PAD_LD9__SDMA_SDMA_DEBUG_PC_9 | ||
482 | 449 MX35_PAD_LD10__IPU_DISPB_DAT_10 | ||
483 | 450 MX35_PAD_LD10__GPIO2_10 | ||
484 | 451 MX35_PAD_LD10__SDMA_SDMA_DEBUG_PC_10 | ||
485 | 452 MX35_PAD_LD11__IPU_DISPB_DAT_11 | ||
486 | 453 MX35_PAD_LD11__GPIO2_11 | ||
487 | 454 MX35_PAD_LD11__SDMA_SDMA_DEBUG_PC_11 | ||
488 | 455 MX35_PAD_LD11__ARM11P_TOP_TRACE_4 | ||
489 | 456 MX35_PAD_LD12__IPU_DISPB_DAT_12 | ||
490 | 457 MX35_PAD_LD12__GPIO2_12 | ||
491 | 458 MX35_PAD_LD12__SDMA_SDMA_DEBUG_PC_12 | ||
492 | 459 MX35_PAD_LD12__ARM11P_TOP_TRACE_5 | ||
493 | 460 MX35_PAD_LD13__IPU_DISPB_DAT_13 | ||
494 | 461 MX35_PAD_LD13__GPIO2_13 | ||
495 | 462 MX35_PAD_LD13__SDMA_SDMA_DEBUG_PC_13 | ||
496 | 463 MX35_PAD_LD13__ARM11P_TOP_TRACE_6 | ||
497 | 464 MX35_PAD_LD14__IPU_DISPB_DAT_14 | ||
498 | 465 MX35_PAD_LD14__GPIO2_14 | ||
499 | 466 MX35_PAD_LD14__SDMA_SDMA_DEBUG_EVENT_CHANNEL_0 | ||
500 | 467 MX35_PAD_LD14__ARM11P_TOP_TRACE_7 | ||
501 | 468 MX35_PAD_LD15__IPU_DISPB_DAT_15 | ||
502 | 469 MX35_PAD_LD15__GPIO2_15 | ||
503 | 470 MX35_PAD_LD15__SDMA_SDMA_DEBUG_EVENT_CHANNEL_1 | ||
504 | 471 MX35_PAD_LD15__ARM11P_TOP_TRACE_8 | ||
505 | 472 MX35_PAD_LD16__IPU_DISPB_DAT_16 | ||
506 | 473 MX35_PAD_LD16__IPU_DISPB_D12_VSYNC | ||
507 | 474 MX35_PAD_LD16__GPIO2_16 | ||
508 | 475 MX35_PAD_LD16__SDMA_SDMA_DEBUG_EVENT_CHANNEL_2 | ||
509 | 476 MX35_PAD_LD16__ARM11P_TOP_TRACE_9 | ||
510 | 477 MX35_PAD_LD17__IPU_DISPB_DAT_17 | ||
511 | 478 MX35_PAD_LD17__IPU_DISPB_CS2 | ||
512 | 479 MX35_PAD_LD17__GPIO2_17 | ||
513 | 480 MX35_PAD_LD17__SDMA_SDMA_DEBUG_EVENT_CHANNEL_3 | ||
514 | 481 MX35_PAD_LD17__ARM11P_TOP_TRACE_10 | ||
515 | 482 MX35_PAD_LD18__IPU_DISPB_DAT_18 | ||
516 | 483 MX35_PAD_LD18__IPU_DISPB_D0_VSYNC | ||
517 | 484 MX35_PAD_LD18__IPU_DISPB_D12_VSYNC | ||
518 | 485 MX35_PAD_LD18__ESDHC3_CMD | ||
519 | 486 MX35_PAD_LD18__USB_TOP_USBOTG_DATA_3 | ||
520 | 487 MX35_PAD_LD18__GPIO3_24 | ||
521 | 488 MX35_PAD_LD18__SDMA_SDMA_DEBUG_EVENT_CHANNEL_4 | ||
522 | 489 MX35_PAD_LD18__ARM11P_TOP_TRACE_11 | ||
523 | 490 MX35_PAD_LD19__IPU_DISPB_DAT_19 | ||
524 | 491 MX35_PAD_LD19__IPU_DISPB_BCLK | ||
525 | 492 MX35_PAD_LD19__IPU_DISPB_CS1 | ||
526 | 493 MX35_PAD_LD19__ESDHC3_CLK | ||
527 | 494 MX35_PAD_LD19__USB_TOP_USBOTG_DIR | ||
528 | 495 MX35_PAD_LD19__GPIO3_25 | ||
529 | 496 MX35_PAD_LD19__SDMA_SDMA_DEBUG_EVENT_CHANNEL_5 | ||
530 | 497 MX35_PAD_LD19__ARM11P_TOP_TRACE_12 | ||
531 | 498 MX35_PAD_LD20__IPU_DISPB_DAT_20 | ||
532 | 499 MX35_PAD_LD20__IPU_DISPB_CS0 | ||
533 | 500 MX35_PAD_LD20__IPU_DISPB_SD_CLK | ||
534 | 501 MX35_PAD_LD20__ESDHC3_DAT0 | ||
535 | 502 MX35_PAD_LD20__GPIO3_26 | ||
536 | 503 MX35_PAD_LD20__SDMA_SDMA_DEBUG_CORE_STATUS_3 | ||
537 | 504 MX35_PAD_LD20__ARM11P_TOP_TRACE_13 | ||
538 | 505 MX35_PAD_LD21__IPU_DISPB_DAT_21 | ||
539 | 506 MX35_PAD_LD21__IPU_DISPB_PAR_RS | ||
540 | 507 MX35_PAD_LD21__IPU_DISPB_SER_RS | ||
541 | 508 MX35_PAD_LD21__ESDHC3_DAT1 | ||
542 | 509 MX35_PAD_LD21__USB_TOP_USBOTG_STP | ||
543 | 510 MX35_PAD_LD21__GPIO3_27 | ||
544 | 511 MX35_PAD_LD21__SDMA_DEBUG_EVENT_CHANNEL_SEL | ||
545 | 512 MX35_PAD_LD21__ARM11P_TOP_TRACE_14 | ||
546 | 513 MX35_PAD_LD22__IPU_DISPB_DAT_22 | ||
547 | 514 MX35_PAD_LD22__IPU_DISPB_WR | ||
548 | 515 MX35_PAD_LD22__IPU_DISPB_SD_D_I | ||
549 | 516 MX35_PAD_LD22__ESDHC3_DAT2 | ||
550 | 517 MX35_PAD_LD22__USB_TOP_USBOTG_NXT | ||
551 | 518 MX35_PAD_LD22__GPIO3_28 | ||
552 | 519 MX35_PAD_LD22__SDMA_DEBUG_BUS_ERROR | ||
553 | 520 MX35_PAD_LD22__ARM11P_TOP_TRCTL | ||
554 | 521 MX35_PAD_LD23__IPU_DISPB_DAT_23 | ||
555 | 522 MX35_PAD_LD23__IPU_DISPB_RD | ||
556 | 523 MX35_PAD_LD23__IPU_DISPB_SD_D_IO | ||
557 | 524 MX35_PAD_LD23__ESDHC3_DAT3 | ||
558 | 525 MX35_PAD_LD23__USB_TOP_USBOTG_DATA_7 | ||
559 | 526 MX35_PAD_LD23__GPIO3_29 | ||
560 | 527 MX35_PAD_LD23__SDMA_DEBUG_MATCHED_DMBUS | ||
561 | 528 MX35_PAD_LD23__ARM11P_TOP_TRCLK | ||
562 | 529 MX35_PAD_D3_HSYNC__IPU_DISPB_D3_HSYNC | ||
563 | 530 MX35_PAD_D3_HSYNC__IPU_DISPB_SD_D_IO | ||
564 | 531 MX35_PAD_D3_HSYNC__GPIO3_30 | ||
565 | 532 MX35_PAD_D3_HSYNC__SDMA_DEBUG_RTBUFFER_WRITE | ||
566 | 533 MX35_PAD_D3_HSYNC__ARM11P_TOP_TRACE_15 | ||
567 | 534 MX35_PAD_D3_FPSHIFT__IPU_DISPB_D3_CLK | ||
568 | 535 MX35_PAD_D3_FPSHIFT__IPU_DISPB_SD_CLK | ||
569 | 536 MX35_PAD_D3_FPSHIFT__GPIO3_31 | ||
570 | 537 MX35_PAD_D3_FPSHIFT__SDMA_SDMA_DEBUG_CORE_STATUS_0 | ||
571 | 538 MX35_PAD_D3_FPSHIFT__ARM11P_TOP_TRACE_16 | ||
572 | 539 MX35_PAD_D3_DRDY__IPU_DISPB_D3_DRDY | ||
573 | 540 MX35_PAD_D3_DRDY__IPU_DISPB_SD_D_O | ||
574 | 541 MX35_PAD_D3_DRDY__GPIO1_0 | ||
575 | 542 MX35_PAD_D3_DRDY__SDMA_SDMA_DEBUG_CORE_STATUS_1 | ||
576 | 543 MX35_PAD_D3_DRDY__ARM11P_TOP_TRACE_17 | ||
577 | 544 MX35_PAD_CONTRAST__IPU_DISPB_CONTR | ||
578 | 545 MX35_PAD_CONTRAST__GPIO1_1 | ||
579 | 546 MX35_PAD_CONTRAST__SDMA_SDMA_DEBUG_CORE_STATUS_2 | ||
580 | 547 MX35_PAD_CONTRAST__ARM11P_TOP_TRACE_18 | ||
581 | 548 MX35_PAD_D3_VSYNC__IPU_DISPB_D3_VSYNC | ||
582 | 549 MX35_PAD_D3_VSYNC__IPU_DISPB_CS1 | ||
583 | 550 MX35_PAD_D3_VSYNC__GPIO1_2 | ||
584 | 551 MX35_PAD_D3_VSYNC__SDMA_DEBUG_YIELD | ||
585 | 552 MX35_PAD_D3_VSYNC__ARM11P_TOP_TRACE_19 | ||
586 | 553 MX35_PAD_D3_REV__IPU_DISPB_D3_REV | ||
587 | 554 MX35_PAD_D3_REV__IPU_DISPB_SER_RS | ||
588 | 555 MX35_PAD_D3_REV__GPIO1_3 | ||
589 | 556 MX35_PAD_D3_REV__SDMA_DEBUG_BUS_RWB | ||
590 | 557 MX35_PAD_D3_REV__ARM11P_TOP_TRACE_20 | ||
591 | 558 MX35_PAD_D3_CLS__IPU_DISPB_D3_CLS | ||
592 | 559 MX35_PAD_D3_CLS__IPU_DISPB_CS2 | ||
593 | 560 MX35_PAD_D3_CLS__GPIO1_4 | ||
594 | 561 MX35_PAD_D3_CLS__SDMA_DEBUG_BUS_DEVICE_0 | ||
595 | 562 MX35_PAD_D3_CLS__ARM11P_TOP_TRACE_21 | ||
596 | 563 MX35_PAD_D3_SPL__IPU_DISPB_D3_SPL | ||
597 | 564 MX35_PAD_D3_SPL__IPU_DISPB_D12_VSYNC | ||
598 | 565 MX35_PAD_D3_SPL__GPIO1_5 | ||
599 | 566 MX35_PAD_D3_SPL__SDMA_DEBUG_BUS_DEVICE_1 | ||
600 | 567 MX35_PAD_D3_SPL__ARM11P_TOP_TRACE_22 | ||
601 | 568 MX35_PAD_SD1_CMD__ESDHC1_CMD | ||
602 | 569 MX35_PAD_SD1_CMD__MSHC_SCLK | ||
603 | 570 MX35_PAD_SD1_CMD__IPU_DISPB_D0_VSYNC | ||
604 | 571 MX35_PAD_SD1_CMD__USB_TOP_USBOTG_DATA_4 | ||
605 | 572 MX35_PAD_SD1_CMD__GPIO1_6 | ||
606 | 573 MX35_PAD_SD1_CMD__ARM11P_TOP_TRCTL | ||
607 | 574 MX35_PAD_SD1_CLK__ESDHC1_CLK | ||
608 | 575 MX35_PAD_SD1_CLK__MSHC_BS | ||
609 | 576 MX35_PAD_SD1_CLK__IPU_DISPB_BCLK | ||
610 | 577 MX35_PAD_SD1_CLK__USB_TOP_USBOTG_DATA_5 | ||
611 | 578 MX35_PAD_SD1_CLK__GPIO1_7 | ||
612 | 579 MX35_PAD_SD1_CLK__ARM11P_TOP_TRCLK | ||
613 | 580 MX35_PAD_SD1_DATA0__ESDHC1_DAT0 | ||
614 | 581 MX35_PAD_SD1_DATA0__MSHC_DATA_0 | ||
615 | 582 MX35_PAD_SD1_DATA0__IPU_DISPB_CS0 | ||
616 | 583 MX35_PAD_SD1_DATA0__USB_TOP_USBOTG_DATA_6 | ||
617 | 584 MX35_PAD_SD1_DATA0__GPIO1_8 | ||
618 | 585 MX35_PAD_SD1_DATA0__ARM11P_TOP_TRACE_23 | ||
619 | 586 MX35_PAD_SD1_DATA1__ESDHC1_DAT1 | ||
620 | 587 MX35_PAD_SD1_DATA1__MSHC_DATA_1 | ||
621 | 588 MX35_PAD_SD1_DATA1__IPU_DISPB_PAR_RS | ||
622 | 589 MX35_PAD_SD1_DATA1__USB_TOP_USBOTG_DATA_0 | ||
623 | 590 MX35_PAD_SD1_DATA1__GPIO1_9 | ||
624 | 591 MX35_PAD_SD1_DATA1__ARM11P_TOP_TRACE_24 | ||
625 | 592 MX35_PAD_SD1_DATA2__ESDHC1_DAT2 | ||
626 | 593 MX35_PAD_SD1_DATA2__MSHC_DATA_2 | ||
627 | 594 MX35_PAD_SD1_DATA2__IPU_DISPB_WR | ||
628 | 595 MX35_PAD_SD1_DATA2__USB_TOP_USBOTG_DATA_1 | ||
629 | 596 MX35_PAD_SD1_DATA2__GPIO1_10 | ||
630 | 597 MX35_PAD_SD1_DATA2__ARM11P_TOP_TRACE_25 | ||
631 | 598 MX35_PAD_SD1_DATA3__ESDHC1_DAT3 | ||
632 | 599 MX35_PAD_SD1_DATA3__MSHC_DATA_3 | ||
633 | 600 MX35_PAD_SD1_DATA3__IPU_DISPB_RD | ||
634 | 601 MX35_PAD_SD1_DATA3__USB_TOP_USBOTG_DATA_2 | ||
635 | 602 MX35_PAD_SD1_DATA3__GPIO1_11 | ||
636 | 603 MX35_PAD_SD1_DATA3__ARM11P_TOP_TRACE_26 | ||
637 | 604 MX35_PAD_SD2_CMD__ESDHC2_CMD | ||
638 | 605 MX35_PAD_SD2_CMD__I2C3_SCL | ||
639 | 606 MX35_PAD_SD2_CMD__ESDHC1_DAT4 | ||
640 | 607 MX35_PAD_SD2_CMD__IPU_CSI_D_2 | ||
641 | 608 MX35_PAD_SD2_CMD__USB_TOP_USBH2_DATA_4 | ||
642 | 609 MX35_PAD_SD2_CMD__GPIO2_0 | ||
643 | 610 MX35_PAD_SD2_CMD__SPDIF_SPDIF_OUT1 | ||
644 | 611 MX35_PAD_SD2_CMD__IPU_DISPB_D12_VSYNC | ||
645 | 612 MX35_PAD_SD2_CLK__ESDHC2_CLK | ||
646 | 613 MX35_PAD_SD2_CLK__I2C3_SDA | ||
647 | 614 MX35_PAD_SD2_CLK__ESDHC1_DAT5 | ||
648 | 615 MX35_PAD_SD2_CLK__IPU_CSI_D_3 | ||
649 | 616 MX35_PAD_SD2_CLK__USB_TOP_USBH2_DATA_5 | ||
650 | 617 MX35_PAD_SD2_CLK__GPIO2_1 | ||
651 | 618 MX35_PAD_SD2_CLK__SPDIF_SPDIF_IN1 | ||
652 | 619 MX35_PAD_SD2_CLK__IPU_DISPB_CS2 | ||
653 | 620 MX35_PAD_SD2_DATA0__ESDHC2_DAT0 | ||
654 | 621 MX35_PAD_SD2_DATA0__UART3_RXD_MUX | ||
655 | 622 MX35_PAD_SD2_DATA0__ESDHC1_DAT6 | ||
656 | 623 MX35_PAD_SD2_DATA0__IPU_CSI_D_4 | ||
657 | 624 MX35_PAD_SD2_DATA0__USB_TOP_USBH2_DATA_6 | ||
658 | 625 MX35_PAD_SD2_DATA0__GPIO2_2 | ||
659 | 626 MX35_PAD_SD2_DATA0__SPDIF_SPDIF_EXTCLK | ||
660 | 627 MX35_PAD_SD2_DATA1__ESDHC2_DAT1 | ||
661 | 628 MX35_PAD_SD2_DATA1__UART3_TXD_MUX | ||
662 | 629 MX35_PAD_SD2_DATA1__ESDHC1_DAT7 | ||
663 | 630 MX35_PAD_SD2_DATA1__IPU_CSI_D_5 | ||
664 | 631 MX35_PAD_SD2_DATA1__USB_TOP_USBH2_DATA_0 | ||
665 | 632 MX35_PAD_SD2_DATA1__GPIO2_3 | ||
666 | 633 MX35_PAD_SD2_DATA2__ESDHC2_DAT2 | ||
667 | 634 MX35_PAD_SD2_DATA2__UART3_RTS | ||
668 | 635 MX35_PAD_SD2_DATA2__CAN1_RXCAN | ||
669 | 636 MX35_PAD_SD2_DATA2__IPU_CSI_D_6 | ||
670 | 637 MX35_PAD_SD2_DATA2__USB_TOP_USBH2_DATA_1 | ||
671 | 638 MX35_PAD_SD2_DATA2__GPIO2_4 | ||
672 | 639 MX35_PAD_SD2_DATA3__ESDHC2_DAT3 | ||
673 | 640 MX35_PAD_SD2_DATA3__UART3_CTS | ||
674 | 641 MX35_PAD_SD2_DATA3__CAN1_TXCAN | ||
675 | 642 MX35_PAD_SD2_DATA3__IPU_CSI_D_7 | ||
676 | 643 MX35_PAD_SD2_DATA3__USB_TOP_USBH2_DATA_2 | ||
677 | 644 MX35_PAD_SD2_DATA3__GPIO2_5 | ||
678 | 645 MX35_PAD_ATA_CS0__ATA_CS0 | ||
679 | 646 MX35_PAD_ATA_CS0__CSPI1_SS3 | ||
680 | 647 MX35_PAD_ATA_CS0__IPU_DISPB_CS1 | ||
681 | 648 MX35_PAD_ATA_CS0__GPIO2_6 | ||
682 | 649 MX35_PAD_ATA_CS0__IPU_DIAGB_0 | ||
683 | 650 MX35_PAD_ATA_CS0__ARM11P_TOP_MAX1_HMASTER_0 | ||
684 | 651 MX35_PAD_ATA_CS1__ATA_CS1 | ||
685 | 652 MX35_PAD_ATA_CS1__IPU_DISPB_CS2 | ||
686 | 653 MX35_PAD_ATA_CS1__CSPI2_SS0 | ||
687 | 654 MX35_PAD_ATA_CS1__GPIO2_7 | ||
688 | 655 MX35_PAD_ATA_CS1__IPU_DIAGB_1 | ||
689 | 656 MX35_PAD_ATA_CS1__ARM11P_TOP_MAX1_HMASTER_1 | ||
690 | 657 MX35_PAD_ATA_DIOR__ATA_DIOR | ||
691 | 658 MX35_PAD_ATA_DIOR__ESDHC3_DAT0 | ||
692 | 659 MX35_PAD_ATA_DIOR__USB_TOP_USBOTG_DIR | ||
693 | 660 MX35_PAD_ATA_DIOR__IPU_DISPB_BE0 | ||
694 | 661 MX35_PAD_ATA_DIOR__CSPI2_SS1 | ||
695 | 662 MX35_PAD_ATA_DIOR__GPIO2_8 | ||
696 | 663 MX35_PAD_ATA_DIOR__IPU_DIAGB_2 | ||
697 | 664 MX35_PAD_ATA_DIOR__ARM11P_TOP_MAX1_HMASTER_2 | ||
698 | 665 MX35_PAD_ATA_DIOW__ATA_DIOW | ||
699 | 666 MX35_PAD_ATA_DIOW__ESDHC3_DAT1 | ||
700 | 667 MX35_PAD_ATA_DIOW__USB_TOP_USBOTG_STP | ||
701 | 668 MX35_PAD_ATA_DIOW__IPU_DISPB_BE1 | ||
702 | 669 MX35_PAD_ATA_DIOW__CSPI2_MOSI | ||
703 | 670 MX35_PAD_ATA_DIOW__GPIO2_9 | ||
704 | 671 MX35_PAD_ATA_DIOW__IPU_DIAGB_3 | ||
705 | 672 MX35_PAD_ATA_DIOW__ARM11P_TOP_MAX1_HMASTER_3 | ||
706 | 673 MX35_PAD_ATA_DMACK__ATA_DMACK | ||
707 | 674 MX35_PAD_ATA_DMACK__ESDHC3_DAT2 | ||
708 | 675 MX35_PAD_ATA_DMACK__USB_TOP_USBOTG_NXT | ||
709 | 676 MX35_PAD_ATA_DMACK__CSPI2_MISO | ||
710 | 677 MX35_PAD_ATA_DMACK__GPIO2_10 | ||
711 | 678 MX35_PAD_ATA_DMACK__IPU_DIAGB_4 | ||
712 | 679 MX35_PAD_ATA_DMACK__ARM11P_TOP_MAX0_HMASTER_0 | ||
713 | 680 MX35_PAD_ATA_RESET_B__ATA_RESET_B | ||
714 | 681 MX35_PAD_ATA_RESET_B__ESDHC3_DAT3 | ||
715 | 682 MX35_PAD_ATA_RESET_B__USB_TOP_USBOTG_DATA_0 | ||
716 | 683 MX35_PAD_ATA_RESET_B__IPU_DISPB_SD_D_O | ||
717 | 684 MX35_PAD_ATA_RESET_B__CSPI2_RDY | ||
718 | 685 MX35_PAD_ATA_RESET_B__GPIO2_11 | ||
719 | 686 MX35_PAD_ATA_RESET_B__IPU_DIAGB_5 | ||
720 | 687 MX35_PAD_ATA_RESET_B__ARM11P_TOP_MAX0_HMASTER_1 | ||
721 | 688 MX35_PAD_ATA_IORDY__ATA_IORDY | ||
722 | 689 MX35_PAD_ATA_IORDY__ESDHC3_DAT4 | ||
723 | 690 MX35_PAD_ATA_IORDY__USB_TOP_USBOTG_DATA_1 | ||
724 | 691 MX35_PAD_ATA_IORDY__IPU_DISPB_SD_D_IO | ||
725 | 692 MX35_PAD_ATA_IORDY__ESDHC2_DAT4 | ||
726 | 693 MX35_PAD_ATA_IORDY__GPIO2_12 | ||
727 | 694 MX35_PAD_ATA_IORDY__IPU_DIAGB_6 | ||
728 | 695 MX35_PAD_ATA_IORDY__ARM11P_TOP_MAX0_HMASTER_2 | ||
729 | 696 MX35_PAD_ATA_DATA0__ATA_DATA_0 | ||
730 | 697 MX35_PAD_ATA_DATA0__ESDHC3_DAT5 | ||
731 | 698 MX35_PAD_ATA_DATA0__USB_TOP_USBOTG_DATA_2 | ||
732 | 699 MX35_PAD_ATA_DATA0__IPU_DISPB_D12_VSYNC | ||
733 | 700 MX35_PAD_ATA_DATA0__ESDHC2_DAT5 | ||
734 | 701 MX35_PAD_ATA_DATA0__GPIO2_13 | ||
735 | 702 MX35_PAD_ATA_DATA0__IPU_DIAGB_7 | ||
736 | 703 MX35_PAD_ATA_DATA0__ARM11P_TOP_MAX0_HMASTER_3 | ||
737 | 704 MX35_PAD_ATA_DATA1__ATA_DATA_1 | ||
738 | 705 MX35_PAD_ATA_DATA1__ESDHC3_DAT6 | ||
739 | 706 MX35_PAD_ATA_DATA1__USB_TOP_USBOTG_DATA_3 | ||
740 | 707 MX35_PAD_ATA_DATA1__IPU_DISPB_SD_CLK | ||
741 | 708 MX35_PAD_ATA_DATA1__ESDHC2_DAT6 | ||
742 | 709 MX35_PAD_ATA_DATA1__GPIO2_14 | ||
743 | 710 MX35_PAD_ATA_DATA1__IPU_DIAGB_8 | ||
744 | 711 MX35_PAD_ATA_DATA1__ARM11P_TOP_TRACE_27 | ||
745 | 712 MX35_PAD_ATA_DATA2__ATA_DATA_2 | ||
746 | 713 MX35_PAD_ATA_DATA2__ESDHC3_DAT7 | ||
747 | 714 MX35_PAD_ATA_DATA2__USB_TOP_USBOTG_DATA_4 | ||
748 | 715 MX35_PAD_ATA_DATA2__IPU_DISPB_SER_RS | ||
749 | 716 MX35_PAD_ATA_DATA2__ESDHC2_DAT7 | ||
750 | 717 MX35_PAD_ATA_DATA2__GPIO2_15 | ||
751 | 718 MX35_PAD_ATA_DATA2__IPU_DIAGB_9 | ||
752 | 719 MX35_PAD_ATA_DATA2__ARM11P_TOP_TRACE_28 | ||
753 | 720 MX35_PAD_ATA_DATA3__ATA_DATA_3 | ||
754 | 721 MX35_PAD_ATA_DATA3__ESDHC3_CLK | ||
755 | 722 MX35_PAD_ATA_DATA3__USB_TOP_USBOTG_DATA_5 | ||
756 | 723 MX35_PAD_ATA_DATA3__CSPI2_SCLK | ||
757 | 724 MX35_PAD_ATA_DATA3__GPIO2_16 | ||
758 | 725 MX35_PAD_ATA_DATA3__IPU_DIAGB_10 | ||
759 | 726 MX35_PAD_ATA_DATA3__ARM11P_TOP_TRACE_29 | ||
760 | 727 MX35_PAD_ATA_DATA4__ATA_DATA_4 | ||
761 | 728 MX35_PAD_ATA_DATA4__ESDHC3_CMD | ||
762 | 729 MX35_PAD_ATA_DATA4__USB_TOP_USBOTG_DATA_6 | ||
763 | 730 MX35_PAD_ATA_DATA4__GPIO2_17 | ||
764 | 731 MX35_PAD_ATA_DATA4__IPU_DIAGB_11 | ||
765 | 732 MX35_PAD_ATA_DATA4__ARM11P_TOP_TRACE_30 | ||
766 | 733 MX35_PAD_ATA_DATA5__ATA_DATA_5 | ||
767 | 734 MX35_PAD_ATA_DATA5__USB_TOP_USBOTG_DATA_7 | ||
768 | 735 MX35_PAD_ATA_DATA5__GPIO2_18 | ||
769 | 736 MX35_PAD_ATA_DATA5__IPU_DIAGB_12 | ||
770 | 737 MX35_PAD_ATA_DATA5__ARM11P_TOP_TRACE_31 | ||
771 | 738 MX35_PAD_ATA_DATA6__ATA_DATA_6 | ||
772 | 739 MX35_PAD_ATA_DATA6__CAN1_TXCAN | ||
773 | 740 MX35_PAD_ATA_DATA6__UART1_DTR | ||
774 | 741 MX35_PAD_ATA_DATA6__AUDMUX_AUD6_TXD | ||
775 | 742 MX35_PAD_ATA_DATA6__GPIO2_19 | ||
776 | 743 MX35_PAD_ATA_DATA6__IPU_DIAGB_13 | ||
777 | 744 MX35_PAD_ATA_DATA7__ATA_DATA_7 | ||
778 | 745 MX35_PAD_ATA_DATA7__CAN1_RXCAN | ||
779 | 746 MX35_PAD_ATA_DATA7__UART1_DSR | ||
780 | 747 MX35_PAD_ATA_DATA7__AUDMUX_AUD6_RXD | ||
781 | 748 MX35_PAD_ATA_DATA7__GPIO2_20 | ||
782 | 749 MX35_PAD_ATA_DATA7__IPU_DIAGB_14 | ||
783 | 750 MX35_PAD_ATA_DATA8__ATA_DATA_8 | ||
784 | 751 MX35_PAD_ATA_DATA8__UART3_RTS | ||
785 | 752 MX35_PAD_ATA_DATA8__UART1_RI | ||
786 | 753 MX35_PAD_ATA_DATA8__AUDMUX_AUD6_TXC | ||
787 | 754 MX35_PAD_ATA_DATA8__GPIO2_21 | ||
788 | 755 MX35_PAD_ATA_DATA8__IPU_DIAGB_15 | ||
789 | 756 MX35_PAD_ATA_DATA9__ATA_DATA_9 | ||
790 | 757 MX35_PAD_ATA_DATA9__UART3_CTS | ||
791 | 758 MX35_PAD_ATA_DATA9__UART1_DCD | ||
792 | 759 MX35_PAD_ATA_DATA9__AUDMUX_AUD6_TXFS | ||
793 | 760 MX35_PAD_ATA_DATA9__GPIO2_22 | ||
794 | 761 MX35_PAD_ATA_DATA9__IPU_DIAGB_16 | ||
795 | 762 MX35_PAD_ATA_DATA10__ATA_DATA_10 | ||
796 | 763 MX35_PAD_ATA_DATA10__UART3_RXD_MUX | ||
797 | 764 MX35_PAD_ATA_DATA10__AUDMUX_AUD6_RXC | ||
798 | 765 MX35_PAD_ATA_DATA10__GPIO2_23 | ||
799 | 766 MX35_PAD_ATA_DATA10__IPU_DIAGB_17 | ||
800 | 767 MX35_PAD_ATA_DATA11__ATA_DATA_11 | ||
801 | 768 MX35_PAD_ATA_DATA11__UART3_TXD_MUX | ||
802 | 769 MX35_PAD_ATA_DATA11__AUDMUX_AUD6_RXFS | ||
803 | 770 MX35_PAD_ATA_DATA11__GPIO2_24 | ||
804 | 771 MX35_PAD_ATA_DATA11__IPU_DIAGB_18 | ||
805 | 772 MX35_PAD_ATA_DATA12__ATA_DATA_12 | ||
806 | 773 MX35_PAD_ATA_DATA12__I2C3_SCL | ||
807 | 774 MX35_PAD_ATA_DATA12__GPIO2_25 | ||
808 | 775 MX35_PAD_ATA_DATA12__IPU_DIAGB_19 | ||
809 | 776 MX35_PAD_ATA_DATA13__ATA_DATA_13 | ||
810 | 777 MX35_PAD_ATA_DATA13__I2C3_SDA | ||
811 | 778 MX35_PAD_ATA_DATA13__GPIO2_26 | ||
812 | 779 MX35_PAD_ATA_DATA13__IPU_DIAGB_20 | ||
813 | 780 MX35_PAD_ATA_DATA14__ATA_DATA_14 | ||
814 | 781 MX35_PAD_ATA_DATA14__IPU_CSI_D_0 | ||
815 | 782 MX35_PAD_ATA_DATA14__KPP_ROW_0 | ||
816 | 783 MX35_PAD_ATA_DATA14__GPIO2_27 | ||
817 | 784 MX35_PAD_ATA_DATA14__IPU_DIAGB_21 | ||
818 | 785 MX35_PAD_ATA_DATA15__ATA_DATA_15 | ||
819 | 786 MX35_PAD_ATA_DATA15__IPU_CSI_D_1 | ||
820 | 787 MX35_PAD_ATA_DATA15__KPP_ROW_1 | ||
821 | 788 MX35_PAD_ATA_DATA15__GPIO2_28 | ||
822 | 789 MX35_PAD_ATA_DATA15__IPU_DIAGB_22 | ||
823 | 790 MX35_PAD_ATA_INTRQ__ATA_INTRQ | ||
824 | 791 MX35_PAD_ATA_INTRQ__IPU_CSI_D_2 | ||
825 | 792 MX35_PAD_ATA_INTRQ__KPP_ROW_2 | ||
826 | 793 MX35_PAD_ATA_INTRQ__GPIO2_29 | ||
827 | 794 MX35_PAD_ATA_INTRQ__IPU_DIAGB_23 | ||
828 | 795 MX35_PAD_ATA_BUFF_EN__ATA_BUFFER_EN | ||
829 | 796 MX35_PAD_ATA_BUFF_EN__IPU_CSI_D_3 | ||
830 | 797 MX35_PAD_ATA_BUFF_EN__KPP_ROW_3 | ||
831 | 798 MX35_PAD_ATA_BUFF_EN__GPIO2_30 | ||
832 | 799 MX35_PAD_ATA_BUFF_EN__IPU_DIAGB_24 | ||
833 | 800 MX35_PAD_ATA_DMARQ__ATA_DMARQ | ||
834 | 801 MX35_PAD_ATA_DMARQ__IPU_CSI_D_4 | ||
835 | 802 MX35_PAD_ATA_DMARQ__KPP_COL_0 | ||
836 | 803 MX35_PAD_ATA_DMARQ__GPIO2_31 | ||
837 | 804 MX35_PAD_ATA_DMARQ__IPU_DIAGB_25 | ||
838 | 805 MX35_PAD_ATA_DMARQ__ECT_CTI_TRIG_IN1_4 | ||
839 | 806 MX35_PAD_ATA_DA0__ATA_DA_0 | ||
840 | 807 MX35_PAD_ATA_DA0__IPU_CSI_D_5 | ||
841 | 808 MX35_PAD_ATA_DA0__KPP_COL_1 | ||
842 | 809 MX35_PAD_ATA_DA0__GPIO3_0 | ||
843 | 810 MX35_PAD_ATA_DA0__IPU_DIAGB_26 | ||
844 | 811 MX35_PAD_ATA_DA0__ECT_CTI_TRIG_IN1_5 | ||
845 | 812 MX35_PAD_ATA_DA1__ATA_DA_1 | ||
846 | 813 MX35_PAD_ATA_DA1__IPU_CSI_D_6 | ||
847 | 814 MX35_PAD_ATA_DA1__KPP_COL_2 | ||
848 | 815 MX35_PAD_ATA_DA1__GPIO3_1 | ||
849 | 816 MX35_PAD_ATA_DA1__IPU_DIAGB_27 | ||
850 | 817 MX35_PAD_ATA_DA1__ECT_CTI_TRIG_IN1_6 | ||
851 | 818 MX35_PAD_ATA_DA2__ATA_DA_2 | ||
852 | 819 MX35_PAD_ATA_DA2__IPU_CSI_D_7 | ||
853 | 820 MX35_PAD_ATA_DA2__KPP_COL_3 | ||
854 | 821 MX35_PAD_ATA_DA2__GPIO3_2 | ||
855 | 822 MX35_PAD_ATA_DA2__IPU_DIAGB_28 | ||
856 | 823 MX35_PAD_ATA_DA2__ECT_CTI_TRIG_IN1_7 | ||
857 | 824 MX35_PAD_MLB_CLK__MLB_MLBCLK | ||
858 | 825 MX35_PAD_MLB_CLK__GPIO3_3 | ||
859 | 826 MX35_PAD_MLB_DAT__MLB_MLBDAT | ||
860 | 827 MX35_PAD_MLB_DAT__GPIO3_4 | ||
861 | 828 MX35_PAD_MLB_SIG__MLB_MLBSIG | ||
862 | 829 MX35_PAD_MLB_SIG__GPIO3_5 | ||
863 | 830 MX35_PAD_FEC_TX_CLK__FEC_TX_CLK | ||
864 | 831 MX35_PAD_FEC_TX_CLK__ESDHC1_DAT4 | ||
865 | 832 MX35_PAD_FEC_TX_CLK__UART3_RXD_MUX | ||
866 | 833 MX35_PAD_FEC_TX_CLK__USB_TOP_USBH2_DIR | ||
867 | 834 MX35_PAD_FEC_TX_CLK__CSPI2_MOSI | ||
868 | 835 MX35_PAD_FEC_TX_CLK__GPIO3_6 | ||
869 | 836 MX35_PAD_FEC_TX_CLK__IPU_DISPB_D12_VSYNC | ||
870 | 837 MX35_PAD_FEC_TX_CLK__ARM11P_TOP_EVNTBUS_0 | ||
871 | 838 MX35_PAD_FEC_RX_CLK__FEC_RX_CLK | ||
872 | 839 MX35_PAD_FEC_RX_CLK__ESDHC1_DAT5 | ||
873 | 840 MX35_PAD_FEC_RX_CLK__UART3_TXD_MUX | ||
874 | 841 MX35_PAD_FEC_RX_CLK__USB_TOP_USBH2_STP | ||
875 | 842 MX35_PAD_FEC_RX_CLK__CSPI2_MISO | ||
876 | 843 MX35_PAD_FEC_RX_CLK__GPIO3_7 | ||
877 | 844 MX35_PAD_FEC_RX_CLK__IPU_DISPB_SD_D_I | ||
878 | 845 MX35_PAD_FEC_RX_CLK__ARM11P_TOP_EVNTBUS_1 | ||
879 | 846 MX35_PAD_FEC_RX_DV__FEC_RX_DV | ||
880 | 847 MX35_PAD_FEC_RX_DV__ESDHC1_DAT6 | ||
881 | 848 MX35_PAD_FEC_RX_DV__UART3_RTS | ||
882 | 849 MX35_PAD_FEC_RX_DV__USB_TOP_USBH2_NXT | ||
883 | 850 MX35_PAD_FEC_RX_DV__CSPI2_SCLK | ||
884 | 851 MX35_PAD_FEC_RX_DV__GPIO3_8 | ||
885 | 852 MX35_PAD_FEC_RX_DV__IPU_DISPB_SD_CLK | ||
886 | 853 MX35_PAD_FEC_RX_DV__ARM11P_TOP_EVNTBUS_2 | ||
887 | 854 MX35_PAD_FEC_COL__FEC_COL | ||
888 | 855 MX35_PAD_FEC_COL__ESDHC1_DAT7 | ||
889 | 856 MX35_PAD_FEC_COL__UART3_CTS | ||
890 | 857 MX35_PAD_FEC_COL__USB_TOP_USBH2_DATA_0 | ||
891 | 858 MX35_PAD_FEC_COL__CSPI2_RDY | ||
892 | 859 MX35_PAD_FEC_COL__GPIO3_9 | ||
893 | 860 MX35_PAD_FEC_COL__IPU_DISPB_SER_RS | ||
894 | 861 MX35_PAD_FEC_COL__ARM11P_TOP_EVNTBUS_3 | ||
895 | 862 MX35_PAD_FEC_RDATA0__FEC_RDATA_0 | ||
896 | 863 MX35_PAD_FEC_RDATA0__PWM_PWMO | ||
897 | 864 MX35_PAD_FEC_RDATA0__UART3_DTR | ||
898 | 865 MX35_PAD_FEC_RDATA0__USB_TOP_USBH2_DATA_1 | ||
899 | 866 MX35_PAD_FEC_RDATA0__CSPI2_SS0 | ||
900 | 867 MX35_PAD_FEC_RDATA0__GPIO3_10 | ||
901 | 868 MX35_PAD_FEC_RDATA0__IPU_DISPB_CS1 | ||
902 | 869 MX35_PAD_FEC_RDATA0__ARM11P_TOP_EVNTBUS_4 | ||
903 | 870 MX35_PAD_FEC_TDATA0__FEC_TDATA_0 | ||
904 | 871 MX35_PAD_FEC_TDATA0__SPDIF_SPDIF_OUT1 | ||
905 | 872 MX35_PAD_FEC_TDATA0__UART3_DSR | ||
906 | 873 MX35_PAD_FEC_TDATA0__USB_TOP_USBH2_DATA_2 | ||
907 | 874 MX35_PAD_FEC_TDATA0__CSPI2_SS1 | ||
908 | 875 MX35_PAD_FEC_TDATA0__GPIO3_11 | ||
909 | 876 MX35_PAD_FEC_TDATA0__IPU_DISPB_CS0 | ||
910 | 877 MX35_PAD_FEC_TDATA0__ARM11P_TOP_EVNTBUS_5 | ||
911 | 878 MX35_PAD_FEC_TX_EN__FEC_TX_EN | ||
912 | 879 MX35_PAD_FEC_TX_EN__SPDIF_SPDIF_IN1 | ||
913 | 880 MX35_PAD_FEC_TX_EN__UART3_RI | ||
914 | 881 MX35_PAD_FEC_TX_EN__USB_TOP_USBH2_DATA_3 | ||
915 | 882 MX35_PAD_FEC_TX_EN__GPIO3_12 | ||
916 | 883 MX35_PAD_FEC_TX_EN__IPU_DISPB_PAR_RS | ||
917 | 884 MX35_PAD_FEC_TX_EN__ARM11P_TOP_EVNTBUS_6 | ||
918 | 885 MX35_PAD_FEC_MDC__FEC_MDC | ||
919 | 886 MX35_PAD_FEC_MDC__CAN2_TXCAN | ||
920 | 887 MX35_PAD_FEC_MDC__UART3_DCD | ||
921 | 888 MX35_PAD_FEC_MDC__USB_TOP_USBH2_DATA_4 | ||
922 | 889 MX35_PAD_FEC_MDC__GPIO3_13 | ||
923 | 890 MX35_PAD_FEC_MDC__IPU_DISPB_WR | ||
924 | 891 MX35_PAD_FEC_MDC__ARM11P_TOP_EVNTBUS_7 | ||
925 | 892 MX35_PAD_FEC_MDIO__FEC_MDIO | ||
926 | 893 MX35_PAD_FEC_MDIO__CAN2_RXCAN | ||
927 | 894 MX35_PAD_FEC_MDIO__USB_TOP_USBH2_DATA_5 | ||
928 | 895 MX35_PAD_FEC_MDIO__GPIO3_14 | ||
929 | 896 MX35_PAD_FEC_MDIO__IPU_DISPB_RD | ||
930 | 897 MX35_PAD_FEC_MDIO__ARM11P_TOP_EVNTBUS_8 | ||
931 | 898 MX35_PAD_FEC_TX_ERR__FEC_TX_ERR | ||
932 | 899 MX35_PAD_FEC_TX_ERR__OWIRE_LINE | ||
933 | 900 MX35_PAD_FEC_TX_ERR__SPDIF_SPDIF_EXTCLK | ||
934 | 901 MX35_PAD_FEC_TX_ERR__USB_TOP_USBH2_DATA_6 | ||
935 | 902 MX35_PAD_FEC_TX_ERR__GPIO3_15 | ||
936 | 903 MX35_PAD_FEC_TX_ERR__IPU_DISPB_D0_VSYNC | ||
937 | 904 MX35_PAD_FEC_TX_ERR__ARM11P_TOP_EVNTBUS_9 | ||
938 | 905 MX35_PAD_FEC_RX_ERR__FEC_RX_ERR | ||
939 | 906 MX35_PAD_FEC_RX_ERR__IPU_CSI_D_0 | ||
940 | 907 MX35_PAD_FEC_RX_ERR__USB_TOP_USBH2_DATA_7 | ||
941 | 908 MX35_PAD_FEC_RX_ERR__KPP_COL_4 | ||
942 | 909 MX35_PAD_FEC_RX_ERR__GPIO3_16 | ||
943 | 910 MX35_PAD_FEC_RX_ERR__IPU_DISPB_SD_D_IO | ||
944 | 911 MX35_PAD_FEC_CRS__FEC_CRS | ||
945 | 912 MX35_PAD_FEC_CRS__IPU_CSI_D_1 | ||
946 | 913 MX35_PAD_FEC_CRS__USB_TOP_USBH2_PWR | ||
947 | 914 MX35_PAD_FEC_CRS__KPP_COL_5 | ||
948 | 915 MX35_PAD_FEC_CRS__GPIO3_17 | ||
949 | 916 MX35_PAD_FEC_CRS__IPU_FLASH_STROBE | ||
950 | 917 MX35_PAD_FEC_RDATA1__FEC_RDATA_1 | ||
951 | 918 MX35_PAD_FEC_RDATA1__IPU_CSI_D_2 | ||
952 | 919 MX35_PAD_FEC_RDATA1__AUDMUX_AUD6_RXC | ||
953 | 920 MX35_PAD_FEC_RDATA1__USB_TOP_USBH2_OC | ||
954 | 921 MX35_PAD_FEC_RDATA1__KPP_COL_6 | ||
955 | 922 MX35_PAD_FEC_RDATA1__GPIO3_18 | ||
956 | 923 MX35_PAD_FEC_RDATA1__IPU_DISPB_BE0 | ||
957 | 924 MX35_PAD_FEC_TDATA1__FEC_TDATA_1 | ||
958 | 925 MX35_PAD_FEC_TDATA1__IPU_CSI_D_3 | ||
959 | 926 MX35_PAD_FEC_TDATA1__AUDMUX_AUD6_RXFS | ||
960 | 927 MX35_PAD_FEC_TDATA1__KPP_COL_7 | ||
961 | 928 MX35_PAD_FEC_TDATA1__GPIO3_19 | ||
962 | 929 MX35_PAD_FEC_TDATA1__IPU_DISPB_BE1 | ||
963 | 930 MX35_PAD_FEC_RDATA2__FEC_RDATA_2 | ||
964 | 931 MX35_PAD_FEC_RDATA2__IPU_CSI_D_4 | ||
965 | 932 MX35_PAD_FEC_RDATA2__AUDMUX_AUD6_TXD | ||
966 | 933 MX35_PAD_FEC_RDATA2__KPP_ROW_4 | ||
967 | 934 MX35_PAD_FEC_RDATA2__GPIO3_20 | ||
968 | 935 MX35_PAD_FEC_TDATA2__FEC_TDATA_2 | ||
969 | 936 MX35_PAD_FEC_TDATA2__IPU_CSI_D_5 | ||
970 | 937 MX35_PAD_FEC_TDATA2__AUDMUX_AUD6_RXD | ||
971 | 938 MX35_PAD_FEC_TDATA2__KPP_ROW_5 | ||
972 | 939 MX35_PAD_FEC_TDATA2__GPIO3_21 | ||
973 | 940 MX35_PAD_FEC_RDATA3__FEC_RDATA_3 | ||
974 | 941 MX35_PAD_FEC_RDATA3__IPU_CSI_D_6 | ||
975 | 942 MX35_PAD_FEC_RDATA3__AUDMUX_AUD6_TXC | ||
976 | 943 MX35_PAD_FEC_RDATA3__KPP_ROW_6 | ||
977 | 944 MX35_PAD_FEC_RDATA3__GPIO3_22 | ||
978 | 945 MX35_PAD_FEC_TDATA3__FEC_TDATA_3 | ||
979 | 946 MX35_PAD_FEC_TDATA3__IPU_CSI_D_7 | ||
980 | 947 MX35_PAD_FEC_TDATA3__AUDMUX_AUD6_TXFS | ||
981 | 948 MX35_PAD_FEC_TDATA3__KPP_ROW_7 | ||
982 | 949 MX35_PAD_FEC_TDATA3__GPIO3_23 | ||
983 | 950 MX35_PAD_EXT_ARMCLK__CCM_EXT_ARMCLK | ||
984 | 951 MX35_PAD_TEST_MODE__TCU_TEST_MODE | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt index 5187f0dd8b28..2c81e45f1374 100644 --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt | |||
@@ -14,10 +14,12 @@ Optional properties: | |||
14 | - pinctrl-single,function-off : function off mode for disabled state if | 14 | - pinctrl-single,function-off : function off mode for disabled state if |
15 | available and same for all registers; if not specified, disabling of | 15 | available and same for all registers; if not specified, disabling of |
16 | pin functions is ignored | 16 | pin functions is ignored |
17 | - pinctrl-single,bit-per-mux : boolean to indicate that one register controls | ||
18 | more than one pin | ||
17 | 19 | ||
18 | This driver assumes that there is only one register for each pin, | 20 | This driver assumes that there is only one register for each pin (unless the |
19 | and uses the common pinctrl bindings as specified in the pinctrl-bindings.txt | 21 | pinctrl-single,bit-per-mux is set), and uses the common pinctrl bindings as |
20 | document in this directory. | 22 | specified in the pinctrl-bindings.txt document in this directory. |
21 | 23 | ||
22 | The pin configuration nodes for pinctrl-single are specified as pinctrl | 24 | The pin configuration nodes for pinctrl-single are specified as pinctrl |
23 | register offset and value pairs using pinctrl-single,pins. Only the bits | 25 | register offset and value pairs using pinctrl-single,pins. Only the bits |
@@ -31,6 +33,15 @@ device pinctrl register, and 0x118 contains the desired value of the | |||
31 | pinctrl register. See the device example and static board pins example | 33 | pinctrl register. See the device example and static board pins example |
32 | below for more information. | 34 | below for more information. |
33 | 35 | ||
36 | In case when one register changes more than one pin's mux the | ||
37 | pinctrl-single,bits need to be used which takes three parameters: | ||
38 | |||
39 | pinctrl-single,bits = <0xdc 0x18, 0xff>; | ||
40 | |||
41 | Where 0xdc is the offset from the pinctrl register base address for the | ||
42 | device pinctrl register, 0x18 is the desired value, and 0xff is the sub mask to | ||
43 | be used when applying this change to the register. | ||
44 | |||
34 | Example: | 45 | Example: |
35 | 46 | ||
36 | /* SoC common file */ | 47 | /* SoC common file */ |
@@ -55,6 +66,15 @@ pmx_wkup: pinmux@4a31e040 { | |||
55 | pinctrl-single,function-mask = <0xffff>; | 66 | pinctrl-single,function-mask = <0xffff>; |
56 | }; | 67 | }; |
57 | 68 | ||
69 | control_devconf0: pinmux@48002274 { | ||
70 | compatible = "pinctrl-single"; | ||
71 | reg = <0x48002274 4>; /* Single register */ | ||
72 | #address-cells = <1>; | ||
73 | #size-cells = <0>; | ||
74 | pinctrl-single,bit-per-mux; | ||
75 | pinctrl-single,register-width = <32>; | ||
76 | pinctrl-single,function-mask = <0x5F>; | ||
77 | }; | ||
58 | 78 | ||
59 | /* board specific .dts file */ | 79 | /* board specific .dts file */ |
60 | 80 | ||
@@ -87,6 +107,21 @@ pmx_wkup: pinmux@4a31e040 { | |||
87 | }; | 107 | }; |
88 | }; | 108 | }; |
89 | 109 | ||
110 | &control_devconf0 { | ||
111 | mcbsp1_pins: pinmux_mcbsp1_pins { | ||
112 | pinctrl-single,bits = < | ||
113 | 0x00 0x18 0x18 /* FSR/CLKR signal from FSX/CLKX pin */ | ||
114 | >; | ||
115 | }; | ||
116 | |||
117 | mcbsp2_clks_pins: pinmux_mcbsp2_clks_pins { | ||
118 | pinctrl-single,bits = < | ||
119 | 0x00 0x40 0x40 /* McBSP2 CLKS from McBSP_CLKS pin */ | ||
120 | >; | ||
121 | }; | ||
122 | |||
123 | }; | ||
124 | |||
90 | &uart2 { | 125 | &uart2 { |
91 | pinctrl-names = "default"; | 126 | pinctrl-names = "default"; |
92 | pinctrl-0 = <&uart2_pins>; | 127 | pinctrl-0 = <&uart2_pins>; |
diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt new file mode 100644 index 000000000000..03dee50532f5 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt | |||
@@ -0,0 +1,196 @@ | |||
1 | Samsung GPIO and Pin Mux/Config controller | ||
2 | |||
3 | Samsung's ARM based SoC's integrates a GPIO and Pin mux/config hardware | ||
4 | controller. It controls the input/output settings on the available pads/pins | ||
5 | and also provides ability to multiplex and configure the output of various | ||
6 | on-chip controllers onto these pads. | ||
7 | |||
8 | Required Properties: | ||
9 | - compatible: should be one of the following. | ||
10 | - "samsung,pinctrl-exynos4210": for Exynos4210 compatible pin-controller. | ||
11 | - "samsung,pinctrl-exynos5250": for Exynos5250 compatible pin-controller. | ||
12 | |||
13 | - reg: Base address of the pin controller hardware module and length of | ||
14 | the address space it occupies. | ||
15 | |||
16 | - interrupts: interrupt specifier for the controller. The format and value of | ||
17 | the interrupt specifier depends on the interrupt parent for the controller. | ||
18 | |||
19 | - Pin mux/config groups as child nodes: The pin mux (selecting pin function | ||
20 | mode) and pin config (pull up/down, driver strength) settings are represented | ||
21 | as child nodes of the pin-controller node. There should be atleast one | ||
22 | child node and there is no limit on the count of these child nodes. | ||
23 | |||
24 | The child node should contain a list of pin(s) on which a particular pin | ||
25 | function selection or pin configuration (or both) have to applied. This | ||
26 | list of pins is specified using the property name "samsung,pins". There | ||
27 | should be atleast one pin specfied for this property and there is no upper | ||
28 | limit on the count of pins that can be specified. The pins are specified | ||
29 | using pin names which are derived from the hardware manual of the SoC. As | ||
30 | an example, the pins in GPA0 bank of the pin controller can be represented | ||
31 | as "gpa0-0", "gpa0-1", "gpa0-2" and so on. The names should be in lower case. | ||
32 | The format of the pin names should be (as per the hardware manual) | ||
33 | "[pin bank name]-[pin number within the bank]". | ||
34 | |||
35 | The pin function selection that should be applied on the pins listed in the | ||
36 | child node is specified using the "samsung,pin-function" property. The value | ||
37 | of this property that should be applied to each of the pins listed in the | ||
38 | "samsung,pins" property should be picked from the hardware manual of the SoC | ||
39 | for the specified pin group. This property is optional in the child node if | ||
40 | no specific function selection is desired for the pins listed in the child | ||
41 | node. The value of this property is used as-is to program the pin-controller | ||
42 | function selector register of the pin-bank. | ||
43 | |||
44 | The child node can also optionally specify one or more of the pin | ||
45 | configuration that should be applied on all the pins listed in the | ||
46 | "samsung,pins" property of the child node. The following pin configuration | ||
47 | properties are supported. | ||
48 | |||
49 | - samsung,pin-pud: Pull up/down configuration. | ||
50 | - samsung,pin-drv: Drive strength configuration. | ||
51 | - samsung,pin-pud-pdn: Pull up/down configuration in power down mode. | ||
52 | - samsung,pin-drv-pdn: Drive strength configuration in power down mode. | ||
53 | |||
54 | The values specified by these config properties should be derived from the | ||
55 | hardware manual and these values are programmed as-is into the pin | ||
56 | pull up/down and driver strength register of the pin-controller. | ||
57 | |||
58 | Note: A child should include atleast a pin function selection property or | ||
59 | pin configuration property (one or more) or both. | ||
60 | |||
61 | The client nodes that require a particular pin function selection and/or | ||
62 | pin configuration should use the bindings listed in the "pinctrl-bindings.txt" | ||
63 | file. | ||
64 | |||
65 | External GPIO and Wakeup Interrupts: | ||
66 | |||
67 | The controller supports two types of external interrupts over gpio. The first | ||
68 | is the external gpio interrupt and second is the external wakeup interrupts. | ||
69 | The difference between the two is that the external wakeup interrupts can be | ||
70 | used as system wakeup events. | ||
71 | |||
72 | A. External GPIO Interrupts: For supporting external gpio interrupts, the | ||
73 | following properties should be specified in the pin-controller device node. | ||
74 | |||
75 | - interrupt-controller: identifies the controller node as interrupt-parent. | ||
76 | - #interrupt-cells: the value of this property should be 2. | ||
77 | - First Cell: represents the external gpio interrupt number local to the | ||
78 | external gpio interrupt space of the controller. | ||
79 | - Second Cell: flags to identify the type of the interrupt | ||
80 | - 1 = rising edge triggered | ||
81 | - 2 = falling edge triggered | ||
82 | - 3 = rising and falling edge triggered | ||
83 | - 4 = high level triggered | ||
84 | - 8 = low level triggered | ||
85 | |||
86 | B. External Wakeup Interrupts: For supporting external wakeup interrupts, a | ||
87 | child node representing the external wakeup interrupt controller should be | ||
88 | included in the pin-controller device node. This child node should include | ||
89 | the following properties. | ||
90 | |||
91 | - compatible: identifies the type of the external wakeup interrupt controller | ||
92 | The possible values are: | ||
93 | - samsung,exynos4210-wakeup-eint: represents wakeup interrupt controller | ||
94 | found on Samsung Exynos4210 SoC. | ||
95 | - interrupt-parent: phandle of the interrupt parent to which the external | ||
96 | wakeup interrupts are forwarded to. | ||
97 | - interrupt-controller: identifies the node as interrupt-parent. | ||
98 | - #interrupt-cells: the value of this property should be 2 | ||
99 | - First Cell: represents the external wakeup interrupt number local to | ||
100 | the external wakeup interrupt space of the controller. | ||
101 | - Second Cell: flags to identify the type of the interrupt | ||
102 | - 1 = rising edge triggered | ||
103 | - 2 = falling edge triggered | ||
104 | - 3 = rising and falling edge triggered | ||
105 | - 4 = high level triggered | ||
106 | - 8 = low level triggered | ||
107 | |||
108 | Aliases: | ||
109 | |||
110 | All the pin controller nodes should be represented in the aliases node using | ||
111 | the following format 'pinctrl{n}' where n is a unique number for the alias. | ||
112 | |||
113 | Example 1: A pin-controller node with pin groups. | ||
114 | |||
115 | pinctrl_0: pinctrl@11400000 { | ||
116 | compatible = "samsung,pinctrl-exynos4210"; | ||
117 | reg = <0x11400000 0x1000>; | ||
118 | interrupts = <0 47 0>; | ||
119 | |||
120 | uart0_data: uart0-data { | ||
121 | samsung,pins = "gpa0-0", "gpa0-1"; | ||
122 | samsung,pin-function = <2>; | ||
123 | samsung,pin-pud = <0>; | ||
124 | samsung,pin-drv = <0>; | ||
125 | }; | ||
126 | |||
127 | uart0_fctl: uart0-fctl { | ||
128 | samsung,pins = "gpa0-2", "gpa0-3"; | ||
129 | samsung,pin-function = <2>; | ||
130 | samsung,pin-pud = <0>; | ||
131 | samsung,pin-drv = <0>; | ||
132 | }; | ||
133 | |||
134 | uart1_data: uart1-data { | ||
135 | samsung,pins = "gpa0-4", "gpa0-5"; | ||
136 | samsung,pin-function = <2>; | ||
137 | samsung,pin-pud = <0>; | ||
138 | samsung,pin-drv = <0>; | ||
139 | }; | ||
140 | |||
141 | uart1_fctl: uart1-fctl { | ||
142 | samsung,pins = "gpa0-6", "gpa0-7"; | ||
143 | samsung,pin-function = <2>; | ||
144 | samsung,pin-pud = <0>; | ||
145 | samsung,pin-drv = <0>; | ||
146 | }; | ||
147 | |||
148 | i2c2_bus: i2c2-bus { | ||
149 | samsung,pins = "gpa0-6", "gpa0-7"; | ||
150 | samsung,pin-function = <3>; | ||
151 | samsung,pin-pud = <3>; | ||
152 | samsung,pin-drv = <0>; | ||
153 | }; | ||
154 | }; | ||
155 | |||
156 | Example 2: A pin-controller node with external wakeup interrupt controller node. | ||
157 | |||
158 | pinctrl_1: pinctrl@11000000 { | ||
159 | compatible = "samsung,pinctrl-exynos4210"; | ||
160 | reg = <0x11000000 0x1000>; | ||
161 | interrupts = <0 46 0>; | ||
162 | interrupt-controller; | ||
163 | #interrupt-cells = <2>; | ||
164 | |||
165 | wakup_eint: wakeup-interrupt-controller { | ||
166 | compatible = "samsung,exynos4210-wakeup-eint"; | ||
167 | interrupt-parent = <&gic>; | ||
168 | interrupt-controller; | ||
169 | #interrupt-cells = <2>; | ||
170 | interrupts = <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>, | ||
171 | <0 20 0>, <0 21 0>, <0 22 0>, <0 23 0>, | ||
172 | <0 24 0>, <0 25 0>, <0 26 0>, <0 27 0>, | ||
173 | <0 28 0>, <0 29 0>, <0 30 0>, <0 31 0>, | ||
174 | <0 32 0>; | ||
175 | }; | ||
176 | }; | ||
177 | |||
178 | Example 3: A uart client node that supports 'default' and 'flow-control' states. | ||
179 | |||
180 | uart@13800000 { | ||
181 | compatible = "samsung,exynos4210-uart"; | ||
182 | reg = <0x13800000 0x100>; | ||
183 | interrupts = <0 52 0>; | ||
184 | pinctrl-names = "default", "flow-control; | ||
185 | pinctrl-0 = <&uart0_data>; | ||
186 | pinctrl-1 = <&uart0_data &uart0_fctl>; | ||
187 | }; | ||
188 | |||
189 | Example 4: Set up the default pin state for uart controller. | ||
190 | |||
191 | static int s3c24xx_serial_probe(struct platform_device *pdev) { | ||
192 | struct pinctrl *pinctrl; | ||
193 | ... | ||
194 | ... | ||
195 | pinctrl = devm_pinctrl_get_select_default(&pdev->dev); | ||
196 | } | ||
diff --git a/Documentation/devicetree/bindings/power/opp.txt b/Documentation/devicetree/bindings/power/opp.txt new file mode 100644 index 000000000000..74499e5033fc --- /dev/null +++ b/Documentation/devicetree/bindings/power/opp.txt | |||
@@ -0,0 +1,25 @@ | |||
1 | * Generic OPP Interface | ||
2 | |||
3 | SoCs have a standard set of tuples consisting of frequency and | ||
4 | voltage pairs that the device will support per voltage domain. These | ||
5 | are called Operating Performance Points or OPPs. | ||
6 | |||
7 | Properties: | ||
8 | - operating-points: An array of 2-tuples items, and each item consists | ||
9 | of frequency and voltage like <freq-kHz vol-uV>. | ||
10 | freq: clock frequency in kHz | ||
11 | vol: voltage in microvolt | ||
12 | |||
13 | Examples: | ||
14 | |||
15 | cpu@0 { | ||
16 | compatible = "arm,cortex-a9"; | ||
17 | reg = <0>; | ||
18 | next-level-cache = <&L2>; | ||
19 | operating-points = < | ||
20 | /* kHz uV */ | ||
21 | 792000 1100000 | ||
22 | 396000 950000 | ||
23 | 198000 850000 | ||
24 | >; | ||
25 | }; | ||
diff --git a/Documentation/devicetree/bindings/regulator/regulator.txt b/Documentation/devicetree/bindings/regulator/regulator.txt index 66ece3f87bbc..ecfc6ccd67ef 100644 --- a/Documentation/devicetree/bindings/regulator/regulator.txt +++ b/Documentation/devicetree/bindings/regulator/regulator.txt | |||
@@ -11,10 +11,13 @@ Optional properties: | |||
11 | - regulator-boot-on: bootloader/firmware enabled regulator | 11 | - regulator-boot-on: bootloader/firmware enabled regulator |
12 | - <name>-supply: phandle to the parent supply/regulator node | 12 | - <name>-supply: phandle to the parent supply/regulator node |
13 | - regulator-ramp-delay: ramp delay for regulator(in uV/uS) | 13 | - regulator-ramp-delay: ramp delay for regulator(in uV/uS) |
14 | |||
15 | Deprecated properties: | ||
14 | - regulator-compatible: If a regulator chip contains multiple | 16 | - regulator-compatible: If a regulator chip contains multiple |
15 | regulators, and if the chip's binding contains a child node that | 17 | regulators, and if the chip's binding contains a child node that |
16 | describes each regulator, then this property indicates which regulator | 18 | describes each regulator, then this property indicates which regulator |
17 | this child node is intended to configure. | 19 | this child node is intended to configure. If this property is missing, |
20 | the node's name will be used instead. | ||
18 | 21 | ||
19 | Example: | 22 | Example: |
20 | 23 | ||
diff --git a/Documentation/devicetree/bindings/regulator/tps65217.txt b/Documentation/devicetree/bindings/regulator/tps65217.txt index 0487e9675ba0..d316fb895daf 100644 --- a/Documentation/devicetree/bindings/regulator/tps65217.txt +++ b/Documentation/devicetree/bindings/regulator/tps65217.txt | |||
@@ -22,66 +22,49 @@ Example: | |||
22 | compatible = "ti,tps65217"; | 22 | compatible = "ti,tps65217"; |
23 | 23 | ||
24 | regulators { | 24 | regulators { |
25 | #address-cells = <1>; | 25 | dcdc1_reg: dcdc1 { |
26 | #size-cells = <0>; | ||
27 | |||
28 | dcdc1_reg: regulator@0 { | ||
29 | reg = <0>; | ||
30 | regulator-compatible = "dcdc1"; | ||
31 | regulator-min-microvolt = <900000>; | 26 | regulator-min-microvolt = <900000>; |
32 | regulator-max-microvolt = <1800000>; | 27 | regulator-max-microvolt = <1800000>; |
33 | regulator-boot-on; | 28 | regulator-boot-on; |
34 | regulator-always-on; | 29 | regulator-always-on; |
35 | }; | 30 | }; |
36 | 31 | ||
37 | dcdc2_reg: regulator@1 { | 32 | dcdc2_reg: dcdc2 { |
38 | reg = <1>; | ||
39 | regulator-compatible = "dcdc2"; | ||
40 | regulator-min-microvolt = <900000>; | 33 | regulator-min-microvolt = <900000>; |
41 | regulator-max-microvolt = <3300000>; | 34 | regulator-max-microvolt = <3300000>; |
42 | regulator-boot-on; | 35 | regulator-boot-on; |
43 | regulator-always-on; | 36 | regulator-always-on; |
44 | }; | 37 | }; |
45 | 38 | ||
46 | dcdc3_reg: regulator@2 { | 39 | dcdc3_reg: dcc3 { |
47 | reg = <2>; | ||
48 | regulator-compatible = "dcdc3"; | ||
49 | regulator-min-microvolt = <900000>; | 40 | regulator-min-microvolt = <900000>; |
50 | regulator-max-microvolt = <1500000>; | 41 | regulator-max-microvolt = <1500000>; |
51 | regulator-boot-on; | 42 | regulator-boot-on; |
52 | regulator-always-on; | 43 | regulator-always-on; |
53 | }; | 44 | }; |
54 | 45 | ||
55 | ldo1_reg: regulator@3 { | 46 | ldo1_reg: ldo1 { |
56 | reg = <3>; | ||
57 | regulator-compatible = "ldo1"; | ||
58 | regulator-min-microvolt = <1000000>; | 47 | regulator-min-microvolt = <1000000>; |
59 | regulator-max-microvolt = <3300000>; | 48 | regulator-max-microvolt = <3300000>; |
60 | regulator-boot-on; | 49 | regulator-boot-on; |
61 | regulator-always-on; | 50 | regulator-always-on; |
62 | }; | 51 | }; |
63 | 52 | ||
64 | ldo2_reg: regulator@4 { | 53 | ldo2_reg: ldo2 { |
65 | reg = <4>; | ||
66 | regulator-compatible = "ldo2"; | ||
67 | regulator-min-microvolt = <900000>; | 54 | regulator-min-microvolt = <900000>; |
68 | regulator-max-microvolt = <3300000>; | 55 | regulator-max-microvolt = <3300000>; |
69 | regulator-boot-on; | 56 | regulator-boot-on; |
70 | regulator-always-on; | 57 | regulator-always-on; |
71 | }; | 58 | }; |
72 | 59 | ||
73 | ldo3_reg: regulator@5 { | 60 | ldo3_reg: ldo3 { |
74 | reg = <5>; | ||
75 | regulator-compatible = "ldo3"; | ||
76 | regulator-min-microvolt = <1800000>; | 61 | regulator-min-microvolt = <1800000>; |
77 | regulator-max-microvolt = <3300000>; | 62 | regulator-max-microvolt = <3300000>; |
78 | regulator-boot-on; | 63 | regulator-boot-on; |
79 | regulator-always-on; | 64 | regulator-always-on; |
80 | }; | 65 | }; |
81 | 66 | ||
82 | ldo4_reg: regulator@6 { | 67 | ldo4_reg: ldo4 { |
83 | reg = <6>; | ||
84 | regulator-compatible = "ldo4"; | ||
85 | regulator-min-microvolt = <1800000>; | 68 | regulator-min-microvolt = <1800000>; |
86 | regulator-max-microvolt = <3300000>; | 69 | regulator-max-microvolt = <3300000>; |
87 | regulator-boot-on; | 70 | regulator-boot-on; |
diff --git a/Documentation/devicetree/bindings/regulator/tps6586x.txt b/Documentation/devicetree/bindings/regulator/tps6586x.txt index d156e1b5db12..07b9ef6e49d5 100644 --- a/Documentation/devicetree/bindings/regulator/tps6586x.txt +++ b/Documentation/devicetree/bindings/regulator/tps6586x.txt | |||
@@ -6,12 +6,16 @@ Required properties: | |||
6 | - interrupts: the interrupt outputs of the controller | 6 | - interrupts: the interrupt outputs of the controller |
7 | - #gpio-cells: number of cells to describe a GPIO | 7 | - #gpio-cells: number of cells to describe a GPIO |
8 | - gpio-controller: mark the device as a GPIO controller | 8 | - gpio-controller: mark the device as a GPIO controller |
9 | - regulators: list of regulators provided by this controller, must have | 9 | - regulators: A node that houses a sub-node for each regulator within the |
10 | property "regulator-compatible" to match their hardware counterparts: | 10 | device. Each sub-node is identified using the node's name (or the deprecated |
11 | sm[0-2], ldo[0-9] and ldo_rtc | 11 | regulator-compatible property if present), with valid values listed below. |
12 | - sm0-supply: The input supply for the SM0. | 12 | The content of each sub-node is defined by the standard binding for |
13 | - sm1-supply: The input supply for the SM1. | 13 | regulators; see regulator.txt. |
14 | - sm2-supply: The input supply for the SM2. | 14 | sys, sm[0-2], ldo[0-9] and ldo_rtc |
15 | - sys-supply: The input supply for SYS. | ||
16 | - vin-sm0-supply: The input supply for the SM0. | ||
17 | - vin-sm1-supply: The input supply for the SM1. | ||
18 | - vin-sm2-supply: The input supply for the SM2. | ||
15 | - vinldo01-supply: The input supply for the LDO1 and LDO2 | 19 | - vinldo01-supply: The input supply for the LDO1 and LDO2 |
16 | - vinldo23-supply: The input supply for the LDO2 and LDO3 | 20 | - vinldo23-supply: The input supply for the LDO2 and LDO3 |
17 | - vinldo4-supply: The input supply for the LDO4 | 21 | - vinldo4-supply: The input supply for the LDO4 |
@@ -20,6 +24,9 @@ Required properties: | |||
20 | 24 | ||
21 | Each regulator is defined using the standard binding for regulators. | 25 | Each regulator is defined using the standard binding for regulators. |
22 | 26 | ||
27 | Note: LDO5 and LDO_RTC is supplied by SYS regulator internally and driver | ||
28 | take care of making proper parent child relationship. | ||
29 | |||
23 | Example: | 30 | Example: |
24 | 31 | ||
25 | pmu: tps6586x@34 { | 32 | pmu: tps6586x@34 { |
@@ -30,9 +37,10 @@ Example: | |||
30 | #gpio-cells = <2>; | 37 | #gpio-cells = <2>; |
31 | gpio-controller; | 38 | gpio-controller; |
32 | 39 | ||
33 | sm0-supply = <&some_reg>; | 40 | sys-supply = <&some_reg>; |
34 | sm1-supply = <&some_reg>; | 41 | vin-sm0-supply = <&some_reg>; |
35 | sm2-supply = <&some_reg>; | 42 | vin-sm1-supply = <&some_reg>; |
43 | vin-sm2-supply = <&some_reg>; | ||
36 | vinldo01-supply = <...>; | 44 | vinldo01-supply = <...>; |
37 | vinldo23-supply = <...>; | 45 | vinldo23-supply = <...>; |
38 | vinldo4-supply = <...>; | 46 | vinldo4-supply = <...>; |
@@ -40,103 +48,80 @@ Example: | |||
40 | vinldo9-supply = <...>; | 48 | vinldo9-supply = <...>; |
41 | 49 | ||
42 | regulators { | 50 | regulators { |
43 | #address-cells = <1>; | 51 | sys_reg: sys { |
44 | #size-cells = <0>; | 52 | regulator-name = "vdd_sys"; |
53 | regulator-boot-on; | ||
54 | regulator-always-on; | ||
55 | }; | ||
45 | 56 | ||
46 | sm0_reg: regulator@0 { | 57 | sm0_reg: sm0 { |
47 | reg = <0>; | ||
48 | regulator-compatible = "sm0"; | ||
49 | regulator-min-microvolt = < 725000>; | 58 | regulator-min-microvolt = < 725000>; |
50 | regulator-max-microvolt = <1500000>; | 59 | regulator-max-microvolt = <1500000>; |
51 | regulator-boot-on; | 60 | regulator-boot-on; |
52 | regulator-always-on; | 61 | regulator-always-on; |
53 | }; | 62 | }; |
54 | 63 | ||
55 | sm1_reg: regulator@1 { | 64 | sm1_reg: sm1 { |
56 | reg = <1>; | ||
57 | regulator-compatible = "sm1"; | ||
58 | regulator-min-microvolt = < 725000>; | 65 | regulator-min-microvolt = < 725000>; |
59 | regulator-max-microvolt = <1500000>; | 66 | regulator-max-microvolt = <1500000>; |
60 | regulator-boot-on; | 67 | regulator-boot-on; |
61 | regulator-always-on; | 68 | regulator-always-on; |
62 | }; | 69 | }; |
63 | 70 | ||
64 | sm2_reg: regulator@2 { | 71 | sm2_reg: sm2 { |
65 | reg = <2>; | ||
66 | regulator-compatible = "sm2"; | ||
67 | regulator-min-microvolt = <3000000>; | 72 | regulator-min-microvolt = <3000000>; |
68 | regulator-max-microvolt = <4550000>; | 73 | regulator-max-microvolt = <4550000>; |
69 | regulator-boot-on; | 74 | regulator-boot-on; |
70 | regulator-always-on; | 75 | regulator-always-on; |
71 | }; | 76 | }; |
72 | 77 | ||
73 | ldo0_reg: regulator@3 { | 78 | ldo0_reg: ldo0 { |
74 | reg = <3>; | ||
75 | regulator-compatible = "ldo0"; | ||
76 | regulator-name = "PCIE CLK"; | 79 | regulator-name = "PCIE CLK"; |
77 | regulator-min-microvolt = <3300000>; | 80 | regulator-min-microvolt = <3300000>; |
78 | regulator-max-microvolt = <3300000>; | 81 | regulator-max-microvolt = <3300000>; |
79 | }; | 82 | }; |
80 | 83 | ||
81 | ldo1_reg: regulator@4 { | 84 | ldo1_reg: ldo1 { |
82 | reg = <4>; | ||
83 | regulator-compatible = "ldo1"; | ||
84 | regulator-min-microvolt = < 725000>; | 85 | regulator-min-microvolt = < 725000>; |
85 | regulator-max-microvolt = <1500000>; | 86 | regulator-max-microvolt = <1500000>; |
86 | }; | 87 | }; |
87 | 88 | ||
88 | ldo2_reg: regulator@5 { | 89 | ldo2_reg: ldo2 { |
89 | reg = <5>; | ||
90 | regulator-compatible = "ldo2"; | ||
91 | regulator-min-microvolt = < 725000>; | 90 | regulator-min-microvolt = < 725000>; |
92 | regulator-max-microvolt = <1500000>; | 91 | regulator-max-microvolt = <1500000>; |
93 | }; | 92 | }; |
94 | 93 | ||
95 | ldo3_reg: regulator@6 { | 94 | ldo3_reg: ldo3 { |
96 | reg = <6>; | ||
97 | regulator-compatible = "ldo3"; | ||
98 | regulator-min-microvolt = <1250000>; | 95 | regulator-min-microvolt = <1250000>; |
99 | regulator-max-microvolt = <3300000>; | 96 | regulator-max-microvolt = <3300000>; |
100 | }; | 97 | }; |
101 | 98 | ||
102 | ldo4_reg: regulator@7 { | 99 | ldo4_reg: ldo4 { |
103 | reg = <7>; | ||
104 | regulator-compatible = "ldo4"; | ||
105 | regulator-min-microvolt = <1700000>; | 100 | regulator-min-microvolt = <1700000>; |
106 | regulator-max-microvolt = <2475000>; | 101 | regulator-max-microvolt = <2475000>; |
107 | }; | 102 | }; |
108 | 103 | ||
109 | ldo5_reg: regulator@8 { | 104 | ldo5_reg: ldo5 { |
110 | reg = <8>; | ||
111 | regulator-compatible = "ldo5"; | ||
112 | regulator-min-microvolt = <1250000>; | 105 | regulator-min-microvolt = <1250000>; |
113 | regulator-max-microvolt = <3300000>; | 106 | regulator-max-microvolt = <3300000>; |
114 | }; | 107 | }; |
115 | 108 | ||
116 | ldo6_reg: regulator@9 { | 109 | ldo6_reg: ldo6 { |
117 | reg = <9>; | ||
118 | regulator-compatible = "ldo6"; | ||
119 | regulator-min-microvolt = <1250000>; | 110 | regulator-min-microvolt = <1250000>; |
120 | regulator-max-microvolt = <3300000>; | 111 | regulator-max-microvolt = <3300000>; |
121 | }; | 112 | }; |
122 | 113 | ||
123 | ldo7_reg: regulator@10 { | 114 | ldo7_reg: ldo7 { |
124 | reg = <10>; | ||
125 | regulator-compatible = "ldo7"; | ||
126 | regulator-min-microvolt = <1250000>; | 115 | regulator-min-microvolt = <1250000>; |
127 | regulator-max-microvolt = <3300000>; | 116 | regulator-max-microvolt = <3300000>; |
128 | }; | 117 | }; |
129 | 118 | ||
130 | ldo8_reg: regulator@11 { | 119 | ldo8_reg: ldo8 { |
131 | reg = <11>; | ||
132 | regulator-compatible = "ldo8"; | ||
133 | regulator-min-microvolt = <1250000>; | 120 | regulator-min-microvolt = <1250000>; |
134 | regulator-max-microvolt = <3300000>; | 121 | regulator-max-microvolt = <3300000>; |
135 | }; | 122 | }; |
136 | 123 | ||
137 | ldo9_reg: regulator@12 { | 124 | ldo9_reg: ldo9 { |
138 | reg = <12>; | ||
139 | regulator-compatible = "ldo9"; | ||
140 | regulator-min-microvolt = <1250000>; | 125 | regulator-min-microvolt = <1250000>; |
141 | regulator-max-microvolt = <3300000>; | 126 | regulator-max-microvolt = <3300000>; |
142 | }; | 127 | }; |
diff --git a/Documentation/devicetree/bindings/rtc/pxa-rtc.txt b/Documentation/devicetree/bindings/rtc/pxa-rtc.txt new file mode 100644 index 000000000000..8c6672a1b7d7 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/pxa-rtc.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | * PXA RTC | ||
2 | |||
3 | PXA specific RTC driver. | ||
4 | |||
5 | Required properties: | ||
6 | - compatible : Should be "marvell,pxa-rtc" | ||
7 | |||
8 | Examples: | ||
9 | |||
10 | rtc@40900000 { | ||
11 | compatible = "marvell,pxa-rtc"; | ||
12 | reg = <0x40900000 0x3c>; | ||
13 | interrupts = <30 31>; | ||
14 | }; | ||
diff --git a/Documentation/devicetree/bindings/rtc/via,vt8500-rtc.txt b/Documentation/devicetree/bindings/rtc/via,vt8500-rtc.txt new file mode 100644 index 000000000000..3c0484c49582 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/via,vt8500-rtc.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | VIA/Wondermedia VT8500 Realtime Clock Controller | ||
2 | ----------------------------------------------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible : "via,vt8500-rtc" | ||
6 | - reg : Should contain 1 register ranges(address and length) | ||
7 | - interrupts : alarm interrupt | ||
8 | |||
9 | Example: | ||
10 | |||
11 | rtc@d8100000 { | ||
12 | compatible = "via,vt8500-rtc"; | ||
13 | reg = <0xd8100000 0x10000>; | ||
14 | interrupts = <48>; | ||
15 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/ux500-mop500.txt b/Documentation/devicetree/bindings/sound/ux500-mop500.txt new file mode 100644 index 000000000000..48e071c96b46 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/ux500-mop500.txt | |||
@@ -0,0 +1,39 @@ | |||
1 | * MOP500 Audio Machine Driver | ||
2 | |||
3 | This node is responsible for linking together all ux500 Audio Driver components. | ||
4 | |||
5 | Required properties: | ||
6 | - compatible : "stericsson,snd-soc-mop500" | ||
7 | |||
8 | Non-standard properties: | ||
9 | - stericsson,cpu-dai : Phandle to the CPU-side DAI | ||
10 | - stericsson,audio-codec : Phandle to the Audio CODEC | ||
11 | - stericsson,card-name : Over-ride default card name | ||
12 | |||
13 | Example: | ||
14 | |||
15 | sound { | ||
16 | compatible = "stericsson,snd-soc-mop500"; | ||
17 | |||
18 | stericsson,cpu-dai = <&msp1 &msp3>; | ||
19 | stericsson,audio-codec = <&codec>; | ||
20 | }; | ||
21 | |||
22 | msp1: msp@80124000 { | ||
23 | compatible = "stericsson,ux500-msp-i2s"; | ||
24 | reg = <0x80124000 0x1000>; | ||
25 | interrupts = <0 62 0x4>; | ||
26 | v-ape-supply = <&db8500_vape_reg>; | ||
27 | }; | ||
28 | |||
29 | msp3: msp@80125000 { | ||
30 | compatible = "stericsson,ux500-msp-i2s"; | ||
31 | reg = <0x80125000 0x1000>; | ||
32 | interrupts = <0 62 0x4>; | ||
33 | v-ape-supply = <&db8500_vape_reg>; | ||
34 | }; | ||
35 | |||
36 | codec: ab8500-codec { | ||
37 | compatible = "stericsson,ab8500-codec"; | ||
38 | stericsson,earpeice-cmv = <950>; /* Units in mV. */ | ||
39 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/ux500-msp.txt b/Documentation/devicetree/bindings/sound/ux500-msp.txt new file mode 100644 index 000000000000..99acd9c774e1 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/ux500-msp.txt | |||
@@ -0,0 +1,43 @@ | |||
1 | * ux500 MSP (CPU-side Digital Audio Interface) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible :"stericsson,ux500-msp-i2s" | ||
5 | - reg : Physical base address and length of the device's registers. | ||
6 | |||
7 | Optional properties: | ||
8 | - interrupts : The interrupt output from the device. | ||
9 | - interrupt-parent : The parent interrupt controller. | ||
10 | - <name>-supply : Phandle to the regulator <name> supply | ||
11 | |||
12 | Example: | ||
13 | |||
14 | sound { | ||
15 | compatible = "stericsson,snd-soc-mop500"; | ||
16 | |||
17 | stericsson,platform-pcm-dma = <&pcm>; | ||
18 | stericsson,cpu-dai = <&msp1 &msp3>; | ||
19 | stericsson,audio-codec = <&codec>; | ||
20 | }; | ||
21 | |||
22 | pcm: ux500-pcm { | ||
23 | compatible = "stericsson,ux500-pcm"; | ||
24 | }; | ||
25 | |||
26 | msp1: msp@80124000 { | ||
27 | compatible = "stericsson,ux500-msp-i2s"; | ||
28 | reg = <0x80124000 0x1000>; | ||
29 | interrupts = <0 62 0x4>; | ||
30 | v-ape-supply = <&db8500_vape_reg>; | ||
31 | }; | ||
32 | |||
33 | msp3: msp@80125000 { | ||
34 | compatible = "stericsson,ux500-msp-i2s"; | ||
35 | reg = <0x80125000 0x1000>; | ||
36 | interrupts = <0 62 0x4>; | ||
37 | v-ape-supply = <&db8500_vape_reg>; | ||
38 | }; | ||
39 | |||
40 | codec: ab8500-codec { | ||
41 | compatible = "stericsson,ab8500-codec"; | ||
42 | stericsson,earpeice-cmv = <950>; /* Units in mV. */ | ||
43 | }; | ||
diff --git a/Documentation/devicetree/bindings/spi/mxs-spi.txt b/Documentation/devicetree/bindings/spi/mxs-spi.txt new file mode 100644 index 000000000000..e2e13957c2a4 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/mxs-spi.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | * Freescale MX233/MX28 SSP/SPI | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "fsl,<soc>-spi", where soc is "imx23" or "imx28" | ||
5 | - reg: Offset and length of the register set for the device | ||
6 | - interrupts: Should contain SSP interrupts (error irq first, dma irq second) | ||
7 | - fsl,ssp-dma-channel: APBX DMA channel for the SSP | ||
8 | |||
9 | Optional properties: | ||
10 | - clock-frequency : Input clock frequency to the SPI block in Hz. | ||
11 | Default is 160000000 Hz. | ||
12 | |||
13 | Example: | ||
14 | |||
15 | ssp0: ssp@80010000 { | ||
16 | #address-cells = <1>; | ||
17 | #size-cells = <0>; | ||
18 | compatible = "fsl,imx28-spi"; | ||
19 | reg = <0x80010000 0x2000>; | ||
20 | interrupts = <96 82>; | ||
21 | fsl,ssp-dma-channel = <0>; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt b/Documentation/devicetree/bindings/spi/spi-bus.txt index e782add2e457..d2c33d0f533e 100644 --- a/Documentation/devicetree/bindings/spi/spi-bus.txt +++ b/Documentation/devicetree/bindings/spi/spi-bus.txt | |||
@@ -21,6 +21,9 @@ assumption that board specific platform code will be used to manage | |||
21 | chip selects. Individual drivers can define additional properties to | 21 | chip selects. Individual drivers can define additional properties to |
22 | support describing the chip select layout. | 22 | support describing the chip select layout. |
23 | 23 | ||
24 | Optional property: | ||
25 | - num-cs : total number of chipselects | ||
26 | |||
24 | SPI slave nodes must be children of the SPI master node and can | 27 | SPI slave nodes must be children of the SPI master node and can |
25 | contain the following properties. | 28 | contain the following properties. |
26 | - reg - (required) chip select address of device. | 29 | - reg - (required) chip select address of device. |
diff --git a/Documentation/devicetree/bindings/spi/spi-gpio.txt b/Documentation/devicetree/bindings/spi/spi-gpio.txt new file mode 100644 index 000000000000..8a824be15754 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/spi-gpio.txt | |||
@@ -0,0 +1,29 @@ | |||
1 | SPI-GPIO devicetree bindings | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible: should be set to "spi-gpio" | ||
6 | - #address-cells: should be set to <0x1> | ||
7 | - ranges | ||
8 | - gpio-sck: GPIO spec for the SCK line to use | ||
9 | - gpio-miso: GPIO spec for the MISO line to use | ||
10 | - gpio-mosi: GPIO spec for the MOSI line to use | ||
11 | - cs-gpios: GPIOs to use for chipselect lines | ||
12 | - num-chipselects: number of chipselect lines | ||
13 | |||
14 | Example: | ||
15 | |||
16 | spi { | ||
17 | compatible = "spi-gpio"; | ||
18 | #address-cells = <0x1>; | ||
19 | ranges; | ||
20 | |||
21 | gpio-sck = <&gpio 95 0>; | ||
22 | gpio-miso = <&gpio 98 0>; | ||
23 | gpio-mosi = <&gpio 97 0>; | ||
24 | cs-gpios = <&gpio 125 0>; | ||
25 | num-chipselects = <1>; | ||
26 | |||
27 | /* clients */ | ||
28 | }; | ||
29 | |||
diff --git a/Documentation/devicetree/bindings/spi/spi-sc18is602.txt b/Documentation/devicetree/bindings/spi/spi-sc18is602.txt new file mode 100644 index 000000000000..02f9033270a2 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/spi-sc18is602.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | NXP SC18IS602/SCIS603 | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should be one of | ||
5 | "nxp,sc18is602" | ||
6 | "nxp,sc18is602b" | ||
7 | "nxp,sc18is603" | ||
8 | - reg: I2C bus address | ||
9 | |||
10 | Optional properties: | ||
11 | - clock-frequency : external oscillator clock frequency. If not | ||
12 | specified, the SC18IS602 default frequency (7372000) will be used. | ||
13 | |||
14 | The clock-frequency property is relevant and needed only if the chip has an | ||
15 | external oscillator (SC18IS603). | ||
16 | |||
17 | Example: | ||
18 | |||
19 | sc18is603@28 { | ||
20 | compatible = "nxp,sc18is603"; | ||
21 | reg = <0x28>; | ||
22 | clock-frequency = <14744000>; | ||
23 | } | ||
diff --git a/Documentation/devicetree/bindings/spi/spi_pl022.txt b/Documentation/devicetree/bindings/spi/spi_pl022.txt index 306ec3ff3c0e..f158fd31cfda 100644 --- a/Documentation/devicetree/bindings/spi/spi_pl022.txt +++ b/Documentation/devicetree/bindings/spi/spi_pl022.txt | |||
@@ -6,7 +6,29 @@ Required properties: | |||
6 | - interrupts : Should contain SPI controller interrupt | 6 | - interrupts : Should contain SPI controller interrupt |
7 | 7 | ||
8 | Optional properties: | 8 | Optional properties: |
9 | - num-cs : total number of chipselects | ||
9 | - cs-gpios : should specify GPIOs used for chipselects. | 10 | - cs-gpios : should specify GPIOs used for chipselects. |
10 | The gpios will be referred to as reg = <index> in the SPI child nodes. | 11 | The gpios will be referred to as reg = <index> in the SPI child nodes. |
11 | If unspecified, a single SPI device without a chip select can be used. | 12 | If unspecified, a single SPI device without a chip select can be used. |
13 | - pl022,autosuspend-delay : delay in ms following transfer completion before | ||
14 | the runtime power management system suspends the | ||
15 | device. A setting of 0 indicates no delay and the | ||
16 | device will be suspended immediately | ||
17 | - pl022,rt : indicates the controller should run the message pump with realtime | ||
18 | priority to minimise the transfer latency on the bus (boolean) | ||
19 | |||
20 | |||
21 | SPI slave nodes must be children of the SPI master node and can | ||
22 | contain the following properties. | ||
23 | |||
24 | - pl022,interface : interface type: | ||
25 | 0: SPI | ||
26 | 1: Texas Instruments Synchronous Serial Frame Format | ||
27 | 2: Microwire (Half Duplex) | ||
28 | - pl022,com-mode : polling, interrupt or dma | ||
29 | - pl022,rx-level-trig : Rx FIFO watermark level | ||
30 | - pl022,tx-level-trig : Tx FIFO watermark level | ||
31 | - pl022,ctrl-len : Microwire interface: Control length | ||
32 | - pl022,wait-state : Microwire interface: Wait state | ||
33 | - pl022,duplex : Microwire interface: Full/Half duplex | ||
12 | 34 | ||
diff --git a/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt b/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt new file mode 100644 index 000000000000..801d58cb6d4d --- /dev/null +++ b/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | * Freescale i.MX28 LRADC device driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "fsl,imx28-lradc" | ||
5 | - reg: Address and length of the register set for the device | ||
6 | - interrupts: Should contain the LRADC interrupts | ||
7 | |||
8 | Examples: | ||
9 | |||
10 | lradc@80050000 { | ||
11 | compatible = "fsl,imx28-lradc"; | ||
12 | reg = <0x80050000 0x2000>; | ||
13 | interrupts = <10 14 15 16 17 18 19 | ||
14 | 20 21 22 23 24 25>; | ||
15 | }; | ||
diff --git a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt new file mode 100644 index 000000000000..07654f0338b6 --- /dev/null +++ b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt | |||
@@ -0,0 +1,41 @@ | |||
1 | Freescale i.MX IPUv3 | ||
2 | ==================== | ||
3 | |||
4 | Required properties: | ||
5 | - compatible: Should be "fsl,<chip>-ipu" | ||
6 | - reg: should be register base and length as documented in the | ||
7 | datasheet | ||
8 | - interrupts: Should contain sync interrupt and error interrupt, | ||
9 | in this order. | ||
10 | - #crtc-cells: 1, See below | ||
11 | |||
12 | example: | ||
13 | |||
14 | ipu: ipu@18000000 { | ||
15 | #crtc-cells = <1>; | ||
16 | compatible = "fsl,imx53-ipu"; | ||
17 | reg = <0x18000000 0x080000000>; | ||
18 | interrupts = <11 10>; | ||
19 | }; | ||
20 | |||
21 | Parallel display support | ||
22 | ======================== | ||
23 | |||
24 | Required properties: | ||
25 | - compatible: Should be "fsl,imx-parallel-display" | ||
26 | - crtc: the crtc this display is connected to, see below | ||
27 | Optional properties: | ||
28 | - interface_pix_fmt: How this display is connected to the | ||
29 | crtc. Currently supported types: "rgb24", "rgb565" | ||
30 | - edid: verbatim EDID data block describing attached display. | ||
31 | - ddc: phandle describing the i2c bus handling the display data | ||
32 | channel | ||
33 | |||
34 | example: | ||
35 | |||
36 | display@di0 { | ||
37 | compatible = "fsl,imx-parallel-display"; | ||
38 | edid = [edid-data]; | ||
39 | crtc = <&ipu 0>; | ||
40 | interface-pix-fmt = "rgb24"; | ||
41 | }; | ||
diff --git a/Documentation/devicetree/bindings/timer/brcm,bcm2835-system-timer.txt b/Documentation/devicetree/bindings/timer/brcm,bcm2835-system-timer.txt new file mode 100644 index 000000000000..2de21c2acf55 --- /dev/null +++ b/Documentation/devicetree/bindings/timer/brcm,bcm2835-system-timer.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | BCM2835 System Timer | ||
2 | |||
3 | The System Timer peripheral provides four 32-bit timer channels and a | ||
4 | single 64-bit free running counter. Each channel has an output compare | ||
5 | register, which is compared against the 32 least significant bits of the | ||
6 | free running counter values, and generates an interrupt. | ||
7 | |||
8 | Required properties: | ||
9 | |||
10 | - compatible : should be "brcm,bcm2835-system-timer.txt" | ||
11 | - reg : Specifies base physical address and size of the registers. | ||
12 | - interrupts : A list of 4 interrupt sinks; one per timer channel. | ||
13 | - clock-frequency : The frequency of the clock that drives the counter, in Hz. | ||
14 | |||
15 | Example: | ||
16 | |||
17 | timer { | ||
18 | compatible = "brcm,bcm2835-system-timer"; | ||
19 | reg = <0x7e003000 0x1000>; | ||
20 | interrupts = <1 0>, <1 1>, <1 2>, <1 3>; | ||
21 | clock-frequency = <1000000>; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/tty/serial/nxp-lpc32xx-hsuart.txt b/Documentation/devicetree/bindings/tty/serial/nxp-lpc32xx-hsuart.txt new file mode 100644 index 000000000000..0d439dfc1aa5 --- /dev/null +++ b/Documentation/devicetree/bindings/tty/serial/nxp-lpc32xx-hsuart.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | * NXP LPC32xx SoC High Speed UART | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "nxp,lpc3220-hsuart" | ||
5 | - reg: Should contain registers location and length | ||
6 | - interrupts: Should contain interrupt | ||
7 | |||
8 | Example: | ||
9 | |||
10 | uart1: serial@40014000 { | ||
11 | compatible = "nxp,lpc3220-hsuart"; | ||
12 | reg = <0x40014000 0x1000>; | ||
13 | interrupts = <26 0>; | ||
14 | }; | ||
diff --git a/Documentation/devicetree/bindings/tty/serial/of-serial.txt b/Documentation/devicetree/bindings/tty/serial/of-serial.txt index 0847fdeee11a..ba385f2e0ddc 100644 --- a/Documentation/devicetree/bindings/tty/serial/of-serial.txt +++ b/Documentation/devicetree/bindings/tty/serial/of-serial.txt | |||
@@ -25,6 +25,8 @@ Optional properties: | |||
25 | accesses to the UART (e.g. TI davinci). | 25 | accesses to the UART (e.g. TI davinci). |
26 | - used-by-rtas : set to indicate that the port is in use by the OpenFirmware | 26 | - used-by-rtas : set to indicate that the port is in use by the OpenFirmware |
27 | RTAS and should not be registered. | 27 | RTAS and should not be registered. |
28 | - no-loopback-test: set to indicate that the port does not implements loopback | ||
29 | test mode | ||
28 | 30 | ||
29 | Example: | 31 | Example: |
30 | 32 | ||
diff --git a/Documentation/devicetree/bindings/tty/serial/via,vt8500-uart.txt b/Documentation/devicetree/bindings/tty/serial/via,vt8500-uart.txt new file mode 100644 index 000000000000..5feef1ef167d --- /dev/null +++ b/Documentation/devicetree/bindings/tty/serial/via,vt8500-uart.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | VIA/Wondermedia VT8500 UART Controller | ||
2 | ----------------------------------------------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible : "via,vt8500-uart" | ||
6 | - reg : Should contain 1 register ranges(address and length) | ||
7 | - interrupts : UART interrupt | ||
8 | - clocks : phandle to the uart source clock (usually a 24Mhz fixed clock) | ||
9 | |||
10 | Example: | ||
11 | |||
12 | uart@d8210000 { | ||
13 | compatible = "via,vt8500-uart"; | ||
14 | reg = <0xd8210000 0x1040>; | ||
15 | interrupts = <47>; | ||
16 | clocks = <&ref24>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/am33xx-usb.txt b/Documentation/devicetree/bindings/usb/am33xx-usb.txt new file mode 100644 index 000000000000..ca8fa56e9f03 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/am33xx-usb.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | AM33XX MUSB GLUE | ||
2 | - compatible : Should be "ti,musb-am33xx" | ||
3 | - ti,hwmods : must be "usb_otg_hs" | ||
4 | - multipoint : Should be "1" indicating the musb controller supports | ||
5 | multipoint. This is a MUSB configuration-specific setting. | ||
6 | - num_eps : Specifies the number of endpoints. This is also a | ||
7 | MUSB configuration-specific setting. Should be set to "16" | ||
8 | - ram_bits : Specifies the ram address size. Should be set to "12" | ||
9 | - port0_mode : Should be "3" to represent OTG. "1" signifies HOST and "2" | ||
10 | represents PERIPHERAL. | ||
11 | - port1_mode : Should be "1" to represent HOST. "3" signifies OTG and "2" | ||
12 | represents PERIPHERAL. | ||
13 | - power : Should be "250". This signifies the controller can supply upto | ||
14 | 500mA when operating in host mode. | ||
diff --git a/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt b/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt index 2c290418bb2d..5778b9c83bd8 100644 --- a/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt +++ b/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt | |||
@@ -7,7 +7,10 @@ Required properties: | |||
7 | 7 | ||
8 | Optional properties: | 8 | Optional properties: |
9 | - fsl,usbphy: phandler of usb phy that connects to the only one port | 9 | - fsl,usbphy: phandler of usb phy that connects to the only one port |
10 | - fsl,usbmisc: phandler of non-core register device, with one argument | ||
11 | that indicate usb controller index | ||
10 | - vbus-supply: regulator for vbus | 12 | - vbus-supply: regulator for vbus |
13 | - disable-over-current: disable over current detect | ||
11 | 14 | ||
12 | Examples: | 15 | Examples: |
13 | usb@02184000 { /* USB OTG */ | 16 | usb@02184000 { /* USB OTG */ |
@@ -15,4 +18,6 @@ usb@02184000 { /* USB OTG */ | |||
15 | reg = <0x02184000 0x200>; | 18 | reg = <0x02184000 0x200>; |
16 | interrupts = <0 43 0x04>; | 19 | interrupts = <0 43 0x04>; |
17 | fsl,usbphy = <&usbphy1>; | 20 | fsl,usbphy = <&usbphy1>; |
21 | fsl,usbmisc = <&usbmisc 0>; | ||
22 | disable-over-current; | ||
18 | }; | 23 | }; |
diff --git a/Documentation/devicetree/bindings/usb/omap-usb.txt b/Documentation/devicetree/bindings/usb/omap-usb.txt new file mode 100644 index 000000000000..29a043ecda52 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/omap-usb.txt | |||
@@ -0,0 +1,33 @@ | |||
1 | OMAP GLUE | ||
2 | |||
3 | OMAP MUSB GLUE | ||
4 | - compatible : Should be "ti,omap4-musb" or "ti,omap3-musb" | ||
5 | - ti,hwmods : must be "usb_otg_hs" | ||
6 | - multipoint : Should be "1" indicating the musb controller supports | ||
7 | multipoint. This is a MUSB configuration-specific setting. | ||
8 | - num_eps : Specifies the number of endpoints. This is also a | ||
9 | MUSB configuration-specific setting. Should be set to "16" | ||
10 | - ram_bits : Specifies the ram address size. Should be set to "12" | ||
11 | - interface_type : This is a board specific setting to describe the type of | ||
12 | interface between the controller and the phy. It should be "0" or "1" | ||
13 | specifying ULPI and UTMI respectively. | ||
14 | - mode : Should be "3" to represent OTG. "1" signifies HOST and "2" | ||
15 | represents PERIPHERAL. | ||
16 | - power : Should be "50". This signifies the controller can supply upto | ||
17 | 100mA when operating in host mode. | ||
18 | |||
19 | SOC specific device node entry | ||
20 | usb_otg_hs: usb_otg_hs@4a0ab000 { | ||
21 | compatible = "ti,omap4-musb"; | ||
22 | ti,hwmods = "usb_otg_hs"; | ||
23 | multipoint = <1>; | ||
24 | num_eps = <16>; | ||
25 | ram_bits = <12>; | ||
26 | }; | ||
27 | |||
28 | Board specific device node entry | ||
29 | &usb_otg_hs { | ||
30 | interface_type = <1>; | ||
31 | mode = <3>; | ||
32 | power = <50>; | ||
33 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/platform-uhci.txt b/Documentation/devicetree/bindings/usb/platform-uhci.txt new file mode 100644 index 000000000000..a4fb0719d157 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/platform-uhci.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | Generic Platform UHCI Controller | ||
2 | ----------------------------------------------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible : "platform-uhci" | ||
6 | - reg : Should contain 1 register ranges(address and length) | ||
7 | - interrupts : UHCI controller interrupt | ||
8 | |||
9 | Example: | ||
10 | |||
11 | uhci@d8007b00 { | ||
12 | compatible = "platform-uhci"; | ||
13 | reg = <0xd8007b00 0x200>; | ||
14 | interrupts = <43>; | ||
15 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/pxa-usb.txt b/Documentation/devicetree/bindings/usb/pxa-usb.txt new file mode 100644 index 000000000000..79729a948d5a --- /dev/null +++ b/Documentation/devicetree/bindings/usb/pxa-usb.txt | |||
@@ -0,0 +1,31 @@ | |||
1 | PXA USB controllers | ||
2 | |||
3 | OHCI | ||
4 | |||
5 | Required properties: | ||
6 | - compatible: Should be "marvell,pxa-ohci" for USB controllers | ||
7 | used in host mode. | ||
8 | |||
9 | Optional properties: | ||
10 | - "marvell,enable-port1", "marvell,enable-port2", "marvell,enable-port3" | ||
11 | If present, enables the appropriate USB port of the controller. | ||
12 | - "marvell,port-mode" selects the mode of the ports: | ||
13 | 1 = PMM_NPS_MODE | ||
14 | 2 = PMM_GLOBAL_MODE | ||
15 | 3 = PMM_PERPORT_MODE | ||
16 | - "marvell,power-sense-low" - power sense pin is low-active. | ||
17 | - "marvell,power-control-low" - power control pin is low-active. | ||
18 | - "marvell,no-oc-protection" - disable over-current protection. | ||
19 | - "marvell,oc-mode-perport" - enable per-port over-current protection. | ||
20 | - "marvell,power_on_delay" Power On to Power Good time - in ms. | ||
21 | |||
22 | Example: | ||
23 | |||
24 | usb0: ohci@4c000000 { | ||
25 | compatible = "marvell,pxa-ohci", "usb-ohci"; | ||
26 | reg = <0x4c000000 0x100000>; | ||
27 | interrupts = <18>; | ||
28 | marvell,enable-port1; | ||
29 | marvell,port-mode = <2>; /* PMM_GLOBAL_MODE */ | ||
30 | }; | ||
31 | |||
diff --git a/Documentation/devicetree/bindings/usb/twlxxxx-usb.txt b/Documentation/devicetree/bindings/usb/twlxxxx-usb.txt new file mode 100644 index 000000000000..36b9aede3f40 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/twlxxxx-usb.txt | |||
@@ -0,0 +1,40 @@ | |||
1 | USB COMPARATOR OF TWL CHIPS | ||
2 | |||
3 | TWL6030 USB COMPARATOR | ||
4 | - compatible : Should be "ti,twl6030-usb" | ||
5 | - interrupts : Two interrupt numbers to the cpu should be specified. First | ||
6 | interrupt number is the otg interrupt number that raises ID interrupts when | ||
7 | the controller has to act as host and the second interrupt number is the | ||
8 | usb interrupt number that raises VBUS interrupts when the controller has to | ||
9 | act as device | ||
10 | - usb-supply : phandle to the regulator device tree node. It should be vusb | ||
11 | if it is twl6030 or ldousb if it is twl6025 subclass. | ||
12 | |||
13 | twl6030-usb { | ||
14 | compatible = "ti,twl6030-usb"; | ||
15 | interrupts = < 4 10 >; | ||
16 | }; | ||
17 | |||
18 | Board specific device node entry | ||
19 | &twl6030-usb { | ||
20 | usb-supply = <&vusb>; | ||
21 | }; | ||
22 | |||
23 | TWL4030 USB PHY AND COMPARATOR | ||
24 | - compatible : Should be "ti,twl4030-usb" | ||
25 | - interrupts : The interrupt numbers to the cpu should be specified. First | ||
26 | interrupt number is the otg interrupt number that raises ID interrupts | ||
27 | and VBUS interrupts. The second interrupt number is optional. | ||
28 | - <supply-name>-supply : phandle to the regulator device tree node. | ||
29 | <supply-name> should be vusb1v5, vusb1v8 and vusb3v1 | ||
30 | - usb_mode : The mode used by the phy to connect to the controller. "1" | ||
31 | specifies "ULPI" mode and "2" specifies "CEA2011_3PIN" mode. | ||
32 | |||
33 | twl4030-usb { | ||
34 | compatible = "ti,twl4030-usb"; | ||
35 | interrupts = < 10 4 >; | ||
36 | usb1v5-supply = <&vusb1v5>; | ||
37 | usb1v8-supply = <&vusb1v8>; | ||
38 | usb3v1-supply = <&vusb3v1>; | ||
39 | usb_mode = <1>; | ||
40 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/usb-phy.txt b/Documentation/devicetree/bindings/usb/usb-phy.txt new file mode 100644 index 000000000000..80d4148cb661 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/usb-phy.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | USB PHY | ||
2 | |||
3 | OMAP USB2 PHY | ||
4 | |||
5 | Required properties: | ||
6 | - compatible: Should be "ti,omap-usb2" | ||
7 | - reg : Address and length of the register set for the device. Also | ||
8 | add the address of control module dev conf register until a driver for | ||
9 | control module is added | ||
10 | |||
11 | This is usually a subnode of ocp2scp to which it is connected. | ||
12 | |||
13 | usb2phy@4a0ad080 { | ||
14 | compatible = "ti,omap-usb2"; | ||
15 | reg = <0x4a0ad080 0x58>, | ||
16 | <0x4a002300 0x4>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/usbmisc-imx.txt b/Documentation/devicetree/bindings/usb/usbmisc-imx.txt new file mode 100644 index 000000000000..97ce94e1a6cc --- /dev/null +++ b/Documentation/devicetree/bindings/usb/usbmisc-imx.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | * Freescale i.MX non-core registers | ||
2 | |||
3 | Required properties: | ||
4 | - #index-cells: Cells used to descibe usb controller index. Should be <1> | ||
5 | - compatible: Should be one of below: | ||
6 | "fsl,imx6q-usbmisc" for imx6q | ||
7 | - reg: Should contain registers location and length | ||
8 | |||
9 | Examples: | ||
10 | usbmisc@02184800 { | ||
11 | #index-cells = <1>; | ||
12 | compatible = "fsl,imx6q-usbmisc"; | ||
13 | reg = <0x02184800 0x200>; | ||
14 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/via,vt8500-ehci.txt b/Documentation/devicetree/bindings/usb/via,vt8500-ehci.txt new file mode 100644 index 000000000000..17b3ad1d97e7 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/via,vt8500-ehci.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | VIA/Wondermedia VT8500 EHCI Controller | ||
2 | ----------------------------------------------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible : "via,vt8500-ehci" | ||
6 | - reg : Should contain 1 register ranges(address and length) | ||
7 | - interrupts : ehci controller interrupt | ||
8 | |||
9 | Example: | ||
10 | |||
11 | ehci@d8007900 { | ||
12 | compatible = "via,vt8500-ehci"; | ||
13 | reg = <0xd8007900 0x200>; | ||
14 | interrupts = <43>; | ||
15 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/vt8500-ehci.txt b/Documentation/devicetree/bindings/usb/vt8500-ehci.txt new file mode 100644 index 000000000000..5fb8fd6e250c --- /dev/null +++ b/Documentation/devicetree/bindings/usb/vt8500-ehci.txt | |||
@@ -0,0 +1,12 @@ | |||
1 | VIA VT8500 and Wondermedia WM8xxx SoC USB controllers. | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "via,vt8500-ehci" or "wm,prizm-ehci". | ||
5 | - reg: Address range of the ehci registers. size should be 0x200 | ||
6 | - interrupts: Should contain the ehci interrupt. | ||
7 | |||
8 | usb: ehci@D8007100 { | ||
9 | compatible = "wm,prizm-ehci", "usb-ehci"; | ||
10 | reg = <0xD8007100 0x200>; | ||
11 | interrupts = <1>; | ||
12 | }; | ||
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index db4d3af3643c..9de2b9ff9d6e 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt | |||
@@ -10,6 +10,7 @@ apm Applied Micro Circuits Corporation (APM) | |||
10 | arm ARM Ltd. | 10 | arm ARM Ltd. |
11 | atmel Atmel Corporation | 11 | atmel Atmel Corporation |
12 | bosch Bosch Sensortec GmbH | 12 | bosch Bosch Sensortec GmbH |
13 | brcm Broadcom Corporation | ||
13 | cavium Cavium, Inc. | 14 | cavium Cavium, Inc. |
14 | chrp Common Hardware Reference Platform | 15 | chrp Common Hardware Reference Platform |
15 | cortina Cortina Systems, Inc. | 16 | cortina Cortina Systems, Inc. |
@@ -47,5 +48,7 @@ sirf SiRF Technology, Inc. | |||
47 | st STMicroelectronics | 48 | st STMicroelectronics |
48 | stericsson ST-Ericsson | 49 | stericsson ST-Ericsson |
49 | ti Texas Instruments | 50 | ti Texas Instruments |
51 | via VIA Technologies, Inc. | ||
50 | wlf Wolfson Microelectronics | 52 | wlf Wolfson Microelectronics |
53 | wm Wondermedia Technologies, Inc. | ||
51 | xlnx Xilinx | 54 | xlnx Xilinx |
diff --git a/Documentation/devicetree/bindings/video/via,vt8500-fb.txt b/Documentation/devicetree/bindings/video/via,vt8500-fb.txt new file mode 100644 index 000000000000..c870b6478ec8 --- /dev/null +++ b/Documentation/devicetree/bindings/video/via,vt8500-fb.txt | |||
@@ -0,0 +1,62 @@ | |||
1 | VIA VT8500 Framebuffer | ||
2 | ----------------------------------------------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible : "via,vt8500-fb" | ||
6 | - reg : Should contain 1 register ranges(address and length) | ||
7 | - interrupts : framebuffer controller interrupt | ||
8 | - display: a phandle pointing to the display node | ||
9 | |||
10 | Required nodes: | ||
11 | - display: a display node is required to initialize the lcd panel | ||
12 | This should be in the board dts. | ||
13 | - default-mode: a videomode within the display with timing parameters | ||
14 | as specified below. | ||
15 | |||
16 | Example: | ||
17 | |||
18 | fb@d800e400 { | ||
19 | compatible = "via,vt8500-fb"; | ||
20 | reg = <0xd800e400 0x400>; | ||
21 | interrupts = <12>; | ||
22 | display = <&display>; | ||
23 | default-mode = <&mode0>; | ||
24 | }; | ||
25 | |||
26 | VIA VT8500 Display | ||
27 | ----------------------------------------------------- | ||
28 | Required properties (as per of_videomode_helper): | ||
29 | |||
30 | - hactive, vactive: Display resolution | ||
31 | - hfront-porch, hback-porch, hsync-len: Horizontal Display timing parameters | ||
32 | in pixels | ||
33 | vfront-porch, vback-porch, vsync-len: Vertical display timing parameters in | ||
34 | lines | ||
35 | - clock: displayclock in Hz | ||
36 | - bpp: lcd panel bit-depth. | ||
37 | <16> for RGB565, <32> for RGB888 | ||
38 | |||
39 | Optional properties (as per of_videomode_helper): | ||
40 | - width-mm, height-mm: Display dimensions in mm | ||
41 | - hsync-active-high (bool): Hsync pulse is active high | ||
42 | - vsync-active-high (bool): Vsync pulse is active high | ||
43 | - interlaced (bool): This is an interlaced mode | ||
44 | - doublescan (bool): This is a doublescan mode | ||
45 | |||
46 | Example: | ||
47 | display: display@0 { | ||
48 | modes { | ||
49 | mode0: mode@0 { | ||
50 | hactive = <800>; | ||
51 | vactive = <480>; | ||
52 | hback-porch = <88>; | ||
53 | hfront-porch = <40>; | ||
54 | hsync-len = <0>; | ||
55 | vback-porch = <32>; | ||
56 | vfront-porch = <11>; | ||
57 | vsync-len = <1>; | ||
58 | clock = <0>; /* unused but required */ | ||
59 | bpp = <16>; /* non-standard but required */ | ||
60 | }; | ||
61 | }; | ||
62 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/wm,prizm-ge-rops.txt b/Documentation/devicetree/bindings/video/wm,prizm-ge-rops.txt new file mode 100644 index 000000000000..a850fa011f02 --- /dev/null +++ b/Documentation/devicetree/bindings/video/wm,prizm-ge-rops.txt | |||
@@ -0,0 +1,13 @@ | |||
1 | VIA/Wondermedia Graphics Engine Controller | ||
2 | ----------------------------------------------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible : "wm,prizm-ge-rops" | ||
6 | - reg : Should contain 1 register ranges(address and length) | ||
7 | |||
8 | Example: | ||
9 | |||
10 | ge_rops@d8050400 { | ||
11 | compatible = "wm,prizm-ge-rops"; | ||
12 | reg = <0xd8050400 0x100>; | ||
13 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/wm,wm8505-fb.txt b/Documentation/devicetree/bindings/video/wm,wm8505-fb.txt new file mode 100644 index 000000000000..3d325e1d11ee --- /dev/null +++ b/Documentation/devicetree/bindings/video/wm,wm8505-fb.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | Wondermedia WM8505 Framebuffer | ||
2 | ----------------------------------------------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible : "wm,wm8505-fb" | ||
6 | - reg : Should contain 1 register ranges(address and length) | ||
7 | - via,display: a phandle pointing to the display node | ||
8 | |||
9 | Required nodes: | ||
10 | - display: a display node is required to initialize the lcd panel | ||
11 | This should be in the board dts. See definition in | ||
12 | Documentation/devicetree/bindings/video/via,vt8500-fb.txt | ||
13 | - default-mode: a videomode node as specified in | ||
14 | Documentation/devicetree/bindings/video/via,vt8500-fb.txt | ||
15 | |||
16 | Example: | ||
17 | |||
18 | fb@d8050800 { | ||
19 | compatible = "wm,wm8505-fb"; | ||
20 | reg = <0xd8050800 0x200>; | ||
21 | display = <&display>; | ||
22 | default-mode = <&mode0>; | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/w1/w1-gpio.txt b/Documentation/devicetree/bindings/w1/w1-gpio.txt new file mode 100644 index 000000000000..6e09c35d9f1a --- /dev/null +++ b/Documentation/devicetree/bindings/w1/w1-gpio.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | w1-gpio devicetree bindings | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible: "w1-gpio" | ||
6 | - gpios: one or two GPIO specs: | ||
7 | - the first one is used as data I/O pin | ||
8 | - the second one is optional. If specified, it is used as | ||
9 | enable pin for an external pin pullup. | ||
10 | |||
11 | Optional properties: | ||
12 | |||
13 | - linux,open-drain: if specified, the data pin is considered in | ||
14 | open-drain mode. | ||
15 | |||
16 | Examples: | ||
17 | |||
18 | onewire@0 { | ||
19 | compatible = "w1-gpio"; | ||
20 | gpios = <&gpio 126 0>, <&gpio 105 0>; | ||
21 | }; | ||
22 | |||
diff --git a/Documentation/dontdiff b/Documentation/dontdiff index 39462cf35cd4..74c25c8d8884 100644 --- a/Documentation/dontdiff +++ b/Documentation/dontdiff | |||
@@ -162,7 +162,6 @@ mach-types.h | |||
162 | machtypes.h | 162 | machtypes.h |
163 | map | 163 | map |
164 | map_hugetlb | 164 | map_hugetlb |
165 | maui_boot.h | ||
166 | media | 165 | media |
167 | mconf | 166 | mconf |
168 | miboot* | 167 | miboot* |
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt deleted file mode 100644 index afaff312bf41..000000000000 --- a/Documentation/feature-removal-schedule.txt +++ /dev/null | |||
@@ -1,639 +0,0 @@ | |||
1 | The following is a list of files and features that are going to be | ||
2 | removed in the kernel source tree. Every entry should contain what | ||
3 | exactly is going away, why it is happening, and who is going to be doing | ||
4 | the work. When the feature is removed from the kernel, it should also | ||
5 | be removed from this file. The suggested deprecation period is 3 releases. | ||
6 | |||
7 | --------------------------- | ||
8 | |||
9 | What: ddebug_query="query" boot cmdline param | ||
10 | When: v3.8 | ||
11 | Why: obsoleted by dyndbg="query" and module.dyndbg="query" | ||
12 | Who: Jim Cromie <jim.cromie@gmail.com>, Jason Baron <jbaron@redhat.com> | ||
13 | |||
14 | --------------------------- | ||
15 | |||
16 | What: /proc/sys/vm/nr_pdflush_threads | ||
17 | When: 2012 | ||
18 | Why: Since pdflush is deprecated, the interface exported in /proc/sys/vm/ | ||
19 | should be removed. | ||
20 | Who: Wanpeng Li <liwp@linux.vnet.ibm.com> | ||
21 | |||
22 | --------------------------- | ||
23 | |||
24 | What: CONFIG_APM_CPU_IDLE, and its ability to call APM BIOS in idle | ||
25 | When: 2012 | ||
26 | Why: This optional sub-feature of APM is of dubious reliability, | ||
27 | and ancient APM laptops are likely better served by calling HLT. | ||
28 | Deleting CONFIG_APM_CPU_IDLE allows x86 to stop exporting | ||
29 | the pm_idle function pointer to modules. | ||
30 | Who: Len Brown <len.brown@intel.com> | ||
31 | |||
32 | ---------------------------- | ||
33 | |||
34 | What: x86_32 "no-hlt" cmdline param | ||
35 | When: 2012 | ||
36 | Why: remove a branch from idle path, simplify code used by everybody. | ||
37 | This option disabled the use of HLT in idle and machine_halt() | ||
38 | for hardware that was flakey 15-years ago. Today we have | ||
39 | "idle=poll" that removed HLT from idle, and so if such a machine | ||
40 | is still running the upstream kernel, "idle=poll" is likely sufficient. | ||
41 | Who: Len Brown <len.brown@intel.com> | ||
42 | |||
43 | ---------------------------- | ||
44 | |||
45 | What: x86 "idle=mwait" cmdline param | ||
46 | When: 2012 | ||
47 | Why: simplify x86 idle code | ||
48 | Who: Len Brown <len.brown@intel.com> | ||
49 | |||
50 | ---------------------------- | ||
51 | |||
52 | What: PRISM54 | ||
53 | When: 2.6.34 | ||
54 | |||
55 | Why: prism54 FullMAC PCI / Cardbus devices used to be supported only by the | ||
56 | prism54 wireless driver. After Intersil stopped selling these | ||
57 | devices in preference for the newer more flexible SoftMAC devices | ||
58 | a SoftMAC device driver was required and prism54 did not support | ||
59 | them. The p54pci driver now exists and has been present in the kernel for | ||
60 | a while. This driver supports both SoftMAC devices and FullMAC devices. | ||
61 | The main difference between these devices was the amount of memory which | ||
62 | could be used for the firmware. The SoftMAC devices support a smaller | ||
63 | amount of memory. Because of this the SoftMAC firmware fits into FullMAC | ||
64 | devices's memory. p54pci supports not only PCI / Cardbus but also USB | ||
65 | and SPI. Since p54pci supports all devices prism54 supports | ||
66 | you will have a conflict. I'm not quite sure how distributions are | ||
67 | handling this conflict right now. prism54 was kept around due to | ||
68 | claims users may experience issues when using the SoftMAC driver. | ||
69 | Time has passed users have not reported issues. If you use prism54 | ||
70 | and for whatever reason you cannot use p54pci please let us know! | ||
71 | E-mail us at: linux-wireless@vger.kernel.org | ||
72 | |||
73 | For more information see the p54 wiki page: | ||
74 | |||
75 | http://wireless.kernel.org/en/users/Drivers/p54 | ||
76 | |||
77 | Who: Luis R. Rodriguez <lrodriguez@atheros.com> | ||
78 | |||
79 | --------------------------- | ||
80 | |||
81 | What: The ieee80211_regdom module parameter | ||
82 | When: March 2010 / desktop catchup | ||
83 | |||
84 | Why: This was inherited by the CONFIG_WIRELESS_OLD_REGULATORY code, | ||
85 | and currently serves as an option for users to define an | ||
86 | ISO / IEC 3166 alpha2 code for the country they are currently | ||
87 | present in. Although there are userspace API replacements for this | ||
88 | through nl80211 distributions haven't yet caught up with implementing | ||
89 | decent alternatives through standard GUIs. Although available as an | ||
90 | option through iw or wpa_supplicant its just a matter of time before | ||
91 | distributions pick up good GUI options for this. The ideal solution | ||
92 | would actually consist of intelligent designs which would do this for | ||
93 | the user automatically even when travelling through different countries. | ||
94 | Until then we leave this module parameter as a compromise. | ||
95 | |||
96 | When userspace improves with reasonable widely-available alternatives for | ||
97 | this we will no longer need this module parameter. This entry hopes that | ||
98 | by the super-futuristically looking date of "March 2010" we will have | ||
99 | such replacements widely available. | ||
100 | |||
101 | Who: Luis R. Rodriguez <lrodriguez@atheros.com> | ||
102 | |||
103 | --------------------------- | ||
104 | |||
105 | What: dev->power.power_state | ||
106 | When: July 2007 | ||
107 | Why: Broken design for runtime control over driver power states, confusing | ||
108 | driver-internal runtime power management with: mechanisms to support | ||
109 | system-wide sleep state transitions; event codes that distinguish | ||
110 | different phases of swsusp "sleep" transitions; and userspace policy | ||
111 | inputs. This framework was never widely used, and most attempts to | ||
112 | use it were broken. Drivers should instead be exposing domain-specific | ||
113 | interfaces either to kernel or to userspace. | ||
114 | Who: Pavel Machek <pavel@ucw.cz> | ||
115 | |||
116 | --------------------------- | ||
117 | |||
118 | What: /proc/<pid>/oom_adj | ||
119 | When: August 2012 | ||
120 | Why: /proc/<pid>/oom_adj allows userspace to influence the oom killer's | ||
121 | badness heuristic used to determine which task to kill when the kernel | ||
122 | is out of memory. | ||
123 | |||
124 | The badness heuristic has since been rewritten since the introduction of | ||
125 | this tunable such that its meaning is deprecated. The value was | ||
126 | implemented as a bitshift on a score generated by the badness() | ||
127 | function that did not have any precise units of measure. With the | ||
128 | rewrite, the score is given as a proportion of available memory to the | ||
129 | task allocating pages, so using a bitshift which grows the score | ||
130 | exponentially is, thus, impossible to tune with fine granularity. | ||
131 | |||
132 | A much more powerful interface, /proc/<pid>/oom_score_adj, was | ||
133 | introduced with the oom killer rewrite that allows users to increase or | ||
134 | decrease the badness score linearly. This interface will replace | ||
135 | /proc/<pid>/oom_adj. | ||
136 | |||
137 | A warning will be emitted to the kernel log if an application uses this | ||
138 | deprecated interface. After it is printed once, future warnings will be | ||
139 | suppressed until the kernel is rebooted. | ||
140 | |||
141 | --------------------------- | ||
142 | |||
143 | What: remove EXPORT_SYMBOL(kernel_thread) | ||
144 | When: August 2006 | ||
145 | Files: arch/*/kernel/*_ksyms.c | ||
146 | Check: kernel_thread | ||
147 | Why: kernel_thread is a low-level implementation detail. Drivers should | ||
148 | use the <linux/kthread.h> API instead which shields them from | ||
149 | implementation details and provides a higherlevel interface that | ||
150 | prevents bugs and code duplication | ||
151 | Who: Christoph Hellwig <hch@lst.de> | ||
152 | |||
153 | --------------------------- | ||
154 | |||
155 | What: Unused EXPORT_SYMBOL/EXPORT_SYMBOL_GPL exports | ||
156 | (temporary transition config option provided until then) | ||
157 | The transition config option will also be removed at the same time. | ||
158 | When: before 2.6.19 | ||
159 | Why: Unused symbols are both increasing the size of the kernel binary | ||
160 | and are often a sign of "wrong API" | ||
161 | Who: Arjan van de Ven <arjan@linux.intel.com> | ||
162 | |||
163 | --------------------------- | ||
164 | |||
165 | What: PHYSDEVPATH, PHYSDEVBUS, PHYSDEVDRIVER in the uevent environment | ||
166 | When: October 2008 | ||
167 | Why: The stacking of class devices makes these values misleading and | ||
168 | inconsistent. | ||
169 | Class devices should not carry any of these properties, and bus | ||
170 | devices have SUBSYTEM and DRIVER as a replacement. | ||
171 | Who: Kay Sievers <kay.sievers@suse.de> | ||
172 | |||
173 | --------------------------- | ||
174 | |||
175 | What: ACPI procfs interface | ||
176 | When: July 2008 | ||
177 | Why: ACPI sysfs conversion should be finished by January 2008. | ||
178 | ACPI procfs interface will be removed in July 2008 so that | ||
179 | there is enough time for the user space to catch up. | ||
180 | Who: Zhang Rui <rui.zhang@intel.com> | ||
181 | |||
182 | --------------------------- | ||
183 | |||
184 | What: CONFIG_ACPI_PROCFS_POWER | ||
185 | When: 2.6.39 | ||
186 | Why: sysfs I/F for ACPI power devices, including AC and Battery, | ||
187 | has been working in upstream kernel since 2.6.24, Sep 2007. | ||
188 | In 2.6.37, we make the sysfs I/F always built in and this option | ||
189 | disabled by default. | ||
190 | Remove this option and the ACPI power procfs interface in 2.6.39. | ||
191 | Who: Zhang Rui <rui.zhang@intel.com> | ||
192 | |||
193 | --------------------------- | ||
194 | |||
195 | What: /proc/acpi/event | ||
196 | When: February 2008 | ||
197 | Why: /proc/acpi/event has been replaced by events via the input layer | ||
198 | and netlink since 2.6.23. | ||
199 | Who: Len Brown <len.brown@intel.com> | ||
200 | |||
201 | --------------------------- | ||
202 | |||
203 | What: i386/x86_64 bzImage symlinks | ||
204 | When: April 2010 | ||
205 | |||
206 | Why: The i386/x86_64 merge provides a symlink to the old bzImage | ||
207 | location so not yet updated user space tools, e.g. package | ||
208 | scripts, do not break. | ||
209 | Who: Thomas Gleixner <tglx@linutronix.de> | ||
210 | |||
211 | --------------------------- | ||
212 | |||
213 | What: GPIO autorequest on gpio_direction_{input,output}() in gpiolib | ||
214 | When: February 2010 | ||
215 | Why: All callers should use explicit gpio_request()/gpio_free(). | ||
216 | The autorequest mechanism in gpiolib was provided mostly as a | ||
217 | migration aid for legacy GPIO interfaces (for SOC based GPIOs). | ||
218 | Those users have now largely migrated. Platforms implementing | ||
219 | the GPIO interfaces without using gpiolib will see no changes. | ||
220 | Who: David Brownell <dbrownell@users.sourceforge.net> | ||
221 | --------------------------- | ||
222 | |||
223 | What: b43 support for firmware revision < 410 | ||
224 | When: The schedule was July 2008, but it was decided that we are going to keep the | ||
225 | code as long as there are no major maintanance headaches. | ||
226 | So it _could_ be removed _any_ time now, if it conflicts with something new. | ||
227 | Why: The support code for the old firmware hurts code readability/maintainability | ||
228 | and slightly hurts runtime performance. Bugfixes for the old firmware | ||
229 | are not provided by Broadcom anymore. | ||
230 | Who: Michael Buesch <m@bues.ch> | ||
231 | |||
232 | --------------------------- | ||
233 | |||
234 | What: Ability for non root users to shm_get hugetlb pages based on mlock | ||
235 | resource limits | ||
236 | When: 2.6.31 | ||
237 | Why: Non root users need to be part of /proc/sys/vm/hugetlb_shm_group or | ||
238 | have CAP_IPC_LOCK to be able to allocate shm segments backed by | ||
239 | huge pages. The mlock based rlimit check to allow shm hugetlb is | ||
240 | inconsistent with mmap based allocations. Hence it is being | ||
241 | deprecated. | ||
242 | Who: Ravikiran Thirumalai <kiran@scalex86.org> | ||
243 | |||
244 | --------------------------- | ||
245 | |||
246 | What: sysfs ui for changing p4-clockmod parameters | ||
247 | When: September 2009 | ||
248 | Why: See commits 129f8ae9b1b5be94517da76009ea956e89104ce8 and | ||
249 | e088e4c9cdb618675874becb91b2fd581ee707e6. | ||
250 | Removal is subject to fixing any remaining bugs in ACPI which may | ||
251 | cause the thermal throttling not to happen at the right time. | ||
252 | Who: Dave Jones <davej@redhat.com>, Matthew Garrett <mjg@redhat.com> | ||
253 | |||
254 | ----------------------------- | ||
255 | |||
256 | What: fakephp and associated sysfs files in /sys/bus/pci/slots/ | ||
257 | When: 2011 | ||
258 | Why: In 2.6.27, the semantics of /sys/bus/pci/slots was redefined to | ||
259 | represent a machine's physical PCI slots. The change in semantics | ||
260 | had userspace implications, as the hotplug core no longer allowed | ||
261 | drivers to create multiple sysfs files per physical slot (required | ||
262 | for multi-function devices, e.g.). fakephp was seen as a developer's | ||
263 | tool only, and its interface changed. Too late, we learned that | ||
264 | there were some users of the fakephp interface. | ||
265 | |||
266 | In 2.6.30, the original fakephp interface was restored. At the same | ||
267 | time, the PCI core gained the ability that fakephp provided, namely | ||
268 | function-level hot-remove and hot-add. | ||
269 | |||
270 | Since the PCI core now provides the same functionality, exposed in: | ||
271 | |||
272 | /sys/bus/pci/rescan | ||
273 | /sys/bus/pci/devices/.../remove | ||
274 | /sys/bus/pci/devices/.../rescan | ||
275 | |||
276 | there is no functional reason to maintain fakephp as well. | ||
277 | |||
278 | We will keep the existing module so that 'modprobe fakephp' will | ||
279 | present the old /sys/bus/pci/slots/... interface for compatibility, | ||
280 | but users are urged to migrate their applications to the API above. | ||
281 | |||
282 | After a reasonable transition period, we will remove the legacy | ||
283 | fakephp interface. | ||
284 | Who: Alex Chiang <achiang@hp.com> | ||
285 | |||
286 | --------------------------- | ||
287 | |||
288 | What: CONFIG_RFKILL_INPUT | ||
289 | When: 2.6.33 | ||
290 | Why: Should be implemented in userspace, policy daemon. | ||
291 | Who: Johannes Berg <johannes@sipsolutions.net> | ||
292 | |||
293 | ---------------------------- | ||
294 | |||
295 | What: sound-slot/service-* module aliases and related clutters in | ||
296 | sound/sound_core.c | ||
297 | When: August 2010 | ||
298 | Why: OSS sound_core grabs all legacy minors (0-255) of SOUND_MAJOR | ||
299 | (14) and requests modules using custom sound-slot/service-* | ||
300 | module aliases. The only benefit of doing this is allowing | ||
301 | use of custom module aliases which might as well be considered | ||
302 | a bug at this point. This preemptive claiming prevents | ||
303 | alternative OSS implementations. | ||
304 | |||
305 | Till the feature is removed, the kernel will be requesting | ||
306 | both sound-slot/service-* and the standard char-major-* module | ||
307 | aliases and allow turning off the pre-claiming selectively via | ||
308 | CONFIG_SOUND_OSS_CORE_PRECLAIM and soundcore.preclaim_oss | ||
309 | kernel parameter. | ||
310 | |||
311 | After the transition phase is complete, both the custom module | ||
312 | aliases and switches to disable it will go away. This removal | ||
313 | will also allow making ALSA OSS emulation independent of | ||
314 | sound_core. The dependency will be broken then too. | ||
315 | Who: Tejun Heo <tj@kernel.org> | ||
316 | |||
317 | ---------------------------- | ||
318 | |||
319 | What: sysfs-class-rfkill state file | ||
320 | When: Feb 2014 | ||
321 | Files: net/rfkill/core.c | ||
322 | Why: Documented as obsolete since Feb 2010. This file is limited to 3 | ||
323 | states while the rfkill drivers can have 4 states. | ||
324 | Who: anybody or Florian Mickler <florian@mickler.org> | ||
325 | |||
326 | ---------------------------- | ||
327 | |||
328 | What: sysfs-class-rfkill claim file | ||
329 | When: Feb 2012 | ||
330 | Files: net/rfkill/core.c | ||
331 | Why: It is not possible to claim an rfkill driver since 2007. This is | ||
332 | Documented as obsolete since Feb 2010. | ||
333 | Who: anybody or Florian Mickler <florian@mickler.org> | ||
334 | |||
335 | ---------------------------- | ||
336 | |||
337 | What: iwlwifi 50XX module parameters | ||
338 | When: 3.0 | ||
339 | Why: The "..50" modules parameters were used to configure 5000 series and | ||
340 | up devices; different set of module parameters also available for 4965 | ||
341 | with same functionalities. Consolidate both set into single place | ||
342 | in drivers/net/wireless/iwlwifi/iwl-agn.c | ||
343 | |||
344 | Who: Wey-Yi Guy <wey-yi.w.guy@intel.com> | ||
345 | |||
346 | ---------------------------- | ||
347 | |||
348 | What: iwl4965 alias support | ||
349 | When: 3.0 | ||
350 | Why: Internal alias support has been present in module-init-tools for some | ||
351 | time, the MODULE_ALIAS("iwl4965") boilerplate aliases can be removed | ||
352 | with no impact. | ||
353 | |||
354 | Who: Wey-Yi Guy <wey-yi.w.guy@intel.com> | ||
355 | |||
356 | --------------------------- | ||
357 | |||
358 | What: xt_NOTRACK | ||
359 | Files: net/netfilter/xt_NOTRACK.c | ||
360 | When: April 2011 | ||
361 | Why: Superseded by xt_CT | ||
362 | Who: Netfilter developer team <netfilter-devel@vger.kernel.org> | ||
363 | |||
364 | ---------------------------- | ||
365 | |||
366 | What: IRQF_DISABLED | ||
367 | When: 2.6.36 | ||
368 | Why: The flag is a NOOP as we run interrupt handlers with interrupts disabled | ||
369 | Who: Thomas Gleixner <tglx@linutronix.de> | ||
370 | |||
371 | ---------------------------- | ||
372 | |||
373 | What: PCI DMA unmap state API | ||
374 | When: August 2012 | ||
375 | Why: PCI DMA unmap state API (include/linux/pci-dma.h) was replaced | ||
376 | with DMA unmap state API (DMA unmap state API can be used for | ||
377 | any bus). | ||
378 | Who: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | ||
379 | |||
380 | ---------------------------- | ||
381 | |||
382 | What: iwlwifi disable_hw_scan module parameters | ||
383 | When: 3.0 | ||
384 | Why: Hareware scan is the prefer method for iwlwifi devices for | ||
385 | scanning operation. Remove software scan support for all the | ||
386 | iwlwifi devices. | ||
387 | |||
388 | Who: Wey-Yi Guy <wey-yi.w.guy@intel.com> | ||
389 | |||
390 | ---------------------------- | ||
391 | |||
392 | What: Legacy, non-standard chassis intrusion detection interface. | ||
393 | When: June 2011 | ||
394 | Why: The adm9240, w83792d and w83793 hardware monitoring drivers have | ||
395 | legacy interfaces for chassis intrusion detection. A standard | ||
396 | interface has been added to each driver, so the legacy interface | ||
397 | can be removed. | ||
398 | Who: Jean Delvare <khali@linux-fr.org> | ||
399 | |||
400 | ---------------------------- | ||
401 | |||
402 | What: i2c_driver.attach_adapter | ||
403 | i2c_driver.detach_adapter | ||
404 | When: September 2011 | ||
405 | Why: These legacy callbacks should no longer be used as i2c-core offers | ||
406 | a variety of preferable alternative ways to instantiate I2C devices. | ||
407 | Who: Jean Delvare <khali@linux-fr.org> | ||
408 | |||
409 | ---------------------------- | ||
410 | |||
411 | What: Opening a radio device node will no longer automatically switch the | ||
412 | tuner mode from tv to radio. | ||
413 | When: 3.3 | ||
414 | Why: Just opening a V4L device should not change the state of the hardware | ||
415 | like that. It's very unexpected and against the V4L spec. Instead, you | ||
416 | switch to radio mode by calling VIDIOC_S_FREQUENCY. This is the second | ||
417 | and last step of the move to consistent handling of tv and radio tuners. | ||
418 | Who: Hans Verkuil <hans.verkuil@cisco.com> | ||
419 | |||
420 | ---------------------------- | ||
421 | |||
422 | What: CONFIG_CFG80211_WEXT | ||
423 | When: as soon as distributions ship new wireless tools, ie. wpa_supplicant 1.0 | ||
424 | and NetworkManager/connman/etc. that are able to use nl80211 | ||
425 | Why: Wireless extensions are deprecated, and userland tools are moving to | ||
426 | using nl80211. New drivers are no longer using wireless extensions, | ||
427 | and while there might still be old drivers, both new drivers and new | ||
428 | userland no longer needs them and they can't be used for an feature | ||
429 | developed in the past couple of years. As such, compatibility with | ||
430 | wireless extensions in new drivers will be removed. | ||
431 | Who: Johannes Berg <johannes@sipsolutions.net> | ||
432 | |||
433 | ---------------------------- | ||
434 | |||
435 | What: g_file_storage driver | ||
436 | When: 3.8 | ||
437 | Why: This driver has been superseded by g_mass_storage. | ||
438 | Who: Alan Stern <stern@rowland.harvard.edu> | ||
439 | |||
440 | ---------------------------- | ||
441 | |||
442 | What: threeg and interface sysfs files in /sys/devices/platform/acer-wmi | ||
443 | When: 2012 | ||
444 | Why: In 3.0, we can now autodetect internal 3G device and already have | ||
445 | the threeg rfkill device. So, we plan to remove threeg sysfs support | ||
446 | for it's no longer necessary. | ||
447 | |||
448 | We also plan to remove interface sysfs file that exposed which ACPI-WMI | ||
449 | interface that was used by acer-wmi driver. It will replaced by | ||
450 | information log when acer-wmi initial. | ||
451 | Who: Lee, Chun-Yi <jlee@novell.com> | ||
452 | |||
453 | --------------------------- | ||
454 | |||
455 | What: /sys/devices/platform/_UDC_/udc/_UDC_/is_dualspeed file and | ||
456 | is_dualspeed line in /sys/devices/platform/ci13xxx_*/udc/device file. | ||
457 | When: 3.8 | ||
458 | Why: The is_dualspeed file is superseded by maximum_speed in the same | ||
459 | directory and is_dualspeed line in device file is superseded by | ||
460 | max_speed line in the same file. | ||
461 | |||
462 | The maximum_speed/max_speed specifies maximum speed supported by UDC. | ||
463 | To check if dualspeeed is supported, check if the value is >= 3. | ||
464 | Various possible speeds are defined in <linux/usb/ch9.h>. | ||
465 | Who: Michal Nazarewicz <mina86@mina86.com> | ||
466 | |||
467 | ---------------------------- | ||
468 | |||
469 | What: The XFS nodelaylog mount option | ||
470 | When: 3.3 | ||
471 | Why: The delaylog mode that has been the default since 2.6.39 has proven | ||
472 | stable, and the old code is in the way of additional improvements in | ||
473 | the log code. | ||
474 | Who: Christoph Hellwig <hch@lst.de> | ||
475 | |||
476 | ---------------------------- | ||
477 | |||
478 | What: iwlagn alias support | ||
479 | When: 3.5 | ||
480 | Why: The iwlagn module has been renamed iwlwifi. The alias will be around | ||
481 | for backward compatibility for several cycles and then dropped. | ||
482 | Who: Don Fry <donald.h.fry@intel.com> | ||
483 | |||
484 | ---------------------------- | ||
485 | |||
486 | What: pci_scan_bus_parented() | ||
487 | When: 3.5 | ||
488 | Why: The pci_scan_bus_parented() interface creates a new root bus. The | ||
489 | bus is created with default resources (ioport_resource and | ||
490 | iomem_resource) that are always wrong, so we rely on arch code to | ||
491 | correct them later. Callers of pci_scan_bus_parented() should | ||
492 | convert to using pci_scan_root_bus() so they can supply a list of | ||
493 | bus resources when the bus is created. | ||
494 | Who: Bjorn Helgaas <bhelgaas@google.com> | ||
495 | |||
496 | ---------------------------- | ||
497 | |||
498 | What: Low Performance USB Block driver ("CONFIG_BLK_DEV_UB") | ||
499 | When: 3.6 | ||
500 | Why: This driver provides support for USB storage devices like "USB | ||
501 | sticks". As of now, it is deactivated in Debian, Fedora and | ||
502 | Ubuntu. All current users can switch over to usb-storage | ||
503 | (CONFIG_USB_STORAGE) which only drawback is the additional SCSI | ||
504 | stack. | ||
505 | Who: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> | ||
506 | |||
507 | ---------------------------- | ||
508 | |||
509 | What: get_robust_list syscall | ||
510 | When: 2013 | ||
511 | Why: There appear to be no production users of the get_robust_list syscall, | ||
512 | and it runs the risk of leaking address locations, allowing the bypass | ||
513 | of ASLR. It was only ever intended for debugging, so it should be | ||
514 | removed. | ||
515 | Who: Kees Cook <keescook@chromium.org> | ||
516 | |||
517 | ---------------------------- | ||
518 | |||
519 | What: Removing the pn544 raw driver. | ||
520 | When: 3.6 | ||
521 | Why: With the introduction of the NFC HCI and SHDL kernel layers, pn544.c | ||
522 | is being replaced by pn544_hci.c which is accessible through the netlink | ||
523 | and socket NFC APIs. Moreover, pn544.c is outdated and does not seem to | ||
524 | work properly with the latest Android stacks. | ||
525 | Having 2 drivers for the same hardware is confusing and as such we | ||
526 | should only keep the one following the kernel NFC APIs. | ||
527 | Who: Samuel Ortiz <sameo@linux.intel.com> | ||
528 | |||
529 | ---------------------------- | ||
530 | |||
531 | What: setitimer accepts user NULL pointer (value) | ||
532 | When: 3.6 | ||
533 | Why: setitimer is not returning -EFAULT if user pointer is NULL. This | ||
534 | violates the spec. | ||
535 | Who: Sasikantha Babu <sasikanth.v19@gmail.com> | ||
536 | |||
537 | ---------------------------- | ||
538 | |||
539 | What: remove bogus DV presets V4L2_DV_1080I29_97, V4L2_DV_1080I30 and | ||
540 | V4L2_DV_1080I25 | ||
541 | When: 3.6 | ||
542 | Why: These HDTV formats do not exist and were added by a confused mind | ||
543 | (that was me, to be precise...) | ||
544 | Who: Hans Verkuil <hans.verkuil@cisco.com> | ||
545 | |||
546 | ---------------------------- | ||
547 | |||
548 | What: V4L2_CID_HCENTER, V4L2_CID_VCENTER V4L2 controls | ||
549 | When: 3.7 | ||
550 | Why: The V4L2_CID_VCENTER, V4L2_CID_HCENTER controls have been deprecated | ||
551 | for about 4 years and they are not used by any mainline driver. | ||
552 | There are newer controls (V4L2_CID_PAN*, V4L2_CID_TILT*) that provide | ||
553 | similar functionality. | ||
554 | Who: Sylwester Nawrocki <sylvester.nawrocki@gmail.com> | ||
555 | |||
556 | ---------------------------- | ||
557 | |||
558 | What: cgroup option updates via remount | ||
559 | When: March 2013 | ||
560 | Why: Remount currently allows changing bound subsystems and | ||
561 | release_agent. Rebinding is hardly useful as it only works | ||
562 | when the hierarchy is empty and release_agent itself should be | ||
563 | replaced with conventional fsnotify. | ||
564 | |||
565 | ---------------------------- | ||
566 | |||
567 | What: xt_recent rev 0 | ||
568 | When: 2013 | ||
569 | Who: Pablo Neira Ayuso <pablo@netfilter.org> | ||
570 | Files: net/netfilter/xt_recent.c | ||
571 | |||
572 | ---------------------------- | ||
573 | |||
574 | What: KVM debugfs statistics | ||
575 | When: 2013 | ||
576 | Why: KVM tracepoints provide mostly equivalent information in a much more | ||
577 | flexible fashion. | ||
578 | |||
579 | ---------------------------- | ||
580 | |||
581 | What: at91-mci driver ("CONFIG_MMC_AT91") | ||
582 | When: 3.7 | ||
583 | Why: There are two mci drivers: at91-mci and atmel-mci. The PDC support | ||
584 | was added to atmel-mci as a first step to support more chips. | ||
585 | Then at91-mci was kept only for old IP versions (on at91rm9200 and | ||
586 | at91sam9261). The support of these IP versions has just been added | ||
587 | to atmel-mci, so atmel-mci can be used for all chips. | ||
588 | Who: Ludovic Desroches <ludovic.desroches@atmel.com> | ||
589 | |||
590 | ---------------------------- | ||
591 | |||
592 | What: net/wanrouter/ | ||
593 | When: June 2013 | ||
594 | Why: Unsupported/unmaintained/unused since 2.6 | ||
595 | |||
596 | ---------------------------- | ||
597 | |||
598 | What: V4L2 selections API target rectangle and flags unification, the | ||
599 | following definitions will be removed: V4L2_SEL_TGT_CROP_ACTIVE, | ||
600 | V4L2_SEL_TGT_COMPOSE_ACTIVE, V4L2_SUBDEV_SEL_*, V4L2_SUBDEV_SEL_FLAG_* | ||
601 | in favor of common V4L2_SEL_TGT_* and V4L2_SEL_FLAG_* definitions. | ||
602 | For more details see include/linux/v4l2-common.h. | ||
603 | When: 3.8 | ||
604 | Why: The regular V4L2 selections and the subdev selection API originally | ||
605 | defined distinct names for the target rectangles and flags - V4L2_SEL_* | ||
606 | and V4L2_SUBDEV_SEL_*. Although, it turned out that the meaning of these | ||
607 | target rectangles is virtually identical and the APIs were consolidated | ||
608 | to use single set of names - V4L2_SEL_*. This didn't involve any ABI | ||
609 | changes. Alias definitions were created for the original ones to avoid | ||
610 | any instabilities in the user space interface. After few cycles these | ||
611 | backward compatibility definitions will be removed. | ||
612 | Who: Sylwester Nawrocki <sylvester.nawrocki@gmail.com> | ||
613 | |||
614 | ---------------------------- | ||
615 | |||
616 | What: Using V4L2_CAP_VIDEO_CAPTURE and V4L2_CAP_VIDEO_OUTPUT flags | ||
617 | to indicate a V4L2 memory-to-memory device capability | ||
618 | When: 3.8 | ||
619 | Why: New drivers should use new V4L2_CAP_VIDEO_M2M capability flag | ||
620 | to indicate a V4L2 video memory-to-memory (M2M) device and | ||
621 | applications can now identify a M2M video device by checking | ||
622 | for V4L2_CAP_VIDEO_M2M, with VIDIOC_QUERYCAP ioctl. Using ORed | ||
623 | V4L2_CAP_VIDEO_CAPTURE and V4L2_CAP_VIDEO_OUTPUT flags for M2M | ||
624 | devices is ambiguous and may lead, for example, to identifying | ||
625 | a M2M device as a video capture or output device. | ||
626 | Who: Sylwester Nawrocki <s.nawrocki@samsung.com> | ||
627 | |||
628 | ---------------------------- | ||
629 | |||
630 | What: OMAP private DMA implementation | ||
631 | When: 2013 | ||
632 | Why: We have a DMA engine implementation; all users should be updated | ||
633 | to use this rather than persisting with the old APIs. The old APIs | ||
634 | block merging the old DMA engine implementation into the DMA | ||
635 | engine driver. | ||
636 | Who: Russell King <linux@arm.linux.org.uk>, | ||
637 | Santosh Shilimkar <santosh.shilimkar@ti.com> | ||
638 | |||
639 | ---------------------------- | ||
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 0f103e39b4f6..e540a24e5d06 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -114,7 +114,6 @@ prototypes: | |||
114 | int (*drop_inode) (struct inode *); | 114 | int (*drop_inode) (struct inode *); |
115 | void (*evict_inode) (struct inode *); | 115 | void (*evict_inode) (struct inode *); |
116 | void (*put_super) (struct super_block *); | 116 | void (*put_super) (struct super_block *); |
117 | void (*write_super) (struct super_block *); | ||
118 | int (*sync_fs)(struct super_block *sb, int wait); | 117 | int (*sync_fs)(struct super_block *sb, int wait); |
119 | int (*freeze_fs) (struct super_block *); | 118 | int (*freeze_fs) (struct super_block *); |
120 | int (*unfreeze_fs) (struct super_block *); | 119 | int (*unfreeze_fs) (struct super_block *); |
@@ -136,7 +135,6 @@ write_inode: | |||
136 | drop_inode: !!!inode->i_lock!!! | 135 | drop_inode: !!!inode->i_lock!!! |
137 | evict_inode: | 136 | evict_inode: |
138 | put_super: write | 137 | put_super: write |
139 | write_super: read | ||
140 | sync_fs: read | 138 | sync_fs: read |
141 | freeze_fs: write | 139 | freeze_fs: write |
142 | unfreeze_fs: write | 140 | unfreeze_fs: write |
diff --git a/Documentation/filesystems/debugfs.txt b/Documentation/filesystems/debugfs.txt index 7a34f827989c..3a863f692728 100644 --- a/Documentation/filesystems/debugfs.txt +++ b/Documentation/filesystems/debugfs.txt | |||
@@ -15,8 +15,8 @@ Debugfs is typically mounted with a command like: | |||
15 | mount -t debugfs none /sys/kernel/debug | 15 | mount -t debugfs none /sys/kernel/debug |
16 | 16 | ||
17 | (Or an equivalent /etc/fstab line). | 17 | (Or an equivalent /etc/fstab line). |
18 | The debugfs root directory is accessible by anyone by default. To | 18 | The debugfs root directory is accessible only to the root user by |
19 | restrict access to the tree the "uid", "gid" and "mode" mount | 19 | default. To change access to the tree the "uid", "gid" and "mode" mount |
20 | options can be used. | 20 | options can be used. |
21 | 21 | ||
22 | Note that the debugfs API is exported GPL-only to modules. | 22 | Note that the debugfs API is exported GPL-only to modules. |
diff --git a/Documentation/filesystems/jfs.txt b/Documentation/filesystems/jfs.txt index 26ebde77e821..f7433355394a 100644 --- a/Documentation/filesystems/jfs.txt +++ b/Documentation/filesystems/jfs.txt | |||
@@ -3,6 +3,7 @@ IBM's Journaled File System (JFS) for Linux | |||
3 | JFS Homepage: http://jfs.sourceforge.net/ | 3 | JFS Homepage: http://jfs.sourceforge.net/ |
4 | 4 | ||
5 | The following mount options are supported: | 5 | The following mount options are supported: |
6 | (*) == default | ||
6 | 7 | ||
7 | iocharset=name Character set to use for converting from Unicode to | 8 | iocharset=name Character set to use for converting from Unicode to |
8 | ASCII. The default is to do no conversion. Use | 9 | ASCII. The default is to do no conversion. Use |
@@ -21,12 +22,12 @@ nointegrity Do not write to the journal. The primary use of this option | |||
21 | from backup media. The integrity of the volume is not | 22 | from backup media. The integrity of the volume is not |
22 | guaranteed if the system abnormally abends. | 23 | guaranteed if the system abnormally abends. |
23 | 24 | ||
24 | integrity Default. Commit metadata changes to the journal. Use this | 25 | integrity(*) Commit metadata changes to the journal. Use this option to |
25 | option to remount a volume where the nointegrity option was | 26 | remount a volume where the nointegrity option was |
26 | previously specified in order to restore normal behavior. | 27 | previously specified in order to restore normal behavior. |
27 | 28 | ||
28 | errors=continue Keep going on a filesystem error. | 29 | errors=continue Keep going on a filesystem error. |
29 | errors=remount-ro Default. Remount the filesystem read-only on an error. | 30 | errors=remount-ro(*) Remount the filesystem read-only on an error. |
30 | errors=panic Panic and halt the machine if an error occurs. | 31 | errors=panic Panic and halt the machine if an error occurs. |
31 | 32 | ||
32 | uid=value Override on-disk uid with specified value | 33 | uid=value Override on-disk uid with specified value |
@@ -35,7 +36,17 @@ umask=value Override on-disk umask with specified octal value. For | |||
35 | directories, the execute bit will be set if the corresponding | 36 | directories, the execute bit will be set if the corresponding |
36 | read bit is set. | 37 | read bit is set. |
37 | 38 | ||
38 | Please send bugs, comments, cards and letters to shaggy@linux.vnet.ibm.com. | 39 | discard=minlen This enables/disables the use of discard/TRIM commands. |
40 | discard The discard/TRIM commands are sent to the underlying | ||
41 | nodiscard(*) block device when blocks are freed. This is useful for SSD | ||
42 | devices and sparse/thinly-provisioned LUNs. The FITRIM ioctl | ||
43 | command is also available together with the nodiscard option. | ||
44 | The value of minlen specifies the minimum blockcount, when | ||
45 | a TRIM command to the block device is considered usefull. | ||
46 | When no value is given to the discard option, it defaults to | ||
47 | 64 blocks, which means 256KiB in JFS. | ||
48 | The minlen value of discard overrides the minlen value given | ||
49 | on an FITRIM ioctl(). | ||
39 | 50 | ||
40 | The JFS mailing list can be subscribed to by using the link labeled | 51 | The JFS mailing list can be subscribed to by using the link labeled |
41 | "Mail list Subscribe" at our web page http://jfs.sourceforge.net/ | 52 | "Mail list Subscribe" at our web page http://jfs.sourceforge.net/ |
diff --git a/Documentation/filesystems/nfs/nfsroot.txt b/Documentation/filesystems/nfs/nfsroot.txt index ffdd9d866ad7..2d66ed688125 100644 --- a/Documentation/filesystems/nfs/nfsroot.txt +++ b/Documentation/filesystems/nfs/nfsroot.txt | |||
@@ -78,7 +78,8 @@ nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>] | |||
78 | flags = hard, nointr, noposix, cto, ac | 78 | flags = hard, nointr, noposix, cto, ac |
79 | 79 | ||
80 | 80 | ||
81 | ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf> | 81 | ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>: |
82 | <dns0-ip>:<dns1-ip> | ||
82 | 83 | ||
83 | This parameter tells the kernel how to configure IP addresses of devices | 84 | This parameter tells the kernel how to configure IP addresses of devices |
84 | and also how to set up the IP routing table. It was originally called | 85 | and also how to set up the IP routing table. It was originally called |
@@ -158,6 +159,13 @@ ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf> | |||
158 | 159 | ||
159 | Default: any | 160 | Default: any |
160 | 161 | ||
162 | <dns0-ip> IP address of first nameserver. | ||
163 | Value gets exported by /proc/net/pnp which is often linked | ||
164 | on embedded systems by /etc/resolv.conf. | ||
165 | |||
166 | <dns1-ip> IP address of secound nameserver. | ||
167 | Same as above. | ||
168 | |||
161 | 169 | ||
162 | nfsrootdebug | 170 | nfsrootdebug |
163 | 171 | ||
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index 2bef2b3843d1..0742feebc6e2 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting | |||
@@ -94,9 +94,8 @@ protected. | |||
94 | --- | 94 | --- |
95 | [mandatory] | 95 | [mandatory] |
96 | 96 | ||
97 | BKL is also moved from around sb operations. ->write_super() Is now called | 97 | BKL is also moved from around sb operations. BKL should have been shifted into |
98 | without BKL held. BKL should have been shifted into individual fs sb_op | 98 | individual fs sb_op functions. If you don't need it, remove it. |
99 | functions. If you don't need it, remove it. | ||
100 | 99 | ||
101 | --- | 100 | --- |
102 | [informational] | 101 | [informational] |
diff --git a/Documentation/filesystems/vfat.txt b/Documentation/filesystems/vfat.txt index ead764b2728f..de1e6c4dccff 100644 --- a/Documentation/filesystems/vfat.txt +++ b/Documentation/filesystems/vfat.txt | |||
@@ -137,6 +137,17 @@ errors=panic|continue|remount-ro | |||
137 | without doing anything or remount the partition in | 137 | without doing anything or remount the partition in |
138 | read-only mode (default behavior). | 138 | read-only mode (default behavior). |
139 | 139 | ||
140 | discard -- If set, issues discard/TRIM commands to the block | ||
141 | device when blocks are freed. This is useful for SSD devices | ||
142 | and sparse/thinly-provisoned LUNs. | ||
143 | |||
144 | nfs -- This option maintains an index (cache) of directory | ||
145 | inodes by i_logstart which is used by the nfs-related code to | ||
146 | improve look-ups. | ||
147 | |||
148 | Enable this only if you want to export the FAT filesystem | ||
149 | over NFS | ||
150 | |||
140 | <bool>: 0,1,yes,no,true,false | 151 | <bool>: 0,1,yes,no,true,false |
141 | 152 | ||
142 | TODO | 153 | TODO |
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 065aa2dc0835..2ee133e030c3 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -216,7 +216,6 @@ struct super_operations { | |||
216 | void (*drop_inode) (struct inode *); | 216 | void (*drop_inode) (struct inode *); |
217 | void (*delete_inode) (struct inode *); | 217 | void (*delete_inode) (struct inode *); |
218 | void (*put_super) (struct super_block *); | 218 | void (*put_super) (struct super_block *); |
219 | void (*write_super) (struct super_block *); | ||
220 | int (*sync_fs)(struct super_block *sb, int wait); | 219 | int (*sync_fs)(struct super_block *sb, int wait); |
221 | int (*freeze_fs) (struct super_block *); | 220 | int (*freeze_fs) (struct super_block *); |
222 | int (*unfreeze_fs) (struct super_block *); | 221 | int (*unfreeze_fs) (struct super_block *); |
@@ -273,9 +272,6 @@ or bottom half). | |||
273 | put_super: called when the VFS wishes to free the superblock | 272 | put_super: called when the VFS wishes to free the superblock |
274 | (i.e. unmount). This is called with the superblock lock held | 273 | (i.e. unmount). This is called with the superblock lock held |
275 | 274 | ||
276 | write_super: called when the VFS superblock needs to be written to | ||
277 | disc. This method is optional | ||
278 | |||
279 | sync_fs: called when VFS is writing out all dirty data associated with | 275 | sync_fs: called when VFS is writing out all dirty data associated with |
280 | a superblock. The second parameter indicates whether the method | 276 | a superblock. The second parameter indicates whether the method |
281 | should wait until the write out has been completed. Optional. | 277 | should wait until the write out has been completed. Optional. |
diff --git a/Documentation/hid/hid-sensor.txt b/Documentation/hid/hid-sensor.txt new file mode 100755 index 000000000000..948b0989c433 --- /dev/null +++ b/Documentation/hid/hid-sensor.txt | |||
@@ -0,0 +1,140 @@ | |||
1 | |||
2 | HID Sensors Framework | ||
3 | ====================== | ||
4 | HID sensor framework provides necessary interfaces to implement sensor drivers, | ||
5 | which are connected to a sensor hub. The sensor hub is a HID device and it provides | ||
6 | a report descriptor conforming to HID 1.12 sensor usage tables. | ||
7 | |||
8 | Description from the HID 1.12 "HID Sensor Usages" specification: | ||
9 | "Standardization of HID usages for sensors would allow (but not require) sensor | ||
10 | hardware vendors to provide a consistent Plug And Play interface at the USB boundary, | ||
11 | thereby enabling some operating systems to incorporate common device drivers that | ||
12 | could be reused between vendors, alleviating any need for the vendors to provide | ||
13 | the drivers themselves." | ||
14 | |||
15 | This specification describes many usage IDs, which describe the type of sensor | ||
16 | and also the individual data fields. Each sensor can have variable number of | ||
17 | data fields. The length and order is specified in the report descriptor. For | ||
18 | example a part of report descriptor can look like: | ||
19 | |||
20 | INPUT(1)[INPUT] | ||
21 | .. | ||
22 | Field(2) | ||
23 | Physical(0020.0073) | ||
24 | Usage(1) | ||
25 | 0020.045f | ||
26 | Logical Minimum(-32767) | ||
27 | Logical Maximum(32767) | ||
28 | Report Size(8) | ||
29 | Report Count(1) | ||
30 | Report Offset(16) | ||
31 | Flags(Variable Absolute) | ||
32 | .. | ||
33 | .. | ||
34 | |||
35 | The report is indicating "sensor page (0x20)" contains an accelerometer-3D (0x73). | ||
36 | This accelerometer-3D has some fields. Here for example field 2 is motion intensity | ||
37 | (0x045f) with a logical minimum value of -32767 and logical maximum of 32767. The | ||
38 | order of fields and length of each field is important as the input event raw | ||
39 | data will use this format. | ||
40 | |||
41 | |||
42 | Implementation | ||
43 | ================= | ||
44 | |||
45 | This specification defines many different types of sensors with different sets of | ||
46 | data fields. It is difficult to have a common input event to user space applications, | ||
47 | for different sensors. For example an accelerometer can send X,Y and Z data, whereas | ||
48 | an ambient light sensor can send illumination data. | ||
49 | So the implementation has two parts: | ||
50 | - Core hid driver | ||
51 | - Individual sensor processing part (sensor drivers) | ||
52 | |||
53 | Core driver | ||
54 | ----------- | ||
55 | The core driver registers (hid-sensor-hub) registers as a HID driver. It parses | ||
56 | report descriptors and identifies all the sensors present. It adds an MFD device | ||
57 | with name HID-SENSOR-xxxx (where xxxx is usage id from the specification). | ||
58 | For example | ||
59 | HID-SENSOR-200073 is registered for an Accelerometer 3D driver. | ||
60 | So if any driver with this name is inserted, then the probe routine for that | ||
61 | function will be called. So an accelerometer processing driver can register | ||
62 | with this name and will be probed if there is an accelerometer-3D detected. | ||
63 | |||
64 | The core driver provides a set of APIs which can be used by the processing | ||
65 | drivers to register and get events for that usage id. Also it provides parsing | ||
66 | functions, which get and set each input/feature/output report. | ||
67 | |||
68 | Individual sensor processing part (sensor drivers) | ||
69 | ----------- | ||
70 | The processing driver will use an interface provided by the core driver to parse | ||
71 | the report and get the indexes of the fields and also can get events. This driver | ||
72 | can use IIO interface to use the standard ABI defined for a type of sensor. | ||
73 | |||
74 | |||
75 | Core driver Interface | ||
76 | ===================== | ||
77 | |||
78 | Callback structure: | ||
79 | Each processing driver can use this structure to set some callbacks. | ||
80 | int (*suspend)(..): Callback when HID suspend is received | ||
81 | int (*resume)(..): Callback when HID resume is received | ||
82 | int (*capture_sample)(..): Capture a sample for one of its data fields | ||
83 | int (*send_event)(..): One complete event is received which can have | ||
84 | multiple data fields. | ||
85 | |||
86 | Registration functions: | ||
87 | int sensor_hub_register_callback(struct hid_sensor_hub_device *hsdev, | ||
88 | u32 usage_id, | ||
89 | struct hid_sensor_hub_callbacks *usage_callback): | ||
90 | |||
91 | Registers callbacks for an usage id. The callback functions are not allowed | ||
92 | to sleep. | ||
93 | |||
94 | |||
95 | int sensor_hub_remove_callback(struct hid_sensor_hub_device *hsdev, | ||
96 | u32 usage_id): | ||
97 | |||
98 | Removes callbacks for an usage id. | ||
99 | |||
100 | |||
101 | Parsing function: | ||
102 | int sensor_hub_input_get_attribute_info(struct hid_sensor_hub_device *hsdev, | ||
103 | u8 type, | ||
104 | u32 usage_id, u32 attr_usage_id, | ||
105 | struct hid_sensor_hub_attribute_info *info); | ||
106 | |||
107 | A processing driver can look for some field of interest and check if it exists | ||
108 | in a report descriptor. If it exists it will store necessary information | ||
109 | so that fields can be set or get individually. | ||
110 | These indexes avoid searching every time and getting field index to get or set. | ||
111 | |||
112 | |||
113 | Set Feature report | ||
114 | int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id, | ||
115 | u32 field_index, s32 value); | ||
116 | |||
117 | This interface is used to set a value for a field in feature report. For example | ||
118 | if there is a field report_interval, which is parsed by a call to | ||
119 | sensor_hub_input_get_attribute_info before, then it can directly set that individual | ||
120 | field. | ||
121 | |||
122 | |||
123 | int sensor_hub_get_feature(struct hid_sensor_hub_device *hsdev, u32 report_id, | ||
124 | u32 field_index, s32 *value); | ||
125 | |||
126 | This interface is used to get a value for a field in input report. For example | ||
127 | if there is a field report_interval, which is parsed by a call to | ||
128 | sensor_hub_input_get_attribute_info before, then it can directly get that individual | ||
129 | field value. | ||
130 | |||
131 | |||
132 | int sensor_hub_input_attr_get_raw_value(struct hid_sensor_hub_device *hsdev, | ||
133 | u32 usage_id, | ||
134 | u32 attr_usage_id, u32 report_id); | ||
135 | |||
136 | This is used to get a particular field value through input reports. For example | ||
137 | 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 | ||
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. | ||
diff --git a/Documentation/hwmon/adt7410 b/Documentation/hwmon/adt7410 new file mode 100644 index 000000000000..96004000dc2a --- /dev/null +++ b/Documentation/hwmon/adt7410 | |||
@@ -0,0 +1,51 @@ | |||
1 | Kernel driver adt7410 | ||
2 | ===================== | ||
3 | |||
4 | Supported chips: | ||
5 | * Analog Devices ADT7410 | ||
6 | Prefix: 'adt7410' | ||
7 | Addresses scanned: I2C 0x48 - 0x4B | ||
8 | Datasheet: Publicly available at the Analog Devices website | ||
9 | http://www.analog.com/static/imported-files/data_sheets/ADT7410.pdf | ||
10 | |||
11 | Author: Hartmut Knaack <knaack.h@gmx.de> | ||
12 | |||
13 | Description | ||
14 | ----------- | ||
15 | |||
16 | The ADT7410 is a temperature sensor with rated temperature range of -55°C to | ||
17 | +150°C. It has a high accuracy of +/-0.5°C and can be operated at a resolution | ||
18 | of 13 bits (0.0625°C) or 16 bits (0.0078°C). The sensor provides an INT pin to | ||
19 | indicate that a minimum or maximum temperature set point has been exceeded, as | ||
20 | well as a critical temperature (CT) pin to indicate that the critical | ||
21 | temperature set point has been exceeded. Both pins can be set up with a common | ||
22 | hysteresis of 0°C - 15°C and a fault queue, ranging from 1 to 4 events. Both | ||
23 | pins can individually set to be active-low or active-high, while the whole | ||
24 | device can either run in comparator mode or interrupt mode. The ADT7410 | ||
25 | supports continous temperature sampling, as well as sampling one temperature | ||
26 | value per second or even justget one sample on demand for power saving. | ||
27 | Besides, it can completely power down its ADC, if power management is | ||
28 | required. | ||
29 | |||
30 | Configuration Notes | ||
31 | ------------------- | ||
32 | |||
33 | Since the device uses one hysteresis value, which is an offset to minimum, | ||
34 | maximum and critical temperature, it can only be set for temp#_max_hyst. | ||
35 | However, temp#_min_hyst and temp#_crit_hyst show their corresponding | ||
36 | hysteresis. | ||
37 | The device is set to 16 bit resolution and comparator mode. | ||
38 | |||
39 | sysfs-Interface | ||
40 | --------------- | ||
41 | |||
42 | temp#_input - temperature input | ||
43 | temp#_min - temperature minimum setpoint | ||
44 | temp#_max - temperature maximum setpoint | ||
45 | temp#_crit - critical temperature setpoint | ||
46 | temp#_min_hyst - hysteresis for temperature minimum (read-only) | ||
47 | temp#_max_hyst - hysteresis for temperature maximum (read/write) | ||
48 | temp#_crit_hyst - hysteresis for critical temperature (read-only) | ||
49 | temp#_min_alarm - temperature minimum alarm flag | ||
50 | temp#_max_alarm - temperature maximum alarm flag | ||
51 | temp#_crit_alarm - critical temperature alarm flag | ||
diff --git a/Documentation/hwmon/ina2xx b/Documentation/hwmon/ina2xx index f50a6cc27616..03444f9d833f 100644 --- a/Documentation/hwmon/ina2xx +++ b/Documentation/hwmon/ina2xx | |||
@@ -8,12 +8,24 @@ Supported chips: | |||
8 | Datasheet: Publicly available at the Texas Instruments website | 8 | Datasheet: Publicly available at the Texas Instruments website |
9 | http://www.ti.com/ | 9 | http://www.ti.com/ |
10 | 10 | ||
11 | * Texas Instruments INA220 | ||
12 | Prefix: 'ina220' | ||
13 | Addresses: I2C 0x40 - 0x4f | ||
14 | Datasheet: Publicly available at the Texas Instruments website | ||
15 | http://www.ti.com/ | ||
16 | |||
11 | * Texas Instruments INA226 | 17 | * Texas Instruments INA226 |
12 | Prefix: 'ina226' | 18 | Prefix: 'ina226' |
13 | Addresses: I2C 0x40 - 0x4f | 19 | Addresses: I2C 0x40 - 0x4f |
14 | Datasheet: Publicly available at the Texas Instruments website | 20 | Datasheet: Publicly available at the Texas Instruments website |
15 | http://www.ti.com/ | 21 | http://www.ti.com/ |
16 | 22 | ||
23 | * Texas Instruments INA230 | ||
24 | Prefix: 'ina230' | ||
25 | Addresses: I2C 0x40 - 0x4f | ||
26 | Datasheet: Publicly available at the Texas Instruments website | ||
27 | http://www.ti.com/ | ||
28 | |||
17 | Author: Lothar Felten <l-felten@ti.com> | 29 | Author: Lothar Felten <l-felten@ti.com> |
18 | 30 | ||
19 | Description | 31 | Description |
@@ -23,7 +35,13 @@ The INA219 is a high-side current shunt and power monitor with an I2C | |||
23 | interface. The INA219 monitors both shunt drop and supply voltage, with | 35 | interface. The INA219 monitors both shunt drop and supply voltage, with |
24 | programmable conversion times and filtering. | 36 | programmable conversion times and filtering. |
25 | 37 | ||
38 | The INA220 is a high or low side current shunt and power monitor with an I2C | ||
39 | interface. The INA220 monitors both shunt drop and supply voltage. | ||
40 | |||
26 | The INA226 is a current shunt and power monitor with an I2C interface. | 41 | The INA226 is a current shunt and power monitor with an I2C interface. |
27 | The INA226 monitors both a shunt voltage drop and bus supply voltage. | 42 | The INA226 monitors both a shunt voltage drop and bus supply voltage. |
28 | 43 | ||
44 | The INA230 is a high or low side current shunt and power monitor with an I2C | ||
45 | interface. The INA230 monitors both a shunt voltage drop and bus supply voltage. | ||
46 | |||
29 | The shunt value in micro-ohms can be set via platform data. | 47 | The shunt value in micro-ohms can be set via platform data. |
diff --git a/Documentation/hwmon/lm70 b/Documentation/hwmon/lm70 index 0d240291e3cc..86d182942c51 100644 --- a/Documentation/hwmon/lm70 +++ b/Documentation/hwmon/lm70 | |||
@@ -6,6 +6,10 @@ Supported chips: | |||
6 | Datasheet: http://www.national.com/pf/LM/LM70.html | 6 | Datasheet: http://www.national.com/pf/LM/LM70.html |
7 | * Texas Instruments TMP121/TMP123 | 7 | * Texas Instruments TMP121/TMP123 |
8 | Information: http://focus.ti.com/docs/prod/folders/print/tmp121.html | 8 | Information: http://focus.ti.com/docs/prod/folders/print/tmp121.html |
9 | * National Semiconductor LM71 | ||
10 | Datasheet: http://www.ti.com/product/LM71 | ||
11 | * National Semiconductor LM74 | ||
12 | Datasheet: http://www.ti.com/product/LM74 | ||
9 | 13 | ||
10 | Author: | 14 | Author: |
11 | Kaiwan N Billimoria <kaiwan@designergraphix.com> | 15 | Kaiwan N Billimoria <kaiwan@designergraphix.com> |
@@ -31,9 +35,11 @@ As a real (in-tree) example of this "SPI protocol driver" interfacing | |||
31 | with a "SPI master controller driver", see drivers/spi/spi_lm70llp.c | 35 | with a "SPI master controller driver", see drivers/spi/spi_lm70llp.c |
32 | and its associated documentation. | 36 | and its associated documentation. |
33 | 37 | ||
34 | The TMP121/TMP123 are very similar; main differences are 4 wire SPI inter- | 38 | The LM74 and TMP121/TMP123 are very similar; main difference is 13-bit |
35 | face (read only) and 13-bit temperature data (0.0625 degrees celsius reso- | 39 | temperature data (0.0625 degrees celsius resolution). |
36 | lution). | 40 | |
41 | The LM71 is also very similar; main difference is 14-bit temperature | ||
42 | data (0.03125 degrees celsius resolution). | ||
37 | 43 | ||
38 | Thanks to | 44 | Thanks to |
39 | --------- | 45 | --------- |
diff --git a/Documentation/hwmon/max197 b/Documentation/hwmon/max197 new file mode 100644 index 000000000000..8d89b9009df8 --- /dev/null +++ b/Documentation/hwmon/max197 | |||
@@ -0,0 +1,60 @@ | |||
1 | Maxim MAX197 driver | ||
2 | =================== | ||
3 | |||
4 | Author: | ||
5 | * Vivien Didelot <vivien.didelot@savoirfairelinux.com> | ||
6 | |||
7 | Supported chips: | ||
8 | * Maxim MAX197 | ||
9 | Prefix: 'max197' | ||
10 | Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX197.pdf | ||
11 | |||
12 | * Maxim MAX199 | ||
13 | Prefix: 'max199' | ||
14 | Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX199.pdf | ||
15 | |||
16 | Description | ||
17 | ----------- | ||
18 | |||
19 | The A/D converters MAX197, and MAX199 are both 8-Channel, Multi-Range, 5V, | ||
20 | 12-Bit DAS with 8+4 Bus Interface and Fault Protection. | ||
21 | |||
22 | The available ranges for the MAX197 are {0,-5V} to 5V, and {0,-10V} to 10V, | ||
23 | while they are {0,-2V} to 2V, and {0,-4V} to 4V on the MAX199. | ||
24 | |||
25 | Platform data | ||
26 | ------------- | ||
27 | |||
28 | The MAX197 platform data (defined in linux/platform_data/max197.h) should be | ||
29 | filled with a pointer to a conversion function, defined like: | ||
30 | |||
31 | int convert(u8 ctrl); | ||
32 | |||
33 | ctrl is the control byte to write to start a new conversion. | ||
34 | On success, the function must return the 12-bit raw value read from the chip, | ||
35 | or a negative error code otherwise. | ||
36 | |||
37 | Control byte format: | ||
38 | |||
39 | Bit Name Description | ||
40 | 7,6 PD1,PD0 Clock and Power-Down modes | ||
41 | 5 ACQMOD Internal or External Controlled Acquisition | ||
42 | 4 RNG Full-scale voltage magnitude at the input | ||
43 | 3 BIP Unipolar or Bipolar conversion mode | ||
44 | 2,1,0 A2,A1,A0 Channel | ||
45 | |||
46 | Sysfs interface | ||
47 | --------------- | ||
48 | |||
49 | * in[0-7]_input: The conversion value for the corresponding channel. | ||
50 | RO | ||
51 | |||
52 | * in[0-7]_min: The lower limit (in mV) for the corresponding channel. | ||
53 | For the MAX197, it will be adjusted to -10000, -5000, or 0. | ||
54 | For the MAX199, it will be adjusted to -4000, -2000, or 0. | ||
55 | RW | ||
56 | |||
57 | * in[0-7]_max: The higher limit (in mV) for the corresponding channel. | ||
58 | For the MAX197, it will be adjusted to 0, 5000, or 10000. | ||
59 | For the MAX199, it will be adjusted to 0, 2000, or 4000. | ||
60 | RW | ||
diff --git a/Documentation/hwmon/mcp3021 b/Documentation/hwmon/mcp3021 index 325fd87e81b2..74a6b72adf5f 100644 --- a/Documentation/hwmon/mcp3021 +++ b/Documentation/hwmon/mcp3021 | |||
@@ -5,18 +5,25 @@ Supported chips: | |||
5 | * Microchip Technology MCP3021 | 5 | * Microchip Technology MCP3021 |
6 | Prefix: 'mcp3021' | 6 | Prefix: 'mcp3021' |
7 | Datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/21805a.pdf | 7 | Datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/21805a.pdf |
8 | * Microchip Technology MCP3221 | ||
9 | Prefix: 'mcp3221' | ||
10 | Datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/21732c.pdf | ||
8 | 11 | ||
9 | Author: Mingkai Hu | 12 | Authors: |
13 | Mingkai Hu | ||
14 | Sven Schuchmann <schuchmann@schleissheimer.de> | ||
10 | 15 | ||
11 | Description | 16 | Description |
12 | ----------- | 17 | ----------- |
13 | 18 | ||
14 | This driver implements support for the Microchip Technology MCP3021 chip. | 19 | This driver implements support for the Microchip Technology MCP3021 and |
20 | MCP3221 chip. | ||
15 | 21 | ||
16 | The Microchip Technology Inc. MCP3021 is a successive approximation A/D | 22 | The Microchip Technology Inc. MCP3021 is a successive approximation A/D |
17 | converter (ADC) with 10-bit resolution. | 23 | converter (ADC) with 10-bit resolution. The MCP3221 has 12-bit resolution. |
18 | This device provides one single-ended input with very low power consumption. | 24 | |
19 | Communication to the MCP3021 is performed using a 2-wire I2C compatible | 25 | These devices provide one single-ended input with very low power consumption. |
20 | interface. Standard (100 kHz) and Fast (400 kHz) I2C modes are available. | 26 | Communication to the MCP3021/MCP3221 is performed using a 2-wire I2C |
21 | The default I2C device address is 0x4d (contact the Microchip factory for | 27 | compatible interface. Standard (100 kHz) and Fast (400 kHz) I2C modes are |
22 | additional address options). | 28 | available. The default I2C device address is 0x4d (contact the Microchip |
29 | factory for additional address options). | ||
diff --git a/Documentation/i2c/busses/i2c-i801 b/Documentation/i2c/busses/i2c-i801 index 615142da4ef6..157416e78cc4 100644 --- a/Documentation/i2c/busses/i2c-i801 +++ b/Documentation/i2c/busses/i2c-i801 | |||
@@ -21,6 +21,7 @@ Supported adapters: | |||
21 | * Intel DH89xxCC (PCH) | 21 | * Intel DH89xxCC (PCH) |
22 | * Intel Panther Point (PCH) | 22 | * Intel Panther Point (PCH) |
23 | * Intel Lynx Point (PCH) | 23 | * Intel Lynx Point (PCH) |
24 | * Intel Lynx Point-LP (PCH) | ||
24 | Datasheets: Publicly available at the Intel website | 25 | Datasheets: Publicly available at the Intel website |
25 | 26 | ||
26 | On Intel Patsburg and later chipsets, both the normal host SMBus controller | 27 | On Intel Patsburg and later chipsets, both the normal host SMBus controller |
diff --git a/Documentation/ia64/aliasing-test.c b/Documentation/ia64/aliasing-test.c index 5caa2af33207..62a190d45f38 100644 --- a/Documentation/ia64/aliasing-test.c +++ b/Documentation/ia64/aliasing-test.c | |||
@@ -132,6 +132,7 @@ static int read_rom(char *path) | |||
132 | 132 | ||
133 | rc = write(fd, "1", 2); | 133 | rc = write(fd, "1", 2); |
134 | if (rc <= 0) { | 134 | if (rc <= 0) { |
135 | close(fd); | ||
135 | perror("write"); | 136 | perror("write"); |
136 | return -1; | 137 | return -1; |
137 | } | 138 | } |
diff --git a/Documentation/infiniband/ipoib.txt b/Documentation/infiniband/ipoib.txt index 64eeb55d0c09..f2cfe265e836 100644 --- a/Documentation/infiniband/ipoib.txt +++ b/Documentation/infiniband/ipoib.txt | |||
@@ -24,6 +24,9 @@ Partitions and P_Keys | |||
24 | The P_Key for any interface is given by the "pkey" file, and the | 24 | The P_Key for any interface is given by the "pkey" file, and the |
25 | main interface for a subinterface is in "parent." | 25 | main interface for a subinterface is in "parent." |
26 | 26 | ||
27 | Child interface create/delete can also be done using IPoIB's | ||
28 | rtnl_link_ops, where childs created using either way behave the same. | ||
29 | |||
27 | Datagram vs Connected modes | 30 | Datagram vs Connected modes |
28 | 31 | ||
29 | The IPoIB driver supports two modes of operation: datagram and | 32 | The IPoIB driver supports two modes of operation: datagram and |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index ad7e2e5088c1..f777fa96243d 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -1051,6 +1051,14 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1051 | ihash_entries= [KNL] | 1051 | ihash_entries= [KNL] |
1052 | Set number of hash buckets for inode cache. | 1052 | Set number of hash buckets for inode cache. |
1053 | 1053 | ||
1054 | ima_appraise= [IMA] appraise integrity measurements | ||
1055 | Format: { "off" | "enforce" | "fix" } | ||
1056 | default: "enforce" | ||
1057 | |||
1058 | ima_appraise_tcb [IMA] | ||
1059 | The builtin appraise policy appraises all files | ||
1060 | owned by uid=0. | ||
1061 | |||
1054 | ima_audit= [IMA] | 1062 | ima_audit= [IMA] |
1055 | Format: { "0" | "1" } | 1063 | Format: { "0" | "1" } |
1056 | 0 -- integrity auditing messages. (Default) | 1064 | 0 -- integrity auditing messages. (Default) |
@@ -1350,6 +1358,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1350 | * nohrst, nosrst, norst: suppress hard, soft | 1358 | * nohrst, nosrst, norst: suppress hard, soft |
1351 | and both resets. | 1359 | and both resets. |
1352 | 1360 | ||
1361 | * rstonce: only attempt one reset during | ||
1362 | hot-unplug link recovery | ||
1363 | |||
1353 | * dump_id: dump IDENTIFY data. | 1364 | * dump_id: dump IDENTIFY data. |
1354 | 1365 | ||
1355 | If there are multiple matching configurations changing | 1366 | If there are multiple matching configurations changing |
@@ -1812,8 +1823,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1812 | noexec=on: enable non-executable mappings (default) | 1823 | noexec=on: enable non-executable mappings (default) |
1813 | noexec=off: disable non-executable mappings | 1824 | noexec=off: disable non-executable mappings |
1814 | 1825 | ||
1826 | nosmap [X86] | ||
1827 | Disable SMAP (Supervisor Mode Access Prevention) | ||
1828 | even if it is supported by processor. | ||
1829 | |||
1815 | nosmep [X86] | 1830 | nosmep [X86] |
1816 | Disable SMEP (Supervisor Mode Execution Protection) | 1831 | Disable SMEP (Supervisor Mode Execution Prevention) |
1817 | even if it is supported by processor. | 1832 | even if it is supported by processor. |
1818 | 1833 | ||
1819 | noexec32 [X86-64] | 1834 | noexec32 [X86-64] |
@@ -1833,6 +1848,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1833 | and restore using xsave. The kernel will fallback to | 1848 | and restore using xsave. The kernel will fallback to |
1834 | enabling legacy floating-point and sse state. | 1849 | enabling legacy floating-point and sse state. |
1835 | 1850 | ||
1851 | eagerfpu= [X86] | ||
1852 | on enable eager fpu restore | ||
1853 | off disable eager fpu restore | ||
1854 | auto selects the default scheme, which automatically | ||
1855 | enables eagerfpu restore for xsaveopt. | ||
1856 | |||
1836 | nohlt [BUGS=ARM,SH] Tells the kernel that the sleep(SH) or | 1857 | nohlt [BUGS=ARM,SH] Tells the kernel that the sleep(SH) or |
1837 | wfi(ARM) instruction doesn't work correctly and not to | 1858 | wfi(ARM) instruction doesn't work correctly and not to |
1838 | use it. This is also useful when using JTAG debugger. | 1859 | use it. This is also useful when using JTAG debugger. |
@@ -2385,6 +2406,17 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2385 | rcutree.rcu_cpu_stall_timeout= [KNL,BOOT] | 2406 | rcutree.rcu_cpu_stall_timeout= [KNL,BOOT] |
2386 | Set timeout for RCU CPU stall warning messages. | 2407 | Set timeout for RCU CPU stall warning messages. |
2387 | 2408 | ||
2409 | rcutree.jiffies_till_first_fqs= [KNL,BOOT] | ||
2410 | Set delay from grace-period initialization to | ||
2411 | first attempt to force quiescent states. | ||
2412 | Units are jiffies, minimum value is zero, | ||
2413 | and maximum value is HZ. | ||
2414 | |||
2415 | rcutree.jiffies_till_next_fqs= [KNL,BOOT] | ||
2416 | Set delay between subsequent attempts to force | ||
2417 | quiescent states. Units are jiffies, minimum | ||
2418 | value is one, and maximum value is HZ. | ||
2419 | |||
2388 | rcutorture.fqs_duration= [KNL,BOOT] | 2420 | rcutorture.fqs_duration= [KNL,BOOT] |
2389 | Set duration of force_quiescent_state bursts. | 2421 | Set duration of force_quiescent_state bursts. |
2390 | 2422 | ||
@@ -2638,9 +2670,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2638 | smart2= [HW] | 2670 | smart2= [HW] |
2639 | Format: <io1>[,<io2>[,...,<io8>]] | 2671 | Format: <io1>[,<io2>[,...,<io8>]] |
2640 | 2672 | ||
2641 | smp-alt-once [X86-32,SMP] On a hotplug CPU system, only | ||
2642 | attempt to substitute SMP alternatives once at boot. | ||
2643 | |||
2644 | smsc-ircc2.nopnp [HW] Don't use PNP to discover SMC devices | 2673 | smsc-ircc2.nopnp [HW] Don't use PNP to discover SMC devices |
2645 | smsc-ircc2.ircc_cfg= [HW] Device configuration I/O port | 2674 | smsc-ircc2.ircc_cfg= [HW] Device configuration I/O port |
2646 | smsc-ircc2.ircc_sir= [HW] SIR base I/O port | 2675 | smsc-ircc2.ircc_sir= [HW] SIR base I/O port |
diff --git a/Documentation/kobject.txt b/Documentation/kobject.txt index 49578cf1aea5..c5182bb2c16c 100644 --- a/Documentation/kobject.txt +++ b/Documentation/kobject.txt | |||
@@ -284,9 +284,11 @@ instead, it is associated with the ktype. So let us introduce struct | |||
284 | kobj_type: | 284 | kobj_type: |
285 | 285 | ||
286 | struct kobj_type { | 286 | struct kobj_type { |
287 | void (*release)(struct kobject *); | 287 | void (*release)(struct kobject *kobj); |
288 | const struct sysfs_ops *sysfs_ops; | 288 | const struct sysfs_ops *sysfs_ops; |
289 | struct attribute **default_attrs; | 289 | struct attribute **default_attrs; |
290 | const struct kobj_ns_type_operations *(*child_ns_type)(struct kobject *kobj); | ||
291 | const void *(*namespace)(struct kobject *kobj); | ||
290 | }; | 292 | }; |
291 | 293 | ||
292 | This structure is used to describe a particular type of kobject (or, more | 294 | This structure is used to describe a particular type of kobject (or, more |
diff --git a/Documentation/laptops/laptop-mode.txt b/Documentation/laptops/laptop-mode.txt index 0bf25eebce94..4ebbfc3f1c6e 100644 --- a/Documentation/laptops/laptop-mode.txt +++ b/Documentation/laptops/laptop-mode.txt | |||
@@ -262,9 +262,9 @@ MINIMUM_BATTERY_MINUTES=10 | |||
262 | 262 | ||
263 | # | 263 | # |
264 | # Allowed dirty background ratio, in percent. Once DIRTY_RATIO has been | 264 | # Allowed dirty background ratio, in percent. Once DIRTY_RATIO has been |
265 | # exceeded, the kernel will wake pdflush which will then reduce the amount | 265 | # exceeded, the kernel will wake flusher threads which will then reduce the |
266 | # of dirty memory to dirty_background_ratio. Set this nice and low, so once | 266 | # amount of dirty memory to dirty_background_ratio. Set this nice and low, |
267 | # some writeout has commenced, we do a lot of it. | 267 | # so once some writeout has commenced, we do a lot of it. |
268 | # | 268 | # |
269 | #DIRTY_BACKGROUND_RATIO=5 | 269 | #DIRTY_BACKGROUND_RATIO=5 |
270 | 270 | ||
@@ -384,9 +384,9 @@ CPU_MAXFREQ=${CPU_MAXFREQ:-'slowest'} | |||
384 | 384 | ||
385 | # | 385 | # |
386 | # Allowed dirty background ratio, in percent. Once DIRTY_RATIO has been | 386 | # Allowed dirty background ratio, in percent. Once DIRTY_RATIO has been |
387 | # exceeded, the kernel will wake pdflush which will then reduce the amount | 387 | # exceeded, the kernel will wake flusher threads which will then reduce the |
388 | # of dirty memory to dirty_background_ratio. Set this nice and low, so once | 388 | # amount of dirty memory to dirty_background_ratio. Set this nice and low, |
389 | # some writeout has commenced, we do a lot of it. | 389 | # so once some writeout has commenced, we do a lot of it. |
390 | # | 390 | # |
391 | DIRTY_BACKGROUND_RATIO=${DIRTY_BACKGROUND_RATIO:-'5'} | 391 | DIRTY_BACKGROUND_RATIO=${DIRTY_BACKGROUND_RATIO:-'5'} |
392 | 392 | ||
diff --git a/Documentation/misc-devices/lis3lv02d b/Documentation/misc-devices/lis3lv02d index f1a4ec840f86..af815b9ba413 100644 --- a/Documentation/misc-devices/lis3lv02d +++ b/Documentation/misc-devices/lis3lv02d | |||
@@ -4,7 +4,8 @@ Kernel driver lis3lv02d | |||
4 | Supported chips: | 4 | Supported chips: |
5 | 5 | ||
6 | * STMicroelectronics LIS3LV02DL, LIS3LV02DQ (12 bits precision) | 6 | * STMicroelectronics LIS3LV02DL, LIS3LV02DQ (12 bits precision) |
7 | * STMicroelectronics LIS302DL, LIS3L02DQ, LIS331DL (8 bits) | 7 | * STMicroelectronics LIS302DL, LIS3L02DQ, LIS331DL (8 bits) and |
8 | LIS331DLH (16 bits) | ||
8 | 9 | ||
9 | Authors: | 10 | Authors: |
10 | Yan Burman <burman.yan@gmail.com> | 11 | Yan Burman <burman.yan@gmail.com> |
diff --git a/Documentation/networking/batman-adv.txt b/Documentation/networking/batman-adv.txt index 8f3ae4a6147e..a173d2a879f5 100644 --- a/Documentation/networking/batman-adv.txt +++ b/Documentation/networking/batman-adv.txt | |||
@@ -75,9 +75,10 @@ folder: | |||
75 | 75 | ||
76 | There is a special folder for debugging information: | 76 | There is a special folder for debugging information: |
77 | 77 | ||
78 | # ls /sys/kernel/debug/batman_adv/bat0/ | 78 | # ls /sys/kernel/debug/batman_adv/bat0/ |
79 | # bla_claim_table log socket transtable_local | 79 | # bla_backbone_table log transtable_global |
80 | # gateways originators transtable_global vis_data | 80 | # bla_claim_table originators transtable_local |
81 | # gateways socket vis_data | ||
81 | 82 | ||
82 | Some of the files contain all sort of status information regard- | 83 | Some of the files contain all sort of status information regard- |
83 | ing the mesh network. For example, you can view the table of | 84 | ing the mesh network. For example, you can view the table of |
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt index 6b1c7110534e..10a015c384b8 100644 --- a/Documentation/networking/bonding.txt +++ b/Documentation/networking/bonding.txt | |||
@@ -752,12 +752,22 @@ xmit_hash_policy | |||
752 | protocol information to generate the hash. | 752 | protocol information to generate the hash. |
753 | 753 | ||
754 | Uses XOR of hardware MAC addresses and IP addresses to | 754 | Uses XOR of hardware MAC addresses and IP addresses to |
755 | generate the hash. The formula is | 755 | generate the hash. The IPv4 formula is |
756 | 756 | ||
757 | (((source IP XOR dest IP) AND 0xffff) XOR | 757 | (((source IP XOR dest IP) AND 0xffff) XOR |
758 | ( source MAC XOR destination MAC )) | 758 | ( source MAC XOR destination MAC )) |
759 | modulo slave count | 759 | modulo slave count |
760 | 760 | ||
761 | The IPv6 formula is | ||
762 | |||
763 | hash = (source ip quad 2 XOR dest IP quad 2) XOR | ||
764 | (source ip quad 3 XOR dest IP quad 3) XOR | ||
765 | (source ip quad 4 XOR dest IP quad 4) | ||
766 | |||
767 | (((hash >> 24) XOR (hash >> 16) XOR (hash >> 8) XOR hash) | ||
768 | XOR (source MAC XOR destination MAC)) | ||
769 | modulo slave count | ||
770 | |||
761 | This algorithm will place all traffic to a particular | 771 | This algorithm will place all traffic to a particular |
762 | network peer on the same slave. For non-IP traffic, | 772 | network peer on the same slave. For non-IP traffic, |
763 | the formula is the same as for the layer2 transmit | 773 | the formula is the same as for the layer2 transmit |
@@ -778,19 +788,29 @@ xmit_hash_policy | |||
778 | slaves, although a single connection will not span | 788 | slaves, although a single connection will not span |
779 | multiple slaves. | 789 | multiple slaves. |
780 | 790 | ||
781 | The formula for unfragmented TCP and UDP packets is | 791 | The formula for unfragmented IPv4 TCP and UDP packets is |
782 | 792 | ||
783 | ((source port XOR dest port) XOR | 793 | ((source port XOR dest port) XOR |
784 | ((source IP XOR dest IP) AND 0xffff) | 794 | ((source IP XOR dest IP) AND 0xffff) |
785 | modulo slave count | 795 | modulo slave count |
786 | 796 | ||
787 | For fragmented TCP or UDP packets and all other IP | 797 | The formula for unfragmented IPv6 TCP and UDP packets is |
788 | protocol traffic, the source and destination port | 798 | |
799 | hash = (source port XOR dest port) XOR | ||
800 | ((source ip quad 2 XOR dest IP quad 2) XOR | ||
801 | (source ip quad 3 XOR dest IP quad 3) XOR | ||
802 | (source ip quad 4 XOR dest IP quad 4)) | ||
803 | |||
804 | ((hash >> 24) XOR (hash >> 16) XOR (hash >> 8) XOR hash) | ||
805 | modulo slave count | ||
806 | |||
807 | For fragmented TCP or UDP packets and all other IPv4 and | ||
808 | IPv6 protocol traffic, the source and destination port | ||
789 | information is omitted. For non-IP traffic, the | 809 | information is omitted. For non-IP traffic, the |
790 | formula is the same as for the layer2 transmit hash | 810 | formula is the same as for the layer2 transmit hash |
791 | policy. | 811 | policy. |
792 | 812 | ||
793 | This policy is intended to mimic the behavior of | 813 | The IPv4 policy is intended to mimic the behavior of |
794 | certain switches, notably Cisco switches with PFC2 as | 814 | certain switches, notably Cisco switches with PFC2 as |
795 | well as some Foundry and IBM products. | 815 | well as some Foundry and IBM products. |
796 | 816 | ||
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index ca447b35b833..c7fc10724948 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -439,7 +439,9 @@ tcp_stdurg - BOOLEAN | |||
439 | tcp_synack_retries - INTEGER | 439 | tcp_synack_retries - INTEGER |
440 | Number of times SYNACKs for a passive TCP connection attempt will | 440 | Number of times SYNACKs for a passive TCP connection attempt will |
441 | be retransmitted. Should not be higher than 255. Default value | 441 | be retransmitted. Should not be higher than 255. Default value |
442 | is 5, which corresponds to ~180seconds. | 442 | is 5, which corresponds to 31seconds till the last retransmission |
443 | with the current initial RTO of 1second. With this the final timeout | ||
444 | for a passive TCP connection will happen after 63seconds. | ||
443 | 445 | ||
444 | tcp_syncookies - BOOLEAN | 446 | tcp_syncookies - BOOLEAN |
445 | Only valid when the kernel was compiled with CONFIG_SYNCOOKIES | 447 | Only valid when the kernel was compiled with CONFIG_SYNCOOKIES |
@@ -465,20 +467,37 @@ tcp_syncookies - BOOLEAN | |||
465 | tcp_fastopen - INTEGER | 467 | tcp_fastopen - INTEGER |
466 | Enable TCP Fast Open feature (draft-ietf-tcpm-fastopen) to send data | 468 | Enable TCP Fast Open feature (draft-ietf-tcpm-fastopen) to send data |
467 | in the opening SYN packet. To use this feature, the client application | 469 | in the opening SYN packet. To use this feature, the client application |
468 | must not use connect(). Instead, it should use sendmsg() or sendto() | 470 | must use sendmsg() or sendto() with MSG_FASTOPEN flag rather than |
469 | with MSG_FASTOPEN flag which performs a TCP handshake automatically. | 471 | connect() to perform a TCP handshake automatically. |
470 | 472 | ||
471 | The values (bitmap) are: | 473 | The values (bitmap) are |
472 | 1: Enables sending data in the opening SYN on the client | 474 | 1: Enables sending data in the opening SYN on the client. |
473 | 5: Enables sending data in the opening SYN on the client regardless | 475 | 2: Enables TCP Fast Open on the server side, i.e., allowing data in |
474 | of cookie availability. | 476 | a SYN packet to be accepted and passed to the application before |
477 | 3-way hand shake finishes. | ||
478 | 4: Send data in the opening SYN regardless of cookie availability and | ||
479 | without a cookie option. | ||
480 | 0x100: Accept SYN data w/o validating the cookie. | ||
481 | 0x200: Accept data-in-SYN w/o any cookie option present. | ||
482 | 0x400/0x800: Enable Fast Open on all listeners regardless of the | ||
483 | TCP_FASTOPEN socket option. The two different flags designate two | ||
484 | different ways of setting max_qlen without the TCP_FASTOPEN socket | ||
485 | option. | ||
475 | 486 | ||
476 | Default: 0 | 487 | Default: 0 |
477 | 488 | ||
489 | Note that the client & server side Fast Open flags (1 and 2 | ||
490 | respectively) must be also enabled before the rest of flags can take | ||
491 | effect. | ||
492 | |||
493 | See include/net/tcp.h and the code for more details. | ||
494 | |||
478 | tcp_syn_retries - INTEGER | 495 | tcp_syn_retries - INTEGER |
479 | Number of times initial SYNs for an active TCP connection attempt | 496 | Number of times initial SYNs for an active TCP connection attempt |
480 | will be retransmitted. Should not be higher than 255. Default value | 497 | will be retransmitted. Should not be higher than 255. Default value |
481 | is 5, which corresponds to ~180seconds. | 498 | is 6, which corresponds to 63seconds till the last restransmission |
499 | with the current initial RTO of 1second. With this the final timeout | ||
500 | for an active TCP connection attempt will happen after 127seconds. | ||
482 | 501 | ||
483 | tcp_timestamps - BOOLEAN | 502 | tcp_timestamps - BOOLEAN |
484 | Enable timestamps as defined in RFC1323. | 503 | Enable timestamps as defined in RFC1323. |
diff --git a/Documentation/networking/netconsole.txt b/Documentation/networking/netconsole.txt index 8d022073e3ef..2e9e0ae2cd45 100644 --- a/Documentation/networking/netconsole.txt +++ b/Documentation/networking/netconsole.txt | |||
@@ -51,8 +51,23 @@ Built-in netconsole starts immediately after the TCP stack is | |||
51 | initialized and attempts to bring up the supplied dev at the supplied | 51 | initialized and attempts to bring up the supplied dev at the supplied |
52 | address. | 52 | address. |
53 | 53 | ||
54 | The remote host can run either 'netcat -u -l -p <port>', | 54 | The remote host has several options to receive the kernel messages, |
55 | 'nc -l -u <port>' or syslogd. | 55 | for example: |
56 | |||
57 | 1) syslogd | ||
58 | |||
59 | 2) netcat | ||
60 | |||
61 | On distributions using a BSD-based netcat version (e.g. Fedora, | ||
62 | openSUSE and Ubuntu) the listening port must be specified without | ||
63 | the -p switch: | ||
64 | |||
65 | 'nc -u -l -p <port>' / 'nc -u -l <port>' or | ||
66 | 'netcat -u -l -p <port>' / 'netcat -u -l <port>' | ||
67 | |||
68 | 3) socat | ||
69 | |||
70 | 'socat udp-recv:<port> -' | ||
56 | 71 | ||
57 | Dynamic reconfiguration: | 72 | Dynamic reconfiguration: |
58 | ======================== | 73 | ======================== |
diff --git a/Documentation/networking/stmmac.txt b/Documentation/networking/stmmac.txt index c676b9cedbd0..ef9ee71b4d7f 100644 --- a/Documentation/networking/stmmac.txt +++ b/Documentation/networking/stmmac.txt | |||
@@ -173,7 +173,6 @@ Where: | |||
173 | For MDIO bus The we have: | 173 | For MDIO bus The we have: |
174 | 174 | ||
175 | struct stmmac_mdio_bus_data { | 175 | struct stmmac_mdio_bus_data { |
176 | int bus_id; | ||
177 | int (*phy_reset)(void *priv); | 176 | int (*phy_reset)(void *priv); |
178 | unsigned int phy_mask; | 177 | unsigned int phy_mask; |
179 | int *irqs; | 178 | int *irqs; |
@@ -181,7 +180,6 @@ For MDIO bus The we have: | |||
181 | }; | 180 | }; |
182 | 181 | ||
183 | Where: | 182 | Where: |
184 | o bus_id: bus identifier; | ||
185 | o phy_reset: hook to reset the phy device attached to the bus. | 183 | o phy_reset: hook to reset the phy device attached to the bus. |
186 | o phy_mask: phy mask passed when register the MDIO bus within the driver. | 184 | o phy_mask: phy mask passed when register the MDIO bus within the driver. |
187 | o irqs: list of IRQs, one per PHY. | 185 | o irqs: list of IRQs, one per PHY. |
@@ -230,9 +228,6 @@ there are two MAC cores: one MAC is for MDIO Bus/PHY emulation | |||
230 | with fixed_link support. | 228 | with fixed_link support. |
231 | 229 | ||
232 | static struct stmmac_mdio_bus_data stmmac1_mdio_bus = { | 230 | static struct stmmac_mdio_bus_data stmmac1_mdio_bus = { |
233 | .bus_id = 1, | ||
234 | | | ||
235 | |-> phy device on the bus_id 1 | ||
236 | .phy_reset = phy_reset; | 231 | .phy_reset = phy_reset; |
237 | | | 232 | | |
238 | |-> function to provide the phy_reset on this board | 233 | |-> function to provide the phy_reset on this board |
diff --git a/Documentation/networking/vxlan.txt b/Documentation/networking/vxlan.txt new file mode 100644 index 000000000000..5b34b762d7d5 --- /dev/null +++ b/Documentation/networking/vxlan.txt | |||
@@ -0,0 +1,47 @@ | |||
1 | Virtual eXtensible Local Area Networking documentation | ||
2 | ====================================================== | ||
3 | |||
4 | The VXLAN protocol is a tunnelling protocol that is designed to | ||
5 | solve the problem of limited number of available VLAN's (4096). | ||
6 | With VXLAN identifier is expanded to 24 bits. | ||
7 | |||
8 | It is a draft RFC standard, that is implemented by Cisco Nexus, | ||
9 | Vmware and Brocade. The protocol runs over UDP using a single | ||
10 | destination port (still not standardized by IANA). | ||
11 | This document describes the Linux kernel tunnel device, | ||
12 | there is also an implantation of VXLAN for Openvswitch. | ||
13 | |||
14 | Unlike most tunnels, a VXLAN is a 1 to N network, not just point | ||
15 | to point. A VXLAN device can either dynamically learn the IP address | ||
16 | of the other end, in a manner similar to a learning bridge, or the | ||
17 | forwarding entries can be configured statically. | ||
18 | |||
19 | The management of vxlan is done in a similar fashion to it's | ||
20 | too closest neighbors GRE and VLAN. Configuring VXLAN requires | ||
21 | the version of iproute2 that matches the kernel release | ||
22 | where VXLAN was first merged upstream. | ||
23 | |||
24 | 1. Create vxlan device | ||
25 | # ip li add vxlan0 type vxlan id 42 group 239.1.1.1 dev eth1 | ||
26 | |||
27 | This creates a new device (vxlan0). The device uses the | ||
28 | the multicast group 239.1.1.1 over eth1 to handle packets where | ||
29 | no entry is in the forwarding table. | ||
30 | |||
31 | 2. Delete vxlan device | ||
32 | # ip link delete vxlan0 | ||
33 | |||
34 | 3. Show vxlan info | ||
35 | # ip -d show vxlan0 | ||
36 | |||
37 | It is possible to create, destroy and display the vxlan | ||
38 | forwarding table using the new bridge command. | ||
39 | |||
40 | 1. Create forwarding table entry | ||
41 | # bridge fdb add to 00:17:42:8a:b4:05 dst 192.19.0.2 dev vxlan0 | ||
42 | |||
43 | 2. Delete forwarding table entry | ||
44 | # bridge fdb delete 00:17:42:8a:b4:05 | ||
45 | |||
46 | 3. Show forwarding table | ||
47 | # bridge fdb show dev vxlan0 | ||
diff --git a/Documentation/pinctrl.txt b/Documentation/pinctrl.txt index e40f4b4e1977..3b4ee5328868 100644 --- a/Documentation/pinctrl.txt +++ b/Documentation/pinctrl.txt | |||
@@ -289,6 +289,11 @@ Interaction with the GPIO subsystem | |||
289 | The GPIO drivers may want to perform operations of various types on the same | 289 | The GPIO drivers may want to perform operations of various types on the same |
290 | physical pins that are also registered as pin controller pins. | 290 | physical pins that are also registered as pin controller pins. |
291 | 291 | ||
292 | First and foremost, the two subsystems can be used as completely orthogonal, | ||
293 | see the section named "pin control requests from drivers" and | ||
294 | "drivers needing both pin control and GPIOs" below for details. But in some | ||
295 | situations a cross-subsystem mapping between pins and GPIOs is needed. | ||
296 | |||
292 | Since the pin controller subsystem have its pinspace local to the pin | 297 | Since the pin controller subsystem have its pinspace local to the pin |
293 | controller we need a mapping so that the pin control subsystem can figure out | 298 | controller we need a mapping so that the pin control subsystem can figure out |
294 | which pin controller handles control of a certain GPIO pin. Since a single | 299 | which pin controller handles control of a certain GPIO pin. Since a single |
@@ -359,6 +364,7 @@ will get an pin number into its handled number range. Further it is also passed | |||
359 | the range ID value, so that the pin controller knows which range it should | 364 | the range ID value, so that the pin controller knows which range it should |
360 | deal with. | 365 | deal with. |
361 | 366 | ||
367 | |||
362 | PINMUX interfaces | 368 | PINMUX interfaces |
363 | ================= | 369 | ================= |
364 | 370 | ||
@@ -840,9 +846,9 @@ static unsigned long i2c_pin_configs[] = { | |||
840 | 846 | ||
841 | static struct pinctrl_map __initdata mapping[] = { | 847 | static struct pinctrl_map __initdata mapping[] = { |
842 | PIN_MAP_MUX_GROUP("foo-i2c.0", PINCTRL_STATE_DEFAULT, "pinctrl-foo", "i2c0", "i2c0"), | 848 | PIN_MAP_MUX_GROUP("foo-i2c.0", PINCTRL_STATE_DEFAULT, "pinctrl-foo", "i2c0", "i2c0"), |
843 | PIN_MAP_MUX_CONFIGS_GROUP("foo-i2c.0", PINCTRL_STATE_DEFAULT, "pinctrl-foo", "i2c0", i2c_grp_configs), | 849 | PIN_MAP_CONFIGS_GROUP("foo-i2c.0", PINCTRL_STATE_DEFAULT, "pinctrl-foo", "i2c0", i2c_grp_configs), |
844 | PIN_MAP_MUX_CONFIGS_PIN("foo-i2c.0", PINCTRL_STATE_DEFAULT, "pinctrl-foo", "i2c0scl", i2c_pin_configs), | 850 | PIN_MAP_CONFIGS_PIN("foo-i2c.0", PINCTRL_STATE_DEFAULT, "pinctrl-foo", "i2c0scl", i2c_pin_configs), |
845 | PIN_MAP_MUX_CONFIGS_PIN("foo-i2c.0", PINCTRL_STATE_DEFAULT, "pinctrl-foo", "i2c0sda", i2c_pin_configs), | 851 | PIN_MAP_CONFIGS_PIN("foo-i2c.0", PINCTRL_STATE_DEFAULT, "pinctrl-foo", "i2c0sda", i2c_pin_configs), |
846 | }; | 852 | }; |
847 | 853 | ||
848 | Finally, some devices expect the mapping table to contain certain specific | 854 | Finally, some devices expect the mapping table to contain certain specific |
@@ -960,8 +966,8 @@ all get selected, and they all get enabled and disable simultaneously by the | |||
960 | pinmux core. | 966 | pinmux core. |
961 | 967 | ||
962 | 968 | ||
963 | Pinmux requests from drivers | 969 | Pin control requests from drivers |
964 | ============================ | 970 | ================================= |
965 | 971 | ||
966 | Generally it is discouraged to let individual drivers get and enable pin | 972 | Generally it is discouraged to let individual drivers get and enable pin |
967 | control. So if possible, handle the pin control in platform code or some other | 973 | control. So if possible, handle the pin control in platform code or some other |
@@ -969,6 +975,11 @@ place where you have access to all the affected struct device * pointers. In | |||
969 | some cases where a driver needs to e.g. switch between different mux mappings | 975 | some cases where a driver needs to e.g. switch between different mux mappings |
970 | at runtime this is not possible. | 976 | at runtime this is not possible. |
971 | 977 | ||
978 | A typical case is if a driver needs to switch bias of pins from normal | ||
979 | operation and going to sleep, moving from the PINCTRL_STATE_DEFAULT to | ||
980 | PINCTRL_STATE_SLEEP at runtime, re-biasing or even re-muxing pins to save | ||
981 | current in sleep mode. | ||
982 | |||
972 | A driver may request a certain control state to be activated, usually just the | 983 | A driver may request a certain control state to be activated, usually just the |
973 | default state like this: | 984 | default state like this: |
974 | 985 | ||
@@ -1058,6 +1069,51 @@ registered. Thus make sure that the error path in your driver gracefully | |||
1058 | cleans up and is ready to retry the probing later in the startup process. | 1069 | cleans up and is ready to retry the probing later in the startup process. |
1059 | 1070 | ||
1060 | 1071 | ||
1072 | Drivers needing both pin control and GPIOs | ||
1073 | ========================================== | ||
1074 | |||
1075 | Again, it is discouraged to let drivers lookup and select pin control states | ||
1076 | themselves, but again sometimes this is unavoidable. | ||
1077 | |||
1078 | So say that your driver is fetching its resources like this: | ||
1079 | |||
1080 | #include <linux/pinctrl/consumer.h> | ||
1081 | #include <linux/gpio.h> | ||
1082 | |||
1083 | struct pinctrl *pinctrl; | ||
1084 | int gpio; | ||
1085 | |||
1086 | pinctrl = devm_pinctrl_get_select_default(&dev); | ||
1087 | gpio = devm_gpio_request(&dev, 14, "foo"); | ||
1088 | |||
1089 | Here we first request a certain pin state and then request GPIO 14 to be | ||
1090 | used. If you're using the subsystems orthogonally like this, you should | ||
1091 | nominally always get your pinctrl handle and select the desired pinctrl | ||
1092 | state BEFORE requesting the GPIO. This is a semantic convention to avoid | ||
1093 | situations that can be electrically unpleasant, you will certainly want to | ||
1094 | mux in and bias pins in a certain way before the GPIO subsystems starts to | ||
1095 | deal with them. | ||
1096 | |||
1097 | The above can be hidden: using pinctrl hogs, the pin control driver may be | ||
1098 | setting up the config and muxing for the pins when it is probing, | ||
1099 | nevertheless orthogonal to the GPIO subsystem. | ||
1100 | |||
1101 | But there are also situations where it makes sense for the GPIO subsystem | ||
1102 | to communicate directly with with the pinctrl subsystem, using the latter | ||
1103 | as a back-end. This is when the GPIO driver may call out to the functions | ||
1104 | described in the section "Pin control interaction with the GPIO subsystem" | ||
1105 | above. This only involves per-pin multiplexing, and will be completely | ||
1106 | hidden behind the gpio_*() function namespace. In this case, the driver | ||
1107 | need not interact with the pin control subsystem at all. | ||
1108 | |||
1109 | If a pin control driver and a GPIO driver is dealing with the same pins | ||
1110 | and the use cases involve multiplexing, you MUST implement the pin controller | ||
1111 | as a back-end for the GPIO driver like this, unless your hardware design | ||
1112 | is such that the GPIO controller can override the pin controller's | ||
1113 | multiplexing state through hardware without the need to interact with the | ||
1114 | pin control system. | ||
1115 | |||
1116 | |||
1061 | System pin control hogging | 1117 | System pin control hogging |
1062 | ========================== | 1118 | ========================== |
1063 | 1119 | ||
diff --git a/Documentation/power/swsusp.txt b/Documentation/power/swsusp.txt index 92341b84250d..0b4b63e7e9b6 100644 --- a/Documentation/power/swsusp.txt +++ b/Documentation/power/swsusp.txt | |||
@@ -53,7 +53,7 @@ before suspend (it is limited to 500 MB by default). | |||
53 | 53 | ||
54 | Article about goals and implementation of Software Suspend for Linux | 54 | Article about goals and implementation of Software Suspend for Linux |
55 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 55 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
56 | Author: Gábor Kuti | 56 | Author: Gábor Kuti |
57 | Last revised: 2003-10-20 by Pavel Machek | 57 | Last revised: 2003-10-20 by Pavel Machek |
58 | 58 | ||
59 | Idea and goals to achieve | 59 | Idea and goals to achieve |
diff --git a/Documentation/scheduler/sched-arch.txt b/Documentation/scheduler/sched-arch.txt index 28aa1075e291..b1b8587b86f0 100644 --- a/Documentation/scheduler/sched-arch.txt +++ b/Documentation/scheduler/sched-arch.txt | |||
@@ -17,16 +17,6 @@ you must `#define __ARCH_WANT_UNLOCKED_CTXSW` in a header file | |||
17 | Unlocked context switches introduce only a very minor performance | 17 | Unlocked context switches introduce only a very minor performance |
18 | penalty to the core scheduler implementation in the CONFIG_SMP case. | 18 | penalty to the core scheduler implementation in the CONFIG_SMP case. |
19 | 19 | ||
20 | 2. Interrupt status | ||
21 | By default, the switch_to arch function is called with interrupts | ||
22 | disabled. Interrupts may be enabled over the call if it is likely to | ||
23 | introduce a significant interrupt latency by adding the line | ||
24 | `#define __ARCH_WANT_INTERRUPTS_ON_CTXSW` in the same place as for | ||
25 | unlocked context switches. This define also implies | ||
26 | `__ARCH_WANT_UNLOCKED_CTXSW`. See arch/arm/include/asm/system.h for an | ||
27 | example. | ||
28 | |||
29 | |||
30 | CPU idle | 20 | CPU idle |
31 | ======== | 21 | ======== |
32 | Your cpu_idle routines need to obey the following rules: | 22 | Your cpu_idle routines need to obey the following rules: |
diff --git a/Documentation/scsi/ChangeLog.megaraid_sas b/Documentation/scsi/ChangeLog.megaraid_sas index 80441ab608e4..3a3079411a3d 100644 --- a/Documentation/scsi/ChangeLog.megaraid_sas +++ b/Documentation/scsi/ChangeLog.megaraid_sas | |||
@@ -1,3 +1,13 @@ | |||
1 | Release Date : Tue. Jun 17, 2012 17:00:00 PST 2012 - | ||
2 | (emaild-id:megaraidlinux@lsi.com) | ||
3 | Adam Radford/Kashyap Desai | ||
4 | Current Version : 00.00.06.18-rc1 | ||
5 | Old Version : 00.00.06.15-rc1 | ||
6 | 1. Fix Copyright dates. | ||
7 | 2. Add throttlequeuedepth module parameter. | ||
8 | 3. Add resetwaittime module parameter. | ||
9 | 4. Move poll_aen_lock initializer. | ||
10 | ------------------------------------------------------------------------------- | ||
1 | Release Date : Mon. Mar 19, 2012 17:00:00 PST 2012 - | 11 | Release Date : Mon. Mar 19, 2012 17:00:00 PST 2012 - |
2 | (emaild-id:megaraidlinux@lsi.com) | 12 | (emaild-id:megaraidlinux@lsi.com) |
3 | Adam Radford | 13 | Adam Radford |
diff --git a/Documentation/scsi/LICENSE.qla2xxx b/Documentation/scsi/LICENSE.qla2xxx index ce0fdf349a81..27a91cf43d6d 100644 --- a/Documentation/scsi/LICENSE.qla2xxx +++ b/Documentation/scsi/LICENSE.qla2xxx | |||
@@ -1,4 +1,4 @@ | |||
1 | Copyright (c) 2003-2011 QLogic Corporation | 1 | Copyright (c) 2003-2012 QLogic Corporation |
2 | QLogic Linux FC-FCoE Driver | 2 | QLogic Linux FC-FCoE Driver |
3 | 3 | ||
4 | This program includes a device driver for Linux 3.x. | 4 | This program includes a device driver for Linux 3.x. |
diff --git a/Documentation/scsi/LICENSE.qla4xxx b/Documentation/scsi/LICENSE.qla4xxx index ab899591ecb7..78c169f0d7c6 100644 --- a/Documentation/scsi/LICENSE.qla4xxx +++ b/Documentation/scsi/LICENSE.qla4xxx | |||
@@ -1,4 +1,4 @@ | |||
1 | Copyright (c) 2003-2011 QLogic Corporation | 1 | Copyright (c) 2003-2012 QLogic Corporation |
2 | QLogic Linux iSCSI Driver | 2 | QLogic Linux iSCSI Driver |
3 | 3 | ||
4 | This program includes a device driver for Linux 3.x. | 4 | This program includes a device driver for Linux 3.x. |
diff --git a/Documentation/scsi/st.txt b/Documentation/scsi/st.txt index 685bf3582abe..f346abbdd6ff 100644 --- a/Documentation/scsi/st.txt +++ b/Documentation/scsi/st.txt | |||
@@ -112,10 +112,8 @@ attempted). | |||
112 | 112 | ||
113 | MINOR NUMBERS | 113 | MINOR NUMBERS |
114 | 114 | ||
115 | The tape driver currently supports 128 drives by default. This number | 115 | The tape driver currently supports up to 2^17 drives if 4 modes for |
116 | can be increased by editing st.h and recompiling the driver if | 116 | each drive are used. |
117 | necessary. The upper limit is 2^17 drives if 4 modes for each drive | ||
118 | are used. | ||
119 | 117 | ||
120 | The minor numbers consist of the following bit fields: | 118 | The minor numbers consist of the following bit fields: |
121 | 119 | ||
diff --git a/Documentation/security/Smack.txt b/Documentation/security/Smack.txt index a416479b8a1c..8a177e4b6e21 100644 --- a/Documentation/security/Smack.txt +++ b/Documentation/security/Smack.txt | |||
@@ -28,12 +28,11 @@ Smack kernels use the CIPSO IP option. Some network | |||
28 | configurations are intolerant of IP options and can impede | 28 | configurations are intolerant of IP options and can impede |
29 | access to systems that use them as Smack does. | 29 | access to systems that use them as Smack does. |
30 | 30 | ||
31 | The current git repositories for Smack user space are: | 31 | The current git repository for Smack user space is: |
32 | 32 | ||
33 | git@gitorious.org:meego-platform-security/smackutil.git | 33 | git://github.com/smack-team/smack.git |
34 | git@gitorious.org:meego-platform-security/libsmack.git | ||
35 | 34 | ||
36 | These should make and install on most modern distributions. | 35 | This should make and install on most modern distributions. |
37 | There are three commands included in smackutil: | 36 | There are three commands included in smackutil: |
38 | 37 | ||
39 | smackload - properly formats data for writing to /smack/load | 38 | smackload - properly formats data for writing to /smack/load |
@@ -194,6 +193,9 @@ onlycap | |||
194 | these capabilities are effective at for processes with any | 193 | these capabilities are effective at for processes with any |
195 | label. The value is set by writing the desired label to the | 194 | label. The value is set by writing the desired label to the |
196 | file or cleared by writing "-" to the file. | 195 | file or cleared by writing "-" to the file. |
196 | revoke-subject | ||
197 | Writing a Smack label here sets the access to '-' for all access | ||
198 | rules with that subject label. | ||
197 | 199 | ||
198 | You can add access rules in /etc/smack/accesses. They take the form: | 200 | You can add access rules in /etc/smack/accesses. They take the form: |
199 | 201 | ||
diff --git a/Documentation/security/Yama.txt b/Documentation/security/Yama.txt index e369de2d48cd..dd908cf64ecf 100644 --- a/Documentation/security/Yama.txt +++ b/Documentation/security/Yama.txt | |||
@@ -46,14 +46,13 @@ restrictions, it can call prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY, ...) | |||
46 | so that any otherwise allowed process (even those in external pid namespaces) | 46 | so that any otherwise allowed process (even those in external pid namespaces) |
47 | may attach. | 47 | may attach. |
48 | 48 | ||
49 | These restrictions do not change how ptrace via PTRACE_TRACEME operates. | 49 | The sysctl settings (writable only with CAP_SYS_PTRACE) are: |
50 | |||
51 | The sysctl settings are: | ||
52 | 50 | ||
53 | 0 - classic ptrace permissions: a process can PTRACE_ATTACH to any other | 51 | 0 - classic ptrace permissions: a process can PTRACE_ATTACH to any other |
54 | process running under the same uid, as long as it is dumpable (i.e. | 52 | process running under the same uid, as long as it is dumpable (i.e. |
55 | did not transition uids, start privileged, or have called | 53 | did not transition uids, start privileged, or have called |
56 | prctl(PR_SET_DUMPABLE...) already). | 54 | prctl(PR_SET_DUMPABLE...) already). Similarly, PTRACE_TRACEME is |
55 | unchanged. | ||
57 | 56 | ||
58 | 1 - restricted ptrace: a process must have a predefined relationship | 57 | 1 - restricted ptrace: a process must have a predefined relationship |
59 | with the inferior it wants to call PTRACE_ATTACH on. By default, | 58 | with the inferior it wants to call PTRACE_ATTACH on. By default, |
@@ -61,12 +60,13 @@ The sysctl settings are: | |||
61 | classic criteria is also met. To change the relationship, an | 60 | classic criteria is also met. To change the relationship, an |
62 | inferior can call prctl(PR_SET_PTRACER, debugger, ...) to declare | 61 | inferior can call prctl(PR_SET_PTRACER, debugger, ...) to declare |
63 | an allowed debugger PID to call PTRACE_ATTACH on the inferior. | 62 | an allowed debugger PID to call PTRACE_ATTACH on the inferior. |
63 | Using PTRACE_TRACEME is unchanged. | ||
64 | 64 | ||
65 | 2 - admin-only attach: only processes with CAP_SYS_PTRACE may use ptrace | 65 | 2 - admin-only attach: only processes with CAP_SYS_PTRACE may use ptrace |
66 | with PTRACE_ATTACH. | 66 | with PTRACE_ATTACH, or through children calling PTRACE_TRACEME. |
67 | 67 | ||
68 | 3 - no attach: no processes may use ptrace with PTRACE_ATTACH. Once set, | 68 | 3 - no attach: no processes may use ptrace with PTRACE_ATTACH nor via |
69 | this sysctl cannot be changed to a lower value. | 69 | PTRACE_TRACEME. Once set, this sysctl value cannot be changed. |
70 | 70 | ||
71 | The original children-only logic was based on the restrictions in grsecurity. | 71 | The original children-only logic was based on the restrictions in grsecurity. |
72 | 72 | ||
diff --git a/Documentation/serial/00-INDEX b/Documentation/serial/00-INDEX index e09468ad3cb1..f7b0c7dc25ef 100644 --- a/Documentation/serial/00-INDEX +++ b/Documentation/serial/00-INDEX | |||
@@ -2,8 +2,6 @@ | |||
2 | - this file. | 2 | - this file. |
3 | README.cycladesZ | 3 | README.cycladesZ |
4 | - info on Cyclades-Z firmware loading. | 4 | - info on Cyclades-Z firmware loading. |
5 | computone.txt | ||
6 | - info on Computone Intelliport II/Plus Multiport Serial Driver. | ||
7 | digiepca.txt | 5 | digiepca.txt |
8 | - info on Digi Intl. {PC,PCI,EISA}Xx and Xem series cards. | 6 | - info on Digi Intl. {PC,PCI,EISA}Xx and Xem series cards. |
9 | hayes-esp.txt | 7 | hayes-esp.txt |
diff --git a/Documentation/serial/computone.txt b/Documentation/serial/computone.txt deleted file mode 100644 index a6a1158ea2ba..000000000000 --- a/Documentation/serial/computone.txt +++ /dev/null | |||
@@ -1,520 +0,0 @@ | |||
1 | NOTE: This is an unmaintained driver. It is not guaranteed to work due to | ||
2 | changes made in the tty layer in 2.6. If you wish to take over maintenance of | ||
3 | this driver, contact Michael Warfield <mhw@wittsend.com>. | ||
4 | |||
5 | Changelog: | ||
6 | ---------- | ||
7 | 11-01-2001: Original Document | ||
8 | |||
9 | 10-29-2004: Minor misspelling & format fix, update status of driver. | ||
10 | James Nelson <james4765@gmail.com> | ||
11 | |||
12 | Computone Intelliport II/Plus Multiport Serial Driver | ||
13 | ----------------------------------------------------- | ||
14 | |||
15 | Release Notes For Linux Kernel 2.2 and higher. | ||
16 | These notes are for the drivers which have already been integrated into the | ||
17 | kernel and have been tested on Linux kernels 2.0, 2.2, 2.3, and 2.4. | ||
18 | |||
19 | Version: 1.2.14 | ||
20 | Date: 11/01/2001 | ||
21 | Historical Author: Andrew Manison <amanison@america.net> | ||
22 | Primary Author: Doug McNash | ||
23 | |||
24 | This file assumes that you are using the Computone drivers which are | ||
25 | integrated into the kernel sources. For updating the drivers or installing | ||
26 | drivers into kernels which do not already have Computone drivers, please | ||
27 | refer to the instructions in the README.computone file in the driver patch. | ||
28 | |||
29 | |||
30 | 1. INTRODUCTION | ||
31 | |||
32 | This driver supports the entire family of Intelliport II/Plus controllers | ||
33 | with the exception of the MicroChannel controllers. It does not support | ||
34 | products previous to the Intelliport II. | ||
35 | |||
36 | This driver was developed on the v2.0.x Linux tree and has been tested up | ||
37 | to v2.4.14; it will probably not work with earlier v1.X kernels,. | ||
38 | |||
39 | |||
40 | 2. QUICK INSTALLATION | ||
41 | |||
42 | Hardware - If you have an ISA card, find a free interrupt and io port. | ||
43 | List those in use with `cat /proc/interrupts` and | ||
44 | `cat /proc/ioports`. Set the card dip switches to a free | ||
45 | address. You may need to configure your BIOS to reserve an | ||
46 | irq for an ISA card. PCI and EISA parameters are set | ||
47 | automagically. Insert card into computer with the power off | ||
48 | before or after drivers installation. | ||
49 | |||
50 | Note the hardware address from the Computone ISA cards installed into | ||
51 | the system. These are required for editing ip2.c or editing | ||
52 | /etc/modprobe.d/*.conf, or for specification on the modprobe | ||
53 | command line. | ||
54 | |||
55 | Note that the /etc/modules.conf should be used for older (pre-2.6) | ||
56 | kernels. | ||
57 | |||
58 | Software - | ||
59 | |||
60 | Module installation: | ||
61 | |||
62 | a) Determine free irq/address to use if any (configure BIOS if need be) | ||
63 | b) Run "make config" or "make menuconfig" or "make xconfig" | ||
64 | Select (m) module for CONFIG_COMPUTONE under character | ||
65 | devices. CONFIG_PCI and CONFIG_MODULES also may need to be set. | ||
66 | c) Set address on ISA cards then: | ||
67 | edit /usr/src/linux/drivers/char/ip2.c if needed | ||
68 | or | ||
69 | edit config file in /etc/modprobe.d/ if needed (module). | ||
70 | or both to match this setting. | ||
71 | d) Run "make modules" | ||
72 | e) Run "make modules_install" | ||
73 | f) Run "/sbin/depmod -a" | ||
74 | g) install driver using `modprobe ip2 <options>` (options listed below) | ||
75 | h) run ip2mkdev (either the script below or the binary version) | ||
76 | |||
77 | |||
78 | Kernel installation: | ||
79 | |||
80 | a) Determine free irq/address to use if any (configure BIOS if need be) | ||
81 | b) Run "make config" or "make menuconfig" or "make xconfig" | ||
82 | Select (y) kernel for CONFIG_COMPUTONE under character | ||
83 | devices. CONFIG_PCI may need to be set if you have PCI bus. | ||
84 | c) Set address on ISA cards then: | ||
85 | edit /usr/src/linux/drivers/char/ip2.c | ||
86 | (Optional - may be specified on kernel command line now) | ||
87 | d) Run "make zImage" or whatever target you prefer. | ||
88 | e) mv /usr/src/linux/arch/x86/boot/zImage to /boot. | ||
89 | f) Add new config for this kernel into /etc/lilo.conf, run "lilo" | ||
90 | or copy to a floppy disk and boot from that floppy disk. | ||
91 | g) Reboot using this kernel | ||
92 | h) run ip2mkdev (either the script below or the binary version) | ||
93 | |||
94 | Kernel command line options: | ||
95 | |||
96 | When compiling the driver into the kernel, io and irq may be | ||
97 | compiled into the driver by editing ip2.c and setting the values for | ||
98 | io and irq in the appropriate array. An alternative is to specify | ||
99 | a command line parameter to the kernel at boot up. | ||
100 | |||
101 | ip2=io0,irq0,io1,irq1,io2,irq2,io3,irq3 | ||
102 | |||
103 | Note that this order is very different from the specifications for the | ||
104 | modload parameters which have separate IRQ and IO specifiers. | ||
105 | |||
106 | The io port also selects PCI (1) and EISA (2) boards. | ||
107 | |||
108 | io=0 No board | ||
109 | io=1 PCI board | ||
110 | io=2 EISA board | ||
111 | else ISA board io address | ||
112 | |||
113 | You only need to specify the boards which are present. | ||
114 | |||
115 | Examples: | ||
116 | |||
117 | 2 PCI boards: | ||
118 | |||
119 | ip2=1,0,1,0 | ||
120 | |||
121 | 1 ISA board at 0x310 irq 5: | ||
122 | |||
123 | ip2=0x310,5 | ||
124 | |||
125 | This can be added to and "append" option in lilo.conf similar to this: | ||
126 | |||
127 | append="ip2=1,0,1,0" | ||
128 | |||
129 | |||
130 | 3. INSTALLATION | ||
131 | |||
132 | Previously, the driver sources were packaged with a set of patch files | ||
133 | to update the character drivers' makefile and configuration file, and other | ||
134 | kernel source files. A build script (ip2build) was included which applies | ||
135 | the patches if needed, and build any utilities needed. | ||
136 | What you receive may be a single patch file in conventional kernel | ||
137 | patch format build script. That form can also be applied by | ||
138 | running patch -p1 < ThePatchFile. Otherwise run ip2build. | ||
139 | |||
140 | The driver can be installed as a module (recommended) or built into the | ||
141 | kernel. This is selected as for other drivers through the `make config` | ||
142 | command from the root of the Linux source tree. If the driver is built | ||
143 | into the kernel you will need to edit the file ip2.c to match the boards | ||
144 | you are installing. See that file for instructions. If the driver is | ||
145 | installed as a module the configuration can also be specified on the | ||
146 | modprobe command line as follows: | ||
147 | |||
148 | modprobe ip2 irq=irq1,irq2,irq3,irq4 io=addr1,addr2,addr3,addr4 | ||
149 | |||
150 | where irqnum is one of the valid Intelliport II interrupts (3,4,5,7,10,11, | ||
151 | 12,15) and addr1-4 are the base addresses for up to four controllers. If | ||
152 | the irqs are not specified the driver uses the default in ip2.c (which | ||
153 | selects polled mode). If no base addresses are specified the defaults in | ||
154 | ip2.c are used. If you are autoloading the driver module with kerneld or | ||
155 | kmod the base addresses and interrupt number must also be set in ip2.c | ||
156 | and recompile or just insert and options line in /etc/modprobe.d/*.conf or both. | ||
157 | The options line is equivalent to the command line and takes precedence over | ||
158 | what is in ip2.c. | ||
159 | |||
160 | config sample to put /etc/modprobe.d/*.conf: | ||
161 | options ip2 io=1,0x328 irq=1,10 | ||
162 | alias char-major-71 ip2 | ||
163 | alias char-major-72 ip2 | ||
164 | alias char-major-73 ip2 | ||
165 | |||
166 | The equivalent in ip2.c: | ||
167 | |||
168 | static int io[IP2_MAX_BOARDS]= { 1, 0x328, 0, 0 }; | ||
169 | static int irq[IP2_MAX_BOARDS] = { 1, 10, -1, -1 }; | ||
170 | |||
171 | The equivalent for the kernel command line (in lilo.conf): | ||
172 | |||
173 | append="ip2=1,1,0x328,10" | ||
174 | |||
175 | |||
176 | Note: Both io and irq should be updated to reflect YOUR system. An "io" | ||
177 | address of 1 or 2 indicates a PCI or EISA card in the board table. | ||
178 | The PCI or EISA irq will be assigned automatically. | ||
179 | |||
180 | Specifying an invalid or in-use irq will default the driver into | ||
181 | running in polled mode for that card. If all irq entries are 0 then | ||
182 | all cards will operate in polled mode. | ||
183 | |||
184 | If you select the driver as part of the kernel run : | ||
185 | |||
186 | make zlilo (or whatever you do to create a bootable kernel) | ||
187 | |||
188 | If you selected a module run : | ||
189 | |||
190 | make modules && make modules_install | ||
191 | |||
192 | The utility ip2mkdev (see 5 and 7 below) creates all the device nodes | ||
193 | required by the driver. For a device to be created it must be configured | ||
194 | in the driver and the board must be installed. Only devices corresponding | ||
195 | to real IntelliPort II ports are created. With multiple boards and expansion | ||
196 | boxes this will leave gaps in the sequence of device names. ip2mkdev uses | ||
197 | Linux tty naming conventions: ttyF0 - ttyF255 for normal devices, and | ||
198 | cuf0 - cuf255 for callout devices. | ||
199 | |||
200 | |||
201 | 4. USING THE DRIVERS | ||
202 | |||
203 | As noted above, the driver implements the ports in accordance with Linux | ||
204 | conventions, and the devices should be interchangeable with the standard | ||
205 | serial devices. (This is a key point for problem reporting: please make | ||
206 | sure that what you are trying do works on the ttySx/cuax ports first; then | ||
207 | tell us what went wrong with the ip2 ports!) | ||
208 | |||
209 | Higher speeds can be obtained using the setserial utility which remaps | ||
210 | 38,400 bps (extb) to 57,600 bps, 115,200 bps, or a custom speed. | ||
211 | Intelliport II installations using the PowerPort expansion module can | ||
212 | use the custom speed setting to select the highest speeds: 153,600 bps, | ||
213 | 230,400 bps, 307,200 bps, 460,800bps and 921,600 bps. The base for | ||
214 | custom baud rate configuration is fixed at 921,600 for cards/expansion | ||
215 | modules with ST654's and 115200 for those with Cirrus CD1400's. This | ||
216 | corresponds to the maximum bit rates those chips are capable. | ||
217 | For example if the baud base is 921600 and the baud divisor is 18 then | ||
218 | the custom rate is 921600/18 = 51200 bps. See the setserial man page for | ||
219 | complete details. Of course if stty accepts the higher rates now you can | ||
220 | use that as well as the standard ioctls(). | ||
221 | |||
222 | |||
223 | 5. ip2mkdev and assorted utilities... | ||
224 | |||
225 | Several utilities, including the source for a binary ip2mkdev utility are | ||
226 | available under .../drivers/char/ip2. These can be build by changing to | ||
227 | that directory and typing "make" after the kernel has be built. If you do | ||
228 | not wish to compile the binary utilities, the shell script below can be | ||
229 | cut out and run as "ip2mkdev" to create the necessary device files. To | ||
230 | use the ip2mkdev script, you must have procfs enabled and the proc file | ||
231 | system mounted on /proc. | ||
232 | |||
233 | |||
234 | 6. NOTES | ||
235 | |||
236 | This is a release version of the driver, but it is impossible to test it | ||
237 | in all configurations of Linux. If there is any anomalous behaviour that | ||
238 | does not match the standard serial port's behaviour please let us know. | ||
239 | |||
240 | |||
241 | 7. ip2mkdev shell script | ||
242 | |||
243 | Previously, this script was simply attached here. It is now attached as a | ||
244 | shar archive to make it easier to extract the script from the documentation. | ||
245 | To create the ip2mkdev shell script change to a convenient directory (/tmp | ||
246 | works just fine) and run the following command: | ||
247 | |||
248 | unshar Documentation/serial/computone.txt | ||
249 | (This file) | ||
250 | |||
251 | You should now have a file ip2mkdev in your current working directory with | ||
252 | permissions set to execute. Running that script with then create the | ||
253 | necessary devices for the Computone boards, interfaces, and ports which | ||
254 | are present on you system at the time it is run. | ||
255 | |||
256 | |||
257 | #!/bin/sh | ||
258 | # This is a shell archive (produced by GNU sharutils 4.2.1). | ||
259 | # To extract the files from this archive, save it to some FILE, remove | ||
260 | # everything before the `!/bin/sh' line above, then type `sh FILE'. | ||
261 | # | ||
262 | # Made on 2001-10-29 10:32 EST by <mhw@alcove.wittsend.com>. | ||
263 | # Source directory was `/home2/src/tmp'. | ||
264 | # | ||
265 | # Existing files will *not* be overwritten unless `-c' is specified. | ||
266 | # | ||
267 | # This shar contains: | ||
268 | # length mode name | ||
269 | # ------ ---------- ------------------------------------------ | ||
270 | # 4251 -rwxr-xr-x ip2mkdev | ||
271 | # | ||
272 | save_IFS="${IFS}" | ||
273 | IFS="${IFS}:" | ||
274 | gettext_dir=FAILED | ||
275 | locale_dir=FAILED | ||
276 | first_param="$1" | ||
277 | for dir in $PATH | ||
278 | do | ||
279 | if test "$gettext_dir" = FAILED && test -f $dir/gettext \ | ||
280 | && ($dir/gettext --version >/dev/null 2>&1) | ||
281 | then | ||
282 | set `$dir/gettext --version 2>&1` | ||
283 | if test "$3" = GNU | ||
284 | then | ||
285 | gettext_dir=$dir | ||
286 | fi | ||
287 | fi | ||
288 | if test "$locale_dir" = FAILED && test -f $dir/shar \ | ||
289 | && ($dir/shar --print-text-domain-dir >/dev/null 2>&1) | ||
290 | then | ||
291 | locale_dir=`$dir/shar --print-text-domain-dir` | ||
292 | fi | ||
293 | done | ||
294 | IFS="$save_IFS" | ||
295 | if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED | ||
296 | then | ||
297 | echo=echo | ||
298 | else | ||
299 | TEXTDOMAINDIR=$locale_dir | ||
300 | export TEXTDOMAINDIR | ||
301 | TEXTDOMAIN=sharutils | ||
302 | export TEXTDOMAIN | ||
303 | echo="$gettext_dir/gettext -s" | ||
304 | fi | ||
305 | if touch -am -t 200112312359.59 $$.touch >/dev/null 2>&1 && test ! -f 200112312359.59 -a -f $$.touch; then | ||
306 | shar_touch='touch -am -t $1$2$3$4$5$6.$7 "$8"' | ||
307 | elif touch -am 123123592001.59 $$.touch >/dev/null 2>&1 && test ! -f 123123592001.59 -a ! -f 123123592001.5 -a -f $$.touch; then | ||
308 | shar_touch='touch -am $3$4$5$6$1$2.$7 "$8"' | ||
309 | elif touch -am 1231235901 $$.touch >/dev/null 2>&1 && test ! -f 1231235901 -a -f $$.touch; then | ||
310 | shar_touch='touch -am $3$4$5$6$2 "$8"' | ||
311 | else | ||
312 | shar_touch=: | ||
313 | echo | ||
314 | $echo 'WARNING: not restoring timestamps. Consider getting and' | ||
315 | $echo "installing GNU \`touch', distributed in GNU File Utilities..." | ||
316 | echo | ||
317 | fi | ||
318 | rm -f 200112312359.59 123123592001.59 123123592001.5 1231235901 $$.touch | ||
319 | # | ||
320 | if mkdir _sh17581; then | ||
321 | $echo 'x -' 'creating lock directory' | ||
322 | else | ||
323 | $echo 'failed to create lock directory' | ||
324 | exit 1 | ||
325 | fi | ||
326 | # ============= ip2mkdev ============== | ||
327 | if test -f 'ip2mkdev' && test "$first_param" != -c; then | ||
328 | $echo 'x -' SKIPPING 'ip2mkdev' '(file already exists)' | ||
329 | else | ||
330 | $echo 'x -' extracting 'ip2mkdev' '(text)' | ||
331 | sed 's/^X//' << 'SHAR_EOF' > 'ip2mkdev' && | ||
332 | #!/bin/sh - | ||
333 | # | ||
334 | # ip2mkdev | ||
335 | # | ||
336 | # Make or remove devices as needed for Computone Intelliport drivers | ||
337 | # | ||
338 | # First rule! If the dev file exists and you need it, don't mess | ||
339 | # with it. That prevents us from screwing up open ttys, ownership | ||
340 | # and permissions on a running system! | ||
341 | # | ||
342 | # This script will NOT remove devices that no longer exist if their | ||
343 | # board or interface box has been removed. If you want to get rid | ||
344 | # of them, you can manually do an "rm -f /dev/ttyF* /dev/cuaf*" | ||
345 | # before running this script. Running this script will then recreate | ||
346 | # all the valid devices. | ||
347 | # | ||
348 | # Michael H. Warfield | ||
349 | # /\/\|=mhw=|\/\/ | ||
350 | # mhw@wittsend.com | ||
351 | # | ||
352 | # Updated 10/29/2000 for version 1.2.13 naming convention | ||
353 | # under devfs. /\/\|=mhw=|\/\/ | ||
354 | # | ||
355 | # Updated 03/09/2000 for devfs support in ip2 drivers. /\/\|=mhw=|\/\/ | ||
356 | # | ||
357 | X | ||
358 | if test -d /dev/ip2 ; then | ||
359 | # This is devfs mode... We don't do anything except create symlinks | ||
360 | # from the real devices to the old names! | ||
361 | X cd /dev | ||
362 | X echo "Creating symbolic links to devfs devices" | ||
363 | X for i in `ls ip2` ; do | ||
364 | X if test ! -L ip2$i ; then | ||
365 | X # Remove it incase it wasn't a symlink (old device) | ||
366 | X rm -f ip2$i | ||
367 | X ln -s ip2/$i ip2$i | ||
368 | X fi | ||
369 | X done | ||
370 | X for i in `( cd tts ; ls F* )` ; do | ||
371 | X if test ! -L tty$i ; then | ||
372 | X # Remove it incase it wasn't a symlink (old device) | ||
373 | X rm -f tty$i | ||
374 | X ln -s tts/$i tty$i | ||
375 | X fi | ||
376 | X done | ||
377 | X for i in `( cd cua ; ls F* )` ; do | ||
378 | X DEVNUMBER=`expr $i : 'F\(.*\)'` | ||
379 | X if test ! -L cuf$DEVNUMBER ; then | ||
380 | X # Remove it incase it wasn't a symlink (old device) | ||
381 | X rm -f cuf$DEVNUMBER | ||
382 | X ln -s cua/$i cuf$DEVNUMBER | ||
383 | X fi | ||
384 | X done | ||
385 | X exit 0 | ||
386 | fi | ||
387 | X | ||
388 | if test ! -f /proc/tty/drivers | ||
389 | then | ||
390 | X echo "\ | ||
391 | Unable to check driver status. | ||
392 | Make sure proc file system is mounted." | ||
393 | X | ||
394 | X exit 255 | ||
395 | fi | ||
396 | X | ||
397 | if test ! -f /proc/tty/driver/ip2 | ||
398 | then | ||
399 | X echo "\ | ||
400 | Unable to locate ip2 proc file. | ||
401 | Attempting to load driver" | ||
402 | X | ||
403 | X if /sbin/insmod ip2 | ||
404 | X then | ||
405 | X if test ! -f /proc/tty/driver/ip2 | ||
406 | X then | ||
407 | X echo "\ | ||
408 | Unable to locate ip2 proc file after loading driver. | ||
409 | Driver initialization failure or driver version error. | ||
410 | " | ||
411 | X exit 255 | ||
412 | X fi | ||
413 | X else | ||
414 | X echo "Unable to load ip2 driver." | ||
415 | X exit 255 | ||
416 | X fi | ||
417 | fi | ||
418 | X | ||
419 | # Ok... So we got the driver loaded and we can locate the procfs files. | ||
420 | # Next we need our major numbers. | ||
421 | X | ||
422 | TTYMAJOR=`sed -e '/^ip2/!d' -e '/\/dev\/tt/!d' -e 's/.*tt[^ ]*[ ]*\([0-9]*\)[ ]*.*/\1/' < /proc/tty/drivers` | ||
423 | CUAMAJOR=`sed -e '/^ip2/!d' -e '/\/dev\/cu/!d' -e 's/.*cu[^ ]*[ ]*\([0-9]*\)[ ]*.*/\1/' < /proc/tty/drivers` | ||
424 | BRDMAJOR=`sed -e '/^Driver: /!d' -e 's/.*IMajor=\([0-9]*\)[ ]*.*/\1/' < /proc/tty/driver/ip2` | ||
425 | X | ||
426 | echo "\ | ||
427 | TTYMAJOR = $TTYMAJOR | ||
428 | CUAMAJOR = $CUAMAJOR | ||
429 | BRDMAJOR = $BRDMAJOR | ||
430 | " | ||
431 | X | ||
432 | # Ok... Now we should know our major numbers, if appropriate... | ||
433 | # Now we need our boards and start the device loops. | ||
434 | X | ||
435 | grep '^Board [0-9]:' /proc/tty/driver/ip2 | while read token number type alltherest | ||
436 | do | ||
437 | X # The test for blank "type" will catch the stats lead-in lines | ||
438 | X # if they exist in the file | ||
439 | X if test "$type" = "vacant" -o "$type" = "Vacant" -o "$type" = "" | ||
440 | X then | ||
441 | X continue | ||
442 | X fi | ||
443 | X | ||
444 | X BOARDNO=`expr "$number" : '\([0-9]\):'` | ||
445 | X PORTS=`expr "$alltherest" : '.*ports=\([0-9]*\)' | tr ',' ' '` | ||
446 | X MINORS=`expr "$alltherest" : '.*minors=\([0-9,]*\)' | tr ',' ' '` | ||
447 | X | ||
448 | X if test "$BOARDNO" = "" -o "$PORTS" = "" | ||
449 | X then | ||
450 | # This may be a bug. We should at least get this much information | ||
451 | X echo "Unable to process board line" | ||
452 | X continue | ||
453 | X fi | ||
454 | X | ||
455 | X if test "$MINORS" = "" | ||
456 | X then | ||
457 | # Silently skip this one. This board seems to have no boxes | ||
458 | X continue | ||
459 | X fi | ||
460 | X | ||
461 | X echo "board $BOARDNO: $type ports = $PORTS; port numbers = $MINORS" | ||
462 | X | ||
463 | X if test "$BRDMAJOR" != "" | ||
464 | X then | ||
465 | X BRDMINOR=`expr $BOARDNO \* 4` | ||
466 | X STSMINOR=`expr $BRDMINOR + 1` | ||
467 | X if test ! -c /dev/ip2ipl$BOARDNO ; then | ||
468 | X mknod /dev/ip2ipl$BOARDNO c $BRDMAJOR $BRDMINOR | ||
469 | X fi | ||
470 | X if test ! -c /dev/ip2stat$BOARDNO ; then | ||
471 | X mknod /dev/ip2stat$BOARDNO c $BRDMAJOR $STSMINOR | ||
472 | X fi | ||
473 | X fi | ||
474 | X | ||
475 | X if test "$TTYMAJOR" != "" | ||
476 | X then | ||
477 | X PORTNO=$BOARDBASE | ||
478 | X | ||
479 | X for PORTNO in $MINORS | ||
480 | X do | ||
481 | X if test ! -c /dev/ttyF$PORTNO ; then | ||
482 | X # We got the hardware but no device - make it | ||
483 | X mknod /dev/ttyF$PORTNO c $TTYMAJOR $PORTNO | ||
484 | X fi | ||
485 | X done | ||
486 | X fi | ||
487 | X | ||
488 | X if test "$CUAMAJOR" != "" | ||
489 | X then | ||
490 | X PORTNO=$BOARDBASE | ||
491 | X | ||
492 | X for PORTNO in $MINORS | ||
493 | X do | ||
494 | X if test ! -c /dev/cuf$PORTNO ; then | ||
495 | X # We got the hardware but no device - make it | ||
496 | X mknod /dev/cuf$PORTNO c $CUAMAJOR $PORTNO | ||
497 | X fi | ||
498 | X done | ||
499 | X fi | ||
500 | done | ||
501 | X | ||
502 | Xexit 0 | ||
503 | SHAR_EOF | ||
504 | (set 20 01 10 29 10 32 01 'ip2mkdev'; eval "$shar_touch") && | ||
505 | chmod 0755 'ip2mkdev' || | ||
506 | $echo 'restore of' 'ip2mkdev' 'failed' | ||
507 | if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \ | ||
508 | && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then | ||
509 | md5sum -c << SHAR_EOF >/dev/null 2>&1 \ | ||
510 | || $echo 'ip2mkdev:' 'MD5 check failed' | ||
511 | cb5717134509f38bad9fde6b1f79b4a4 ip2mkdev | ||
512 | SHAR_EOF | ||
513 | else | ||
514 | shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'ip2mkdev'`" | ||
515 | test 4251 -eq "$shar_count" || | ||
516 | $echo 'ip2mkdev:' 'original size' '4251,' 'current size' "$shar_count!" | ||
517 | fi | ||
518 | fi | ||
519 | rm -fr _sh17581 | ||
520 | exit 0 | ||
diff --git a/Documentation/spi/ep93xx_spi b/Documentation/spi/ep93xx_spi index d8eb01c15db1..832ddce6e5fb 100644 --- a/Documentation/spi/ep93xx_spi +++ b/Documentation/spi/ep93xx_spi | |||
@@ -26,7 +26,7 @@ arch/arm/mach-ep93xx/ts72xx.c: | |||
26 | #include <linux/gpio.h> | 26 | #include <linux/gpio.h> |
27 | #include <linux/spi/spi.h> | 27 | #include <linux/spi/spi.h> |
28 | 28 | ||
29 | #include <mach/ep93xx_spi.h> | 29 | #include <linux/platform_data/spi-ep93xx.h> |
30 | 30 | ||
31 | /* this is our GPIO line used for chip select */ | 31 | /* this is our GPIO line used for chip select */ |
32 | #define MMC_CHIP_SELECT_GPIO EP93XX_GPIO_LINE_EGPIO9 | 32 | #define MMC_CHIP_SELECT_GPIO EP93XX_GPIO_LINE_EGPIO9 |
diff --git a/Documentation/spi/spi-sc18is602 b/Documentation/spi/spi-sc18is602 new file mode 100644 index 000000000000..a45702865a38 --- /dev/null +++ b/Documentation/spi/spi-sc18is602 | |||
@@ -0,0 +1,36 @@ | |||
1 | Kernel driver spi-sc18is602 | ||
2 | =========================== | ||
3 | |||
4 | Supported chips: | ||
5 | * NXP SI18IS602/602B/603 | ||
6 | Datasheet: http://www.nxp.com/documents/data_sheet/SC18IS602_602B_603.pdf | ||
7 | |||
8 | Author: | ||
9 | Guenter Roeck <linux@roeck-us.net> | ||
10 | |||
11 | |||
12 | Description | ||
13 | ----------- | ||
14 | |||
15 | This driver provides connects a NXP SC18IS602/603 I2C-bus to SPI bridge to the | ||
16 | kernel's SPI core subsystem. | ||
17 | |||
18 | The driver does not probe for supported chips, since the SI18IS602/603 does not | ||
19 | support Chip ID registers. You will have to instantiate the devices explicitly. | ||
20 | Please see Documentation/i2c/instantiating-devices for details. | ||
21 | |||
22 | |||
23 | Usage Notes | ||
24 | ----------- | ||
25 | |||
26 | This driver requires the I2C adapter driver to support raw I2C messages. I2C | ||
27 | adapter drivers which can only handle the SMBus protocol are not supported. | ||
28 | |||
29 | The maximum SPI message size supported by SC18IS602/603 is 200 bytes. Attempts | ||
30 | to initiate longer transfers will fail with -EINVAL. EEPROM read operations and | ||
31 | similar large accesses have to be split into multiple chunks of no more than | ||
32 | 200 bytes per SPI message (128 bytes of data per message is recommended). This | ||
33 | means that programs such as "cp" or "od", which automatically use large block | ||
34 | sizes to access a device, can not be used directly to read data from EEPROM. | ||
35 | Programs such as dd, where the block size can be specified, should be used | ||
36 | instead. | ||
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index dcc2a94ae34e..078701fdbd4d 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt | |||
@@ -76,8 +76,8 @@ huge pages although processes will also directly compact memory as required. | |||
76 | 76 | ||
77 | dirty_background_bytes | 77 | dirty_background_bytes |
78 | 78 | ||
79 | Contains the amount of dirty memory at which the pdflush background writeback | 79 | Contains the amount of dirty memory at which the background kernel |
80 | daemon will start writeback. | 80 | flusher threads will start writeback. |
81 | 81 | ||
82 | Note: dirty_background_bytes is the counterpart of dirty_background_ratio. Only | 82 | Note: dirty_background_bytes is the counterpart of dirty_background_ratio. Only |
83 | one of them may be specified at a time. When one sysctl is written it is | 83 | one of them may be specified at a time. When one sysctl is written it is |
@@ -89,7 +89,7 @@ other appears as 0 when read. | |||
89 | dirty_background_ratio | 89 | dirty_background_ratio |
90 | 90 | ||
91 | Contains, as a percentage of total system memory, the number of pages at which | 91 | Contains, as a percentage of total system memory, the number of pages at which |
92 | the pdflush background writeback daemon will start writing out dirty data. | 92 | the background kernel flusher threads will start writing out dirty data. |
93 | 93 | ||
94 | ============================================================== | 94 | ============================================================== |
95 | 95 | ||
@@ -112,9 +112,9 @@ retained. | |||
112 | dirty_expire_centisecs | 112 | dirty_expire_centisecs |
113 | 113 | ||
114 | This tunable is used to define when dirty data is old enough to be eligible | 114 | This tunable is used to define when dirty data is old enough to be eligible |
115 | for writeout by the pdflush daemons. It is expressed in 100'ths of a second. | 115 | for writeout by the kernel flusher threads. It is expressed in 100'ths |
116 | Data which has been dirty in-memory for longer than this interval will be | 116 | of a second. Data which has been dirty in-memory for longer than this |
117 | written out next time a pdflush daemon wakes up. | 117 | interval will be written out next time a flusher thread wakes up. |
118 | 118 | ||
119 | ============================================================== | 119 | ============================================================== |
120 | 120 | ||
@@ -128,7 +128,7 @@ data. | |||
128 | 128 | ||
129 | dirty_writeback_centisecs | 129 | dirty_writeback_centisecs |
130 | 130 | ||
131 | The pdflush writeback daemons will periodically wake up and write `old' data | 131 | The kernel flusher threads will periodically wake up and write `old' data |
132 | out to disk. This tunable expresses the interval between those wakeups, in | 132 | out to disk. This tunable expresses the interval between those wakeups, in |
133 | 100'ths of a second. | 133 | 100'ths of a second. |
134 | 134 | ||
diff --git a/Documentation/trace/kprobetrace.txt b/Documentation/trace/kprobetrace.txt index d0d0bb9e3e25..d68ea5fc812b 100644 --- a/Documentation/trace/kprobetrace.txt +++ b/Documentation/trace/kprobetrace.txt | |||
@@ -12,7 +12,7 @@ kprobes can probe (this means, all functions body except for __kprobes | |||
12 | functions). Unlike the Tracepoint based event, this can be added and removed | 12 | functions). Unlike the Tracepoint based event, this can be added and removed |
13 | dynamically, on the fly. | 13 | dynamically, on the fly. |
14 | 14 | ||
15 | To enable this feature, build your kernel with CONFIG_KPROBE_TRACING=y. | 15 | To enable this feature, build your kernel with CONFIG_KPROBE_EVENT=y. |
16 | 16 | ||
17 | Similar to the events tracer, this doesn't need to be activated via | 17 | Similar to the events tracer, this doesn't need to be activated via |
18 | current_tracer. Instead of that, add probe points via | 18 | current_tracer. Instead of that, add probe points via |
diff --git a/Documentation/usb/persist.txt b/Documentation/usb/persist.txt index 074b159b77c2..35d70eda9ad6 100644 --- a/Documentation/usb/persist.txt +++ b/Documentation/usb/persist.txt | |||
@@ -155,6 +155,9 @@ If the kernel gets fooled in this way, it's almost certain to cause | |||
155 | data corruption and to crash your system. You'll have no one to blame | 155 | data corruption and to crash your system. You'll have no one to blame |
156 | but yourself. | 156 | but yourself. |
157 | 157 | ||
158 | For those devices with avoid_reset_quirk attribute being set, persist | ||
159 | maybe fail because they may morph after reset. | ||
160 | |||
158 | YOU HAVE BEEN WARNED! USE AT YOUR OWN RISK! | 161 | YOU HAVE BEEN WARNED! USE AT YOUR OWN RISK! |
159 | 162 | ||
160 | That having been said, most of the time there shouldn't be any trouble | 163 | That having been said, most of the time there shouldn't be any trouble |
diff --git a/Documentation/vfio.txt b/Documentation/vfio.txt index 0cb6685c8029..8eda3635a17d 100644 --- a/Documentation/vfio.txt +++ b/Documentation/vfio.txt | |||
@@ -133,7 +133,7 @@ character devices for this group: | |||
133 | $ lspci -n -s 0000:06:0d.0 | 133 | $ lspci -n -s 0000:06:0d.0 |
134 | 06:0d.0 0401: 1102:0002 (rev 08) | 134 | 06:0d.0 0401: 1102:0002 (rev 08) |
135 | # echo 0000:06:0d.0 > /sys/bus/pci/devices/0000:06:0d.0/driver/unbind | 135 | # echo 0000:06:0d.0 > /sys/bus/pci/devices/0000:06:0d.0/driver/unbind |
136 | # echo 1102 0002 > /sys/bus/pci/drivers/vfio/new_id | 136 | # echo 1102 0002 > /sys/bus/pci/drivers/vfio-pci/new_id |
137 | 137 | ||
138 | Now we need to look at what other devices are in the group to free | 138 | Now we need to look at what other devices are in the group to free |
139 | it for use by VFIO: | 139 | it for use by VFIO: |
diff --git a/Documentation/vm/hugetlbpage.txt b/Documentation/vm/hugetlbpage.txt index f8551b3879f8..4ac359b7aa17 100644 --- a/Documentation/vm/hugetlbpage.txt +++ b/Documentation/vm/hugetlbpage.txt | |||
@@ -299,11 +299,17 @@ map_hugetlb.c. | |||
299 | ******************************************************************* | 299 | ******************************************************************* |
300 | 300 | ||
301 | /* | 301 | /* |
302 | * hugepage-shm: see Documentation/vm/hugepage-shm.c | 302 | * map_hugetlb: see tools/testing/selftests/vm/map_hugetlb.c |
303 | */ | 303 | */ |
304 | 304 | ||
305 | ******************************************************************* | 305 | ******************************************************************* |
306 | 306 | ||
307 | /* | 307 | /* |
308 | * hugepage-mmap: see Documentation/vm/hugepage-mmap.c | 308 | * hugepage-shm: see tools/testing/selftests/vm/hugepage-shm.c |
309 | */ | ||
310 | |||
311 | ******************************************************************* | ||
312 | |||
313 | /* | ||
314 | * hugepage-mmap: see tools/testing/selftests/vm/hugepage-mmap.c | ||
309 | */ | 315 | */ |
diff --git a/Documentation/w1/slaves/w1_therm b/Documentation/w1/slaves/w1_therm index 0403aaaba878..874a8ca93feb 100644 --- a/Documentation/w1/slaves/w1_therm +++ b/Documentation/w1/slaves/w1_therm | |||
@@ -3,6 +3,7 @@ Kernel driver w1_therm | |||
3 | 3 | ||
4 | Supported chips: | 4 | Supported chips: |
5 | * Maxim ds18*20 based temperature sensors. | 5 | * Maxim ds18*20 based temperature sensors. |
6 | * Maxim ds1825 based temperature sensors. | ||
6 | 7 | ||
7 | Author: Evgeniy Polyakov <johnpol@2ka.mipt.ru> | 8 | Author: Evgeniy Polyakov <johnpol@2ka.mipt.ru> |
8 | 9 | ||
@@ -15,6 +16,7 @@ supported family codes: | |||
15 | W1_THERM_DS18S20 0x10 | 16 | W1_THERM_DS18S20 0x10 |
16 | W1_THERM_DS1822 0x22 | 17 | W1_THERM_DS1822 0x22 |
17 | W1_THERM_DS18B20 0x28 | 18 | W1_THERM_DS18B20 0x28 |
19 | W1_THERM_DS1825 0x3B | ||
18 | 20 | ||
19 | Support is provided through the sysfs w1_slave file. Each open and | 21 | Support is provided through the sysfs w1_slave file. Each open and |
20 | read sequence will initiate a temperature conversion then provide two | 22 | read sequence will initiate a temperature conversion then provide two |
diff --git a/Documentation/watchdog/src/watchdog-test.c b/Documentation/watchdog/src/watchdog-test.c index 73ff5cc93e05..3da822967ee0 100644 --- a/Documentation/watchdog/src/watchdog-test.c +++ b/Documentation/watchdog/src/watchdog-test.c | |||
@@ -31,7 +31,7 @@ static void keep_alive(void) | |||
31 | * or "-e" to enable the card. | 31 | * or "-e" to enable the card. |
32 | */ | 32 | */ |
33 | 33 | ||
34 | void term(int sig) | 34 | static void term(int sig) |
35 | { | 35 | { |
36 | close(fd); | 36 | close(fd); |
37 | fprintf(stderr, "Stopping watchdog ticks...\n"); | 37 | fprintf(stderr, "Stopping watchdog ticks...\n"); |
diff --git a/Documentation/x86/x86_64/boot-options.txt b/Documentation/x86/x86_64/boot-options.txt index c54b4f503e2a..de38429beb71 100644 --- a/Documentation/x86/x86_64/boot-options.txt +++ b/Documentation/x86/x86_64/boot-options.txt | |||
@@ -50,6 +50,13 @@ Machine check | |||
50 | monarchtimeout: | 50 | monarchtimeout: |
51 | Sets the time in us to wait for other CPUs on machine checks. 0 | 51 | Sets the time in us to wait for other CPUs on machine checks. 0 |
52 | to disable. | 52 | to disable. |
53 | mce=bios_cmci_threshold | ||
54 | Don't overwrite the bios-set CMCI threshold. This boot option | ||
55 | prevents Linux from overwriting the CMCI threshold set by the | ||
56 | bios. Without this option, Linux always sets the CMCI | ||
57 | threshold to 1. Enabling this may make memory predictive failure | ||
58 | analysis less effective if the bios sets thresholds for memory | ||
59 | errors since we will not see details for all errors. | ||
53 | 60 | ||
54 | nomce (for compatibility with i386): same as mce=off | 61 | nomce (for compatibility with i386): same as mce=off |
55 | 62 | ||
diff --git a/Documentation/zh_CN/arm/Booting b/Documentation/zh_CN/arm/Booting new file mode 100644 index 000000000000..6158a64df80c --- /dev/null +++ b/Documentation/zh_CN/arm/Booting | |||
@@ -0,0 +1,175 @@ | |||
1 | Chinese translated version of Documentation/arm/Booting | ||
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: Russell King <linux@arm.linux.org.uk> | ||
10 | Chinese maintainer: Fu Wei <tekkamanninja@gmail.com> | ||
11 | --------------------------------------------------------------------- | ||
12 | Documentation/arm/Booting 的中文翻译 | ||
13 | |||
14 | 如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文 | ||
15 | 交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻 | ||
16 | 译存在问题,请联系中文版维护者。 | ||
17 | |||
18 | 英文版维护者: Russell King <linux@arm.linux.org.uk> | ||
19 | 中文版维护者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
20 | 中文版翻译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
21 | 中文版校译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
22 | |||
23 | 以下为正文 | ||
24 | --------------------------------------------------------------------- | ||
25 | |||
26 | 启动 ARM Linux | ||
27 | ============== | ||
28 | |||
29 | 作者:Russell King | ||
30 | 日期:2002年5月18日 | ||
31 | |||
32 | 以下文档适用于 2.4.18-rmk6 及以上版本。 | ||
33 | |||
34 | 为了启动 ARM Linux,你需要一个引导装载程序(boot loader), | ||
35 | 它是一个在主内核启动前运行的一个小程序。引导装载程序需要初始化各种 | ||
36 | 设备,并最终调用 Linux 内核,将信息传递给内核。 | ||
37 | |||
38 | 从本质上讲,引导装载程序应提供(至少)以下功能: | ||
39 | |||
40 | 1、设置和初始化 RAM。 | ||
41 | 2、初始化一个串口。 | ||
42 | 3、检测机器的类型(machine type)。 | ||
43 | 4、设置内核标签列表(tagged list)。 | ||
44 | 5、调用内核映像。 | ||
45 | |||
46 | |||
47 | 1、设置和初始化 RAM | ||
48 | ------------------- | ||
49 | |||
50 | 现有的引导加载程序: 强制 | ||
51 | 新开发的引导加载程序: 强制 | ||
52 | |||
53 | 引导装载程序应该找到并初始化系统中所有内核用于保持系统变量数据的 RAM。 | ||
54 | 这个操作的执行是设备依赖的。(它可能使用内部算法来自动定位和计算所有 | ||
55 | RAM,或可能使用对这个设备已知的 RAM 信息,还可能使用任何引导装载程序 | ||
56 | 设计者想到的匹配方法。) | ||
57 | |||
58 | |||
59 | 2、初始化一个串口 | ||
60 | ----------------------------- | ||
61 | |||
62 | 现有的引导加载程序: 可选、建议 | ||
63 | 新开发的引导加载程序: 可选、建议 | ||
64 | |||
65 | 引导加载程序应该初始化并使能一个目标板上的串口。这允许内核串口驱动 | ||
66 | 自动检测哪个串口用于内核控制台。(一般用于调试或与目标板通信。) | ||
67 | |||
68 | 作为替代方案,引导加载程序也可以通过标签列表传递相关的'console=' | ||
69 | 选项给内核以指定某个串口,而串口数据格式的选项在以下文档中描述: | ||
70 | |||
71 | Documentation/kernel-parameters.txt。 | ||
72 | |||
73 | |||
74 | 3、检测机器类型 | ||
75 | -------------------------- | ||
76 | |||
77 | 现有的引导加载程序: 可选 | ||
78 | 新开发的引导加载程序: 强制 | ||
79 | |||
80 | 引导加载程序应该通过某些方式检测自身所处的机器类型。这是一个硬件 | ||
81 | 代码或通过查看所连接的硬件用某些算法得到,这些超出了本文档的范围。 | ||
82 | 引导加载程序最终必须能提供一个 MACH_TYPE_xxx 值给内核。 | ||
83 | (详见 linux/arch/arm/tools/mach-types )。 | ||
84 | |||
85 | 4、设置启动数据 | ||
86 | ------------------ | ||
87 | |||
88 | 现有的引导加载程序: 可选、强烈建议 | ||
89 | 新开发的引导加载程序: 强制 | ||
90 | |||
91 | 引导加载程序必须提供标签列表或者 dtb 映像以传递配置数据给内核。启动 | ||
92 | 数据的物理地址通过寄存器 r2 传递给内核。 | ||
93 | |||
94 | 4a、设置内核标签列表 | ||
95 | -------------------------------- | ||
96 | |||
97 | bootloader 必须创建和初始化内核标签列表。一个有效的标签列表以 | ||
98 | ATAG_CORE 标签开始,并以 ATAG_NONE 标签结束。ATAG_CORE 标签可以是 | ||
99 | 空的,也可以是非空。一个空 ATAG_CORE 标签其 size 域设置为 | ||
100 | ‘2’(0x00000002)。ATAG_NONE 标签的 size 域必须设置为零。 | ||
101 | |||
102 | 在列表中可以保存任意数量的标签。对于一个重复的标签是追加到之前标签 | ||
103 | 所携带的信息之后,还是会覆盖原来的信息,是未定义的。某些标签的行为 | ||
104 | 是前者,其他是后者。 | ||
105 | |||
106 | bootloader 必须传递一个系统内存的位置和最小值,以及根文件系统位置。 | ||
107 | 因此,最小的标签列表如下所示: | ||
108 | |||
109 | +-----------+ | ||
110 | 基地址 -> | ATAG_CORE | | | ||
111 | +-----------+ | | ||
112 | | ATAG_MEM | | 地址增长方向 | ||
113 | +-----------+ | | ||
114 | | ATAG_NONE | | | ||
115 | +-----------+ v | ||
116 | |||
117 | 标签列表应该保存在系统的 RAM 中。 | ||
118 | |||
119 | 标签列表必须置于内核自解压和 initrd'bootp' 程序都不会覆盖的内存区。 | ||
120 | 建议放在 RAM 的头 16KiB 中。 | ||
121 | |||
122 | 4b、设置设备树 | ||
123 | ------------------------- | ||
124 | |||
125 | bootloader 必须以 64bit 地址对齐的形式加载一个设备树映像(dtb)到系统 | ||
126 | RAM 中,并用启动数据初始化它。dtb 格式在文档 | ||
127 | Documentation/devicetree/booting-without-of.txt 中。内核将会在 | ||
128 | dtb 物理地址处查找 dtb 魔数值(0xd00dfeed),以确定 dtb 是否已经代替 | ||
129 | 标签列表被传递进来。 | ||
130 | |||
131 | bootloader 必须传递一个系统内存的位置和最小值,以及根文件系统位置。 | ||
132 | dtb 必须置于内核自解压不会覆盖的内存区。建议将其放置于 RAM 的头 16KiB | ||
133 | 中。但是不可将其放置于“0”物理地址处,因为内核认为:r2 中为 0,意味着 | ||
134 | 没有标签列表和 dtb 传递过来。 | ||
135 | |||
136 | 5、调用内核映像 | ||
137 | --------------------------- | ||
138 | |||
139 | 现有的引导加载程序: 强制 | ||
140 | 新开发的引导加载程序: 强制 | ||
141 | |||
142 | 调用内核映像 zImage 有两个选择。如果 zImge 保存在 flash 中,且是为了 | ||
143 | 在 flash 中直接运行而被正确链接的。这样引导加载程序就可以在 flash 中 | ||
144 | 直接调用 zImage。 | ||
145 | |||
146 | zImage 也可以被放在系统 RAM(任意位置)中被调用。注意:内核使用映像 | ||
147 | 基地址的前 16KB RAM 空间来保存页表。建议将映像置于 RAM 的 32KB 处。 | ||
148 | |||
149 | 对于以上任意一种情况,都必须符合以下启动状态: | ||
150 | |||
151 | - 停止所有 DMA 设备,这样内存数据就不会因为虚假网络包或磁盘数据而被破坏。 | ||
152 | 这可能可以节省你许多的调试时间。 | ||
153 | |||
154 | - CPU 寄存器配置 | ||
155 | r0 = 0, | ||
156 | r1 = (在上面 3 中获取的)机器类型码。 | ||
157 | r2 = 标签列表在系统 RAM 中的物理地址,或 | ||
158 | 设备树块(dtb)在系统 RAM 中的物理地址 | ||
159 | |||
160 | - CPU 模式 | ||
161 | 所有形式的中断必须被禁止 (IRQs 和 FIQs) | ||
162 | CPU 必须处于 SVC 模式。(对于 Angel 调试有特例存在) | ||
163 | |||
164 | - 缓存,MMUs | ||
165 | MMU 必须关闭。 | ||
166 | 指令缓存开启或关闭都可以。 | ||
167 | 数据缓存必须关闭。 | ||
168 | |||
169 | - 引导加载程序应该通过直接跳转到内核映像的第一条指令来调用内核映像。 | ||
170 | |||
171 | 对于支持 ARM 指令集的 CPU,跳入内核入口时必须处在 ARM 状态,即使 | ||
172 | 对于 Thumb-2 内核也是如此。 | ||
173 | |||
174 | 对于仅支持 Thumb 指令集的 CPU,比如 Cortex-M 系列的 CPU,跳入 | ||
175 | 内核入口时必须处于 Thumb 状态。 | ||
diff --git a/Documentation/zh_CN/basic_profiling.txt b/Documentation/zh_CN/basic_profiling.txt new file mode 100644 index 000000000000..1e6bf0bdf8f5 --- /dev/null +++ b/Documentation/zh_CN/basic_profiling.txt | |||
@@ -0,0 +1,71 @@ | |||
1 | Chinese translated version of Documentation/basic_profiling | ||
2 | |||
3 | If you have any comment or update to the content, please post to LKML directly. | ||
4 | However, if you have problem communicating in English you can also ask the | ||
5 | Chinese maintainer for help. Contact the Chinese maintainer, if this | ||
6 | translation is outdated or there is problem with translation. | ||
7 | |||
8 | Chinese maintainer: Liang Xie <xieliang@xiaomi.com> | ||
9 | --------------------------------------------------------------------- | ||
10 | Documentation/basic_profiling的中文翻译 | ||
11 | |||
12 | 如果想评论或更新本文的内容,请直接发信到LKML。如果你使用英文交流有困难的话,也可 | ||
13 | 以向中文版维护者求助。如果本翻译更新不及时或者翻译存在问题,请联系中文版维护者。 | ||
14 | |||
15 | 中文版维护者: 谢良 Liang Xie <xieliang007@gmail.com> | ||
16 | 中文版翻译者: 谢良 Liang Xie <xieliang007@gmail.com> | ||
17 | 中文版校译者: | ||
18 | 以下为正文 | ||
19 | --------------------------------------------------------------------- | ||
20 | |||
21 | 下面这些说明指令都是非常基础的,如果你想进一步了解请阅读相关专业文档:) | ||
22 | 请不要再在本文档增加新的内容,但可以修复文档中的错误:)(mbligh@aracnet.com) | ||
23 | 感谢John Levon,Dave Hansen等在撰写时的帮助 | ||
24 | |||
25 | <test> 用于表示要测量的目标 | ||
26 | 请先确保您已经有正确的System.map / vmlinux配置! | ||
27 | |||
28 | 对于linux系统来说,配置vmlinuz最容易的方法可能就是使用“make install”,然后修改 | ||
29 | /sbin/installkernel将vmlinux拷贝到/boot目录,而System.map通常是默认安装好的 | ||
30 | |||
31 | Readprofile | ||
32 | ----------- | ||
33 | 2.6系列内核需要版本相对较新的readprofile,比如util-linux 2.12a中包含的,可以从: | ||
34 | |||
35 | http://www.kernel.org/pub/linux/utils/util-linux/ 下载 | ||
36 | |||
37 | 大部分linux发行版已经包含了. | ||
38 | |||
39 | 启用readprofile需要在kernel启动命令行增加”profile=2“ | ||
40 | |||
41 | clear readprofile -r | ||
42 | <test> | ||
43 | dump output readprofile -m /boot/System.map > captured_profile | ||
44 | |||
45 | Oprofile | ||
46 | -------- | ||
47 | |||
48 | 从http://oprofile.sourceforge.net/获取源代码(请参考Changes以获取匹配的版本) | ||
49 | 在kernel启动命令行增加“idle=poll” | ||
50 | |||
51 | 配置CONFIG_PROFILING=y和CONFIG_OPROFILE=y然后重启进入新kernel | ||
52 | |||
53 | ./configure --with-kernel-support | ||
54 | make install | ||
55 | |||
56 | 想得到好的测量结果,请确保启用了本地APIC特性。如果opreport显示有0Hz CPU, | ||
57 | 说明APIC特性没有开启。另外注意idle=poll选项可能有损性能。 | ||
58 | |||
59 | One time setup: | ||
60 | opcontrol --setup --vmlinux=/boot/vmlinux | ||
61 | |||
62 | clear opcontrol --reset | ||
63 | start opcontrol --start | ||
64 | <test> | ||
65 | stop opcontrol --stop | ||
66 | dump output opreport > output_file | ||
67 | |||
68 | 如果只看kernel相关的报告结果,请运行命令 opreport -l /boot/vmlinux > output_file | ||
69 | |||
70 | 通过reset选项可以清理过期统计数据,相当于重启的效果。 | ||
71 | |||
diff --git a/Documentation/zh_CN/filesystems/sysfs.txt b/Documentation/zh_CN/filesystems/sysfs.txt new file mode 100644 index 000000000000..e230eaa33122 --- /dev/null +++ b/Documentation/zh_CN/filesystems/sysfs.txt | |||
@@ -0,0 +1,372 @@ | |||
1 | Chinese translated version of Documentation/filesystems/sysfs.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: Patrick Mochel <mochel@osdl.org> | ||
10 | Mike Murphy <mamurph@cs.clemson.edu> | ||
11 | Chinese maintainer: Fu Wei <tekkamanninja@gmail.com> | ||
12 | --------------------------------------------------------------------- | ||
13 | Documentation/filesystems/sysfs.txt 的中文翻译 | ||
14 | |||
15 | 如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文 | ||
16 | 交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻 | ||
17 | 译存在问题,请联系中文版维护者。 | ||
18 | 英文版维护者: Patrick Mochel <mochel@osdl.org> | ||
19 | Mike Murphy <mamurph@cs.clemson.edu> | ||
20 | 中文版维护者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
21 | 中文版翻译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
22 | 中文版校译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
23 | |||
24 | |||
25 | 以下为正文 | ||
26 | --------------------------------------------------------------------- | ||
27 | sysfs - 用于导出内核对象(kobject)的文件系统 | ||
28 | |||
29 | Patrick Mochel <mochel@osdl.org> | ||
30 | Mike Murphy <mamurph@cs.clemson.edu> | ||
31 | |||
32 | 修订: 16 August 2011 | ||
33 | 原始版本: 10 January 2003 | ||
34 | |||
35 | |||
36 | sysfs 简介: | ||
37 | ~~~~~~~~~~ | ||
38 | |||
39 | sysfs 是一个最初基于 ramfs 且位于内存的文件系统。它提供导出内核 | ||
40 | 数据结构及其属性,以及它们之间的关联到用户空间的方法。 | ||
41 | |||
42 | sysfs 始终与 kobject 的底层结构紧密相关。请阅读 | ||
43 | Documentation/kobject.txt 文档以获得更多关于 kobject 接口的 | ||
44 | 信息。 | ||
45 | |||
46 | |||
47 | 使用 sysfs | ||
48 | ~~~~~~~~~~~ | ||
49 | |||
50 | 只要内核配置中定义了 CONFIG_SYSFS ,sysfs 总是被编译进内核。你可 | ||
51 | 通过以下命令挂载它: | ||
52 | |||
53 | mount -t sysfs sysfs /sys | ||
54 | |||
55 | |||
56 | 创建目录 | ||
57 | ~~~~~~~~ | ||
58 | |||
59 | 任何 kobject 在系统中注册,就会有一个目录在 sysfs 中被创建。这个 | ||
60 | 目录是作为该 kobject 的父对象所在目录的子目录创建的,以准确地传递 | ||
61 | 内核的对象层次到用户空间。sysfs 中的顶层目录代表着内核对象层次的 | ||
62 | 共同祖先;例如:某些对象属于某个子系统。 | ||
63 | |||
64 | Sysfs 在与其目录关联的 sysfs_dirent 对象中内部保存一个指向实现 | ||
65 | 目录的 kobject 的指针。以前,这个 kobject 指针被 sysfs 直接用于 | ||
66 | kobject 文件打开和关闭的引用计数。而现在的 sysfs 实现中,kobject | ||
67 | 引用计数只能通过 sysfs_schedule_callback() 函数直接修改。 | ||
68 | |||
69 | |||
70 | 属性 | ||
71 | ~~~~ | ||
72 | |||
73 | kobject 的属性可在文件系统中以普通文件的形式导出。Sysfs 为属性定义 | ||
74 | 了面向文件 I/O 操作的方法,以提供对内核属性的读写。 | ||
75 | |||
76 | |||
77 | 属性应为 ASCII 码文本文件。以一个文件只存储一个属性值为宜。但一个 | ||
78 | 文件只包含一个属性值可能影响效率,所以一个包含相同数据类型的属性值 | ||
79 | 数组也被广泛地接受。 | ||
80 | |||
81 | 混合类型、表达多行数据以及一些怪异的数据格式会遭到强烈反对。这样做是 | ||
82 | 很丢脸的,而且其代码会在未通知作者的情况下被重写。 | ||
83 | |||
84 | |||
85 | 一个简单的属性结构定义如下: | ||
86 | |||
87 | struct attribute { | ||
88 | char * name; | ||
89 | struct module *owner; | ||
90 | umode_t mode; | ||
91 | }; | ||
92 | |||
93 | |||
94 | int sysfs_create_file(struct kobject * kobj, const struct attribute * attr); | ||
95 | void sysfs_remove_file(struct kobject * kobj, const struct attribute * attr); | ||
96 | |||
97 | |||
98 | 一个单独的属性结构并不包含读写其属性值的方法。子系统最好为增删特定 | ||
99 | 对象类型的属性定义自己的属性结构体和封装函数。 | ||
100 | |||
101 | 例如:驱动程序模型定义的 device_attribute 结构体如下: | ||
102 | |||
103 | struct device_attribute { | ||
104 | struct attribute attr; | ||
105 | ssize_t (*show)(struct device *dev, struct device_attribute *attr, | ||
106 | char *buf); | ||
107 | ssize_t (*store)(struct device *dev, struct device_attribute *attr, | ||
108 | const char *buf, size_t count); | ||
109 | }; | ||
110 | |||
111 | int device_create_file(struct device *, const struct device_attribute *); | ||
112 | void device_remove_file(struct device *, const struct device_attribute *); | ||
113 | |||
114 | 为了定义设备属性,同时定义了一下辅助宏: | ||
115 | |||
116 | #define DEVICE_ATTR(_name, _mode, _show, _store) \ | ||
117 | struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store) | ||
118 | |||
119 | 例如:声明 | ||
120 | |||
121 | static DEVICE_ATTR(foo, S_IWUSR | S_IRUGO, show_foo, store_foo); | ||
122 | |||
123 | 等同于如下代码: | ||
124 | |||
125 | static struct device_attribute dev_attr_foo = { | ||
126 | .attr = { | ||
127 | .name = "foo", | ||
128 | .mode = S_IWUSR | S_IRUGO, | ||
129 | .show = show_foo, | ||
130 | .store = store_foo, | ||
131 | }, | ||
132 | }; | ||
133 | |||
134 | |||
135 | 子系统特有的回调函数 | ||
136 | ~~~~~~~~~~~~~~~~~~~ | ||
137 | |||
138 | 当一个子系统定义一个新的属性类型时,必须实现一系列的 sysfs 操作, | ||
139 | 以帮助读写调用实现属性所有者的显示和储存方法。 | ||
140 | |||
141 | struct sysfs_ops { | ||
142 | ssize_t (*show)(struct kobject *, struct attribute *, char *); | ||
143 | ssize_t (*store)(struct kobject *, struct attribute *, const char *, size_t); | ||
144 | }; | ||
145 | |||
146 | [子系统应已经定义了一个 struct kobj_type 结构体作为这个类型的 | ||
147 | 描述符,并在此保存 sysfs_ops 的指针。更多的信息参见 kobject 的 | ||
148 | 文档] | ||
149 | |||
150 | sysfs 会为这个类型调用适当的方法。当一个文件被读写时,这个方法会 | ||
151 | 将一般的kobject 和 attribute 结构体指针转换为适当的指针类型后 | ||
152 | 调用相关联的函数。 | ||
153 | |||
154 | |||
155 | 示例: | ||
156 | |||
157 | #define to_dev(obj) container_of(obj, struct device, kobj) | ||
158 | #define to_dev_attr(_attr) container_of(_attr, struct device_attribute, attr) | ||
159 | |||
160 | static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr, | ||
161 | char *buf) | ||
162 | { | ||
163 | struct device_attribute *dev_attr = to_dev_attr(attr); | ||
164 | struct device *dev = to_dev(kobj); | ||
165 | ssize_t ret = -EIO; | ||
166 | |||
167 | if (dev_attr->show) | ||
168 | ret = dev_attr->show(dev, dev_attr, buf); | ||
169 | if (ret >= (ssize_t)PAGE_SIZE) { | ||
170 | print_symbol("dev_attr_show: %s returned bad count\n", | ||
171 | (unsigned long)dev_attr->show); | ||
172 | } | ||
173 | return ret; | ||
174 | } | ||
175 | |||
176 | |||
177 | |||
178 | 读写属性数据 | ||
179 | ~~~~~~~~~~~~ | ||
180 | |||
181 | 在声明属性时,必须指定 show() 或 store() 方法,以实现属性的 | ||
182 | 读或写。这些方法的类型应该和以下的设备属性定义一样简单。 | ||
183 | |||
184 | ssize_t (*show)(struct device *dev, struct device_attribute *attr, char *buf); | ||
185 | ssize_t (*store)(struct device *dev, struct device_attribute *attr, | ||
186 | const char *buf, size_t count); | ||
187 | |||
188 | 也就是说,他们应只以一个处理对象、一个属性和一个缓冲指针作为参数。 | ||
189 | |||
190 | sysfs 会分配一个大小为 (PAGE_SIZE) 的缓冲区并传递给这个方法。 | ||
191 | Sysfs 将会为每次读写操作调用一次这个方法。这使得这些方法在执行时 | ||
192 | 会出现以下的行为: | ||
193 | |||
194 | - 在读方面(read(2)),show() 方法应该填充整个缓冲区。回想属性 | ||
195 | 应只导出了一个属性值或是一个同类型属性值的数组,所以这个代价将 | ||
196 | 不会不太高。 | ||
197 | |||
198 | 这使得用户空间可以局部地读和任意的向前搜索整个文件。如果用户空间 | ||
199 | 向后搜索到零或使用‘0’偏移执行一个pread(2)操作,show()方法将 | ||
200 | 再次被调用,以重新填充缓存。 | ||
201 | |||
202 | - 在写方面(write(2)),sysfs 希望在第一次写操作时得到整个缓冲区。 | ||
203 | 之后 Sysfs 传递整个缓冲区给 store() 方法。 | ||
204 | |||
205 | 当要写 sysfs 文件时,用户空间进程应首先读取整个文件,修该想要 | ||
206 | 改变的值,然后回写整个缓冲区。 | ||
207 | |||
208 | 在读写属性值时,属性方法的执行应操作相同的缓冲区。 | ||
209 | |||
210 | 注记: | ||
211 | |||
212 | - 写操作导致的 show() 方法重载,会忽略当前文件位置。 | ||
213 | |||
214 | - 缓冲区应总是 PAGE_SIZE 大小。对于i386,这个值为4096。 | ||
215 | |||
216 | - show() 方法应该返回写入缓冲区的字节数,也就是 snprintf()的 | ||
217 | 返回值。 | ||
218 | |||
219 | - show() 应始终使用 snprintf()。 | ||
220 | |||
221 | - store() 应返回缓冲区的已用字节数。如果整个缓存都已填满,只需返回 | ||
222 | count 参数。 | ||
223 | |||
224 | - show() 或 store() 可以返回错误值。当得到一个非法值,必须返回一个 | ||
225 | 错误值。 | ||
226 | |||
227 | - 一个传递给方法的对象将会通过 sysfs 调用对象内嵌的引用计数固定在 | ||
228 | 内存中。尽管如此,对象代表的物理实体(如设备)可能已不存在。如有必要, | ||
229 | 应该实现一个检测机制。 | ||
230 | |||
231 | 一个简单的(未经实验证实的)设备属性实现如下: | ||
232 | |||
233 | static ssize_t show_name(struct device *dev, struct device_attribute *attr, | ||
234 | char *buf) | ||
235 | { | ||
236 | return scnprintf(buf, PAGE_SIZE, "%s\n", dev->name); | ||
237 | } | ||
238 | |||
239 | static ssize_t store_name(struct device *dev, struct device_attribute *attr, | ||
240 | const char *buf, size_t count) | ||
241 | { | ||
242 | snprintf(dev->name, sizeof(dev->name), "%.*s", | ||
243 | (int)min(count, sizeof(dev->name) - 1), buf); | ||
244 | return count; | ||
245 | } | ||
246 | |||
247 | static DEVICE_ATTR(name, S_IRUGO, show_name, store_name); | ||
248 | |||
249 | |||
250 | (注意:真正的实现不允许用户空间设置设备名。) | ||
251 | |||
252 | 顶层目录布局 | ||
253 | ~~~~~~~~~~~~ | ||
254 | |||
255 | sysfs 目录的安排显示了内核数据结构之间的关系。 | ||
256 | |||
257 | 顶层 sysfs 目录如下: | ||
258 | |||
259 | block/ | ||
260 | bus/ | ||
261 | class/ | ||
262 | dev/ | ||
263 | devices/ | ||
264 | firmware/ | ||
265 | net/ | ||
266 | fs/ | ||
267 | |||
268 | devices/ 包含了一个设备树的文件系统表示。他直接映射了内部的内核 | ||
269 | 设备树,反映了设备的层次结构。 | ||
270 | |||
271 | bus/ 包含了内核中各种总线类型的平面目录布局。每个总线目录包含两个 | ||
272 | 子目录: | ||
273 | |||
274 | devices/ | ||
275 | drivers/ | ||
276 | |||
277 | devices/ 包含了系统中出现的每个设备的符号链接,他们指向 root/ 下的 | ||
278 | 设备目录。 | ||
279 | |||
280 | drivers/ 包含了每个已为特定总线上的设备而挂载的驱动程序的目录(这里 | ||
281 | 假定驱动没有跨越多个总线类型)。 | ||
282 | |||
283 | fs/ 包含了一个为文件系统设立的目录。现在每个想要导出属性的文件系统必须 | ||
284 | 在 fs/ 下创建自己的层次结构(参见Documentation/filesystems/fuse.txt)。 | ||
285 | |||
286 | dev/ 包含两个子目录: char/ 和 block/。在这两个子目录中,有以 | ||
287 | <major>:<minor> 格式命名的符号链接。这些符号链接指向 sysfs 目录 | ||
288 | 中相应的设备。/sys/dev 提供一个通过一个 stat(2) 操作结果,查找 | ||
289 | 设备 sysfs 接口快捷的方法。 | ||
290 | |||
291 | 更多有关 driver-model 的特性信息可以在 Documentation/driver-model/ | ||
292 | 中找到。 | ||
293 | |||
294 | |||
295 | TODO: 完成这一节。 | ||
296 | |||
297 | |||
298 | 当前接口 | ||
299 | ~~~~~~~~ | ||
300 | |||
301 | 以下的接口层普遍存在于当前的sysfs中: | ||
302 | |||
303 | - 设备 (include/linux/device.h) | ||
304 | ---------------------------------- | ||
305 | 结构体: | ||
306 | |||
307 | struct device_attribute { | ||
308 | struct attribute attr; | ||
309 | ssize_t (*show)(struct device *dev, struct device_attribute *attr, | ||
310 | char *buf); | ||
311 | ssize_t (*store)(struct device *dev, struct device_attribute *attr, | ||
312 | const char *buf, size_t count); | ||
313 | }; | ||
314 | |||
315 | 声明: | ||
316 | |||
317 | DEVICE_ATTR(_name, _mode, _show, _store); | ||
318 | |||
319 | 增/删属性: | ||
320 | |||
321 | int device_create_file(struct device *dev, const struct device_attribute * attr); | ||
322 | void device_remove_file(struct device *dev, const struct device_attribute * attr); | ||
323 | |||
324 | |||
325 | - 总线驱动程序 (include/linux/device.h) | ||
326 | -------------------------------------- | ||
327 | 结构体: | ||
328 | |||
329 | struct bus_attribute { | ||
330 | struct attribute attr; | ||
331 | ssize_t (*show)(struct bus_type *, char * buf); | ||
332 | ssize_t (*store)(struct bus_type *, const char * buf, size_t count); | ||
333 | }; | ||
334 | |||
335 | 声明: | ||
336 | |||
337 | BUS_ATTR(_name, _mode, _show, _store) | ||
338 | |||
339 | 增/删属性: | ||
340 | |||
341 | int bus_create_file(struct bus_type *, struct bus_attribute *); | ||
342 | void bus_remove_file(struct bus_type *, struct bus_attribute *); | ||
343 | |||
344 | |||
345 | - 设备驱动程序 (include/linux/device.h) | ||
346 | ----------------------------------------- | ||
347 | |||
348 | 结构体: | ||
349 | |||
350 | struct driver_attribute { | ||
351 | struct attribute attr; | ||
352 | ssize_t (*show)(struct device_driver *, char * buf); | ||
353 | ssize_t (*store)(struct device_driver *, const char * buf, | ||
354 | size_t count); | ||
355 | }; | ||
356 | |||
357 | 声明: | ||
358 | |||
359 | DRIVER_ATTR(_name, _mode, _show, _store) | ||
360 | |||
361 | 增/删属性: | ||
362 | |||
363 | int driver_create_file(struct device_driver *, const struct driver_attribute *); | ||
364 | void driver_remove_file(struct device_driver *, const struct driver_attribute *); | ||
365 | |||
366 | |||
367 | 文档 | ||
368 | ~~~~ | ||
369 | |||
370 | sysfs 目录结构以及其中包含的属性定义了一个内核与用户空间之间的 ABI。 | ||
371 | 对于任何 ABI,其自身的稳定和适当的文档是非常重要的。所有新的 sysfs | ||
372 | 属性必须在 Documentation/ABI 中有文档。详见 Documentation/ABI/README。 | ||
diff --git a/Documentation/zh_CN/gpio.txt b/Documentation/zh_CN/gpio.txt new file mode 100644 index 000000000000..4fa7b4e6f856 --- /dev/null +++ b/Documentation/zh_CN/gpio.txt | |||
@@ -0,0 +1,658 @@ | |||
1 | Chinese translated version of Documentation/gpio.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: Grant Likely <grant.likely@secretlab.ca> | ||
10 | Linus Walleij <linus.walleij@linaro.org> | ||
11 | Chinese maintainer: Fu Wei <tekkamanninja@gmail.com> | ||
12 | --------------------------------------------------------------------- | ||
13 | Documentation/gpio.txt 的中文翻译 | ||
14 | |||
15 | 如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文 | ||
16 | 交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻 | ||
17 | 译存在问题,请联系中文版维护者。 | ||
18 | 英文版维护者: Grant Likely <grant.likely@secretlab.ca> | ||
19 | Linus Walleij <linus.walleij@linaro.org> | ||
20 | 中文版维护者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
21 | 中文版翻译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
22 | 中文版校译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
23 | |||
24 | |||
25 | 以下为正文 | ||
26 | --------------------------------------------------------------------- | ||
27 | GPIO 接口 | ||
28 | |||
29 | 本文档提供了一个在Linux下访问GPIO的公约概述。 | ||
30 | |||
31 | 这些函数以 gpio_* 作为前缀。其他的函数不允许使用这样的前缀或相关的 | ||
32 | __gpio_* 前缀。 | ||
33 | |||
34 | |||
35 | 什么是GPIO? | ||
36 | ========== | ||
37 | "通用输入/输出口"(GPIO)是一个灵活的由软件控制的数字信号。他们可 | ||
38 | 由多种芯片提供,且对于从事嵌入式和定制硬件的 Linux 开发者来说是 | ||
39 | 比较熟悉。每个GPIO 都代表一个连接到特定引脚或球栅阵列(BGA)封装中 | ||
40 | “球珠”的一个位。电路板原理图显示了 GPIO 与外部硬件的连接关系。 | ||
41 | 驱动可以编写成通用代码,以使板级启动代码可传递引脚配置数据给驱动。 | ||
42 | |||
43 | 片上系统 (SOC) 处理器对 GPIO 有很大的依赖。在某些情况下,每个 | ||
44 | 非专用引脚都可配置为 GPIO,且大多数芯片都最少有一些 GPIO。 | ||
45 | 可编程逻辑器件(类似 FPGA) 可以方便地提供 GPIO。像电源管理和 | ||
46 | 音频编解码器这样的多功能芯片经常留有一些这样的引脚来帮助那些引脚 | ||
47 | 匮乏的 SOC。同时还有通过 I2C 或 SPI 串行总线连接的“GPIO扩展器” | ||
48 | 芯片。大多数 PC 的南桥有一些拥有 GPIO 能力的引脚 (只有BIOS | ||
49 | 固件才知道如何使用他们)。 | ||
50 | |||
51 | GPIO 的实际功能因系统而异。通常用法有: | ||
52 | |||
53 | - 输出值可写 (高电平=1,低电平=0)。一些芯片也有如何驱动这些值的选项, | ||
54 | 例如只允许输出一个值、支持“线与”及其他取值类似的模式(值得注意的是 | ||
55 | “开漏”信号) | ||
56 | |||
57 | - 输入值可读(1、0)。一些芯片支持引脚在配置为“输出”时回读,这对于类似 | ||
58 | “线与”的情况(以支持双向信号)是非常有用的。GPIO 控制器可能有输入 | ||
59 | 去毛刺/消抖逻辑,这有时需要软件控制。 | ||
60 | |||
61 | - 输入通常可作为 IRQ 信号,一般是沿触发,但有时是电平触发。这样的 IRQ | ||
62 | 可能配置为系统唤醒事件,以将系统从低功耗状态下唤醒。 | ||
63 | |||
64 | - 通常一个 GPIO 根据不同产品电路板的需求,可以配置为输入或输出,也有仅 | ||
65 | 支持单向的。 | ||
66 | |||
67 | - 大部分 GPIO 可以在持有自旋锁时访问,但是通常由串行总线扩展的 GPIO | ||
68 | 不允许持有自旋锁。但某些系统也支持这种类型。 | ||
69 | |||
70 | 对于给定的电路板,每个 GPIO 都用于某个特定的目的,如监控 MMC/SD 卡的 | ||
71 | 插入/移除、检测卡的写保护状态、驱动 LED、配置收发器、模拟串行总线、 | ||
72 | 复位硬件看门狗、感知开关状态等等。 | ||
73 | |||
74 | |||
75 | GPIO 公约 | ||
76 | ========= | ||
77 | 注意,这个叫做“公约”,因为这不是强制性的,不遵循这个公约是无伤大雅的, | ||
78 | 因为此时可移植性并不重要。GPIO 常用于板级特定的电路逻辑,甚至可能 | ||
79 | 随着电路板的版本而改变,且不可能在不同走线的电路板上使用。仅有在少数 | ||
80 | 功能上才具有可移植性,其他功能是平台特定。这也是由于“胶合”的逻辑造成的。 | ||
81 | |||
82 | 此外,这不需要任何的执行框架,只是一个接口。某个平台可能通过一个简单地 | ||
83 | 访问芯片寄存器的内联函数来实现它,其他平台可能通过委托一系列不同的GPIO | ||
84 | 控制器的抽象函数来实现它。(有一些可选的代码能支持这种策略的实现,本文档 | ||
85 | 后面会介绍,但作为 GPIO 接口的客户端驱动程序必须与它的实现无关。) | ||
86 | |||
87 | 也就是说,如果在他们的平台上支持这个公约,驱动应尽可能的使用它。平台 | ||
88 | 必须在 Kconfig 中声明对 GENERIC_GPIO的支持 (布尔型 true),并提供 | ||
89 | 一个 <asm/gpio.h> 文件。那些调用标准 GPIO 函数的驱动应该在 Kconfig | ||
90 | 入口中声明依赖GENERIC_GPIO。当驱动包含文件: | ||
91 | |||
92 | #include <linux/gpio.h> | ||
93 | |||
94 | 则 GPIO 函数是可用,无论是“真实代码”还是经优化过的语句。如果你遵守 | ||
95 | 这个公约,当你的代码完成后,对其他的开发者来说会更容易看懂和维护。 | ||
96 | |||
97 | 注意,这些操作包含所用平台的 I/O 屏障代码,驱动无须显式地调用他们。 | ||
98 | |||
99 | |||
100 | 标识 GPIO | ||
101 | --------- | ||
102 | GPIO 是通过无符号整型来标识的,范围是 0 到 MAX_INT。保留“负”数 | ||
103 | 用于其他目的,例如标识信号“在这个板子上不可用”或指示错误。未接触底层 | ||
104 | 硬件的代码会忽略这些整数。 | ||
105 | |||
106 | 平台会定义这些整数的用法,且通常使用 #define 来定义 GPIO,这样 | ||
107 | 板级特定的启动代码可以直接关联相应的原理图。相对来说,驱动应该仅使用 | ||
108 | 启动代码传递过来的 GPIO 编号,使用 platform_data 保存板级特定 | ||
109 | 引脚配置数据 (同时还有其他须要的板级特定数据),避免可能出现的问题。 | ||
110 | |||
111 | 例如一个平台使用编号 32-159 来标识 GPIO,而在另一个平台使用编号0-63 | ||
112 | 标识一组 GPIO 控制器,64-79标识另一类 GPIO 控制器,且在一个含有 | ||
113 | FPGA 的特定板子上使用 80-95。编号不一定要连续,那些平台中,也可以 | ||
114 | 使用编号2000-2063来标识一个 I2C 接口的 GPIO 扩展器中的 GPIO。 | ||
115 | |||
116 | 如果你要初始化一个带有无效 GPIO 编号的结构体,可以使用一些负编码 | ||
117 | (如"-EINVAL"),那将使其永远不会是有效。来测试这样一个结构体中的编号 | ||
118 | 是否关联一个 GPIO,你可使用以下断言: | ||
119 | |||
120 | int gpio_is_valid(int number); | ||
121 | |||
122 | 如果编号不存在,则请求和释放 GPIO 的函数将拒绝执行相关操作(见下文)。 | ||
123 | 其他编号也可能被拒绝,比如一个编号可能存在,但暂时在给定的电路上不可用。 | ||
124 | |||
125 | 一个平台是否支持多个 GPIO 控制器为平台特定的实现问题,就像是否可以 | ||
126 | 在 GPIO 编号空间中有“空洞”和是否可以在运行时添加新的控制器一样。 | ||
127 | 这些问题会影响其他事情,包括相邻的 GPIO 编号是否存在等。 | ||
128 | |||
129 | 使用 GPIO | ||
130 | --------- | ||
131 | 对于一个 GPIO,系统应该做的第一件事情就是通过 gpio_request() | ||
132 | 函数分配它,见下文。 | ||
133 | |||
134 | 接下来是设置I/O方向,这通常是在板级启动代码中为所使用的 GPIO 设置 | ||
135 | platform_device 时完成。 | ||
136 | |||
137 | /* 设置为输入或输出, 返回 0 或负的错误代码 */ | ||
138 | int gpio_direction_input(unsigned gpio); | ||
139 | int gpio_direction_output(unsigned gpio, int value); | ||
140 | |||
141 | 返回值为零代表成功,否则返回一个负的错误代码。这个返回值需要检查,因为 | ||
142 | get/set(获取/设置)函数调用没法返回错误,且有可能是配置错误。通常, | ||
143 | 你应该在进程上下文中调用这些函数。然而,对于自旋锁安全的 GPIO,在板子 | ||
144 | 启动的早期、进程启动前使用他们也是可以的。 | ||
145 | |||
146 | 对于作为输出的 GPIO,为其提供初始输出值,对于避免在系统启动期间出现 | ||
147 | 信号毛刺是很有帮助的。 | ||
148 | |||
149 | 为了与传统的 GPIO 接口兼容, 在设置一个 GPIO 方向时,如果它还未被申请, | ||
150 | 则隐含了申请那个 GPIO 的操作(见下文)。这种兼容性正在从可选的 gpiolib | ||
151 | 框架中移除。 | ||
152 | |||
153 | 如果这个 GPIO 编码不存在,或者特定的 GPIO 不能用于那种模式,则方向 | ||
154 | 设置可能失败。依赖启动固件来正确地设置方向通常是一个坏主意,因为它可能 | ||
155 | 除了启动Linux,并没有做更多的验证工作。(同理, 板子的启动代码可能需要 | ||
156 | 将这个复用的引脚设置为 GPIO,并正确地配置上拉/下拉电阻。) | ||
157 | |||
158 | |||
159 | 访问自旋锁安全的 GPIO | ||
160 | ------------------- | ||
161 | 大多数 GPIO 控制器可以通过内存读/写指令来访问。这些指令不会休眠,可以 | ||
162 | 安全地在硬(非线程)中断例程和类似的上下文中完成。 | ||
163 | |||
164 | 对于那些用 gpio_cansleep()测试总是返回失败的 GPIO(见下文),使用 | ||
165 | 以下的函数访问: | ||
166 | |||
167 | /* GPIO 输入:返回零或非零 */ | ||
168 | int gpio_get_value(unsigned gpio); | ||
169 | |||
170 | /* GPIO 输出 */ | ||
171 | void gpio_set_value(unsigned gpio, int value); | ||
172 | |||
173 | GPIO值是布尔值,零表示低电平,非零表示高电平。当读取一个输出引脚的值时, | ||
174 | 返回值应该是引脚上的值。这个值不总是和输出值相符,因为存在开漏输出信号和 | ||
175 | 输出延迟问题。 | ||
176 | |||
177 | 以上的 get/set 函数无错误返回值,因为之前 gpio_direction_*()应已检查过 | ||
178 | 其是否为“无效GPIO”。此外,还需要注意的是并不是所有平台都可以从输出引脚 | ||
179 | 中读取数据,对于不能读取的引脚应总返回零。另外,对那些在原子上下文中无法 | ||
180 | 安全访问的 GPIO (译者注:因为访问可能导致休眠)使用这些函数是不合适的 | ||
181 | (见下文)。 | ||
182 | |||
183 | 在 GPIO 编号(还有输出、值)为常数的情况下,鼓励通过平台特定的实现来优化 | ||
184 | 这两个函数来访问 GPIO 值。这种情况(读写一个硬件寄存器)下只需要几条指令 | ||
185 | 是很正常的,且无须自旋锁。这种优化函数比起那些在子程序上花费许多指令的 | ||
186 | 函数可以使得模拟接口(译者注:例如 GPIO 模拟 I2C、1-wire 或 SPI)的 | ||
187 | 应用(在空间和时间上都)更具效率。 | ||
188 | |||
189 | |||
190 | 访问可能休眠的 GPIO | ||
191 | ----------------- | ||
192 | 某些 GPIO 控制器必须通过基于总线(如 I2C 或 SPI)的消息访问。读或写这些 | ||
193 | GPIO 值的命令需要等待其信息排到队首才发送命令,再获得其反馈。期间需要 | ||
194 | 休眠,这不能在 IRQ 例程(中断上下文)中执行。 | ||
195 | |||
196 | 支持此类 GPIO 的平台通过以下函数返回非零值来区分出这种 GPIO。(此函数需要 | ||
197 | 一个之前通过 gpio_request 分配到的有效 GPIO 编号): | ||
198 | |||
199 | int gpio_cansleep(unsigned gpio); | ||
200 | |||
201 | 为了访问这种 GPIO,内核定义了一套不同的函数: | ||
202 | |||
203 | /* GPIO 输入:返回零或非零 ,可能会休眠 */ | ||
204 | int gpio_get_value_cansleep(unsigned gpio); | ||
205 | |||
206 | /* GPIO 输出,可能会休眠 */ | ||
207 | void gpio_set_value_cansleep(unsigned gpio, int value); | ||
208 | |||
209 | |||
210 | 访问这样的 GPIO 需要一个允许休眠的上下文,例如线程 IRQ 处理例程,并用以上的 | ||
211 | 访问函数替换那些没有 cansleep()后缀的自旋锁安全访问函数。 | ||
212 | |||
213 | 除了这些访问函数可能休眠,且它们操作的 GPIO 不能在硬件 IRQ 处理例程中访问的 | ||
214 | 事实,这些处理例程实际上和自旋锁安全的函数是一样的。 | ||
215 | |||
216 | ** 除此之外 ** 调用设置和配置此类 GPIO 的函数也必须在允许休眠的上下文中, | ||
217 | 因为它们可能也需要访问 GPIO 控制器芯片: (这些设置函数通常在板级启动代码或者 | ||
218 | 驱动探测/断开代码中,所以这是一个容易满足的约束条件。) | ||
219 | |||
220 | gpio_direction_input() | ||
221 | gpio_direction_output() | ||
222 | gpio_request() | ||
223 | |||
224 | ## gpio_request_one() | ||
225 | ## gpio_request_array() | ||
226 | ## gpio_free_array() | ||
227 | |||
228 | gpio_free() | ||
229 | gpio_set_debounce() | ||
230 | |||
231 | |||
232 | |||
233 | 声明和释放 GPIO | ||
234 | ---------------------------- | ||
235 | 为了有助于捕获系统配置错误,定义了两个函数。 | ||
236 | |||
237 | /* 申请 GPIO, 返回 0 或负的错误代码. | ||
238 | * 非空标签可能有助于诊断. | ||
239 | */ | ||
240 | int gpio_request(unsigned gpio, const char *label); | ||
241 | |||
242 | /* 释放之前声明的 GPIO */ | ||
243 | void gpio_free(unsigned gpio); | ||
244 | |||
245 | 将无效的 GPIO 编码传递给 gpio_request()会导致失败,申请一个已使用这个 | ||
246 | 函数声明过的 GPIO 也会失败。gpio_request()的返回值必须检查。你应该在 | ||
247 | 进程上下文中调用这些函数。然而,对于自旋锁安全的 GPIO,在板子启动的早期、 | ||
248 | 进入进程之前是可以申请的。 | ||
249 | |||
250 | 这个函数完成两个基本的目标。一是标识那些实际上已作为 GPIO 使用的信号线, | ||
251 | 这样便于更好地诊断;系统可能需要服务几百个可用的 GPIO,但是对于任何一个 | ||
252 | 给定的电路板通常只有一些被使用。另一个目的是捕获冲突,查明错误:如两个或 | ||
253 | 更多驱动错误地认为他们已经独占了某个信号线,或是错误地认为移除一个管理着 | ||
254 | 某个已激活信号的驱动是安全的。也就是说,申请 GPIO 的作用类似一种锁机制。 | ||
255 | |||
256 | 某些平台可能也使用 GPIO 作为电源管理激活信号(例如通过关闭未使用芯片区和 | ||
257 | 简单地关闭未使用时钟)。 | ||
258 | |||
259 | 对于 GPIO 使用 pinctrl 子系统已知的引脚,子系统应该被告知其使用情况; | ||
260 | 一个 gpiolib 驱动的 .request()操作应调用 pinctrl_request_gpio(), | ||
261 | 而 gpiolib 驱动的 .free()操作应调用 pinctrl_free_gpio()。pinctrl | ||
262 | 子系统允许 pinctrl_request_gpio()在某个引脚或引脚组以复用形式“属于” | ||
263 | 一个设备时都成功返回。 | ||
264 | |||
265 | 任何须将 GPIO 信号导向适当引脚的引脚复用硬件的编程应该发生在 GPIO | ||
266 | 驱动的 .direction_input()或 .direction_output()函数中,以及 | ||
267 | 任何输出 GPIO 值的设置之后。这样可使从引脚特殊功能到 GPIO 的转换 | ||
268 | 不会在引脚产生毛刺波形。有时当用一个 GPIO 实现其信号驱动一个非 GPIO | ||
269 | 硬件模块的解决方案时,就需要这种机制。 | ||
270 | |||
271 | 某些平台允许部分或所有 GPIO 信号使用不同的引脚。类似的,GPIO 或引脚的 | ||
272 | 其他方面也需要配置,如上拉/下拉。平台软件应该在对这些 GPIO 调用 | ||
273 | gpio_request()前将这类细节配置好,例如使用 pinctrl 子系统的映射表, | ||
274 | 使得 GPIO 的用户无须关注这些细节。 | ||
275 | |||
276 | 还有一个值得注意的是在释放 GPIO 前,你必须停止使用它。 | ||
277 | |||
278 | |||
279 | 注意:申请一个 GPIO 并没有以任何方式配置它,只不过标识那个 GPIO 处于使用 | ||
280 | 状态。必须有另外的代码来处理引脚配置(如控制 GPIO 使用的引脚、上拉/下拉)。 | ||
281 | 考虑到大多数情况下声明 GPIO 之后就会立即配置它们,所以定义了以下三个辅助函数: | ||
282 | |||
283 | /* 申请一个 GPIO 信号, 同时通过特定的'flags'初始化配置, | ||
284 | * 其他和 gpio_request()的参数和返回值相同 | ||
285 | * | ||
286 | */ | ||
287 | int gpio_request_one(unsigned gpio, unsigned long flags, const char *label); | ||
288 | |||
289 | /* 在单个函数中申请多个 GPIO | ||
290 | */ | ||
291 | int gpio_request_array(struct gpio *array, size_t num); | ||
292 | |||
293 | /* 在单个函数中释放多个 GPIO | ||
294 | */ | ||
295 | void gpio_free_array(struct gpio *array, size_t num); | ||
296 | |||
297 | 这里 'flags' 当前定义可指定以下属性: | ||
298 | |||
299 | * GPIOF_DIR_IN - 配置方向为输入 | ||
300 | * GPIOF_DIR_OUT - 配置方向为输出 | ||
301 | |||
302 | * GPIOF_INIT_LOW - 在作为输出时,初始值为低电平 | ||
303 | * GPIOF_INIT_HIGH - 在作为输出时,初始值为高电平 | ||
304 | * GPIOF_OPEN_DRAIN - gpio引脚为开漏信号 | ||
305 | * GPIOF_OPEN_SOURCE - gpio引脚为源极开路信号 | ||
306 | |||
307 | * GPIOF_EXPORT_DIR_FIXED - 将 gpio 导出到 sysfs,并保持方向 | ||
308 | * GPIOF_EXPORT_DIR_CHANGEABLE - 同样是导出, 但允许改变方向 | ||
309 | |||
310 | 因为 GPIOF_INIT_* 仅有在配置为输出的时候才存在,所以有效的组合为: | ||
311 | |||
312 | * GPIOF_IN - 配置为输入 | ||
313 | * GPIOF_OUT_INIT_LOW - 配置为输出,并初始化为低电平 | ||
314 | * GPIOF_OUT_INIT_HIGH - 配置为输出,并初始化为高电平 | ||
315 | |||
316 | 当设置 flag 为 GPIOF_OPEN_DRAIN 时,则假设引脚是开漏信号。这样的引脚 | ||
317 | 将不会在输出模式下置1。这样的引脚需要连接上拉电阻。通过使能这个标志,gpio库 | ||
318 | 将会在被要求输出模式下置1时将引脚变为输入状态来使引脚置高。引脚在输出模式下 | ||
319 | 通过置0使其输出低电平。 | ||
320 | |||
321 | 当设置 flag 为 GPIOF_OPEN_SOURCE 时,则假设引脚为源极开路信号。这样的引脚 | ||
322 | 将不会在输出模式下置0。这样的引脚需要连接下拉电阻。通过使能这个标志,gpio库 | ||
323 | 将会在被要求输出模式下置0时将引脚变为输入状态来使引脚置低。引脚在输出模式下 | ||
324 | 通过置1使其输出高电平。 | ||
325 | |||
326 | 将来这些标志可能扩展到支持更多的属性。 | ||
327 | |||
328 | 更进一步,为了更简单地声明/释放多个 GPIO,'struct gpio'被引进来封装所有 | ||
329 | 这三个领域: | ||
330 | |||
331 | struct gpio { | ||
332 | unsigned gpio; | ||
333 | unsigned long flags; | ||
334 | const char *label; | ||
335 | }; | ||
336 | |||
337 | 一个典型的用例: | ||
338 | |||
339 | static struct gpio leds_gpios[] = { | ||
340 | { 32, GPIOF_OUT_INIT_HIGH, "Power LED" }, /* 默认开启 */ | ||
341 | { 33, GPIOF_OUT_INIT_LOW, "Green LED" }, /* 默认关闭 */ | ||
342 | { 34, GPIOF_OUT_INIT_LOW, "Red LED" }, /* 默认关闭 */ | ||
343 | { 35, GPIOF_OUT_INIT_LOW, "Blue LED" }, /* 默认关闭 */ | ||
344 | { ... }, | ||
345 | }; | ||
346 | |||
347 | err = gpio_request_one(31, GPIOF_IN, "Reset Button"); | ||
348 | if (err) | ||
349 | ... | ||
350 | |||
351 | err = gpio_request_array(leds_gpios, ARRAY_SIZE(leds_gpios)); | ||
352 | if (err) | ||
353 | ... | ||
354 | |||
355 | gpio_free_array(leds_gpios, ARRAY_SIZE(leds_gpios)); | ||
356 | |||
357 | |||
358 | GPIO 映射到 IRQ | ||
359 | -------------------- | ||
360 | GPIO 编号是无符号整数;IRQ 编号也是。这些构成了两个逻辑上不同的命名空间 | ||
361 | (GPIO 0 不一定使用 IRQ 0)。你可以通过以下函数在它们之间实现映射: | ||
362 | |||
363 | /* 映射 GPIO 编号到 IRQ 编号 */ | ||
364 | int gpio_to_irq(unsigned gpio); | ||
365 | |||
366 | /* 映射 IRQ 编号到 GPIO 编号 (尽量避免使用) */ | ||
367 | int irq_to_gpio(unsigned irq); | ||
368 | |||
369 | 它们的返回值为对应命名空间的相关编号,或是负的错误代码(如果无法映射)。 | ||
370 | (例如,某些 GPIO 无法做为 IRQ 使用。)以下的编号错误是未经检测的:使用一个 | ||
371 | 未通过 gpio_direction_input()配置为输入的 GPIO 编号,或者使用一个 | ||
372 | 并非来源于gpio_to_irq()的 IRQ 编号。 | ||
373 | |||
374 | 这两个映射函数可能会在信号编号的加减计算过程上花些时间。它们不可休眠。 | ||
375 | |||
376 | gpio_to_irq()返回的非错误值可以传递给 request_irq()或者 free_irq()。 | ||
377 | 它们通常通过板级特定的初始化代码存放到平台设备的 IRQ 资源中。注意:IRQ | ||
378 | 触发选项是 IRQ 接口的一部分,如 IRQF_TRIGGER_FALLING,系统唤醒能力 | ||
379 | 也是如此。 | ||
380 | |||
381 | irq_to_gpio()返回的非错误值大多数通常可以被 gpio_get_value()所使用, | ||
382 | 比如在 IRQ 是沿触发时初始化或更新驱动状态。注意某些平台不支持反映射,所以 | ||
383 | 你应该尽量避免使用它。 | ||
384 | |||
385 | |||
386 | 模拟开漏信号 | ||
387 | ---------------------------- | ||
388 | 有时在只有低电平信号作为实际驱动结果(译者注:多个输出连接于一点,逻辑电平 | ||
389 | 结果为所有输出的逻辑与)的时候,共享的信号线需要使用“开漏”信号。(该术语 | ||
390 | 适用于 CMOS 管;而 TTL 用“集电极开路”。)一个上拉电阻使信号为高电平。这 | ||
391 | 有时被称为“线与”。实际上,从负逻辑(低电平为真)的角度来看,这是一个“线或”。 | ||
392 | |||
393 | 一个开漏信号的常见例子是共享的低电平使能 IRQ 信号线。此外,有时双向数据总线 | ||
394 | 信号也使用漏极开路信号。 | ||
395 | |||
396 | 某些 GPIO 控制器直接支持开漏输出,还有许多不支持。当你需要开漏信号,但 | ||
397 | 硬件又不直接支持的时候,一个常用的方法是用任何即可作输入也可作输出的 GPIO | ||
398 | 引脚来模拟: | ||
399 | |||
400 | LOW: gpio_direction_output(gpio, 0) ... 这代码驱动信号并覆盖 | ||
401 | 上拉配置。 | ||
402 | |||
403 | HIGH: gpio_direction_input(gpio) ... 这代码关闭输出,所以上拉电阻 | ||
404 | (或其他的一些器件)控制了信号。 | ||
405 | |||
406 | 如果你将信号线“驱动”为高电平,但是 gpio_get_value(gpio)报告了一个 | ||
407 | 低电平(在适当的上升时间后),你就可以知道是其他的一些组件将共享信号线拉低了。 | ||
408 | 这不一定是错误的。一个常见的例子就是 I2C 时钟的延长:一个需要较慢时钟的 | ||
409 | 从设备延迟 SCK 的上升沿,而 I2C 主设备相应地调整其信号传输速率。 | ||
410 | |||
411 | |||
412 | 这些公约忽略了什么? | ||
413 | ================ | ||
414 | 这些公约忽略的最大一件事就是引脚复用,因为这属于高度芯片特定的属性且 | ||
415 | 没有可移植性。某个平台可能不需要明确的复用信息;有的对于任意给定的引脚 | ||
416 | 可能只有两个功能选项;有的可能每个引脚有八个功能选项;有的可能可以将 | ||
417 | 几个引脚中的任何一个作为给定的 GPIO。(是的,这些例子都来自于当前运行 | ||
418 | Linux 的系统。) | ||
419 | |||
420 | 在某些系统中,与引脚复用相关的是配置和使能集成的上、下拉模式。并不是所有 | ||
421 | 平台都支持这种模式,或者不会以相同的方式来支持这种模式;且任何给定的电路板 | ||
422 | 可能使用外置的上拉(或下拉)电阻,这时芯片上的就不应该使用。(当一个电路需要 | ||
423 | 5kOhm 的拉动电阻,芯片上的 100 kOhm 电阻就不能做到。)同样的,驱动能力 | ||
424 | (2 mA vs 20 mA)和电压(1.8V vs 3.3V)是平台特定问题,就像模型一样在 | ||
425 | 可配置引脚和 GPIO 之间(没)有一一对应的关系。 | ||
426 | |||
427 | 还有其他一些系统特定的机制没有在这里指出,例如上述的输入去毛刺和线与输出 | ||
428 | 选项。硬件可能支持批量读或写 GPIO,但是那一般是配置相关的:对于处于同一 | ||
429 | 块区(bank)的GPIO。(GPIO 通常以 16 或 32 个组成一个区块,一个给定的 | ||
430 | 片上系统一般有几个这样的区块。)某些系统可以通过输出 GPIO 触发 IRQ, | ||
431 | 或者从并非以 GPIO 管理的引脚取值。这些机制的相关代码没有必要具有可移植性。 | ||
432 | |||
433 | 当前,动态定义 GPIO 并不是标准的,例如作为配置一个带有某些 GPIO 扩展器的 | ||
434 | 附加电路板的副作用。 | ||
435 | |||
436 | GPIO 实现者的框架 (可选) | ||
437 | ===================== | ||
438 | 前面提到了,有一个可选的实现框架,让平台使用相同的编程接口,更加简单地支持 | ||
439 | 不同种类的 GPIO 控制器。这个框架称为"gpiolib"。 | ||
440 | |||
441 | 作为一个辅助调试功能,如果 debugfs 可用,就会有一个 /sys/kernel/debug/gpio | ||
442 | 文件。通过这个框架,它可以列出所有注册的控制器,以及当前正在使用中的 GPIO | ||
443 | 的状态。 | ||
444 | |||
445 | |||
446 | 控制器驱动: gpio_chip | ||
447 | ------------------- | ||
448 | 在框架中每个 GPIO 控制器都包装为一个 "struct gpio_chip",他包含了 | ||
449 | 该类型的每个控制器的常用信息: | ||
450 | |||
451 | - 设置 GPIO 方向的方法 | ||
452 | - 用于访问 GPIO 值的方法 | ||
453 | - 告知调用其方法是否可能休眠的标志 | ||
454 | - 可选的 debugfs 信息导出方法 (显示类似上拉配置一样的额外状态) | ||
455 | - 诊断标签 | ||
456 | |||
457 | 也包含了来自 device.platform_data 的每个实例的数据:它第一个 GPIO 的 | ||
458 | 编号和它可用的 GPIO 的数量。 | ||
459 | |||
460 | 实现 gpio_chip 的代码应支持多控制器实例,这可能使用驱动模型。那些代码要 | ||
461 | 配置每个 gpio_chip,并发起gpiochip_add()。卸载一个 GPIO 控制器很少见, | ||
462 | 但在必要的时候可以使用 gpiochip_remove()。 | ||
463 | |||
464 | 大部分 gpio_chip 是一个实例特定结构体的一部分,而并不将 GPIO 接口单独 | ||
465 | 暴露出来,比如编址、电源管理等。类似编解码器这样的芯片会有复杂的非 GPIO | ||
466 | 状态。 | ||
467 | |||
468 | 任何一个 debugfs 信息导出方法通常应该忽略还未申请作为 GPIO 的信号线。 | ||
469 | 他们可以使用 gpiochip_is_requested()测试,当这个 GPIO 已经申请过了 | ||
470 | 就返回相关的标签,否则返回 NULL。 | ||
471 | |||
472 | |||
473 | 平台支持 | ||
474 | ------- | ||
475 | 为了支持这个框架,一个平台的 Kconfig 文件将会 "select"(选择) | ||
476 | ARCH_REQUIRE_GPIOLIB 或 ARCH_WANT_OPTIONAL_GPIOLIB,并让它的 | ||
477 | <asm/gpio.h> 包含 <asm-generic/gpio.h>,同时定义三个方法: | ||
478 | gpio_get_value()、gpio_set_value()和 gpio_cansleep()。 | ||
479 | |||
480 | 它也应提供一个 ARCH_NR_GPIOS 的定义值,这样可以更好地反映该平台 GPIO | ||
481 | 的实际数量,节省静态表的空间。(这个定义值应该包含片上系统内建 GPIO 和 | ||
482 | GPIO 扩展器中的数据。) | ||
483 | |||
484 | ARCH_REQUIRE_GPIOLIB 意味着 gpiolib 核心在这个构架中将总是编译进内核。 | ||
485 | |||
486 | ARCH_WANT_OPTIONAL_GPIOLIB 意味着 gpiolib 核心默认关闭,且用户可以 | ||
487 | 使能它,并将其编译进内核(可选)。 | ||
488 | |||
489 | 如果这些选项都没被选择,该平台就不通过 GPIO-lib 支持 GPIO,且代码不可以 | ||
490 | 被用户使能。 | ||
491 | |||
492 | 以下这些方法的实现可以直接使用框架代码,并总是通过 gpio_chip 调度: | ||
493 | |||
494 | #define gpio_get_value __gpio_get_value | ||
495 | #define gpio_set_value __gpio_set_value | ||
496 | #define gpio_cansleep __gpio_cansleep | ||
497 | |||
498 | 这些定义可以用更理想的实现方法替代,那就是使用经过逻辑优化的内联函数来访问 | ||
499 | 基于特定片上系统的 GPIO。例如,若引用的 GPIO (寄存器位偏移)是常量“12”, | ||
500 | 读取或设置它可能只需少则两或三个指令,且不会休眠。当这样的优化无法实现时, | ||
501 | 那些函数必须使用框架提供的代码,那就至少要几十条指令才可以实现。对于用 GPIO | ||
502 | 模拟的 I/O 接口, 如此精简指令是很有意义的。 | ||
503 | |||
504 | 对于片上系统,平台特定代码为片上 GPIO 每个区(bank)定义并注册 gpio_chip | ||
505 | 实例。那些 GPIO 应该根据芯片厂商的文档进行编码/标签,并直接和电路板原理图 | ||
506 | 对应。他们应该开始于零并终止于平台特定的限制。这些 GPIO(代码)通常从 | ||
507 | arch_initcall()或者更早的地方集成进平台初始化代码,使这些 GPIO 总是可用, | ||
508 | 且他们通常可以作为 IRQ 使用。 | ||
509 | |||
510 | 板级支持 | ||
511 | ------- | ||
512 | 对于外部 GPIO 控制器(例如 I2C 或 SPI 扩展器、专用芯片、多功能器件、FPGA | ||
513 | 或 CPLD),大多数常用板级特定代码都可以注册控制器设备,并保证他们的驱动知道 | ||
514 | gpiochip_add()所使用的 GPIO 编号。他们的起始编号通常跟在平台特定的 GPIO | ||
515 | 编号之后。 | ||
516 | |||
517 | 例如板级启动代码应该创建结构体指明芯片公开的 GPIO 范围,并使用 platform_data | ||
518 | 将其传递给每个 GPIO 扩展器芯片。然后芯片驱动中的 probe()例程可以将这个 | ||
519 | 数据传递给 gpiochip_add()。 | ||
520 | |||
521 | 初始化顺序很重要。例如,如果一个设备依赖基于 I2C 的(扩展)GPIO,那么它的 | ||
522 | probe()例程就应该在那个 GPIO 有效以后才可以被调用。这意味着设备应该在 | ||
523 | GPIO 可以工作之后才可被注册。解决这类依赖的的一种方法是让这种 gpio_chip | ||
524 | 控制器向板级特定代码提供 setup()和 teardown()回调函数。一旦所有必须的 | ||
525 | 资源可用之后,这些板级特定的回调函数将会注册设备,并可以在这些 GPIO 控制器 | ||
526 | 设备变成无效时移除它们。 | ||
527 | |||
528 | |||
529 | 用户空间的 Sysfs 接口(可选) | ||
530 | ======================== | ||
531 | 使用“gpiolib”实现框架的平台可以选择配置一个 GPIO 的 sysfs 用户接口。 | ||
532 | 这不同于 debugfs 接口,因为它提供的是对 GPIO方向和值的控制,而不只显示 | ||
533 | 一个GPIO 的状态摘要。此外,它可以出现在没有调试支持的产品级系统中。 | ||
534 | |||
535 | 例如,通过适当的系统硬件文档,用户空间可以知道 GIOP #23 控制 Flash | ||
536 | 存储器的写保护(用于保护其中 Bootloader 分区)。产品的系统升级可能需要 | ||
537 | 临时解除这个保护:首先导入一个 GPIO,改变其输出状态,然后在重新使能写保护 | ||
538 | 前升级代码。通常情况下,GPIO #23 是不会被触及的,并且内核也不需要知道他。 | ||
539 | |||
540 | 根据适当的硬件文档,某些系统的用户空间 GPIO 可以用于确定系统配置数据, | ||
541 | 这些数据是标准内核不知道的。在某些任务中,简单的用户空间 GPIO 驱动可能是 | ||
542 | 系统真正需要的。 | ||
543 | |||
544 | 注意:标准内核驱动中已经存在通用的“LED 和按键”GPIO 任务,分别是: | ||
545 | "leds-gpio" 和 "gpio_keys"。请使用这些来替代直接访问 GPIO,因为集成在 | ||
546 | 内核框架中的这类驱动比你在用户空间的代码更好。 | ||
547 | |||
548 | |||
549 | Sysfs 中的路径 | ||
550 | -------------- | ||
551 | 在/sys/class/gpio 中有 3 类入口: | ||
552 | |||
553 | - 用于在用户空间控制 GPIO 的控制接口; | ||
554 | |||
555 | - GPIOs 本身;以及 | ||
556 | |||
557 | - GPIO 控制器 ("gpio_chip" 实例)。 | ||
558 | |||
559 | 除了这些标准的文件,还包含“device”符号链接。 | ||
560 | |||
561 | 控制接口是只写的: | ||
562 | |||
563 | /sys/class/gpio/ | ||
564 | |||
565 | "export" ... 用户空间可以通过写其编号到这个文件,要求内核导出 | ||
566 | 一个 GPIO 的控制到用户空间。 | ||
567 | |||
568 | 例如: 如果内核代码没有申请 GPIO #19,"echo 19 > export" | ||
569 | 将会为 GPIO #19 创建一个 "gpio19" 节点。 | ||
570 | |||
571 | "unexport" ... 导出到用户空间的逆操作。 | ||
572 | |||
573 | 例如: "echo 19 > unexport" 将会移除使用"export"文件导出的 | ||
574 | "gpio19" 节点。 | ||
575 | |||
576 | GPIO 信号的路径类似 /sys/class/gpio/gpio42/ (对于 GPIO #42 来说), | ||
577 | 并有如下的读/写属性: | ||
578 | |||
579 | /sys/class/gpio/gpioN/ | ||
580 | |||
581 | "direction" ... 读取得到 "in" 或 "out"。这个值通常运行写入。 | ||
582 | 写入"out" 时,其引脚的默认输出为低电平。为了确保无故障运行, | ||
583 | "low" 或 "high" 的电平值应该写入 GPIO 的配置,作为初始输出值。 | ||
584 | |||
585 | 注意:如果内核不支持改变 GPIO 的方向,或者在导出时内核代码没有 | ||
586 | 明确允许用户空间可以重新配置 GPIO 方向,那么这个属性将不存在。 | ||
587 | |||
588 | "value" ... 读取得到 0 (低电平) 或 1 (高电平)。如果 GPIO 配置为 | ||
589 | 输出,这个值允许写操作。任何非零值都以高电平看待。 | ||
590 | |||
591 | 如果引脚可以配置为中断信号,且如果已经配置了产生中断的模式 | ||
592 | (见"edge"的描述),你可以对这个文件使用轮询操作(poll(2)), | ||
593 | 且轮询操作会在任何中断触发时返回。如果你使用轮询操作(poll(2)), | ||
594 | 请在 events 中设置 POLLPRI 和 POLLERR。如果你使用轮询操作 | ||
595 | (select(2)),请在 exceptfds 设置你期望的文件描述符。在 | ||
596 | 轮询操作(poll(2))返回之后,既可以通过 lseek(2)操作读取 | ||
597 | sysfs 文件的开始部分,也可以关闭这个文件并重新打开它来读取数据。 | ||
598 | |||
599 | "edge" ... 读取得到“none”、“rising”、“falling”或者“both”。 | ||
600 | 将这些字符串写入这个文件可以选择沿触发模式,会使得轮询操作 | ||
601 | (select(2))在"value"文件中返回。 | ||
602 | |||
603 | 这个文件仅有在这个引脚可以配置为可产生中断输入引脚时,才存在。 | ||
604 | |||
605 | "active_low" ... 读取得到 0 (假) 或 1 (真)。写入任何非零值可以 | ||
606 | 翻转这个属性的(读写)值。已存在或之后通过"edge"属性设置了"rising" | ||
607 | 和 "falling" 沿触发模式的轮询操作(poll(2))将会遵循这个设置。 | ||
608 | |||
609 | GPIO 控制器的路径类似 /sys/class/gpio/gpiochip42/ (对于从#42 GPIO | ||
610 | 开始实现控制的控制器),并有着以下只读属性: | ||
611 | |||
612 | /sys/class/gpio/gpiochipN/ | ||
613 | |||
614 | "base" ... 与以上的 N 相同,代表此芯片管理的第一个 GPIO 的编号 | ||
615 | |||
616 | "label" ... 用于诊断 (并不总是只有唯一值) | ||
617 | |||
618 | "ngpio" ... 此控制器所管理的 GPIO 数量(而 GPIO 编号从 N 到 | ||
619 | N + ngpio - 1) | ||
620 | |||
621 | 大多数情况下,电路板的文档应当标明每个 GPIO 的使用目的。但是那些编号并不总是 | ||
622 | 固定的,例如在扩展卡上的 GPIO会根据所使用的主板或所在堆叠架构中其他的板子而 | ||
623 | 有所不同。在这种情况下,你可能需要使用 gpiochip 节点(尽可能地结合电路图)来 | ||
624 | 确定给定信号所用的 GPIO 编号。 | ||
625 | |||
626 | |||
627 | 从内核代码中导出 | ||
628 | ------------- | ||
629 | 内核代码可以明确地管理那些已通过 gpio_request()申请的 GPIO 的导出: | ||
630 | |||
631 | /* 导出 GPIO 到用户空间 */ | ||
632 | int gpio_export(unsigned gpio, bool direction_may_change); | ||
633 | |||
634 | /* gpio_export()的逆操作 */ | ||
635 | void gpio_unexport(); | ||
636 | |||
637 | /* 创建一个 sysfs 连接到已导出的 GPIO 节点 */ | ||
638 | int gpio_export_link(struct device *dev, const char *name, | ||
639 | unsigned gpio) | ||
640 | |||
641 | /* 改变 sysfs 中的一个 GPIO 节点的极性 */ | ||
642 | int gpio_sysfs_set_active_low(unsigned gpio, int value); | ||
643 | |||
644 | 在一个内核驱动申请一个 GPIO 之后,它可以通过 gpio_export()使其在 sysfs | ||
645 | 接口中可见。该驱动可以控制信号方向是否可修改。这有助于防止用户空间代码无意间 | ||
646 | 破坏重要的系统状态。 | ||
647 | |||
648 | 这个明确的导出有助于(通过使某些实验更容易来)调试,也可以提供一个始终存在的接口, | ||
649 | 与文档配合作为板级支持包的一部分。 | ||
650 | |||
651 | 在 GPIO 被导出之后,gpio_export_link()允许在 sysfs 文件系统的任何地方 | ||
652 | 创建一个到这个 GPIO sysfs 节点的符号链接。这样驱动就可以通过一个描述性的 | ||
653 | 名字,在 sysfs 中他们所拥有的设备下提供一个(到这个 GPIO sysfs 节点的)接口。 | ||
654 | |||
655 | 驱动可以使用 gpio_sysfs_set_active_low() 来在用户空间隐藏电路板之间 | ||
656 | GPIO 线的极性差异。这个仅对 sysfs 接口起作用。极性的改变可以在 gpio_export() | ||
657 | 前后进行,且之前使能的轮询操作(poll(2))支持(上升或下降沿)将会被重新配置来遵循 | ||
658 | 这个设置。 | ||
diff --git a/Documentation/zh_CN/video4linux/omap3isp.txt b/Documentation/zh_CN/video4linux/omap3isp.txt new file mode 100644 index 000000000000..67ffbf352ae0 --- /dev/null +++ b/Documentation/zh_CN/video4linux/omap3isp.txt | |||
@@ -0,0 +1,277 @@ | |||
1 | Chinese translated version of Documentation/video4linux/omap3isp.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: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
10 | Sakari Ailus <sakari.ailus@iki.fi> | ||
11 | David Cohen <dacohen@gmail.com> | ||
12 | Chinese maintainer: Fu Wei <tekkamanninja@gmail.com> | ||
13 | --------------------------------------------------------------------- | ||
14 | Documentation/video4linux/omap3isp.txt 的中文翻译 | ||
15 | |||
16 | 如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文 | ||
17 | 交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻 | ||
18 | 译存在问题,请联系中文版维护者。 | ||
19 | 英文版维护者: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
20 | Sakari Ailus <sakari.ailus@iki.fi> | ||
21 | David Cohen <dacohen@gmail.com> | ||
22 | 中文版维护者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
23 | 中文版翻译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
24 | 中文版校译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
25 | |||
26 | |||
27 | 以下为正文 | ||
28 | --------------------------------------------------------------------- | ||
29 | OMAP 3 图像信号处理器 (ISP) 驱动 | ||
30 | |||
31 | Copyright (C) 2010 Nokia Corporation | ||
32 | Copyright (C) 2009 Texas Instruments, Inc. | ||
33 | |||
34 | 联系人: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
35 | Sakari Ailus <sakari.ailus@iki.fi> | ||
36 | David Cohen <dacohen@gmail.com> | ||
37 | |||
38 | |||
39 | 介绍 | ||
40 | === | ||
41 | |||
42 | 本文档介绍了由 drivers/media/video/omap3isp 加载的德州仪器 | ||
43 | (TI)OMAP 3 图像信号处理器 (ISP) 驱动。原始驱动由德州仪器(TI) | ||
44 | 编写,但此后由诺基亚重写了两次。 | ||
45 | |||
46 | 驱动已在以下 OMAP 3 系列的芯片中成功使用: | ||
47 | |||
48 | 3430 | ||
49 | 3530 | ||
50 | 3630 | ||
51 | |||
52 | 驱动实现了 V4L2、媒体控制器和 v4l2_subdev 接口。支持内核中使用 | ||
53 | v4l2_subdev 接口的传感器、镜头和闪光灯驱动。 | ||
54 | |||
55 | |||
56 | 拆分为子设备 | ||
57 | ========== | ||
58 | |||
59 | OMAP 3 ISP 被拆分为 V4L2 子设备,ISP中的每个模块都由一个子设备 | ||
60 | 来表示。每个子设备向用户空间提供一个 V4L2 子设备接口。 | ||
61 | |||
62 | OMAP3 ISP CCP2 | ||
63 | OMAP3 ISP CSI2a | ||
64 | OMAP3 ISP CCDC | ||
65 | OMAP3 ISP preview | ||
66 | OMAP3 ISP resizer | ||
67 | OMAP3 ISP AEWB | ||
68 | OMAP3 ISP AF | ||
69 | OMAP3 ISP histogram | ||
70 | |||
71 | ISP 中每个可能的连接都通过一个链接嵌入到媒体控制器接口中。详见例程 [2]。 | ||
72 | |||
73 | |||
74 | 控制 OMAP 3 ISP | ||
75 | ============== | ||
76 | |||
77 | 通常,对 OMAP 3 ISP 的配置会在下一帧起始时生效。在传感器垂直消隐期间, | ||
78 | 模块变为空闲时完成配置。在内存到内存的操作中,视频管道一次处理一帧。 | ||
79 | 应用配置应在帧间完成。 | ||
80 | |||
81 | ISP 中的所有模块,除 CSI-2 和 (可能存在的)CCP2 接收器外,都必须 | ||
82 | 接收完整的帧数据。因此,传感器必须保证从不发送部分帧数据给ISP。 | ||
83 | |||
84 | Autoidle(自动空闲)功能至少在 3430 的 ISP 模块中确实存在一些问题。 | ||
85 | 当 omap3isp 模块参数 autoidle 非零时,autoidle(自动空闲)功能 | ||
86 | 仅在 3630 中启用了。 | ||
87 | |||
88 | |||
89 | 事件机制 | ||
90 | ====== | ||
91 | |||
92 | OMAP 3 ISP 驱动在 CCDC 和统计(AEWB、AF 和 直方图)子设备中支持 | ||
93 | V4L2 事件机制接口。 | ||
94 | |||
95 | CCDC 子设备通过 HS_VS 中断,处理 V4L2_EVENT_FRAME_SYNC 类型 | ||
96 | 事件,用于告知帧起始。早期版本的驱动则使用 V4L2_EVENT_OMAP3ISP_HS_VS。 | ||
97 | 当在 CCDC 模块中接收到起始帧的第一行时,会准确地触发事件。这个事件 | ||
98 | 可以在 CCDC 子设备中“订阅”。 | ||
99 | |||
100 | (当使用并行接口时,必须注意正确地配置 VS 信号极性。而当使用串行接收时 | ||
101 | 这个会自动校正。) | ||
102 | |||
103 | 每个统计子设备都可以产生事件。每当一个统计缓冲区可由用户空间应用程序 | ||
104 | 通过 VIDIOC_OMAP3ISP_STAT_REQ IOCTL 操作获取时,就会产生一个 | ||
105 | 事件。当前存在以下事件: | ||
106 | |||
107 | V4L2_EVENT_OMAP3ISP_AEWB | ||
108 | V4L2_EVENT_OMAP3ISP_AF | ||
109 | V4L2_EVENT_OMAP3ISP_HIST | ||
110 | |||
111 | 这些 ioctl 的事件数据类型为 struct omap3isp_stat_event_status | ||
112 | 结构体。如果出现计算错误的统计,也同样会产生一个事件,但没有相关的统计 | ||
113 | 数据缓冲区。这种情况下 omap3isp_stat_event_status.buf_err 会被 | ||
114 | 设置为非零值。 | ||
115 | |||
116 | |||
117 | 私有 IOCTL | ||
118 | ========== | ||
119 | |||
120 | OMAP 3 ISP 驱动支持标准的 V4L2 IOCTL 以及可能存在且实用的控制。但 | ||
121 | ISP 提供的许多功能都不在标准 IOCTL 之列,例如 gamma(伽马)表和统计 | ||
122 | 数据采集配置等。 | ||
123 | |||
124 | 通常,会有一个私有 ioctl 用于配置每个包含硬件依赖功能的模块。 | ||
125 | |||
126 | 支持以下私有 IOCTL: | ||
127 | |||
128 | VIDIOC_OMAP3ISP_CCDC_CFG | ||
129 | VIDIOC_OMAP3ISP_PRV_CFG | ||
130 | VIDIOC_OMAP3ISP_AEWB_CFG | ||
131 | VIDIOC_OMAP3ISP_HIST_CFG | ||
132 | VIDIOC_OMAP3ISP_AF_CFG | ||
133 | VIDIOC_OMAP3ISP_STAT_REQ | ||
134 | VIDIOC_OMAP3ISP_STAT_EN | ||
135 | |||
136 | 在 include/linux/omap3isp.h 中描述了这些 ioctl 使用的参数结构体。 | ||
137 | 与特定 ISP 模块相关的 ISP 自身的详细功能在技术参考手册 (TRMs)中有 | ||
138 | 描述,详见文档结尾。 | ||
139 | |||
140 | 虽然在不使用任何私有 IOCTL 的情况下使用 ISP 驱动是可能的,但这样无法 | ||
141 | 获得最佳的图像质量。AEWB、AF 和 直方图(译者注:一般用于自动曝光和增益 | ||
142 | 控制,以及图像均衡等)模块无法在未使用适当的私有 IOCTL 配置的情况下使用。 | ||
143 | |||
144 | |||
145 | CCDC 和 preview(预览)模块 IOCTL | ||
146 | =============================== | ||
147 | |||
148 | VIDIOC_OMAP3ISP_CCDC_CFG 和 VIDIOC_OMAP3ISP_PRV_CFG IOCTL | ||
149 | 被分别用于配置、启用和禁用 CCDC 和 preview(预览)模块的功能。在它们 | ||
150 | 所控制的模块中,两个 IOCTL 控制多种功能。VIDIOC_OMAP3ISP_CCDC_CFG IOCTL | ||
151 | 接受一个指向 omap3isp_ccdc_update_config 结构体的指针作为它的参数。 | ||
152 | 同样的,VIDIOC_OMAP3ISP_PRV_CFG 接受一个指向 omap3isp_prev_update_config | ||
153 | 结构体的指针。以上两个结构体定义位于 [1]。 | ||
154 | |||
155 | 这些结构体中的 update 域标识是否针对指定的功能更新配置,而 flag 域 | ||
156 | 则标识是启用还是禁用此功能。 | ||
157 | |||
158 | update 和 flag 位接受以下掩码值。CCDC 和 preview(预览)模块的 | ||
159 | 每个单独功能都与一个 flag 关联(禁用或启用;在结构体中 flag 域的 | ||
160 | 一部分)和一个指向功能配置数据的指针。 | ||
161 | |||
162 | 对于 VIDIOC_OMAP3ISP_CCDC_CFG,下面列出了 update 和 flag 域 | ||
163 | 中的有效值。 这些值可能会在同一个 IOCTL 调用中配置多个功能。 | ||
164 | |||
165 | OMAP3ISP_CCDC_ALAW | ||
166 | OMAP3ISP_CCDC_LPF | ||
167 | OMAP3ISP_CCDC_BLCLAMP | ||
168 | OMAP3ISP_CCDC_BCOMP | ||
169 | OMAP3ISP_CCDC_FPC | ||
170 | OMAP3ISP_CCDC_CULL | ||
171 | OMAP3ISP_CCDC_CONFIG_LSC | ||
172 | OMAP3ISP_CCDC_TBL_LSC | ||
173 | |||
174 | 针对 VIDIOC_OMAP3ISP_PRV_CFG 的相应值如下: | ||
175 | |||
176 | OMAP3ISP_PREV_LUMAENH | ||
177 | OMAP3ISP_PREV_INVALAW | ||
178 | OMAP3ISP_PREV_HRZ_MED | ||
179 | OMAP3ISP_PREV_CFA | ||
180 | OMAP3ISP_PREV_CHROMA_SUPP | ||
181 | OMAP3ISP_PREV_WB | ||
182 | OMAP3ISP_PREV_BLKADJ | ||
183 | OMAP3ISP_PREV_RGB2RGB | ||
184 | OMAP3ISP_PREV_COLOR_CONV | ||
185 | OMAP3ISP_PREV_YC_LIMIT | ||
186 | OMAP3ISP_PREV_DEFECT_COR | ||
187 | OMAP3ISP_PREV_GAMMABYPASS | ||
188 | OMAP3ISP_PREV_DRK_FRM_CAPTURE | ||
189 | OMAP3ISP_PREV_DRK_FRM_SUBTRACT | ||
190 | OMAP3ISP_PREV_LENS_SHADING | ||
191 | OMAP3ISP_PREV_NF | ||
192 | OMAP3ISP_PREV_GAMMA | ||
193 | |||
194 | 在启用某个功能的时候,相关的配置数据指针不可为 NULL。在禁用某个功能时, | ||
195 | 配置数据指针会被忽略。 | ||
196 | |||
197 | |||
198 | 统计模块 IOCTL | ||
199 | ============= | ||
200 | |||
201 | 统计子设备相较于其他子设备提供了更多动态配置选项。在图像处理流水线处于 | ||
202 | 工作状态时,它们可以被启用、禁用和重配。 | ||
203 | |||
204 | 统计模块总是从 CCDC 中获取输入的图像数据(由于直方图内存读取未实现)。 | ||
205 | 统计数据可由用户通过统计子设备节点使用私有 IOCTL 获取。 | ||
206 | |||
207 | AEWB、AF 和 直方图子设备提供的私有 IOCTL 极大程度上反应了 ISP 硬件 | ||
208 | 提供的寄存器级接口。有些方面纯粹和驱动程序的实现相关,这些将在下面讨论。 | ||
209 | |||
210 | VIDIOC_OMAP3ISP_STAT_EN | ||
211 | ----------------------- | ||
212 | |||
213 | 这个私有 IOCTL 启用/禁用 一个统计模块。如果这个申请在视频流启动前完成, | ||
214 | 它将在视频流水线开始工作时生效。如果视频流水线已经处于工作状态了,它将在 | ||
215 | CCDC 变为空闲时生效。 | ||
216 | |||
217 | VIDIOC_OMAP3ISP_AEWB_CFG, VIDIOC_OMAP3ISP_HIST_CFG and VIDIOC_OMAP3ISP_AF_CFG | ||
218 | ----------------------------------------------------------------------------- | ||
219 | |||
220 | 这些 IOCTL 用于配置模块。它们要求用户应用程序对硬件有深入的认识。对 | ||
221 | 大多数域的解释可以在 OMAP 的 TRM 中找到。以下两个域对于以上所有的 | ||
222 | 私有 IOCTL 配置都很常见,由于他们没有在 TRM 中提及,故需要对其有 | ||
223 | 更好的认识。 | ||
224 | |||
225 | omap3isp_[h3a_af/h3a_aewb/hist]_config.buf_size: | ||
226 | |||
227 | 模块在内部处理自身缓冲。对模块数据输出所必需的缓存大小依赖于已申请的配置。 | ||
228 | 虽然驱动支持在视频流工作时重新配置,但对于所需缓存量大于模块启用时内部 | ||
229 | 所分配数量的情况,则不支持重新配置。在这种情况下将返回 -EBUSY。为了避免 | ||
230 | 此类状况,无论是禁用/重配/启用模块,还是第一次配置时申请必须的缓存大小, | ||
231 | 都应在模块禁用的情况下进行。 | ||
232 | |||
233 | 内部缓冲分配的大小需综合考虑所申请配置的最小缓存量以及 buf_size 域中 | ||
234 | 所设的值。如果 buf_size 域在[minimum(最小值), maximum(最大值)] | ||
235 | 缓冲大小范围之外,则应该将其调整到其范围中。驱动则会选择最大值。正确的 | ||
236 | buf_size 值将回写到用户应用程序中。 | ||
237 | |||
238 | omap3isp_[h3a_af/h3a_aewb/hist]_config.config_counter: | ||
239 | |||
240 | 由于配置并未在申请之后同步生效,驱动必须提供一个跟踪这类信息的方法, | ||
241 | 以提供更准确的数据。在一个配置被申请之后,返回到用户空间应用程序的 | ||
242 | config_counter 是一个与其配置相关的唯一值。当用户应用程序接收到 | ||
243 | 一个缓冲可用或一个新的缓冲申请事件时,这个 config_counter 用于 | ||
244 | 一个缓冲数据和一个配置的匹配。 | ||
245 | |||
246 | VIDIOC_OMAP3ISP_STAT_REQ | ||
247 | ------------------------ | ||
248 | |||
249 | 将内部缓冲队列中最早的数据发送到用户空间,然后丢弃此缓冲区。 | ||
250 | omap3isp_stat_data.frame_number 域与视频缓冲的 field_count | ||
251 | 域相匹配。 | ||
252 | |||
253 | |||
254 | 技术参考手册 (TRMs) 和其他文档 | ||
255 | ========================== | ||
256 | |||
257 | OMAP 3430 TRM: | ||
258 | <URL:http://focus.ti.com/pdfs/wtbu/OMAP34xx_ES3.1.x_PUBLIC_TRM_vZM.zip> | ||
259 | 参考于 2011-03-05. | ||
260 | |||
261 | OMAP 35xx TRM: | ||
262 | <URL:http://www.ti.com/litv/pdf/spruf98o> 参考于 2011-03-05. | ||
263 | |||
264 | OMAP 3630 TRM: | ||
265 | <URL:http://focus.ti.com/pdfs/wtbu/OMAP36xx_ES1.x_PUBLIC_TRM_vQ.zip> | ||
266 | 参考于 2011-03-05. | ||
267 | |||
268 | DM 3730 TRM: | ||
269 | <URL:http://www.ti.com/litv/pdf/sprugn4h> 参考于 2011-03-06. | ||
270 | |||
271 | |||
272 | 参考资料 | ||
273 | ======= | ||
274 | |||
275 | [1] include/linux/omap3isp.h | ||
276 | |||
277 | [2] http://git.ideasonboard.org/?p=media-ctl.git;a=summary | ||
diff --git a/Documentation/zh_CN/video4linux/v4l2-framework.txt b/Documentation/zh_CN/video4linux/v4l2-framework.txt new file mode 100644 index 000000000000..3e74f13af426 --- /dev/null +++ b/Documentation/zh_CN/video4linux/v4l2-framework.txt | |||
@@ -0,0 +1,983 @@ | |||
1 | Chinese translated version of Documentation/video4linux/v4l2-framework.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: Mauro Carvalho Chehab <mchehab@infradead.org> | ||
10 | Chinese maintainer: Fu Wei <tekkamanninja@gmail.com> | ||
11 | --------------------------------------------------------------------- | ||
12 | Documentation/video4linux/v4l2-framework.txt 的中文翻译 | ||
13 | |||
14 | 如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文 | ||
15 | 交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻 | ||
16 | 译存在问题,请联系中文版维护者。 | ||
17 | 英文版维护者: Mauro Carvalho Chehab <mchehab@infradead.org> | ||
18 | 中文版维护者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
19 | 中文版翻译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
20 | 中文版校译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
21 | |||
22 | |||
23 | 以下为正文 | ||
24 | --------------------------------------------------------------------- | ||
25 | V4L2 驱动框架概览 | ||
26 | ============== | ||
27 | |||
28 | 本文档描述 V4L2 框架所提供的各种结构和它们之间的关系。 | ||
29 | |||
30 | |||
31 | 介绍 | ||
32 | ---- | ||
33 | |||
34 | 大部分现代 V4L2 设备由多个 IC 组成,在 /dev 下导出多个设备节点, | ||
35 | 并同时创建非 V4L2 设备(如 DVB、ALSA、FB、I2C 和红外输入设备)。 | ||
36 | 由于这种硬件的复杂性,V4L2 驱动也变得非常复杂。 | ||
37 | |||
38 | 尤其是 V4L2 必须支持 IC 实现音视频的多路复用和编解码,这就更增加了其 | ||
39 | 复杂性。通常这些 IC 通过一个或多个 I2C 总线连接到主桥驱动器,但也可 | ||
40 | 使用其他总线。这些设备称为“子设备”。 | ||
41 | |||
42 | 长期以来,这个框架仅限于通过 video_device 结构体创建 V4L 设备节点, | ||
43 | 并使用 video_buf 处理视频缓冲(注:本文不讨论 video_buf 框架)。 | ||
44 | |||
45 | 这意味着所有驱动必须自己设置设备实例并连接到子设备。其中一部分要正确地 | ||
46 | 完成是比较复杂的,使得许多驱动都没有正确地实现。 | ||
47 | |||
48 | 由于框架的缺失,有很多通用代码都不可重复利用。 | ||
49 | |||
50 | 因此,这个框架构建所有驱动都需要的基本结构块,而统一的框架将使通用代码 | ||
51 | 创建成实用函数并在所有驱动中共享变得更加容易。 | ||
52 | |||
53 | |||
54 | 驱动结构 | ||
55 | ------- | ||
56 | |||
57 | 所有 V4L2 驱动都有如下结构: | ||
58 | |||
59 | 1) 每个设备实例的结构体--包含其设备状态。 | ||
60 | |||
61 | 2) 初始化和控制子设备的方法(如果有)。 | ||
62 | |||
63 | 3) 创建 V4L2 设备节点 (/dev/videoX、/dev/vbiX 和 /dev/radioX) | ||
64 | 并跟踪设备节点的特定数据。 | ||
65 | |||
66 | 4) 特定文件句柄结构体--包含每个文件句柄的数据。 | ||
67 | |||
68 | 5) 视频缓冲处理。 | ||
69 | |||
70 | 以下是它们的初略关系图: | ||
71 | |||
72 | device instances(设备实例) | ||
73 | | | ||
74 | +-sub-device instances(子设备实例) | ||
75 | | | ||
76 | \-V4L2 device nodes(V4L2 设备节点) | ||
77 | | | ||
78 | \-filehandle instances(文件句柄实例) | ||
79 | |||
80 | |||
81 | 框架结构 | ||
82 | ------- | ||
83 | |||
84 | 该框架非常类似驱动结构:它有一个 v4l2_device 结构用于保存设备 | ||
85 | 实例的数据;一个 v4l2_subdev 结构体代表子设备实例;video_device | ||
86 | 结构体保存 V4L2 设备节点的数据;将来 v4l2_fh 结构体将跟踪文件句柄 | ||
87 | 实例(暂未尚未实现)。 | ||
88 | |||
89 | V4L2 框架也可与媒体框架整合(可选的)。如果驱动设置了 v4l2_device | ||
90 | 结构体的 mdev 域,子设备和视频节点的入口将自动出现在媒体框架中。 | ||
91 | |||
92 | |||
93 | v4l2_device 结构体 | ||
94 | ---------------- | ||
95 | |||
96 | 每个设备实例都通过 v4l2_device (v4l2-device.h)结构体来表示。 | ||
97 | 简单设备可以仅分配这个结构体,但在大多数情况下,都会将这个结构体 | ||
98 | 嵌入到一个更大的结构体中。 | ||
99 | |||
100 | 你必须注册这个设备实例: | ||
101 | |||
102 | v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev); | ||
103 | |||
104 | 注册操作将会初始化 v4l2_device 结构体。如果 dev->driver_data 域 | ||
105 | 为 NULL,就将其指向 v4l2_dev。 | ||
106 | |||
107 | 需要与媒体框架整合的驱动必须手动设置 dev->driver_data,指向包含 | ||
108 | v4l2_device 结构体实例的驱动特定设备结构体。这可以在注册 V4L2 设备 | ||
109 | 实例前通过 dev_set_drvdata() 函数完成。同时必须设置 v4l2_device | ||
110 | 结构体的 mdev 域,指向适当的初始化并注册过的 media_device 实例。 | ||
111 | |||
112 | 如果 v4l2_dev->name 为空,则它将被设置为从 dev 中衍生出的值(为了 | ||
113 | 更加精确,形式为驱动名后跟 bus_id)。如果你在调用 v4l2_device_register | ||
114 | 前已经设置好了,则不会被修改。如果 dev 为 NULL,则你*必须*在调用 | ||
115 | v4l2_device_register 前设置 v4l2_dev->name。 | ||
116 | |||
117 | 你可以基于驱动名和驱动的全局 atomic_t 类型的实例编号,通过 | ||
118 | v4l2_device_set_name() 设置 name。这样会生成类似 ivtv0、ivtv1 等 | ||
119 | 名字。若驱动名以数字结尾,则会在编号和驱动名间插入一个破折号,如: | ||
120 | cx18-0、cx18-1 等。此函数返回实例编号。 | ||
121 | |||
122 | 第一个 “dev” 参数通常是一个指向 pci_dev、usb_interface 或 | ||
123 | platform_device 的指针。很少使其为 NULL,除非是一个ISA设备或者 | ||
124 | 当一个设备创建了多个 PCI 设备,使得 v4l2_dev 无法与一个特定的父设备 | ||
125 | 关联。 | ||
126 | |||
127 | 你也可以提供一个 notify() 回调,使子设备可以调用它实现事件通知。 | ||
128 | 但这个设置与子设备相关。子设备支持的任何通知必须在 | ||
129 | include/media/<subdevice>.h 中定义一个消息头。 | ||
130 | |||
131 | 注销 v4l2_device 使用如下函数: | ||
132 | |||
133 | v4l2_device_unregister(struct v4l2_device *v4l2_dev); | ||
134 | |||
135 | 如果 dev->driver_data 域指向 v4l2_dev,将会被重置为 NULL。注销同时 | ||
136 | 会自动从设备中注销所有子设备。 | ||
137 | |||
138 | 如果你有一个热插拔设备(如USB设备),则当断开发生时,父设备将无效。 | ||
139 | 由于 v4l2_device 有一个指向父设备的指针必须被清除,同时标志父设备 | ||
140 | 已消失,所以必须调用以下函数: | ||
141 | |||
142 | v4l2_device_disconnect(struct v4l2_device *v4l2_dev); | ||
143 | |||
144 | 这个函数并*不*注销子设备,因此你依然要调用 v4l2_device_unregister() | ||
145 | 函数。如果你的驱动器并非热插拔的,就没有必要调用 v4l2_device_disconnect()。 | ||
146 | |||
147 | 有时你需要遍历所有被特定驱动注册的设备。这通常发生在多个设备驱动使用 | ||
148 | 同一个硬件的情况下。如:ivtvfb 驱动是一个使用 ivtv 硬件的帧缓冲驱动, | ||
149 | 同时 alsa 驱动也使用此硬件。 | ||
150 | |||
151 | 你可以使用如下例程遍历所有注册的设备: | ||
152 | |||
153 | static int callback(struct device *dev, void *p) | ||
154 | { | ||
155 | struct v4l2_device *v4l2_dev = dev_get_drvdata(dev); | ||
156 | |||
157 | /* 测试这个设备是否已经初始化 */ | ||
158 | if (v4l2_dev == NULL) | ||
159 | return 0; | ||
160 | ... | ||
161 | return 0; | ||
162 | } | ||
163 | |||
164 | int iterate(void *p) | ||
165 | { | ||
166 | struct device_driver *drv; | ||
167 | int err; | ||
168 | |||
169 | /* 在PCI 总线上查找ivtv驱动。 | ||
170 | pci_bus_type是全局的. 对于USB总线使用usb_bus_type。 */ | ||
171 | drv = driver_find("ivtv", &pci_bus_type); | ||
172 | /* 遍历所有的ivtv设备实例 */ | ||
173 | err = driver_for_each_device(drv, NULL, p, callback); | ||
174 | put_driver(drv); | ||
175 | return err; | ||
176 | } | ||
177 | |||
178 | 有时你需要一个设备实例的运行计数。这个通常用于映射一个设备实例到一个 | ||
179 | 模块选择数组的索引。 | ||
180 | |||
181 | 推荐方法如下: | ||
182 | |||
183 | static atomic_t drv_instance = ATOMIC_INIT(0); | ||
184 | |||
185 | static int __devinit drv_probe(struct pci_dev *pdev, | ||
186 | const struct pci_device_id *pci_id) | ||
187 | { | ||
188 | ... | ||
189 | state->instance = atomic_inc_return(&drv_instance) - 1; | ||
190 | } | ||
191 | |||
192 | 如果你有多个设备节点,对于热插拔设备,知道何时注销 v4l2_device 结构体 | ||
193 | 就比较困难。为此 v4l2_device 有引用计数支持。当调用 video_register_device | ||
194 | 时增加引用计数,而设备节点释放时减小引用计数。当引用计数为零,则 | ||
195 | v4l2_device 的release() 回调将被执行。你就可以在此时做最后的清理工作。 | ||
196 | |||
197 | 如果创建了其他设备节点(比如 ALSA),则你可以通过以下函数手动增减 | ||
198 | 引用计数: | ||
199 | |||
200 | void v4l2_device_get(struct v4l2_device *v4l2_dev); | ||
201 | |||
202 | 或: | ||
203 | |||
204 | int v4l2_device_put(struct v4l2_device *v4l2_dev); | ||
205 | |||
206 | 由于引用技术初始化为 1 ,你也需要在 disconnect() 回调(对于 USB 设备)中 | ||
207 | 调用 v4l2_device_put,或者 remove() 回调(例如对于 PCI 设备),否则 | ||
208 | 引用计数将永远不会为 0 。 | ||
209 | |||
210 | v4l2_subdev结构体 | ||
211 | ------------------ | ||
212 | |||
213 | 许多驱动需要与子设备通信。这些设备可以完成各种任务,但通常他们负责 | ||
214 | 音视频复用和编解码。如网络摄像头的子设备通常是传感器和摄像头控制器。 | ||
215 | |||
216 | 这些一般为 I2C 接口设备,但并不一定都是。为了给驱动提供调用子设备的 | ||
217 | 统一接口,v4l2_subdev 结构体(v4l2-subdev.h)产生了。 | ||
218 | |||
219 | 每个子设备驱动都必须有一个 v4l2_subdev 结构体。这个结构体可以单独 | ||
220 | 代表一个简单的子设备,也可以嵌入到一个更大的结构体中,与更多设备状态 | ||
221 | 信息保存在一起。通常有一个下级设备结构体(比如:i2c_client)包含了 | ||
222 | 内核创建的设备数据。建议使用 v4l2_set_subdevdata() 将这个结构体的 | ||
223 | 指针保存在 v4l2_subdev 的私有数据域(dev_priv)中。这使得通过 v4l2_subdev | ||
224 | 找到实际的低层总线特定设备数据变得容易。 | ||
225 | |||
226 | 你同时需要一个从低层结构体获取 v4l2_subdev 指针的方法。对于常用的 | ||
227 | i2c_client 结构体,i2c_set_clientdata() 函数可用于保存一个 v4l2_subdev | ||
228 | 指针;对于其他总线你可能需要使用其他相关函数。 | ||
229 | |||
230 | 桥驱动中也应保存每个子设备的私有数据,比如一个指向特定桥的各设备私有 | ||
231 | 数据的指针。为此 v4l2_subdev 结构体提供主机私有数据域(host_priv), | ||
232 | 并可通过 v4l2_get_subdev_hostdata() 和 v4l2_set_subdev_hostdata() | ||
233 | 访问。 | ||
234 | |||
235 | 从总线桥驱动的视角,驱动加载子设备模块并以某种方式获得 v4l2_subdev | ||
236 | 结构体指针。对于 i2c 总线设备相对简单:调用 i2c_get_clientdata()。 | ||
237 | 对于其他总线也需要做类似的操作。针对 I2C 总线上的子设备辅助函数帮你 | ||
238 | 完成了大部分复杂的工作。 | ||
239 | |||
240 | 每个 v4l2_subdev 都包含子设备驱动需要实现的函数指针(如果对此设备 | ||
241 | 不适用,可为NULL)。由于子设备可完成许多不同的工作,而在一个庞大的 | ||
242 | 函数指针结构体中通常仅有少数有用的函数实现其功能肯定不合适。所以, | ||
243 | 函数指针根据其实现的功能被分类,每一类都有自己的函数指针结构体。 | ||
244 | |||
245 | 顶层函数指针结构体包含了指向各类函数指针结构体的指针,如果子设备驱动 | ||
246 | 不支持该类函数中的任何一个功能,则指向该类结构体的指针为NULL。 | ||
247 | |||
248 | 这些结构体定义如下: | ||
249 | |||
250 | struct v4l2_subdev_core_ops { | ||
251 | int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip); | ||
252 | int (*log_status)(struct v4l2_subdev *sd); | ||
253 | int (*init)(struct v4l2_subdev *sd, u32 val); | ||
254 | ... | ||
255 | }; | ||
256 | |||
257 | struct v4l2_subdev_tuner_ops { | ||
258 | ... | ||
259 | }; | ||
260 | |||
261 | struct v4l2_subdev_audio_ops { | ||
262 | ... | ||
263 | }; | ||
264 | |||
265 | struct v4l2_subdev_video_ops { | ||
266 | ... | ||
267 | }; | ||
268 | |||
269 | struct v4l2_subdev_pad_ops { | ||
270 | ... | ||
271 | }; | ||
272 | |||
273 | struct v4l2_subdev_ops { | ||
274 | const struct v4l2_subdev_core_ops *core; | ||
275 | const struct v4l2_subdev_tuner_ops *tuner; | ||
276 | const struct v4l2_subdev_audio_ops *audio; | ||
277 | const struct v4l2_subdev_video_ops *video; | ||
278 | const struct v4l2_subdev_pad_ops *video; | ||
279 | }; | ||
280 | |||
281 | 其中 core(核心)函数集通常可用于所有子设备,其他类别的实现依赖于 | ||
282 | 子设备。如视频设备可能不支持音频操作函数,反之亦然。 | ||
283 | |||
284 | 这样的设置在限制了函数指针数量的同时,还使增加新的操作函数和分类 | ||
285 | 变得较为容易。 | ||
286 | |||
287 | 子设备驱动可使用如下函数初始化 v4l2_subdev 结构体: | ||
288 | |||
289 | v4l2_subdev_init(sd, &ops); | ||
290 | |||
291 | 然后,你必须用一个唯一的名字初始化 subdev->name,并初始化模块的 | ||
292 | owner 域。若使用 i2c 辅助函数,这些都会帮你处理好。 | ||
293 | |||
294 | 若需同媒体框架整合,你必须调用 media_entity_init() 初始化 v4l2_subdev | ||
295 | 结构体中的 media_entity 结构体(entity 域): | ||
296 | |||
297 | struct media_pad *pads = &my_sd->pads; | ||
298 | int err; | ||
299 | |||
300 | err = media_entity_init(&sd->entity, npads, pads, 0); | ||
301 | |||
302 | pads 数组必须预先初始化。无须手动设置 media_entity 的 type 和 | ||
303 | name 域,但如有必要,revision 域必须初始化。 | ||
304 | |||
305 | 当(任何)子设备节点被打开/关闭,对 entity 的引用将被自动获取/释放。 | ||
306 | |||
307 | 在子设备被注销之后,不要忘记清理 media_entity 结构体: | ||
308 | |||
309 | media_entity_cleanup(&sd->entity); | ||
310 | |||
311 | 如果子设备驱动趋向于处理视频并整合进了媒体框架,必须使用 v4l2_subdev_pad_ops | ||
312 | 替代 v4l2_subdev_video_ops 实现格式相关的功能。 | ||
313 | |||
314 | 这种情况下,子设备驱动应该设置 link_validate 域,以提供它自身的链接 | ||
315 | 验证函数。链接验证函数应对管道(两端链接的都是 V4L2 子设备)中的每个 | ||
316 | 链接调用。驱动还要负责验证子设备和视频节点间格式配置的正确性。 | ||
317 | |||
318 | 如果 link_validate 操作没有设置,默认的 v4l2_subdev_link_validate_default() | ||
319 | 函数将会被调用。这个函数保证宽、高和媒体总线像素格式在链接的收发两端 | ||
320 | 都一致。子设备驱动除了它们自己的检测外,也可以自由使用这个函数以执行 | ||
321 | 上面提到的检查。 | ||
322 | |||
323 | 设备(桥)驱动程序必须向 v4l2_device 注册 v4l2_subdev: | ||
324 | |||
325 | int err = v4l2_device_register_subdev(v4l2_dev, sd); | ||
326 | |||
327 | 如果子设备模块在它注册前消失,这个操作可能失败。在这个函数成功返回后, | ||
328 | subdev->dev 域就指向了 v4l2_device。 | ||
329 | |||
330 | 如果 v4l2_device 父设备的 mdev 域为非 NULL 值,则子设备实体将被自动 | ||
331 | 注册为媒体设备。 | ||
332 | |||
333 | 注销子设备则可用如下函数: | ||
334 | |||
335 | v4l2_device_unregister_subdev(sd); | ||
336 | |||
337 | 此后,子设备模块就可卸载,且 sd->dev == NULL。 | ||
338 | |||
339 | 注册之设备后,可通过以下方式直接调用其操作函数: | ||
340 | |||
341 | err = sd->ops->core->g_chip_ident(sd, &chip); | ||
342 | |||
343 | 但使用如下宏会比较容易且合适: | ||
344 | |||
345 | err = v4l2_subdev_call(sd, core, g_chip_ident, &chip); | ||
346 | |||
347 | 这个宏将会做 NULL 指针检查,如果 subdev 为 NULL,则返回-ENODEV;如果 | ||
348 | subdev->core 或 subdev->core->g_chip_ident 为 NULL,则返回 -ENOIOCTLCMD; | ||
349 | 否则将返回 subdev->ops->core->g_chip_ident ops 调用的实际结果。 | ||
350 | |||
351 | 有时也可能同时调用所有或一系列子设备的某个操作函数: | ||
352 | |||
353 | v4l2_device_call_all(v4l2_dev, 0, core, g_chip_ident, &chip); | ||
354 | |||
355 | 任何不支持此操作的子设备都会被跳过,并忽略错误返回值。但如果你需要 | ||
356 | 检查出错码,则可使用如下函数: | ||
357 | |||
358 | err = v4l2_device_call_until_err(v4l2_dev, 0, core, g_chip_ident, &chip); | ||
359 | |||
360 | 除 -ENOIOCTLCMD 外的任何错误都会跳出循环并返回错误值。如果(除 -ENOIOCTLCMD | ||
361 | 外)没有错误发生,则返回 0。 | ||
362 | |||
363 | 对于以上两个函数的第二个参数为组 ID。如果为 0,则所有子设备都会执行 | ||
364 | 这个操作。如果为非 0 值,则只有那些组 ID 匹配的子设备才会执行此操作。 | ||
365 | 在桥驱动注册一个子设备前,可以设置 sd->grp_id 为任何期望值(默认值为 | ||
366 | 0)。这个值属于桥驱动,且子设备驱动将不会修改和使用它。 | ||
367 | |||
368 | 组 ID 赋予了桥驱动更多对于如何调用回调的控制。例如,电路板上有多个 | ||
369 | 音频芯片,每个都有改变音量的能力。但当用户想要改变音量的时候,通常 | ||
370 | 只有一个会被实际使用。你可以对这样的子设备设置组 ID 为(例如 AUDIO_CONTROLLER) | ||
371 | 并在调用 v4l2_device_call_all() 时指定它为组 ID 值。这就保证了只有 | ||
372 | 需要的子设备才会执行这个回调。 | ||
373 | |||
374 | 如果子设备需要通知它的 v4l2_device 父设备一个事件,可以调用 | ||
375 | v4l2_subdev_notify(sd, notification, arg)。这个宏检查是否有一个 | ||
376 | notify() 回调被注册,如果没有,返回 -ENODEV。否则返回 notify() 调用 | ||
377 | 结果。 | ||
378 | |||
379 | 使用 v4l2_subdev 的好处在于它是一个通用结构体,且不包含任何底层硬件 | ||
380 | 信息。所有驱动可以包含多个 I2C 总线的子设备,但也有子设备是通过 GPIO | ||
381 | 控制。这个区别仅在配置设备时有关系,一旦子设备注册完成,对于 v4l2 | ||
382 | 子系统来说就完全透明了。 | ||
383 | |||
384 | |||
385 | V4L2 子设备用户空间API | ||
386 | -------------------- | ||
387 | |||
388 | 除了通过 v4l2_subdev_ops 结构导出的内核 API,V4L2 子设备也可以直接 | ||
389 | 通过用户空间应用程序来控制。 | ||
390 | |||
391 | 可以在 /dev 中创建名为 v4l-subdevX 设备节点,以通过其直接访问子设备。 | ||
392 | 如果子设备支持用户空间直接配置,必须在注册前设置 V4L2_SUBDEV_FL_HAS_DEVNODE | ||
393 | 标志。 | ||
394 | |||
395 | 注册子设备之后, v4l2_device 驱动会通过调用 v4l2_device_register_subdev_nodes() | ||
396 | 函数为所有已注册并设置了 V4L2_SUBDEV_FL_HAS_DEVNODE 的子设备创建 | ||
397 | 设备节点。这些设备节点会在子设备注销时自动删除。 | ||
398 | |||
399 | 这些设备节点处理 V4L2 API 的一个子集。 | ||
400 | |||
401 | VIDIOC_QUERYCTRL | ||
402 | VIDIOC_QUERYMENU | ||
403 | VIDIOC_G_CTRL | ||
404 | VIDIOC_S_CTRL | ||
405 | VIDIOC_G_EXT_CTRLS | ||
406 | VIDIOC_S_EXT_CTRLS | ||
407 | VIDIOC_TRY_EXT_CTRLS | ||
408 | |||
409 | 这些 ioctls 控制与 V4L2 中定义的一致。他们行为相同,唯一的 | ||
410 | 不同是他们只处理子设备的控制实现。根据驱动程序,这些控制也 | ||
411 | 可以通过一个(或多个) V4L2 设备节点访问。 | ||
412 | |||
413 | VIDIOC_DQEVENT | ||
414 | VIDIOC_SUBSCRIBE_EVENT | ||
415 | VIDIOC_UNSUBSCRIBE_EVENT | ||
416 | |||
417 | 这些 ioctls 事件与 V4L2 中定义的一致。他们行为相同,唯一的 | ||
418 | 不同是他们只处理子设备产生的事件。根据驱动程序,这些事件也 | ||
419 | 可以通过一个(或多个) V4L2 设备节点上报。 | ||
420 | |||
421 | 要使用事件通知的子设备驱动,在注册子设备前必须在 v4l2_subdev::flags | ||
422 | 中设置 V4L2_SUBDEV_USES_EVENTS 并在 v4l2_subdev::nevents | ||
423 | 中初始化事件队列深度。注册完成后,事件会在 v4l2_subdev::devnode | ||
424 | 设备节点中像通常一样被排队。 | ||
425 | |||
426 | 为正确支持事件机制,poll() 文件操作也应被实现。 | ||
427 | |||
428 | 私有 ioctls | ||
429 | |||
430 | 不在以上列表中的所有 ioctls 会通过 core::ioctl 操作直接传递 | ||
431 | 给子设备驱动。 | ||
432 | |||
433 | |||
434 | I2C 子设备驱动 | ||
435 | ------------- | ||
436 | |||
437 | 由于这些驱动很常见,所以内特提供了特定的辅助函数(v4l2-common.h)让这些 | ||
438 | 设备的使用更加容易。 | ||
439 | |||
440 | 添加 v4l2_subdev 支持的推荐方法是让 I2C 驱动将 v4l2_subdev 结构体 | ||
441 | 嵌入到为每个 I2C 设备实例创建的状态结构体中。而最简单的设备没有状态 | ||
442 | 结构体,此时可以直接创建一个 v4l2_subdev 结构体。 | ||
443 | |||
444 | 一个典型的状态结构体如下所示(‘chipname’用芯片名代替): | ||
445 | |||
446 | struct chipname_state { | ||
447 | struct v4l2_subdev sd; | ||
448 | ... /* 附加的状态域*/ | ||
449 | }; | ||
450 | |||
451 | 初始化 v4l2_subdev 结构体的方法如下: | ||
452 | |||
453 | v4l2_i2c_subdev_init(&state->sd, client, subdev_ops); | ||
454 | |||
455 | 这个函数将填充 v4l2_subdev 结构体中的所有域,并保证 v4l2_subdev 和 | ||
456 | i2c_client 都指向彼此。 | ||
457 | |||
458 | 同时,你也应该为从 v4l2_subdev 指针找到 chipname_state 结构体指针 | ||
459 | 添加一个辅助内联函数。 | ||
460 | |||
461 | static inline struct chipname_state *to_state(struct v4l2_subdev *sd) | ||
462 | { | ||
463 | return container_of(sd, struct chipname_state, sd); | ||
464 | } | ||
465 | |||
466 | 使用以下函数可以通过 v4l2_subdev 结构体指针获得 i2c_client 结构体 | ||
467 | 指针: | ||
468 | |||
469 | struct i2c_client *client = v4l2_get_subdevdata(sd); | ||
470 | |||
471 | 而以下函数则相反,通过 i2c_client 结构体指针获得 v4l2_subdev 结构体 | ||
472 | 指针: | ||
473 | |||
474 | struct v4l2_subdev *sd = i2c_get_clientdata(client); | ||
475 | |||
476 | 当 remove()函数被调用前,必须保证先调用 v4l2_device_unregister_subdev(sd)。 | ||
477 | 此操作将会从桥驱动中注销子设备。即使子设备没有注册,调用此函数也是 | ||
478 | 安全的。 | ||
479 | |||
480 | 必须这样做的原因是:当桥驱动注销 i2c 适配器时,remove()回调函数 | ||
481 | 会被那个适配器上的 i2c 设备调用。此后,相应的 v4l2_subdev 结构体 | ||
482 | 就不存在了,所有它们必须先被注销。在 remove()回调函数中调用 | ||
483 | v4l2_device_unregister_subdev(sd),可以保证执行总是正确的。 | ||
484 | |||
485 | |||
486 | 桥驱动也有一些辅组函数可用: | ||
487 | |||
488 | struct v4l2_subdev *sd = v4l2_i2c_new_subdev(v4l2_dev, adapter, | ||
489 | "module_foo", "chipid", 0x36, NULL); | ||
490 | |||
491 | 这个函数会加载给定的模块(如果没有模块需要加载,可以为 NULL), | ||
492 | 并用给定的 i2c 适配器结构体指针(i2c_adapter)和 器件地址(chip/address) | ||
493 | 作为参数调用 i2c_new_device()。如果一切顺利,则就在 v4l2_device | ||
494 | 中注册了子设备。 | ||
495 | |||
496 | 你也可以利用 v4l2_i2c_new_subdev()的最后一个参数,传递一个可能的 | ||
497 | I2C 地址数组,让函数自动探测。这些探测地址只有在前一个参数为 0 的 | ||
498 | 情况下使用。非零参数意味着你知道准确的 i2c 地址,所以此时无须进行 | ||
499 | 探测。 | ||
500 | |||
501 | 如果出错,两个函数都返回 NULL。 | ||
502 | |||
503 | 注意:传递给 v4l2_i2c_new_subdev()的 chipid 通常与模块名一致。 | ||
504 | 它允许你指定一个芯片的变体,比如“saa7114”或“saa7115”。一般通过 | ||
505 | i2c 驱动自动探测。chipid 的使用是在今后需要深入了解的事情。这个与 | ||
506 | i2c 驱动不同,较容易混淆。要知道支持哪些芯片变体,你可以查阅 i2c | ||
507 | 驱动代码的 i2c_device_id 表,上面列出了所有可能支持的芯片。 | ||
508 | |||
509 | 还有两个辅助函数: | ||
510 | |||
511 | v4l2_i2c_new_subdev_cfg:这个函数添加新的 irq 和 platform_data | ||
512 | 参数,并有‘addr’和‘probed_addrs’参数:如果 addr 非零,则被使用 | ||
513 | (不探测变体),否则 probed_addrs 中的地址将用于自动探测。 | ||
514 | |||
515 | 例如:以下代码将会探测地址(0x10): | ||
516 | |||
517 | struct v4l2_subdev *sd = v4l2_i2c_new_subdev_cfg(v4l2_dev, adapter, | ||
518 | "module_foo", "chipid", 0, NULL, 0, I2C_ADDRS(0x10)); | ||
519 | |||
520 | v4l2_i2c_new_subdev_board 使用一个 i2c_board_info 结构体,将其 | ||
521 | 替代 irq、platform_data 和 add r参数传递给 i2c 驱动。 | ||
522 | |||
523 | 如果子设备支持 s_config 核心操作,这个操作会在子设备配置好之后以 irq 和 | ||
524 | platform_data 为参数调用。早期的 v4l2_i2c_new_(probed_)subdev 函数 | ||
525 | 同样也会调用 s_config,但仅在 irq 为 0 且 platform_data 为 NULL 时。 | ||
526 | |||
527 | video_device结构体 | ||
528 | ----------------- | ||
529 | |||
530 | 在 /dev 目录下的实际设备节点根据 video_device 结构体(v4l2-dev.h) | ||
531 | 创建。此结构体既可以动态分配也可以嵌入到一个更大的结构体中。 | ||
532 | |||
533 | 动态分配方法如下: | ||
534 | |||
535 | struct video_device *vdev = video_device_alloc(); | ||
536 | |||
537 | if (vdev == NULL) | ||
538 | return -ENOMEM; | ||
539 | |||
540 | vdev->release = video_device_release; | ||
541 | |||
542 | 如果将其嵌入到一个大结构体中,则必须自己实现 release()回调。 | ||
543 | |||
544 | struct video_device *vdev = &my_vdev->vdev; | ||
545 | |||
546 | vdev->release = my_vdev_release; | ||
547 | |||
548 | release()回调必须被设置,且在最后一个 video_device 用户退出之后 | ||
549 | 被调用。 | ||
550 | |||
551 | 默认的 video_device_release()回调只是调用 kfree 来释放之前分配的 | ||
552 | 内存。 | ||
553 | |||
554 | 你应该设置这些域: | ||
555 | |||
556 | - v4l2_dev: 设置为 v4l2_device 父设备。 | ||
557 | |||
558 | - name: 设置为唯一的描述性设备名。 | ||
559 | |||
560 | - fops: 设置为已有的 v4l2_file_operations 结构体。 | ||
561 | |||
562 | - ioctl_ops: 如果你使用v4l2_ioctl_ops 来简化 ioctl 的维护 | ||
563 | (强烈建议使用,且将来可能变为强制性的!),然后设置你自己的 | ||
564 | v4l2_ioctl_ops 结构体. | ||
565 | |||
566 | - lock: 如果你要在驱动中实现所有的锁操作,则设为 NULL 。否则 | ||
567 | 就要设置一个指向 struct mutex_lock 结构体的指针,这个锁将 | ||
568 | 在 unlocked_ioctl 文件操作被调用前由内核获得,并在调用返回后 | ||
569 | 释放。详见下一节。 | ||
570 | |||
571 | - prio: 保持对优先级的跟踪。用于实现 VIDIOC_G/S_PRIORITY。如果 | ||
572 | 设置为 NULL,则会使用 v4l2_device 中的 v4l2_prio_state 结构体。 | ||
573 | 如果要对每个设备节点(组)实现独立的优先级,可以将其指向自己 | ||
574 | 实现的 v4l2_prio_state 结构体。 | ||
575 | |||
576 | - parent: 仅在使用 NULL 作为父设备结构体参数注册 v4l2_device 时 | ||
577 | 设置此参数。只有在一个硬件设备包含多一个 PCI 设备,共享同一个 | ||
578 | v4l2_device 核心时才会发生。 | ||
579 | |||
580 | cx88 驱动就是一个例子:一个 v4l2_device 结构体核心,被一个裸的 | ||
581 | 视频 PCI 设备(cx8800)和一个 MPEG PCI 设备(cx8802)共用。由于 | ||
582 | v4l2_device 无法与特定的 PCI 设备关联,所有没有设置父设备。但当 | ||
583 | video_device 配置后,就知道使用哪个父 PCI 设备了。 | ||
584 | |||
585 | - flags:可选。如果你要让框架处理设置 VIDIOC_G/S_PRIORITY ioctls, | ||
586 | 请设置 V4L2_FL_USE_FH_PRIO。这要求你使用 v4l2_fh 结构体。 | ||
587 | 一旦所有驱动使用了核心的优先级处理,最终这个标志将消失。但现在它 | ||
588 | 必须被显式设置。 | ||
589 | |||
590 | 如果你使用 v4l2_ioctl_ops,则应该在 v4l2_file_operations 结构体中 | ||
591 | 设置 .unlocked_ioctl 指向 video_ioctl2。 | ||
592 | |||
593 | 请勿使用 .ioctl!它已被废弃,今后将消失。 | ||
594 | |||
595 | 某些情况下你要告诉核心:你在 v4l2_ioctl_ops 指定的某个函数应被忽略。 | ||
596 | 你可以在 video_device_register 被调用前通过以下函数标记这个 ioctls。 | ||
597 | |||
598 | void v4l2_disable_ioctl(struct video_device *vdev, unsigned int cmd); | ||
599 | |||
600 | 基于外部因素(例如某个板卡已被使用),在不创建新结构体的情况下,你想 | ||
601 | 要关闭 v4l2_ioctl_ops 中某个特性往往需要这个机制。 | ||
602 | |||
603 | v4l2_file_operations 结构体是 file_operations 的一个子集。其主要 | ||
604 | 区别在于:因 inode 参数从未被使用,它将被忽略。 | ||
605 | |||
606 | 如果需要与媒体框架整合,你必须通过调用 media_entity_init() 初始化 | ||
607 | 嵌入在 video_device 结构体中的 media_entity(entity 域)结构体: | ||
608 | |||
609 | struct media_pad *pad = &my_vdev->pad; | ||
610 | int err; | ||
611 | |||
612 | err = media_entity_init(&vdev->entity, 1, pad, 0); | ||
613 | |||
614 | pads 数组必须预先初始化。没有必要手动设置 media_entity 的 type 和 | ||
615 | name 域。 | ||
616 | |||
617 | 当(任何)子设备节点被打开/关闭,对 entity 的引用将被自动获取/释放。 | ||
618 | |||
619 | v4l2_file_operations 与锁 | ||
620 | -------------------------- | ||
621 | |||
622 | 你可以在 video_device 结构体中设置一个指向 mutex_lock 的指针。通常 | ||
623 | 这既可是一个顶层互斥锁也可为设备节点自身的互斥锁。默认情况下,此锁 | ||
624 | 用于 unlocked_ioctl,但为了使用 ioctls 你通过以下函数可禁用锁定: | ||
625 | |||
626 | void v4l2_disable_ioctl_locking(struct video_device *vdev, unsigned int cmd); | ||
627 | |||
628 | 例如: v4l2_disable_ioctl_locking(vdev, VIDIOC_DQBUF); | ||
629 | |||
630 | 你必须在注册 video_device 前调用这个函数。 | ||
631 | |||
632 | 特别是对于 USB 驱动程序,某些命令(如设置控制)需要很长的时间,可能 | ||
633 | 需要自行为缓冲区队列的 ioctls 实现锁定。 | ||
634 | |||
635 | 如果你需要更细粒度的锁,你必须设置 mutex_lock 为 NULL,并完全自己实现 | ||
636 | 锁机制。 | ||
637 | |||
638 | 这完全由驱动开发者决定使用何种方法。然而,如果你的驱动存在长延时操作 | ||
639 | (例如,改变 USB 摄像头的曝光时间可能需要较长时间),而你又想让用户 | ||
640 | 在等待长延时操作完成期间做其他的事,则你最好自己实现锁机制。 | ||
641 | |||
642 | 如果指定一个锁,则所有 ioctl 操作将在这个锁的作用下串行执行。如果你 | ||
643 | 使用 videobuf,则必须将同一个锁传递给 videobuf 队列初始化函数;如 | ||
644 | videobuf 必须等待一帧的到达,则可临时解锁并在这之后重新上锁。如果驱动 | ||
645 | 也在代码执行期间等待,则可做同样的工作(临时解锁,再上锁)让其他进程 | ||
646 | 可以在第一个进程阻塞时访问设备节点。 | ||
647 | |||
648 | 在使用 videobuf2 的情况下,必须实现 wait_prepare 和 wait_finish 回调 | ||
649 | 在适当的时候解锁/加锁。进一步来说,如果你在 video_device 结构体中使用 | ||
650 | 锁,则必须在 wait_prepare 和 wait_finish 中对这个互斥锁进行解锁/加锁。 | ||
651 | |||
652 | 热插拔的断开实现也必须在调用 v4l2_device_disconnect 前获得锁。 | ||
653 | |||
654 | video_device注册 | ||
655 | --------------- | ||
656 | |||
657 | 接下来你需要注册视频设备:这会为你创建一个字符设备。 | ||
658 | |||
659 | err = video_register_device(vdev, VFL_TYPE_GRABBER, -1); | ||
660 | if (err) { | ||
661 | video_device_release(vdev); /* or kfree(my_vdev); */ | ||
662 | return err; | ||
663 | } | ||
664 | |||
665 | 如果 v4l2_device 父设备的 mdev 域为非 NULL 值,视频设备实体将自动 | ||
666 | 注册为媒体设备。 | ||
667 | |||
668 | 注册哪种设备是根据类型(type)参数。存在以下类型: | ||
669 | |||
670 | VFL_TYPE_GRABBER: 用于视频输入/输出设备的 videoX | ||
671 | VFL_TYPE_VBI: 用于垂直消隐数据的 vbiX (例如,隐藏式字幕,图文电视) | ||
672 | VFL_TYPE_RADIO: 用于广播调谐器的 radioX | ||
673 | |||
674 | 最后一个参数让你确定一个所控制设备的设备节点号数量(例如 videoX 中的 X)。 | ||
675 | 通常你可以传入-1,让 v4l2 框架自己选择第一个空闲的编号。但是有时用户 | ||
676 | 需要选择一个特定的节点号。驱动允许用户通过驱动模块参数选择一个特定的 | ||
677 | 设备节点号是很普遍的。这个编号将会传递给这个函数,且 video_register_device | ||
678 | 将会试图选择这个设备节点号。如果这个编号被占用,下一个空闲的设备节点 | ||
679 | 编号将被选中,并向内核日志中发送一个警告信息。 | ||
680 | |||
681 | 另一个使用场景是当驱动创建多个设备时。这种情况下,对不同的视频设备在 | ||
682 | 编号上使用不同的范围是很有用的。例如,视频捕获设备从 0 开始,视频 | ||
683 | 输出设备从 16 开始。所以你可以使用最后一个参数来指定设备节点号最小值, | ||
684 | 而 v4l2 框架会试图选择第一个的空闲编号(等于或大于你提供的编号)。 | ||
685 | 如果失败,则它会就选择第一个空闲的编号。 | ||
686 | |||
687 | 由于这种情况下,你会忽略无法选择特定设备节点号的警告,则可调用 | ||
688 | video_register_device_no_warn() 函数避免警告信息的产生。 | ||
689 | |||
690 | 只要设备节点被创建,一些属性也会同时创建。在 /sys/class/video4linux | ||
691 | 目录中你会找到这些设备。例如进入其中的 video0 目录,你会看到‘name’和 | ||
692 | ‘index’属性。‘name’属性值就是 video_device 结构体中的‘name’域。 | ||
693 | |||
694 | ‘index’属性值就是设备节点的索引值:每次调用 video_register_device(), | ||
695 | 索引值都递增 1 。第一个视频设备节点总是从索引值 0 开始。 | ||
696 | |||
697 | 用户可以设置 udev 规则,利用索引属性生成花哨的设备名(例如:用‘mpegX’ | ||
698 | 代表 MPEG 视频捕获设备节点)。 | ||
699 | |||
700 | 在设备成功注册后,就可以使用这些域: | ||
701 | |||
702 | - vfl_type: 传递给 video_register_device 的设备类型。 | ||
703 | - minor: 已指派的次设备号。 | ||
704 | - num: 设备节点编号 (例如 videoX 中的 X)。 | ||
705 | - index: 设备索引号。 | ||
706 | |||
707 | 如果注册失败,你必须调用 video_device_release() 来释放已分配的 | ||
708 | video_device 结构体;如果 video_device 是嵌入在自己创建的结构体中, | ||
709 | 你也必须释放它。vdev->release() 回调不会在注册失败之后被调用, | ||
710 | 你也不应试图在注册失败后注销设备。 | ||
711 | |||
712 | |||
713 | video_device 注销 | ||
714 | ---------------- | ||
715 | |||
716 | 当视频设备节点已被移除,不论是卸载驱动还是USB设备断开,你都应注销 | ||
717 | 它们: | ||
718 | |||
719 | video_unregister_device(vdev); | ||
720 | |||
721 | 这个操作将从 sysfs 中移除设备节点(导致 udev 将其从 /dev 中移除)。 | ||
722 | |||
723 | video_unregister_device() 返回之后,就无法完成打开操作。尽管如此, | ||
724 | USB 设备的情况则不同,某些应用程序可能依然打开着其中一个已注销设备 | ||
725 | 节点。所以在注销之后,所有文件操作(当然除了 release )也应返回错误值。 | ||
726 | |||
727 | 当最后一个视频设备节点的用户退出,则 vdev->release() 回调会被调用, | ||
728 | 并且你可以做最后的清理操作。 | ||
729 | |||
730 | 不要忘记清理与视频设备相关的媒体入口(如果被初始化过): | ||
731 | |||
732 | media_entity_cleanup(&vdev->entity); | ||
733 | |||
734 | 这可以在 release 回调中完成。 | ||
735 | |||
736 | |||
737 | video_device 辅助函数 | ||
738 | --------------------- | ||
739 | |||
740 | 一些有用的辅助函数如下: | ||
741 | |||
742 | - file/video_device 私有数据 | ||
743 | |||
744 | 你可以用以下函数在 video_device 结构体中设置/获取驱动私有数据: | ||
745 | |||
746 | void *video_get_drvdata(struct video_device *vdev); | ||
747 | void video_set_drvdata(struct video_device *vdev, void *data); | ||
748 | |||
749 | 注意:在调用 video_register_device() 前执行 video_set_drvdata() | ||
750 | 是安全的。 | ||
751 | |||
752 | 而以下函数: | ||
753 | |||
754 | struct video_device *video_devdata(struct file *file); | ||
755 | |||
756 | 返回 file 结构体中拥有的的 video_device 指针。 | ||
757 | |||
758 | video_drvdata 辅助函数结合了 video_get_drvdata 和 video_devdata | ||
759 | 的功能: | ||
760 | |||
761 | void *video_drvdata(struct file *file); | ||
762 | |||
763 | 你可以使用如下代码从 video_device 结构体中获取 v4l2_device 结构体 | ||
764 | 指针: | ||
765 | |||
766 | struct v4l2_device *v4l2_dev = vdev->v4l2_dev; | ||
767 | |||
768 | - 设备节点名 | ||
769 | |||
770 | video_device 设备节点在内核中的名称可以通过以下函数获得 | ||
771 | |||
772 | const char *video_device_node_name(struct video_device *vdev); | ||
773 | |||
774 | 这个名字被用户空间工具(例如 udev)作为提示信息使用。应尽可能使用 | ||
775 | 此功能,而非访问 video_device::num 和 video_device::minor 域。 | ||
776 | |||
777 | |||
778 | 视频缓冲辅助函数 | ||
779 | --------------- | ||
780 | |||
781 | v4l2 核心 API 提供了一个处理视频缓冲的标准方法(称为“videobuf”)。 | ||
782 | 这些方法使驱动可以通过统一的方式实现 read()、mmap() 和 overlay()。 | ||
783 | 目前在设备上支持视频缓冲的方法有分散/聚集 DMA(videobuf-dma-sg)、 | ||
784 | 线性 DMA(videobuf-dma-contig)以及大多用于 USB 设备的用 vmalloc | ||
785 | 分配的缓冲(videobuf-vmalloc)。 | ||
786 | |||
787 | 请参阅 Documentation/video4linux/videobuf,以获得更多关于 videobuf | ||
788 | 层的使用信息。 | ||
789 | |||
790 | v4l2_fh 结构体 | ||
791 | ------------- | ||
792 | |||
793 | v4l2_fh 结构体提供一个保存用于 V4L2 框架的文件句柄特定数据的简单方法。 | ||
794 | 如果 video_device 的 flag 设置了 V4L2_FL_USE_FH_PRIO 标志,新驱动 | ||
795 | 必须使用 v4l2_fh 结构体,因为它也用于实现优先级处理(VIDIOC_G/S_PRIORITY)。 | ||
796 | |||
797 | v4l2_fh 的用户(位于 V4l2 框架中,并非驱动)可通过测试 | ||
798 | video_device->flags 中的 V4L2_FL_USES_V4L2_FH 位得知驱动是否使用 | ||
799 | v4l2_fh 作为他的 file->private_data 指针。这个位会在调用 v4l2_fh_init() | ||
800 | 时被设置。 | ||
801 | |||
802 | v4l2_fh 结构体作为驱动自身文件句柄结构体的一部分被分配,且驱动在 | ||
803 | 其打开函数中将 file->private_data 指向它。 | ||
804 | |||
805 | 在许多情况下,v4l2_fh 结构体会嵌入到一个更大的结构体中。这钟情况下, | ||
806 | 应该在 open() 中调用 v4l2_fh_init+v4l2_fh_add,并在 release() 中 | ||
807 | 调用 v4l2_fh_del+v4l2_fh_exit。 | ||
808 | |||
809 | 驱动可以通过使用 container_of 宏提取他们自己的文件句柄结构体。例如: | ||
810 | |||
811 | struct my_fh { | ||
812 | int blah; | ||
813 | struct v4l2_fh fh; | ||
814 | }; | ||
815 | |||
816 | ... | ||
817 | |||
818 | int my_open(struct file *file) | ||
819 | { | ||
820 | struct my_fh *my_fh; | ||
821 | struct video_device *vfd; | ||
822 | int ret; | ||
823 | |||
824 | ... | ||
825 | |||
826 | my_fh = kzalloc(sizeof(*my_fh), GFP_KERNEL); | ||
827 | |||
828 | ... | ||
829 | |||
830 | v4l2_fh_init(&my_fh->fh, vfd); | ||
831 | |||
832 | ... | ||
833 | |||
834 | file->private_data = &my_fh->fh; | ||
835 | v4l2_fh_add(&my_fh->fh); | ||
836 | return 0; | ||
837 | } | ||
838 | |||
839 | int my_release(struct file *file) | ||
840 | { | ||
841 | struct v4l2_fh *fh = file->private_data; | ||
842 | struct my_fh *my_fh = container_of(fh, struct my_fh, fh); | ||
843 | |||
844 | ... | ||
845 | v4l2_fh_del(&my_fh->fh); | ||
846 | v4l2_fh_exit(&my_fh->fh); | ||
847 | kfree(my_fh); | ||
848 | return 0; | ||
849 | } | ||
850 | |||
851 | 以下是 v4l2_fh 函数使用的简介: | ||
852 | |||
853 | void v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev) | ||
854 | |||
855 | 初始化文件句柄。这*必须*在驱动的 v4l2_file_operations->open() | ||
856 | 函数中执行。 | ||
857 | |||
858 | void v4l2_fh_add(struct v4l2_fh *fh) | ||
859 | |||
860 | 添加一个 v4l2_fh 到 video_device 文件句柄列表。一旦文件句柄 | ||
861 | 初始化完成就必须调用。 | ||
862 | |||
863 | void v4l2_fh_del(struct v4l2_fh *fh) | ||
864 | |||
865 | 从 video_device() 中解除文件句柄的关联。文件句柄的退出函数也 | ||
866 | 将被调用。 | ||
867 | |||
868 | void v4l2_fh_exit(struct v4l2_fh *fh) | ||
869 | |||
870 | 清理文件句柄。在清理完 v4l2_fh 后,相关内存会被释放。 | ||
871 | |||
872 | |||
873 | 如果 v4l2_fh 不是嵌入在其他结构体中的,则可以用这些辅助函数: | ||
874 | |||
875 | int v4l2_fh_open(struct file *filp) | ||
876 | |||
877 | 分配一个 v4l2_fh 结构体空间,初始化并将其添加到 file 结构体相关的 | ||
878 | video_device 结构体中。 | ||
879 | |||
880 | int v4l2_fh_release(struct file *filp) | ||
881 | |||
882 | 从 file 结构体相关的 video_device 结构体中删除 v4l2_fh ,清理 | ||
883 | v4l2_fh 并释放空间。 | ||
884 | |||
885 | 这两个函数可以插入到 v4l2_file_operation 的 open() 和 release() | ||
886 | 操作中。 | ||
887 | |||
888 | |||
889 | 某些驱动需要在第一个文件句柄打开和最后一个文件句柄关闭的时候做些 | ||
890 | 工作。所以加入了两个辅助函数以检查 v4l2_fh 结构体是否是相关设备 | ||
891 | 节点打开的唯一文件句柄。 | ||
892 | |||
893 | int v4l2_fh_is_singular(struct v4l2_fh *fh) | ||
894 | |||
895 | 如果此文件句柄是唯一打开的文件句柄,则返回 1 ,否则返回 0 。 | ||
896 | |||
897 | int v4l2_fh_is_singular_file(struct file *filp) | ||
898 | |||
899 | 功能相同,但通过 filp->private_data 调用 v4l2_fh_is_singular。 | ||
900 | |||
901 | |||
902 | V4L2 事件机制 | ||
903 | ----------- | ||
904 | |||
905 | V4L2 事件机制提供了一个通用的方法将事件传递到用户空间。驱动必须使用 | ||
906 | v4l2_fh 才能支持 V4L2 事件机制。 | ||
907 | |||
908 | |||
909 | 事件通过一个类型和选择 ID 来定义。ID 对应一个 V4L2 对象,例如 | ||
910 | 一个控制 ID。如果未使用,则 ID 为 0。 | ||
911 | |||
912 | 当用户订阅一个事件,驱动会为此分配一些 kevent 结构体。所以每个 | ||
913 | 事件组(类型、ID)都会有自己的一套 kevent 结构体。这保证了如果 | ||
914 | 一个驱动短时间内产生了许多同类事件,不会覆盖其他类型的事件。 | ||
915 | |||
916 | 但如果你收到的事件数量大于同类事件 kevent 的保存数量,则最早的 | ||
917 | 事件将被丢弃,并加入新事件。 | ||
918 | |||
919 | 此外,v4l2_subscribed_event 结构体内部有可供驱动设置的 merge() 和 | ||
920 | replace() 回调,这些回调会在新事件产生且没有多余空间的时候被调用。 | ||
921 | replace() 回调让你可以将早期事件的净荷替换为新事件的净荷,将早期 | ||
922 | 净荷的相关数据合并到替换进来的新净荷中。当该类型的事件仅分配了一个 | ||
923 | kevent 结构体时,它将被调用。merge() 回调让你可以合并最早的事件净荷 | ||
924 | 到在它之后的那个事件净荷中。当该类型的事件分配了两个或更多 kevent | ||
925 | 结构体时,它将被调用。 | ||
926 | |||
927 | 这种方法不会有状态信息丢失,只会导致中间步骤信息丢失。 | ||
928 | |||
929 | |||
930 | 关于 replace/merge 回调的一个不错的例子在 v4l2-event.c 中:用于 | ||
931 | 控制事件的 ctrls_replace() 和 ctrls_merge() 回调。 | ||
932 | |||
933 | 注意:这些回调可以在中断上下文中调用,所以它们必须尽快完成并退出。 | ||
934 | |||
935 | 有用的函数: | ||
936 | |||
937 | void v4l2_event_queue(struct video_device *vdev, const struct v4l2_event *ev) | ||
938 | |||
939 | 将事件加入视频设备的队列。驱动仅负责填充 type 和 data 域。 | ||
940 | 其他域由 V4L2 填充。 | ||
941 | |||
942 | int v4l2_event_subscribe(struct v4l2_fh *fh, | ||
943 | struct v4l2_event_subscription *sub, unsigned elems, | ||
944 | const struct v4l2_subscribed_event_ops *ops) | ||
945 | |||
946 | video_device->ioctl_ops->vidioc_subscribe_event 必须检测驱动能 | ||
947 | 产生特定 id 的事件。然后调用 v4l2_event_subscribe() 来订阅该事件。 | ||
948 | |||
949 | elems 参数是该事件的队列大小。若为 0,V4L2 框架将会(根据事件类型) | ||
950 | 填充默认值。 | ||
951 | |||
952 | ops 参数允许驱动指定一系列回调: | ||
953 | * add: 当添加一个新监听者时调用(重复订阅同一个事件,此回调 | ||
954 | 仅被执行一次)。 | ||
955 | * del: 当一个监听者停止监听时调用。 | ||
956 | * replace: 用‘新’事件替换‘早期‘事件。 | ||
957 | * merge: 将‘早期‘事件合并到‘新’事件中。 | ||
958 | 这四个调用都是可选的,如果不想指定任何回调,则 ops 可为 NULL。 | ||
959 | |||
960 | int v4l2_event_unsubscribe(struct v4l2_fh *fh, | ||
961 | struct v4l2_event_subscription *sub) | ||
962 | |||
963 | v4l2_ioctl_ops 结构体中的 vidioc_unsubscribe_event 回调函数。 | ||
964 | 驱动程序可以直接使用 v4l2_event_unsubscribe() 实现退订事件过程。 | ||
965 | |||
966 | 特殊的 V4L2_EVENT_ALL 类型,可用于退订所有事件。驱动可能在特殊 | ||
967 | 情况下需要做此操作。 | ||
968 | |||
969 | int v4l2_event_pending(struct v4l2_fh *fh) | ||
970 | |||
971 | 返回未决事件的数量。有助于实现轮询(poll)操作。 | ||
972 | |||
973 | 事件通过 poll 系统调用传递到用户空间。驱动可用 | ||
974 | v4l2_fh->wait (wait_queue_head_t 类型)作为参数调用 poll_wait()。 | ||
975 | |||
976 | 事件分为标准事件和私有事件。新的标准事件必须使用可用的最小事件类型 | ||
977 | 编号。驱动必须从他们本类型的编号起始处分配事件。类型的编号起始为 | ||
978 | V4L2_EVENT_PRIVATE_START + n * 1000 ,其中 n 为可用最小编号。每个 | ||
979 | 类型中的第一个事件类型编号是为以后的使用保留的,所以第一个可用事件 | ||
980 | 类型编号是‘class base + 1’。 | ||
981 | |||
982 | V4L2 事件机制的使用实例可以在 OMAP3 ISP 的驱动 | ||
983 | (drivers/media/video/omap3isp)中找到。 | ||