diff options
Diffstat (limited to 'Documentation')
560 files changed, 10518 insertions, 4170 deletions
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-arvo b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-arvo index 55e281b0071a..55e281b0071a 100644 --- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-arvo +++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-arvo | |||
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-isku b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-isku index c601d0f2ac46..c601d0f2ac46 100644 --- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-isku +++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-isku | |||
diff --git a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus index 833fd59926a7..545e69f43229 100644 --- a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus +++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus | |||
@@ -1,3 +1,14 @@ | |||
1 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/actual_profile | ||
2 | Date: October 2010 | ||
3 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
4 | Description: The integer value of this attribute ranges from 0-4. | ||
5 | When read, this attribute returns the number of the actual | ||
6 | profile. This value is persistent, so its equivalent to the | ||
7 | profile that's active when the mouse is powered on next time. | ||
8 | When written, this file sets the number of the startup profile | ||
9 | and the mouse activates this profile immediately. | ||
10 | Users: http://roccat.sourceforge.net | ||
11 | |||
1 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/startup_profile | 12 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/startup_profile |
2 | Date: October 2010 | 13 | Date: October 2010 |
3 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 14 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
@@ -22,6 +33,40 @@ Description: When read, this file returns the raw integer version number of the | |||
22 | Please read binary attribute info which contains firmware version. | 33 | Please read binary attribute info which contains firmware version. |
23 | Users: http://roccat.sourceforge.net | 34 | Users: http://roccat.sourceforge.net |
24 | 35 | ||
36 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/info | ||
37 | Date: November 2012 | ||
38 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
39 | Description: When read, this file returns general data like firmware version. | ||
40 | When written, the device can be reset. | ||
41 | The data is 8 bytes long. | ||
42 | Users: http://roccat.sourceforge.net | ||
43 | |||
44 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/macro | ||
45 | Date: October 2010 | ||
46 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
47 | Description: The mouse can store a macro with max 500 key/button strokes | ||
48 | internally. | ||
49 | When written, this file lets one set the sequence for a specific | ||
50 | button for a specific profile. Button and profile numbers are | ||
51 | included in written data. The data has to be 2082 bytes long. | ||
52 | This file is writeonly. | ||
53 | Users: http://roccat.sourceforge.net | ||
54 | |||
55 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile_buttons | ||
56 | Date: August 2010 | ||
57 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
58 | Description: The mouse can store 5 profiles which can be switched by the | ||
59 | press of a button. A profile is split in settings and buttons. | ||
60 | profile_buttons holds information about button layout. | ||
61 | When written, this file lets one write the respective profile | ||
62 | buttons back to the mouse. The data has to be 77 bytes long. | ||
63 | The mouse will reject invalid data. | ||
64 | Which profile to write is determined by the profile number | ||
65 | contained in the data. | ||
66 | Before reading this file, control has to be written to select | ||
67 | which profile to read. | ||
68 | Users: http://roccat.sourceforge.net | ||
69 | |||
25 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile[1-5]_buttons | 70 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile[1-5]_buttons |
26 | Date: August 2010 | 71 | Date: August 2010 |
27 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 72 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
@@ -34,6 +79,22 @@ Description: The mouse can store 5 profiles which can be switched by the | |||
34 | Write control to select profile and read profile_buttons instead. | 79 | Write control to select profile and read profile_buttons instead. |
35 | Users: http://roccat.sourceforge.net | 80 | Users: http://roccat.sourceforge.net |
36 | 81 | ||
82 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile_settings | ||
83 | Date: October 2010 | ||
84 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
85 | Description: The mouse can store 5 profiles which can be switched by the | ||
86 | press of a button. A profile is split in settings and buttons. | ||
87 | profile_settings holds information like resolution, sensitivity | ||
88 | and light effects. | ||
89 | When written, this file lets one write the respective profile | ||
90 | settings back to the mouse. The data has to be 43 bytes long. | ||
91 | The mouse will reject invalid data. | ||
92 | Which profile to write is determined by the profile number | ||
93 | contained in the data. | ||
94 | Before reading this file, control has to be written to select | ||
95 | which profile to read. | ||
96 | Users: http://roccat.sourceforge.net | ||
97 | |||
37 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile[1-5]_settings | 98 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile[1-5]_settings |
38 | Date: August 2010 | 99 | Date: August 2010 |
39 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 100 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
@@ -45,4 +106,40 @@ Description: The mouse can store 5 profiles which can be switched by the | |||
45 | The returned data is 43 bytes in size. | 106 | The returned data is 43 bytes in size. |
46 | This file is readonly. | 107 | This file is readonly. |
47 | Write control to select profile and read profile_settings instead. | 108 | Write control to select profile and read profile_settings instead. |
48 | Users: http://roccat.sourceforge.net \ No newline at end of file | 109 | Users: http://roccat.sourceforge.net |
110 | |||
111 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/sensor | ||
112 | Date: October 2010 | ||
113 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
114 | Description: The mouse has a tracking- and a distance-control-unit. These | ||
115 | can be activated/deactivated and the lift-off distance can be | ||
116 | set. The data has to be 6 bytes long. | ||
117 | This file is writeonly. | ||
118 | Users: http://roccat.sourceforge.net | ||
119 | |||
120 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/talk | ||
121 | Date: May 2011 | ||
122 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
123 | Description: Used to active some easy* functions of the mouse from outside. | ||
124 | The data has to be 16 bytes long. | ||
125 | This file is writeonly. | ||
126 | Users: http://roccat.sourceforge.net | ||
127 | |||
128 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/tcu | ||
129 | Date: October 2010 | ||
130 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
131 | Description: When written a calibration process for the tracking control unit | ||
132 | can be initiated/cancelled. Also lets one read/write sensor | ||
133 | registers. | ||
134 | The data has to be 4 bytes long. | ||
135 | Users: http://roccat.sourceforge.net | ||
136 | |||
137 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/tcu_image | ||
138 | Date: October 2010 | ||
139 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
140 | Description: When read the mouse returns a 30x30 pixel image of the | ||
141 | sampled underground. This works only in the course of a | ||
142 | calibration process initiated with tcu. | ||
143 | The returned data is 1028 bytes in size. | ||
144 | This file is readonly. | ||
145 | Users: http://roccat.sourceforge.net | ||
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-konepure b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-konepure index 41a9b7fbfc79..41a9b7fbfc79 100644 --- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-konepure +++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-konepure | |||
diff --git a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-kovaplus b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-kovaplus index 4a98e02b6c6a..ab01631e1e0f 100644 --- a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-kovaplus +++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-kovaplus | |||
@@ -8,6 +8,17 @@ Description: The integer value of this attribute ranges from 1-4. | |||
8 | Has never been used. If bookkeeping is done, it's done in userland tools. | 8 | Has never been used. If bookkeeping is done, it's done in userland tools. |
9 | Users: http://roccat.sourceforge.net | 9 | Users: http://roccat.sourceforge.net |
10 | 10 | ||
11 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_profile | ||
12 | Date: January 2011 | ||
13 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
14 | Description: The integer value of this attribute ranges from 0-4. | ||
15 | When read, this attribute returns the number of the active | ||
16 | profile. | ||
17 | When written, the mouse activates this profile immediately. | ||
18 | The profile that's active when powered down is the same that's | ||
19 | active when the mouse is powered on. | ||
20 | Users: http://roccat.sourceforge.net | ||
21 | |||
11 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_sensitivity_x | 22 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_sensitivity_x |
12 | Date: January 2011 | 23 | Date: January 2011 |
13 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 24 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
@@ -40,6 +51,29 @@ Description: When read, this file returns the raw integer version number of the | |||
40 | Obsoleted by binary sysfs attribute "info". | 51 | Obsoleted by binary sysfs attribute "info". |
41 | Users: http://roccat.sourceforge.net | 52 | Users: http://roccat.sourceforge.net |
42 | 53 | ||
54 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/info | ||
55 | Date: November 2012 | ||
56 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
57 | Description: When read, this file returns general data like firmware version. | ||
58 | When written, the device can be reset. | ||
59 | The data is 6 bytes long. | ||
60 | Users: http://roccat.sourceforge.net | ||
61 | |||
62 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile_buttons | ||
63 | Date: January 2011 | ||
64 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
65 | Description: The mouse can store 5 profiles which can be switched by the | ||
66 | press of a button. A profile is split in settings and buttons. | ||
67 | profile_buttons holds information about button layout. | ||
68 | When written, this file lets one write the respective profile | ||
69 | buttons back to the mouse. The data has to be 23 bytes long. | ||
70 | The mouse will reject invalid data. | ||
71 | Which profile to write is determined by the profile number | ||
72 | contained in the data. | ||
73 | Before reading this file, control has to be written to select | ||
74 | which profile to read. | ||
75 | Users: http://roccat.sourceforge.net | ||
76 | |||
43 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_buttons | 77 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_buttons |
44 | Date: January 2011 | 78 | Date: January 2011 |
45 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 79 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
@@ -52,6 +86,22 @@ Description: The mouse can store 5 profiles which can be switched by the | |||
52 | Write control to select profile and read profile_buttons instead. | 86 | Write control to select profile and read profile_buttons instead. |
53 | Users: http://roccat.sourceforge.net | 87 | Users: http://roccat.sourceforge.net |
54 | 88 | ||
89 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile_settings | ||
90 | Date: January 2011 | ||
91 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
92 | Description: The mouse can store 5 profiles which can be switched by the | ||
93 | press of a button. A profile is split in settings and buttons. | ||
94 | profile_settings holds information like resolution, sensitivity | ||
95 | and light effects. | ||
96 | When written, this file lets one write the respective profile | ||
97 | settings back to the mouse. The data has to be 16 bytes long. | ||
98 | The mouse will reject invalid data. | ||
99 | Which profile to write is determined by the profile number | ||
100 | contained in the data. | ||
101 | Before reading this file, control has to be written to select | ||
102 | which profile to read. | ||
103 | Users: http://roccat.sourceforge.net | ||
104 | |||
55 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_settings | 105 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_settings |
56 | Date: January 2011 | 106 | Date: January 2011 |
57 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 107 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-lua b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-lua index 31c6c4c8ba2b..31c6c4c8ba2b 100644 --- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-lua +++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-lua | |||
diff --git a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-pyra b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-pyra index 87ac87e9556d..16020b31ae64 100644 --- a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-pyra +++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-pyra | |||
@@ -37,6 +37,29 @@ Description: When read, this file returns the raw integer version number of the | |||
37 | Please use binary attribute "info" which provides this information. | 37 | Please use binary attribute "info" which provides this information. |
38 | Users: http://roccat.sourceforge.net | 38 | Users: http://roccat.sourceforge.net |
39 | 39 | ||
40 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/info | ||
41 | Date: November 2012 | ||
42 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
43 | Description: When read, this file returns general data like firmware version. | ||
44 | When written, the device can be reset. | ||
45 | The data is 6 bytes long. | ||
46 | Users: http://roccat.sourceforge.net | ||
47 | |||
48 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_buttons | ||
49 | Date: August 2010 | ||
50 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
51 | Description: The mouse can store 5 profiles which can be switched by the | ||
52 | press of a button. A profile is split in settings and buttons. | ||
53 | profile_buttons holds information about button layout. | ||
54 | When written, this file lets one write the respective profile | ||
55 | buttons back to the mouse. The data has to be 19 bytes long. | ||
56 | The mouse will reject invalid data. | ||
57 | Which profile to write is determined by the profile number | ||
58 | contained in the data. | ||
59 | Before reading this file, control has to be written to select | ||
60 | which profile to read. | ||
61 | Users: http://roccat.sourceforge.net | ||
62 | |||
40 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile[1-5]_buttons | 63 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile[1-5]_buttons |
41 | Date: August 2010 | 64 | Date: August 2010 |
42 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 65 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
@@ -49,6 +72,22 @@ Description: The mouse can store 5 profiles which can be switched by the | |||
49 | Write control to select profile and read profile_buttons instead. | 72 | Write control to select profile and read profile_buttons instead. |
50 | Users: http://roccat.sourceforge.net | 73 | Users: http://roccat.sourceforge.net |
51 | 74 | ||
75 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_settings | ||
76 | Date: August 2010 | ||
77 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
78 | Description: The mouse can store 5 profiles which can be switched by the | ||
79 | press of a button. A profile is split in settings and buttons. | ||
80 | profile_settings holds information like resolution, sensitivity | ||
81 | and light effects. | ||
82 | When written, this file lets one write the respective profile | ||
83 | settings back to the mouse. The data has to be 13 bytes long. | ||
84 | The mouse will reject invalid data. | ||
85 | Which profile to write is determined by the profile number | ||
86 | contained in the data. | ||
87 | Before reading this file, control has to be written to select | ||
88 | which profile to read. | ||
89 | Users: http://roccat.sourceforge.net | ||
90 | |||
52 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile[1-5]_settings | 91 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile[1-5]_settings |
53 | Date: August 2010 | 92 | Date: August 2010 |
54 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 93 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
@@ -62,6 +101,17 @@ Description: The mouse can store 5 profiles which can be switched by the | |||
62 | Write control to select profile and read profile_settings instead. | 101 | Write control to select profile and read profile_settings instead. |
63 | Users: http://roccat.sourceforge.net | 102 | Users: http://roccat.sourceforge.net |
64 | 103 | ||
104 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/settings | ||
105 | Date: August 2010 | ||
106 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
107 | Description: When read, this file returns the settings stored in the mouse. | ||
108 | The size of the data is 3 bytes and holds information on the | ||
109 | startup_profile. | ||
110 | When written, this file lets write settings back to the mouse. | ||
111 | The data has to be 3 bytes long. The mouse will reject invalid | ||
112 | data. | ||
113 | Users: http://roccat.sourceforge.net | ||
114 | |||
65 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/startup_profile | 115 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/startup_profile |
66 | Date: August 2010 | 116 | Date: August 2010 |
67 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 117 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-ryos b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-ryos index 1d6a8cf9dc0a..1d6a8cf9dc0a 100644 --- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-ryos +++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-ryos | |||
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-savu index f1e02a98bd9d..f1e02a98bd9d 100644 --- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu +++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-savu | |||
diff --git a/Documentation/ABI/stable/sysfs-class-tpm b/Documentation/ABI/stable/sysfs-class-tpm index 9f790eebb5d2..c0e23830f56a 100644 --- a/Documentation/ABI/stable/sysfs-class-tpm +++ b/Documentation/ABI/stable/sysfs-class-tpm | |||
@@ -116,7 +116,7 @@ Description: The "pubek" property will return the TPM's public endorsement | |||
116 | owner's authorization. Since the TPM driver doesn't store any | 116 | owner's authorization. Since the TPM driver doesn't store any |
117 | secrets, it can't authorize its own request for the pubek, | 117 | secrets, it can't authorize its own request for the pubek, |
118 | making it unaccessible. The public endorsement key is gener- | 118 | making it unaccessible. The public endorsement key is gener- |
119 | ated at TPM menufacture time and exists for the life of the | 119 | ated at TPM manufacture time and exists for the life of the |
120 | chip. | 120 | chip. |
121 | 121 | ||
122 | Example output: | 122 | Example output: |
@@ -163,7 +163,7 @@ Date: April 2006 | |||
163 | KernelVersion: 2.6.17 | 163 | KernelVersion: 2.6.17 |
164 | Contact: tpmdd-devel@lists.sf.net | 164 | Contact: tpmdd-devel@lists.sf.net |
165 | Description: The "temp_deactivated" property returns a '1' if the chip has | 165 | Description: The "temp_deactivated" property returns a '1' if the chip has |
166 | been temporarily dectivated, usually until the next power | 166 | been temporarily deactivated, usually until the next power |
167 | cycle. Whether a warm boot (reboot) will clear a TPM chip | 167 | cycle. Whether a warm boot (reboot) will clear a TPM chip |
168 | from a temp_deactivated state is platform specific. | 168 | from a temp_deactivated state is platform specific. |
169 | 169 | ||
diff --git a/Documentation/ABI/stable/sysfs-firmware-opal-elog b/Documentation/ABI/stable/sysfs-firmware-opal-elog index e1f3058f5954..2536434d49d0 100644 --- a/Documentation/ABI/stable/sysfs-firmware-opal-elog +++ b/Documentation/ABI/stable/sysfs-firmware-opal-elog | |||
@@ -57,4 +57,4 @@ Description: | |||
57 | Shortly after acknowledging it, the log | 57 | Shortly after acknowledging it, the log |
58 | entry will be removed from sysfs. | 58 | entry will be removed from sysfs. |
59 | Reading this file will list the supported | 59 | Reading this file will list the supported |
60 | operations (curently just acknowledge). \ No newline at end of file | 60 | operations (currently just acknowledge). |
diff --git a/Documentation/ABI/testing/configfs-stp-policy b/Documentation/ABI/testing/configfs-stp-policy new file mode 100644 index 000000000000..421ce6825c66 --- /dev/null +++ b/Documentation/ABI/testing/configfs-stp-policy | |||
@@ -0,0 +1,48 @@ | |||
1 | What: /config/stp-policy | ||
2 | Date: June 2015 | ||
3 | KernelVersion: 4.3 | ||
4 | Description: | ||
5 | This group contains policies mandating Master/Channel allocation | ||
6 | for software sources wishing to send trace data over an STM | ||
7 | device. | ||
8 | |||
9 | What: /config/stp-policy/<device>.<policy> | ||
10 | Date: June 2015 | ||
11 | KernelVersion: 4.3 | ||
12 | Description: | ||
13 | This group is the root of a policy; its name is a concatenation | ||
14 | of an stm device name to which this policy applies and an | ||
15 | arbitrary string. If <device> part doesn't match an existing | ||
16 | stm device, mkdir will fail with ENODEV; if that device already | ||
17 | has a policy assigned to it, mkdir will fail with EBUSY. | ||
18 | |||
19 | What: /config/stp-policy/<device>.<policy>/device | ||
20 | Date: June 2015 | ||
21 | KernelVersion: 4.3 | ||
22 | Description: | ||
23 | STM device to which this policy applies, read only. Same as the | ||
24 | <device> component of its parent directory. | ||
25 | |||
26 | What: /config/stp-policy/<device>.<policy>/<node> | ||
27 | Date: June 2015 | ||
28 | KernelVersion: 4.3 | ||
29 | Description: | ||
30 | Policy node is a string identifier that software clients will | ||
31 | use to request a master/channel to be allocated and assigned to | ||
32 | them. | ||
33 | |||
34 | What: /config/stp-policy/<device>.<policy>/<node>/masters | ||
35 | Date: June 2015 | ||
36 | KernelVersion: 4.3 | ||
37 | Description: | ||
38 | Range of masters from which to allocate for users of this node. | ||
39 | Write two numbers: the first master and the last master number. | ||
40 | |||
41 | What: /config/stp-policy/<device>.<policy>/<node>/channels | ||
42 | Date: June 2015 | ||
43 | KernelVersion: 4.3 | ||
44 | Description: | ||
45 | Range of channels from which to allocate for users of this node. | ||
46 | Write two numbers: the first channel and the last channel | ||
47 | number. | ||
48 | |||
diff --git a/Documentation/ABI/testing/sysfs-block b/Documentation/ABI/testing/sysfs-block index 8df003963d99..71d184dbb70d 100644 --- a/Documentation/ABI/testing/sysfs-block +++ b/Documentation/ABI/testing/sysfs-block | |||
@@ -60,6 +60,13 @@ Description: | |||
60 | Indicates whether a storage device is capable of storing | 60 | Indicates whether a storage device is capable of storing |
61 | integrity metadata. Set if the device is T10 PI-capable. | 61 | integrity metadata. Set if the device is T10 PI-capable. |
62 | 62 | ||
63 | What: /sys/block/<disk>/integrity/protection_interval_bytes | ||
64 | Date: July 2015 | ||
65 | Contact: Martin K. Petersen <martin.petersen@oracle.com> | ||
66 | Description: | ||
67 | Describes the number of data bytes which are protected | ||
68 | by one integrity tuple. Typically the device's logical | ||
69 | block size. | ||
63 | 70 | ||
64 | What: /sys/block/<disk>/integrity/write_generate | 71 | What: /sys/block/<disk>/integrity/write_generate |
65 | Date: June 2008 | 72 | Date: June 2008 |
diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm3x b/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm3x index d72ca1736ba4..924265a1295d 100644 --- a/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm3x +++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm3x | |||
@@ -8,13 +8,6 @@ Description: (RW) Enable/disable tracing on this specific trace entiry. | |||
8 | of coresight components linking the source to the sink is | 8 | of coresight components linking the source to the sink is |
9 | configured and managed automatically by the coresight framework. | 9 | configured and managed automatically by the coresight framework. |
10 | 10 | ||
11 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/status | ||
12 | Date: November 2014 | ||
13 | KernelVersion: 3.19 | ||
14 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
15 | Description: (R) List various control and status registers. The specific | ||
16 | layout and content is driver specific. | ||
17 | |||
18 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/addr_idx | 11 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/addr_idx |
19 | Date: November 2014 | 12 | Date: November 2014 |
20 | KernelVersion: 3.19 | 13 | KernelVersion: 3.19 |
@@ -251,3 +244,79 @@ Date: November 2014 | |||
251 | KernelVersion: 3.19 | 244 | KernelVersion: 3.19 |
252 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | 245 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
253 | Description: (RW) Define the event that controls the trigger. | 246 | Description: (RW) Define the event that controls the trigger. |
247 | |||
248 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/cpu | ||
249 | Date: October 2015 | ||
250 | KernelVersion: 4.4 | ||
251 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
252 | Description: (RO) Holds the cpu number this tracer is affined to. | ||
253 | |||
254 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmccr | ||
255 | Date: September 2015 | ||
256 | KernelVersion: 4.4 | ||
257 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
258 | Description: (RO) Print the content of the ETM Configuration Code register | ||
259 | (0x004). The value is read directly from the HW. | ||
260 | |||
261 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmccer | ||
262 | Date: September 2015 | ||
263 | KernelVersion: 4.4 | ||
264 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
265 | Description: (RO) Print the content of the ETM Configuration Code Extension | ||
266 | register (0x1e8). The value is read directly from the HW. | ||
267 | |||
268 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmscr | ||
269 | Date: September 2015 | ||
270 | KernelVersion: 4.4 | ||
271 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
272 | Description: (RO) Print the content of the ETM System Configuration | ||
273 | register (0x014). The value is read directly from the HW. | ||
274 | |||
275 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmidr | ||
276 | Date: September 2015 | ||
277 | KernelVersion: 4.4 | ||
278 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
279 | Description: (RO) Print the content of the ETM ID register (0x1e4). The | ||
280 | value is read directly from the HW. | ||
281 | |||
282 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmcr | ||
283 | Date: September 2015 | ||
284 | KernelVersion: 4.4 | ||
285 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
286 | Description: (RO) Print the content of the ETM Main Control register (0x000). | ||
287 | The value is read directly from the HW. | ||
288 | |||
289 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmtraceidr | ||
290 | Date: September 2015 | ||
291 | KernelVersion: 4.4 | ||
292 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
293 | Description: (RO) Print the content of the ETM Trace ID register (0x200). | ||
294 | The value is read directly from the HW. | ||
295 | |||
296 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmteevr | ||
297 | Date: September 2015 | ||
298 | KernelVersion: 4.4 | ||
299 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
300 | Description: (RO) Print the content of the ETM Trace Enable Event register | ||
301 | (0x020). The value is read directly from the HW. | ||
302 | |||
303 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmtsscr | ||
304 | Date: September 2015 | ||
305 | KernelVersion: 4.4 | ||
306 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
307 | Description: (RO) Print the content of the ETM Trace Start/Stop Conrol | ||
308 | register (0x018). The value is read directly from the HW. | ||
309 | |||
310 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmtecr1 | ||
311 | Date: September 2015 | ||
312 | KernelVersion: 4.4 | ||
313 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
314 | Description: (RO) Print the content of the ETM Enable Conrol #1 | ||
315 | register (0x024). The value is read directly from the HW. | ||
316 | |||
317 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmtecr2 | ||
318 | Date: September 2015 | ||
319 | KernelVersion: 4.4 | ||
320 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
321 | Description: (RO) Print the content of the ETM Enable Conrol #2 | ||
322 | register (0x01c). The value is read directly from the HW. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio index 42d360fe66a5..0439c2aaf741 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio | |||
@@ -581,6 +581,7 @@ What: /sys/.../iio:deviceX/events/in_voltageY_supply_thresh_rising_en | |||
581 | What: /sys/.../iio:deviceX/events/in_voltageY_supply_thresh_falling_en | 581 | What: /sys/.../iio:deviceX/events/in_voltageY_supply_thresh_falling_en |
582 | What: /sys/.../iio:deviceX/events/in_voltageY_thresh_rising_en | 582 | What: /sys/.../iio:deviceX/events/in_voltageY_thresh_rising_en |
583 | What: /sys/.../iio:deviceX/events/in_voltageY_thresh_falling_en | 583 | What: /sys/.../iio:deviceX/events/in_voltageY_thresh_falling_en |
584 | What: /sys/.../iio:deviceX/events/in_voltageY_thresh_either_en | ||
584 | What: /sys/.../iio:deviceX/events/in_tempY_thresh_rising_en | 585 | What: /sys/.../iio:deviceX/events/in_tempY_thresh_rising_en |
585 | What: /sys/.../iio:deviceX/events/in_tempY_thresh_falling_en | 586 | What: /sys/.../iio:deviceX/events/in_tempY_thresh_falling_en |
586 | KernelVersion: 2.6.37 | 587 | KernelVersion: 2.6.37 |
@@ -1459,3 +1460,34 @@ Description: | |||
1459 | measurements and return the average value as output data. Each | 1460 | measurements and return the average value as output data. Each |
1460 | value resulted from <type>[_name]_oversampling_ratio measurements | 1461 | value resulted from <type>[_name]_oversampling_ratio measurements |
1461 | is considered as one sample for <type>[_name]_sampling_frequency. | 1462 | is considered as one sample for <type>[_name]_sampling_frequency. |
1463 | |||
1464 | What: /sys/bus/iio/devices/iio:deviceX/in_concentration_raw | ||
1465 | What: /sys/bus/iio/devices/iio:deviceX/in_concentrationX_raw | ||
1466 | What: /sys/bus/iio/devices/iio:deviceX/in_concentration_co2_raw | ||
1467 | What: /sys/bus/iio/devices/iio:deviceX/in_concentrationX_co2_raw | ||
1468 | What: /sys/bus/iio/devices/iio:deviceX/in_concentration_voc_raw | ||
1469 | What: /sys/bus/iio/devices/iio:deviceX/in_concentrationX_voc_raw | ||
1470 | KernelVersion: 4.3 | ||
1471 | Contact: linux-iio@vger.kernel.org | ||
1472 | Description: | ||
1473 | Raw (unscaled no offset etc.) percentage reading of a substance. | ||
1474 | |||
1475 | What: /sys/bus/iio/devices/iio:deviceX/in_resistance_raw | ||
1476 | What: /sys/bus/iio/devices/iio:deviceX/in_resistanceX_raw | ||
1477 | What: /sys/bus/iio/devices/iio:deviceX/out_resistance_raw | ||
1478 | What: /sys/bus/iio/devices/iio:deviceX/out_resistanceX_raw | ||
1479 | KernelVersion: 4.3 | ||
1480 | Contact: linux-iio@vger.kernel.org | ||
1481 | Description: | ||
1482 | Raw (unscaled no offset etc.) resistance reading that can be processed | ||
1483 | into an ohm value. | ||
1484 | |||
1485 | What: /sys/bus/iio/devices/iio:deviceX/heater_enable | ||
1486 | KernelVersion: 4.1.0 | ||
1487 | Contact: linux-iio@vger.kernel.org | ||
1488 | Description: | ||
1489 | '1' (enable) or '0' (disable) specifying the enable | ||
1490 | of heater function. Same reading values apply | ||
1491 | This ABI is especially applicable for humidity sensors | ||
1492 | to heatup the device and get rid of any condensation | ||
1493 | in some humidity environment | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-iio-adc-hi8435 b/Documentation/ABI/testing/sysfs-bus-iio-adc-hi8435 new file mode 100644 index 000000000000..f30b4c424fb6 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-iio-adc-hi8435 | |||
@@ -0,0 +1,43 @@ | |||
1 | What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_sensing_mode | ||
2 | Date: August 2015 | ||
3 | KernelVersion: 4.2.0 | ||
4 | Contact: source@cogentembedded.com | ||
5 | Description: | ||
6 | Program sensor type for threshold detector inputs. | ||
7 | Could be either "GND-Open" or "Supply-Open" mode. Y is a | ||
8 | threshold detector input channel. Channels 0..7, 8..15, 16..23 | ||
9 | and 24..31 has common sensor types. | ||
10 | |||
11 | What: /sys/bus/iio/devices/iio:deviceX/events/in_voltageY_thresh_falling_value | ||
12 | Date: August 2015 | ||
13 | KernelVersion: 4.2.0 | ||
14 | Contact: source@cogentembedded.com | ||
15 | Description: | ||
16 | Channel Y low voltage threshold. If sensor input voltage goes lower then | ||
17 | this value then the threshold falling event is pushed. | ||
18 | Depending on in_voltageY_sensing_mode the low voltage threshold | ||
19 | is separately set for "GND-Open" and "Supply-Open" modes. | ||
20 | Channels 0..31 have common low threshold values, but could have different | ||
21 | sensing_modes. | ||
22 | The low voltage threshold range is between 2..21V. | ||
23 | Hysteresis between low and high thresholds can not be lower then 2 and | ||
24 | can not be odd. | ||
25 | If falling threshold results hysteresis to odd value then rising | ||
26 | threshold is automatically subtracted by one. | ||
27 | |||
28 | What: /sys/bus/iio/devices/iio:deviceX/events/in_voltageY_thresh_rising_value | ||
29 | Date: August 2015 | ||
30 | KernelVersion: 4.2.0 | ||
31 | Contact: source@cogentembedded.com | ||
32 | Description: | ||
33 | Channel Y high voltage threshold. If sensor input voltage goes higher then | ||
34 | this value then the threshold rising event is pushed. | ||
35 | Depending on in_voltageY_sensing_mode the high voltage threshold | ||
36 | is separately set for "GND-Open" and "Supply-Open" modes. | ||
37 | Channels 0..31 have common high threshold values, but could have different | ||
38 | sensing_modes. | ||
39 | The high voltage threshold range is between 3..22V. | ||
40 | Hysteresis between low and high thresholds can not be lower then 2 and | ||
41 | can not be odd. | ||
42 | If rising threshold results hysteresis to odd value then falling | ||
43 | threshold is automatically appended by one. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-iio-chemical-vz89x b/Documentation/ABI/testing/sysfs-bus-iio-chemical-vz89x new file mode 100644 index 000000000000..c0c1ea924535 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-iio-chemical-vz89x | |||
@@ -0,0 +1,7 @@ | |||
1 | What: /sys/bus/iio/devices/iio:deviceX/in_concentration_VOC_short_raw | ||
2 | Date: September 2015 | ||
3 | KernelVersion: 4.3 | ||
4 | Contact: Matt Ranostay <mranostay@gmail.com> | ||
5 | Description: | ||
6 | Get the raw calibration VOC value from the sensor. | ||
7 | This value has little application outside of calibration. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-iio-humidity-hdc100x b/Documentation/ABI/testing/sysfs-bus-iio-humidity-hdc100x new file mode 100644 index 000000000000..b72bb62552cf --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-iio-humidity-hdc100x | |||
@@ -0,0 +1,9 @@ | |||
1 | What: /sys/bus/iio/devices/iio:deviceX/out_current_heater_raw | ||
2 | What: /sys/bus/iio/devices/iio:deviceX/out_current_heater_raw_available | ||
3 | KernelVersion: 4.3 | ||
4 | Contact: linux-iio@vger.kernel.org | ||
5 | Description: | ||
6 | Controls the heater device within the humidity sensor to get | ||
7 | rid of excess condensation. | ||
8 | |||
9 | Valid control values are 0 = OFF, and 1 = ON. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-iio-meas-spec b/Documentation/ABI/testing/sysfs-bus-iio-meas-spec new file mode 100644 index 000000000000..1a6265e92e2f --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-iio-meas-spec | |||
@@ -0,0 +1,8 @@ | |||
1 | What: /sys/bus/iio/devices/iio:deviceX/battery_low | ||
2 | KernelVersion: 4.1.0 | ||
3 | Contact: linux-iio@vger.kernel.org | ||
4 | Description: | ||
5 | Reading returns either '1' or '0'. '1' means that the | ||
6 | battery level supplied to sensor is below 2.25V. | ||
7 | This ABI is available for tsys02d, htu21, ms8607 | ||
8 | This ABI is available for htu21, ms8607 | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-iio-trigger-sysfs b/Documentation/ABI/testing/sysfs-bus-iio-trigger-sysfs index bbb039237a25..04ac62305018 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio-trigger-sysfs +++ b/Documentation/ABI/testing/sysfs-bus-iio-trigger-sysfs | |||
@@ -18,3 +18,25 @@ Description: | |||
18 | trigger. In order to associate the trigger with an IIO device | 18 | trigger. In order to associate the trigger with an IIO device |
19 | one should write this name string to | 19 | one should write this name string to |
20 | /sys/bus/iio/devices/iio:deviceY/trigger/current_trigger. | 20 | /sys/bus/iio/devices/iio:deviceY/trigger/current_trigger. |
21 | |||
22 | What: /sys/bus/iio/devices/iio_sysfs_trigger/add_trigger | ||
23 | KernelVersion: 2.6.39 | ||
24 | Contact: linux-iio@vger.kernel.org | ||
25 | Description: | ||
26 | This attribute is provided by the iio-trig-sysfs stand-alone | ||
27 | driver and it is used to activate the creation of a new trigger. | ||
28 | In order to achieve this, one should write a positive integer | ||
29 | into the associated file, which will serve as the id of the | ||
30 | trigger. If the trigger with the specified id is already present | ||
31 | in the system, an invalid argument message will be returned. | ||
32 | |||
33 | What: /sys/bus/iio/devices/iio_sysfs_trigger/remove_trigger | ||
34 | KernelVersion: 2.6.39 | ||
35 | Contact: linux-iio@vger.kernel.org | ||
36 | Description: | ||
37 | This attribute is used to unregister and delete a previously | ||
38 | created trigger from the list of available triggers. In order to | ||
39 | achieve this, one should write a positive integer into the | ||
40 | associated file, representing the id of the trigger that needs | ||
41 | to be removed. If the trigger can't be found, an invalid | ||
42 | argument message will be returned to the user. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-intel_th-devices-gth b/Documentation/ABI/testing/sysfs-bus-intel_th-devices-gth new file mode 100644 index 000000000000..22d0843849a8 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-intel_th-devices-gth | |||
@@ -0,0 +1,49 @@ | |||
1 | What: /sys/bus/intel_th/devices/<intel_th_id>-gth/masters/* | ||
2 | Date: June 2015 | ||
3 | KernelVersion: 4.3 | ||
4 | Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com> | ||
5 | Description: (RW) Configure output ports for STP masters. Writing -1 | ||
6 | disables a master; any | ||
7 | |||
8 | What: /sys/bus/intel_th/devices/<intel_th_id>-gth/outputs/[0-7]_port | ||
9 | Date: June 2015 | ||
10 | KernelVersion: 4.3 | ||
11 | Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com> | ||
12 | Description: (RO) Output port type: | ||
13 | 0: not present, | ||
14 | 1: MSU (Memory Storage Unit) | ||
15 | 2: CTP (Common Trace Port) | ||
16 | 4: PTI (MIPI PTI). | ||
17 | |||
18 | What: /sys/bus/intel_th/devices/<intel_th_id>-gth/outputs/[0-7]_drop | ||
19 | Date: June 2015 | ||
20 | KernelVersion: 4.3 | ||
21 | Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com> | ||
22 | Description: (RW) Data retention policy setting: keep (0) or drop (1) | ||
23 | incoming data while output port is in reset. | ||
24 | |||
25 | What: /sys/bus/intel_th/devices/<intel_th_id>-gth/outputs/[0-7]_null | ||
26 | Date: June 2015 | ||
27 | KernelVersion: 4.3 | ||
28 | Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com> | ||
29 | Description: (RW) STP NULL packet generation: enabled (1) or disabled (0). | ||
30 | |||
31 | What: /sys/bus/intel_th/devices/<intel_th_id>-gth/outputs/[0-7]_flush | ||
32 | Date: June 2015 | ||
33 | KernelVersion: 4.3 | ||
34 | Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com> | ||
35 | Description: (RW) Force flush data from byte packing buffer for the output | ||
36 | port. | ||
37 | |||
38 | What: /sys/bus/intel_th/devices/<intel_th_id>-gth/outputs/[0-7]_reset | ||
39 | Date: June 2015 | ||
40 | KernelVersion: 4.3 | ||
41 | Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com> | ||
42 | Description: (RO) Output port is in reset (1). | ||
43 | |||
44 | What: /sys/bus/intel_th/devices/<intel_th_id>-gth/outputs/[0-7]_smcfreq | ||
45 | Date: June 2015 | ||
46 | KernelVersion: 4.3 | ||
47 | Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com> | ||
48 | Description: (RW) STP sync packet frequency for the port. Specifies the | ||
49 | number of clocks between mainenance packets. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-intel_th-devices-msc b/Documentation/ABI/testing/sysfs-bus-intel_th-devices-msc new file mode 100644 index 000000000000..b940c5d91cf7 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-intel_th-devices-msc | |||
@@ -0,0 +1,33 @@ | |||
1 | What: /sys/bus/intel_th/devices/<intel_th_id>-msc<msc-id>/wrap | ||
2 | Date: June 2015 | ||
3 | KernelVersion: 4.3 | ||
4 | Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com> | ||
5 | Description: (RW) Configure MSC buffer wrapping. 1 == wrapping enabled. | ||
6 | |||
7 | What: /sys/bus/intel_th/devices/<intel_th_id>-msc<msc-id>/mode | ||
8 | Date: June 2015 | ||
9 | KernelVersion: 4.3 | ||
10 | Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com> | ||
11 | Description: (RW) Configure MSC operating mode: | ||
12 | - "single", for contiguous buffer mode (high-order alloc); | ||
13 | - "multi", for multiblock mode; | ||
14 | - "ExI", for DCI handler mode; | ||
15 | - "debug", for debug mode. | ||
16 | If operating mode changes, existing buffer is deallocated, | ||
17 | provided there are no active users and tracing is not enabled, | ||
18 | otherwise the write will fail. | ||
19 | |||
20 | What: /sys/bus/intel_th/devices/<intel_th_id>-msc<msc-id>/nr_pages | ||
21 | Date: June 2015 | ||
22 | KernelVersion: 4.3 | ||
23 | Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com> | ||
24 | Description: (RW) Configure MSC buffer size for "single" or "multi" modes. | ||
25 | In single mode, this is a single number of pages, has to be | ||
26 | power of 2. In multiblock mode, this is a comma-separated list | ||
27 | of numbers of pages for each window to be allocated. Number of | ||
28 | windows is not limited. | ||
29 | Writing to this file deallocates existing buffer (provided | ||
30 | there are no active users and tracing is not enabled) and then | ||
31 | allocates a new one. | ||
32 | |||
33 | |||
diff --git a/Documentation/ABI/testing/sysfs-bus-intel_th-devices-pti b/Documentation/ABI/testing/sysfs-bus-intel_th-devices-pti new file mode 100644 index 000000000000..df0b24fd0218 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-intel_th-devices-pti | |||
@@ -0,0 +1,24 @@ | |||
1 | What: /sys/bus/intel_th/devices/<intel_th_id>-pti/mode | ||
2 | Date: June 2015 | ||
3 | KernelVersion: 4.3 | ||
4 | Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com> | ||
5 | Description: (RW) Configure PTI output width. Currently supported values | ||
6 | are 4, 8, 12, 16. | ||
7 | |||
8 | What: /sys/bus/intel_th/devices/<intel_th_id>-pti/freerunning_clock | ||
9 | Date: June 2015 | ||
10 | KernelVersion: 4.3 | ||
11 | Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com> | ||
12 | Description: (RW) 0: PTI trace clock acts as a strobe which only toggles | ||
13 | when there is trace data to send. 1: PTI trace clock is a | ||
14 | free-running clock. | ||
15 | |||
16 | What: /sys/bus/intel_th/devices/<intel_th_id>-pti/clock_divider | ||
17 | Date: June 2015 | ||
18 | KernelVersion: 4.3 | ||
19 | Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com> | ||
20 | Description: (RW) Configure PTI port clock divider: | ||
21 | - 0: Intel TH clock rate, | ||
22 | - 1: 1/2 Intel TH clock rate, | ||
23 | - 2: 1/4 Intel TH clock rate, | ||
24 | - 3: 1/8 Intel TH clock rate. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-intel_th-output-devices b/Documentation/ABI/testing/sysfs-bus-intel_th-output-devices new file mode 100644 index 000000000000..4d48a9451866 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-intel_th-output-devices | |||
@@ -0,0 +1,13 @@ | |||
1 | What: /sys/bus/intel_th/devices/<intel_th_id>-<device><id>/active | ||
2 | Date: June 2015 | ||
3 | KernelVersion: 4.3 | ||
4 | Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com> | ||
5 | Description: (RW) Writes of 1 or 0 enable or disable trace output to this | ||
6 | output device. Reads return current status. | ||
7 | |||
8 | What: /sys/bus/intel_th/devices/<intel_th_id>-msc<msc-id>/port | ||
9 | Date: June 2015 | ||
10 | KernelVersion: 4.3 | ||
11 | Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com> | ||
12 | Description: (RO) Port number, corresponding to this output device on the | ||
13 | switch (GTH). | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-mei b/Documentation/ABI/testing/sysfs-bus-mei index 20e4d1638bac..6bd45346ac7e 100644 --- a/Documentation/ABI/testing/sysfs-bus-mei +++ b/Documentation/ABI/testing/sysfs-bus-mei | |||
@@ -19,3 +19,10 @@ KernelVersion: 4.2 | |||
19 | Contact: Tomas Winkler <tomas.winkler@intel.com> | 19 | Contact: Tomas Winkler <tomas.winkler@intel.com> |
20 | Description: Stores mei client device uuid | 20 | Description: Stores mei client device uuid |
21 | Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | 21 | Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
22 | |||
23 | What: /sys/bus/mei/devices/.../version | ||
24 | Date: Aug 2015 | ||
25 | KernelVersion: 4.3 | ||
26 | Contact: Tomas Winkler <tomas.winkler@intel.com> | ||
27 | Description: Stores mei client protocol version | ||
28 | Format: %d | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb index 864637f25bee..3a4abfc44f5e 100644 --- a/Documentation/ABI/testing/sysfs-bus-usb +++ b/Documentation/ABI/testing/sysfs-bus-usb | |||
@@ -1,3 +1,23 @@ | |||
1 | What: /sys/bus/usb/devices/INTERFACE/authorized | ||
2 | Date: August 2015 | ||
3 | Description: | ||
4 | This allows to authorize (1) or deauthorize (0) | ||
5 | individual interfaces instead a whole device | ||
6 | in contrast to the device authorization. | ||
7 | If a deauthorized interface will be authorized | ||
8 | so the driver probing must be triggered manually | ||
9 | by writing INTERFACE to /sys/bus/usb/drivers_probe | ||
10 | This allows to avoid side-effects with drivers | ||
11 | that need multiple interfaces. | ||
12 | A deauthorized interface cannot be probed or claimed. | ||
13 | |||
14 | What: /sys/bus/usb/devices/usbX/interface_authorized_default | ||
15 | Date: August 2015 | ||
16 | Description: | ||
17 | This is used as value that determines if interfaces | ||
18 | would be authorized by default. | ||
19 | The value can be 1 or 0. It's by default 1. | ||
20 | |||
1 | What: /sys/bus/usb/device/.../authorized | 21 | What: /sys/bus/usb/device/.../authorized |
2 | Date: July 2008 | 22 | Date: July 2008 |
3 | KernelVersion: 2.6.26 | 23 | KernelVersion: 2.6.26 |
diff --git a/Documentation/ABI/testing/sysfs-class-fpga-manager b/Documentation/ABI/testing/sysfs-class-fpga-manager new file mode 100644 index 000000000000..23056c532fdd --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-fpga-manager | |||
@@ -0,0 +1,37 @@ | |||
1 | What: /sys/class/fpga_manager/<fpga>/name | ||
2 | Date: August 2015 | ||
3 | KernelVersion: 4.3 | ||
4 | Contact: Alan Tull <atull@opensource.altera.com> | ||
5 | Description: Name of low level fpga manager driver. | ||
6 | |||
7 | What: /sys/class/fpga_manager/<fpga>/state | ||
8 | Date: August 2015 | ||
9 | KernelVersion: 4.3 | ||
10 | Contact: Alan Tull <atull@opensource.altera.com> | ||
11 | Description: Read fpga manager state as a string. | ||
12 | The intent is to provide enough detail that if something goes | ||
13 | wrong during FPGA programming (something that the driver can't | ||
14 | fix) then userspace can know, i.e. if the firmware request | ||
15 | fails, that could be due to not being able to find the firmware | ||
16 | file. | ||
17 | |||
18 | This is a superset of FPGA states and fpga manager driver | ||
19 | states. The fpga manager driver is walking through these steps | ||
20 | to get the FPGA into a known operating state. It's a sequence, | ||
21 | though some steps may get skipped. Valid FPGA states will vary | ||
22 | by manufacturer; this is a superset. | ||
23 | |||
24 | * unknown = can't determine state | ||
25 | * power off = FPGA power is off | ||
26 | * power up = FPGA reports power is up | ||
27 | * reset = FPGA held in reset state | ||
28 | * firmware request = firmware class request in progress | ||
29 | * firmware request error = firmware request failed | ||
30 | * write init = preparing FPGA for programming | ||
31 | * write init error = Error while preparing FPGA for | ||
32 | programming | ||
33 | * write = FPGA ready to receive image data | ||
34 | * write error = Error while programming | ||
35 | * write complete = Doing post programming steps | ||
36 | * write complete error = Error while doing post programming | ||
37 | * operating = FPGA is programmed and operating | ||
diff --git a/Documentation/ABI/testing/sysfs-class-mic.txt b/Documentation/ABI/testing/sysfs-class-mic.txt index 13f48afc534f..d45eed2bf128 100644 --- a/Documentation/ABI/testing/sysfs-class-mic.txt +++ b/Documentation/ABI/testing/sysfs-class-mic.txt | |||
@@ -41,18 +41,15 @@ Description: | |||
41 | When read, this entry provides the current state of an Intel | 41 | When read, this entry provides the current state of an Intel |
42 | MIC device in the context of the card OS. Possible values that | 42 | MIC device in the context of the card OS. Possible values that |
43 | will be read are: | 43 | will be read are: |
44 | "offline" - The MIC device is ready to boot the card OS. On | 44 | "ready" - The MIC device is ready to boot the card OS. On |
45 | reading this entry after an OSPM resume, a "boot" has to be | 45 | reading this entry after an OSPM resume, a "boot" has to be |
46 | written to this entry if the card was previously shutdown | 46 | written to this entry if the card was previously shutdown |
47 | during OSPM suspend. | 47 | during OSPM suspend. |
48 | "online" - The MIC device has initiated booting a card OS. | 48 | "booting" - The MIC device has initiated booting a card OS. |
49 | "online" - The MIC device has completed boot and is online | ||
49 | "shutting_down" - The card OS is shutting down. | 50 | "shutting_down" - The card OS is shutting down. |
51 | "resetting" - A reset has been initiated for the MIC device | ||
50 | "reset_failed" - The MIC device has failed to reset. | 52 | "reset_failed" - The MIC device has failed to reset. |
51 | "suspending" - The MIC device is currently being prepared for | ||
52 | suspend. On reading this entry, a "suspend" has to be written | ||
53 | to the state sysfs entry to ensure the card is shutdown during | ||
54 | OSPM suspend. | ||
55 | "suspended" - The MIC device has been suspended. | ||
56 | 53 | ||
57 | When written, this sysfs entry triggers different state change | 54 | When written, this sysfs entry triggers different state change |
58 | operations depending upon the current state of the card OS. | 55 | operations depending upon the current state of the card OS. |
@@ -62,8 +59,6 @@ Description: | |||
62 | sysfs entries. | 59 | sysfs entries. |
63 | "reset" - Initiates device reset. | 60 | "reset" - Initiates device reset. |
64 | "shutdown" - Initiates card OS shutdown. | 61 | "shutdown" - Initiates card OS shutdown. |
65 | "suspend" - Initiates card OS shutdown and also marks the card | ||
66 | as suspended. | ||
67 | 62 | ||
68 | What: /sys/class/mic/mic(x)/shutdown_status | 63 | What: /sys/class/mic/mic(x)/shutdown_status |
69 | Date: October 2013 | 64 | Date: October 2013 |
@@ -126,7 +121,7 @@ Description: | |||
126 | the card. This sysfs entry can be written with the following | 121 | the card. This sysfs entry can be written with the following |
127 | valid strings: | 122 | valid strings: |
128 | a) linux - Boot a Linux image. | 123 | a) linux - Boot a Linux image. |
129 | b) elf - Boot an elf image for flash updates. | 124 | b) flash - Boot an image for flash updates. |
130 | 125 | ||
131 | What: /sys/class/mic/mic(x)/log_buf_addr | 126 | What: /sys/class/mic/mic(x)/log_buf_addr |
132 | Date: October 2013 | 127 | Date: October 2013 |
@@ -155,3 +150,17 @@ Description: | |||
155 | daemon to set the log buffer length address. The correct log | 150 | daemon to set the log buffer length address. The correct log |
156 | buffer length address to be written can be found in the | 151 | buffer length address to be written can be found in the |
157 | System.map file of the card OS. | 152 | System.map file of the card OS. |
153 | |||
154 | What: /sys/class/mic/mic(x)/heartbeat_enable | ||
155 | Date: March 2015 | ||
156 | KernelVersion: 3.20 | ||
157 | Contact: Ashutosh Dixit <ashutosh.dixit@intel.com> | ||
158 | Description: | ||
159 | The MIC drivers detect and inform user space about card crashes | ||
160 | via a heartbeat mechanism (see the description of | ||
161 | shutdown_status above). User space can turn off this | ||
162 | notification by setting heartbeat_enable to 0 and enable it by | ||
163 | setting this entry to 1. If this notification is disabled it is | ||
164 | the responsibility of user space to detect card crashes via | ||
165 | alternative means such as a network ping. This setting is | ||
166 | enabled by default. | ||
diff --git a/Documentation/ABI/testing/sysfs-class-power b/Documentation/ABI/testing/sysfs-class-power index 369d2a2d7d3e..fa05719f9981 100644 --- a/Documentation/ABI/testing/sysfs-class-power +++ b/Documentation/ABI/testing/sysfs-class-power | |||
@@ -74,3 +74,61 @@ Description: | |||
74 | 74 | ||
75 | Valid values: | 75 | Valid values: |
76 | - 0 - 70 (minutes), step by 10 (rounded down) | 76 | - 0 - 70 (minutes), step by 10 (rounded down) |
77 | |||
78 | What: /sys/class/power_supply/bq24257-charger/ovp_voltage | ||
79 | Date: October 2015 | ||
80 | KernelVersion: 4.4.0 | ||
81 | Contact: Andreas Dannenberg <dannenberg@ti.com> | ||
82 | Description: | ||
83 | This entry configures the overvoltage protection feature of bq24257- | ||
84 | type charger devices. This feature protects the device and other | ||
85 | components against damage from overvoltage on the input supply. See | ||
86 | device datasheet for details. | ||
87 | |||
88 | Valid values: | ||
89 | - 6000000, 6500000, 7000000, 8000000, 9000000, 9500000, 10000000, | ||
90 | 10500000 (all uV) | ||
91 | |||
92 | What: /sys/class/power_supply/bq24257-charger/in_dpm_voltage | ||
93 | Date: October 2015 | ||
94 | KernelVersion: 4.4.0 | ||
95 | Contact: Andreas Dannenberg <dannenberg@ti.com> | ||
96 | Description: | ||
97 | This entry configures the input dynamic power path management voltage of | ||
98 | bq24257-type charger devices. Once the supply drops to the configured | ||
99 | voltage, the input current limit is reduced down to prevent the further | ||
100 | drop of the supply. When the IC enters this mode, the charge current is | ||
101 | lower than the set value. See device datasheet for details. | ||
102 | |||
103 | Valid values: | ||
104 | - 4200000, 4280000, 4360000, 4440000, 4520000, 4600000, 4680000, | ||
105 | 4760000 (all uV) | ||
106 | |||
107 | What: /sys/class/power_supply/bq24257-charger/high_impedance_enable | ||
108 | Date: October 2015 | ||
109 | KernelVersion: 4.4.0 | ||
110 | Contact: Andreas Dannenberg <dannenberg@ti.com> | ||
111 | Description: | ||
112 | This entry allows enabling the high-impedance mode of bq24257-type | ||
113 | charger devices. If enabled, it places the charger IC into low power | ||
114 | standby mode with the switch mode controller disabled. When disabled, | ||
115 | the charger operates normally. See device datasheet for details. | ||
116 | |||
117 | Valid values: | ||
118 | - 1: enabled | ||
119 | - 0: disabled | ||
120 | |||
121 | What: /sys/class/power_supply/bq24257-charger/sysoff_enable | ||
122 | Date: October 2015 | ||
123 | KernelVersion: 4.4.0 | ||
124 | Contact: Andreas Dannenberg <dannenberg@ti.com> | ||
125 | Description: | ||
126 | This entry allows enabling the sysoff mode of bq24257-type charger | ||
127 | devices. If enabled and the input is removed, the internal battery FET | ||
128 | is turned off in order to reduce the leakage from the BAT pin to less | ||
129 | than 1uA. Note that on some devices/systems this disconnects the battery | ||
130 | from the system. See device datasheet for details. | ||
131 | |||
132 | Valid values: | ||
133 | - 1: enabled | ||
134 | - 0: disabled | ||
diff --git a/Documentation/ABI/testing/sysfs-class-stm b/Documentation/ABI/testing/sysfs-class-stm new file mode 100644 index 000000000000..c9aa4f3fc9a7 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-stm | |||
@@ -0,0 +1,14 @@ | |||
1 | What: /sys/class/stm/<stm>/masters | ||
2 | Date: June 2015 | ||
3 | KernelVersion: 4.3 | ||
4 | Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com> | ||
5 | Description: | ||
6 | Shows first and last available to software master numbers on | ||
7 | this STM device. | ||
8 | |||
9 | What: /sys/class/stm/<stm>/channels | ||
10 | Date: June 2015 | ||
11 | KernelVersion: 4.3 | ||
12 | Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com> | ||
13 | Description: | ||
14 | Shows the number of channels per master on this STM device. | ||
diff --git a/Documentation/ABI/testing/sysfs-class-stm_source b/Documentation/ABI/testing/sysfs-class-stm_source new file mode 100644 index 000000000000..57b8dd39bbf7 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-stm_source | |||
@@ -0,0 +1,11 @@ | |||
1 | What: /sys/class/stm_source/<stm_source>/stm_source_link | ||
2 | Date: June 2015 | ||
3 | KernelVersion: 4.3 | ||
4 | Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com> | ||
5 | Description: | ||
6 | stm_source device linkage to stm device, where its tracing data | ||
7 | is directed. Reads return an existing connection or "<none>" if | ||
8 | this stm_source is not connected to any stm device yet. | ||
9 | Write an existing (registered) stm device's name here to | ||
10 | connect that device. If a device is already connected to this | ||
11 | stm_source, it will first be disconnected. | ||
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-corsair b/Documentation/ABI/testing/sysfs-driver-hid-corsair new file mode 100644 index 000000000000..b8827f0f12c4 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-hid-corsair | |||
@@ -0,0 +1,15 @@ | |||
1 | What: /sys/bus/drivers/corsair/<dev>/macro_mode | ||
2 | Date: August 2015 | ||
3 | KernelVersion: 4.2 | ||
4 | Contact: Clement Vuchener <clement.vuchener@gmail.com> | ||
5 | Description: Get/set the current playback mode. "SW" for software mode | ||
6 | where G-keys triggers their regular key codes. "HW" for | ||
7 | hardware playback mode where the G-keys play their macro | ||
8 | from the on-board memory. | ||
9 | |||
10 | |||
11 | What: /sys/bus/drivers/corsair/<dev>/current_profile | ||
12 | Date: August 2015 | ||
13 | KernelVersion: 4.2 | ||
14 | Contact: Clement Vuchener <clement.vuchener@gmail.com> | ||
15 | Description: Get/set the current selected profile. Values are from 1 to 3. | ||
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus b/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus deleted file mode 100644 index 7bd776f9c3c7..000000000000 --- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus +++ /dev/null | |||
@@ -1,96 +0,0 @@ | |||
1 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/actual_profile | ||
2 | Date: October 2010 | ||
3 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
4 | Description: The integer value of this attribute ranges from 0-4. | ||
5 | When read, this attribute returns the number of the actual | ||
6 | profile. This value is persistent, so its equivalent to the | ||
7 | profile that's active when the mouse is powered on next time. | ||
8 | When written, this file sets the number of the startup profile | ||
9 | and the mouse activates this profile immediately. | ||
10 | Users: http://roccat.sourceforge.net | ||
11 | |||
12 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/info | ||
13 | Date: November 2012 | ||
14 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
15 | Description: When read, this file returns general data like firmware version. | ||
16 | When written, the device can be reset. | ||
17 | The data is 8 bytes long. | ||
18 | Users: http://roccat.sourceforge.net | ||
19 | |||
20 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/macro | ||
21 | Date: October 2010 | ||
22 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
23 | Description: The mouse can store a macro with max 500 key/button strokes | ||
24 | internally. | ||
25 | When written, this file lets one set the sequence for a specific | ||
26 | button for a specific profile. Button and profile numbers are | ||
27 | included in written data. The data has to be 2082 bytes long. | ||
28 | This file is writeonly. | ||
29 | Users: http://roccat.sourceforge.net | ||
30 | |||
31 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile_buttons | ||
32 | Date: August 2010 | ||
33 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
34 | Description: The mouse can store 5 profiles which can be switched by the | ||
35 | press of a button. A profile is split in settings and buttons. | ||
36 | profile_buttons holds information about button layout. | ||
37 | When written, this file lets one write the respective profile | ||
38 | buttons back to the mouse. The data has to be 77 bytes long. | ||
39 | The mouse will reject invalid data. | ||
40 | Which profile to write is determined by the profile number | ||
41 | contained in the data. | ||
42 | Before reading this file, control has to be written to select | ||
43 | which profile to read. | ||
44 | Users: http://roccat.sourceforge.net | ||
45 | |||
46 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile_settings | ||
47 | Date: October 2010 | ||
48 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
49 | Description: The mouse can store 5 profiles which can be switched by the | ||
50 | press of a button. A profile is split in settings and buttons. | ||
51 | profile_settings holds information like resolution, sensitivity | ||
52 | and light effects. | ||
53 | When written, this file lets one write the respective profile | ||
54 | settings back to the mouse. The data has to be 43 bytes long. | ||
55 | The mouse will reject invalid data. | ||
56 | Which profile to write is determined by the profile number | ||
57 | contained in the data. | ||
58 | Before reading this file, control has to be written to select | ||
59 | which profile to read. | ||
60 | Users: http://roccat.sourceforge.net | ||
61 | |||
62 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/sensor | ||
63 | Date: October 2010 | ||
64 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
65 | Description: The mouse has a tracking- and a distance-control-unit. These | ||
66 | can be activated/deactivated and the lift-off distance can be | ||
67 | set. The data has to be 6 bytes long. | ||
68 | This file is writeonly. | ||
69 | Users: http://roccat.sourceforge.net | ||
70 | |||
71 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/talk | ||
72 | Date: May 2011 | ||
73 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
74 | Description: Used to active some easy* functions of the mouse from outside. | ||
75 | The data has to be 16 bytes long. | ||
76 | This file is writeonly. | ||
77 | Users: http://roccat.sourceforge.net | ||
78 | |||
79 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/tcu | ||
80 | Date: October 2010 | ||
81 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
82 | Description: When written a calibration process for the tracking control unit | ||
83 | can be initiated/cancelled. Also lets one read/write sensor | ||
84 | registers. | ||
85 | The data has to be 4 bytes long. | ||
86 | Users: http://roccat.sourceforge.net | ||
87 | |||
88 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/tcu_image | ||
89 | Date: October 2010 | ||
90 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
91 | Description: When read the mouse returns a 30x30 pixel image of the | ||
92 | sampled underground. This works only in the course of a | ||
93 | calibration process initiated with tcu. | ||
94 | The returned data is 1028 bytes in size. | ||
95 | This file is readonly. | ||
96 | Users: http://roccat.sourceforge.net | ||
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus deleted file mode 100644 index a10404f15a54..000000000000 --- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_profile | ||
2 | Date: January 2011 | ||
3 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
4 | Description: The integer value of this attribute ranges from 0-4. | ||
5 | When read, this attribute returns the number of the active | ||
6 | profile. | ||
7 | When written, the mouse activates this profile immediately. | ||
8 | The profile that's active when powered down is the same that's | ||
9 | active when the mouse is powered on. | ||
10 | Users: http://roccat.sourceforge.net | ||
11 | |||
12 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/info | ||
13 | Date: November 2012 | ||
14 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
15 | Description: When read, this file returns general data like firmware version. | ||
16 | When written, the device can be reset. | ||
17 | The data is 6 bytes long. | ||
18 | Users: http://roccat.sourceforge.net | ||
19 | |||
20 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile_buttons | ||
21 | Date: January 2011 | ||
22 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
23 | Description: The mouse can store 5 profiles which can be switched by the | ||
24 | press of a button. A profile is split in settings and buttons. | ||
25 | profile_buttons holds information about button layout. | ||
26 | When written, this file lets one write the respective profile | ||
27 | buttons back to the mouse. The data has to be 23 bytes long. | ||
28 | The mouse will reject invalid data. | ||
29 | Which profile to write is determined by the profile number | ||
30 | contained in the data. | ||
31 | Before reading this file, control has to be written to select | ||
32 | which profile to read. | ||
33 | Users: http://roccat.sourceforge.net | ||
34 | |||
35 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile_settings | ||
36 | Date: January 2011 | ||
37 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
38 | Description: The mouse can store 5 profiles which can be switched by the | ||
39 | press of a button. A profile is split in settings and buttons. | ||
40 | profile_settings holds information like resolution, sensitivity | ||
41 | and light effects. | ||
42 | When written, this file lets one write the respective profile | ||
43 | settings back to the mouse. The data has to be 16 bytes long. | ||
44 | The mouse will reject invalid data. | ||
45 | Which profile to write is determined by the profile number | ||
46 | contained in the data. | ||
47 | Before reading this file, control has to be written to select | ||
48 | which profile to read. | ||
49 | Users: http://roccat.sourceforge.net | ||
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra b/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra deleted file mode 100644 index 9fa9de30d14b..000000000000 --- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/info | ||
2 | Date: November 2012 | ||
3 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
4 | Description: When read, this file returns general data like firmware version. | ||
5 | When written, the device can be reset. | ||
6 | The data is 6 bytes long. | ||
7 | Users: http://roccat.sourceforge.net | ||
8 | |||
9 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_settings | ||
10 | Date: August 2010 | ||
11 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
12 | Description: The mouse can store 5 profiles which can be switched by the | ||
13 | press of a button. A profile is split in settings and buttons. | ||
14 | profile_settings holds information like resolution, sensitivity | ||
15 | and light effects. | ||
16 | When written, this file lets one write the respective profile | ||
17 | settings back to the mouse. The data has to be 13 bytes long. | ||
18 | The mouse will reject invalid data. | ||
19 | Which profile to write is determined by the profile number | ||
20 | contained in the data. | ||
21 | Before reading this file, control has to be written to select | ||
22 | which profile to read. | ||
23 | Users: http://roccat.sourceforge.net | ||
24 | |||
25 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_buttons | ||
26 | Date: August 2010 | ||
27 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
28 | Description: The mouse can store 5 profiles which can be switched by the | ||
29 | press of a button. A profile is split in settings and buttons. | ||
30 | profile_buttons holds information about button layout. | ||
31 | When written, this file lets one write the respective profile | ||
32 | buttons back to the mouse. The data has to be 19 bytes long. | ||
33 | The mouse will reject invalid data. | ||
34 | Which profile to write is determined by the profile number | ||
35 | contained in the data. | ||
36 | Before reading this file, control has to be written to select | ||
37 | which profile to read. | ||
38 | Users: http://roccat.sourceforge.net | ||
39 | |||
40 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/settings | ||
41 | Date: August 2010 | ||
42 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
43 | Description: When read, this file returns the settings stored in the mouse. | ||
44 | The size of the data is 3 bytes and holds information on the | ||
45 | startup_profile. | ||
46 | When written, this file lets write settings back to the mouse. | ||
47 | The data has to be 3 bytes long. The mouse will reject invalid | ||
48 | data. | ||
49 | Users: http://roccat.sourceforge.net | ||
diff --git a/Documentation/ABI/testing/sysfs-driver-ppi b/Documentation/ABI/testing/sysfs-driver-ppi index 7d1435bc976c..9921ef285899 100644 --- a/Documentation/ABI/testing/sysfs-driver-ppi +++ b/Documentation/ABI/testing/sysfs-driver-ppi | |||
@@ -1,4 +1,4 @@ | |||
1 | What: /sys/devices/pnp0/<bus-num>/ppi/ | 1 | What: /sys/class/tpm/tpmX/ppi/ |
2 | Date: August 2012 | 2 | Date: August 2012 |
3 | Kernel Version: 3.6 | 3 | Kernel Version: 3.6 |
4 | Contact: xiaoyan.zhang@intel.com | 4 | Contact: xiaoyan.zhang@intel.com |
@@ -8,9 +8,14 @@ Description: | |||
8 | folder makes sense. The folder path can be got by command | 8 | folder makes sense. The folder path can be got by command |
9 | 'find /sys/ -name 'pcrs''. For the detail information of PPI, | 9 | 'find /sys/ -name 'pcrs''. For the detail information of PPI, |
10 | please refer to the PPI specification from | 10 | please refer to the PPI specification from |
11 | |||
11 | http://www.trustedcomputinggroup.org/ | 12 | http://www.trustedcomputinggroup.org/ |
12 | 13 | ||
13 | What: /sys/devices/pnp0/<bus-num>/ppi/version | 14 | In Linux 4.2 ppi was moved to the character device directory. |
15 | A symlink from tpmX/device/ppi to tpmX/ppi to provide backwards | ||
16 | compatibility. | ||
17 | |||
18 | What: /sys/class/tpm/tpmX/ppi/version | ||
14 | Date: August 2012 | 19 | Date: August 2012 |
15 | Contact: xiaoyan.zhang@intel.com | 20 | Contact: xiaoyan.zhang@intel.com |
16 | Description: | 21 | Description: |
@@ -18,7 +23,7 @@ Description: | |||
18 | platform. | 23 | platform. |
19 | This file is readonly. | 24 | This file is readonly. |
20 | 25 | ||
21 | What: /sys/devices/pnp0/<bus-num>/ppi/request | 26 | What: /sys/class/tpm/tpmX/ppi/request |
22 | Date: August 2012 | 27 | Date: August 2012 |
23 | Contact: xiaoyan.zhang@intel.com | 28 | Contact: xiaoyan.zhang@intel.com |
24 | Description: | 29 | Description: |
@@ -28,7 +33,7 @@ Description: | |||
28 | integer value range from 1 to 160, and 0 means no request. | 33 | integer value range from 1 to 160, and 0 means no request. |
29 | This file can be read and written. | 34 | This file can be read and written. |
30 | 35 | ||
31 | What: /sys/devices/pnp0/00:<bus-num>/ppi/response | 36 | What: /sys/class/tpm/tpmX/ppi/response |
32 | Date: August 2012 | 37 | Date: August 2012 |
33 | Contact: xiaoyan.zhang@intel.com | 38 | Contact: xiaoyan.zhang@intel.com |
34 | Description: | 39 | Description: |
@@ -37,7 +42,7 @@ Description: | |||
37 | : <response description>". | 42 | : <response description>". |
38 | This file is readonly. | 43 | This file is readonly. |
39 | 44 | ||
40 | What: /sys/devices/pnp0/<bus-num>/ppi/transition_action | 45 | What: /sys/class/tpm/tpmX/ppi/transition_action |
41 | Date: August 2012 | 46 | Date: August 2012 |
42 | Contact: xiaoyan.zhang@intel.com | 47 | Contact: xiaoyan.zhang@intel.com |
43 | Description: | 48 | Description: |
@@ -47,7 +52,7 @@ Description: | |||
47 | description>". | 52 | description>". |
48 | This file is readonly. | 53 | This file is readonly. |
49 | 54 | ||
50 | What: /sys/devices/pnp0/<bus-num>/ppi/tcg_operations | 55 | What: /sys/class/tpm/tpmX/ppi/tcg_operations |
51 | Date: August 2012 | 56 | Date: August 2012 |
52 | Contact: xiaoyan.zhang@intel.com | 57 | Contact: xiaoyan.zhang@intel.com |
53 | Description: | 58 | Description: |
@@ -58,7 +63,7 @@ Description: | |||
58 | This attribute is only supported by PPI version 1.2+. | 63 | This attribute is only supported by PPI version 1.2+. |
59 | This file is readonly. | 64 | This file is readonly. |
60 | 65 | ||
61 | What: /sys/devices/pnp0/<bus-num>/ppi/vs_operations | 66 | What: /sys/class/tpm/tpmX/ppi/vs_operations |
62 | Date: August 2012 | 67 | Date: August 2012 |
63 | Contact: xiaoyan.zhang@intel.com | 68 | Contact: xiaoyan.zhang@intel.com |
64 | Description: | 69 | Description: |
diff --git a/Documentation/ABI/testing/sysfs-fs-f2fs b/Documentation/ABI/testing/sysfs-fs-f2fs index 2c4cc42006e8..0345f2d1c727 100644 --- a/Documentation/ABI/testing/sysfs-fs-f2fs +++ b/Documentation/ABI/testing/sysfs-fs-f2fs | |||
@@ -80,3 +80,15 @@ Date: February 2015 | |||
80 | Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> | 80 | Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> |
81 | Description: | 81 | Description: |
82 | Controls the trimming rate in batch mode. | 82 | Controls the trimming rate in batch mode. |
83 | |||
84 | What: /sys/fs/f2fs/<disk>/cp_interval | ||
85 | Date: October 2015 | ||
86 | Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> | ||
87 | Description: | ||
88 | Controls the checkpoint timing. | ||
89 | |||
90 | What: /sys/fs/f2fs/<disk>/ra_nid_pages | ||
91 | Date: October 2015 | ||
92 | Contact: "Chao Yu" <chao2.yu@samsung.com> | ||
93 | Description: | ||
94 | Controls the count of nid pages to be readaheaded. | ||
diff --git a/Documentation/ABI/testing/sysfs-power b/Documentation/ABI/testing/sysfs-power index f4551816329e..50b368d490b5 100644 --- a/Documentation/ABI/testing/sysfs-power +++ b/Documentation/ABI/testing/sysfs-power | |||
@@ -256,3 +256,15 @@ Description: | |||
256 | Writing a "1" enables this printing while writing a "0" | 256 | Writing a "1" enables this printing while writing a "0" |
257 | disables it. The default value is "0". Reading from this file | 257 | disables it. The default value is "0". Reading from this file |
258 | will display the current value. | 258 | will display the current value. |
259 | |||
260 | What: /sys/power/pm_wakeup_irq | ||
261 | Date: April 2015 | ||
262 | Contact: Alexandra Yates <alexandra.yates@linux.intel.org> | ||
263 | Description: | ||
264 | The /sys/power/pm_wakeup_irq file reports to user space the IRQ | ||
265 | number of the first wakeup interrupt (that is, the first | ||
266 | interrupt from an IRQ line armed for system wakeup) seen by the | ||
267 | kernel during the most recent system suspend/resume cycle. | ||
268 | |||
269 | This output is useful for system wakeup diagnostics of spurious | ||
270 | wakeup interrupts. | ||
diff --git a/Documentation/Changes b/Documentation/Changes index 6d8863004858..ec97b77c8b00 100644 --- a/Documentation/Changes +++ b/Documentation/Changes | |||
@@ -43,7 +43,8 @@ o udev 081 # udevd --version | |||
43 | o grub 0.93 # grub --version || grub-install --version | 43 | o grub 0.93 # grub --version || grub-install --version |
44 | o mcelog 0.6 # mcelog --version | 44 | o mcelog 0.6 # mcelog --version |
45 | o iptables 1.4.2 # iptables -V | 45 | o iptables 1.4.2 # iptables -V |
46 | o openssl & libcrypto 1.0.1k # openssl version | 46 | o openssl & libcrypto 1.0.0 # openssl version |
47 | o bc 1.06.95 # bc --version | ||
47 | 48 | ||
48 | 49 | ||
49 | Kernel compilation | 50 | Kernel compilation |
diff --git a/Documentation/DMA-API-HOWTO.txt b/Documentation/DMA-API-HOWTO.txt index 55b70b903ead..d69b3fc64e14 100644 --- a/Documentation/DMA-API-HOWTO.txt +++ b/Documentation/DMA-API-HOWTO.txt | |||
@@ -681,6 +681,11 @@ or: | |||
681 | 681 | ||
682 | as appropriate. | 682 | as appropriate. |
683 | 683 | ||
684 | PLEASE NOTE: The 'nents' argument to dma_sync_sg_for_cpu() and | ||
685 | dma_sync_sg_for_device() must be the same passed to | ||
686 | dma_map_sg(). It is _NOT_ the count returned by | ||
687 | dma_map_sg(). | ||
688 | |||
684 | After the last DMA transfer call one of the DMA unmap routines | 689 | After the last DMA transfer call one of the DMA unmap routines |
685 | dma_unmap_{single,sg}(). If you don't touch the data from the first | 690 | dma_unmap_{single,sg}(). If you don't touch the data from the first |
686 | dma_map_*() call till dma_unmap_*(), then you don't have to call the | 691 | dma_map_*() call till dma_unmap_*(), then you don't have to call the |
diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt index edccacd4f048..1e98a7e6bccc 100644 --- a/Documentation/DMA-API.txt +++ b/Documentation/DMA-API.txt | |||
@@ -142,19 +142,6 @@ Part Ic - DMA addressing limitations | |||
142 | ------------------------------------ | 142 | ------------------------------------ |
143 | 143 | ||
144 | int | 144 | int |
145 | dma_supported(struct device *dev, u64 mask) | ||
146 | |||
147 | Checks to see if the device can support DMA to the memory described by | ||
148 | mask. | ||
149 | |||
150 | Returns: 1 if it can and 0 if it can't. | ||
151 | |||
152 | Notes: This routine merely tests to see if the mask is possible. It | ||
153 | won't change the current mask settings. It is more intended as an | ||
154 | internal API for use by the platform than an external API for use by | ||
155 | driver writers. | ||
156 | |||
157 | int | ||
158 | dma_set_mask_and_coherent(struct device *dev, u64 mask) | 145 | dma_set_mask_and_coherent(struct device *dev, u64 mask) |
159 | 146 | ||
160 | Checks to see if the mask is possible and updates the device | 147 | Checks to see if the mask is possible and updates the device |
@@ -340,7 +327,7 @@ accessed sg->address and sg->length as shown above. | |||
340 | 327 | ||
341 | void | 328 | void |
342 | dma_unmap_sg(struct device *dev, struct scatterlist *sg, | 329 | dma_unmap_sg(struct device *dev, struct scatterlist *sg, |
343 | int nhwentries, enum dma_data_direction direction) | 330 | int nents, enum dma_data_direction direction) |
344 | 331 | ||
345 | Unmap the previously mapped scatter/gather list. All the parameters | 332 | Unmap the previously mapped scatter/gather list. All the parameters |
346 | must be the same as those and passed in to the scatter/gather mapping | 333 | must be the same as those and passed in to the scatter/gather mapping |
@@ -356,10 +343,10 @@ void | |||
356 | dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size, | 343 | dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size, |
357 | enum dma_data_direction direction) | 344 | enum dma_data_direction direction) |
358 | void | 345 | void |
359 | dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems, | 346 | dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nents, |
360 | enum dma_data_direction direction) | 347 | enum dma_data_direction direction) |
361 | void | 348 | void |
362 | dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems, | 349 | dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents, |
363 | enum dma_data_direction direction) | 350 | enum dma_data_direction direction) |
364 | 351 | ||
365 | Synchronise a single contiguous or scatter/gather mapping for the CPU | 352 | Synchronise a single contiguous or scatter/gather mapping for the CPU |
diff --git a/Documentation/DocBook/.gitignore b/Documentation/DocBook/.gitignore index 7ebd5465d927..e05da3f7aa21 100644 --- a/Documentation/DocBook/.gitignore +++ b/Documentation/DocBook/.gitignore | |||
@@ -11,5 +11,7 @@ | |||
11 | *.png | 11 | *.png |
12 | *.gif | 12 | *.gif |
13 | *.svg | 13 | *.svg |
14 | *.proc | ||
15 | *.db | ||
14 | media-indices.tmpl | 16 | media-indices.tmpl |
15 | media-entities.tmpl | 17 | media-entities.tmpl |
diff --git a/Documentation/DocBook/80211.tmpl b/Documentation/DocBook/80211.tmpl index aac9357d4866..f9b9ad7894f5 100644 --- a/Documentation/DocBook/80211.tmpl +++ b/Documentation/DocBook/80211.tmpl | |||
@@ -154,8 +154,9 @@ | |||
154 | !Finclude/net/cfg80211.h cfg80211_scan_request | 154 | !Finclude/net/cfg80211.h cfg80211_scan_request |
155 | !Finclude/net/cfg80211.h cfg80211_scan_done | 155 | !Finclude/net/cfg80211.h cfg80211_scan_done |
156 | !Finclude/net/cfg80211.h cfg80211_bss | 156 | !Finclude/net/cfg80211.h cfg80211_bss |
157 | !Finclude/net/cfg80211.h cfg80211_inform_bss_width_frame | 157 | !Finclude/net/cfg80211.h cfg80211_inform_bss |
158 | !Finclude/net/cfg80211.h cfg80211_inform_bss_width | 158 | !Finclude/net/cfg80211.h cfg80211_inform_bss_frame_data |
159 | !Finclude/net/cfg80211.h cfg80211_inform_bss_data | ||
159 | !Finclude/net/cfg80211.h cfg80211_unlink_bss | 160 | !Finclude/net/cfg80211.h cfg80211_unlink_bss |
160 | !Finclude/net/cfg80211.h cfg80211_find_ie | 161 | !Finclude/net/cfg80211.h cfg80211_find_ie |
161 | !Finclude/net/cfg80211.h ieee80211_bss_get_ie | 162 | !Finclude/net/cfg80211.h ieee80211_bss_get_ie |
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index 93eff64387cd..91f6d89bb19f 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile | |||
@@ -14,7 +14,7 @@ DOCBOOKS := z8530book.xml device-drivers.xml \ | |||
14 | genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \ | 14 | genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \ |
15 | 80211.xml debugobjects.xml sh.xml regulator.xml \ | 15 | 80211.xml debugobjects.xml sh.xml regulator.xml \ |
16 | alsa-driver-api.xml writing-an-alsa-driver.xml \ | 16 | alsa-driver-api.xml writing-an-alsa-driver.xml \ |
17 | tracepoint.xml drm.xml media_api.xml w1.xml \ | 17 | tracepoint.xml gpu.xml media_api.xml w1.xml \ |
18 | writing_musb_glue_layer.xml crypto-API.xml iio.xml | 18 | writing_musb_glue_layer.xml crypto-API.xml iio.xml |
19 | 19 | ||
20 | include Documentation/DocBook/media/Makefile | 20 | include Documentation/DocBook/media/Makefile |
@@ -69,6 +69,12 @@ installmandocs: mandocs | |||
69 | KERNELDOCXMLREF = $(srctree)/scripts/kernel-doc-xml-ref | 69 | KERNELDOCXMLREF = $(srctree)/scripts/kernel-doc-xml-ref |
70 | KERNELDOC = $(srctree)/scripts/kernel-doc | 70 | KERNELDOC = $(srctree)/scripts/kernel-doc |
71 | DOCPROC = $(objtree)/scripts/docproc | 71 | DOCPROC = $(objtree)/scripts/docproc |
72 | CHECK_LC_CTYPE = $(objtree)/scripts/check-lc_ctype | ||
73 | |||
74 | # Use a fixed encoding - UTF-8 if the C library has support built-in | ||
75 | # or ASCII if not | ||
76 | LC_CTYPE := $(call try-run, LC_CTYPE=C.UTF-8 $(CHECK_LC_CTYPE),C.UTF-8,C) | ||
77 | export LC_CTYPE | ||
72 | 78 | ||
73 | XMLTOFLAGS = -m $(srctree)/$(src)/stylesheet.xsl | 79 | XMLTOFLAGS = -m $(srctree)/$(src)/stylesheet.xsl |
74 | XMLTOFLAGS += --skip-validation | 80 | XMLTOFLAGS += --skip-validation |
diff --git a/Documentation/DocBook/alsa-driver-api.tmpl b/Documentation/DocBook/alsa-driver-api.tmpl index e94a10bb4a9e..53f439dcc94b 100644 --- a/Documentation/DocBook/alsa-driver-api.tmpl +++ b/Documentation/DocBook/alsa-driver-api.tmpl | |||
@@ -112,6 +112,8 @@ | |||
112 | !Esound/soc/soc-devres.c | 112 | !Esound/soc/soc-devres.c |
113 | !Esound/soc/soc-io.c | 113 | !Esound/soc/soc-io.c |
114 | !Esound/soc/soc-pcm.c | 114 | !Esound/soc/soc-pcm.c |
115 | !Esound/soc/soc-ops.c | ||
116 | !Esound/soc/soc-compress.c | ||
115 | </sect1> | 117 | </sect1> |
116 | <sect1><title>ASoC DAPM API</title> | 118 | <sect1><title>ASoC DAPM API</title> |
117 | !Esound/soc/soc-dapm.c | 119 | !Esound/soc/soc-dapm.c |
diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl index 1d6008d51b55..42a2d8593e39 100644 --- a/Documentation/DocBook/device-drivers.tmpl +++ b/Documentation/DocBook/device-drivers.tmpl | |||
@@ -221,6 +221,9 @@ X!Isound/sound_firmware.c | |||
221 | <title>Media Devices</title> | 221 | <title>Media Devices</title> |
222 | 222 | ||
223 | <sect1><title>Video2Linux devices</title> | 223 | <sect1><title>Video2Linux devices</title> |
224 | !Iinclude/media/tuner.h | ||
225 | !Iinclude/media/tuner-types.h | ||
226 | !Iinclude/media/tveeprom.h | ||
224 | !Iinclude/media/v4l2-async.h | 227 | !Iinclude/media/v4l2-async.h |
225 | !Iinclude/media/v4l2-ctrls.h | 228 | !Iinclude/media/v4l2-ctrls.h |
226 | !Iinclude/media/v4l2-dv-timings.h | 229 | !Iinclude/media/v4l2-dv-timings.h |
@@ -231,6 +234,7 @@ X!Isound/sound_firmware.c | |||
231 | !Iinclude/media/v4l2-of.h | 234 | !Iinclude/media/v4l2-of.h |
232 | !Iinclude/media/v4l2-subdev.h | 235 | !Iinclude/media/v4l2-subdev.h |
233 | !Iinclude/media/videobuf2-core.h | 236 | !Iinclude/media/videobuf2-core.h |
237 | !Iinclude/media/videobuf2-v4l2.h | ||
234 | !Iinclude/media/videobuf2-memops.h | 238 | !Iinclude/media/videobuf2-memops.h |
235 | </sect1> | 239 | </sect1> |
236 | <sect1><title>Digital TV (DVB) devices</title> | 240 | <sect1><title>Digital TV (DVB) devices</title> |
@@ -239,15 +243,82 @@ X!Isound/sound_firmware.c | |||
239 | !Idrivers/media/dvb-core/dvb_math.h | 243 | !Idrivers/media/dvb-core/dvb_math.h |
240 | !Idrivers/media/dvb-core/dvb_ringbuffer.h | 244 | !Idrivers/media/dvb-core/dvb_ringbuffer.h |
241 | !Idrivers/media/dvb-core/dvbdev.h | 245 | !Idrivers/media/dvb-core/dvbdev.h |
242 | </sect1> | 246 | <sect1><title>Digital TV Demux API</title> |
243 | <sect1><title>Remote Controller devices</title> | 247 | <para>The kernel demux API defines a driver-internal interface for |
248 | registering low-level, hardware specific driver to a hardware | ||
249 | independent demux layer. It is only of interest for Digital TV | ||
250 | device driver writers. The header file for this API is named | ||
251 | <constant>demux.h</constant> and located in | ||
252 | <constant>drivers/media/dvb-core</constant>.</para> | ||
253 | |||
254 | <para>The demux API should be implemented for each demux in the | ||
255 | system. It is used to select the TS source of a demux and to manage | ||
256 | the demux resources. When the demux client allocates a resource via | ||
257 | the demux API, it receives a pointer to the API of that | ||
258 | resource.</para> | ||
259 | <para>Each demux receives its TS input from a DVB front-end or from | ||
260 | memory, as set via this demux API. In a system with more than one | ||
261 | front-end, the API can be used to select one of the DVB front-ends | ||
262 | as a TS source for a demux, unless this is fixed in the HW platform. | ||
263 | The demux API only controls front-ends regarding to their connections | ||
264 | with demuxes; the APIs used to set the other front-end parameters, | ||
265 | such as tuning, are not defined in this document.</para> | ||
266 | <para>The functions that implement the abstract interface demux should | ||
267 | be defined static or module private and registered to the Demux | ||
268 | core for external access. It is not necessary to implement every | ||
269 | function in the struct <constant>dmx_demux</constant>. For example, | ||
270 | a demux interface might support Section filtering, but not PES | ||
271 | filtering. The API client is expected to check the value of any | ||
272 | function pointer before calling the function: the value of NULL means | ||
273 | that the “function is not available”.</para> | ||
274 | <para>Whenever the functions of the demux API modify shared data, | ||
275 | the possibilities of lost update and race condition problems should | ||
276 | be addressed, e.g. by protecting parts of code with mutexes.</para> | ||
277 | <para>Note that functions called from a bottom half context must not | ||
278 | sleep. Even a simple memory allocation without using GFP_ATOMIC can | ||
279 | result in a kernel thread being put to sleep if swapping is needed. | ||
280 | For example, the Linux kernel calls the functions of a network device | ||
281 | interface from a bottom half context. Thus, if a demux API function | ||
282 | is called from network device code, the function must not sleep. | ||
283 | </para> | ||
284 | </sect1> | ||
285 | |||
286 | <section id="demux_callback_api"> | ||
287 | <title>Demux Callback API</title> | ||
288 | <para>This kernel-space API comprises the callback functions that | ||
289 | deliver filtered data to the demux client. Unlike the other DVB | ||
290 | kABIs, these functions are provided by the client and called from | ||
291 | the demux code.</para> | ||
292 | <para>The function pointers of this abstract interface are not | ||
293 | packed into a structure as in the other demux APIs, because the | ||
294 | callback functions are registered and used independent of each | ||
295 | other. As an example, it is possible for the API client to provide | ||
296 | several callback functions for receiving TS packets and no | ||
297 | callbacks for PES packets or sections.</para> | ||
298 | <para>The functions that implement the callback API need not be | ||
299 | re-entrant: when a demux driver calls one of these functions, | ||
300 | the driver is not allowed to call the function again before | ||
301 | the original call returns. If a callback is triggered by a | ||
302 | hardware interrupt, it is recommended to use the Linux | ||
303 | “bottom half” mechanism or start a tasklet instead of | ||
304 | making the callback function call directly from a hardware | ||
305 | interrupt.</para> | ||
306 | <para>This mechanism is implemented by | ||
307 | <link linkend='API-dmx-ts-cb'>dmx_ts_cb()</link> and | ||
308 | <link linkend='API-dmx-section-cb'>dmx_section_cb()</link>.</para> | ||
309 | </section> | ||
310 | |||
311 | !Idrivers/media/dvb-core/demux.h | ||
312 | </sect1> | ||
313 | <sect1><title>Remote Controller devices</title> | ||
244 | !Iinclude/media/rc-core.h | 314 | !Iinclude/media/rc-core.h |
245 | </sect1> | 315 | !Iinclude/media/lirc_dev.h |
246 | <sect1><title>Media Controller devices</title> | 316 | </sect1> |
317 | <sect1><title>Media Controller devices</title> | ||
247 | !Iinclude/media/media-device.h | 318 | !Iinclude/media/media-device.h |
248 | !Iinclude/media/media-devnode.h | 319 | !Iinclude/media/media-devnode.h |
249 | !Iinclude/media/media-entity.h | 320 | !Iinclude/media/media-entity.h |
250 | </sect1> | 321 | </sect1> |
251 | 322 | ||
252 | </chapter> | 323 | </chapter> |
253 | 324 | ||
diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/gpu.tmpl index 9ddf8c6cb887..201dcd3c2e9d 100644 --- a/Documentation/DocBook/drm.tmpl +++ b/Documentation/DocBook/gpu.tmpl | |||
@@ -2,9 +2,9 @@ | |||
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" | 2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" |
3 | "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []> | 3 | "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []> |
4 | 4 | ||
5 | <book id="drmDevelopersGuide"> | 5 | <book id="gpuDevelopersGuide"> |
6 | <bookinfo> | 6 | <bookinfo> |
7 | <title>Linux DRM Developer's Guide</title> | 7 | <title>Linux GPU Driver Developer's Guide</title> |
8 | 8 | ||
9 | <authorgroup> | 9 | <authorgroup> |
10 | <author> | 10 | <author> |
@@ -40,6 +40,16 @@ | |||
40 | </address> | 40 | </address> |
41 | </affiliation> | 41 | </affiliation> |
42 | </author> | 42 | </author> |
43 | <author> | ||
44 | <firstname>Lukas</firstname> | ||
45 | <surname>Wunner</surname> | ||
46 | <contrib>vga_switcheroo documentation</contrib> | ||
47 | <affiliation> | ||
48 | <address> | ||
49 | <email>lukas@wunner.de</email> | ||
50 | </address> | ||
51 | </affiliation> | ||
52 | </author> | ||
43 | </authorgroup> | 53 | </authorgroup> |
44 | 54 | ||
45 | <copyright> | 55 | <copyright> |
@@ -51,6 +61,10 @@ | |||
51 | <year>2012</year> | 61 | <year>2012</year> |
52 | <holder>Laurent Pinchart</holder> | 62 | <holder>Laurent Pinchart</holder> |
53 | </copyright> | 63 | </copyright> |
64 | <copyright> | ||
65 | <year>2015</year> | ||
66 | <holder>Lukas Wunner</holder> | ||
67 | </copyright> | ||
54 | 68 | ||
55 | <legalnotice> | 69 | <legalnotice> |
56 | <para> | 70 | <para> |
@@ -69,6 +83,13 @@ | |||
69 | <revremark>Added extensive documentation about driver internals. | 83 | <revremark>Added extensive documentation about driver internals. |
70 | </revremark> | 84 | </revremark> |
71 | </revision> | 85 | </revision> |
86 | <revision> | ||
87 | <revnumber>1.1</revnumber> | ||
88 | <date>2015-10-11</date> | ||
89 | <authorinitials>LW</authorinitials> | ||
90 | <revremark>Added vga_switcheroo documentation. | ||
91 | </revremark> | ||
92 | </revision> | ||
72 | </revhistory> | 93 | </revhistory> |
73 | </bookinfo> | 94 | </bookinfo> |
74 | 95 | ||
@@ -78,9 +99,9 @@ | |||
78 | <title>DRM Core</title> | 99 | <title>DRM Core</title> |
79 | <partintro> | 100 | <partintro> |
80 | <para> | 101 | <para> |
81 | This first part of the DRM Developer's Guide documents core DRM code, | 102 | This first part of the GPU Driver Developer's Guide documents core DRM |
82 | helper libraries for writing drivers and generic userspace interfaces | 103 | code, helper libraries for writing drivers and generic userspace |
83 | exposed by DRM drivers. | 104 | interfaces exposed by DRM drivers. |
84 | </para> | 105 | </para> |
85 | </partintro> | 106 | </partintro> |
86 | 107 | ||
@@ -138,14 +159,10 @@ | |||
138 | <para> | 159 | <para> |
139 | At the core of every DRM driver is a <structname>drm_driver</structname> | 160 | At the core of every DRM driver is a <structname>drm_driver</structname> |
140 | structure. Drivers typically statically initialize a drm_driver structure, | 161 | structure. Drivers typically statically initialize a drm_driver structure, |
141 | and then pass it to one of the <function>drm_*_init()</function> functions | 162 | and then pass it to <function>drm_dev_alloc()</function> to allocate a |
142 | to register it with the DRM subsystem. | 163 | device instance. After the device instance is fully initialized it can be |
143 | </para> | 164 | registered (which makes it accessible from userspace) using |
144 | <para> | 165 | <function>drm_dev_register()</function>. |
145 | Newer drivers that no longer require a <structname>drm_bus</structname> | ||
146 | structure can alternatively use the low-level device initialization and | ||
147 | registration functions such as <function>drm_dev_alloc()</function> and | ||
148 | <function>drm_dev_register()</function> directly. | ||
149 | </para> | 166 | </para> |
150 | <para> | 167 | <para> |
151 | The <structname>drm_driver</structname> structure contains static | 168 | The <structname>drm_driver</structname> structure contains static |
@@ -296,83 +313,12 @@ char *date;</synopsis> | |||
296 | </sect3> | 313 | </sect3> |
297 | </sect2> | 314 | </sect2> |
298 | <sect2> | 315 | <sect2> |
299 | <title>Device Registration</title> | 316 | <title>Device Instance and Driver Handling</title> |
300 | <para> | 317 | !Pdrivers/gpu/drm/drm_drv.c driver instance overview |
301 | A number of functions are provided to help with device registration. | ||
302 | The functions deal with PCI and platform devices, respectively. | ||
303 | </para> | ||
304 | !Edrivers/gpu/drm/drm_pci.c | ||
305 | !Edrivers/gpu/drm/drm_platform.c | ||
306 | <para> | ||
307 | New drivers that no longer rely on the services provided by the | ||
308 | <structname>drm_bus</structname> structure can call the low-level | ||
309 | device registration functions directly. The | ||
310 | <function>drm_dev_alloc()</function> function can be used to allocate | ||
311 | and initialize a new <structname>drm_device</structname> structure. | ||
312 | Drivers will typically want to perform some additional setup on this | ||
313 | structure, such as allocating driver-specific data and storing a | ||
314 | pointer to it in the DRM device's <structfield>dev_private</structfield> | ||
315 | field. Drivers should also set the device's unique name using the | ||
316 | <function>drm_dev_set_unique()</function> function. After it has been | ||
317 | set up a device can be registered with the DRM subsystem by calling | ||
318 | <function>drm_dev_register()</function>. This will cause the device to | ||
319 | be exposed to userspace and will call the driver's | ||
320 | <structfield>.load()</structfield> implementation. When a device is | ||
321 | removed, the DRM device can safely be unregistered and freed by calling | ||
322 | <function>drm_dev_unregister()</function> followed by a call to | ||
323 | <function>drm_dev_unref()</function>. | ||
324 | </para> | ||
325 | !Edrivers/gpu/drm/drm_drv.c | 318 | !Edrivers/gpu/drm/drm_drv.c |
326 | </sect2> | 319 | </sect2> |
327 | <sect2> | 320 | <sect2> |
328 | <title>Driver Load</title> | 321 | <title>Driver Load</title> |
329 | <para> | ||
330 | The <methodname>load</methodname> method is the driver and device | ||
331 | initialization entry point. The method is responsible for allocating and | ||
332 | initializing driver private data, performing resource allocation and | ||
333 | mapping (e.g. acquiring | ||
334 | clocks, mapping registers or allocating command buffers), initializing | ||
335 | the memory manager (<xref linkend="drm-memory-management"/>), installing | ||
336 | the IRQ handler (<xref linkend="drm-irq-registration"/>), setting up | ||
337 | vertical blanking handling (<xref linkend="drm-vertical-blank"/>), mode | ||
338 | setting (<xref linkend="drm-mode-setting"/>) and initial output | ||
339 | configuration (<xref linkend="drm-kms-init"/>). | ||
340 | </para> | ||
341 | <note><para> | ||
342 | If compatibility is a concern (e.g. with drivers converted over from | ||
343 | User Mode Setting to Kernel Mode Setting), care must be taken to prevent | ||
344 | device initialization and control that is incompatible with currently | ||
345 | active userspace drivers. For instance, if user level mode setting | ||
346 | drivers are in use, it would be problematic to perform output discovery | ||
347 | & configuration at load time. Likewise, if user-level drivers | ||
348 | unaware of memory management are in use, memory management and command | ||
349 | buffer setup may need to be omitted. These requirements are | ||
350 | driver-specific, and care needs to be taken to keep both old and new | ||
351 | applications and libraries working. | ||
352 | </para></note> | ||
353 | <synopsis>int (*load) (struct drm_device *, unsigned long flags);</synopsis> | ||
354 | <para> | ||
355 | The method takes two arguments, a pointer to the newly created | ||
356 | <structname>drm_device</structname> and flags. The flags are used to | ||
357 | pass the <structfield>driver_data</structfield> field of the device id | ||
358 | corresponding to the device passed to <function>drm_*_init()</function>. | ||
359 | Only PCI devices currently use this, USB and platform DRM drivers have | ||
360 | their <methodname>load</methodname> method called with flags to 0. | ||
361 | </para> | ||
362 | <sect3> | ||
363 | <title>Driver Private Data</title> | ||
364 | <para> | ||
365 | The driver private hangs off the main | ||
366 | <structname>drm_device</structname> structure and can be used for | ||
367 | tracking various device-specific bits of information, like register | ||
368 | offsets, command buffer status, register state for suspend/resume, etc. | ||
369 | At load time, a driver may simply allocate one and set | ||
370 | <structname>drm_device</structname>.<structfield>dev_priv</structfield> | ||
371 | appropriately; it should be freed and | ||
372 | <structname>drm_device</structname>.<structfield>dev_priv</structfield> | ||
373 | set to NULL when the driver is unloaded. | ||
374 | </para> | ||
375 | </sect3> | ||
376 | <sect3 id="drm-irq-registration"> | 322 | <sect3 id="drm-irq-registration"> |
377 | <title>IRQ Registration</title> | 323 | <title>IRQ Registration</title> |
378 | <para> | 324 | <para> |
@@ -465,6 +411,18 @@ char *date;</synopsis> | |||
465 | </para> | 411 | </para> |
466 | </sect3> | 412 | </sect3> |
467 | </sect2> | 413 | </sect2> |
414 | <sect2> | ||
415 | <title>Bus-specific Device Registration and PCI Support</title> | ||
416 | <para> | ||
417 | A number of functions are provided to help with device registration. | ||
418 | The functions deal with PCI and platform devices respectively and are | ||
419 | only provided for historical reasons. These are all deprecated and | ||
420 | shouldn't be used in new drivers. Besides that there's a few | ||
421 | helpers for pci drivers. | ||
422 | </para> | ||
423 | !Edrivers/gpu/drm/drm_pci.c | ||
424 | !Edrivers/gpu/drm/drm_platform.c | ||
425 | </sect2> | ||
468 | </sect1> | 426 | </sect1> |
469 | 427 | ||
470 | <!-- Internals: memory management --> | 428 | <!-- Internals: memory management --> |
@@ -3646,10 +3604,11 @@ void (*postclose) (struct drm_device *, struct drm_file *);</synopsis> | |||
3646 | plane properties to default value, so that a subsequent open of the | 3604 | plane properties to default value, so that a subsequent open of the |
3647 | device will not inherit state from the previous user. It can also be | 3605 | device will not inherit state from the previous user. It can also be |
3648 | used to execute delayed power switching state changes, e.g. in | 3606 | used to execute delayed power switching state changes, e.g. in |
3649 | conjunction with the vga-switcheroo infrastructure. Beyond that KMS | 3607 | conjunction with the vga_switcheroo infrastructure (see |
3650 | drivers should not do any further cleanup. Only legacy UMS drivers might | 3608 | <xref linkend="vga_switcheroo"/>). Beyond that KMS drivers should not |
3651 | need to clean up device state so that the vga console or an independent | 3609 | do any further cleanup. Only legacy UMS drivers might need to clean up |
3652 | fbdev driver could take over. | 3610 | device state so that the vga console or an independent fbdev driver |
3611 | could take over. | ||
3653 | </para> | 3612 | </para> |
3654 | </sect2> | 3613 | </sect2> |
3655 | <sect2> | 3614 | <sect2> |
@@ -3747,11 +3706,14 @@ int num_ioctls;</synopsis> | |||
3747 | </para></listitem> | 3706 | </para></listitem> |
3748 | <listitem><para> | 3707 | <listitem><para> |
3749 | DRM_UNLOCKED - The ioctl handler will be called without locking | 3708 | DRM_UNLOCKED - The ioctl handler will be called without locking |
3750 | the DRM global mutex | 3709 | the DRM global mutex. This is the enforced default for kms drivers |
3710 | (i.e. using the DRIVER_MODESET flag) and hence shouldn't be used | ||
3711 | any more for new drivers. | ||
3751 | </para></listitem> | 3712 | </para></listitem> |
3752 | </itemizedlist> | 3713 | </itemizedlist> |
3753 | </para> | 3714 | </para> |
3754 | </para> | 3715 | </para> |
3716 | !Edrivers/gpu/drm/drm_ioctl.c | ||
3755 | </sect2> | 3717 | </sect2> |
3756 | </sect1> | 3718 | </sect1> |
3757 | <sect1> | 3719 | <sect1> |
@@ -3949,8 +3911,8 @@ int num_ioctls;</synopsis> | |||
3949 | 3911 | ||
3950 | <partintro> | 3912 | <partintro> |
3951 | <para> | 3913 | <para> |
3952 | This second part of the DRM Developer's Guide documents driver code, | 3914 | This second part of the GPU Driver Developer's Guide documents driver |
3953 | implementation details and also all the driver-specific userspace | 3915 | code, implementation details and also all the driver-specific userspace |
3954 | interfaces. Especially since all hardware-acceleration interfaces to | 3916 | interfaces. Especially since all hardware-acceleration interfaces to |
3955 | userspace are driver specific for efficiency and other reasons these | 3917 | userspace are driver specific for efficiency and other reasons these |
3956 | interfaces can be rather substantial. Hence every driver has its own | 3918 | interfaces can be rather substantial. Hence every driver has its own |
@@ -4051,6 +4013,7 @@ int num_ioctls;</synopsis> | |||
4051 | <title>High Definition Audio</title> | 4013 | <title>High Definition Audio</title> |
4052 | !Pdrivers/gpu/drm/i915/intel_audio.c High Definition Audio over HDMI and Display Port | 4014 | !Pdrivers/gpu/drm/i915/intel_audio.c High Definition Audio over HDMI and Display Port |
4053 | !Idrivers/gpu/drm/i915/intel_audio.c | 4015 | !Idrivers/gpu/drm/i915/intel_audio.c |
4016 | !Iinclude/drm/i915_component.h | ||
4054 | </sect2> | 4017 | </sect2> |
4055 | <sect2> | 4018 | <sect2> |
4056 | <title>Panel Self Refresh PSR (PSR/SRD)</title> | 4019 | <title>Panel Self Refresh PSR (PSR/SRD)</title> |
@@ -4238,6 +4201,20 @@ int num_ioctls;</synopsis> | |||
4238 | </sect2> | 4201 | </sect2> |
4239 | </sect1> | 4202 | </sect1> |
4240 | <sect1> | 4203 | <sect1> |
4204 | <title>GuC-based Command Submission</title> | ||
4205 | <sect2> | ||
4206 | <title>GuC</title> | ||
4207 | !Pdrivers/gpu/drm/i915/intel_guc_loader.c GuC-specific firmware loader | ||
4208 | !Idrivers/gpu/drm/i915/intel_guc_loader.c | ||
4209 | </sect2> | ||
4210 | <sect2> | ||
4211 | <title>GuC Client</title> | ||
4212 | !Pdrivers/gpu/drm/i915/i915_guc_submission.c GuC-based command submissison | ||
4213 | !Idrivers/gpu/drm/i915/i915_guc_submission.c | ||
4214 | </sect2> | ||
4215 | </sect1> | ||
4216 | |||
4217 | <sect1> | ||
4241 | <title> Tracing </title> | 4218 | <title> Tracing </title> |
4242 | <para> | 4219 | <para> |
4243 | This sections covers all things related to the tracepoints implemented in | 4220 | This sections covers all things related to the tracepoints implemented in |
@@ -4260,4 +4237,50 @@ int num_ioctls;</synopsis> | |||
4260 | </chapter> | 4237 | </chapter> |
4261 | !Cdrivers/gpu/drm/i915/i915_irq.c | 4238 | !Cdrivers/gpu/drm/i915/i915_irq.c |
4262 | </part> | 4239 | </part> |
4240 | |||
4241 | <part id="vga_switcheroo"> | ||
4242 | <title>vga_switcheroo</title> | ||
4243 | <partintro> | ||
4244 | !Pdrivers/gpu/vga/vga_switcheroo.c Overview | ||
4245 | </partintro> | ||
4246 | |||
4247 | <chapter id="modes_of_use"> | ||
4248 | <title>Modes of Use</title> | ||
4249 | <sect1> | ||
4250 | <title>Manual switching and manual power control</title> | ||
4251 | !Pdrivers/gpu/vga/vga_switcheroo.c Manual switching and manual power control | ||
4252 | </sect1> | ||
4253 | <sect1> | ||
4254 | <title>Driver power control</title> | ||
4255 | !Pdrivers/gpu/vga/vga_switcheroo.c Driver power control | ||
4256 | </sect1> | ||
4257 | </chapter> | ||
4258 | |||
4259 | <chapter id="pubfunctions"> | ||
4260 | <title>Public functions</title> | ||
4261 | !Edrivers/gpu/vga/vga_switcheroo.c | ||
4262 | </chapter> | ||
4263 | |||
4264 | <chapter id="pubstructures"> | ||
4265 | <title>Public structures</title> | ||
4266 | !Finclude/linux/vga_switcheroo.h vga_switcheroo_handler | ||
4267 | !Finclude/linux/vga_switcheroo.h vga_switcheroo_client_ops | ||
4268 | </chapter> | ||
4269 | |||
4270 | <chapter id="pubconstants"> | ||
4271 | <title>Public constants</title> | ||
4272 | !Finclude/linux/vga_switcheroo.h vga_switcheroo_client_id | ||
4273 | !Finclude/linux/vga_switcheroo.h vga_switcheroo_state | ||
4274 | </chapter> | ||
4275 | |||
4276 | <chapter id="privstructures"> | ||
4277 | <title>Private structures</title> | ||
4278 | !Fdrivers/gpu/vga/vga_switcheroo.c vgasr_priv | ||
4279 | !Fdrivers/gpu/vga/vga_switcheroo.c vga_switcheroo_client | ||
4280 | </chapter> | ||
4281 | |||
4282 | !Cdrivers/gpu/vga/vga_switcheroo.c | ||
4283 | !Cinclude/linux/vga_switcheroo.h | ||
4284 | </part> | ||
4285 | |||
4263 | </book> | 4286 | </book> |
diff --git a/Documentation/DocBook/iio.tmpl b/Documentation/DocBook/iio.tmpl index 06bb53de5a47..98be322673da 100644 --- a/Documentation/DocBook/iio.tmpl +++ b/Documentation/DocBook/iio.tmpl | |||
@@ -578,7 +578,7 @@ | |||
578 | work together. | 578 | work together. |
579 | </para> | 579 | </para> |
580 | <sect2 id="iiotrigbufsetup"> <title> IIO triggered buffer setup</title> | 580 | <sect2 id="iiotrigbufsetup"> <title> IIO triggered buffer setup</title> |
581 | !Edrivers/iio/industrialio-triggered-buffer.c | 581 | !Edrivers/iio/buffer/industrialio-triggered-buffer.c |
582 | !Finclude/linux/iio/iio.h iio_buffer_setup_ops | 582 | !Finclude/linux/iio/iio.h iio_buffer_setup_ops |
583 | 583 | ||
584 | 584 | ||
diff --git a/Documentation/DocBook/media/dvb/dvbapi.xml b/Documentation/DocBook/media/dvb/dvbapi.xml index 858fd7d17104..8576481e20ae 100644 --- a/Documentation/DocBook/media/dvb/dvbapi.xml +++ b/Documentation/DocBook/media/dvb/dvbapi.xml | |||
@@ -125,9 +125,6 @@ Added ISDB-T test originally written by Patrick Boettcher | |||
125 | &sub-audio; | 125 | &sub-audio; |
126 | </section> | 126 | </section> |
127 | </chapter> | 127 | </chapter> |
128 | <chapter id="dvb_kdapi"> | ||
129 | &sub-kdapi; | ||
130 | </chapter> | ||
131 | <chapter id="dvb_examples"> | 128 | <chapter id="dvb_examples"> |
132 | &sub-examples; | 129 | &sub-examples; |
133 | </chapter> | 130 | </chapter> |
diff --git a/Documentation/DocBook/media/dvb/kdapi.xml b/Documentation/DocBook/media/dvb/kdapi.xml deleted file mode 100644 index 68bcd33a82c3..000000000000 --- a/Documentation/DocBook/media/dvb/kdapi.xml +++ /dev/null | |||
@@ -1,2309 +0,0 @@ | |||
1 | <title>Kernel Demux API</title> | ||
2 | <para>The kernel demux API defines a driver-internal interface for registering low-level, | ||
3 | hardware specific driver to a hardware independent demux layer. It is only of interest for | ||
4 | DVB device driver writers. The header file for this API is named <constant>demux.h</constant> and located in | ||
5 | <constant>">drivers/media/dvb-core</constant>. | ||
6 | </para> | ||
7 | <para>Maintainer note: This section must be reviewed. It is probably out of date. | ||
8 | </para> | ||
9 | |||
10 | <section id="kernel_demux_data_types"> | ||
11 | <title>Kernel Demux Data Types</title> | ||
12 | |||
13 | |||
14 | <section id="dmx_success_t"> | ||
15 | <title>dmx_success_t</title> | ||
16 | <programlisting> | ||
17 | typedef enum { | ||
18 | DMX_OK = 0, /⋆ Received Ok ⋆/ | ||
19 | DMX_LENGTH_ERROR, /⋆ Incorrect length ⋆/ | ||
20 | DMX_OVERRUN_ERROR, /⋆ Receiver ring buffer overrun ⋆/ | ||
21 | DMX_CRC_ERROR, /⋆ Incorrect CRC ⋆/ | ||
22 | DMX_FRAME_ERROR, /⋆ Frame alignment error ⋆/ | ||
23 | DMX_FIFO_ERROR, /⋆ Receiver FIFO overrun ⋆/ | ||
24 | DMX_MISSED_ERROR /⋆ Receiver missed packet ⋆/ | ||
25 | } dmx_success_t; | ||
26 | </programlisting> | ||
27 | |||
28 | </section> | ||
29 | <section id="ts_filter_types"> | ||
30 | <title>TS filter types</title> | ||
31 | <programlisting> | ||
32 | /⋆--------------------------------------------------------------------------⋆/ | ||
33 | /⋆ TS packet reception ⋆/ | ||
34 | /⋆--------------------------------------------------------------------------⋆/ | ||
35 | |||
36 | /⋆ TS filter type for set_type() ⋆/ | ||
37 | |||
38 | #define TS_PACKET 1 /⋆ send TS packets (188 bytes) to callback (default) ⋆/ | ||
39 | #define TS_PAYLOAD_ONLY 2 /⋆ in case TS_PACKET is set, only send the TS | ||
40 | payload (<=184 bytes per packet) to callback ⋆/ | ||
41 | #define TS_DECODER 4 /⋆ send stream to built-in decoder (if present) ⋆/ | ||
42 | </programlisting> | ||
43 | |||
44 | </section> | ||
45 | <section id="dmx_ts_pes_t"> | ||
46 | <title>dmx_ts_pes_t</title> | ||
47 | <para>The structure | ||
48 | </para> | ||
49 | <programlisting> | ||
50 | typedef enum | ||
51 | { | ||
52 | DMX_TS_PES_AUDIO, /⋆ also send packets to audio decoder (if it exists) ⋆/ | ||
53 | DMX_TS_PES_VIDEO, /⋆ ... ⋆/ | ||
54 | DMX_TS_PES_TELETEXT, | ||
55 | DMX_TS_PES_SUBTITLE, | ||
56 | DMX_TS_PES_PCR, | ||
57 | DMX_TS_PES_OTHER, | ||
58 | } dmx_ts_pes_t; | ||
59 | </programlisting> | ||
60 | <para>describes the PES type for filters which write to a built-in decoder. The correspond (and | ||
61 | should be kept identical) to the types in the demux device. | ||
62 | </para> | ||
63 | <programlisting> | ||
64 | struct dmx_ts_feed_s { | ||
65 | int is_filtering; /⋆ Set to non-zero when filtering in progress ⋆/ | ||
66 | struct dmx_demux_s⋆ parent; /⋆ Back-pointer ⋆/ | ||
67 | void⋆ priv; /⋆ Pointer to private data of the API client ⋆/ | ||
68 | int (⋆set) (struct dmx_ts_feed_s⋆ feed, | ||
69 | __u16 pid, | ||
70 | size_t callback_length, | ||
71 | size_t circular_buffer_size, | ||
72 | int descramble, | ||
73 | struct timespec timeout); | ||
74 | int (⋆start_filtering) (struct dmx_ts_feed_s⋆ feed); | ||
75 | int (⋆stop_filtering) (struct dmx_ts_feed_s⋆ feed); | ||
76 | int (⋆set_type) (struct dmx_ts_feed_s⋆ feed, | ||
77 | int type, | ||
78 | dmx_ts_pes_t pes_type); | ||
79 | }; | ||
80 | |||
81 | typedef struct dmx_ts_feed_s dmx_ts_feed_t; | ||
82 | </programlisting> | ||
83 | <programlisting> | ||
84 | /⋆--------------------------------------------------------------------------⋆/ | ||
85 | /⋆ PES packet reception (not supported yet) ⋆/ | ||
86 | /⋆--------------------------------------------------------------------------⋆/ | ||
87 | |||
88 | typedef struct dmx_pes_filter_s { | ||
89 | struct dmx_pes_s⋆ parent; /⋆ Back-pointer ⋆/ | ||
90 | void⋆ priv; /⋆ Pointer to private data of the API client ⋆/ | ||
91 | } dmx_pes_filter_t; | ||
92 | </programlisting> | ||
93 | <programlisting> | ||
94 | typedef struct dmx_pes_feed_s { | ||
95 | int is_filtering; /⋆ Set to non-zero when filtering in progress ⋆/ | ||
96 | struct dmx_demux_s⋆ parent; /⋆ Back-pointer ⋆/ | ||
97 | void⋆ priv; /⋆ Pointer to private data of the API client ⋆/ | ||
98 | int (⋆set) (struct dmx_pes_feed_s⋆ feed, | ||
99 | __u16 pid, | ||
100 | size_t circular_buffer_size, | ||
101 | int descramble, | ||
102 | struct timespec timeout); | ||
103 | int (⋆start_filtering) (struct dmx_pes_feed_s⋆ feed); | ||
104 | int (⋆stop_filtering) (struct dmx_pes_feed_s⋆ feed); | ||
105 | int (⋆allocate_filter) (struct dmx_pes_feed_s⋆ feed, | ||
106 | dmx_pes_filter_t⋆⋆ filter); | ||
107 | int (⋆release_filter) (struct dmx_pes_feed_s⋆ feed, | ||
108 | dmx_pes_filter_t⋆ filter); | ||
109 | } dmx_pes_feed_t; | ||
110 | </programlisting> | ||
111 | <programlisting> | ||
112 | typedef struct { | ||
113 | __u8 filter_value [DMX_MAX_FILTER_SIZE]; | ||
114 | __u8 filter_mask [DMX_MAX_FILTER_SIZE]; | ||
115 | struct dmx_section_feed_s⋆ parent; /⋆ Back-pointer ⋆/ | ||
116 | void⋆ priv; /⋆ Pointer to private data of the API client ⋆/ | ||
117 | } dmx_section_filter_t; | ||
118 | </programlisting> | ||
119 | <programlisting> | ||
120 | struct dmx_section_feed_s { | ||
121 | int is_filtering; /⋆ Set to non-zero when filtering in progress ⋆/ | ||
122 | struct dmx_demux_s⋆ parent; /⋆ Back-pointer ⋆/ | ||
123 | void⋆ priv; /⋆ Pointer to private data of the API client ⋆/ | ||
124 | int (⋆set) (struct dmx_section_feed_s⋆ feed, | ||
125 | __u16 pid, | ||
126 | size_t circular_buffer_size, | ||
127 | int descramble, | ||
128 | int check_crc); | ||
129 | int (⋆allocate_filter) (struct dmx_section_feed_s⋆ feed, | ||
130 | dmx_section_filter_t⋆⋆ filter); | ||
131 | int (⋆release_filter) (struct dmx_section_feed_s⋆ feed, | ||
132 | dmx_section_filter_t⋆ filter); | ||
133 | int (⋆start_filtering) (struct dmx_section_feed_s⋆ feed); | ||
134 | int (⋆stop_filtering) (struct dmx_section_feed_s⋆ feed); | ||
135 | }; | ||
136 | typedef struct dmx_section_feed_s dmx_section_feed_t; | ||
137 | |||
138 | /⋆--------------------------------------------------------------------------⋆/ | ||
139 | /⋆ Callback functions ⋆/ | ||
140 | /⋆--------------------------------------------------------------------------⋆/ | ||
141 | |||
142 | typedef int (⋆dmx_ts_cb) ( __u8 ⋆ buffer1, | ||
143 | size_t buffer1_length, | ||
144 | __u8 ⋆ buffer2, | ||
145 | size_t buffer2_length, | ||
146 | dmx_ts_feed_t⋆ source, | ||
147 | dmx_success_t success); | ||
148 | |||
149 | typedef int (⋆dmx_section_cb) ( __u8 ⋆ buffer1, | ||
150 | size_t buffer1_len, | ||
151 | __u8 ⋆ buffer2, | ||
152 | size_t buffer2_len, | ||
153 | dmx_section_filter_t ⋆ source, | ||
154 | dmx_success_t success); | ||
155 | |||
156 | typedef int (⋆dmx_pes_cb) ( __u8 ⋆ buffer1, | ||
157 | size_t buffer1_len, | ||
158 | __u8 ⋆ buffer2, | ||
159 | size_t buffer2_len, | ||
160 | dmx_pes_filter_t⋆ source, | ||
161 | dmx_success_t success); | ||
162 | |||
163 | /⋆--------------------------------------------------------------------------⋆/ | ||
164 | /⋆ DVB Front-End ⋆/ | ||
165 | /⋆--------------------------------------------------------------------------⋆/ | ||
166 | |||
167 | typedef enum { | ||
168 | DMX_OTHER_FE = 0, | ||
169 | DMX_SATELLITE_FE, | ||
170 | DMX_CABLE_FE, | ||
171 | DMX_TERRESTRIAL_FE, | ||
172 | DMX_LVDS_FE, | ||
173 | DMX_ASI_FE, /⋆ DVB-ASI interface ⋆/ | ||
174 | DMX_MEMORY_FE | ||
175 | } dmx_frontend_source_t; | ||
176 | |||
177 | typedef struct { | ||
178 | /⋆ The following char⋆ fields point to NULL terminated strings ⋆/ | ||
179 | char⋆ id; /⋆ Unique front-end identifier ⋆/ | ||
180 | char⋆ vendor; /⋆ Name of the front-end vendor ⋆/ | ||
181 | char⋆ model; /⋆ Name of the front-end model ⋆/ | ||
182 | struct list_head connectivity_list; /⋆ List of front-ends that can | ||
183 | be connected to a particular | ||
184 | demux ⋆/ | ||
185 | void⋆ priv; /⋆ Pointer to private data of the API client ⋆/ | ||
186 | dmx_frontend_source_t source; | ||
187 | } dmx_frontend_t; | ||
188 | |||
189 | /⋆--------------------------------------------------------------------------⋆/ | ||
190 | /⋆ MPEG-2 TS Demux ⋆/ | ||
191 | /⋆--------------------------------------------------------------------------⋆/ | ||
192 | |||
193 | /⋆ | ||
194 | ⋆ Flags OR'ed in the capabilites field of struct dmx_demux_s. | ||
195 | ⋆/ | ||
196 | |||
197 | #define DMX_TS_FILTERING 1 | ||
198 | #define DMX_PES_FILTERING 2 | ||
199 | #define DMX_SECTION_FILTERING 4 | ||
200 | #define DMX_MEMORY_BASED_FILTERING 8 /⋆ write() available ⋆/ | ||
201 | #define DMX_CRC_CHECKING 16 | ||
202 | #define DMX_TS_DESCRAMBLING 32 | ||
203 | #define DMX_SECTION_PAYLOAD_DESCRAMBLING 64 | ||
204 | #define DMX_MAC_ADDRESS_DESCRAMBLING 128 | ||
205 | </programlisting> | ||
206 | |||
207 | </section> | ||
208 | <section id="demux_demux_t"> | ||
209 | <title>demux_demux_t</title> | ||
210 | <programlisting> | ||
211 | /⋆ | ||
212 | ⋆ DMX_FE_ENTRY(): Casts elements in the list of registered | ||
213 | ⋆ front-ends from the generic type struct list_head | ||
214 | ⋆ to the type ⋆ dmx_frontend_t | ||
215 | ⋆. | ||
216 | ⋆/ | ||
217 | |||
218 | #define DMX_FE_ENTRY(list) list_entry(list, dmx_frontend_t, connectivity_list) | ||
219 | |||
220 | struct dmx_demux_s { | ||
221 | /⋆ The following char⋆ fields point to NULL terminated strings ⋆/ | ||
222 | char⋆ id; /⋆ Unique demux identifier ⋆/ | ||
223 | char⋆ vendor; /⋆ Name of the demux vendor ⋆/ | ||
224 | char⋆ model; /⋆ Name of the demux model ⋆/ | ||
225 | __u32 capabilities; /⋆ Bitfield of capability flags ⋆/ | ||
226 | dmx_frontend_t⋆ frontend; /⋆ Front-end connected to the demux ⋆/ | ||
227 | struct list_head reg_list; /⋆ List of registered demuxes ⋆/ | ||
228 | void⋆ priv; /⋆ Pointer to private data of the API client ⋆/ | ||
229 | int users; /⋆ Number of users ⋆/ | ||
230 | int (⋆open) (struct dmx_demux_s⋆ demux); | ||
231 | int (⋆close) (struct dmx_demux_s⋆ demux); | ||
232 | int (⋆write) (struct dmx_demux_s⋆ demux, const char⋆ buf, size_t count); | ||
233 | int (⋆allocate_ts_feed) (struct dmx_demux_s⋆ demux, | ||
234 | dmx_ts_feed_t⋆⋆ feed, | ||
235 | dmx_ts_cb callback); | ||
236 | int (⋆release_ts_feed) (struct dmx_demux_s⋆ demux, | ||
237 | dmx_ts_feed_t⋆ feed); | ||
238 | int (⋆allocate_pes_feed) (struct dmx_demux_s⋆ demux, | ||
239 | dmx_pes_feed_t⋆⋆ feed, | ||
240 | dmx_pes_cb callback); | ||
241 | int (⋆release_pes_feed) (struct dmx_demux_s⋆ demux, | ||
242 | dmx_pes_feed_t⋆ feed); | ||
243 | int (⋆allocate_section_feed) (struct dmx_demux_s⋆ demux, | ||
244 | dmx_section_feed_t⋆⋆ feed, | ||
245 | dmx_section_cb callback); | ||
246 | int (⋆release_section_feed) (struct dmx_demux_s⋆ demux, | ||
247 | dmx_section_feed_t⋆ feed); | ||
248 | int (⋆descramble_mac_address) (struct dmx_demux_s⋆ demux, | ||
249 | __u8⋆ buffer1, | ||
250 | size_t buffer1_length, | ||
251 | __u8⋆ buffer2, | ||
252 | size_t buffer2_length, | ||
253 | __u16 pid); | ||
254 | int (⋆descramble_section_payload) (struct dmx_demux_s⋆ demux, | ||
255 | __u8⋆ buffer1, | ||
256 | size_t buffer1_length, | ||
257 | __u8⋆ buffer2, size_t buffer2_length, | ||
258 | __u16 pid); | ||
259 | int (⋆add_frontend) (struct dmx_demux_s⋆ demux, | ||
260 | dmx_frontend_t⋆ frontend); | ||
261 | int (⋆remove_frontend) (struct dmx_demux_s⋆ demux, | ||
262 | dmx_frontend_t⋆ frontend); | ||
263 | struct list_head⋆ (⋆get_frontends) (struct dmx_demux_s⋆ demux); | ||
264 | int (⋆connect_frontend) (struct dmx_demux_s⋆ demux, | ||
265 | dmx_frontend_t⋆ frontend); | ||
266 | int (⋆disconnect_frontend) (struct dmx_demux_s⋆ demux); | ||
267 | |||
268 | |||
269 | /⋆ added because js cannot keep track of these himself ⋆/ | ||
270 | int (⋆get_pes_pids) (struct dmx_demux_s⋆ demux, __u16 ⋆pids); | ||
271 | }; | ||
272 | typedef struct dmx_demux_s dmx_demux_t; | ||
273 | </programlisting> | ||
274 | |||
275 | </section> | ||
276 | <section id="demux_directory"> | ||
277 | <title>Demux directory</title> | ||
278 | <programlisting> | ||
279 | /⋆ | ||
280 | ⋆ DMX_DIR_ENTRY(): Casts elements in the list of registered | ||
281 | ⋆ demuxes from the generic type struct list_head⋆ to the type dmx_demux_t | ||
282 | ⋆. | ||
283 | ⋆/ | ||
284 | |||
285 | #define DMX_DIR_ENTRY(list) list_entry(list, dmx_demux_t, reg_list) | ||
286 | |||
287 | int dmx_register_demux (dmx_demux_t⋆ demux); | ||
288 | int dmx_unregister_demux (dmx_demux_t⋆ demux); | ||
289 | struct list_head⋆ dmx_get_demuxes (void); | ||
290 | </programlisting> | ||
291 | </section></section> | ||
292 | <section id="demux_directory_api"> | ||
293 | <title>Demux Directory API</title> | ||
294 | <para>The demux directory is a Linux kernel-wide facility for registering and accessing the | ||
295 | MPEG-2 TS demuxes in the system. Run-time registering and unregistering of demux drivers | ||
296 | is possible using this API. | ||
297 | </para> | ||
298 | <para>All demux drivers in the directory implement the abstract interface dmx_demux_t. | ||
299 | </para> | ||
300 | |||
301 | <section | ||
302 | role="subsection"><title>dmx_register_demux()</title> | ||
303 | <para>DESCRIPTION | ||
304 | </para> | ||
305 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
306 | align="char"> | ||
307 | <para>This function makes a demux driver interface available to the Linux kernel. It is | ||
308 | usually called by the init_module() function of the kernel module that contains | ||
309 | the demux driver. The caller of this function is responsible for allocating | ||
310 | dynamic or static memory for the demux structure and for initializing its fields | ||
311 | before calling this function. The memory allocated for the demux structure | ||
312 | must not be freed before calling dmx_unregister_demux(),</para> | ||
313 | </entry> | ||
314 | </row></tbody></tgroup></informaltable> | ||
315 | <para>SYNOPSIS | ||
316 | </para> | ||
317 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
318 | align="char"> | ||
319 | <para>int dmx_register_demux ( dmx_demux_t ⋆demux )</para> | ||
320 | </entry> | ||
321 | </row></tbody></tgroup></informaltable> | ||
322 | <para>PARAMETERS | ||
323 | </para> | ||
324 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
325 | align="char"> | ||
326 | <para>dmx_demux_t* | ||
327 | demux</para> | ||
328 | </entry><entry | ||
329 | align="char"> | ||
330 | <para>Pointer to the demux structure.</para> | ||
331 | </entry> | ||
332 | </row></tbody></tgroup></informaltable> | ||
333 | <para>RETURNS | ||
334 | </para> | ||
335 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
336 | align="char"> | ||
337 | <para>0</para> | ||
338 | </entry><entry | ||
339 | align="char"> | ||
340 | <para>The function was completed without errors.</para> | ||
341 | </entry> | ||
342 | </row><row><entry | ||
343 | align="char"> | ||
344 | <para>-EEXIST</para> | ||
345 | </entry><entry | ||
346 | align="char"> | ||
347 | <para>A demux with the same value of the id field already stored | ||
348 | in the directory.</para> | ||
349 | </entry> | ||
350 | </row><row><entry | ||
351 | align="char"> | ||
352 | <para>-ENOSPC</para> | ||
353 | </entry><entry | ||
354 | align="char"> | ||
355 | <para>No space left in the directory.</para> | ||
356 | </entry> | ||
357 | </row></tbody></tgroup></informaltable> | ||
358 | |||
359 | </section><section | ||
360 | role="subsection"><title>dmx_unregister_demux()</title> | ||
361 | <para>DESCRIPTION | ||
362 | </para> | ||
363 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
364 | align="char"> | ||
365 | <para>This function is called to indicate that the given demux interface is no | ||
366 | longer available. The caller of this function is responsible for freeing the | ||
367 | memory of the demux structure, if it was dynamically allocated before calling | ||
368 | dmx_register_demux(). The cleanup_module() function of the kernel module | ||
369 | that contains the demux driver should call this function. Note that this function | ||
370 | fails if the demux is currently in use, i.e., release_demux() has not been called | ||
371 | for the interface.</para> | ||
372 | </entry> | ||
373 | </row></tbody></tgroup></informaltable> | ||
374 | <para>SYNOPSIS | ||
375 | </para> | ||
376 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
377 | align="char"> | ||
378 | <para>int dmx_unregister_demux ( dmx_demux_t ⋆demux )</para> | ||
379 | </entry> | ||
380 | </row></tbody></tgroup></informaltable> | ||
381 | <para>PARAMETERS | ||
382 | </para> | ||
383 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
384 | align="char"> | ||
385 | <para>dmx_demux_t* | ||
386 | demux</para> | ||
387 | </entry><entry | ||
388 | align="char"> | ||
389 | <para>Pointer to the demux structure which is to be | ||
390 | unregistered.</para> | ||
391 | </entry> | ||
392 | </row></tbody></tgroup></informaltable> | ||
393 | <para>RETURNS | ||
394 | </para> | ||
395 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
396 | align="char"> | ||
397 | <para>0</para> | ||
398 | </entry><entry | ||
399 | align="char"> | ||
400 | <para>The function was completed without errors.</para> | ||
401 | </entry> | ||
402 | </row><row><entry | ||
403 | align="char"> | ||
404 | <para>ENODEV</para> | ||
405 | </entry><entry | ||
406 | align="char"> | ||
407 | <para>The specified demux is not registered in the demux | ||
408 | directory.</para> | ||
409 | </entry> | ||
410 | </row><row><entry | ||
411 | align="char"> | ||
412 | <para>EBUSY</para> | ||
413 | </entry><entry | ||
414 | align="char"> | ||
415 | <para>The specified demux is currently in use.</para> | ||
416 | </entry> | ||
417 | </row></tbody></tgroup></informaltable> | ||
418 | |||
419 | </section><section | ||
420 | role="subsection"><title>dmx_get_demuxes()</title> | ||
421 | <para>DESCRIPTION | ||
422 | </para> | ||
423 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
424 | align="char"> | ||
425 | <para>Provides the caller with the list of registered demux interfaces, using the | ||
426 | standard list structure defined in the include file linux/list.h. The include file | ||
427 | demux.h defines the macro DMX_DIR_ENTRY() for converting an element of | ||
428 | the generic type struct list_head* to the type dmx_demux_t*. The caller must | ||
429 | not free the memory of any of the elements obtained via this function call.</para> | ||
430 | </entry> | ||
431 | </row></tbody></tgroup></informaltable> | ||
432 | <para>SYNOPSIS | ||
433 | </para> | ||
434 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
435 | align="char"> | ||
436 | <para>struct list_head ⋆dmx_get_demuxes ()</para> | ||
437 | </entry> | ||
438 | </row></tbody></tgroup></informaltable> | ||
439 | <para>PARAMETERS | ||
440 | </para> | ||
441 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
442 | align="char"> | ||
443 | <para>none</para> | ||
444 | </entry> | ||
445 | </row></tbody></tgroup></informaltable> | ||
446 | <para>RETURNS | ||
447 | </para> | ||
448 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
449 | align="char"> | ||
450 | <para>struct list_head *</para> | ||
451 | </entry><entry | ||
452 | align="char"> | ||
453 | <para>A list of demux interfaces, or NULL in the case of an | ||
454 | empty list.</para> | ||
455 | </entry> | ||
456 | </row></tbody></tgroup></informaltable> | ||
457 | </section></section> | ||
458 | <section id="demux_api"> | ||
459 | <title>Demux API</title> | ||
460 | <para>The demux API should be implemented for each demux in the system. It is used to select | ||
461 | the TS source of a demux and to manage the demux resources. When the demux | ||
462 | client allocates a resource via the demux API, it receives a pointer to the API of that | ||
463 | resource. | ||
464 | </para> | ||
465 | <para>Each demux receives its TS input from a DVB front-end or from memory, as set via the | ||
466 | demux API. In a system with more than one front-end, the API can be used to select one of | ||
467 | the DVB front-ends as a TS source for a demux, unless this is fixed in the HW platform. The | ||
468 | demux API only controls front-ends regarding their connections with demuxes; the APIs | ||
469 | used to set the other front-end parameters, such as tuning, are not defined in this | ||
470 | document. | ||
471 | </para> | ||
472 | <para>The functions that implement the abstract interface demux should be defined static or | ||
473 | module private and registered to the Demux Directory for external access. It is not necessary | ||
474 | to implement every function in the demux_t struct, however (for example, a demux interface | ||
475 | might support Section filtering, but not TS or PES filtering). The API client is expected to | ||
476 | check the value of any function pointer before calling the function: the value of NULL means | ||
477 | “function not available”. | ||
478 | </para> | ||
479 | <para>Whenever the functions of the demux API modify shared data, the possibilities of lost | ||
480 | update and race condition problems should be addressed, e.g. by protecting parts of code with | ||
481 | mutexes. This is especially important on multi-processor hosts. | ||
482 | </para> | ||
483 | <para>Note that functions called from a bottom half context must not sleep, at least in the 2.2.x | ||
484 | kernels. Even a simple memory allocation can result in a kernel thread being put to sleep if | ||
485 | swapping is needed. For example, the Linux kernel calls the functions of a network device | ||
486 | interface from a bottom half context. Thus, if a demux API function is called from network | ||
487 | device code, the function must not sleep. | ||
488 | </para> | ||
489 | |||
490 | |||
491 | <section id="kdapi_fopen"> | ||
492 | <title>open()</title> | ||
493 | <para>DESCRIPTION | ||
494 | </para> | ||
495 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
496 | align="char"> | ||
497 | <para>This function reserves the demux for use by the caller and, if necessary, | ||
498 | initializes the demux. When the demux is no longer needed, the function close() | ||
499 | should be called. It should be possible for multiple clients to access the demux | ||
500 | at the same time. Thus, the function implementation should increment the | ||
501 | demux usage count when open() is called and decrement it when close() is | ||
502 | called.</para> | ||
503 | </entry> | ||
504 | </row></tbody></tgroup></informaltable> | ||
505 | <para>SYNOPSIS | ||
506 | </para> | ||
507 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
508 | align="char"> | ||
509 | <para>int open ( demux_t⋆ demux );</para> | ||
510 | </entry> | ||
511 | </row></tbody></tgroup></informaltable> | ||
512 | <para>PARAMETERS | ||
513 | </para> | ||
514 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
515 | align="char"> | ||
516 | <para>demux_t* demux</para> | ||
517 | </entry><entry | ||
518 | align="char"> | ||
519 | <para>Pointer to the demux API and instance data.</para> | ||
520 | </entry> | ||
521 | </row></tbody></tgroup></informaltable> | ||
522 | <para>RETURNS | ||
523 | </para> | ||
524 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
525 | align="char"> | ||
526 | <para>0</para> | ||
527 | </entry><entry | ||
528 | align="char"> | ||
529 | <para>The function was completed without errors.</para> | ||
530 | </entry> | ||
531 | </row><row><entry | ||
532 | align="char"> | ||
533 | <para>-EUSERS</para> | ||
534 | </entry><entry | ||
535 | align="char"> | ||
536 | <para>Maximum usage count reached.</para> | ||
537 | </entry> | ||
538 | </row><row><entry | ||
539 | align="char"> | ||
540 | <para>-EINVAL</para> | ||
541 | </entry><entry | ||
542 | align="char"> | ||
543 | <para>Bad parameter.</para> | ||
544 | </entry> | ||
545 | </row></tbody></tgroup></informaltable> | ||
546 | |||
547 | </section> | ||
548 | <section id="kdapi_fclose"> | ||
549 | <title>close()</title> | ||
550 | <para>DESCRIPTION | ||
551 | </para> | ||
552 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
553 | align="char"> | ||
554 | <para>This function reserves the demux for use by the caller and, if necessary, | ||
555 | initializes the demux. When the demux is no longer needed, the function close() | ||
556 | should be called. It should be possible for multiple clients to access the demux | ||
557 | at the same time. Thus, the function implementation should increment the | ||
558 | demux usage count when open() is called and decrement it when close() is | ||
559 | called.</para> | ||
560 | </entry> | ||
561 | </row></tbody></tgroup></informaltable> | ||
562 | <para>SYNOPSIS | ||
563 | </para> | ||
564 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
565 | align="char"> | ||
566 | <para>int close(demux_t⋆ demux);</para> | ||
567 | </entry> | ||
568 | </row></tbody></tgroup></informaltable> | ||
569 | <para>PARAMETERS | ||
570 | </para> | ||
571 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
572 | align="char"> | ||
573 | <para>demux_t* demux</para> | ||
574 | </entry><entry | ||
575 | align="char"> | ||
576 | <para>Pointer to the demux API and instance data.</para> | ||
577 | </entry> | ||
578 | </row></tbody></tgroup></informaltable> | ||
579 | <para>RETURNS | ||
580 | </para> | ||
581 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
582 | align="char"> | ||
583 | <para>0</para> | ||
584 | </entry><entry | ||
585 | align="char"> | ||
586 | <para>The function was completed without errors.</para> | ||
587 | </entry> | ||
588 | </row><row><entry | ||
589 | align="char"> | ||
590 | <para>-ENODEV</para> | ||
591 | </entry><entry | ||
592 | align="char"> | ||
593 | <para>The demux was not in use.</para> | ||
594 | </entry> | ||
595 | </row><row><entry | ||
596 | align="char"> | ||
597 | <para>-EINVAL</para> | ||
598 | </entry><entry | ||
599 | align="char"> | ||
600 | <para>Bad parameter.</para> | ||
601 | </entry> | ||
602 | </row></tbody></tgroup></informaltable> | ||
603 | |||
604 | </section> | ||
605 | <section id="kdapi_fwrite"> | ||
606 | <title>write()</title> | ||
607 | <para>DESCRIPTION | ||
608 | </para> | ||
609 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
610 | align="char"> | ||
611 | <para>This function provides the demux driver with a memory buffer containing TS | ||
612 | packets. Instead of receiving TS packets from the DVB front-end, the demux | ||
613 | driver software will read packets from memory. Any clients of this demux | ||
614 | with active TS, PES or Section filters will receive filtered data via the Demux | ||
615 | callback API (see 0). The function returns when all the data in the buffer has | ||
616 | been consumed by the demux. Demux hardware typically cannot read TS from | ||
617 | memory. If this is the case, memory-based filtering has to be implemented | ||
618 | entirely in software.</para> | ||
619 | </entry> | ||
620 | </row></tbody></tgroup></informaltable> | ||
621 | <para>SYNOPSIS | ||
622 | </para> | ||
623 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
624 | align="char"> | ||
625 | <para>int write(demux_t⋆ demux, const char⋆ buf, size_t | ||
626 | count);</para> | ||
627 | </entry> | ||
628 | </row></tbody></tgroup></informaltable> | ||
629 | <para>PARAMETERS | ||
630 | </para> | ||
631 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
632 | align="char"> | ||
633 | <para>demux_t* demux</para> | ||
634 | </entry><entry | ||
635 | align="char"> | ||
636 | <para>Pointer to the demux API and instance data.</para> | ||
637 | </entry> | ||
638 | </row><row><entry | ||
639 | align="char"> | ||
640 | <para>const char* buf</para> | ||
641 | </entry><entry | ||
642 | align="char"> | ||
643 | <para>Pointer to the TS data in kernel-space memory.</para> | ||
644 | </entry> | ||
645 | </row><row><entry | ||
646 | align="char"> | ||
647 | <para>size_t length</para> | ||
648 | </entry><entry | ||
649 | align="char"> | ||
650 | <para>Length of the TS data.</para> | ||
651 | </entry> | ||
652 | </row></tbody></tgroup></informaltable> | ||
653 | <para>RETURNS | ||
654 | </para> | ||
655 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
656 | align="char"> | ||
657 | <para>0</para> | ||
658 | </entry><entry | ||
659 | align="char"> | ||
660 | <para>The function was completed without errors.</para> | ||
661 | </entry> | ||
662 | </row><row><entry | ||
663 | align="char"> | ||
664 | <para>-ENOSYS</para> | ||
665 | </entry><entry | ||
666 | align="char"> | ||
667 | <para>The command is not implemented.</para> | ||
668 | </entry> | ||
669 | </row><row><entry | ||
670 | align="char"> | ||
671 | <para>-EINVAL</para> | ||
672 | </entry><entry | ||
673 | align="char"> | ||
674 | <para>Bad parameter.</para> | ||
675 | </entry> | ||
676 | </row></tbody></tgroup></informaltable> | ||
677 | |||
678 | </section><section | ||
679 | role="subsection"><title>allocate_ts_feed()</title> | ||
680 | <para>DESCRIPTION | ||
681 | </para> | ||
682 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
683 | align="char"> | ||
684 | <para>Allocates a new TS feed, which is used to filter the TS packets carrying a | ||
685 | certain PID. The TS feed normally corresponds to a hardware PID filter on the | ||
686 | demux chip.</para> | ||
687 | </entry> | ||
688 | </row></tbody></tgroup></informaltable> | ||
689 | <para>SYNOPSIS | ||
690 | </para> | ||
691 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
692 | align="char"> | ||
693 | <para>int allocate_ts_feed(dmx_demux_t⋆ demux, | ||
694 | dmx_ts_feed_t⋆⋆ feed, dmx_ts_cb callback);</para> | ||
695 | </entry> | ||
696 | </row></tbody></tgroup></informaltable> | ||
697 | <para>PARAMETERS | ||
698 | </para> | ||
699 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
700 | align="char"> | ||
701 | <para>demux_t* demux</para> | ||
702 | </entry><entry | ||
703 | align="char"> | ||
704 | <para>Pointer to the demux API and instance data.</para> | ||
705 | </entry> | ||
706 | </row><row><entry | ||
707 | align="char"> | ||
708 | <para>dmx_ts_feed_t** | ||
709 | feed</para> | ||
710 | </entry><entry | ||
711 | align="char"> | ||
712 | <para>Pointer to the TS feed API and instance data.</para> | ||
713 | </entry> | ||
714 | </row><row><entry | ||
715 | align="char"> | ||
716 | <para>dmx_ts_cb callback</para> | ||
717 | </entry><entry | ||
718 | align="char"> | ||
719 | <para>Pointer to the callback function for passing received TS | ||
720 | packet</para> | ||
721 | </entry> | ||
722 | </row></tbody></tgroup></informaltable> | ||
723 | <para>RETURNS | ||
724 | </para> | ||
725 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
726 | align="char"> | ||
727 | <para>0</para> | ||
728 | </entry><entry | ||
729 | align="char"> | ||
730 | <para>The function was completed without errors.</para> | ||
731 | </entry> | ||
732 | </row><row><entry | ||
733 | align="char"> | ||
734 | <para>-EBUSY</para> | ||
735 | </entry><entry | ||
736 | align="char"> | ||
737 | <para>No more TS feeds available.</para> | ||
738 | </entry> | ||
739 | </row><row><entry | ||
740 | align="char"> | ||
741 | <para>-ENOSYS</para> | ||
742 | </entry><entry | ||
743 | align="char"> | ||
744 | <para>The command is not implemented.</para> | ||
745 | </entry> | ||
746 | </row><row><entry | ||
747 | align="char"> | ||
748 | <para>-EINVAL</para> | ||
749 | </entry><entry | ||
750 | align="char"> | ||
751 | <para>Bad parameter.</para> | ||
752 | </entry> | ||
753 | </row></tbody></tgroup></informaltable> | ||
754 | |||
755 | </section><section | ||
756 | role="subsection"><title>release_ts_feed()</title> | ||
757 | <para>DESCRIPTION | ||
758 | </para> | ||
759 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
760 | align="char"> | ||
761 | <para>Releases the resources allocated with allocate_ts_feed(). Any filtering in | ||
762 | progress on the TS feed should be stopped before calling this function.</para> | ||
763 | </entry> | ||
764 | </row></tbody></tgroup></informaltable> | ||
765 | <para>SYNOPSIS | ||
766 | </para> | ||
767 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
768 | align="char"> | ||
769 | <para>int release_ts_feed(dmx_demux_t⋆ demux, | ||
770 | dmx_ts_feed_t⋆ feed);</para> | ||
771 | </entry> | ||
772 | </row></tbody></tgroup></informaltable> | ||
773 | <para>PARAMETERS | ||
774 | </para> | ||
775 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
776 | align="char"> | ||
777 | <para>demux_t* demux</para> | ||
778 | </entry><entry | ||
779 | align="char"> | ||
780 | <para>Pointer to the demux API and instance data.</para> | ||
781 | </entry> | ||
782 | </row><row><entry | ||
783 | align="char"> | ||
784 | <para>dmx_ts_feed_t* feed</para> | ||
785 | </entry><entry | ||
786 | align="char"> | ||
787 | <para>Pointer to the TS feed API and instance data.</para> | ||
788 | </entry> | ||
789 | </row></tbody></tgroup></informaltable> | ||
790 | <para>RETURNS | ||
791 | </para> | ||
792 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
793 | align="char"> | ||
794 | <para>0</para> | ||
795 | </entry><entry | ||
796 | align="char"> | ||
797 | <para>The function was completed without errors.</para> | ||
798 | </entry> | ||
799 | </row><row><entry | ||
800 | align="char"> | ||
801 | <para>-EINVAL</para> | ||
802 | </entry><entry | ||
803 | align="char"> | ||
804 | <para>Bad parameter.</para> | ||
805 | </entry> | ||
806 | </row></tbody></tgroup></informaltable> | ||
807 | |||
808 | </section><section | ||
809 | role="subsection"><title>allocate_section_feed()</title> | ||
810 | <para>DESCRIPTION | ||
811 | </para> | ||
812 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
813 | align="char"> | ||
814 | <para>Allocates a new section feed, i.e. a demux resource for filtering and receiving | ||
815 | sections. On platforms with hardware support for section filtering, a section | ||
816 | feed is directly mapped to the demux HW. On other platforms, TS packets are | ||
817 | first PID filtered in hardware and a hardware section filter then emulated in | ||
818 | software. The caller obtains an API pointer of type dmx_section_feed_t as an | ||
819 | out parameter. Using this API the caller can set filtering parameters and start | ||
820 | receiving sections.</para> | ||
821 | </entry> | ||
822 | </row></tbody></tgroup></informaltable> | ||
823 | <para>SYNOPSIS | ||
824 | </para> | ||
825 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
826 | align="char"> | ||
827 | <para>int allocate_section_feed(dmx_demux_t⋆ demux, | ||
828 | dmx_section_feed_t ⋆⋆feed, dmx_section_cb callback);</para> | ||
829 | </entry> | ||
830 | </row></tbody></tgroup></informaltable> | ||
831 | <para>PARAMETERS | ||
832 | </para> | ||
833 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
834 | align="char"> | ||
835 | <para>demux_t *demux</para> | ||
836 | </entry><entry | ||
837 | align="char"> | ||
838 | <para>Pointer to the demux API and instance data.</para> | ||
839 | </entry> | ||
840 | </row><row><entry | ||
841 | align="char"> | ||
842 | <para>dmx_section_feed_t | ||
843 | **feed</para> | ||
844 | </entry><entry | ||
845 | align="char"> | ||
846 | <para>Pointer to the section feed API and instance data.</para> | ||
847 | </entry> | ||
848 | </row><row><entry | ||
849 | align="char"> | ||
850 | <para>dmx_section_cb | ||
851 | callback</para> | ||
852 | </entry><entry | ||
853 | align="char"> | ||
854 | <para>Pointer to the callback function for passing received | ||
855 | sections.</para> | ||
856 | </entry> | ||
857 | </row></tbody></tgroup></informaltable> | ||
858 | <para>RETURNS | ||
859 | </para> | ||
860 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
861 | align="char"> | ||
862 | <para>0</para> | ||
863 | </entry><entry | ||
864 | align="char"> | ||
865 | <para>The function was completed without errors.</para> | ||
866 | </entry> | ||
867 | </row><row><entry | ||
868 | align="char"> | ||
869 | <para>-EBUSY</para> | ||
870 | </entry><entry | ||
871 | align="char"> | ||
872 | <para>No more section feeds available.</para> | ||
873 | </entry> | ||
874 | </row><row><entry | ||
875 | align="char"> | ||
876 | <para>-ENOSYS</para> | ||
877 | </entry><entry | ||
878 | align="char"> | ||
879 | <para>The command is not implemented.</para> | ||
880 | </entry> | ||
881 | </row><row><entry | ||
882 | align="char"> | ||
883 | <para>-EINVAL</para> | ||
884 | </entry><entry | ||
885 | align="char"> | ||
886 | <para>Bad parameter.</para> | ||
887 | </entry> | ||
888 | </row></tbody></tgroup></informaltable> | ||
889 | |||
890 | </section><section | ||
891 | role="subsection"><title>release_section_feed()</title> | ||
892 | <para>DESCRIPTION | ||
893 | </para> | ||
894 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
895 | align="char"> | ||
896 | <para>Releases the resources allocated with allocate_section_feed(), including | ||
897 | allocated filters. Any filtering in progress on the section feed should be stopped | ||
898 | before calling this function.</para> | ||
899 | </entry> | ||
900 | </row></tbody></tgroup></informaltable> | ||
901 | <para>SYNOPSIS | ||
902 | </para> | ||
903 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
904 | align="char"> | ||
905 | <para>int release_section_feed(dmx_demux_t⋆ demux, | ||
906 | dmx_section_feed_t ⋆feed);</para> | ||
907 | </entry> | ||
908 | </row></tbody></tgroup></informaltable> | ||
909 | <para>PARAMETERS | ||
910 | </para> | ||
911 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
912 | align="char"> | ||
913 | <para>demux_t *demux</para> | ||
914 | </entry><entry | ||
915 | align="char"> | ||
916 | <para>Pointer to the demux API and instance data.</para> | ||
917 | </entry> | ||
918 | </row><row><entry | ||
919 | align="char"> | ||
920 | <para>dmx_section_feed_t | ||
921 | *feed</para> | ||
922 | </entry><entry | ||
923 | align="char"> | ||
924 | <para>Pointer to the section feed API and instance data.</para> | ||
925 | </entry> | ||
926 | </row></tbody></tgroup></informaltable> | ||
927 | <para>RETURNS | ||
928 | </para> | ||
929 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
930 | align="char"> | ||
931 | <para>0</para> | ||
932 | </entry><entry | ||
933 | align="char"> | ||
934 | <para>The function was completed without errors.</para> | ||
935 | </entry> | ||
936 | </row><row><entry | ||
937 | align="char"> | ||
938 | <para>-EINVAL</para> | ||
939 | </entry><entry | ||
940 | align="char"> | ||
941 | <para>Bad parameter.</para> | ||
942 | </entry> | ||
943 | </row></tbody></tgroup></informaltable> | ||
944 | |||
945 | </section><section | ||
946 | role="subsection"><title>descramble_mac_address()</title> | ||
947 | <para>DESCRIPTION | ||
948 | </para> | ||
949 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
950 | align="char"> | ||
951 | <para>This function runs a descrambling algorithm on the destination MAC | ||
952 | address field of a DVB Datagram Section, replacing the original address | ||
953 | with its un-encrypted version. Otherwise, the description on the function | ||
954 | descramble_section_payload() applies also to this function.</para> | ||
955 | </entry> | ||
956 | </row></tbody></tgroup></informaltable> | ||
957 | <para>SYNOPSIS | ||
958 | </para> | ||
959 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
960 | align="char"> | ||
961 | <para>int descramble_mac_address(dmx_demux_t⋆ demux, __u8 | ||
962 | ⋆buffer1, size_t buffer1_length, __u8 ⋆buffer2, | ||
963 | size_t buffer2_length, __u16 pid);</para> | ||
964 | </entry> | ||
965 | </row></tbody></tgroup></informaltable> | ||
966 | <para>PARAMETERS | ||
967 | </para> | ||
968 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
969 | align="char"> | ||
970 | <para>dmx_demux_t | ||
971 | *demux</para> | ||
972 | </entry><entry | ||
973 | align="char"> | ||
974 | <para>Pointer to the demux API and instance data.</para> | ||
975 | </entry> | ||
976 | </row><row><entry | ||
977 | align="char"> | ||
978 | <para>__u8 *buffer1</para> | ||
979 | </entry><entry | ||
980 | align="char"> | ||
981 | <para>Pointer to the first byte of the section.</para> | ||
982 | </entry> | ||
983 | </row><row><entry | ||
984 | align="char"> | ||
985 | <para>size_t buffer1_length</para> | ||
986 | </entry><entry | ||
987 | align="char"> | ||
988 | <para>Length of the section data, including headers and CRC, | ||
989 | in buffer1.</para> | ||
990 | </entry> | ||
991 | </row><row><entry | ||
992 | align="char"> | ||
993 | <para>__u8* buffer2</para> | ||
994 | </entry><entry | ||
995 | align="char"> | ||
996 | <para>Pointer to the tail of the section data, or NULL. The | ||
997 | pointer has a non-NULL value if the section wraps past | ||
998 | the end of a circular buffer.</para> | ||
999 | </entry> | ||
1000 | </row><row><entry | ||
1001 | align="char"> | ||
1002 | <para>size_t buffer2_length</para> | ||
1003 | </entry><entry | ||
1004 | align="char"> | ||
1005 | <para>Length of the section data, including headers and CRC, | ||
1006 | in buffer2.</para> | ||
1007 | </entry> | ||
1008 | </row><row><entry | ||
1009 | align="char"> | ||
1010 | <para>__u16 pid</para> | ||
1011 | </entry><entry | ||
1012 | align="char"> | ||
1013 | <para>The PID on which the section was received. Useful | ||
1014 | for obtaining the descrambling key, e.g. from a DVB | ||
1015 | Common Access facility.</para> | ||
1016 | </entry> | ||
1017 | </row></tbody></tgroup></informaltable> | ||
1018 | <para>RETURNS | ||
1019 | </para> | ||
1020 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
1021 | align="char"> | ||
1022 | <para>0</para> | ||
1023 | </entry><entry | ||
1024 | align="char"> | ||
1025 | <para>The function was completed without errors.</para> | ||
1026 | </entry> | ||
1027 | </row><row><entry | ||
1028 | align="char"> | ||
1029 | <para>-ENOSYS</para> | ||
1030 | </entry><entry | ||
1031 | align="char"> | ||
1032 | <para>No descrambling facility available.</para> | ||
1033 | </entry> | ||
1034 | </row><row><entry | ||
1035 | align="char"> | ||
1036 | <para>-EINVAL</para> | ||
1037 | </entry><entry | ||
1038 | align="char"> | ||
1039 | <para>Bad parameter.</para> | ||
1040 | </entry> | ||
1041 | </row></tbody></tgroup></informaltable> | ||
1042 | |||
1043 | </section><section | ||
1044 | role="subsection"><title>descramble_section_payload()</title> | ||
1045 | <para>DESCRIPTION | ||
1046 | </para> | ||
1047 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
1048 | align="char"> | ||
1049 | <para>This function runs a descrambling algorithm on the payload of a DVB | ||
1050 | Datagram Section, replacing the original payload with its un-encrypted | ||
1051 | version. The function will be called from the demux API implementation; | ||
1052 | the API client need not call this function directly. Section-level scrambling | ||
1053 | algorithms are currently standardized only for DVB-RCC (return channel | ||
1054 | over 2-directional cable TV network) systems. For all other DVB networks, | ||
1055 | encryption schemes are likely to be proprietary to each data broadcaster. Thus, | ||
1056 | it is expected that this function pointer will have the value of NULL (i.e., | ||
1057 | function not available) in most demux API implementations. Nevertheless, it | ||
1058 | should be possible to use the function pointer as a hook for dynamically adding | ||
1059 | a “plug-in” descrambling facility to a demux driver.</para> | ||
1060 | </entry> | ||
1061 | </row><row><entry | ||
1062 | align="char"> | ||
1063 | <para>While this function is not needed with hardware-based section descrambling, | ||
1064 | the descramble_section_payload function pointer can be used to override the | ||
1065 | default hardware-based descrambling algorithm: if the function pointer has a | ||
1066 | non-NULL value, the corresponding function should be used instead of any | ||
1067 | descrambling hardware.</para> | ||
1068 | </entry> | ||
1069 | </row></tbody></tgroup></informaltable> | ||
1070 | <para>SYNOPSIS | ||
1071 | </para> | ||
1072 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
1073 | align="char"> | ||
1074 | <para>int descramble_section_payload(dmx_demux_t⋆ demux, | ||
1075 | __u8 ⋆buffer1, size_t buffer1_length, __u8 ⋆buffer2, | ||
1076 | size_t buffer2_length, __u16 pid);</para> | ||
1077 | </entry> | ||
1078 | </row></tbody></tgroup></informaltable> | ||
1079 | <para>PARAMETERS | ||
1080 | </para> | ||
1081 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
1082 | align="char"> | ||
1083 | <para>dmx_demux_t | ||
1084 | *demux</para> | ||
1085 | </entry><entry | ||
1086 | align="char"> | ||
1087 | <para>Pointer to the demux API and instance data.</para> | ||
1088 | </entry> | ||
1089 | </row><row><entry | ||
1090 | align="char"> | ||
1091 | <para>__u8 *buffer1</para> | ||
1092 | </entry><entry | ||
1093 | align="char"> | ||
1094 | <para>Pointer to the first byte of the section.</para> | ||
1095 | </entry> | ||
1096 | </row><row><entry | ||
1097 | align="char"> | ||
1098 | <para>size_t buffer1_length</para> | ||
1099 | </entry><entry | ||
1100 | align="char"> | ||
1101 | <para>Length of the section data, including headers and CRC, | ||
1102 | in buffer1.</para> | ||
1103 | </entry> | ||
1104 | </row><row><entry | ||
1105 | align="char"> | ||
1106 | <para>__u8 *buffer2</para> | ||
1107 | </entry><entry | ||
1108 | align="char"> | ||
1109 | <para>Pointer to the tail of the section data, or NULL. The | ||
1110 | pointer has a non-NULL value if the section wraps past | ||
1111 | the end of a circular buffer.</para> | ||
1112 | </entry> | ||
1113 | </row><row><entry | ||
1114 | align="char"> | ||
1115 | <para>size_t buffer2_length</para> | ||
1116 | </entry><entry | ||
1117 | align="char"> | ||
1118 | <para>Length of the section data, including headers and CRC, | ||
1119 | in buffer2.</para> | ||
1120 | </entry> | ||
1121 | </row><row><entry | ||
1122 | align="char"> | ||
1123 | <para>__u16 pid</para> | ||
1124 | </entry><entry | ||
1125 | align="char"> | ||
1126 | <para>The PID on which the section was received. Useful | ||
1127 | for obtaining the descrambling key, e.g. from a DVB | ||
1128 | Common Access facility.</para> | ||
1129 | </entry> | ||
1130 | </row></tbody></tgroup></informaltable> | ||
1131 | <para>RETURNS | ||
1132 | </para> | ||
1133 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
1134 | align="char"> | ||
1135 | <para>0</para> | ||
1136 | </entry><entry | ||
1137 | align="char"> | ||
1138 | <para>The function was completed without errors.</para> | ||
1139 | </entry> | ||
1140 | </row><row><entry | ||
1141 | align="char"> | ||
1142 | <para>-ENOSYS</para> | ||
1143 | </entry><entry | ||
1144 | align="char"> | ||
1145 | <para>No descrambling facility available.</para> | ||
1146 | </entry> | ||
1147 | </row><row><entry | ||
1148 | align="char"> | ||
1149 | <para>-EINVAL</para> | ||
1150 | </entry><entry | ||
1151 | align="char"> | ||
1152 | <para>Bad parameter.</para> | ||
1153 | </entry> | ||
1154 | </row></tbody></tgroup></informaltable> | ||
1155 | |||
1156 | </section><section | ||
1157 | role="subsection"><title>add_frontend()</title> | ||
1158 | <para>DESCRIPTION | ||
1159 | </para> | ||
1160 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
1161 | align="char"> | ||
1162 | <para>Registers a connectivity between a demux and a front-end, i.e., indicates that | ||
1163 | the demux can be connected via a call to connect_frontend() to use the given | ||
1164 | front-end as a TS source. The client of this function has to allocate dynamic or | ||
1165 | static memory for the frontend structure and initialize its fields before calling | ||
1166 | this function. This function is normally called during the driver initialization. | ||
1167 | The caller must not free the memory of the frontend struct before successfully | ||
1168 | calling remove_frontend().</para> | ||
1169 | </entry> | ||
1170 | </row></tbody></tgroup></informaltable> | ||
1171 | <para>SYNOPSIS | ||
1172 | </para> | ||
1173 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
1174 | align="char"> | ||
1175 | <para>int add_frontend(dmx_demux_t ⋆demux, dmx_frontend_t | ||
1176 | ⋆frontend);</para> | ||
1177 | </entry> | ||
1178 | </row></tbody></tgroup></informaltable> | ||
1179 | <para>PARAMETERS | ||
1180 | </para> | ||
1181 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
1182 | align="char"> | ||
1183 | <para>dmx_demux_t* | ||
1184 | demux</para> | ||
1185 | </entry><entry | ||
1186 | align="char"> | ||
1187 | <para>Pointer to the demux API and instance data.</para> | ||
1188 | </entry> | ||
1189 | </row><row><entry | ||
1190 | align="char"> | ||
1191 | <para>dmx_frontend_t* | ||
1192 | frontend</para> | ||
1193 | </entry><entry | ||
1194 | align="char"> | ||
1195 | <para>Pointer to the front-end instance data.</para> | ||
1196 | </entry> | ||
1197 | </row></tbody></tgroup></informaltable> | ||
1198 | <para>RETURNS | ||
1199 | </para> | ||
1200 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
1201 | align="char"> | ||
1202 | <para>0</para> | ||
1203 | </entry><entry | ||
1204 | align="char"> | ||
1205 | <para>The function was completed without errors.</para> | ||
1206 | </entry> | ||
1207 | </row><row><entry | ||
1208 | align="char"> | ||
1209 | <para>-EEXIST</para> | ||
1210 | </entry><entry | ||
1211 | align="char"> | ||
1212 | <para>A front-end with the same value of the id field already | ||
1213 | registered.</para> | ||
1214 | </entry> | ||
1215 | </row><row><entry | ||
1216 | align="char"> | ||
1217 | <para>-EINUSE</para> | ||
1218 | </entry><entry | ||
1219 | align="char"> | ||
1220 | <para>The demux is in use.</para> | ||
1221 | </entry> | ||
1222 | </row><row><entry | ||
1223 | align="char"> | ||
1224 | <para>-ENOMEM</para> | ||
1225 | </entry><entry | ||
1226 | align="char"> | ||
1227 | <para>No more front-ends can be added.</para> | ||
1228 | </entry> | ||
1229 | </row><row><entry | ||
1230 | align="char"> | ||
1231 | <para>-EINVAL</para> | ||
1232 | </entry><entry | ||
1233 | align="char"> | ||
1234 | <para>Bad parameter.</para> | ||
1235 | </entry> | ||
1236 | </row></tbody></tgroup></informaltable> | ||
1237 | |||
1238 | </section><section | ||
1239 | role="subsection"><title>remove_frontend()</title> | ||
1240 | <para>DESCRIPTION | ||
1241 | </para> | ||
1242 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
1243 | align="char"> | ||
1244 | <para>Indicates that the given front-end, registered by a call to add_frontend(), can | ||
1245 | no longer be connected as a TS source by this demux. The function should be | ||
1246 | called when a front-end driver or a demux driver is removed from the system. | ||
1247 | If the front-end is in use, the function fails with the return value of -EBUSY. | ||
1248 | After successfully calling this function, the caller can free the memory of | ||
1249 | the frontend struct if it was dynamically allocated before the add_frontend() | ||
1250 | operation.</para> | ||
1251 | </entry> | ||
1252 | </row></tbody></tgroup></informaltable> | ||
1253 | <para>SYNOPSIS | ||
1254 | </para> | ||
1255 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
1256 | align="char"> | ||
1257 | <para>int remove_frontend(dmx_demux_t⋆ demux, | ||
1258 | dmx_frontend_t⋆ frontend);</para> | ||
1259 | </entry> | ||
1260 | </row></tbody></tgroup></informaltable> | ||
1261 | <para>PARAMETERS | ||
1262 | </para> | ||
1263 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
1264 | align="char"> | ||
1265 | <para>dmx_demux_t* | ||
1266 | demux</para> | ||
1267 | </entry><entry | ||
1268 | align="char"> | ||
1269 | <para>Pointer to the demux API and instance data.</para> | ||
1270 | </entry> | ||
1271 | </row><row><entry | ||
1272 | align="char"> | ||
1273 | <para>dmx_frontend_t* | ||
1274 | frontend</para> | ||
1275 | </entry><entry | ||
1276 | align="char"> | ||
1277 | <para>Pointer to the front-end instance data.</para> | ||
1278 | </entry> | ||
1279 | </row></tbody></tgroup></informaltable> | ||
1280 | <para>RETURNS | ||
1281 | </para> | ||
1282 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
1283 | align="char"> | ||
1284 | <para>0</para> | ||
1285 | </entry><entry | ||
1286 | align="char"> | ||
1287 | <para>The function was completed without errors.</para> | ||
1288 | </entry> | ||
1289 | </row><row><entry | ||
1290 | align="char"> | ||
1291 | <para>-EINVAL</para> | ||
1292 | </entry><entry | ||
1293 | align="char"> | ||
1294 | <para>Bad parameter.</para> | ||
1295 | </entry> | ||
1296 | </row><row><entry | ||
1297 | align="char"> | ||
1298 | <para>-EBUSY</para> | ||
1299 | </entry><entry | ||
1300 | align="char"> | ||
1301 | <para>The front-end is in use, i.e. a call to connect_frontend() | ||
1302 | has not been followed by a call to disconnect_frontend().</para> | ||
1303 | </entry> | ||
1304 | </row></tbody></tgroup></informaltable> | ||
1305 | |||
1306 | </section><section | ||
1307 | role="subsection"><title>get_frontends()</title> | ||
1308 | <para>DESCRIPTION | ||
1309 | </para> | ||
1310 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
1311 | align="char"> | ||
1312 | <para>Provides the APIs of the front-ends that have been registered for this demux. | ||
1313 | Any of the front-ends obtained with this call can be used as a parameter for | ||
1314 | connect_frontend().</para> | ||
1315 | </entry> | ||
1316 | </row><row><entry | ||
1317 | align="char"> | ||
1318 | <para>The include file demux.h contains the macro DMX_FE_ENTRY() for | ||
1319 | converting an element of the generic type struct list_head* to the type | ||
1320 | dmx_frontend_t*. The caller must not free the memory of any of the elements | ||
1321 | obtained via this function call.</para> | ||
1322 | </entry> | ||
1323 | </row></tbody></tgroup></informaltable> | ||
1324 | <para>SYNOPSIS | ||
1325 | </para> | ||
1326 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
1327 | align="char"> | ||
1328 | <para>struct list_head⋆ get_frontends(dmx_demux_t⋆ demux);</para> | ||
1329 | </entry> | ||
1330 | </row></tbody></tgroup></informaltable> | ||
1331 | <para>PARAMETERS | ||
1332 | </para> | ||
1333 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
1334 | align="char"> | ||
1335 | <para>dmx_demux_t* | ||
1336 | demux</para> | ||
1337 | </entry><entry | ||
1338 | align="char"> | ||
1339 | <para>Pointer to the demux API and instance data.</para> | ||
1340 | </entry> | ||
1341 | </row></tbody></tgroup></informaltable> | ||
1342 | <para>RETURNS | ||
1343 | </para> | ||
1344 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
1345 | align="char"> | ||
1346 | <para>dmx_demux_t*</para> | ||
1347 | </entry><entry | ||
1348 | align="char"> | ||
1349 | <para>A list of front-end interfaces, or NULL in the case of an | ||
1350 | empty list.</para> | ||
1351 | </entry> | ||
1352 | </row></tbody></tgroup></informaltable> | ||
1353 | |||
1354 | </section><section | ||
1355 | role="subsection"><title>connect_frontend()</title> | ||
1356 | <para>DESCRIPTION | ||
1357 | </para> | ||
1358 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
1359 | align="char"> | ||
1360 | <para>Connects the TS output of the front-end to the input of the demux. A demux | ||
1361 | can only be connected to a front-end registered to the demux with the function | ||
1362 | add_frontend().</para> | ||
1363 | </entry> | ||
1364 | </row><row><entry | ||
1365 | align="char"> | ||
1366 | <para>It may or may not be possible to connect multiple demuxes to the same | ||
1367 | front-end, depending on the capabilities of the HW platform. When not used, | ||
1368 | the front-end should be released by calling disconnect_frontend().</para> | ||
1369 | </entry> | ||
1370 | </row></tbody></tgroup></informaltable> | ||
1371 | <para>SYNOPSIS | ||
1372 | </para> | ||
1373 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
1374 | align="char"> | ||
1375 | <para>int connect_frontend(dmx_demux_t⋆ demux, | ||
1376 | dmx_frontend_t⋆ frontend);</para> | ||
1377 | </entry> | ||
1378 | </row></tbody></tgroup></informaltable> | ||
1379 | <para>PARAMETERS | ||
1380 | </para> | ||
1381 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
1382 | align="char"> | ||
1383 | <para>dmx_demux_t* | ||
1384 | demux</para> | ||
1385 | </entry><entry | ||
1386 | align="char"> | ||
1387 | <para>Pointer to the demux API and instance data.</para> | ||
1388 | </entry> | ||
1389 | </row><row><entry | ||
1390 | align="char"> | ||
1391 | <para>dmx_frontend_t* | ||
1392 | frontend</para> | ||
1393 | </entry><entry | ||
1394 | align="char"> | ||
1395 | <para>Pointer to the front-end instance data.</para> | ||
1396 | </entry> | ||
1397 | </row></tbody></tgroup></informaltable> | ||
1398 | <para>RETURNS | ||
1399 | </para> | ||
1400 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
1401 | align="char"> | ||
1402 | <para>0</para> | ||
1403 | </entry><entry | ||
1404 | align="char"> | ||
1405 | <para>The function was completed without errors.</para> | ||
1406 | </entry> | ||
1407 | </row><row><entry | ||
1408 | align="char"> | ||
1409 | <para>-EINVAL</para> | ||
1410 | </entry><entry | ||
1411 | align="char"> | ||
1412 | <para>Bad parameter.</para> | ||
1413 | </entry> | ||
1414 | </row><row><entry | ||
1415 | align="char"> | ||
1416 | <para>-EBUSY</para> | ||
1417 | </entry><entry | ||
1418 | align="char"> | ||
1419 | <para>The front-end is in use.</para> | ||
1420 | </entry> | ||
1421 | </row></tbody></tgroup></informaltable> | ||
1422 | |||
1423 | </section><section | ||
1424 | role="subsection"><title>disconnect_frontend()</title> | ||
1425 | <para>DESCRIPTION | ||
1426 | </para> | ||
1427 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
1428 | align="char"> | ||
1429 | <para>Disconnects the demux and a front-end previously connected by a | ||
1430 | connect_frontend() call.</para> | ||
1431 | </entry> | ||
1432 | </row></tbody></tgroup></informaltable> | ||
1433 | <para>SYNOPSIS | ||
1434 | </para> | ||
1435 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
1436 | align="char"> | ||
1437 | <para>int disconnect_frontend(dmx_demux_t⋆ demux);</para> | ||
1438 | </entry> | ||
1439 | </row></tbody></tgroup></informaltable> | ||
1440 | <para>PARAMETERS | ||
1441 | </para> | ||
1442 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
1443 | align="char"> | ||
1444 | <para>dmx_demux_t* | ||
1445 | demux</para> | ||
1446 | </entry><entry | ||
1447 | align="char"> | ||
1448 | <para>Pointer to the demux API and instance data.</para> | ||
1449 | </entry> | ||
1450 | </row></tbody></tgroup></informaltable> | ||
1451 | <para>RETURNS | ||
1452 | </para> | ||
1453 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
1454 | align="char"> | ||
1455 | <para>0</para> | ||
1456 | </entry><entry | ||
1457 | align="char"> | ||
1458 | <para>The function was completed without errors.</para> | ||
1459 | </entry> | ||
1460 | </row><row><entry | ||
1461 | align="char"> | ||
1462 | <para>-EINVAL</para> | ||
1463 | </entry><entry | ||
1464 | align="char"> | ||
1465 | <para>Bad parameter.</para> | ||
1466 | </entry> | ||
1467 | </row></tbody></tgroup></informaltable> | ||
1468 | </section></section> | ||
1469 | <section id="demux_callback_api"> | ||
1470 | <title>Demux Callback API</title> | ||
1471 | <para>This kernel-space API comprises the callback functions that deliver filtered data to the | ||
1472 | demux client. Unlike the other APIs, these API functions are provided by the client and called | ||
1473 | from the demux code. | ||
1474 | </para> | ||
1475 | <para>The function pointers of this abstract interface are not packed into a structure as in the | ||
1476 | other demux APIs, because the callback functions are registered and used independent | ||
1477 | of each other. As an example, it is possible for the API client to provide several | ||
1478 | callback functions for receiving TS packets and no callbacks for PES packets or | ||
1479 | sections. | ||
1480 | </para> | ||
1481 | <para>The functions that implement the callback API need not be re-entrant: when a demux | ||
1482 | driver calls one of these functions, the driver is not allowed to call the function again before | ||
1483 | the original call returns. If a callback is triggered by a hardware interrupt, it is recommended | ||
1484 | to use the Linux “bottom half” mechanism or start a tasklet instead of making the callback | ||
1485 | function call directly from a hardware interrupt. | ||
1486 | </para> | ||
1487 | |||
1488 | <section | ||
1489 | role="subsection"><title>dmx_ts_cb()</title> | ||
1490 | <para>DESCRIPTION | ||
1491 | </para> | ||
1492 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
1493 | align="char"> | ||
1494 | <para>This function, provided by the client of the demux API, is called from the | ||
1495 | demux code. The function is only called when filtering on this TS feed has | ||
1496 | been enabled using the start_filtering() function.</para> | ||
1497 | </entry> | ||
1498 | </row><row><entry | ||
1499 | align="char"> | ||
1500 | <para>Any TS packets that match the filter settings are copied to a circular buffer. The | ||
1501 | filtered TS packets are delivered to the client using this callback function. The | ||
1502 | size of the circular buffer is controlled by the circular_buffer_size parameter | ||
1503 | of the set() function in the TS Feed API. It is expected that the buffer1 and | ||
1504 | buffer2 callback parameters point to addresses within the circular buffer, but | ||
1505 | other implementations are also possible. Note that the called party should not | ||
1506 | try to free the memory the buffer1 and buffer2 parameters point to.</para> | ||
1507 | </entry> | ||
1508 | </row><row><entry | ||
1509 | align="char"> | ||
1510 | <para>When this function is called, the buffer1 parameter typically points to the | ||
1511 | start of the first undelivered TS packet within a circular buffer. The buffer2 | ||
1512 | buffer parameter is normally NULL, except when the received TS packets have | ||
1513 | crossed the last address of the circular buffer and ”wrapped” to the beginning | ||
1514 | of the buffer. In the latter case the buffer1 parameter would contain an address | ||
1515 | within the circular buffer, while the buffer2 parameter would contain the first | ||
1516 | address of the circular buffer.</para> | ||
1517 | </entry> | ||
1518 | </row><row><entry | ||
1519 | align="char"> | ||
1520 | <para>The number of bytes delivered with this function (i.e. buffer1_length + | ||
1521 | buffer2_length) is usually equal to the value of callback_length parameter | ||
1522 | given in the set() function, with one exception: if a timeout occurs before | ||
1523 | receiving callback_length bytes of TS data, any undelivered packets are | ||
1524 | immediately delivered to the client by calling this function. The timeout | ||
1525 | duration is controlled by the set() function in the TS Feed API.</para> | ||
1526 | </entry> | ||
1527 | </row><row><entry | ||
1528 | align="char"> | ||
1529 | <para>If a TS packet is received with errors that could not be fixed by the TS-level | ||
1530 | forward error correction (FEC), the Transport_error_indicator flag of the TS | ||
1531 | packet header should be set. The TS packet should not be discarded, as | ||
1532 | the error can possibly be corrected by a higher layer protocol. If the called | ||
1533 | party is slow in processing the callback, it is possible that the circular buffer | ||
1534 | eventually fills up. If this happens, the demux driver should discard any TS | ||
1535 | packets received while the buffer is full. The error should be indicated to the | ||
1536 | client on the next callback by setting the success parameter to the value of | ||
1537 | DMX_OVERRUN_ERROR.</para> | ||
1538 | </entry> | ||
1539 | </row><row><entry | ||
1540 | align="char"> | ||
1541 | <para>The type of data returned to the callback can be selected by the new | ||
1542 | function int (*set_type) (struct dmx_ts_feed_s* feed, int type, dmx_ts_pes_t | ||
1543 | pes_type) which is part of the dmx_ts_feed_s struct (also cf. to the | ||
1544 | include file ost/demux.h) The type parameter decides if the raw TS packet | ||
1545 | (TS_PACKET) or just the payload (TS_PACKET—TS_PAYLOAD_ONLY) | ||
1546 | should be returned. If additionally the TS_DECODER bit is set the stream | ||
1547 | will also be sent to the hardware MPEG decoder. In this case, the second | ||
1548 | flag decides as what kind of data the stream should be interpreted. The | ||
1549 | possible choices are one of DMX_TS_PES_AUDIO, DMX_TS_PES_VIDEO, | ||
1550 | DMX_TS_PES_TELETEXT, DMX_TS_PES_SUBTITLE, | ||
1551 | DMX_TS_PES_PCR, or DMX_TS_PES_OTHER.</para> | ||
1552 | </entry> | ||
1553 | </row></tbody></tgroup></informaltable> | ||
1554 | <para>SYNOPSIS | ||
1555 | </para> | ||
1556 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
1557 | align="char"> | ||
1558 | <para>int dmx_ts_cb(__u8⋆ buffer1, size_t buffer1_length, | ||
1559 | __u8⋆ buffer2, size_t buffer2_length, dmx_ts_feed_t⋆ | ||
1560 | source, dmx_success_t success);</para> | ||
1561 | </entry> | ||
1562 | </row></tbody></tgroup></informaltable> | ||
1563 | <para>PARAMETERS | ||
1564 | </para> | ||
1565 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
1566 | align="char"> | ||
1567 | <para>__u8* buffer1</para> | ||
1568 | </entry><entry | ||
1569 | align="char"> | ||
1570 | <para>Pointer to the start of the filtered TS packets.</para> | ||
1571 | </entry> | ||
1572 | </row><row><entry | ||
1573 | align="char"> | ||
1574 | <para>size_t buffer1_length</para> | ||
1575 | </entry><entry | ||
1576 | align="char"> | ||
1577 | <para>Length of the TS data in buffer1.</para> | ||
1578 | </entry> | ||
1579 | </row><row><entry | ||
1580 | align="char"> | ||
1581 | <para>__u8* buffer2</para> | ||
1582 | </entry><entry | ||
1583 | align="char"> | ||
1584 | <para>Pointer to the tail of the filtered TS packets, or NULL.</para> | ||
1585 | </entry> | ||
1586 | </row><row><entry | ||
1587 | align="char"> | ||
1588 | <para>size_t buffer2_length</para> | ||
1589 | </entry><entry | ||
1590 | align="char"> | ||
1591 | <para>Length of the TS data in buffer2.</para> | ||
1592 | </entry> | ||
1593 | </row><row><entry | ||
1594 | align="char"> | ||
1595 | <para>dmx_ts_feed_t* | ||
1596 | source</para> | ||
1597 | </entry><entry | ||
1598 | align="char"> | ||
1599 | <para>Indicates which TS feed is the source of the callback.</para> | ||
1600 | </entry> | ||
1601 | </row><row><entry | ||
1602 | align="char"> | ||
1603 | <para>dmx_success_t | ||
1604 | success</para> | ||
1605 | </entry><entry | ||
1606 | align="char"> | ||
1607 | <para>Indicates if there was an error in TS reception.</para> | ||
1608 | </entry> | ||
1609 | </row></tbody></tgroup></informaltable> | ||
1610 | <para>RETURNS | ||
1611 | </para> | ||
1612 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
1613 | align="char"> | ||
1614 | <para>0</para> | ||
1615 | </entry><entry | ||
1616 | align="char"> | ||
1617 | <para>Continue filtering.</para> | ||
1618 | </entry> | ||
1619 | </row><row><entry | ||
1620 | align="char"> | ||
1621 | <para>-1</para> | ||
1622 | </entry><entry | ||
1623 | align="char"> | ||
1624 | <para>Stop filtering - has the same effect as a call to | ||
1625 | stop_filtering() on the TS Feed API.</para> | ||
1626 | </entry> | ||
1627 | </row></tbody></tgroup></informaltable> | ||
1628 | |||
1629 | </section><section | ||
1630 | role="subsection"><title>dmx_section_cb()</title> | ||
1631 | <para>DESCRIPTION | ||
1632 | </para> | ||
1633 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
1634 | align="char"> | ||
1635 | <para>This function, provided by the client of the demux API, is called from the | ||
1636 | demux code. The function is only called when filtering of sections has been | ||
1637 | enabled using the function start_filtering() of the section feed API. When the | ||
1638 | demux driver has received a complete section that matches at least one section | ||
1639 | filter, the client is notified via this callback function. Normally this function is | ||
1640 | called for each received section; however, it is also possible to deliver multiple | ||
1641 | sections with one callback, for example when the system load is high. If an | ||
1642 | error occurs while receiving a section, this function should be called with | ||
1643 | the corresponding error type set in the success field, whether or not there is | ||
1644 | data to deliver. The Section Feed implementation should maintain a circular | ||
1645 | buffer for received sections. However, this is not necessary if the Section Feed | ||
1646 | API is implemented as a client of the TS Feed API, because the TS Feed | ||
1647 | implementation then buffers the received data. The size of the circular buffer | ||
1648 | can be configured using the set() function in the Section Feed API. If there | ||
1649 | is no room in the circular buffer when a new section is received, the section | ||
1650 | must be discarded. If this happens, the value of the success parameter should | ||
1651 | be DMX_OVERRUN_ERROR on the next callback.</para> | ||
1652 | </entry> | ||
1653 | </row></tbody></tgroup></informaltable> | ||
1654 | <para>SYNOPSIS | ||
1655 | </para> | ||
1656 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
1657 | align="char"> | ||
1658 | <para>int dmx_section_cb(__u8⋆ buffer1, size_t | ||
1659 | buffer1_length, __u8⋆ buffer2, size_t | ||
1660 | buffer2_length, dmx_section_filter_t⋆ source, | ||
1661 | dmx_success_t success);</para> | ||
1662 | </entry> | ||
1663 | </row></tbody></tgroup></informaltable> | ||
1664 | <para>PARAMETERS | ||
1665 | </para> | ||
1666 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
1667 | align="char"> | ||
1668 | <para>__u8* buffer1</para> | ||
1669 | </entry><entry | ||
1670 | align="char"> | ||
1671 | <para>Pointer to the start of the filtered section, e.g. within the | ||
1672 | circular buffer of the demux driver.</para> | ||
1673 | </entry> | ||
1674 | </row><row><entry | ||
1675 | align="char"> | ||
1676 | <para>size_t buffer1_length</para> | ||
1677 | </entry><entry | ||
1678 | align="char"> | ||
1679 | <para>Length of the filtered section data in buffer1, including | ||
1680 | headers and CRC.</para> | ||
1681 | </entry> | ||
1682 | </row><row><entry | ||
1683 | align="char"> | ||
1684 | <para>__u8* buffer2</para> | ||
1685 | </entry><entry | ||
1686 | align="char"> | ||
1687 | <para>Pointer to the tail of the filtered section data, or NULL. | ||
1688 | Useful to handle the wrapping of a circular buffer.</para> | ||
1689 | </entry> | ||
1690 | </row><row><entry | ||
1691 | align="char"> | ||
1692 | <para>size_t buffer2_length</para> | ||
1693 | </entry><entry | ||
1694 | align="char"> | ||
1695 | <para>Length of the filtered section data in buffer2, including | ||
1696 | headers and CRC.</para> | ||
1697 | </entry> | ||
1698 | </row><row><entry | ||
1699 | align="char"> | ||
1700 | <para>dmx_section_filter_t* | ||
1701 | filter</para> | ||
1702 | </entry><entry | ||
1703 | align="char"> | ||
1704 | <para>Indicates the filter that triggered the callback.</para> | ||
1705 | </entry> | ||
1706 | </row><row><entry | ||
1707 | align="char"> | ||
1708 | <para>dmx_success_t | ||
1709 | success</para> | ||
1710 | </entry><entry | ||
1711 | align="char"> | ||
1712 | <para>Indicates if there was an error in section reception.</para> | ||
1713 | </entry> | ||
1714 | </row></tbody></tgroup></informaltable> | ||
1715 | <para>RETURNS | ||
1716 | </para> | ||
1717 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
1718 | align="char"> | ||
1719 | <para>0</para> | ||
1720 | </entry><entry | ||
1721 | align="char"> | ||
1722 | <para>Continue filtering.</para> | ||
1723 | </entry> | ||
1724 | </row><row><entry | ||
1725 | align="char"> | ||
1726 | <para>-1</para> | ||
1727 | </entry><entry | ||
1728 | align="char"> | ||
1729 | <para>Stop filtering - has the same effect as a call to | ||
1730 | stop_filtering() on the Section Feed API.</para> | ||
1731 | </entry> | ||
1732 | </row></tbody></tgroup></informaltable> | ||
1733 | </section></section> | ||
1734 | <section id="ts_feed_api"> | ||
1735 | <title>TS Feed API</title> | ||
1736 | <para>A TS feed is typically mapped to a hardware PID filter on the demux chip. | ||
1737 | Using this API, the client can set the filtering properties to start/stop filtering TS | ||
1738 | packets on a particular TS feed. The API is defined as an abstract interface of the type | ||
1739 | dmx_ts_feed_t. | ||
1740 | </para> | ||
1741 | <para>The functions that implement the interface should be defined static or module private. The | ||
1742 | client can get the handle of a TS feed API by calling the function allocate_ts_feed() in the | ||
1743 | demux API. | ||
1744 | </para> | ||
1745 | |||
1746 | <section | ||
1747 | role="subsection"><title>set()</title> | ||
1748 | <para>DESCRIPTION | ||
1749 | </para> | ||
1750 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
1751 | align="char"> | ||
1752 | <para>This function sets the parameters of a TS feed. Any filtering in progress on the | ||
1753 | TS feed must be stopped before calling this function.</para> | ||
1754 | </entry> | ||
1755 | </row></tbody></tgroup></informaltable> | ||
1756 | <para>SYNOPSIS | ||
1757 | </para> | ||
1758 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
1759 | align="char"> | ||
1760 | <para>int set ( dmx_ts_feed_t⋆ feed, __u16 pid, size_t | ||
1761 | callback_length, size_t circular_buffer_size, int | ||
1762 | descramble, struct timespec timeout);</para> | ||
1763 | </entry> | ||
1764 | </row></tbody></tgroup></informaltable> | ||
1765 | <para>PARAMETERS | ||
1766 | </para> | ||
1767 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
1768 | align="char"> | ||
1769 | <para>dmx_ts_feed_t* feed</para> | ||
1770 | </entry><entry | ||
1771 | align="char"> | ||
1772 | <para>Pointer to the TS feed API and instance data.</para> | ||
1773 | </entry> | ||
1774 | </row><row><entry | ||
1775 | align="char"> | ||
1776 | <para>__u16 pid</para> | ||
1777 | </entry><entry | ||
1778 | align="char"> | ||
1779 | <para>PID value to filter. Only the TS packets carrying the | ||
1780 | specified PID will be passed to the API client.</para> | ||
1781 | </entry> | ||
1782 | </row><row><entry | ||
1783 | align="char"> | ||
1784 | <para>size_t | ||
1785 | callback_length</para> | ||
1786 | </entry><entry | ||
1787 | align="char"> | ||
1788 | <para>Number of bytes to deliver with each call to the | ||
1789 | dmx_ts_cb() callback function. The value of this | ||
1790 | parameter should be a multiple of 188.</para> | ||
1791 | </entry> | ||
1792 | </row><row><entry | ||
1793 | align="char"> | ||
1794 | <para>size_t | ||
1795 | circular_buffer_size</para> | ||
1796 | </entry><entry | ||
1797 | align="char"> | ||
1798 | <para>Size of the circular buffer for the filtered TS packets.</para> | ||
1799 | </entry> | ||
1800 | </row><row><entry | ||
1801 | align="char"> | ||
1802 | <para>int descramble</para> | ||
1803 | </entry><entry | ||
1804 | align="char"> | ||
1805 | <para>If non-zero, descramble the filtered TS packets.</para> | ||
1806 | </entry> | ||
1807 | </row><row><entry | ||
1808 | align="char"> | ||
1809 | <para>struct timespec | ||
1810 | timeout</para> | ||
1811 | </entry><entry | ||
1812 | align="char"> | ||
1813 | <para>Maximum time to wait before delivering received TS | ||
1814 | packets to the client.</para> | ||
1815 | </entry> | ||
1816 | </row></tbody></tgroup></informaltable> | ||
1817 | <para>RETURNS | ||
1818 | </para> | ||
1819 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
1820 | align="char"> | ||
1821 | <para>0</para> | ||
1822 | </entry><entry | ||
1823 | align="char"> | ||
1824 | <para>The function was completed without errors.</para> | ||
1825 | </entry> | ||
1826 | </row><row><entry | ||
1827 | align="char"> | ||
1828 | <para>-ENOMEM</para> | ||
1829 | </entry><entry | ||
1830 | align="char"> | ||
1831 | <para>Not enough memory for the requested buffer size.</para> | ||
1832 | </entry> | ||
1833 | </row><row><entry | ||
1834 | align="char"> | ||
1835 | <para>-ENOSYS</para> | ||
1836 | </entry><entry | ||
1837 | align="char"> | ||
1838 | <para>No descrambling facility available for TS.</para> | ||
1839 | </entry> | ||
1840 | </row><row><entry | ||
1841 | align="char"> | ||
1842 | <para>-EINVAL</para> | ||
1843 | </entry><entry | ||
1844 | align="char"> | ||
1845 | <para>Bad parameter.</para> | ||
1846 | </entry> | ||
1847 | </row></tbody></tgroup></informaltable> | ||
1848 | |||
1849 | </section><section | ||
1850 | role="subsection"><title>start_filtering()</title> | ||
1851 | <para>DESCRIPTION | ||
1852 | </para> | ||
1853 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
1854 | align="char"> | ||
1855 | <para>Starts filtering TS packets on this TS feed, according to its settings. The PID | ||
1856 | value to filter can be set by the API client. All matching TS packets are | ||
1857 | delivered asynchronously to the client, using the callback function registered | ||
1858 | with allocate_ts_feed().</para> | ||
1859 | </entry> | ||
1860 | </row></tbody></tgroup></informaltable> | ||
1861 | <para>SYNOPSIS | ||
1862 | </para> | ||
1863 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
1864 | align="char"> | ||
1865 | <para>int start_filtering(dmx_ts_feed_t⋆ feed);</para> | ||
1866 | </entry> | ||
1867 | </row></tbody></tgroup></informaltable> | ||
1868 | <para>PARAMETERS | ||
1869 | </para> | ||
1870 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
1871 | align="char"> | ||
1872 | <para>dmx_ts_feed_t* feed</para> | ||
1873 | </entry><entry | ||
1874 | align="char"> | ||
1875 | <para>Pointer to the TS feed API and instance data.</para> | ||
1876 | </entry> | ||
1877 | </row></tbody></tgroup></informaltable> | ||
1878 | <para>RETURNS | ||
1879 | </para> | ||
1880 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
1881 | align="char"> | ||
1882 | <para>0</para> | ||
1883 | </entry><entry | ||
1884 | align="char"> | ||
1885 | <para>The function was completed without errors.</para> | ||
1886 | </entry> | ||
1887 | </row><row><entry | ||
1888 | align="char"> | ||
1889 | <para>-EINVAL</para> | ||
1890 | </entry><entry | ||
1891 | align="char"> | ||
1892 | <para>Bad parameter.</para> | ||
1893 | </entry> | ||
1894 | </row></tbody></tgroup></informaltable> | ||
1895 | |||
1896 | </section><section | ||
1897 | role="subsection"><title>stop_filtering()</title> | ||
1898 | <para>DESCRIPTION | ||
1899 | </para> | ||
1900 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
1901 | align="char"> | ||
1902 | <para>Stops filtering TS packets on this TS feed.</para> | ||
1903 | </entry> | ||
1904 | </row></tbody></tgroup></informaltable> | ||
1905 | <para>SYNOPSIS | ||
1906 | </para> | ||
1907 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
1908 | align="char"> | ||
1909 | <para>int stop_filtering(dmx_ts_feed_t⋆ feed);</para> | ||
1910 | </entry> | ||
1911 | </row></tbody></tgroup></informaltable> | ||
1912 | <para>PARAMETERS | ||
1913 | </para> | ||
1914 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
1915 | align="char"> | ||
1916 | <para>dmx_ts_feed_t* feed</para> | ||
1917 | </entry><entry | ||
1918 | align="char"> | ||
1919 | <para>Pointer to the TS feed API and instance data.</para> | ||
1920 | </entry> | ||
1921 | </row></tbody></tgroup></informaltable> | ||
1922 | <para>RETURNS | ||
1923 | </para> | ||
1924 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
1925 | align="char"> | ||
1926 | <para>0</para> | ||
1927 | </entry><entry | ||
1928 | align="char"> | ||
1929 | <para>The function was completed without errors.</para> | ||
1930 | </entry> | ||
1931 | </row><row><entry | ||
1932 | align="char"> | ||
1933 | <para>-EINVAL</para> | ||
1934 | </entry><entry | ||
1935 | align="char"> | ||
1936 | <para>Bad parameter.</para> | ||
1937 | </entry> | ||
1938 | </row></tbody></tgroup></informaltable> | ||
1939 | </section></section> | ||
1940 | <section id="section_feed_api"> | ||
1941 | <title>Section Feed API</title> | ||
1942 | <para>A section feed is a resource consisting of a PID filter and a set of section filters. Using this | ||
1943 | API, the client can set the properties of a section feed and to start/stop filtering. The API is | ||
1944 | defined as an abstract interface of the type dmx_section_feed_t. The functions that implement | ||
1945 | the interface should be defined static or module private. The client can get the handle of | ||
1946 | a section feed API by calling the function allocate_section_feed() in the demux | ||
1947 | API. | ||
1948 | </para> | ||
1949 | <para>On demux platforms that provide section filtering in hardware, the Section Feed API | ||
1950 | implementation provides a software wrapper for the demux hardware. Other platforms may | ||
1951 | support only PID filtering in hardware, requiring that TS packets are converted to sections in | ||
1952 | software. In the latter case the Section Feed API implementation can be a client of the TS | ||
1953 | Feed API. | ||
1954 | </para> | ||
1955 | |||
1956 | </section> | ||
1957 | <section id="kdapi_set"> | ||
1958 | <title>set()</title> | ||
1959 | <para>DESCRIPTION | ||
1960 | </para> | ||
1961 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
1962 | align="char"> | ||
1963 | <para>This function sets the parameters of a section feed. Any filtering in progress on | ||
1964 | the section feed must be stopped before calling this function. If descrambling | ||
1965 | is enabled, the payload_scrambling_control and address_scrambling_control | ||
1966 | fields of received DVB datagram sections should be observed. If either one is | ||
1967 | non-zero, the section should be descrambled either in hardware or using the | ||
1968 | functions descramble_mac_address() and descramble_section_payload() of the | ||
1969 | demux API. Note that according to the MPEG-2 Systems specification, only | ||
1970 | the payloads of private sections can be scrambled while the rest of the section | ||
1971 | data must be sent in the clear.</para> | ||
1972 | </entry> | ||
1973 | </row></tbody></tgroup></informaltable> | ||
1974 | <para>SYNOPSIS | ||
1975 | </para> | ||
1976 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
1977 | align="char"> | ||
1978 | <para>int set(dmx_section_feed_t⋆ feed, __u16 pid, size_t | ||
1979 | circular_buffer_size, int descramble, int | ||
1980 | check_crc);</para> | ||
1981 | </entry> | ||
1982 | </row></tbody></tgroup></informaltable> | ||
1983 | <para>PARAMETERS | ||
1984 | </para> | ||
1985 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
1986 | align="char"> | ||
1987 | <para>dmx_section_feed_t* | ||
1988 | feed</para> | ||
1989 | </entry><entry | ||
1990 | align="char"> | ||
1991 | <para>Pointer to the section feed API and instance data.</para> | ||
1992 | </entry> | ||
1993 | </row><row><entry | ||
1994 | align="char"> | ||
1995 | <para>__u16 pid</para> | ||
1996 | </entry><entry | ||
1997 | align="char"> | ||
1998 | <para>PID value to filter; only the TS packets carrying the | ||
1999 | specified PID will be accepted.</para> | ||
2000 | </entry> | ||
2001 | </row><row><entry | ||
2002 | align="char"> | ||
2003 | <para>size_t | ||
2004 | circular_buffer_size</para> | ||
2005 | </entry><entry | ||
2006 | align="char"> | ||
2007 | <para>Size of the circular buffer for filtered sections.</para> | ||
2008 | </entry> | ||
2009 | </row><row><entry | ||
2010 | align="char"> | ||
2011 | <para>int descramble</para> | ||
2012 | </entry><entry | ||
2013 | align="char"> | ||
2014 | <para>If non-zero, descramble any sections that are scrambled.</para> | ||
2015 | </entry> | ||
2016 | </row><row><entry | ||
2017 | align="char"> | ||
2018 | <para>int check_crc</para> | ||
2019 | </entry><entry | ||
2020 | align="char"> | ||
2021 | <para>If non-zero, check the CRC values of filtered sections.</para> | ||
2022 | </entry> | ||
2023 | </row></tbody></tgroup></informaltable> | ||
2024 | <para>RETURNS | ||
2025 | </para> | ||
2026 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
2027 | align="char"> | ||
2028 | <para>0</para> | ||
2029 | </entry><entry | ||
2030 | align="char"> | ||
2031 | <para>The function was completed without errors.</para> | ||
2032 | </entry> | ||
2033 | </row><row><entry | ||
2034 | align="char"> | ||
2035 | <para>-ENOMEM</para> | ||
2036 | </entry><entry | ||
2037 | align="char"> | ||
2038 | <para>Not enough memory for the requested buffer size.</para> | ||
2039 | </entry> | ||
2040 | </row><row><entry | ||
2041 | align="char"> | ||
2042 | <para>-ENOSYS</para> | ||
2043 | </entry><entry | ||
2044 | align="char"> | ||
2045 | <para>No descrambling facility available for sections.</para> | ||
2046 | </entry> | ||
2047 | </row><row><entry | ||
2048 | align="char"> | ||
2049 | <para>-EINVAL</para> | ||
2050 | </entry><entry | ||
2051 | align="char"> | ||
2052 | <para>Bad parameters.</para> | ||
2053 | </entry> | ||
2054 | </row></tbody></tgroup></informaltable> | ||
2055 | |||
2056 | </section><section | ||
2057 | role="subsection"><title>allocate_filter()</title> | ||
2058 | <para>DESCRIPTION | ||
2059 | </para> | ||
2060 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
2061 | align="char"> | ||
2062 | <para>This function is used to allocate a section filter on the demux. It should only be | ||
2063 | called when no filtering is in progress on this section feed. If a filter cannot be | ||
2064 | allocated, the function fails with -ENOSPC. See in section ?? for the format of | ||
2065 | the section filter.</para> | ||
2066 | </entry> | ||
2067 | </row><row><entry | ||
2068 | align="char"> | ||
2069 | <para>The bitfields filter_mask and filter_value should only be modified when no | ||
2070 | filtering is in progress on this section feed. filter_mask controls which bits of | ||
2071 | filter_value are compared with the section headers/payload. On a binary value | ||
2072 | of 1 in filter_mask, the corresponding bits are compared. The filter only accepts | ||
2073 | sections that are equal to filter_value in all the tested bit positions. Any changes | ||
2074 | to the values of filter_mask and filter_value are guaranteed to take effect only | ||
2075 | when the start_filtering() function is called next time. The parent pointer in | ||
2076 | the struct is initialized by the API implementation to the value of the feed | ||
2077 | parameter. The priv pointer is not used by the API implementation, and can | ||
2078 | thus be freely utilized by the caller of this function. Any data pointed to by the | ||
2079 | priv pointer is available to the recipient of the dmx_section_cb() function call.</para> | ||
2080 | </entry> | ||
2081 | </row><row><entry | ||
2082 | align="char"> | ||
2083 | <para>While the maximum section filter length (DMX_MAX_FILTER_SIZE) is | ||
2084 | currently set at 16 bytes, hardware filters of that size are not available on all | ||
2085 | platforms. Therefore, section filtering will often take place first in hardware, | ||
2086 | followed by filtering in software for the header bytes that were not covered | ||
2087 | by a hardware filter. The filter_mask field can be checked to determine how | ||
2088 | many bytes of the section filter are actually used, and if the hardware filter will | ||
2089 | suffice. Additionally, software-only section filters can optionally be allocated | ||
2090 | to clients when all hardware section filters are in use. Note that on most demux | ||
2091 | hardware it is not possible to filter on the section_length field of the section | ||
2092 | header – thus this field is ignored, even though it is included in filter_value and | ||
2093 | filter_mask fields.</para> | ||
2094 | </entry> | ||
2095 | </row></tbody></tgroup></informaltable> | ||
2096 | <para>SYNOPSIS | ||
2097 | </para> | ||
2098 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
2099 | align="char"> | ||
2100 | <para>int allocate_filter(dmx_section_feed_t⋆ feed, | ||
2101 | dmx_section_filter_t⋆⋆ filter);</para> | ||
2102 | </entry> | ||
2103 | </row></tbody></tgroup></informaltable> | ||
2104 | <para>PARAMETERS | ||
2105 | </para> | ||
2106 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
2107 | align="char"> | ||
2108 | <para>dmx_section_feed_t* | ||
2109 | feed</para> | ||
2110 | </entry><entry | ||
2111 | align="char"> | ||
2112 | <para>Pointer to the section feed API and instance data.</para> | ||
2113 | </entry> | ||
2114 | </row><row><entry | ||
2115 | align="char"> | ||
2116 | <para>dmx_section_filter_t** | ||
2117 | filter</para> | ||
2118 | </entry><entry | ||
2119 | align="char"> | ||
2120 | <para>Pointer to the allocated filter.</para> | ||
2121 | </entry> | ||
2122 | </row></tbody></tgroup></informaltable> | ||
2123 | <para>RETURNS | ||
2124 | </para> | ||
2125 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
2126 | align="char"> | ||
2127 | <para>0</para> | ||
2128 | </entry><entry | ||
2129 | align="char"> | ||
2130 | <para>The function was completed without errors.</para> | ||
2131 | </entry> | ||
2132 | </row><row><entry | ||
2133 | align="char"> | ||
2134 | <para>-ENOSPC</para> | ||
2135 | </entry><entry | ||
2136 | align="char"> | ||
2137 | <para>No filters of given type and length available.</para> | ||
2138 | </entry> | ||
2139 | </row><row><entry | ||
2140 | align="char"> | ||
2141 | <para>-EINVAL</para> | ||
2142 | </entry><entry | ||
2143 | align="char"> | ||
2144 | <para>Bad parameters.</para> | ||
2145 | </entry> | ||
2146 | </row></tbody></tgroup></informaltable> | ||
2147 | |||
2148 | </section><section | ||
2149 | role="subsection"><title>release_filter()</title> | ||
2150 | <para>DESCRIPTION | ||
2151 | </para> | ||
2152 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
2153 | align="char"> | ||
2154 | <para>This function releases all the resources of a previously allocated section filter. | ||
2155 | The function should not be called while filtering is in progress on this section | ||
2156 | feed. After calling this function, the caller should not try to dereference the | ||
2157 | filter pointer.</para> | ||
2158 | </entry> | ||
2159 | </row></tbody></tgroup></informaltable> | ||
2160 | <para>SYNOPSIS | ||
2161 | </para> | ||
2162 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
2163 | align="char"> | ||
2164 | <para>int release_filter ( dmx_section_feed_t⋆ feed, | ||
2165 | dmx_section_filter_t⋆ filter);</para> | ||
2166 | </entry> | ||
2167 | </row></tbody></tgroup></informaltable> | ||
2168 | <para>PARAMETERS | ||
2169 | </para> | ||
2170 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
2171 | align="char"> | ||
2172 | <para>dmx_section_feed_t* | ||
2173 | feed</para> | ||
2174 | </entry><entry | ||
2175 | align="char"> | ||
2176 | <para>Pointer to the section feed API and instance data.</para> | ||
2177 | </entry> | ||
2178 | </row><row><entry | ||
2179 | align="char"> | ||
2180 | <para>dmx_section_filter_t* | ||
2181 | filter</para> | ||
2182 | </entry><entry | ||
2183 | align="char"> | ||
2184 | <para>I/O Pointer to the instance data of a section filter.</para> | ||
2185 | </entry> | ||
2186 | </row></tbody></tgroup></informaltable> | ||
2187 | <para>RETURNS | ||
2188 | </para> | ||
2189 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
2190 | align="char"> | ||
2191 | <para>0</para> | ||
2192 | </entry><entry | ||
2193 | align="char"> | ||
2194 | <para>The function was completed without errors.</para> | ||
2195 | </entry> | ||
2196 | </row><row><entry | ||
2197 | align="char"> | ||
2198 | <para>-ENODEV</para> | ||
2199 | </entry><entry | ||
2200 | align="char"> | ||
2201 | <para>No such filter allocated.</para> | ||
2202 | </entry> | ||
2203 | </row><row><entry | ||
2204 | align="char"> | ||
2205 | <para>-EINVAL</para> | ||
2206 | </entry><entry | ||
2207 | align="char"> | ||
2208 | <para>Bad parameter.</para> | ||
2209 | </entry> | ||
2210 | </row></tbody></tgroup></informaltable> | ||
2211 | |||
2212 | </section><section | ||
2213 | role="subsection"><title>start_filtering()</title> | ||
2214 | <para>DESCRIPTION | ||
2215 | </para> | ||
2216 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
2217 | align="char"> | ||
2218 | <para>Starts filtering sections on this section feed, according to its settings. Sections | ||
2219 | are first filtered based on their PID and then matched with the section | ||
2220 | filters allocated for this feed. If the section matches the PID filter and | ||
2221 | at least one section filter, it is delivered to the API client. The section | ||
2222 | is delivered asynchronously using the callback function registered with | ||
2223 | allocate_section_feed().</para> | ||
2224 | </entry> | ||
2225 | </row></tbody></tgroup></informaltable> | ||
2226 | <para>SYNOPSIS | ||
2227 | </para> | ||
2228 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
2229 | align="char"> | ||
2230 | <para>int start_filtering ( dmx_section_feed_t⋆ feed );</para> | ||
2231 | </entry> | ||
2232 | </row></tbody></tgroup></informaltable> | ||
2233 | <para>PARAMETERS | ||
2234 | </para> | ||
2235 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
2236 | align="char"> | ||
2237 | <para>dmx_section_feed_t* | ||
2238 | feed</para> | ||
2239 | </entry><entry | ||
2240 | align="char"> | ||
2241 | <para>Pointer to the section feed API and instance data.</para> | ||
2242 | </entry> | ||
2243 | </row></tbody></tgroup></informaltable> | ||
2244 | <para>RETURNS | ||
2245 | </para> | ||
2246 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
2247 | align="char"> | ||
2248 | <para>0</para> | ||
2249 | </entry><entry | ||
2250 | align="char"> | ||
2251 | <para>The function was completed without errors.</para> | ||
2252 | </entry> | ||
2253 | </row><row><entry | ||
2254 | align="char"> | ||
2255 | <para>-EINVAL</para> | ||
2256 | </entry><entry | ||
2257 | align="char"> | ||
2258 | <para>Bad parameter.</para> | ||
2259 | </entry> | ||
2260 | </row></tbody></tgroup></informaltable> | ||
2261 | |||
2262 | </section><section | ||
2263 | role="subsection"><title>stop_filtering()</title> | ||
2264 | <para>DESCRIPTION | ||
2265 | </para> | ||
2266 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
2267 | align="char"> | ||
2268 | <para>Stops filtering sections on this section feed. Note that any changes to the | ||
2269 | filtering parameters (filter_value, filter_mask, etc.) should only be made when | ||
2270 | filtering is stopped.</para> | ||
2271 | </entry> | ||
2272 | </row></tbody></tgroup></informaltable> | ||
2273 | <para>SYNOPSIS | ||
2274 | </para> | ||
2275 | <informaltable><tgroup cols="1"><tbody><row><entry | ||
2276 | align="char"> | ||
2277 | <para>int stop_filtering ( dmx_section_feed_t⋆ feed );</para> | ||
2278 | </entry> | ||
2279 | </row></tbody></tgroup></informaltable> | ||
2280 | <para>PARAMETERS | ||
2281 | </para> | ||
2282 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
2283 | align="char"> | ||
2284 | <para>dmx_section_feed_t* | ||
2285 | feed</para> | ||
2286 | </entry><entry | ||
2287 | align="char"> | ||
2288 | <para>Pointer to the section feed API and instance data.</para> | ||
2289 | </entry> | ||
2290 | </row></tbody></tgroup></informaltable> | ||
2291 | <para>RETURNS | ||
2292 | </para> | ||
2293 | <informaltable><tgroup cols="2"><tbody><row><entry | ||
2294 | align="char"> | ||
2295 | <para>0</para> | ||
2296 | </entry><entry | ||
2297 | align="char"> | ||
2298 | <para>The function was completed without errors.</para> | ||
2299 | </entry> | ||
2300 | </row><row><entry | ||
2301 | align="char"> | ||
2302 | <para>-EINVAL</para> | ||
2303 | </entry><entry | ||
2304 | align="char"> | ||
2305 | <para>Bad parameter.</para> | ||
2306 | </entry> | ||
2307 | </row></tbody></tgroup></informaltable> | ||
2308 | |||
2309 | </section> | ||
diff --git a/Documentation/DocBook/media/v4l/biblio.xml b/Documentation/DocBook/media/v4l/biblio.xml index fdee6b3f3eca..9beb30f0071b 100644 --- a/Documentation/DocBook/media/v4l/biblio.xml +++ b/Documentation/DocBook/media/v4l/biblio.xml | |||
@@ -177,6 +177,24 @@ Signal - NTSC for Studio Applications"</title> | |||
177 | 1125-Line High-Definition Production"</title> | 177 | 1125-Line High-Definition Production"</title> |
178 | </biblioentry> | 178 | </biblioentry> |
179 | 179 | ||
180 | <biblioentry id="smpte431"> | ||
181 | <abbrev>SMPTE RP 431-2</abbrev> | ||
182 | <authorgroup> | ||
183 | <corpauthor>Society of Motion Picture and Television Engineers | ||
184 | (<ulink url="http://www.smpte.org">http://www.smpte.org</ulink>)</corpauthor> | ||
185 | </authorgroup> | ||
186 | <title>SMPTE RP 431-2:2011 "D-Cinema Quality - Reference Projector and Environment"</title> | ||
187 | </biblioentry> | ||
188 | |||
189 | <biblioentry id="smpte2084"> | ||
190 | <abbrev>SMPTE ST 2084</abbrev> | ||
191 | <authorgroup> | ||
192 | <corpauthor>Society of Motion Picture and Television Engineers | ||
193 | (<ulink url="http://www.smpte.org">http://www.smpte.org</ulink>)</corpauthor> | ||
194 | </authorgroup> | ||
195 | <title>SMPTE ST 2084:2014 "High Dynamic Range Electro-Optical Transfer Function of Master Reference Displays"</title> | ||
196 | </biblioentry> | ||
197 | |||
180 | <biblioentry id="srgb"> | 198 | <biblioentry id="srgb"> |
181 | <abbrev>sRGB</abbrev> | 199 | <abbrev>sRGB</abbrev> |
182 | <authorgroup> | 200 | <authorgroup> |
diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml index a0aef85d33c1..5701a08ed792 100644 --- a/Documentation/DocBook/media/v4l/compat.xml +++ b/Documentation/DocBook/media/v4l/compat.xml | |||
@@ -2591,6 +2591,26 @@ and &v4l2-mbus-framefmt;. | |||
2591 | </orderedlist> | 2591 | </orderedlist> |
2592 | </section> | 2592 | </section> |
2593 | 2593 | ||
2594 | <section> | ||
2595 | <title>V4L2 in Linux 4.4</title> | ||
2596 | <orderedlist> | ||
2597 | <listitem> | ||
2598 | <para>Renamed <constant>V4L2_TUNER_ADC</constant> to | ||
2599 | <constant>V4L2_TUNER_SDR</constant>. The use of | ||
2600 | <constant>V4L2_TUNER_ADC</constant> is deprecated now. | ||
2601 | </para> | ||
2602 | </listitem> | ||
2603 | <listitem> | ||
2604 | <para>Added <constant>V4L2_CID_RF_TUNER_RF_GAIN</constant> | ||
2605 | RF Tuner control.</para> | ||
2606 | </listitem> | ||
2607 | <listitem> | ||
2608 | <para>Added transmitter support for Software Defined Radio (SDR) | ||
2609 | Interface.</para> | ||
2610 | </listitem> | ||
2611 | </orderedlist> | ||
2612 | </section> | ||
2613 | |||
2594 | <section id="other"> | 2614 | <section id="other"> |
2595 | <title>Relation of V4L2 to other Linux multimedia APIs</title> | 2615 | <title>Relation of V4L2 to other Linux multimedia APIs</title> |
2596 | 2616 | ||
diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index 33aece541880..f13a429093f1 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml | |||
@@ -5418,6 +5418,18 @@ set. Unit is in Hz. The range and step are driver-specific.</entry> | |||
5418 | <entry spanname="descr">Enables/disables IF automatic gain control (AGC)</entry> | 5418 | <entry spanname="descr">Enables/disables IF automatic gain control (AGC)</entry> |
5419 | </row> | 5419 | </row> |
5420 | <row> | 5420 | <row> |
5421 | <entry spanname="id"><constant>V4L2_CID_RF_TUNER_RF_GAIN</constant> </entry> | ||
5422 | <entry>integer</entry> | ||
5423 | </row> | ||
5424 | <row> | ||
5425 | <entry spanname="descr">The RF amplifier is the very first | ||
5426 | amplifier on the receiver signal path, just right after the antenna input. | ||
5427 | The difference between the LNA gain and the RF gain in this document is that | ||
5428 | the LNA gain is integrated in the tuner chip while the RF gain is a separate | ||
5429 | chip. There may be both RF and LNA gain controls in the same device. | ||
5430 | The range and step are driver-specific.</entry> | ||
5431 | </row> | ||
5432 | <row> | ||
5421 | <entry spanname="id"><constant>V4L2_CID_RF_TUNER_LNA_GAIN</constant> </entry> | 5433 | <entry spanname="id"><constant>V4L2_CID_RF_TUNER_LNA_GAIN</constant> </entry> |
5422 | <entry>integer</entry> | 5434 | <entry>integer</entry> |
5423 | </row> | 5435 | </row> |
@@ -5425,6 +5437,8 @@ set. Unit is in Hz. The range and step are driver-specific.</entry> | |||
5425 | <entry spanname="descr">LNA (low noise amplifier) gain is first | 5437 | <entry spanname="descr">LNA (low noise amplifier) gain is first |
5426 | gain stage on the RF tuner signal path. It is located very close to tuner | 5438 | gain stage on the RF tuner signal path. It is located very close to tuner |
5427 | antenna input. Used when <constant>V4L2_CID_RF_TUNER_LNA_GAIN_AUTO</constant> is not set. | 5439 | antenna input. Used when <constant>V4L2_CID_RF_TUNER_LNA_GAIN_AUTO</constant> is not set. |
5440 | See <constant>V4L2_CID_RF_TUNER_RF_GAIN</constant> to understand how RF gain | ||
5441 | and LNA gain differs from the each others. | ||
5428 | The range and step are driver-specific.</entry> | 5442 | The range and step are driver-specific.</entry> |
5429 | </row> | 5443 | </row> |
5430 | <row> | 5444 | <row> |
diff --git a/Documentation/DocBook/media/v4l/dev-sdr.xml b/Documentation/DocBook/media/v4l/dev-sdr.xml index f8903568a243..a659771f7b7c 100644 --- a/Documentation/DocBook/media/v4l/dev-sdr.xml +++ b/Documentation/DocBook/media/v4l/dev-sdr.xml | |||
@@ -28,6 +28,16 @@ Devices supporting the SDR receiver interface set the | |||
28 | <structfield>capabilities</structfield> field of &v4l2-capability; | 28 | <structfield>capabilities</structfield> field of &v4l2-capability; |
29 | returned by the &VIDIOC-QUERYCAP; ioctl. That flag means the device has an | 29 | returned by the &VIDIOC-QUERYCAP; ioctl. That flag means the device has an |
30 | Analog to Digital Converter (ADC), which is a mandatory element for the SDR receiver. | 30 | Analog to Digital Converter (ADC), which is a mandatory element for the SDR receiver. |
31 | </para> | ||
32 | <para> | ||
33 | Devices supporting the SDR transmitter interface set the | ||
34 | <constant>V4L2_CAP_SDR_OUTPUT</constant> and | ||
35 | <constant>V4L2_CAP_MODULATOR</constant> flag in the | ||
36 | <structfield>capabilities</structfield> field of &v4l2-capability; | ||
37 | returned by the &VIDIOC-QUERYCAP; ioctl. That flag means the device has an | ||
38 | Digital to Analog Converter (DAC), which is a mandatory element for the SDR transmitter. | ||
39 | </para> | ||
40 | <para> | ||
31 | At least one of the read/write, streaming or asynchronous I/O methods must | 41 | At least one of the read/write, streaming or asynchronous I/O methods must |
32 | be supported. | 42 | be supported. |
33 | </para> | 43 | </para> |
@@ -39,15 +49,16 @@ be supported. | |||
39 | <para> | 49 | <para> |
40 | SDR devices can support <link linkend="control">controls</link>, and must | 50 | SDR devices can support <link linkend="control">controls</link>, and must |
41 | support the <link linkend="tuner">tuner</link> ioctls. Tuner ioctls are used | 51 | support the <link linkend="tuner">tuner</link> ioctls. Tuner ioctls are used |
42 | for setting the ADC sampling rate (sampling frequency) and the possible RF tuner | 52 | for setting the ADC/DAC sampling rate (sampling frequency) and the possible |
43 | frequency. | 53 | radio frequency (RF). |
44 | </para> | 54 | </para> |
45 | 55 | ||
46 | <para> | 56 | <para> |
47 | The <constant>V4L2_TUNER_ADC</constant> tuner type is used for ADC tuners, and | 57 | The <constant>V4L2_TUNER_SDR</constant> tuner type is used for setting SDR |
48 | the <constant>V4L2_TUNER_RF</constant> tuner type is used for RF tuners. The | 58 | device ADC/DAC frequency, and the <constant>V4L2_TUNER_RF</constant> |
49 | tuner index of the RF tuner (if any) must always follow the ADC tuner index. | 59 | tuner type is used for setting radio frequency. |
50 | Normally the ADC tuner is #0 and the RF tuner is #1. | 60 | The tuner index of the RF tuner (if any) must always follow the SDR tuner index. |
61 | Normally the SDR tuner is #0 and the RF tuner is #1. | ||
51 | </para> | 62 | </para> |
52 | 63 | ||
53 | <para> | 64 | <para> |
@@ -59,9 +70,9 @@ The &VIDIOC-S-HW-FREQ-SEEK; ioctl is not supported. | |||
59 | <title>Data Format Negotiation</title> | 70 | <title>Data Format Negotiation</title> |
60 | 71 | ||
61 | <para> | 72 | <para> |
62 | The SDR capture device uses the <link linkend="format">format</link> ioctls to | 73 | The SDR device uses the <link linkend="format">format</link> ioctls to |
63 | select the capture format. Both the sampling resolution and the data streaming | 74 | select the capture and output format. Both the sampling resolution and the data |
64 | format are bound to that selectable format. In addition to the basic | 75 | streaming format are bound to that selectable format. In addition to the basic |
65 | <link linkend="format">format</link> ioctls, the &VIDIOC-ENUM-FMT; ioctl | 76 | <link linkend="format">format</link> ioctls, the &VIDIOC-ENUM-FMT; ioctl |
66 | must be supported as well. | 77 | must be supported as well. |
67 | </para> | 78 | </para> |
@@ -69,7 +80,8 @@ must be supported as well. | |||
69 | <para> | 80 | <para> |
70 | To use the <link linkend="format">format</link> ioctls applications set the | 81 | To use the <link linkend="format">format</link> ioctls applications set the |
71 | <structfield>type</structfield> field of a &v4l2-format; to | 82 | <structfield>type</structfield> field of a &v4l2-format; to |
72 | <constant>V4L2_BUF_TYPE_SDR_CAPTURE</constant> and use the &v4l2-sdr-format; | 83 | <constant>V4L2_BUF_TYPE_SDR_CAPTURE</constant> or |
84 | <constant>V4L2_BUF_TYPE_SDR_OUTPUT</constant> and use the &v4l2-sdr-format; | ||
73 | <structfield>sdr</structfield> member of the <structfield>fmt</structfield> | 85 | <structfield>sdr</structfield> member of the <structfield>fmt</structfield> |
74 | union as needed per the desired operation. | 86 | union as needed per the desired operation. |
75 | Currently there is two fields, <structfield>pixelformat</structfield> and | 87 | Currently there is two fields, <structfield>pixelformat</structfield> and |
diff --git a/Documentation/DocBook/media/v4l/io.xml b/Documentation/DocBook/media/v4l/io.xml index 7bbc2a48911e..da654031ef3f 100644 --- a/Documentation/DocBook/media/v4l/io.xml +++ b/Documentation/DocBook/media/v4l/io.xml | |||
@@ -1006,8 +1006,14 @@ must set this to 0.</entry> | |||
1006 | <row> | 1006 | <row> |
1007 | <entry><constant>V4L2_BUF_TYPE_SDR_CAPTURE</constant></entry> | 1007 | <entry><constant>V4L2_BUF_TYPE_SDR_CAPTURE</constant></entry> |
1008 | <entry>11</entry> | 1008 | <entry>11</entry> |
1009 | <entry>Buffer for Software Defined Radio (SDR), see <xref | 1009 | <entry>Buffer for Software Defined Radio (SDR) capture stream, see |
1010 | linkend="sdr" />.</entry> | 1010 | <xref linkend="sdr" />.</entry> |
1011 | </row> | ||
1012 | <row> | ||
1013 | <entry><constant>V4L2_BUF_TYPE_SDR_OUTPUT</constant></entry> | ||
1014 | <entry>12</entry> | ||
1015 | <entry>Buffer for Software Defined Radio (SDR) output stream, see | ||
1016 | <xref linkend="sdr" />.</entry> | ||
1011 | </row> | 1017 | </row> |
1012 | </tbody> | 1018 | </tbody> |
1013 | </tgroup> | 1019 | </tgroup> |
diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml index 965ea916784a..d871245d2973 100644 --- a/Documentation/DocBook/media/v4l/pixfmt.xml +++ b/Documentation/DocBook/media/v4l/pixfmt.xml | |||
@@ -540,6 +540,10 @@ colorspaces except for BT.2020 which uses limited range R'G'B' quantization.</pa | |||
540 | <entry>See <xref linkend="col-bt2020" />.</entry> | 540 | <entry>See <xref linkend="col-bt2020" />.</entry> |
541 | </row> | 541 | </row> |
542 | <row> | 542 | <row> |
543 | <entry><constant>V4L2_COLORSPACE_DCI_P3</constant></entry> | ||
544 | <entry>See <xref linkend="col-dcip3" />.</entry> | ||
545 | </row> | ||
546 | <row> | ||
543 | <entry><constant>V4L2_COLORSPACE_SMPTE240M</constant></entry> | 547 | <entry><constant>V4L2_COLORSPACE_SMPTE240M</constant></entry> |
544 | <entry>See <xref linkend="col-smpte-240m" />.</entry> | 548 | <entry>See <xref linkend="col-smpte-240m" />.</entry> |
545 | </row> | 549 | </row> |
@@ -601,6 +605,14 @@ colorspaces except for BT.2020 which uses limited range R'G'B' quantization.</pa | |||
601 | <entry><constant>V4L2_XFER_FUNC_NONE</constant></entry> | 605 | <entry><constant>V4L2_XFER_FUNC_NONE</constant></entry> |
602 | <entry>Do not use a transfer function (i.e. use linear RGB values).</entry> | 606 | <entry>Do not use a transfer function (i.e. use linear RGB values).</entry> |
603 | </row> | 607 | </row> |
608 | <row> | ||
609 | <entry><constant>V4L2_XFER_FUNC_DCI_P3</constant></entry> | ||
610 | <entry>Use the DCI-P3 transfer function.</entry> | ||
611 | </row> | ||
612 | <row> | ||
613 | <entry><constant>V4L2_XFER_FUNC_SMPTE2084</constant></entry> | ||
614 | <entry>Use the SMPTE 2084 transfer function.</entry> | ||
615 | </row> | ||
604 | </tbody> | 616 | </tbody> |
605 | </tgroup> | 617 | </tgroup> |
606 | </table> | 618 | </table> |
@@ -1154,6 +1166,68 @@ clamped to the range [-0.5…0.5]. The Y'CbCr quantization is limited range | |||
1154 | clamped to the range [-0.5…0.5]. The Yc'CbcCrc quantization is limited range.</para> | 1166 | clamped to the range [-0.5…0.5]. The Yc'CbcCrc quantization is limited range.</para> |
1155 | </section> | 1167 | </section> |
1156 | 1168 | ||
1169 | <section id="col-dcip3"> | ||
1170 | <title>Colorspace DCI-P3 (<constant>V4L2_COLORSPACE_DCI_P3</constant>)</title> | ||
1171 | <para>The <xref linkend="smpte431" /> standard defines the colorspace used by cinema | ||
1172 | projectors that use the DCI-P3 colorspace. | ||
1173 | The default transfer function is <constant>V4L2_XFER_FUNC_DCI_P3</constant>. | ||
1174 | The default Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_709</constant>. Note that this | ||
1175 | colorspace does not specify a Y'CbCr encoding since it is not meant to be encoded | ||
1176 | to Y'CbCr. So this default Y'CbCr encoding was picked because it is the HDTV | ||
1177 | encoding. The default Y'CbCr quantization is limited range. The chromaticities of | ||
1178 | the primary colors and the white reference are:</para> | ||
1179 | <table frame="none"> | ||
1180 | <title>DCI-P3 Chromaticities</title> | ||
1181 | <tgroup cols="3" align="left"> | ||
1182 | &cs-str; | ||
1183 | <thead> | ||
1184 | <row> | ||
1185 | <entry>Color</entry> | ||
1186 | <entry>x</entry> | ||
1187 | <entry>y</entry> | ||
1188 | </row> | ||
1189 | </thead> | ||
1190 | <tbody valign="top"> | ||
1191 | <row> | ||
1192 | <entry>Red</entry> | ||
1193 | <entry>0.6800</entry> | ||
1194 | <entry>0.3200</entry> | ||
1195 | </row> | ||
1196 | <row> | ||
1197 | <entry>Green</entry> | ||
1198 | <entry>0.2650</entry> | ||
1199 | <entry>0.6900</entry> | ||
1200 | </row> | ||
1201 | <row> | ||
1202 | <entry>Blue</entry> | ||
1203 | <entry>0.1500</entry> | ||
1204 | <entry>0.0600</entry> | ||
1205 | </row> | ||
1206 | <row> | ||
1207 | <entry>White Reference</entry> | ||
1208 | <entry>0.3140</entry> | ||
1209 | <entry>0.3510</entry> | ||
1210 | </row> | ||
1211 | </tbody> | ||
1212 | </tgroup> | ||
1213 | </table> | ||
1214 | <variablelist> | ||
1215 | <varlistentry> | ||
1216 | <term>Transfer function:</term> | ||
1217 | <listitem> | ||
1218 | <para>L' = L<superscript>1/2.6</superscript></para> | ||
1219 | </listitem> | ||
1220 | </varlistentry> | ||
1221 | <varlistentry> | ||
1222 | <term>Inverse Transfer function:</term> | ||
1223 | <listitem> | ||
1224 | <para>L = L'<superscript>2.6</superscript></para> | ||
1225 | </listitem> | ||
1226 | </varlistentry> | ||
1227 | </variablelist> | ||
1228 | <para>Y'CbCr encoding is not specified. V4L2 defaults to Rec. 709.</para> | ||
1229 | </section> | ||
1230 | |||
1157 | <section id="col-smpte-240m"> | 1231 | <section id="col-smpte-240m"> |
1158 | <title>Colorspace SMPTE 240M (<constant>V4L2_COLORSPACE_SMPTE240M</constant>)</title> | 1232 | <title>Colorspace SMPTE 240M (<constant>V4L2_COLORSPACE_SMPTE240M</constant>)</title> |
1159 | <para>The <xref linkend="smpte240m" /> standard was an interim standard used during | 1233 | <para>The <xref linkend="smpte240m" /> standard was an interim standard used during |
@@ -1402,6 +1476,41 @@ and <constant>V4L2_QUANTIZATION_FULL_RANGE</constant>.</para> | |||
1402 | 1476 | ||
1403 | </section> | 1477 | </section> |
1404 | 1478 | ||
1479 | <section> | ||
1480 | <title>Detailed Transfer Function Descriptions</title> | ||
1481 | <section id="xf-smpte-2084"> | ||
1482 | <title>Transfer Function SMPTE 2084 (<constant>V4L2_XFER_FUNC_SMPTE2084</constant>)</title> | ||
1483 | <para>The <xref linkend="smpte2084" /> standard defines the transfer function used by | ||
1484 | High Dynamic Range content.</para> | ||
1485 | <variablelist> | ||
1486 | <varlistentry> | ||
1487 | <term>Constants:</term> | ||
1488 | <listitem> | ||
1489 | <para>m1 = (2610 / 4096) / 4</para> | ||
1490 | <para>m2 = (2523 / 4096) * 128</para> | ||
1491 | <para>c1 = 3424 / 4096</para> | ||
1492 | <para>c2 = (2413 / 4096) * 32</para> | ||
1493 | <para>c3 = (2392 / 4096) * 32</para> | ||
1494 | </listitem> | ||
1495 | </varlistentry> | ||
1496 | <varlistentry> | ||
1497 | <term>Transfer function:</term> | ||
1498 | <listitem> | ||
1499 | <para>L' = ((c1 + c2 * L<superscript>m1</superscript>) / (1 + c3 * L<superscript>m1</superscript>))<superscript>m2</superscript></para> | ||
1500 | </listitem> | ||
1501 | </varlistentry> | ||
1502 | </variablelist> | ||
1503 | <variablelist> | ||
1504 | <varlistentry> | ||
1505 | <term>Inverse Transfer function:</term> | ||
1506 | <listitem> | ||
1507 | <para>L = (max(L'<superscript>1/m2</superscript> - c1, 0) / (c2 - c3 * L'<superscript>1/m2</superscript>))<superscript>1/m1</superscript></para> | ||
1508 | </listitem> | ||
1509 | </varlistentry> | ||
1510 | </variablelist> | ||
1511 | </section> | ||
1512 | </section> | ||
1513 | |||
1405 | <section id="pixfmt-indexed"> | 1514 | <section id="pixfmt-indexed"> |
1406 | <title>Indexed Format</title> | 1515 | <title>Indexed Format</title> |
1407 | 1516 | ||
@@ -1623,7 +1732,7 @@ extended control <constant>V4L2_CID_MPEG_STREAM_TYPE</constant>, see | |||
1623 | <section id="sdr-formats"> | 1732 | <section id="sdr-formats"> |
1624 | <title>SDR Formats</title> | 1733 | <title>SDR Formats</title> |
1625 | 1734 | ||
1626 | <para>These formats are used for <link linkend="sdr">SDR Capture</link> | 1735 | <para>These formats are used for <link linkend="sdr">SDR</link> |
1627 | interface only.</para> | 1736 | interface only.</para> |
1628 | 1737 | ||
1629 | &sub-sdr-cu08; | 1738 | &sub-sdr-cu08; |
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml index e98caa1c39bd..7e61643358de 100644 --- a/Documentation/DocBook/media/v4l/v4l2.xml +++ b/Documentation/DocBook/media/v4l/v4l2.xml | |||
@@ -151,9 +151,18 @@ Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab, | |||
151 | structs, ioctls) must be noted in more detail in the history chapter | 151 | structs, ioctls) must be noted in more detail in the history chapter |
152 | (compat.xml), along with the possible impact on existing drivers and | 152 | (compat.xml), along with the possible impact on existing drivers and |
153 | applications. --> | 153 | applications. --> |
154 | <revision> | ||
155 | <revnumber>4.4</revnumber> | ||
156 | <date>2015-05-26</date> | ||
157 | <authorinitials>ap</authorinitials> | ||
158 | <revremark>Renamed V4L2_TUNER_ADC to V4L2_TUNER_SDR. | ||
159 | Added V4L2_CID_RF_TUNER_RF_GAIN control. | ||
160 | Added transmitter support for Software Defined Radio (SDR) Interface. | ||
161 | </revremark> | ||
162 | </revision> | ||
154 | 163 | ||
155 | <revision> | 164 | <revision> |
156 | <revnumber>3.21</revnumber> | 165 | <revnumber>4.1</revnumber> |
157 | <date>2015-02-13</date> | 166 | <date>2015-02-13</date> |
158 | <authorinitials>mcc</authorinitials> | 167 | <authorinitials>mcc</authorinitials> |
159 | <revremark>Fix documentation for media controller device nodes and add support for DVB device nodes. | 168 | <revremark>Fix documentation for media controller device nodes and add support for DVB device nodes. |
@@ -557,7 +566,7 @@ and discussions on the V4L mailing list.</revremark> | |||
557 | </partinfo> | 566 | </partinfo> |
558 | 567 | ||
559 | <title>Video for Linux Two API Specification</title> | 568 | <title>Video for Linux Two API Specification</title> |
560 | <subtitle>Revision 3.19</subtitle> | 569 | <subtitle>Revision 4.4</subtitle> |
561 | 570 | ||
562 | <chapter id="common"> | 571 | <chapter id="common"> |
563 | &sub-common; | 572 | &sub-common; |
diff --git a/Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml b/Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml index fc1d4625a78c..70a4a08e9404 100644 --- a/Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml +++ b/Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml | |||
@@ -130,7 +130,7 @@ encoding will continue until the end of the current <wordasword>Group | |||
130 | Of Pictures</wordasword>, otherwise encoding will stop immediately. | 130 | Of Pictures</wordasword>, otherwise encoding will stop immediately. |
131 | When the encoder is already stopped, this command does | 131 | When the encoder is already stopped, this command does |
132 | nothing. mem2mem encoders will send a <constant>V4L2_EVENT_EOS</constant> event | 132 | nothing. mem2mem encoders will send a <constant>V4L2_EVENT_EOS</constant> event |
133 | when the last frame has been decoded and all frames are ready to be dequeued and | 133 | when the last frame has been encoded and all frames are ready to be dequeued and |
134 | will set the <constant>V4L2_BUF_FLAG_LAST</constant> buffer flag on the last | 134 | will set the <constant>V4L2_BUF_FLAG_LAST</constant> buffer flag on the last |
135 | buffer of the capture queue to indicate there will be no new buffers produced to | 135 | buffer of the capture queue to indicate there will be no new buffers produced to |
136 | dequeue. This buffer may be empty, indicated by the driver setting the | 136 | dequeue. This buffer may be empty, indicated by the driver setting the |
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml index c5bdbfcc42b3..842536aae8b4 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml | |||
@@ -200,6 +200,13 @@ Valid if this control is of type <constant>V4L2_CTRL_TYPE_U16</constant>.</entry | |||
200 | </row> | 200 | </row> |
201 | <row> | 201 | <row> |
202 | <entry></entry> | 202 | <entry></entry> |
203 | <entry>__u32 *</entry> | ||
204 | <entry><structfield>p_u32</structfield></entry> | ||
205 | <entry>A pointer to a matrix control of unsigned 32-bit values. | ||
206 | Valid if this control is of type <constant>V4L2_CTRL_TYPE_U32</constant>.</entry> | ||
207 | </row> | ||
208 | <row> | ||
209 | <entry></entry> | ||
203 | <entry>void *</entry> | 210 | <entry>void *</entry> |
204 | <entry><structfield>ptr</structfield></entry> | 211 | <entry><structfield>ptr</structfield></entry> |
205 | <entry>A pointer to a compound type which can be an N-dimensional array and/or a | 212 | <entry>A pointer to a compound type which can be an N-dimensional array and/or a |
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-fmt.xml b/Documentation/DocBook/media/v4l/vidioc-g-fmt.xml index 4fe19a7a9a31..ffcb448251f0 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-fmt.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-fmt.xml | |||
@@ -175,7 +175,7 @@ capture and output devices.</entry> | |||
175 | <entry>&v4l2-sdr-format;</entry> | 175 | <entry>&v4l2-sdr-format;</entry> |
176 | <entry><structfield>sdr</structfield></entry> | 176 | <entry><structfield>sdr</structfield></entry> |
177 | <entry>Definition of a data format, see | 177 | <entry>Definition of a data format, see |
178 | <xref linkend="pixfmt" />, used by SDR capture devices.</entry> | 178 | <xref linkend="pixfmt" />, used by SDR capture and output devices.</entry> |
179 | </row> | 179 | </row> |
180 | <row> | 180 | <row> |
181 | <entry></entry> | 181 | <entry></entry> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-modulator.xml b/Documentation/DocBook/media/v4l/vidioc-g-modulator.xml index 7068b599a00d..96e17b344c5d 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-modulator.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-modulator.xml | |||
@@ -78,6 +78,12 @@ different audio modulation if the request cannot be satisfied. However | |||
78 | this is a write-only ioctl, it does not return the actual audio | 78 | this is a write-only ioctl, it does not return the actual audio |
79 | modulation selected.</para> | 79 | modulation selected.</para> |
80 | 80 | ||
81 | <para><link linkend="sdr">SDR</link> specific modulator types are | ||
82 | <constant>V4L2_TUNER_SDR</constant> and <constant>V4L2_TUNER_RF</constant>. | ||
83 | For SDR devices <structfield>txsubchans</structfield> field must be | ||
84 | initialized to zero. | ||
85 | The term 'modulator' means SDR transmitter in this context.</para> | ||
86 | |||
81 | <para>To change the radio frequency the &VIDIOC-S-FREQUENCY; ioctl | 87 | <para>To change the radio frequency the &VIDIOC-S-FREQUENCY; ioctl |
82 | is available.</para> | 88 | is available.</para> |
83 | 89 | ||
@@ -140,7 +146,13 @@ indicator, for example a stereo pilot tone.</entry> | |||
140 | </row> | 146 | </row> |
141 | <row> | 147 | <row> |
142 | <entry>__u32</entry> | 148 | <entry>__u32</entry> |
143 | <entry><structfield>reserved</structfield>[4]</entry> | 149 | <entry><structfield>type</structfield></entry> |
150 | <entry spanname="hspan">Type of the modulator, see <xref | ||
151 | linkend="v4l2-tuner-type" />.</entry> | ||
152 | </row> | ||
153 | <row> | ||
154 | <entry>__u32</entry> | ||
155 | <entry><structfield>reserved</structfield>[3]</entry> | ||
144 | <entry>Reserved for future extensions. Drivers and | 156 | <entry>Reserved for future extensions. Drivers and |
145 | applications must set the array to zero.</entry> | 157 | applications must set the array to zero.</entry> |
146 | </row> | 158 | </row> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml b/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml index b0d865933da6..459b7e561f3c 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml | |||
@@ -80,6 +80,12 @@ if the requested mode is invalid or unsupported. Since this is a | |||
80 | <!-- FIXME -->write-only ioctl, it does not return the actually | 80 | <!-- FIXME -->write-only ioctl, it does not return the actually |
81 | selected audio mode.</para> | 81 | selected audio mode.</para> |
82 | 82 | ||
83 | <para><link linkend="sdr">SDR</link> specific tuner types are | ||
84 | <constant>V4L2_TUNER_SDR</constant> and <constant>V4L2_TUNER_RF</constant>. | ||
85 | For SDR devices <structfield>audmode</structfield> field must be | ||
86 | initialized to zero. | ||
87 | The term 'tuner' means SDR receiver in this context.</para> | ||
88 | |||
83 | <para>To change the radio frequency the &VIDIOC-S-FREQUENCY; ioctl | 89 | <para>To change the radio frequency the &VIDIOC-S-FREQUENCY; ioctl |
84 | is available.</para> | 90 | is available.</para> |
85 | 91 | ||
@@ -261,6 +267,16 @@ applications must set the array to zero.</entry> | |||
261 | <entry>2</entry> | 267 | <entry>2</entry> |
262 | <entry></entry> | 268 | <entry></entry> |
263 | </row> | 269 | </row> |
270 | <row> | ||
271 | <entry><constant>V4L2_TUNER_SDR</constant></entry> | ||
272 | <entry>4</entry> | ||
273 | <entry></entry> | ||
274 | </row> | ||
275 | <row> | ||
276 | <entry><constant>V4L2_TUNER_RF</constant></entry> | ||
277 | <entry>5</entry> | ||
278 | <entry></entry> | ||
279 | </row> | ||
264 | </tbody> | 280 | </tbody> |
265 | </tgroup> | 281 | </tgroup> |
266 | </table> | 282 | </table> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-querycap.xml b/Documentation/DocBook/media/v4l/vidioc-querycap.xml index 20fda75a012d..cd82148dedd7 100644 --- a/Documentation/DocBook/media/v4l/vidioc-querycap.xml +++ b/Documentation/DocBook/media/v4l/vidioc-querycap.xml | |||
@@ -308,6 +308,12 @@ modulator programming see | |||
308 | fields.</entry> | 308 | fields.</entry> |
309 | </row> | 309 | </row> |
310 | <row> | 310 | <row> |
311 | <entry><constant>V4L2_CAP_SDR_OUTPUT</constant></entry> | ||
312 | <entry>0x00400000</entry> | ||
313 | <entry>The device supports the | ||
314 | <link linkend="sdr">SDR Output</link> interface.</entry> | ||
315 | </row> | ||
316 | <row> | ||
311 | <entry><constant>V4L2_CAP_READWRITE</constant></entry> | 317 | <entry><constant>V4L2_CAP_READWRITE</constant></entry> |
312 | <entry>0x01000000</entry> | 318 | <entry>0x01000000</entry> |
313 | <entry>The device supports the <link | 319 | <entry>The device supports the <link |
diff --git a/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml b/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml index 6ec39c698baf..55b7582cf314 100644 --- a/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml +++ b/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml | |||
@@ -101,8 +101,9 @@ prematurely end the enumeration).</para></footnote></para> | |||
101 | next supported non-compound control, or <errorcode>EINVAL</errorcode> | 101 | next supported non-compound control, or <errorcode>EINVAL</errorcode> |
102 | if there is none. In addition, the <constant>V4L2_CTRL_FLAG_NEXT_COMPOUND</constant> | 102 | if there is none. In addition, the <constant>V4L2_CTRL_FLAG_NEXT_COMPOUND</constant> |
103 | flag can be specified to enumerate all compound controls (i.e. controls | 103 | flag can be specified to enumerate all compound controls (i.e. controls |
104 | with type ≥ <constant>V4L2_CTRL_COMPOUND_TYPES</constant>). Specify both | 104 | with type ≥ <constant>V4L2_CTRL_COMPOUND_TYPES</constant> and/or array |
105 | <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant> and | 105 | control, in other words controls that contain more than one value). |
106 | Specify both <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant> and | ||
106 | <constant>V4L2_CTRL_FLAG_NEXT_COMPOUND</constant> in order to enumerate | 107 | <constant>V4L2_CTRL_FLAG_NEXT_COMPOUND</constant> in order to enumerate |
107 | all controls, compound or not. Drivers which do not support these flags yet | 108 | all controls, compound or not. Drivers which do not support these flags yet |
108 | always return <errorcode>EINVAL</errorcode>.</para> | 109 | always return <errorcode>EINVAL</errorcode>.</para> |
@@ -422,7 +423,7 @@ the array to zero.</entry> | |||
422 | <entry>any</entry> | 423 | <entry>any</entry> |
423 | <entry>An integer-valued control ranging from minimum to | 424 | <entry>An integer-valued control ranging from minimum to |
424 | maximum inclusive. The step value indicates the increment between | 425 | maximum inclusive. The step value indicates the increment between |
425 | values which are actually different on the hardware.</entry> | 426 | values.</entry> |
426 | </row> | 427 | </row> |
427 | <row> | 428 | <row> |
428 | <entry><constant>V4L2_CTRL_TYPE_BOOLEAN</constant></entry> | 429 | <entry><constant>V4L2_CTRL_TYPE_BOOLEAN</constant></entry> |
@@ -518,7 +519,7 @@ Older drivers which do not support this feature return an | |||
518 | <entry>any</entry> | 519 | <entry>any</entry> |
519 | <entry>An unsigned 8-bit valued control ranging from minimum to | 520 | <entry>An unsigned 8-bit valued control ranging from minimum to |
520 | maximum inclusive. The step value indicates the increment between | 521 | maximum inclusive. The step value indicates the increment between |
521 | values which are actually different on the hardware. | 522 | values. |
522 | </entry> | 523 | </entry> |
523 | </row> | 524 | </row> |
524 | <row> | 525 | <row> |
@@ -528,7 +529,17 @@ values which are actually different on the hardware. | |||
528 | <entry>any</entry> | 529 | <entry>any</entry> |
529 | <entry>An unsigned 16-bit valued control ranging from minimum to | 530 | <entry>An unsigned 16-bit valued control ranging from minimum to |
530 | maximum inclusive. The step value indicates the increment between | 531 | maximum inclusive. The step value indicates the increment between |
531 | values which are actually different on the hardware. | 532 | values. |
533 | </entry> | ||
534 | </row> | ||
535 | <row> | ||
536 | <entry><constant>V4L2_CTRL_TYPE_U32</constant></entry> | ||
537 | <entry>any</entry> | ||
538 | <entry>any</entry> | ||
539 | <entry>any</entry> | ||
540 | <entry>An unsigned 32-bit valued control ranging from minimum to | ||
541 | maximum inclusive. The step value indicates the increment between | ||
542 | values. | ||
532 | </entry> | 543 | </entry> |
533 | </row> | 544 | </row> |
534 | </tbody> | 545 | </tbody> |
diff --git a/Documentation/DocBook/media_api.tmpl b/Documentation/DocBook/media_api.tmpl index f3f5fe5b64c9..92037033f5eb 100644 --- a/Documentation/DocBook/media_api.tmpl +++ b/Documentation/DocBook/media_api.tmpl | |||
@@ -38,7 +38,7 @@ | |||
38 | <title>LINUX MEDIA INFRASTRUCTURE API</title> | 38 | <title>LINUX MEDIA INFRASTRUCTURE API</title> |
39 | 39 | ||
40 | <copyright> | 40 | <copyright> |
41 | <year>2009-2014</year> | 41 | <year>2009-2015</year> |
42 | <holder>LinuxTV Developers</holder> | 42 | <holder>LinuxTV Developers</holder> |
43 | </copyright> | 43 | </copyright> |
44 | 44 | ||
diff --git a/Documentation/DocBook/writing-an-alsa-driver.tmpl b/Documentation/DocBook/writing-an-alsa-driver.tmpl index 84ef6a90131c..a27ab9f53fb6 100644 --- a/Documentation/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/DocBook/writing-an-alsa-driver.tmpl | |||
@@ -2181,10 +2181,6 @@ struct _snd_pcm_runtime { | |||
2181 | struct snd_pcm_hardware hw; | 2181 | struct snd_pcm_hardware hw; |
2182 | struct snd_pcm_hw_constraints hw_constraints; | 2182 | struct snd_pcm_hw_constraints hw_constraints; |
2183 | 2183 | ||
2184 | /* -- interrupt callbacks -- */ | ||
2185 | void (*transfer_ack_begin)(struct snd_pcm_substream *substream); | ||
2186 | void (*transfer_ack_end)(struct snd_pcm_substream *substream); | ||
2187 | |||
2188 | /* -- timer -- */ | 2184 | /* -- timer -- */ |
2189 | unsigned int timer_resolution; /* timer resolution */ | 2185 | unsigned int timer_resolution; /* timer resolution */ |
2190 | 2186 | ||
@@ -2209,9 +2205,8 @@ struct _snd_pcm_runtime { | |||
2209 | For the operators (callbacks) of each sound driver, most of | 2205 | For the operators (callbacks) of each sound driver, most of |
2210 | these records are supposed to be read-only. Only the PCM | 2206 | these records are supposed to be read-only. Only the PCM |
2211 | middle-layer changes / updates them. The exceptions are | 2207 | middle-layer changes / updates them. The exceptions are |
2212 | the hardware description (hw), interrupt callbacks | 2208 | the hardware description (hw) DMA buffer information and the |
2213 | (transfer_ack_xxx), DMA buffer information, and the private | 2209 | private data. Besides, if you use the standard buffer allocation |
2214 | data. Besides, if you use the standard buffer allocation | ||
2215 | method via <function>snd_pcm_lib_malloc_pages()</function>, | 2210 | method via <function>snd_pcm_lib_malloc_pages()</function>, |
2216 | you don't need to set the DMA buffer information by yourself. | 2211 | you don't need to set the DMA buffer information by yourself. |
2217 | </para> | 2212 | </para> |
@@ -2538,16 +2533,6 @@ struct _snd_pcm_runtime { | |||
2538 | </para> | 2533 | </para> |
2539 | </section> | 2534 | </section> |
2540 | 2535 | ||
2541 | <section id="pcm-interface-runtime-intr"> | ||
2542 | <title>Interrupt Callbacks</title> | ||
2543 | <para> | ||
2544 | The field <structfield>transfer_ack_begin</structfield> and | ||
2545 | <structfield>transfer_ack_end</structfield> are called at | ||
2546 | the beginning and at the end of | ||
2547 | <function>snd_pcm_period_elapsed()</function>, respectively. | ||
2548 | </para> | ||
2549 | </section> | ||
2550 | |||
2551 | </section> | 2536 | </section> |
2552 | 2537 | ||
2553 | <section id="pcm-interface-operators"> | 2538 | <section id="pcm-interface-operators"> |
diff --git a/Documentation/IRQ-domain.txt b/Documentation/IRQ-domain.txt index 3a8e15cba816..8d990bde8693 100644 --- a/Documentation/IRQ-domain.txt +++ b/Documentation/IRQ-domain.txt | |||
@@ -32,9 +32,9 @@ top of the irq_alloc_desc*() API. An irq_domain to manage mapping is | |||
32 | preferred over interrupt controller drivers open coding their own | 32 | preferred over interrupt controller drivers open coding their own |
33 | reverse mapping scheme. | 33 | reverse mapping scheme. |
34 | 34 | ||
35 | irq_domain also implements translation from Device Tree interrupt | 35 | irq_domain also implements translation from an abstract irq_fwspec |
36 | specifiers to hwirq numbers, and can be easily extended to support | 36 | structure to hwirq numbers (Device Tree and ACPI GSI so far), and can |
37 | other IRQ topology data sources. | 37 | be easily extended to support other IRQ topology data sources. |
38 | 38 | ||
39 | === irq_domain usage === | 39 | === irq_domain usage === |
40 | An interrupt controller driver creates and registers an irq_domain by | 40 | An interrupt controller driver creates and registers an irq_domain by |
@@ -184,7 +184,7 @@ There are four major interfaces to use hierarchy irq_domain: | |||
184 | related resources associated with these interrupts. | 184 | related resources associated with these interrupts. |
185 | 3) irq_domain_activate_irq(): activate interrupt controller hardware to | 185 | 3) irq_domain_activate_irq(): activate interrupt controller hardware to |
186 | deliver the interrupt. | 186 | deliver the interrupt. |
187 | 3) irq_domain_deactivate_irq(): deactivate interrupt controller hardware | 187 | 4) irq_domain_deactivate_irq(): deactivate interrupt controller hardware |
188 | to stop delivering the interrupt. | 188 | to stop delivering the interrupt. |
189 | 189 | ||
190 | Following changes are needed to support hierarchy irq_domain. | 190 | Following changes are needed to support hierarchy irq_domain. |
diff --git a/Documentation/RCU/stallwarn.txt b/Documentation/RCU/stallwarn.txt index efb9454875ab..0f7fb4298e7e 100644 --- a/Documentation/RCU/stallwarn.txt +++ b/Documentation/RCU/stallwarn.txt | |||
@@ -205,6 +205,13 @@ o For !CONFIG_PREEMPT kernels, a CPU looping anywhere in the | |||
205 | behavior, you might need to replace some of the cond_resched() | 205 | behavior, you might need to replace some of the cond_resched() |
206 | calls with calls to cond_resched_rcu_qs(). | 206 | calls with calls to cond_resched_rcu_qs(). |
207 | 207 | ||
208 | o Booting Linux using a console connection that is too slow to | ||
209 | keep up with the boot-time console-message rate. For example, | ||
210 | a 115Kbaud serial console can be -way- too slow to keep up | ||
211 | with boot-time message rates, and will frequently result in | ||
212 | RCU CPU stall warning messages. Especially if you have added | ||
213 | debug printk()s. | ||
214 | |||
208 | o Anything that prevents RCU's grace-period kthreads from running. | 215 | o Anything that prevents RCU's grace-period kthreads from running. |
209 | This can result in the "All QSes seen" console-log message. | 216 | This can result in the "All QSes seen" console-log message. |
210 | This message will include information on when the kthread last | 217 | This message will include information on when the kthread last |
diff --git a/Documentation/RCU/torture.txt b/Documentation/RCU/torture.txt index dac02a6219b1..118e7c176ce7 100644 --- a/Documentation/RCU/torture.txt +++ b/Documentation/RCU/torture.txt | |||
@@ -166,40 +166,27 @@ test_no_idle_hz Whether or not to test the ability of RCU to operate in | |||
166 | 166 | ||
167 | torture_type The type of RCU to test, with string values as follows: | 167 | torture_type The type of RCU to test, with string values as follows: |
168 | 168 | ||
169 | "rcu": rcu_read_lock(), rcu_read_unlock() and call_rcu(). | 169 | "rcu": rcu_read_lock(), rcu_read_unlock() and call_rcu(), |
170 | 170 | along with expedited, synchronous, and polling | |
171 | "rcu_sync": rcu_read_lock(), rcu_read_unlock(), and | 171 | variants. |
172 | synchronize_rcu(). | ||
173 | |||
174 | "rcu_expedited": rcu_read_lock(), rcu_read_unlock(), and | ||
175 | synchronize_rcu_expedited(). | ||
176 | 172 | ||
177 | "rcu_bh": rcu_read_lock_bh(), rcu_read_unlock_bh(), and | 173 | "rcu_bh": rcu_read_lock_bh(), rcu_read_unlock_bh(), and |
178 | call_rcu_bh(). | 174 | call_rcu_bh(), along with expedited and synchronous |
179 | 175 | variants. | |
180 | "rcu_bh_sync": rcu_read_lock_bh(), rcu_read_unlock_bh(), | ||
181 | and synchronize_rcu_bh(). | ||
182 | 176 | ||
183 | "rcu_bh_expedited": rcu_read_lock_bh(), rcu_read_unlock_bh(), | 177 | "rcu_busted": This tests an intentionally incorrect version |
184 | and synchronize_rcu_bh_expedited(). | 178 | of RCU in order to help test rcutorture itself. |
185 | 179 | ||
186 | "srcu": srcu_read_lock(), srcu_read_unlock() and | 180 | "srcu": srcu_read_lock(), srcu_read_unlock() and |
187 | call_srcu(). | 181 | call_srcu(), along with expedited and |
188 | 182 | synchronous variants. | |
189 | "srcu_sync": srcu_read_lock(), srcu_read_unlock() and | ||
190 | synchronize_srcu(). | ||
191 | |||
192 | "srcu_expedited": srcu_read_lock(), srcu_read_unlock() and | ||
193 | synchronize_srcu_expedited(). | ||
194 | 183 | ||
195 | "sched": preempt_disable(), preempt_enable(), and | 184 | "sched": preempt_disable(), preempt_enable(), and |
196 | call_rcu_sched(). | 185 | call_rcu_sched(), along with expedited, |
197 | 186 | synchronous, and polling variants. | |
198 | "sched_sync": preempt_disable(), preempt_enable(), and | ||
199 | synchronize_sched(). | ||
200 | 187 | ||
201 | "sched_expedited": preempt_disable(), preempt_enable(), and | 188 | "tasks": voluntary context switch and call_rcu_tasks(), |
202 | synchronize_sched_expedited(). | 189 | along with expedited and synchronous variants. |
203 | 190 | ||
204 | Defaults to "rcu". | 191 | Defaults to "rcu". |
205 | 192 | ||
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt index 97f17e9decda..ec6998b1b6d0 100644 --- a/Documentation/RCU/trace.txt +++ b/Documentation/RCU/trace.txt | |||
@@ -56,14 +56,14 @@ rcuboost: | |||
56 | 56 | ||
57 | The output of "cat rcu/rcu_preempt/rcudata" looks as follows: | 57 | The output of "cat rcu/rcu_preempt/rcudata" looks as follows: |
58 | 58 | ||
59 | 0!c=30455 g=30456 pq=1/0 qp=1 dt=126535/140000000000000/0 df=2002 of=4 ql=0/0 qs=N... b=10 ci=74572 nci=0 co=1131 ca=716 | 59 | 0!c=30455 g=30456 cnq=1/0:1 dt=126535/140000000000000/0 df=2002 of=4 ql=0/0 qs=N... b=10 ci=74572 nci=0 co=1131 ca=716 |
60 | 1!c=30719 g=30720 pq=1/0 qp=0 dt=132007/140000000000000/0 df=1874 of=10 ql=0/0 qs=N... b=10 ci=123209 nci=0 co=685 ca=982 | 60 | 1!c=30719 g=30720 cnq=1/0:0 dt=132007/140000000000000/0 df=1874 of=10 ql=0/0 qs=N... b=10 ci=123209 nci=0 co=685 ca=982 |
61 | 2!c=30150 g=30151 pq=1/1 qp=1 dt=138537/140000000000000/0 df=1707 of=8 ql=0/0 qs=N... b=10 ci=80132 nci=0 co=1328 ca=1458 | 61 | 2!c=30150 g=30151 cnq=1/1:1 dt=138537/140000000000000/0 df=1707 of=8 ql=0/0 qs=N... b=10 ci=80132 nci=0 co=1328 ca=1458 |
62 | 3 c=31249 g=31250 pq=1/1 qp=0 dt=107255/140000000000000/0 df=1749 of=6 ql=0/450 qs=NRW. b=10 ci=151700 nci=0 co=509 ca=622 | 62 | 3 c=31249 g=31250 cnq=1/1:0 dt=107255/140000000000000/0 df=1749 of=6 ql=0/450 qs=NRW. b=10 ci=151700 nci=0 co=509 ca=622 |
63 | 4!c=29502 g=29503 pq=1/0 qp=1 dt=83647/140000000000000/0 df=965 of=5 ql=0/0 qs=N... b=10 ci=65643 nci=0 co=1373 ca=1521 | 63 | 4!c=29502 g=29503 cnq=1/0:1 dt=83647/140000000000000/0 df=965 of=5 ql=0/0 qs=N... b=10 ci=65643 nci=0 co=1373 ca=1521 |
64 | 5 c=31201 g=31202 pq=1/0 qp=1 dt=70422/0/0 df=535 of=7 ql=0/0 qs=.... b=10 ci=58500 nci=0 co=764 ca=698 | 64 | 5 c=31201 g=31202 cnq=1/0:1 dt=70422/0/0 df=535 of=7 ql=0/0 qs=.... b=10 ci=58500 nci=0 co=764 ca=698 |
65 | 6!c=30253 g=30254 pq=1/0 qp=1 dt=95363/140000000000000/0 df=780 of=5 ql=0/0 qs=N... b=10 ci=100607 nci=0 co=1414 ca=1353 | 65 | 6!c=30253 g=30254 cnq=1/0:1 dt=95363/140000000000000/0 df=780 of=5 ql=0/0 qs=N... b=10 ci=100607 nci=0 co=1414 ca=1353 |
66 | 7 c=31178 g=31178 pq=1/0 qp=0 dt=91536/0/0 df=547 of=4 ql=0/0 qs=.... b=10 ci=109819 nci=0 co=1115 ca=969 | 66 | 7 c=31178 g=31178 cnq=1/0:0 dt=91536/0/0 df=547 of=4 ql=0/0 qs=.... b=10 ci=109819 nci=0 co=1115 ca=969 |
67 | 67 | ||
68 | This file has one line per CPU, or eight for this 8-CPU system. | 68 | This file has one line per CPU, or eight for this 8-CPU system. |
69 | The fields are as follows: | 69 | The fields are as follows: |
@@ -188,14 +188,14 @@ o "ca" is the number of RCU callbacks that have been adopted by this | |||
188 | Kernels compiled with CONFIG_RCU_BOOST=y display the following from | 188 | Kernels compiled with CONFIG_RCU_BOOST=y display the following from |
189 | /debug/rcu/rcu_preempt/rcudata: | 189 | /debug/rcu/rcu_preempt/rcudata: |
190 | 190 | ||
191 | 0!c=12865 g=12866 pq=1/0 qp=1 dt=83113/140000000000000/0 df=288 of=11 ql=0/0 qs=N... kt=0/O ktl=944 b=10 ci=60709 nci=0 co=748 ca=871 | 191 | 0!c=12865 g=12866 cnq=1/0:1 dt=83113/140000000000000/0 df=288 of=11 ql=0/0 qs=N... kt=0/O ktl=944 b=10 ci=60709 nci=0 co=748 ca=871 |
192 | 1 c=14407 g=14408 pq=1/0 qp=0 dt=100679/140000000000000/0 df=378 of=7 ql=0/119 qs=NRW. kt=0/W ktl=9b6 b=10 ci=109740 nci=0 co=589 ca=485 | 192 | 1 c=14407 g=14408 cnq=1/0:0 dt=100679/140000000000000/0 df=378 of=7 ql=0/119 qs=NRW. kt=0/W ktl=9b6 b=10 ci=109740 nci=0 co=589 ca=485 |
193 | 2 c=14407 g=14408 pq=1/0 qp=0 dt=105486/0/0 df=90 of=9 ql=0/89 qs=NRW. kt=0/W ktl=c0c b=10 ci=83113 nci=0 co=533 ca=490 | 193 | 2 c=14407 g=14408 cnq=1/0:0 dt=105486/0/0 df=90 of=9 ql=0/89 qs=NRW. kt=0/W ktl=c0c b=10 ci=83113 nci=0 co=533 ca=490 |
194 | 3 c=14407 g=14408 pq=1/0 qp=0 dt=107138/0/0 df=142 of=8 ql=0/188 qs=NRW. kt=0/W ktl=b96 b=10 ci=121114 nci=0 co=426 ca=290 | 194 | 3 c=14407 g=14408 cnq=1/0:0 dt=107138/0/0 df=142 of=8 ql=0/188 qs=NRW. kt=0/W ktl=b96 b=10 ci=121114 nci=0 co=426 ca=290 |
195 | 4 c=14405 g=14406 pq=1/0 qp=1 dt=50238/0/0 df=706 of=7 ql=0/0 qs=.... kt=0/W ktl=812 b=10 ci=34929 nci=0 co=643 ca=114 | 195 | 4 c=14405 g=14406 cnq=1/0:1 dt=50238/0/0 df=706 of=7 ql=0/0 qs=.... kt=0/W ktl=812 b=10 ci=34929 nci=0 co=643 ca=114 |
196 | 5!c=14168 g=14169 pq=1/0 qp=0 dt=45465/140000000000000/0 df=161 of=11 ql=0/0 qs=N... kt=0/O ktl=b4d b=10 ci=47712 nci=0 co=677 ca=722 | 196 | 5!c=14168 g=14169 cnq=1/0:0 dt=45465/140000000000000/0 df=161 of=11 ql=0/0 qs=N... kt=0/O ktl=b4d b=10 ci=47712 nci=0 co=677 ca=722 |
197 | 6 c=14404 g=14405 pq=1/0 qp=0 dt=59454/0/0 df=94 of=6 ql=0/0 qs=.... kt=0/W ktl=e57 b=10 ci=55597 nci=0 co=701 ca=811 | 197 | 6 c=14404 g=14405 cnq=1/0:0 dt=59454/0/0 df=94 of=6 ql=0/0 qs=.... kt=0/W ktl=e57 b=10 ci=55597 nci=0 co=701 ca=811 |
198 | 7 c=14407 g=14408 pq=1/0 qp=1 dt=68850/0/0 df=31 of=8 ql=0/0 qs=.... kt=0/W ktl=14bd b=10 ci=77475 nci=0 co=508 ca=1042 | 198 | 7 c=14407 g=14408 cnq=1/0:1 dt=68850/0/0 df=31 of=8 ql=0/0 qs=.... kt=0/W ktl=14bd b=10 ci=77475 nci=0 co=508 ca=1042 |
199 | 199 | ||
200 | This is similar to the output discussed above, but contains the following | 200 | This is similar to the output discussed above, but contains the following |
201 | additional fields: | 201 | additional fields: |
diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt index adc2184009c5..dc49c6712b17 100644 --- a/Documentation/RCU/whatisRCU.txt +++ b/Documentation/RCU/whatisRCU.txt | |||
@@ -364,7 +364,7 @@ uses of RCU may be found in listRCU.txt, arrayRCU.txt, and NMI-RCU.txt. | |||
364 | }; | 364 | }; |
365 | DEFINE_SPINLOCK(foo_mutex); | 365 | DEFINE_SPINLOCK(foo_mutex); |
366 | 366 | ||
367 | struct foo *gbl_foo; | 367 | struct foo __rcu *gbl_foo; |
368 | 368 | ||
369 | /* | 369 | /* |
370 | * Create a new struct foo that is the same as the one currently | 370 | * Create a new struct foo that is the same as the one currently |
@@ -386,7 +386,7 @@ uses of RCU may be found in listRCU.txt, arrayRCU.txt, and NMI-RCU.txt. | |||
386 | 386 | ||
387 | new_fp = kmalloc(sizeof(*new_fp), GFP_KERNEL); | 387 | new_fp = kmalloc(sizeof(*new_fp), GFP_KERNEL); |
388 | spin_lock(&foo_mutex); | 388 | spin_lock(&foo_mutex); |
389 | old_fp = gbl_foo; | 389 | old_fp = rcu_dereference_protected(gbl_foo, lockdep_is_held(&foo_mutex)); |
390 | *new_fp = *old_fp; | 390 | *new_fp = *old_fp; |
391 | new_fp->a = new_a; | 391 | new_fp->a = new_a; |
392 | rcu_assign_pointer(gbl_foo, new_fp); | 392 | rcu_assign_pointer(gbl_foo, new_fp); |
@@ -487,7 +487,7 @@ The foo_update_a() function might then be written as follows: | |||
487 | 487 | ||
488 | new_fp = kmalloc(sizeof(*new_fp), GFP_KERNEL); | 488 | new_fp = kmalloc(sizeof(*new_fp), GFP_KERNEL); |
489 | spin_lock(&foo_mutex); | 489 | spin_lock(&foo_mutex); |
490 | old_fp = gbl_foo; | 490 | old_fp = rcu_dereference_protected(gbl_foo, lockdep_is_held(&foo_mutex)); |
491 | *new_fp = *old_fp; | 491 | *new_fp = *old_fp; |
492 | new_fp->a = new_a; | 492 | new_fp->a = new_a; |
493 | rcu_assign_pointer(gbl_foo, new_fp); | 493 | rcu_assign_pointer(gbl_foo, new_fp); |
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index fd89b04d34f0..4710e4afef19 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches | |||
@@ -659,8 +659,8 @@ succinct and descriptive, but that is what a well-written summary | |||
659 | should do. | 659 | should do. |
660 | 660 | ||
661 | The "summary phrase" may be prefixed by tags enclosed in square | 661 | The "summary phrase" may be prefixed by tags enclosed in square |
662 | brackets: "Subject: [PATCH tag] <summary phrase>". The tags are not | 662 | brackets: "Subject: [PATCH <tag>...] <summary phrase>". The tags are |
663 | considered part of the summary phrase, but describe how the patch | 663 | not considered part of the summary phrase, but describe how the patch |
664 | should be treated. Common tags might include a version descriptor if | 664 | should be treated. Common tags might include a version descriptor if |
665 | the multiple versions of the patch have been sent out in response to | 665 | the multiple versions of the patch have been sent out in response to |
666 | comments (i.e., "v1, v2, v3"), or "RFC" to indicate a request for | 666 | comments (i.e., "v1, v2, v3"), or "RFC" to indicate a request for |
@@ -672,8 +672,8 @@ the patch series. | |||
672 | 672 | ||
673 | A couple of example Subjects: | 673 | A couple of example Subjects: |
674 | 674 | ||
675 | Subject: [patch 2/5] ext2: improve scalability of bitmap searching | 675 | Subject: [PATCH 2/5] ext2: improve scalability of bitmap searching |
676 | Subject: [PATCHv2 001/207] x86: fix eflags tracking | 676 | Subject: [PATCH v2 01/27] x86: fix eflags tracking |
677 | 677 | ||
678 | The "from" line must be the very first line in the message body, | 678 | The "from" line must be the very first line in the message body, |
679 | and has the form: | 679 | and has the form: |
diff --git a/Documentation/acpi/enumeration.txt b/Documentation/acpi/enumeration.txt index b731b292e812..a91ec5af52df 100644 --- a/Documentation/acpi/enumeration.txt +++ b/Documentation/acpi/enumeration.txt | |||
@@ -347,13 +347,18 @@ For the first case, the MFD drivers do not need to do anything. The | |||
347 | resulting child platform device will have its ACPI_COMPANION() set to point | 347 | resulting child platform device will have its ACPI_COMPANION() set to point |
348 | to the parent device. | 348 | to the parent device. |
349 | 349 | ||
350 | If the ACPI namespace has a device that we can match using an ACPI id, | 350 | If the ACPI namespace has a device that we can match using an ACPI id or ACPI |
351 | the id should be set like: | 351 | adr, the cell should be set like: |
352 | |||
353 | static struct mfd_cell_acpi_match my_subdevice_cell_acpi_match = { | ||
354 | .pnpid = "XYZ0001", | ||
355 | .adr = 0, | ||
356 | }; | ||
352 | 357 | ||
353 | static struct mfd_cell my_subdevice_cell = { | 358 | static struct mfd_cell my_subdevice_cell = { |
354 | .name = "my_subdevice", | 359 | .name = "my_subdevice", |
355 | /* set the resources relative to the parent */ | 360 | /* set the resources relative to the parent */ |
356 | .acpi_pnpid = "XYZ0001", | 361 | .acpi_match = &my_subdevice_cell_acpi_match, |
357 | }; | 362 | }; |
358 | 363 | ||
359 | The ACPI id "XYZ0001" is then used to lookup an ACPI device directly under | 364 | The ACPI id "XYZ0001" is then used to lookup an ACPI device directly under |
diff --git a/Documentation/acpi/i2c-muxes.txt b/Documentation/acpi/i2c-muxes.txt new file mode 100644 index 000000000000..9fcc4f0b885e --- /dev/null +++ b/Documentation/acpi/i2c-muxes.txt | |||
@@ -0,0 +1,58 @@ | |||
1 | ACPI I2C Muxes | ||
2 | -------------- | ||
3 | |||
4 | Describing an I2C device hierarchy that includes I2C muxes requires an ACPI | ||
5 | Device () scope per mux channel. | ||
6 | |||
7 | Consider this topology: | ||
8 | |||
9 | +------+ +------+ | ||
10 | | SMB1 |-->| MUX0 |--CH00--> i2c client A (0x50) | ||
11 | | | | 0x70 |--CH01--> i2c client B (0x50) | ||
12 | +------+ +------+ | ||
13 | |||
14 | which corresponds to the following ASL: | ||
15 | |||
16 | Device (SMB1) | ||
17 | { | ||
18 | Name (_HID, ...) | ||
19 | Device (MUX0) | ||
20 | { | ||
21 | Name (_HID, ...) | ||
22 | Name (_CRS, ResourceTemplate () { | ||
23 | I2cSerialBus (0x70, ControllerInitiated, I2C_SPEED, | ||
24 | AddressingMode7Bit, "^SMB1", 0x00, | ||
25 | ResourceConsumer,,) | ||
26 | } | ||
27 | |||
28 | Device (CH00) | ||
29 | { | ||
30 | Name (_ADR, 0) | ||
31 | |||
32 | Device (CLIA) | ||
33 | { | ||
34 | Name (_HID, ...) | ||
35 | Name (_CRS, ResourceTemplate () { | ||
36 | I2cSerialBus (0x50, ControllerInitiated, I2C_SPEED, | ||
37 | AddressingMode7Bit, "^CH00", 0x00, | ||
38 | ResourceConsumer,,) | ||
39 | } | ||
40 | } | ||
41 | } | ||
42 | |||
43 | Device (CH01) | ||
44 | { | ||
45 | Name (_ADR, 1) | ||
46 | |||
47 | Device (CLIB) | ||
48 | { | ||
49 | Name (_HID, ...) | ||
50 | Name (_CRS, ResourceTemplate () { | ||
51 | I2cSerialBus (0x50, ControllerInitiated, I2C_SPEED, | ||
52 | AddressingMode7Bit, "^CH01", 0x00, | ||
53 | ResourceConsumer,,) | ||
54 | } | ||
55 | } | ||
56 | } | ||
57 | } | ||
58 | } | ||
diff --git a/Documentation/arm/OMAP/README b/Documentation/arm/OMAP/README new file mode 100644 index 000000000000..75645c45d14a --- /dev/null +++ b/Documentation/arm/OMAP/README | |||
@@ -0,0 +1,7 @@ | |||
1 | This file contains documentation for running mainline | ||
2 | kernel on omaps. | ||
3 | |||
4 | KERNEL NEW DEPENDENCIES | ||
5 | v4.3+ Update is needed for custom .config files to make sure | ||
6 | CONFIG_REGULATOR_PBIAS is enabled for MMC1 to work | ||
7 | properly. | ||
diff --git a/Documentation/arm/SA1100/Victor b/Documentation/arm/SA1100/Victor deleted file mode 100644 index 9cff415da5a7..000000000000 --- a/Documentation/arm/SA1100/Victor +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | Victor is known as a "digital talking book player" manufactured by | ||
2 | VisuAide, Inc. to be used by blind people. | ||
3 | |||
4 | For more information related to Victor, see: | ||
5 | |||
6 | http://www.humanware.com/en-usa/products | ||
7 | |||
8 | Of course Victor is using Linux as its main operating system. | ||
9 | The Victor implementation for Linux is maintained by Nicolas Pitre: | ||
10 | |||
11 | nico@visuaide.com | ||
12 | nico@fluxnic.net | ||
13 | |||
14 | For any comments, please feel free to contact me through the above | ||
15 | addresses. | ||
16 | |||
diff --git a/Documentation/arm/Samsung/Bootloader-interface.txt b/Documentation/arm/Samsung/Bootloader-interface.txt index df8d4fb85939..ed494ac0beb2 100644 --- a/Documentation/arm/Samsung/Bootloader-interface.txt +++ b/Documentation/arm/Samsung/Bootloader-interface.txt | |||
@@ -19,7 +19,7 @@ executing kernel. | |||
19 | Address: sysram_ns_base_addr | 19 | Address: sysram_ns_base_addr |
20 | Offset Value Purpose | 20 | Offset Value Purpose |
21 | ============================================================================= | 21 | ============================================================================= |
22 | 0x08 exynos_cpu_resume_ns System suspend | 22 | 0x08 exynos_cpu_resume_ns, mcpm_entry_point System suspend |
23 | 0x0c 0x00000bad (Magic cookie) System suspend | 23 | 0x0c 0x00000bad (Magic cookie) System suspend |
24 | 0x1c exynos4_secondary_startup Secondary CPU boot | 24 | 0x1c exynos4_secondary_startup Secondary CPU boot |
25 | 0x1c + 4*cpu exynos4_secondary_startup (Exynos4412) Secondary CPU boot | 25 | 0x1c + 4*cpu exynos4_secondary_startup (Exynos4412) Secondary CPU boot |
@@ -56,7 +56,8 @@ Offset Value Purpose | |||
56 | Address: pmu_base_addr | 56 | Address: pmu_base_addr |
57 | Offset Value Purpose | 57 | Offset Value Purpose |
58 | ============================================================================= | 58 | ============================================================================= |
59 | 0x0908 Non-zero (only Exynos3250) Secondary CPU boot up indicator | 59 | 0x0908 Non-zero Secondary CPU boot up indicator |
60 | on Exynos3250 and Exynos542x | ||
60 | 61 | ||
61 | 62 | ||
62 | 4. Glossary | 63 | 4. Glossary |
diff --git a/Documentation/arm/keystone/knav-qmss.txt b/Documentation/arm/keystone/knav-qmss.txt new file mode 100644 index 000000000000..fcdb9fd5f53a --- /dev/null +++ b/Documentation/arm/keystone/knav-qmss.txt | |||
@@ -0,0 +1,56 @@ | |||
1 | * Texas Instruments Keystone Navigator Queue Management SubSystem driver | ||
2 | |||
3 | Driver source code path | ||
4 | drivers/soc/ti/knav_qmss.c | ||
5 | drivers/soc/ti/knav_qmss_acc.c | ||
6 | |||
7 | The QMSS (Queue Manager Sub System) found on Keystone SOCs is one of | ||
8 | the main hardware sub system which forms the backbone of the Keystone | ||
9 | multi-core Navigator. QMSS consist of queue managers, packed-data structure | ||
10 | processors(PDSP), linking RAM, descriptor pools and infrastructure | ||
11 | Packet DMA. | ||
12 | The Queue Manager is a hardware module that is responsible for accelerating | ||
13 | management of the packet queues. Packets are queued/de-queued by writing or | ||
14 | reading descriptor address to a particular memory mapped location. The PDSPs | ||
15 | perform QMSS related functions like accumulation, QoS, or event management. | ||
16 | Linking RAM registers are used to link the descriptors which are stored in | ||
17 | descriptor RAM. Descriptor RAM is configurable as internal or external memory. | ||
18 | The QMSS driver manages the PDSP setups, linking RAM regions, | ||
19 | queue pool management (allocation, push, pop and notify) and descriptor | ||
20 | pool management. | ||
21 | |||
22 | knav qmss driver provides a set of APIs to drivers to open/close qmss queues, | ||
23 | allocate descriptor pools, map the descriptors, push/pop to queues etc. For | ||
24 | details of the available APIs, please refers to include/linux/soc/ti/knav_qmss.h | ||
25 | |||
26 | DT documentation is available at | ||
27 | Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt | ||
28 | |||
29 | Accumulator QMSS queues using PDSP firmware | ||
30 | ============================================ | ||
31 | The QMSS PDSP firmware support accumulator channel that can monitor a single | ||
32 | queue or multiple contiguous queues. drivers/soc/ti/knav_qmss_acc.c is the | ||
33 | driver that interface with the accumulator PDSP. This configures | ||
34 | accumulator channels defined in DTS (example in DT documentation) to monitor | ||
35 | 1 or 32 queues per channel. More description on the firmware is available in | ||
36 | CPPI/QMSS Low Level Driver document (docs/CPPI_QMSS_LLD_SDS.pdf) at | ||
37 | git://git.ti.com/keystone-rtos/qmss-lld.git | ||
38 | |||
39 | k2_qmss_pdsp_acc48_k2_le_1_0_0_9.bin firmware supports upto 48 accumulator | ||
40 | channels. This firmware is available under ti-keystone folder of | ||
41 | firmware.git at | ||
42 | git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git | ||
43 | |||
44 | To use copy the firmware image to lib/firmware folder of the initramfs or | ||
45 | ubifs file system and provide a sym link to k2_qmss_pdsp_acc48_k2_le_1_0_0_9.bin | ||
46 | in the file system and boot up the kernel. User would see | ||
47 | |||
48 | "firmware file ks2_qmss_pdsp_acc48.bin downloaded for PDSP" | ||
49 | |||
50 | in the boot up log if loading of firmware to PDSP is successful. | ||
51 | |||
52 | Use of accumulated queues requires the firmware image to be present in the | ||
53 | file system. The driver doesn't acc queues to the supported queue range if | ||
54 | PDSP is not running in the SoC. The API call fails if there is a queue open | ||
55 | request to an acc queue and PDSP is not running. So make sure to copy firmware | ||
56 | to file system before using these queue types. | ||
diff --git a/Documentation/arm/memory.txt b/Documentation/arm/memory.txt index 4178ebda6e66..546a39048eb0 100644 --- a/Documentation/arm/memory.txt +++ b/Documentation/arm/memory.txt | |||
@@ -54,7 +54,7 @@ VMALLOC_START VMALLOC_END-1 vmalloc() / ioremap() space. | |||
54 | located here through iotable_init(). | 54 | located here through iotable_init(). |
55 | VMALLOC_START is based upon the value | 55 | VMALLOC_START is based upon the value |
56 | of the high_memory variable, and VMALLOC_END | 56 | of the high_memory variable, and VMALLOC_END |
57 | is equal to 0xff000000. | 57 | is equal to 0xff800000. |
58 | 58 | ||
59 | PAGE_OFFSET high_memory-1 Kernel direct-mapped RAM region. | 59 | PAGE_OFFSET high_memory-1 Kernel direct-mapped RAM region. |
60 | This maps the platforms RAM, and typically | 60 | This maps the platforms RAM, and typically |
diff --git a/Documentation/arm/sunxi/README b/Documentation/arm/sunxi/README index 5e38e1582f95..430d279a8df3 100644 --- a/Documentation/arm/sunxi/README +++ b/Documentation/arm/sunxi/README | |||
@@ -25,7 +25,7 @@ SunXi family | |||
25 | + Datasheet | 25 | + Datasheet |
26 | http://dl.linux-sunxi.org/A10s/A10s%20Datasheet%20-%20v1.20%20%282012-03-27%29.pdf | 26 | http://dl.linux-sunxi.org/A10s/A10s%20Datasheet%20-%20v1.20%20%282012-03-27%29.pdf |
27 | 27 | ||
28 | - Allwinner A13 (sun5i) | 28 | - Allwinner A13 / R8 (sun5i) |
29 | + Datasheet | 29 | + Datasheet |
30 | http://dl.linux-sunxi.org/A13/A13%20Datasheet%20-%20v1.12%20%282012-03-29%29.pdf | 30 | http://dl.linux-sunxi.org/A13/A13%20Datasheet%20-%20v1.12%20%282012-03-29%29.pdf |
31 | + User Manual | 31 | + User Manual |
diff --git a/Documentation/arm/uefi.txt b/Documentation/arm/uefi.txt index d60030a1b909..6543a0adea8a 100644 --- a/Documentation/arm/uefi.txt +++ b/Documentation/arm/uefi.txt | |||
@@ -58,7 +58,3 @@ linux,uefi-mmap-desc-size | 32-bit | Size in bytes of each entry in the UEFI | |||
58 | -------------------------------------------------------------------------------- | 58 | -------------------------------------------------------------------------------- |
59 | linux,uefi-mmap-desc-ver | 32-bit | Version of the mmap descriptor format. | 59 | linux,uefi-mmap-desc-ver | 32-bit | Version of the mmap descriptor format. |
60 | -------------------------------------------------------------------------------- | 60 | -------------------------------------------------------------------------------- |
61 | linux,uefi-stub-kern-ver | string | Copy of linux_banner from build. | ||
62 | -------------------------------------------------------------------------------- | ||
63 | |||
64 | For verbose debug messages, specify 'uefi_debug' on the kernel command line. | ||
diff --git a/Documentation/arm64/booting.txt b/Documentation/arm64/booting.txt index 7d9d3c2286b2..701d39d3171a 100644 --- a/Documentation/arm64/booting.txt +++ b/Documentation/arm64/booting.txt | |||
@@ -104,7 +104,12 @@ Header notes: | |||
104 | - The flags field (introduced in v3.17) is a little-endian 64-bit field | 104 | - The flags field (introduced in v3.17) is a little-endian 64-bit field |
105 | composed as follows: | 105 | composed as follows: |
106 | Bit 0: Kernel endianness. 1 if BE, 0 if LE. | 106 | Bit 0: Kernel endianness. 1 if BE, 0 if LE. |
107 | Bits 1-63: Reserved. | 107 | Bit 1-2: Kernel Page size. |
108 | 0 - Unspecified. | ||
109 | 1 - 4K | ||
110 | 2 - 16K | ||
111 | 3 - 64K | ||
112 | Bits 3-63: Reserved. | ||
108 | 113 | ||
109 | - When image_size is zero, a bootloader should attempt to keep as much | 114 | - When image_size is zero, a bootloader should attempt to keep as much |
110 | memory as possible free for use by the kernel immediately after the | 115 | memory as possible free for use by the kernel immediately after the |
@@ -173,13 +178,22 @@ Before jumping into the kernel, the following conditions must be met: | |||
173 | the kernel image will be entered must be initialised by software at a | 178 | the kernel image will be entered must be initialised by software at a |
174 | higher exception level to prevent execution in an UNKNOWN state. | 179 | higher exception level to prevent execution in an UNKNOWN state. |
175 | 180 | ||
176 | For systems with a GICv3 interrupt controller: | 181 | For systems with a GICv3 interrupt controller to be used in v3 mode: |
177 | - If EL3 is present: | 182 | - If EL3 is present: |
178 | ICC_SRE_EL3.Enable (bit 3) must be initialiased to 0b1. | 183 | ICC_SRE_EL3.Enable (bit 3) must be initialiased to 0b1. |
179 | ICC_SRE_EL3.SRE (bit 0) must be initialised to 0b1. | 184 | ICC_SRE_EL3.SRE (bit 0) must be initialised to 0b1. |
180 | - If the kernel is entered at EL1: | 185 | - If the kernel is entered at EL1: |
181 | ICC.SRE_EL2.Enable (bit 3) must be initialised to 0b1 | 186 | ICC.SRE_EL2.Enable (bit 3) must be initialised to 0b1 |
182 | ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b1. | 187 | ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b1. |
188 | - The DT or ACPI tables must describe a GICv3 interrupt controller. | ||
189 | |||
190 | For systems with a GICv3 interrupt controller to be used in | ||
191 | compatibility (v2) mode: | ||
192 | - If EL3 is present: | ||
193 | ICC_SRE_EL3.SRE (bit 0) must be initialised to 0b0. | ||
194 | - If the kernel is entered at EL1: | ||
195 | ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b0. | ||
196 | - The DT or ACPI tables must describe a GICv2 interrupt controller. | ||
183 | 197 | ||
184 | The requirements described above for CPU mode, caches, MMUs, architected | 198 | The requirements described above for CPU mode, caches, MMUs, architected |
185 | timers, coherency and system registers apply to all CPUs. All CPUs must | 199 | timers, coherency and system registers apply to all CPUs. All CPUs must |
diff --git a/Documentation/atomic_ops.txt b/Documentation/atomic_ops.txt index b19fc34efdb1..c9d1cacb4395 100644 --- a/Documentation/atomic_ops.txt +++ b/Documentation/atomic_ops.txt | |||
@@ -542,6 +542,10 @@ The routines xchg() and cmpxchg() must provide the same exact | |||
542 | memory-barrier semantics as the atomic and bit operations returning | 542 | memory-barrier semantics as the atomic and bit operations returning |
543 | values. | 543 | values. |
544 | 544 | ||
545 | Note: If someone wants to use xchg(), cmpxchg() and their variants, | ||
546 | linux/atomic.h should be included rather than asm/cmpxchg.h, unless | ||
547 | the code is in arch/* and can take care of itself. | ||
548 | |||
545 | Spinlocks and rwlocks have memory barrier expectations as well. | 549 | Spinlocks and rwlocks have memory barrier expectations as well. |
546 | The rule to follow is simple: | 550 | The rule to follow is simple: |
547 | 551 | ||
diff --git a/Documentation/block/pr.txt b/Documentation/block/pr.txt new file mode 100644 index 000000000000..d3eb1ca65051 --- /dev/null +++ b/Documentation/block/pr.txt | |||
@@ -0,0 +1,119 @@ | |||
1 | |||
2 | Block layer support for Persistent Reservations | ||
3 | =============================================== | ||
4 | |||
5 | The Linux kernel supports a user space interface for simplified | ||
6 | Persistent Reservations which map to block devices that support | ||
7 | these (like SCSI). Persistent Reservations allow restricting | ||
8 | access to block devices to specific initiators in a shared storage | ||
9 | setup. | ||
10 | |||
11 | This document gives a general overview of the support ioctl commands. | ||
12 | For a more detailed reference please refer the the SCSI Primary | ||
13 | Commands standard, specifically the section on Reservations and the | ||
14 | "PERSISTENT RESERVE IN" and "PERSISTENT RESERVE OUT" commands. | ||
15 | |||
16 | All implementations are expected to ensure the reservations survive | ||
17 | a power loss and cover all connections in a multi path environment. | ||
18 | These behaviors are optional in SPC but will be automatically applied | ||
19 | by Linux. | ||
20 | |||
21 | |||
22 | The following types of reservations are supported: | ||
23 | -------------------------------------------------- | ||
24 | |||
25 | - PR_WRITE_EXCLUSIVE | ||
26 | |||
27 | Only the initiator that owns the reservation can write to the | ||
28 | device. Any initiator can read from the device. | ||
29 | |||
30 | - PR_EXCLUSIVE_ACCESS | ||
31 | |||
32 | Only the initiator that owns the reservation can access the | ||
33 | device. | ||
34 | |||
35 | - PR_WRITE_EXCLUSIVE_REG_ONLY | ||
36 | |||
37 | Only initiators with a registered key can write to the device, | ||
38 | Any initiator can read from the device. | ||
39 | |||
40 | - PR_EXCLUSIVE_ACCESS_REG_ONLY | ||
41 | |||
42 | Only initiators with a registered key can access the device. | ||
43 | |||
44 | - PR_WRITE_EXCLUSIVE_ALL_REGS | ||
45 | |||
46 | Only initiators with a registered key can write to the device, | ||
47 | Any initiator can read from the device. | ||
48 | All initiators with a registered key are considered reservation | ||
49 | holders. | ||
50 | Please reference the SPC spec on the meaning of a reservation | ||
51 | holder if you want to use this type. | ||
52 | |||
53 | - PR_EXCLUSIVE_ACCESS_ALL_REGS | ||
54 | |||
55 | Only initiators with a registered key can access the device. | ||
56 | All initiators with a registered key are considered reservation | ||
57 | holders. | ||
58 | Please reference the SPC spec on the meaning of a reservation | ||
59 | holder if you want to use this type. | ||
60 | |||
61 | |||
62 | The following ioctl are supported: | ||
63 | ---------------------------------- | ||
64 | |||
65 | 1. IOC_PR_REGISTER | ||
66 | |||
67 | This ioctl command registers a new reservation if the new_key argument | ||
68 | is non-null. If no existing reservation exists old_key must be zero, | ||
69 | if an existing reservation should be replaced old_key must contain | ||
70 | the old reservation key. | ||
71 | |||
72 | If the new_key argument is 0 it unregisters the existing reservation passed | ||
73 | in old_key. | ||
74 | |||
75 | |||
76 | 2. IOC_PR_RESERVE | ||
77 | |||
78 | This ioctl command reserves the device and thus restricts access for other | ||
79 | devices based on the type argument. The key argument must be the existing | ||
80 | reservation key for the device as acquired by the IOC_PR_REGISTER, | ||
81 | IOC_PR_REGISTER_IGNORE, IOC_PR_PREEMPT or IOC_PR_PREEMPT_ABORT commands. | ||
82 | |||
83 | |||
84 | 3. IOC_PR_RELEASE | ||
85 | |||
86 | This ioctl command releases the reservation specified by key and flags | ||
87 | and thus removes any access restriction implied by it. | ||
88 | |||
89 | |||
90 | 4. IOC_PR_PREEMPT | ||
91 | |||
92 | This ioctl command releases the existing reservation referred to by | ||
93 | old_key and replaces it with a a new reservation of type for the | ||
94 | reservation key new_key. | ||
95 | |||
96 | |||
97 | 5. IOC_PR_PREEMPT_ABORT | ||
98 | |||
99 | This ioctl command works like IOC_PR_PREEMPT except that it also aborts | ||
100 | any outstanding command sent over a connection identified by old_key. | ||
101 | |||
102 | 6. IOC_PR_CLEAR | ||
103 | |||
104 | This ioctl command unregisters both key and any other reservation key | ||
105 | registered with the device and drops any existing reservation. | ||
106 | |||
107 | |||
108 | Flags | ||
109 | ----- | ||
110 | |||
111 | All the ioctls have a flag field. Currently only one flag is supported: | ||
112 | |||
113 | - PR_FL_IGNORE_KEY | ||
114 | |||
115 | Ignore the existing reservation key. This is commonly supported for | ||
116 | IOC_PR_REGISTER, and some implementation may support the flag for | ||
117 | IOC_PR_RESERVE. | ||
118 | |||
119 | For all unknown flags the kernel will return -EOPNOTSUPP. | ||
diff --git a/Documentation/blockdev/zram.txt b/Documentation/blockdev/zram.txt index 62435bb25266..5bda5031c83d 100644 --- a/Documentation/blockdev/zram.txt +++ b/Documentation/blockdev/zram.txt | |||
@@ -14,8 +14,43 @@ Statistics for individual zram devices are exported through sysfs nodes at | |||
14 | 14 | ||
15 | * Usage | 15 | * Usage |
16 | 16 | ||
17 | There are several ways to configure and manage zram device(-s): | ||
18 | a) using zram and zram_control sysfs attributes | ||
19 | b) using zramctl utility, provided by util-linux (util-linux@vger.kernel.org). | ||
20 | |||
21 | In this document we will describe only 'manual' zram configuration steps, | ||
22 | IOW, zram and zram_control sysfs attributes. | ||
23 | |||
24 | In order to get a better idea about zramctl please consult util-linux | ||
25 | documentation, zramctl man-page or `zramctl --help'. Please be informed | ||
26 | that zram maintainers do not develop/maintain util-linux or zramctl, should | ||
27 | you have any questions please contact util-linux@vger.kernel.org | ||
28 | |||
17 | Following shows a typical sequence of steps for using zram. | 29 | Following shows a typical sequence of steps for using zram. |
18 | 30 | ||
31 | WARNING | ||
32 | ======= | ||
33 | For the sake of simplicity we skip error checking parts in most of the | ||
34 | examples below. However, it is your sole responsibility to handle errors. | ||
35 | |||
36 | zram sysfs attributes always return negative values in case of errors. | ||
37 | The list of possible return codes: | ||
38 | -EBUSY -- an attempt to modify an attribute that cannot be changed once | ||
39 | the device has been initialised. Please reset device first; | ||
40 | -ENOMEM -- zram was not able to allocate enough memory to fulfil your | ||
41 | needs; | ||
42 | -EINVAL -- invalid input has been provided. | ||
43 | |||
44 | If you use 'echo', the returned value that is changed by 'echo' utility, | ||
45 | and, in general case, something like: | ||
46 | |||
47 | echo 3 > /sys/block/zram0/max_comp_streams | ||
48 | if [ $? -ne 0 ]; | ||
49 | handle_error | ||
50 | fi | ||
51 | |||
52 | should suffice. | ||
53 | |||
19 | 1) Load Module: | 54 | 1) Load Module: |
20 | modprobe zram num_devices=4 | 55 | modprobe zram num_devices=4 |
21 | This creates 4 devices: /dev/zram{0,1,2,3} | 56 | This creates 4 devices: /dev/zram{0,1,2,3} |
@@ -47,7 +82,7 @@ max_comp_streams adjustment. | |||
47 | 82 | ||
48 | 3) Select compression algorithm | 83 | 3) Select compression algorithm |
49 | Using comp_algorithm device attribute one can see available and | 84 | Using comp_algorithm device attribute one can see available and |
50 | currently selected (shown in square brackets) compression algortithms, | 85 | currently selected (shown in square brackets) compression algorithms, |
51 | change selected compression algorithm (once the device is initialised | 86 | change selected compression algorithm (once the device is initialised |
52 | there is no way to change compression algorithm). | 87 | there is no way to change compression algorithm). |
53 | 88 | ||
@@ -119,7 +154,7 @@ execute | |||
119 | 8) Stats: | 154 | 8) Stats: |
120 | Per-device statistics are exported as various nodes under /sys/block/zram<id>/ | 155 | Per-device statistics are exported as various nodes under /sys/block/zram<id>/ |
121 | 156 | ||
122 | A brief description of exported device attritbutes. For more details please | 157 | A brief description of exported device attributes. For more details please |
123 | read Documentation/ABI/testing/sysfs-block-zram. | 158 | read Documentation/ABI/testing/sysfs-block-zram. |
124 | 159 | ||
125 | Name access description | 160 | Name access description |
@@ -140,8 +175,9 @@ zero_pages RO the number of zero filled pages written to this disk | |||
140 | orig_data_size RO uncompressed size of data stored in this disk | 175 | orig_data_size RO uncompressed size of data stored in this disk |
141 | compr_data_size RO compressed size of data stored in this disk | 176 | compr_data_size RO compressed size of data stored in this disk |
142 | mem_used_total RO the amount of memory allocated for this disk | 177 | mem_used_total RO the amount of memory allocated for this disk |
143 | mem_used_max RW the maximum amount memory zram have consumed to | 178 | mem_used_max RW the maximum amount of memory zram have consumed to |
144 | store compressed data | 179 | store the data (to reset this counter to the actual |
180 | current value, write 1 to this attribute) | ||
145 | mem_limit RW the maximum amount of memory ZRAM can use to store | 181 | mem_limit RW the maximum amount of memory ZRAM can use to store |
146 | the compressed data | 182 | the compressed data |
147 | pages_compacted RO the number of pages freed during compaction | 183 | pages_compacted RO the number of pages freed during compaction |
diff --git a/Documentation/cgroups/blkio-controller.txt b/Documentation/cgroups/blkio-controller.txt index 12686bec37b9..52fa9f353342 100644 --- a/Documentation/cgroups/blkio-controller.txt +++ b/Documentation/cgroups/blkio-controller.txt | |||
@@ -59,7 +59,7 @@ cgroups. Here is what you can do. | |||
59 | - At macro level, first dd should finish first. To get more precise data, keep | 59 | - At macro level, first dd should finish first. To get more precise data, keep |
60 | on looking at (with the help of script), at blkio.disk_time and | 60 | on looking at (with the help of script), at blkio.disk_time and |
61 | blkio.disk_sectors files of both test1 and test2 groups. This will tell how | 61 | blkio.disk_sectors files of both test1 and test2 groups. This will tell how |
62 | much disk time (in milli seconds), each group got and how many secotors each | 62 | much disk time (in milliseconds), each group got and how many sectors each |
63 | group dispatched to the disk. We provide fairness in terms of disk time, so | 63 | group dispatched to the disk. We provide fairness in terms of disk time, so |
64 | ideally io.disk_time of cgroups should be in proportion to the weight. | 64 | ideally io.disk_time of cgroups should be in proportion to the weight. |
65 | 65 | ||
diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt index f935fac1e73b..c6256ae9885b 100644 --- a/Documentation/cgroups/cgroups.txt +++ b/Documentation/cgroups/cgroups.txt | |||
@@ -637,6 +637,10 @@ void exit(struct task_struct *task) | |||
637 | 637 | ||
638 | Called during task exit. | 638 | Called during task exit. |
639 | 639 | ||
640 | void free(struct task_struct *task) | ||
641 | |||
642 | Called when the task_struct is freed. | ||
643 | |||
640 | void bind(struct cgroup *root) | 644 | void bind(struct cgroup *root) |
641 | (cgroup_mutex held by caller) | 645 | (cgroup_mutex held by caller) |
642 | 646 | ||
diff --git a/Documentation/cgroups/freezer-subsystem.txt b/Documentation/cgroups/freezer-subsystem.txt index c96a72cbb30a..e831cb2b8394 100644 --- a/Documentation/cgroups/freezer-subsystem.txt +++ b/Documentation/cgroups/freezer-subsystem.txt | |||
@@ -50,7 +50,7 @@ being frozen. This allows the bash example above and gdb to run as | |||
50 | expected. | 50 | expected. |
51 | 51 | ||
52 | The cgroup freezer is hierarchical. Freezing a cgroup freezes all | 52 | The cgroup freezer is hierarchical. Freezing a cgroup freezes all |
53 | tasks beloning to the cgroup and all its descendant cgroups. Each | 53 | tasks belonging to the cgroup and all its descendant cgroups. Each |
54 | cgroup has its own state (self-state) and the state inherited from the | 54 | cgroup has its own state (self-state) and the state inherited from the |
55 | parent (parent-state). Iff both states are THAWED, the cgroup is | 55 | parent (parent-state). Iff both states are THAWED, the cgroup is |
56 | THAWED. | 56 | THAWED. |
diff --git a/Documentation/cgroups/unified-hierarchy.txt b/Documentation/cgroups/unified-hierarchy.txt index e0975c2cf03d..781b1d475bcf 100644 --- a/Documentation/cgroups/unified-hierarchy.txt +++ b/Documentation/cgroups/unified-hierarchy.txt | |||
@@ -107,12 +107,6 @@ root of unified hierarchy can be bound to other hierarchies. This | |||
107 | allows mixing unified hierarchy with the traditional multiple | 107 | allows mixing unified hierarchy with the traditional multiple |
108 | hierarchies in a fully backward compatible way. | 108 | hierarchies in a fully backward compatible way. |
109 | 109 | ||
110 | For development purposes, the following boot parameter makes all | ||
111 | controllers to appear on the unified hierarchy whether supported or | ||
112 | not. | ||
113 | |||
114 | cgroup__DEVEL__legacy_files_on_dfl | ||
115 | |||
116 | A controller can be moved across hierarchies only after the controller | 110 | A controller can be moved across hierarchies only after the controller |
117 | is no longer referenced in its current hierarchy. Because per-cgroup | 111 | is no longer referenced in its current hierarchy. Because per-cgroup |
118 | controller states are destroyed asynchronously and controllers may | 112 | controller states are destroyed asynchronously and controllers may |
@@ -341,11 +335,11 @@ is riddled with issues. | |||
341 | unnecessarily complicated and probably done this way because event | 335 | unnecessarily complicated and probably done this way because event |
342 | delivery itself was expensive. | 336 | delivery itself was expensive. |
343 | 337 | ||
344 | Unified hierarchy implements an interface file "cgroup.populated" | 338 | Unified hierarchy implements "populated" field in "cgroup.events" |
345 | which can be used to monitor whether the cgroup's subhierarchy has | 339 | interface file which can be used to monitor whether the cgroup's |
346 | tasks in it or not. Its value is 0 if there is no task in the cgroup | 340 | subhierarchy has tasks in it or not. Its value is 0 if there is no |
347 | and its descendants; otherwise, 1. poll and [id]notify events are | 341 | task in the cgroup and its descendants; otherwise, 1. poll and |
348 | triggered when the value changes. | 342 | [id]notify events are triggered when the value changes. |
349 | 343 | ||
350 | This is significantly lighter and simpler and trivially allows | 344 | This is significantly lighter and simpler and trivially allows |
351 | delegating management of subhierarchy - subhierarchy monitoring can | 345 | delegating management of subhierarchy - subhierarchy monitoring can |
@@ -374,6 +368,10 @@ supported and the interface files "release_agent" and | |||
374 | 368 | ||
375 | - The "cgroup.clone_children" file is removed. | 369 | - The "cgroup.clone_children" file is removed. |
376 | 370 | ||
371 | - /proc/PID/cgroup keeps reporting the cgroup that a zombie belonged | ||
372 | to before exiting. If the cgroup is removed before the zombie is | ||
373 | reaped, " (deleted)" is appeneded to the path. | ||
374 | |||
377 | 375 | ||
378 | 5-3. Controller File Conventions | 376 | 5-3. Controller File Conventions |
379 | 377 | ||
@@ -435,6 +433,11 @@ may be specified in any order and not all pairs have to be specified. | |||
435 | the first entry in the file. Specific entries can use "default" as | 433 | the first entry in the file. Specific entries can use "default" as |
436 | its value to indicate inheritance of the default value. | 434 | its value to indicate inheritance of the default value. |
437 | 435 | ||
436 | - For events which are not very high frequency, an interface file | ||
437 | "events" should be created which lists event key value pairs. | ||
438 | Whenever a notifiable event happens, file modified event should be | ||
439 | generated on the file. | ||
440 | |||
438 | 441 | ||
439 | 5-4. Per-Controller Changes | 442 | 5-4. Per-Controller Changes |
440 | 443 | ||
@@ -491,7 +494,7 @@ may be specified in any order and not all pairs have to be specified. | |||
491 | ${R|W}BPS are read/write bytes per second and ${R|W}IOPS are | 494 | ${R|W}BPS are read/write bytes per second and ${R|W}IOPS are |
492 | read/write IOs per second. "max" indicates no limit. Writing | 495 | read/write IOs per second. "max" indicates no limit. Writing |
493 | to the file follows the same format but the individual | 496 | to the file follows the same format but the individual |
494 | settings may be ommitted or specified in any order. | 497 | settings may be omitted or specified in any order. |
495 | 498 | ||
496 | This file is available only on non-root cgroups. | 499 | This file is available only on non-root cgroups. |
497 | 500 | ||
diff --git a/Documentation/crypto/asymmetric-keys.txt b/Documentation/crypto/asymmetric-keys.txt index b7675904a747..8c07e0ea6bc0 100644 --- a/Documentation/crypto/asymmetric-keys.txt +++ b/Documentation/crypto/asymmetric-keys.txt | |||
@@ -186,7 +186,7 @@ and looks like the following: | |||
186 | const struct public_key_signature *sig); | 186 | const struct public_key_signature *sig); |
187 | }; | 187 | }; |
188 | 188 | ||
189 | Asymmetric keys point to this with their type_data[0] member. | 189 | Asymmetric keys point to this with their payload[asym_subtype] member. |
190 | 190 | ||
191 | The owner and name fields should be set to the owning module and the name of | 191 | The owner and name fields should be set to the owning module and the name of |
192 | the subtype. Currently, the name is only used for print statements. | 192 | the subtype. Currently, the name is only used for print statements. |
@@ -269,8 +269,7 @@ mandatory: | |||
269 | 269 | ||
270 | struct key_preparsed_payload { | 270 | struct key_preparsed_payload { |
271 | char *description; | 271 | char *description; |
272 | void *type_data[2]; | 272 | void *payload[4]; |
273 | void *payload; | ||
274 | const void *data; | 273 | const void *data; |
275 | size_t datalen; | 274 | size_t datalen; |
276 | size_t quotalen; | 275 | size_t quotalen; |
@@ -283,16 +282,18 @@ mandatory: | |||
283 | not theirs. | 282 | not theirs. |
284 | 283 | ||
285 | If the parser is happy with the blob, it should propose a description for | 284 | If the parser is happy with the blob, it should propose a description for |
286 | the key and attach it to ->description, ->type_data[0] should be set to | 285 | the key and attach it to ->description, ->payload[asym_subtype] should be |
287 | point to the subtype to be used, ->payload should be set to point to the | 286 | set to point to the subtype to be used, ->payload[asym_crypto] should be |
288 | initialised data for that subtype, ->type_data[1] should point to a hex | 287 | set to point to the initialised data for that subtype, |
289 | fingerprint and quotalen should be updated to indicate how much quota this | 288 | ->payload[asym_key_ids] should point to one or more hex fingerprints and |
290 | key should account for. | 289 | quotalen should be updated to indicate how much quota this key should |
291 | 290 | account for. | |
292 | When clearing up, the data attached to ->type_data[1] and ->description | 291 | |
293 | will be kfree()'d and the data attached to ->payload will be passed to the | 292 | When clearing up, the data attached to ->payload[asym_key_ids] and |
294 | subtype's ->destroy() method to be disposed of. A module reference for | 293 | ->description will be kfree()'d and the data attached to |
295 | the subtype pointed to by ->type_data[0] will be put. | 294 | ->payload[asm_crypto] will be passed to the subtype's ->destroy() method |
295 | to be disposed of. A module reference for the subtype pointed to by | ||
296 | ->payload[asym_subtype] will be put. | ||
296 | 297 | ||
297 | 298 | ||
298 | If the data format is not recognised, -EBADMSG should be returned. If it | 299 | If the data format is not recognised, -EBADMSG should be returned. If it |
diff --git a/Documentation/device-mapper/delay.txt b/Documentation/device-mapper/delay.txt index 15adc55359e5..a07b5927f4a8 100644 --- a/Documentation/device-mapper/delay.txt +++ b/Documentation/device-mapper/delay.txt | |||
@@ -8,6 +8,7 @@ Parameters: | |||
8 | <device> <offset> <delay> [<write_device> <write_offset> <write_delay>] | 8 | <device> <offset> <delay> [<write_device> <write_offset> <write_delay>] |
9 | 9 | ||
10 | With separate write parameters, the first set is only used for reads. | 10 | With separate write parameters, the first set is only used for reads. |
11 | Offsets are specified in sectors. | ||
11 | Delays are specified in milliseconds. | 12 | Delays are specified in milliseconds. |
12 | 13 | ||
13 | Example scripts | 14 | Example scripts |
diff --git a/Documentation/device-mapper/snapshot.txt b/Documentation/device-mapper/snapshot.txt index 0d5bc46dc167..ad6949bff2e3 100644 --- a/Documentation/device-mapper/snapshot.txt +++ b/Documentation/device-mapper/snapshot.txt | |||
@@ -41,9 +41,13 @@ useless and be disabled, returning errors. So it is important to monitor | |||
41 | the amount of free space and expand the <COW device> before it fills up. | 41 | the amount of free space and expand the <COW device> before it fills up. |
42 | 42 | ||
43 | <persistent?> is P (Persistent) or N (Not persistent - will not survive | 43 | <persistent?> is P (Persistent) or N (Not persistent - will not survive |
44 | after reboot). | 44 | after reboot). O (Overflow) can be added as a persistent store option |
45 | The difference is that for transient snapshots less metadata must be | 45 | to allow userspace to advertise its support for seeing "Overflow" in the |
46 | saved on disk - they can be kept in memory by the kernel. | 46 | snapshot status. So supported store types are "P", "PO" and "N". |
47 | |||
48 | The difference between persistent and transient is with transient | ||
49 | snapshots less metadata must be saved on disk - they can be kept in | ||
50 | memory by the kernel. | ||
47 | 51 | ||
48 | 52 | ||
49 | * snapshot-merge <origin> <COW device> <persistent> <chunksize> | 53 | * snapshot-merge <origin> <COW device> <persistent> <chunksize> |
diff --git a/Documentation/devicetree/bindings/arm/amlogic.txt b/Documentation/devicetree/bindings/arm/amlogic.txt index 973884a1bacf..1dfee20eee74 100644 --- a/Documentation/devicetree/bindings/arm/amlogic.txt +++ b/Documentation/devicetree/bindings/arm/amlogic.txt | |||
@@ -9,6 +9,12 @@ Boards with the Amlogic Meson8 SoC shall have the following properties: | |||
9 | Required root node property: | 9 | Required root node property: |
10 | compatible: "amlogic,meson8"; | 10 | compatible: "amlogic,meson8"; |
11 | 11 | ||
12 | Boards with the Amlogic Meson8b SoC shall have the following properties: | ||
13 | Required root node property: | ||
14 | compatible: "amlogic,meson8b"; | ||
15 | |||
12 | Board compatible values: | 16 | Board compatible values: |
13 | - "geniatech,atv1200" | 17 | - "geniatech,atv1200" (Meson6) |
14 | - "minix,neo-x8" | 18 | - "minix,neo-x8" (Meson8) |
19 | - "tronfy,mxq" (Meson8b) | ||
20 | - "hardkernel,odroid-c1" (Meson8b) | ||
diff --git a/Documentation/devicetree/bindings/arm/apm/scu.txt b/Documentation/devicetree/bindings/arm/apm/scu.txt new file mode 100644 index 000000000000..b45be06625fd --- /dev/null +++ b/Documentation/devicetree/bindings/arm/apm/scu.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | APM X-GENE SoC series SCU Registers | ||
2 | |||
3 | This system clock unit contain various register that control block resets, | ||
4 | clock enable/disables, clock divisors and other deepsleep registers. | ||
5 | |||
6 | Properties: | ||
7 | - compatible : should contain two values. First value must be: | ||
8 | - "apm,xgene-scu" | ||
9 | second value must be always "syscon". | ||
10 | |||
11 | - reg : offset and length of the register set. | ||
12 | |||
13 | Example : | ||
14 | scu: system-clk-controller@17000000 { | ||
15 | compatible = "apm,xgene-scu","syscon"; | ||
16 | reg = <0x0 0x17000000 0x0 0x400>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/arm,scpi.txt b/Documentation/devicetree/bindings/arm/arm,scpi.txt new file mode 100644 index 000000000000..86302de67c2c --- /dev/null +++ b/Documentation/devicetree/bindings/arm/arm,scpi.txt | |||
@@ -0,0 +1,188 @@ | |||
1 | System Control and Power Interface (SCPI) Message Protocol | ||
2 | ---------------------------------------------------------- | ||
3 | |||
4 | Firmware implementing the SCPI described in ARM document number ARM DUI 0922B | ||
5 | ("ARM Compute Subsystem SCP: Message Interface Protocols")[0] can be used | ||
6 | by Linux to initiate various system control and power operations. | ||
7 | |||
8 | Required properties: | ||
9 | |||
10 | - compatible : should be "arm,scpi" | ||
11 | - mboxes: List of phandle and mailbox channel specifiers | ||
12 | All the channels reserved by remote SCP firmware for use by | ||
13 | SCPI message protocol should be specified in any order | ||
14 | - shmem : List of phandle pointing to the shared memory(SHM) area between the | ||
15 | processors using these mailboxes for IPC, one for each mailbox | ||
16 | SHM can be any memory reserved for the purpose of this communication | ||
17 | between the processors. | ||
18 | |||
19 | See Documentation/devicetree/bindings/mailbox/mailbox.txt | ||
20 | for more details about the generic mailbox controller and | ||
21 | client driver bindings. | ||
22 | |||
23 | Clock bindings for the clocks based on SCPI Message Protocol | ||
24 | ------------------------------------------------------------ | ||
25 | |||
26 | This binding uses the common clock binding[1]. | ||
27 | |||
28 | Container Node | ||
29 | ============== | ||
30 | Required properties: | ||
31 | - compatible : should be "arm,scpi-clocks" | ||
32 | All the clocks provided by SCP firmware via SCPI message | ||
33 | protocol much be listed as sub-nodes under this node. | ||
34 | |||
35 | Sub-nodes | ||
36 | ========= | ||
37 | Required properties: | ||
38 | - compatible : shall include one of the following | ||
39 | "arm,scpi-dvfs-clocks" - all the clocks that are variable and index based. | ||
40 | These clocks don't provide an entire range of values between the | ||
41 | limits but only discrete points within the range. The firmware | ||
42 | provides the mapping for each such operating frequency and the | ||
43 | index associated with it. The firmware also manages the | ||
44 | voltage scaling appropriately with the clock scaling. | ||
45 | "arm,scpi-variable-clocks" - all the clocks that are variable and provide full | ||
46 | range within the specified range. The firmware provides the | ||
47 | range of values within a specified range. | ||
48 | |||
49 | Other required properties for all clocks(all from common clock binding): | ||
50 | - #clock-cells : Should be 1. Contains the Clock ID value used by SCPI commands. | ||
51 | - clock-output-names : shall be the corresponding names of the outputs. | ||
52 | - clock-indices: The identifying number for the clocks(i.e.clock_id) in the | ||
53 | node. It can be non linear and hence provide the mapping of identifiers | ||
54 | into the clock-output-names array. | ||
55 | |||
56 | SRAM and Shared Memory for SCPI | ||
57 | ------------------------------- | ||
58 | |||
59 | A small area of SRAM is reserved for SCPI communication between application | ||
60 | processors and SCP. | ||
61 | |||
62 | Required properties: | ||
63 | - compatible : should be "arm,juno-sram-ns" for Non-secure SRAM on Juno | ||
64 | |||
65 | The rest of the properties should follow the generic mmio-sram description | ||
66 | found in ../../misc/sysram.txt | ||
67 | |||
68 | Each sub-node represents the reserved area for SCPI. | ||
69 | |||
70 | Required sub-node properties: | ||
71 | - reg : The base offset and size of the reserved area with the SRAM | ||
72 | - compatible : should be "arm,juno-scp-shmem" for Non-secure SRAM based | ||
73 | shared memory on Juno platforms | ||
74 | |||
75 | Sensor bindings for the sensors based on SCPI Message Protocol | ||
76 | -------------------------------------------------------------- | ||
77 | SCPI provides an API to access the various sensors on the SoC. | ||
78 | |||
79 | Required properties: | ||
80 | - compatible : should be "arm,scpi-sensors". | ||
81 | - #thermal-sensor-cells: should be set to 1. This property follows the | ||
82 | thermal device tree bindings[2]. | ||
83 | |||
84 | Valid cell values are raw identifiers (Sensor | ||
85 | ID) as used by the firmware. Refer to | ||
86 | platform documentation for your | ||
87 | implementation for the IDs to use. For Juno | ||
88 | R0 and Juno R1 refer to [3]. | ||
89 | |||
90 | [0] http://infocenter.arm.com/help/topic/com.arm.doc.dui0922b/index.html | ||
91 | [1] Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
92 | [2] Documentation/devicetree/bindings/thermal/thermal.txt | ||
93 | [3] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0922b/apas03s22.html | ||
94 | |||
95 | Example: | ||
96 | |||
97 | sram: sram@50000000 { | ||
98 | compatible = "arm,juno-sram-ns", "mmio-sram"; | ||
99 | reg = <0x0 0x50000000 0x0 0x10000>; | ||
100 | |||
101 | #address-cells = <1>; | ||
102 | #size-cells = <1>; | ||
103 | ranges = <0 0x0 0x50000000 0x10000>; | ||
104 | |||
105 | cpu_scp_lpri: scp-shmem@0 { | ||
106 | compatible = "arm,juno-scp-shmem"; | ||
107 | reg = <0x0 0x200>; | ||
108 | }; | ||
109 | |||
110 | cpu_scp_hpri: scp-shmem@200 { | ||
111 | compatible = "arm,juno-scp-shmem"; | ||
112 | reg = <0x200 0x200>; | ||
113 | }; | ||
114 | }; | ||
115 | |||
116 | mailbox: mailbox0@40000000 { | ||
117 | .... | ||
118 | #mbox-cells = <1>; | ||
119 | }; | ||
120 | |||
121 | scpi_protocol: scpi@2e000000 { | ||
122 | compatible = "arm,scpi"; | ||
123 | mboxes = <&mailbox 0 &mailbox 1>; | ||
124 | shmem = <&cpu_scp_lpri &cpu_scp_hpri>; | ||
125 | |||
126 | clocks { | ||
127 | compatible = "arm,scpi-clocks"; | ||
128 | |||
129 | scpi_dvfs: scpi_clocks@0 { | ||
130 | compatible = "arm,scpi-dvfs-clocks"; | ||
131 | #clock-cells = <1>; | ||
132 | clock-indices = <0>, <1>, <2>; | ||
133 | clock-output-names = "atlclk", "aplclk","gpuclk"; | ||
134 | }; | ||
135 | scpi_clk: scpi_clocks@3 { | ||
136 | compatible = "arm,scpi-variable-clocks"; | ||
137 | #clock-cells = <1>; | ||
138 | clock-indices = <3>, <4>; | ||
139 | clock-output-names = "pxlclk0", "pxlclk1"; | ||
140 | }; | ||
141 | }; | ||
142 | |||
143 | scpi_sensors0: sensors { | ||
144 | compatible = "arm,scpi-sensors"; | ||
145 | #thermal-sensor-cells = <1>; | ||
146 | }; | ||
147 | }; | ||
148 | |||
149 | cpu@0 { | ||
150 | ... | ||
151 | reg = <0 0>; | ||
152 | clocks = <&scpi_dvfs 0>; | ||
153 | }; | ||
154 | |||
155 | hdlcd@7ff60000 { | ||
156 | ... | ||
157 | reg = <0 0x7ff60000 0 0x1000>; | ||
158 | clocks = <&scpi_clk 4>; | ||
159 | }; | ||
160 | |||
161 | thermal-zones { | ||
162 | soc_thermal { | ||
163 | polling-delay-passive = <100>; | ||
164 | polling-delay = <1000>; | ||
165 | |||
166 | /* sensor ID */ | ||
167 | thermal-sensors = <&scpi_sensors0 3>; | ||
168 | ... | ||
169 | }; | ||
170 | }; | ||
171 | |||
172 | In the above example, the #clock-cells is set to 1 as required. | ||
173 | scpi_dvfs has 3 output clocks namely: atlclk, aplclk, and gpuclk with 0, | ||
174 | 1 and 2 as clock-indices. scpi_clk has 2 output clocks namely: pxlclk0 | ||
175 | and pxlclk1 with 3 and 4 as clock-indices. | ||
176 | |||
177 | The first consumer in the example is cpu@0 and it has '0' as the clock | ||
178 | specifier which points to the first entry in the output clocks of | ||
179 | scpi_dvfs i.e. "atlclk". | ||
180 | |||
181 | Similarly the second example is hdlcd@7ff60000 and it has pxlclk1 as input | ||
182 | clock. '4' in the clock specifier here points to the second entry | ||
183 | in the output clocks of scpi_clocks i.e. "pxlclk1" | ||
184 | |||
185 | The thermal-sensors property in the soc_thermal node uses the | ||
186 | temperature sensor provided by SCP firmware to setup a thermal | ||
187 | zone. The ID "3" is the sensor identifier for the temperature sensor | ||
188 | as used by the firmware. | ||
diff --git a/Documentation/devicetree/bindings/arm/bcm/brcm,brcmstb.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,brcmstb.txt index 430608ec09f0..0d0c1ae81bed 100644 --- a/Documentation/devicetree/bindings/arm/bcm/brcm,brcmstb.txt +++ b/Documentation/devicetree/bindings/arm/bcm/brcm,brcmstb.txt | |||
@@ -20,6 +20,25 @@ system control is required: | |||
20 | - compatible: "brcm,bcm<chip_id>-hif-cpubiuctrl", "syscon" | 20 | - compatible: "brcm,bcm<chip_id>-hif-cpubiuctrl", "syscon" |
21 | - compatible: "brcm,bcm<chip_id>-hif-continuation", "syscon" | 21 | - compatible: "brcm,bcm<chip_id>-hif-continuation", "syscon" |
22 | 22 | ||
23 | hif-cpubiuctrl node | ||
24 | ------------------- | ||
25 | SoCs with Broadcom Brahma15 ARM-based CPUs have a specific Bus Interface Unit | ||
26 | (BIU) block which controls and interfaces the CPU complex to the different | ||
27 | Memory Controller Ports (MCP), one per memory controller (MEMC). This BIU block | ||
28 | offers a feature called Write Pairing which consists in collapsing two adjacent | ||
29 | cache lines into a single (bursted) write transaction towards the memory | ||
30 | controller (MEMC) to maximize write bandwidth. | ||
31 | |||
32 | Required properties: | ||
33 | |||
34 | - compatible: must be "brcm,bcm7445-hif-cpubiuctrl", "syscon" | ||
35 | |||
36 | Optional properties: | ||
37 | |||
38 | - brcm,write-pairing: | ||
39 | Boolean property, which when present indicates that the chip | ||
40 | supports write-pairing. | ||
41 | |||
23 | example: | 42 | example: |
24 | rdb { | 43 | rdb { |
25 | #address-cells = <1>; | 44 | #address-cells = <1>; |
@@ -35,6 +54,7 @@ example: | |||
35 | hif_cpubiuctrl: syscon@3e2400 { | 54 | hif_cpubiuctrl: syscon@3e2400 { |
36 | compatible = "brcm,bcm7445-hif-cpubiuctrl", "syscon"; | 55 | compatible = "brcm,bcm7445-hif-cpubiuctrl", "syscon"; |
37 | reg = <0x3e2400 0x5b4>; | 56 | reg = <0x3e2400 0x5b4>; |
57 | brcm,write-pairing; | ||
38 | }; | 58 | }; |
39 | 59 | ||
40 | hif_continuation: syscon@452000 { | 60 | hif_continuation: syscon@452000 { |
@@ -43,8 +63,7 @@ example: | |||
43 | }; | 63 | }; |
44 | }; | 64 | }; |
45 | 65 | ||
46 | Lastly, nodes that allow for support of SMP initialization and reboot are | 66 | Nodes that allow for support of SMP initialization and reboot are required: |
47 | required: | ||
48 | 67 | ||
49 | smpboot | 68 | smpboot |
50 | ------- | 69 | ------- |
@@ -95,3 +114,142 @@ example: | |||
95 | compatible = "brcm,brcmstb-reboot"; | 114 | compatible = "brcm,brcmstb-reboot"; |
96 | syscon = <&sun_top_ctrl 0x304 0x308>; | 115 | syscon = <&sun_top_ctrl 0x304 0x308>; |
97 | }; | 116 | }; |
117 | |||
118 | |||
119 | |||
120 | Power management | ||
121 | ---------------- | ||
122 | |||
123 | For power management (particularly, S2/S3/S5 system suspend), the following SoC | ||
124 | components are needed: | ||
125 | |||
126 | = Always-On control block (AON CTRL) | ||
127 | |||
128 | This hardware provides control registers for the "always-on" (even in low-power | ||
129 | modes) hardware, such as the Power Management State Machine (PMSM). | ||
130 | |||
131 | Required properties: | ||
132 | - compatible : should contain "brcm,brcmstb-aon-ctrl" | ||
133 | - reg : the register start and length for the AON CTRL block | ||
134 | |||
135 | Example: | ||
136 | |||
137 | aon-ctrl@410000 { | ||
138 | compatible = "brcm,brcmstb-aon-ctrl"; | ||
139 | reg = <0x410000 0x400>; | ||
140 | }; | ||
141 | |||
142 | = Memory controllers | ||
143 | |||
144 | A Broadcom STB SoC typically has a number of independent memory controllers, | ||
145 | each of which may have several associated hardware blocks, which are versioned | ||
146 | independently (control registers, DDR PHYs, etc.). One might consider | ||
147 | describing these controllers as a parent "memory controllers" block, which | ||
148 | contains N sub-nodes (one for each controller in the system), each of which is | ||
149 | associated with a number of hardware register resources (e.g., its PHY). See | ||
150 | the example device tree snippet below. | ||
151 | |||
152 | == MEMC (MEMory Controller) | ||
153 | |||
154 | Represents a single memory controller instance. | ||
155 | |||
156 | Required properties: | ||
157 | - compatible : should contain "brcm,brcmstb-memc" and "simple-bus" | ||
158 | |||
159 | Should contain subnodes for any of the following relevant hardware resources: | ||
160 | |||
161 | == DDR PHY control | ||
162 | |||
163 | Control registers for this memory controller's DDR PHY. | ||
164 | |||
165 | Required properties: | ||
166 | - compatible : should contain one of these | ||
167 | "brcm,brcmstb-ddr-phy-v225.1" | ||
168 | "brcm,brcmstb-ddr-phy-v240.1" | ||
169 | "brcm,brcmstb-ddr-phy-v240.2" | ||
170 | |||
171 | - reg : the DDR PHY register range | ||
172 | |||
173 | == DDR SHIMPHY | ||
174 | |||
175 | Control registers for this memory controller's DDR SHIMPHY. | ||
176 | |||
177 | Required properties: | ||
178 | - compatible : should contain "brcm,brcmstb-ddr-shimphy-v1.0" | ||
179 | - reg : the DDR SHIMPHY register range | ||
180 | |||
181 | == MEMC DDR control | ||
182 | |||
183 | Sequencer DRAM parameters and control registers. Used for Self-Refresh | ||
184 | Power-Down (SRPD), among other things. | ||
185 | |||
186 | Required properties: | ||
187 | - compatible : should contain "brcm,brcmstb-memc-ddr" | ||
188 | - reg : the MEMC DDR register range | ||
189 | |||
190 | Example: | ||
191 | |||
192 | memory_controllers { | ||
193 | ranges; | ||
194 | compatible = "simple-bus"; | ||
195 | |||
196 | memc@0 { | ||
197 | compatible = "brcm,brcmstb-memc", "simple-bus"; | ||
198 | ranges; | ||
199 | |||
200 | ddr-phy@f1106000 { | ||
201 | compatible = "brcm,brcmstb-ddr-phy-v240.1"; | ||
202 | reg = <0xf1106000 0x21c>; | ||
203 | }; | ||
204 | |||
205 | shimphy@f1108000 { | ||
206 | compatible = "brcm,brcmstb-ddr-shimphy-v1.0"; | ||
207 | reg = <0xf1108000 0xe4>; | ||
208 | }; | ||
209 | |||
210 | memc-ddr@f1102000 { | ||
211 | reg = <0xf1102000 0x800>; | ||
212 | compatible = "brcm,brcmstb-memc-ddr"; | ||
213 | }; | ||
214 | }; | ||
215 | |||
216 | memc@1 { | ||
217 | compatible = "brcm,brcmstb-memc", "simple-bus"; | ||
218 | ranges; | ||
219 | |||
220 | ddr-phy@f1186000 { | ||
221 | compatible = "brcm,brcmstb-ddr-phy-v240.1"; | ||
222 | reg = <0xf1186000 0x21c>; | ||
223 | }; | ||
224 | |||
225 | shimphy@f1188000 { | ||
226 | compatible = "brcm,brcmstb-ddr-shimphy-v1.0"; | ||
227 | reg = <0xf1188000 0xe4>; | ||
228 | }; | ||
229 | |||
230 | memc-ddr@f1182000 { | ||
231 | reg = <0xf1182000 0x800>; | ||
232 | compatible = "brcm,brcmstb-memc-ddr"; | ||
233 | }; | ||
234 | }; | ||
235 | |||
236 | memc@2 { | ||
237 | compatible = "brcm,brcmstb-memc", "simple-bus"; | ||
238 | ranges; | ||
239 | |||
240 | ddr-phy@f1206000 { | ||
241 | compatible = "brcm,brcmstb-ddr-phy-v240.1"; | ||
242 | reg = <0xf1206000 0x21c>; | ||
243 | }; | ||
244 | |||
245 | shimphy@f1208000 { | ||
246 | compatible = "brcm,brcmstb-ddr-shimphy-v1.0"; | ||
247 | reg = <0xf1208000 0xe4>; | ||
248 | }; | ||
249 | |||
250 | memc-ddr@f1202000 { | ||
251 | reg = <0xf1202000 0x800>; | ||
252 | compatible = "brcm,brcmstb-memc-ddr"; | ||
253 | }; | ||
254 | }; | ||
255 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/bcm/brcm,nsp.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,nsp.txt new file mode 100644 index 000000000000..eae53e4556be --- /dev/null +++ b/Documentation/devicetree/bindings/arm/bcm/brcm,nsp.txt | |||
@@ -0,0 +1,34 @@ | |||
1 | Broadcom Northstar Plus device tree bindings | ||
2 | -------------------------------------------- | ||
3 | |||
4 | Broadcom Northstar Plus family of SoCs are used for switching control | ||
5 | and management applications as well as residential router/gateway | ||
6 | applications. The SoC features dual core Cortex A9 ARM CPUs, integrating | ||
7 | several peripheral interfaces including multiple Gigabit Ethernet PHYs, | ||
8 | DDR3 memory, PCIE Gen-2, USB 2.0 and USB 3.0, serial and NAND flash, | ||
9 | SATA and several other IO controllers. | ||
10 | |||
11 | Boards with Northstar Plus SoCs shall have the following properties: | ||
12 | |||
13 | Required root node property: | ||
14 | |||
15 | BCM58522 | ||
16 | compatible = "brcm,bcm58522", "brcm,nsp"; | ||
17 | |||
18 | BCM58525 | ||
19 | compatible = "brcm,bcm58525", "brcm,nsp"; | ||
20 | |||
21 | BCM58535 | ||
22 | compatible = "brcm,bcm58535", "brcm,nsp"; | ||
23 | |||
24 | BCM58622 | ||
25 | compatible = "brcm,bcm58622", "brcm,nsp"; | ||
26 | |||
27 | BCM58623 | ||
28 | compatible = "brcm,bcm58623", "brcm,nsp"; | ||
29 | |||
30 | BCM58625 | ||
31 | compatible = "brcm,bcm58625", "brcm,nsp"; | ||
32 | |||
33 | BCM88312 | ||
34 | compatible = "brcm,bcm88312", "brcm,nsp"; | ||
diff --git a/Documentation/devicetree/bindings/arm/coherency-fabric.txt b/Documentation/devicetree/bindings/arm/coherency-fabric.txt index 8dd46617c889..9b5c3f620e65 100644 --- a/Documentation/devicetree/bindings/arm/coherency-fabric.txt +++ b/Documentation/devicetree/bindings/arm/coherency-fabric.txt | |||
@@ -27,6 +27,11 @@ Required properties: | |||
27 | * For "marvell,armada-380-coherency-fabric", only one pair is needed | 27 | * For "marvell,armada-380-coherency-fabric", only one pair is needed |
28 | for the per-CPU fabric registers. | 28 | for the per-CPU fabric registers. |
29 | 29 | ||
30 | Optional properties: | ||
31 | |||
32 | - broken-idle: boolean to set when the Idle mode is not supported by the | ||
33 | hardware. | ||
34 | |||
30 | Examples: | 35 | Examples: |
31 | 36 | ||
32 | coherency-fabric@d0020200 { | 37 | coherency-fabric@d0020200 { |
diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt index 91e6e5c478d0..3a07a87fef20 100644 --- a/Documentation/devicetree/bindings/arm/cpus.txt +++ b/Documentation/devicetree/bindings/arm/cpus.txt | |||
@@ -195,6 +195,8 @@ nodes to be present and contain the properties described below. | |||
195 | "marvell,armada-380-smp" | 195 | "marvell,armada-380-smp" |
196 | "marvell,armada-390-smp" | 196 | "marvell,armada-390-smp" |
197 | "marvell,armada-xp-smp" | 197 | "marvell,armada-xp-smp" |
198 | "mediatek,mt6589-smp" | ||
199 | "mediatek,mt81xx-tz-smp" | ||
198 | "qcom,gcc-msm8660" | 200 | "qcom,gcc-msm8660" |
199 | "qcom,kpss-acc-v1" | 201 | "qcom,kpss-acc-v1" |
200 | "qcom,kpss-acc-v2" | 202 | "qcom,kpss-acc-v2" |
diff --git a/Documentation/devicetree/bindings/arm/fsl.txt b/Documentation/devicetree/bindings/arm/fsl.txt index 2a3ba73f0c5c..34c88b0c7ab4 100644 --- a/Documentation/devicetree/bindings/arm/fsl.txt +++ b/Documentation/devicetree/bindings/arm/fsl.txt | |||
@@ -128,10 +128,18 @@ Example: | |||
128 | reg = <0x0 0x1ee0000 0x0 0x10000>; | 128 | reg = <0x0 0x1ee0000 0x0 0x10000>; |
129 | }; | 129 | }; |
130 | 130 | ||
131 | Freescale LS2085A SoC Device Tree Bindings | 131 | Freescale ARMv8 based Layerscape SoC family Device Tree Bindings |
132 | ------------------------------------------ | 132 | ---------------------------------------------------------------- |
133 | 133 | ||
134 | LS2085A ARMv8 based Simulator model | 134 | LS2080A ARMv8 based Simulator model |
135 | Required root node properties: | 135 | Required root node properties: |
136 | - compatible = "fsl,ls2085a-simu", "fsl,ls2085a"; | 136 | - compatible = "fsl,ls2080a-simu", "fsl,ls2080a"; |
137 | |||
138 | LS2080A ARMv8 based QDS Board | ||
139 | Required root node properties: | ||
140 | - compatible = "fsl,ls2080a-qds", "fsl,ls2080a"; | ||
141 | |||
142 | LS2080A ARMv8 based RDB Board | ||
143 | Required root node properties: | ||
144 | - compatible = "fsl,ls2080a-rdb", "fsl,ls2080a"; | ||
137 | 145 | ||
diff --git a/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt b/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt index c733e28e18e5..6ac7c000af22 100644 --- a/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt +++ b/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt | |||
@@ -20,6 +20,10 @@ HiKey Board | |||
20 | Required root node properties: | 20 | Required root node properties: |
21 | - compatible = "hisilicon,hi6220-hikey", "hisilicon,hi6220"; | 21 | - compatible = "hisilicon,hi6220-hikey", "hisilicon,hi6220"; |
22 | 22 | ||
23 | HiP05 D02 Board | ||
24 | Required root node properties: | ||
25 | - compatible = "hisilicon,hip05-d02"; | ||
26 | |||
23 | Hisilicon system controller | 27 | Hisilicon system controller |
24 | 28 | ||
25 | Required properties: | 29 | Required properties: |
@@ -167,6 +171,23 @@ Example: | |||
167 | }; | 171 | }; |
168 | 172 | ||
169 | ----------------------------------------------------------------------- | 173 | ----------------------------------------------------------------------- |
174 | Hisilicon HiP05 PCIe-SAS system controller | ||
175 | |||
176 | Required properties: | ||
177 | - compatible : "hisilicon,pcie-sas-subctrl", "syscon"; | ||
178 | - reg : Register address and size | ||
179 | |||
180 | The HiP05 PCIe-SAS system controller is shared by PCIe and SAS controllers in | ||
181 | HiP05 Soc to implement some basic configurations. | ||
182 | |||
183 | Example: | ||
184 | /* for HiP05 PCIe-SAS system */ | ||
185 | pcie_sas: system_controller@0xb0000000 { | ||
186 | compatible = "hisilicon,pcie-sas-subctrl", "syscon"; | ||
187 | reg = <0xb0000000 0x10000>; | ||
188 | }; | ||
189 | |||
190 | ----------------------------------------------------------------------- | ||
170 | Hisilicon CPU controller | 191 | Hisilicon CPU controller |
171 | 192 | ||
172 | Required properties: | 193 | Required properties: |
diff --git a/Documentation/devicetree/bindings/arm/idle-states.txt b/Documentation/devicetree/bindings/arm/idle-states.txt index a8274eabae2e..b8e41c148a3c 100644 --- a/Documentation/devicetree/bindings/arm/idle-states.txt +++ b/Documentation/devicetree/bindings/arm/idle-states.txt | |||
@@ -497,7 +497,7 @@ cpus { | |||
497 | }; | 497 | }; |
498 | 498 | ||
499 | idle-states { | 499 | idle-states { |
500 | entry-method = "arm,psci"; | 500 | entry-method = "psci"; |
501 | 501 | ||
502 | CPU_RETENTION_0_0: cpu-retention-0-0 { | 502 | CPU_RETENTION_0_0: cpu-retention-0-0 { |
503 | compatible = "arm,idle-state"; | 503 | compatible = "arm,idle-state"; |
diff --git a/Documentation/devicetree/bindings/arm/keystone/keystone.txt b/Documentation/devicetree/bindings/arm/keystone/keystone.txt index 59d7a46f85eb..3090a8a008c0 100644 --- a/Documentation/devicetree/bindings/arm/keystone/keystone.txt +++ b/Documentation/devicetree/bindings/arm/keystone/keystone.txt | |||
@@ -9,12 +9,26 @@ Required properties: | |||
9 | the form "ti,keystone-*". Generic devices like gic, arch_timers, ns16550 | 9 | the form "ti,keystone-*". Generic devices like gic, arch_timers, ns16550 |
10 | type UART should use the specified compatible for those devices. | 10 | type UART should use the specified compatible for those devices. |
11 | 11 | ||
12 | SoC families: | ||
13 | |||
14 | - Keystone 2 generic SoC: | ||
15 | compatible = "ti,keystone" | ||
16 | |||
17 | SoCs: | ||
18 | |||
19 | - Keystone 2 Hawking/Kepler | ||
20 | compatible = "ti,k2hk", "ti,keystone" | ||
21 | - Keystone 2 Lamarr | ||
22 | compatible = "ti,k2l", "ti,keystone" | ||
23 | - Keystone 2 Edison | ||
24 | compatible = "ti,k2e", "ti,keystone" | ||
25 | |||
12 | Boards: | 26 | Boards: |
13 | - Keystone 2 Hawking/Kepler EVM | 27 | - Keystone 2 Hawking/Kepler EVM |
14 | compatible = "ti,k2hk-evm","ti,keystone" | 28 | compatible = "ti,k2hk-evm", "ti,k2hk", "ti,keystone" |
15 | 29 | ||
16 | - Keystone 2 Lamarr EVM | 30 | - Keystone 2 Lamarr EVM |
17 | compatible = "ti,k2l-evm","ti,keystone" | 31 | compatible = "ti,k2l-evm", "ti, k2l", "ti,keystone" |
18 | 32 | ||
19 | - Keystone 2 Edison EVM | 33 | - Keystone 2 Edison EVM |
20 | compatible = "ti,k2e-evm","ti,keystone" | 34 | compatible = "ti,k2e-evm", "ti,k2e", "ti,keystone" |
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt new file mode 100644 index 000000000000..b1f2ce17dff8 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | Mediatek imgsys controller | ||
2 | ============================ | ||
3 | |||
4 | The Mediatek imgsys controller provides various clocks to the system. | ||
5 | |||
6 | Required Properties: | ||
7 | |||
8 | - compatible: Should be: | ||
9 | - "mediatek,mt8173-imgsys", "syscon" | ||
10 | - #clock-cells: Must be 1 | ||
11 | |||
12 | The imgsys controller uses the common clk binding from | ||
13 | Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
14 | The available clocks are defined in dt-bindings/clock/mt*-clk.h. | ||
15 | |||
16 | Example: | ||
17 | |||
18 | imgsys: clock-controller@15000000 { | ||
19 | compatible = "mediatek,mt8173-imgsys", "syscon"; | ||
20 | reg = <0 0x15000000 0 0x1000>; | ||
21 | #clock-cells = <1>; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt new file mode 100644 index 000000000000..4385946eadef --- /dev/null +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | Mediatek mmsys controller | ||
2 | ============================ | ||
3 | |||
4 | The Mediatek mmsys controller provides various clocks to the system. | ||
5 | |||
6 | Required Properties: | ||
7 | |||
8 | - compatible: Should be: | ||
9 | - "mediatek,mt8173-mmsys", "syscon" | ||
10 | - #clock-cells: Must be 1 | ||
11 | |||
12 | The mmsys controller uses the common clk binding from | ||
13 | Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
14 | The available clocks are defined in dt-bindings/clock/mt*-clk.h. | ||
15 | |||
16 | Example: | ||
17 | |||
18 | mmsys: clock-controller@14000000 { | ||
19 | compatible = "mediatek,mt8173-mmsys", "syscon"; | ||
20 | reg = <0 0x14000000 0 0x1000>; | ||
21 | #clock-cells = <1>; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt new file mode 100644 index 000000000000..1faacf1c1b25 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | Mediatek vdecsys controller | ||
2 | ============================ | ||
3 | |||
4 | The Mediatek vdecsys controller provides various clocks to the system. | ||
5 | |||
6 | Required Properties: | ||
7 | |||
8 | - compatible: Should be: | ||
9 | - "mediatek,mt8173-vdecsys", "syscon" | ||
10 | - #clock-cells: Must be 1 | ||
11 | |||
12 | The vdecsys controller uses the common clk binding from | ||
13 | Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
14 | The available clocks are defined in dt-bindings/clock/mt*-clk.h. | ||
15 | |||
16 | Example: | ||
17 | |||
18 | vdecsys: clock-controller@16000000 { | ||
19 | compatible = "mediatek,mt8173-vdecsys", "syscon"; | ||
20 | reg = <0 0x16000000 0 0x1000>; | ||
21 | #clock-cells = <1>; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencltsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencltsys.txt new file mode 100644 index 000000000000..3cc299fd7857 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencltsys.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | Mediatek vencltsys controller | ||
2 | ============================ | ||
3 | |||
4 | The Mediatek vencltsys controller provides various clocks to the system. | ||
5 | |||
6 | Required Properties: | ||
7 | |||
8 | - compatible: Should be: | ||
9 | - "mediatek,mt8173-vencltsys", "syscon" | ||
10 | - #clock-cells: Must be 1 | ||
11 | |||
12 | The vencltsys controller uses the common clk binding from | ||
13 | Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
14 | The available clocks are defined in dt-bindings/clock/mt*-clk.h. | ||
15 | |||
16 | Example: | ||
17 | |||
18 | vencltsys: clock-controller@19000000 { | ||
19 | compatible = "mediatek,mt8173-vencltsys", "syscon"; | ||
20 | reg = <0 0x19000000 0 0x1000>; | ||
21 | #clock-cells = <1>; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt new file mode 100644 index 000000000000..5bb2866a2b50 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | Mediatek vencsys controller | ||
2 | ============================ | ||
3 | |||
4 | The Mediatek vencsys controller provides various clocks to the system. | ||
5 | |||
6 | Required Properties: | ||
7 | |||
8 | - compatible: Should be: | ||
9 | - "mediatek,mt8173-vencsys", "syscon" | ||
10 | - #clock-cells: Must be 1 | ||
11 | |||
12 | The vencsys controller uses the common clk binding from | ||
13 | Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
14 | The available clocks are defined in dt-bindings/clock/mt*-clk.h. | ||
15 | |||
16 | Example: | ||
17 | |||
18 | vencsys: clock-controller@18000000 { | ||
19 | compatible = "mediatek,mt8173-vencsys", "syscon"; | ||
20 | reg = <0 0x18000000 0 0x1000>; | ||
21 | #clock-cells = <1>; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/mvebu-cpu-config.txt b/Documentation/devicetree/bindings/arm/mvebu-cpu-config.txt new file mode 100644 index 000000000000..2cdcd716da40 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/mvebu-cpu-config.txt | |||
@@ -0,0 +1,20 @@ | |||
1 | MVEBU CPU Config registers | ||
2 | -------------------------- | ||
3 | |||
4 | MVEBU (Marvell SOCs: Armada 370/XP) | ||
5 | |||
6 | Required properties: | ||
7 | |||
8 | - compatible: one of: | ||
9 | - "marvell,armada-370-cpu-config" | ||
10 | - "marvell,armada-xp-cpu-config" | ||
11 | |||
12 | - reg: Should contain CPU config registers location and length, in | ||
13 | their per-CPU variant | ||
14 | |||
15 | Example: | ||
16 | |||
17 | cpu-config@21000 { | ||
18 | compatible = "marvell,armada-xp-cpu-config"; | ||
19 | reg = <0x21000 0x8>; | ||
20 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/pmu.txt b/Documentation/devicetree/bindings/arm/pmu.txt index 435251fa9ce0..97ba45af04fc 100644 --- a/Documentation/devicetree/bindings/arm/pmu.txt +++ b/Documentation/devicetree/bindings/arm/pmu.txt | |||
@@ -7,7 +7,10 @@ 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 | "apm,potenza-pmu" | ||
10 | "arm,armv8-pmuv3" | 11 | "arm,armv8-pmuv3" |
12 | "arm.cortex-a57-pmu" | ||
13 | "arm.cortex-a53-pmu" | ||
11 | "arm,cortex-a17-pmu" | 14 | "arm,cortex-a17-pmu" |
12 | "arm,cortex-a15-pmu" | 15 | "arm,cortex-a15-pmu" |
13 | "arm,cortex-a12-pmu" | 16 | "arm,cortex-a12-pmu" |
diff --git a/Documentation/devicetree/bindings/arm/psci.txt b/Documentation/devicetree/bindings/arm/psci.txt index 5aa40ede0e99..a9adab84e2fe 100644 --- a/Documentation/devicetree/bindings/arm/psci.txt +++ b/Documentation/devicetree/bindings/arm/psci.txt | |||
@@ -31,6 +31,10 @@ Main node required properties: | |||
31 | support, but are permitted to be present for compatibility with | 31 | support, but are permitted to be present for compatibility with |
32 | existing software when "arm,psci" is later in the compatible list. | 32 | existing software when "arm,psci" is later in the compatible list. |
33 | 33 | ||
34 | * "arm,psci-1.0" : for implementations complying to PSCI 1.0. PSCI 1.0 is | ||
35 | backward compatible with PSCI 0.2 with minor specification updates, | ||
36 | as defined in the PSCI specification[2]. | ||
37 | |||
34 | - method : The method of calling the PSCI firmware. Permitted | 38 | - method : The method of calling the PSCI firmware. Permitted |
35 | values are: | 39 | values are: |
36 | 40 | ||
@@ -100,3 +104,5 @@ Case 3: PSCI v0.2 and PSCI v0.1. | |||
100 | 104 | ||
101 | [1] Kernel documentation - ARM idle states bindings | 105 | [1] Kernel documentation - ARM idle states bindings |
102 | Documentation/devicetree/bindings/arm/idle-states.txt | 106 | Documentation/devicetree/bindings/arm/idle-states.txt |
107 | [2] Power State Coordination Interface (PSCI) specification | ||
108 | http://infocenter.arm.com/help/topic/com.arm.doc.den0022c/DEN0022C_Power_State_Coordination_Interface.pdf | ||
diff --git a/Documentation/devicetree/bindings/arm/rockchip.txt b/Documentation/devicetree/bindings/arm/rockchip.txt index af58cd74aeff..8e985dd2f181 100644 --- a/Documentation/devicetree/bindings/arm/rockchip.txt +++ b/Documentation/devicetree/bindings/arm/rockchip.txt | |||
@@ -17,6 +17,10 @@ Rockchip platforms device tree bindings | |||
17 | Required root node properties: | 17 | Required root node properties: |
18 | - compatible = "radxa,rock", "rockchip,rk3188"; | 18 | - compatible = "radxa,rock", "rockchip,rk3188"; |
19 | 19 | ||
20 | - Radxa Rock2 Square board: | ||
21 | Required root node properties: | ||
22 | - compatible = "radxa,rock2-square", "rockchip,rk3288"; | ||
23 | |||
20 | - Firefly Firefly-RK3288 board: | 24 | - Firefly Firefly-RK3288 board: |
21 | Required root node properties: | 25 | Required root node properties: |
22 | - compatible = "firefly,firefly-rk3288", "rockchip,rk3288"; | 26 | - compatible = "firefly,firefly-rk3288", "rockchip,rk3288"; |
@@ -31,6 +35,13 @@ Rockchip platforms device tree bindings | |||
31 | Required root node properties: | 35 | Required root node properties: |
32 | - compatible = "netxeon,r89", "rockchip,rk3288"; | 36 | - compatible = "netxeon,r89", "rockchip,rk3288"; |
33 | 37 | ||
38 | - Google Jaq (Haier Chromebook 11 and more): | ||
39 | Required root node properties: | ||
40 | - compatible = "google,veyron-jaq-rev5", "google,veyron-jaq-rev4", | ||
41 | "google,veyron-jaq-rev3", "google,veyron-jaq-rev2", | ||
42 | "google,veyron-jaq-rev1", "google,veyron-jaq", | ||
43 | "google,veyron", "rockchip,rk3288"; | ||
44 | |||
34 | - Google Jerry (Hisense Chromebook C11 and more): | 45 | - Google Jerry (Hisense Chromebook C11 and more): |
35 | Required root node properties: | 46 | Required root node properties: |
36 | - compatible = "google,veyron-jerry-rev7", "google,veyron-jerry-rev6", | 47 | - compatible = "google,veyron-jerry-rev7", "google,veyron-jerry-rev6", |
diff --git a/Documentation/devicetree/bindings/arm/samsung-boards.txt b/Documentation/devicetree/bindings/arm/samsung-boards.txt deleted file mode 100644 index 43589d2466a7..000000000000 --- a/Documentation/devicetree/bindings/arm/samsung-boards.txt +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | * Samsung's Exynos SoC based boards | ||
2 | |||
3 | Required root node properties: | ||
4 | - compatible = should be one or more of the following. | ||
5 | - "samsung,monk" - for Exynos3250-based Samsung Simband board. | ||
6 | - "samsung,rinato" - for Exynos3250-based Samsung Gear2 board. | ||
7 | - "samsung,smdkv310" - for Exynos4210-based Samsung SMDKV310 eval board. | ||
8 | - "samsung,trats" - for Exynos4210-based Tizen Reference board. | ||
9 | - "samsung,universal_c210" - for Exynos4210-based Samsung board. | ||
10 | - "samsung,smdk4412", - for Exynos4412-based Samsung SMDK4412 eval board. | ||
11 | - "samsung,trats2" - for Exynos4412-based Tizen Reference board. | ||
12 | - "samsung,smdk5250" - for Exynos5250-based Samsung SMDK5250 eval board. | ||
13 | - "samsung,xyref5260" - for Exynos5260-based Samsung board. | ||
14 | - "samsung,smdk5410" - for Exynos5410-based Samsung SMDK5410 eval board. | ||
15 | - "samsung,smdk5420" - for Exynos5420-based Samsung SMDK5420 eval board. | ||
16 | - "samsung,sd5v1" - for Exynos5440-based Samsung board. | ||
17 | - "samsung,ssdk5440" - for Exynos5440-based Samsung board. | ||
18 | |||
19 | Optional: | ||
20 | - firmware node, specifying presence and type of secure firmware: | ||
21 | - compatible: only "samsung,secure-firmware" is currently supported | ||
22 | - reg: address of non-secure SYSRAM used for communication with firmware | ||
23 | |||
24 | firmware@0203F000 { | ||
25 | compatible = "samsung,secure-firmware"; | ||
26 | reg = <0x0203F000 0x1000>; | ||
27 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt b/Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt new file mode 100644 index 000000000000..12129c011c8f --- /dev/null +++ b/Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt | |||
@@ -0,0 +1,69 @@ | |||
1 | * Samsung's Exynos SoC based boards | ||
2 | |||
3 | Required root node properties: | ||
4 | - compatible = should be one or more of the following. | ||
5 | - "samsung,monk" - for Exynos3250-based Samsung Simband board. | ||
6 | - "samsung,rinato" - for Exynos3250-based Samsung Gear2 board. | ||
7 | - "samsung,smdkv310" - for Exynos4210-based Samsung SMDKV310 eval board. | ||
8 | - "samsung,trats" - for Exynos4210-based Tizen Reference board. | ||
9 | - "samsung,universal_c210" - for Exynos4210-based Samsung board. | ||
10 | - "samsung,smdk4412", - for Exynos4412-based Samsung SMDK4412 eval board. | ||
11 | - "samsung,trats2" - for Exynos4412-based Tizen Reference board. | ||
12 | - "samsung,smdk5250" - for Exynos5250-based Samsung SMDK5250 eval board. | ||
13 | - "samsung,xyref5260" - for Exynos5260-based Samsung board. | ||
14 | - "samsung,smdk5410" - for Exynos5410-based Samsung SMDK5410 eval board. | ||
15 | - "samsung,smdk5420" - for Exynos5420-based Samsung SMDK5420 eval board. | ||
16 | - "samsung,sd5v1" - for Exynos5440-based Samsung board. | ||
17 | - "samsung,ssdk5440" - for Exynos5440-based Samsung board. | ||
18 | |||
19 | * Other companies Exynos SoC based | ||
20 | * FriendlyARM | ||
21 | - "friendlyarm,tiny4412" - for Exynos4412-based FriendlyARM | ||
22 | TINY4412 board. | ||
23 | |||
24 | |||
25 | - "google,pi" - for Exynos5800-based Google Peach Pi | ||
26 | Rev 10+ board, | ||
27 | also: "google,pi-rev16", "google,pi-rev15", "google,pi-rev14", | ||
28 | "google,pi-rev13", "google,pi-rev12", "google,pi-rev11", | ||
29 | "google,pi-rev10", "google,peach". | ||
30 | |||
31 | - "google,pit" - for Exynos5420-based Google Peach Pit | ||
32 | Rev 6+ (Exynos5420), | ||
33 | also: "google,pit-rev16", "google,pit-rev15", "google,pit-rev14", | ||
34 | "google,pit-rev13", "google,pit-rev12", "google,pit-rev11", | ||
35 | "google,pit-rev10", "google,pit-rev9", "google,pit-rev8", | ||
36 | "google,pit-rev7", "google,pit-rev6", "google,peach". | ||
37 | |||
38 | - "google,snow-rev4" - for Exynos5250-based Google Snow board, | ||
39 | also: "google,snow" | ||
40 | - "google,snow-rev5" - for Exynos5250-based Google Snow | ||
41 | Rev 5+ board. | ||
42 | - "google,spring" - for Exynos5250-based Google Spring board. | ||
43 | |||
44 | * Hardkernel | ||
45 | - "hardkernel,odroid-u3" - for Exynos4412-based Hardkernel Odroid U3. | ||
46 | - "hardkernel,odroid-x" - for Exynos4412-based Hardkernel Odroid X. | ||
47 | - "hardkernel,odroid-x2" - for Exynos4412-based Hardkernel Odroid X2. | ||
48 | - "hardkernel,odroid-xu3" - for Exynos5422-based Hardkernel Odroid XU3. | ||
49 | - "hardkernel,odroid-xu3-lite" - for Exynos5422-based Hardkernel | ||
50 | Odroid XU3 Lite board. | ||
51 | - "hardkernel,odroid-xu4" - for Exynos5422-based Hardkernel Odroid XU4. | ||
52 | |||
53 | * Insignal | ||
54 | - "insignal,arndale" - for Exynos5250-based Insignal Arndale board. | ||
55 | - "insignal,arndale-octa" - for Exynos5420-based Insignal Arndale | ||
56 | Octa board. | ||
57 | - "insignal,origen" - for Exynos4210-based Insignal Origen board. | ||
58 | - "insignal,origen4412 - for Exynos4412-based Insignal Origen board. | ||
59 | |||
60 | |||
61 | Optional nodes: | ||
62 | - firmware node, specifying presence and type of secure firmware: | ||
63 | - compatible: only "samsung,secure-firmware" is currently supported | ||
64 | - reg: address of non-secure SYSRAM used for communication with firmware | ||
65 | |||
66 | firmware@0203F000 { | ||
67 | compatible = "samsung,secure-firmware"; | ||
68 | reg = <0x0203F000 0x1000>; | ||
69 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/shmobile.txt b/Documentation/devicetree/bindings/arm/shmobile.txt index c4f19b2e7dd9..40bb9007cd0d 100644 --- a/Documentation/devicetree/bindings/arm/shmobile.txt +++ b/Documentation/devicetree/bindings/arm/shmobile.txt | |||
@@ -39,8 +39,6 @@ Boards: | |||
39 | compatible = "renesas,armadillo800eva" | 39 | compatible = "renesas,armadillo800eva" |
40 | - BOCK-W | 40 | - BOCK-W |
41 | compatible = "renesas,bockw", "renesas,r8a7778" | 41 | compatible = "renesas,bockw", "renesas,r8a7778" |
42 | - BOCK-W - Reference Device Tree Implementation | ||
43 | compatible = "renesas,bockw-reference", "renesas,r8a7778" | ||
44 | - Genmai (RTK772100BC00000BR) | 42 | - Genmai (RTK772100BC00000BR) |
45 | compatible = "renesas,genmai", "renesas,r7s72100" | 43 | compatible = "renesas,genmai", "renesas,r7s72100" |
46 | - Gose | 44 | - Gose |
@@ -57,7 +55,7 @@ Boards: | |||
57 | compatible = "renesas,lager", "renesas,r8a7790" | 55 | compatible = "renesas,lager", "renesas,r8a7790" |
58 | - Marzen | 56 | - Marzen |
59 | compatible = "renesas,marzen", "renesas,r8a7779" | 57 | compatible = "renesas,marzen", "renesas,r8a7779" |
60 | 58 | - Porter (M2-LCDP) | |
61 | Note: Reference Device Tree Implementations are temporary implementations | 59 | compatible = "renesas,porter", "renesas,r8a7791" |
62 | to ease the migration from platform devices to Device Tree, and are | 60 | - SILK (RTP0RC7794LCB00011S) |
63 | intended to be removed in the future. | 61 | compatible = "renesas,silk", "renesas,r8a7794" |
diff --git a/Documentation/devicetree/bindings/arm/sunxi.txt b/Documentation/devicetree/bindings/arm/sunxi.txt index 67da20539540..bb9b0faa919d 100644 --- a/Documentation/devicetree/bindings/arm/sunxi.txt +++ b/Documentation/devicetree/bindings/arm/sunxi.txt | |||
@@ -6,6 +6,7 @@ using one of the following compatible strings: | |||
6 | allwinner,sun4i-a10 | 6 | allwinner,sun4i-a10 |
7 | allwinner,sun5i-a10s | 7 | allwinner,sun5i-a10s |
8 | allwinner,sun5i-a13 | 8 | allwinner,sun5i-a13 |
9 | allwinner,sun5i-r8 | ||
9 | allwinner,sun6i-a31 | 10 | allwinner,sun6i-a31 |
10 | allwinner,sun7i-a20 | 11 | allwinner,sun7i-a20 |
11 | allwinner,sun8i-a23 | 12 | allwinner,sun8i-a23 |
diff --git a/Documentation/devicetree/bindings/nvec/nvidia,nvec.txt b/Documentation/devicetree/bindings/arm/tegra/nvidia,nvec.txt index 5ae601e7f51f..5ae601e7f51f 100644 --- a/Documentation/devicetree/bindings/nvec/nvidia,nvec.txt +++ b/Documentation/devicetree/bindings/arm/tegra/nvidia,nvec.txt | |||
diff --git a/Documentation/devicetree/bindings/arm/twd.txt b/Documentation/devicetree/bindings/arm/twd.txt index 75b8610939fa..383ea19c2bf0 100644 --- a/Documentation/devicetree/bindings/arm/twd.txt +++ b/Documentation/devicetree/bindings/arm/twd.txt | |||
@@ -19,6 +19,11 @@ interrupts. | |||
19 | - reg : Specify the base address and the size of the TWD timer | 19 | - reg : Specify the base address and the size of the TWD timer |
20 | register window. | 20 | register window. |
21 | 21 | ||
22 | Optional | ||
23 | |||
24 | - always-on : a boolean property. If present, the timer is powered through | ||
25 | an always-on power domain, therefore it never loses context. | ||
26 | |||
22 | Example: | 27 | Example: |
23 | 28 | ||
24 | twd-timer@2c000600 { | 29 | twd-timer@2c000600 { |
diff --git a/Documentation/devicetree/bindings/arm/uniphier/cache-uniphier.txt b/Documentation/devicetree/bindings/arm/uniphier/cache-uniphier.txt new file mode 100644 index 000000000000..d27a646f48a9 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/uniphier/cache-uniphier.txt | |||
@@ -0,0 +1,60 @@ | |||
1 | UniPhier outer cache controller | ||
2 | |||
3 | UniPhier SoCs are integrated with a full-custom outer cache controller system. | ||
4 | All of them have a level 2 cache controller, and some have a level 3 cache | ||
5 | controller as well. | ||
6 | |||
7 | Required properties: | ||
8 | - compatible: should be "socionext,uniphier-system-cache" | ||
9 | - reg: offsets and lengths of the register sets for the device. It should | ||
10 | contain 3 regions: control register, revision register, operation register, | ||
11 | in this order. | ||
12 | - cache-unified: specifies the cache is a unified cache. | ||
13 | - cache-size: specifies the size in bytes of the cache | ||
14 | - cache-sets: specifies the number of associativity sets of the cache | ||
15 | - cache-line-size: specifies the line size in bytes | ||
16 | - cache-level: specifies the level in the cache hierarchy. The value should | ||
17 | be 2 for L2 cache, 3 for L3 cache, etc. | ||
18 | |||
19 | Optional properties: | ||
20 | - next-level-cache: phandle to the next level cache if present. The next level | ||
21 | cache should be also compatible with "socionext,uniphier-system-cache". | ||
22 | |||
23 | The L2 cache must exist to use the L3 cache; the cache hierarchy must be | ||
24 | indicated correctly with "next-level-cache" properties. | ||
25 | |||
26 | Example 1 (system with L2): | ||
27 | l2: l2-cache@500c0000 { | ||
28 | compatible = "socionext,uniphier-system-cache"; | ||
29 | reg = <0x500c0000 0x2000>, <0x503c0100 0x4>, | ||
30 | <0x506c0000 0x400>; | ||
31 | cache-unified; | ||
32 | cache-size = <0x80000>; | ||
33 | cache-sets = <256>; | ||
34 | cache-line-size = <128>; | ||
35 | cache-level = <2>; | ||
36 | }; | ||
37 | |||
38 | Example 2 (system with L2 and L3): | ||
39 | l2: l2-cache@500c0000 { | ||
40 | compatible = "socionext,uniphier-system-cache"; | ||
41 | reg = <0x500c0000 0x2000>, <0x503c0100 0x8>, | ||
42 | <0x506c0000 0x400>; | ||
43 | cache-unified; | ||
44 | cache-size = <0x200000>; | ||
45 | cache-sets = <512>; | ||
46 | cache-line-size = <128>; | ||
47 | cache-level = <2>; | ||
48 | next-level-cache = <&l3>; | ||
49 | }; | ||
50 | |||
51 | l3: l3-cache@500c8000 { | ||
52 | compatible = "socionext,uniphier-system-cache"; | ||
53 | reg = <0x500c8000 0x2000>, <0x503c8100 0x8>, | ||
54 | <0x506c8000 0x400>; | ||
55 | cache-unified; | ||
56 | cache-size = <0x400000>; | ||
57 | cache-sets = <512>; | ||
58 | cache-line-size = <256>; | ||
59 | cache-level = <3>; | ||
60 | }; | ||
diff --git a/Documentation/devicetree/bindings/ata/ahci-fsl-qoriq.txt b/Documentation/devicetree/bindings/ata/ahci-fsl-qoriq.txt new file mode 100644 index 000000000000..032a7606b862 --- /dev/null +++ b/Documentation/devicetree/bindings/ata/ahci-fsl-qoriq.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | Binding for Freescale QorIQ AHCI SATA Controller | ||
2 | |||
3 | Required properties: | ||
4 | - reg: Physical base address and size of the controller's register area. | ||
5 | - compatible: Compatibility string. Must be 'fsl,<chip>-ahci', where | ||
6 | chip could be ls1021a, ls2080a, ls1043a etc. | ||
7 | - clocks: Input clock specifier. Refer to common clock bindings. | ||
8 | - interrupts: Interrupt specifier. Refer to interrupt binding. | ||
9 | |||
10 | Optional properties: | ||
11 | - dma-coherent: Enable AHCI coherent DMA operation. | ||
12 | - reg-names: register area names when there are more than 1 register area. | ||
13 | |||
14 | Examples: | ||
15 | sata@3200000 { | ||
16 | compatible = "fsl,ls1021a-ahci"; | ||
17 | reg = <0x0 0x3200000 0x0 0x10000>; | ||
18 | interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>; | ||
19 | clocks = <&platform_clk 1>; | ||
20 | dma-coherent; | ||
21 | }; | ||
diff --git a/Documentation/devicetree/bindings/ata/ahci-platform.txt b/Documentation/devicetree/bindings/ata/ahci-platform.txt index a2321819e7f5..c2340eeeb97f 100644 --- a/Documentation/devicetree/bindings/ata/ahci-platform.txt +++ b/Documentation/devicetree/bindings/ata/ahci-platform.txt | |||
@@ -16,8 +16,6 @@ Required properties: | |||
16 | - "snps,dwc-ahci" | 16 | - "snps,dwc-ahci" |
17 | - "snps,exynos5440-ahci" | 17 | - "snps,exynos5440-ahci" |
18 | - "snps,spear-ahci" | 18 | - "snps,spear-ahci" |
19 | - "fsl,qoriq-ahci" : for qoriq series socs which include ls1021, ls2085, etc. | ||
20 | - "fsl,<chip>-ahci" : chip could be ls1021, ls2085 etc. | ||
21 | - "generic-ahci" | 19 | - "generic-ahci" |
22 | - interrupts : <interrupt mapping for SATA IRQ> | 20 | - interrupts : <interrupt mapping for SATA IRQ> |
23 | - reg : <registers mapping> | 21 | - reg : <registers mapping> |
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/board.txt b/Documentation/devicetree/bindings/board/fsl-board.txt index cff38bdbc0e4..fb7b03ec2071 100644 --- a/Documentation/devicetree/bindings/powerpc/fsl/board.txt +++ b/Documentation/devicetree/bindings/board/fsl-board.txt | |||
@@ -21,11 +21,14 @@ Example: | |||
21 | 21 | ||
22 | This is the memory-mapped registers for on board FPGA. | 22 | This is the memory-mapped registers for on board FPGA. |
23 | 23 | ||
24 | Required properities: | 24 | Required properties: |
25 | - compatible: should be a board-specific string followed by a string | 25 | - compatible: should be a board-specific string followed by a string |
26 | indicating the type of FPGA. Example: | 26 | indicating the type of FPGA. Example: |
27 | "fsl,<board>-fpga", "fsl,fpga-pixis" | 27 | "fsl,<board>-fpga", "fsl,fpga-pixis", or |
28 | "fsl,<board>-fpga", "fsl,fpga-qixis" | ||
28 | - reg: should contain the address and the length of the FPGA register set. | 29 | - reg: should contain the address and the length of the FPGA register set. |
30 | |||
31 | Optional properties: | ||
29 | - interrupt-parent: should specify phandle for the interrupt controller. | 32 | - interrupt-parent: should specify phandle for the interrupt controller. |
30 | - interrupts: should specify event (wakeup) IRQ. | 33 | - interrupts: should specify event (wakeup) IRQ. |
31 | 34 | ||
@@ -38,6 +41,13 @@ Example (P1022DS): | |||
38 | interrupts = <8 8 0 0>; | 41 | interrupts = <8 8 0 0>; |
39 | }; | 42 | }; |
40 | 43 | ||
44 | Example (LS2080A-RDB): | ||
45 | |||
46 | cpld@3,0 { | ||
47 | compatible = "fsl,ls2080ardb-fpga", "fsl,fpga-qixis"; | ||
48 | reg = <0x3 0 0x10000>; | ||
49 | }; | ||
50 | |||
41 | * Freescale BCSR GPIO banks | 51 | * Freescale BCSR GPIO banks |
42 | 52 | ||
43 | Some BCSR registers act as simple GPIO controllers, each such | 53 | Some BCSR registers act as simple GPIO controllers, each such |
diff --git a/Documentation/devicetree/bindings/bus/sunxi-rsb.txt b/Documentation/devicetree/bindings/bus/sunxi-rsb.txt new file mode 100644 index 000000000000..3dd28343b6ce --- /dev/null +++ b/Documentation/devicetree/bindings/bus/sunxi-rsb.txt | |||
@@ -0,0 +1,47 @@ | |||
1 | Allwinner Reduced Serial Bus (RSB) controller | ||
2 | |||
3 | The RSB controller found on later Allwinner SoCs is an SMBus like 2 wire | ||
4 | serial bus with 1 master and up to 15 slaves. It is represented by a node | ||
5 | for the controller itself, and child nodes representing the slave devices. | ||
6 | |||
7 | Required properties : | ||
8 | |||
9 | - reg : Offset and length of the register set for the controller. | ||
10 | - compatible : Shall be "allwinner,sun8i-a23-rsb". | ||
11 | - interrupts : The interrupt line associated to the RSB controller. | ||
12 | - clocks : The gate clk associated to the RSB controller. | ||
13 | - resets : The reset line associated to the RSB controller. | ||
14 | - #address-cells : shall be 1 | ||
15 | - #size-cells : shall be 0 | ||
16 | |||
17 | Optional properties : | ||
18 | |||
19 | - clock-frequency : Desired RSB bus clock frequency in Hz. Maximum is 20MHz. | ||
20 | If not set this defaults to 3MHz. | ||
21 | |||
22 | Child nodes: | ||
23 | |||
24 | An RSB controller node can contain zero or more child nodes representing | ||
25 | slave devices on the bus. Child 'reg' properties should contain the slave | ||
26 | device's hardware address. The hardware address is hardwired in the device, | ||
27 | which can normally be found in the datasheet. | ||
28 | |||
29 | Example: | ||
30 | |||
31 | rsb@01f03400 { | ||
32 | compatible = "allwinner,sun8i-a23-rsb"; | ||
33 | reg = <0x01f03400 0x400>; | ||
34 | interrupts = <0 39 4>; | ||
35 | clocks = <&apb0_gates 3>; | ||
36 | clock-frequency = <3000000>; | ||
37 | resets = <&apb0_rst 3>; | ||
38 | #address-cells = <1>; | ||
39 | #size-cells = <0>; | ||
40 | |||
41 | pmic@3e3 { | ||
42 | compatible = "..."; | ||
43 | reg = <0x3e3>; | ||
44 | |||
45 | /* ... */ | ||
46 | }; | ||
47 | }; | ||
diff --git a/Documentation/devicetree/bindings/chosen.txt b/Documentation/devicetree/bindings/chosen.txt index ed838f453f7a..6ae9d82d4c37 100644 --- a/Documentation/devicetree/bindings/chosen.txt +++ b/Documentation/devicetree/bindings/chosen.txt | |||
@@ -44,3 +44,11 @@ Implementation note: Linux will look for the property "linux,stdout-path" or | |||
44 | on PowerPC "stdout" if "stdout-path" is not found. However, the | 44 | on PowerPC "stdout" if "stdout-path" is not found. However, the |
45 | "linux,stdout-path" and "stdout" properties are deprecated. New platforms | 45 | "linux,stdout-path" and "stdout" properties are deprecated. New platforms |
46 | should only use the "stdout-path" property. | 46 | should only use the "stdout-path" property. |
47 | |||
48 | linux,booted-from-kexec | ||
49 | ----------------------- | ||
50 | |||
51 | This property is set (currently only on PowerPC, and only needed on | ||
52 | book3e) by some versions of kexec-tools to tell the new kernel that it | ||
53 | is being booted by kexec, as the booting environment may differ (e.g. | ||
54 | a different secondary CPU release mechanism) | ||
diff --git a/Documentation/devicetree/bindings/clock/at91-clock.txt b/Documentation/devicetree/bindings/clock/at91-clock.txt index 5ba6450693b9..181bc8ac4e3a 100644 --- a/Documentation/devicetree/bindings/clock/at91-clock.txt +++ b/Documentation/devicetree/bindings/clock/at91-clock.txt | |||
@@ -77,6 +77,9 @@ Required properties: | |||
77 | "atmel,sama5d4-clk-h32mx": | 77 | "atmel,sama5d4-clk-h32mx": |
78 | at91 h32mx clock | 78 | at91 h32mx clock |
79 | 79 | ||
80 | "atmel,sama5d2-clk-generated": | ||
81 | at91 generated clock | ||
82 | |||
80 | Required properties for SCKC node: | 83 | Required properties for SCKC node: |
81 | - reg : defines the IO memory reserved for the SCKC. | 84 | - reg : defines the IO memory reserved for the SCKC. |
82 | - #size-cells : shall be 0 (reg is used to encode clk id). | 85 | - #size-cells : shall be 0 (reg is used to encode clk id). |
@@ -461,3 +464,35 @@ For example: | |||
461 | compatible = "atmel,sama5d4-clk-h32mx"; | 464 | compatible = "atmel,sama5d4-clk-h32mx"; |
462 | clocks = <&mck>; | 465 | clocks = <&mck>; |
463 | }; | 466 | }; |
467 | |||
468 | Required properties for generated clocks: | ||
469 | - #size-cells : shall be 0 (reg is used to encode clk id). | ||
470 | - #address-cells : shall be 1 (reg is used to encode clk id). | ||
471 | - clocks : shall be the generated clock source phandles. | ||
472 | e.g. clocks = <&clk32k>, <&main>, <&plladiv>, <&utmi>, <&mck>, <&audio_pll_pmc>; | ||
473 | - name: device tree node describing a specific generated clock. | ||
474 | * #clock-cells : from common clock binding; shall be set to 0. | ||
475 | * reg: peripheral id. See Atmel's datasheets to get a full | ||
476 | list of peripheral ids. | ||
477 | * atmel,clk-output-range : minimum and maximum clock frequency | ||
478 | (two u32 fields). | ||
479 | |||
480 | For example: | ||
481 | gck { | ||
482 | compatible = "atmel,sama5d2-clk-generated"; | ||
483 | #address-cells = <1>; | ||
484 | #size-cells = <0>; | ||
485 | clocks = <&clk32k>, <&main>, <&plladiv>, <&utmi>, <&mck>, <&audio_pll_pmc>; | ||
486 | |||
487 | tcb0_gclk: tcb0_gclk { | ||
488 | #clock-cells = <0>; | ||
489 | reg = <35>; | ||
490 | atmel,clk-output-range = <0 83000000>; | ||
491 | }; | ||
492 | |||
493 | pwm_gclk: pwm_gclk { | ||
494 | #clock-cells = <0>; | ||
495 | reg = <38>; | ||
496 | atmel,clk-output-range = <0 83000000>; | ||
497 | }; | ||
498 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/brcm,bcm2835-cprman.txt b/Documentation/devicetree/bindings/clock/brcm,bcm2835-cprman.txt new file mode 100644 index 000000000000..e56a1df3a9d3 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/brcm,bcm2835-cprman.txt | |||
@@ -0,0 +1,45 @@ | |||
1 | Broadcom BCM2835 CPRMAN clocks | ||
2 | |||
3 | This binding uses the common clock binding: | ||
4 | Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
5 | |||
6 | The CPRMAN clock controller generates clocks in the audio power domain | ||
7 | of the BCM2835. There is a level of PLLs deriving from an external | ||
8 | oscillator, a level of PLL dividers that produce channels off of the | ||
9 | few PLLs, and a level of mostly-generic clock generators sourcing from | ||
10 | the PLL channels. Most other hardware components source from the | ||
11 | clock generators, but a few (like the ARM or HDMI) will source from | ||
12 | the PLL dividers directly. | ||
13 | |||
14 | Required properties: | ||
15 | - compatible: Should be "brcm,bcm2835-cprman" | ||
16 | - #clock-cells: Should be <1>. The permitted clock-specifier values can be | ||
17 | found in include/dt-bindings/clock/bcm2835.h | ||
18 | - reg: Specifies base physical address and size of the registers | ||
19 | - clocks: The external oscillator clock phandle | ||
20 | |||
21 | Example: | ||
22 | |||
23 | clk_osc: clock@3 { | ||
24 | compatible = "fixed-clock"; | ||
25 | reg = <3>; | ||
26 | #clock-cells = <0>; | ||
27 | clock-output-names = "osc"; | ||
28 | clock-frequency = <19200000>; | ||
29 | }; | ||
30 | |||
31 | clocks: cprman@7e101000 { | ||
32 | compatible = "brcm,bcm2835-cprman"; | ||
33 | #clock-cells = <1>; | ||
34 | reg = <0x7e101000 0x2000>; | ||
35 | clocks = <&clk_osc>; | ||
36 | }; | ||
37 | |||
38 | i2c0: i2c@7e205000 { | ||
39 | compatible = "brcm,bcm2835-i2c"; | ||
40 | reg = <0x7e205000 0x1000>; | ||
41 | interrupts = <2 21>; | ||
42 | clocks = <&clocks BCM2835_CLOCK_VPU>; | ||
43 | #address-cells = <1>; | ||
44 | #size-cells = <0>; | ||
45 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/brcm,iproc-clocks.txt b/Documentation/devicetree/bindings/clock/brcm,iproc-clocks.txt index da8d9bb5751c..ede65a55e21b 100644 --- a/Documentation/devicetree/bindings/clock/brcm,iproc-clocks.txt +++ b/Documentation/devicetree/bindings/clock/brcm,iproc-clocks.txt | |||
@@ -130,3 +130,81 @@ These clock IDs are defined in: | |||
130 | ch3_unused mipipll 4 BCM_CYGNUS_MIPIPLL_CH3_UNUSED | 130 | ch3_unused mipipll 4 BCM_CYGNUS_MIPIPLL_CH3_UNUSED |
131 | ch4_unused mipipll 5 BCM_CYGNUS_MIPIPLL_CH4_UNUSED | 131 | ch4_unused mipipll 5 BCM_CYGNUS_MIPIPLL_CH4_UNUSED |
132 | ch5_unused mipipll 6 BCM_CYGNUS_MIPIPLL_CH5_UNUSED | 132 | ch5_unused mipipll 6 BCM_CYGNUS_MIPIPLL_CH5_UNUSED |
133 | |||
134 | Northstar and Northstar Plus | ||
135 | ------ | ||
136 | PLL and leaf clock compatible strings for Northstar and Northstar Plus are: | ||
137 | "brcm,nsp-armpll" | ||
138 | "brcm,nsp-genpll" | ||
139 | "brcm,nsp-lcpll0" | ||
140 | |||
141 | The following table defines the set of PLL/clock index and ID for Northstar and | ||
142 | Northstar Plus. These clock IDs are defined in: | ||
143 | "include/dt-bindings/clock/bcm-nsp.h" | ||
144 | |||
145 | Clock Source Index ID | ||
146 | --- ----- ----- --------- | ||
147 | crystal N/A N/A N/A | ||
148 | |||
149 | armpll crystal N/A N/A | ||
150 | |||
151 | genpll crystal 0 BCM_NSP_GENPLL | ||
152 | phy genpll 1 BCM_NSP_GENPLL_PHY_CLK | ||
153 | ethernetclk genpll 2 BCM_NSP_GENPLL_ENET_SW_CLK | ||
154 | usbclk genpll 3 BCM_NSP_GENPLL_USB_PHY_REF_CLK | ||
155 | iprocfast genpll 4 BCM_NSP_GENPLL_IPROCFAST_CLK | ||
156 | sata1 genpll 5 BCM_NSP_GENPLL_SATA1_CLK | ||
157 | sata2 genpll 6 BCM_NSP_GENPLL_SATA2_CLK | ||
158 | |||
159 | lcpll0 crystal 0 BCM_NSP_LCPLL0 | ||
160 | pcie_phy lcpll0 1 BCM_NSP_LCPLL0_PCIE_PHY_REF_CLK | ||
161 | sdio lcpll0 2 BCM_NSP_LCPLL0_SDIO_CLK | ||
162 | ddr_phy lcpll0 3 BCM_NSP_LCPLL0_DDR_PHY_CLK | ||
163 | |||
164 | Northstar 2 | ||
165 | ----------- | ||
166 | PLL and leaf clock compatible strings for Northstar 2 are: | ||
167 | "brcm,ns2-genpll-scr" | ||
168 | "brcm,ns2-genpll-sw" | ||
169 | "brcm,ns2-lcpll-ddr" | ||
170 | "brcm,ns2-lcpll-ports" | ||
171 | |||
172 | The following table defines the set of PLL/clock index and ID for Northstar 2. | ||
173 | These clock IDs are defined in: | ||
174 | "include/dt-bindings/clock/bcm-ns2.h" | ||
175 | |||
176 | Clock Source Index ID | ||
177 | --- ----- ----- --------- | ||
178 | crystal N/A N/A N/A | ||
179 | |||
180 | genpll_scr crystal 0 BCM_NS2_GENPLL_SCR | ||
181 | scr genpll_scr 1 BCM_NS2_GENPLL_SCR_SCR_CLK | ||
182 | fs genpll_scr 2 BCM_NS2_GENPLL_SCR_FS_CLK | ||
183 | audio_ref genpll_scr 3 BCM_NS2_GENPLL_SCR_AUDIO_CLK | ||
184 | ch3_unused genpll_scr 4 BCM_NS2_GENPLL_SCR_CH3_UNUSED | ||
185 | ch4_unused genpll_scr 5 BCM_NS2_GENPLL_SCR_CH4_UNUSED | ||
186 | ch5_unused genpll_scr 6 BCM_NS2_GENPLL_SCR_CH5_UNUSED | ||
187 | |||
188 | genpll_sw crystal 0 BCM_NS2_GENPLL_SW | ||
189 | rpe genpll_sw 1 BCM_NS2_GENPLL_SW_RPE_CLK | ||
190 | 250 genpll_sw 2 BCM_NS2_GENPLL_SW_250_CLK | ||
191 | nic genpll_sw 3 BCM_NS2_GENPLL_SW_NIC_CLK | ||
192 | chimp genpll_sw 4 BCM_NS2_GENPLL_SW_CHIMP_CLK | ||
193 | port genpll_sw 5 BCM_NS2_GENPLL_SW_PORT_CLK | ||
194 | sdio genpll_sw 6 BCM_NS2_GENPLL_SW_SDIO_CLK | ||
195 | |||
196 | lcpll_ddr crystal 0 BCM_NS2_LCPLL_DDR | ||
197 | pcie_sata_usb lcpll_ddr 1 BCM_NS2_LCPLL_DDR_PCIE_SATA_USB_CLK | ||
198 | ddr lcpll_ddr 2 BCM_NS2_LCPLL_DDR_DDR_CLK | ||
199 | ch2_unused lcpll_ddr 3 BCM_NS2_LCPLL_DDR_CH2_UNUSED | ||
200 | ch3_unused lcpll_ddr 4 BCM_NS2_LCPLL_DDR_CH3_UNUSED | ||
201 | ch4_unused lcpll_ddr 5 BCM_NS2_LCPLL_DDR_CH4_UNUSED | ||
202 | ch5_unused lcpll_ddr 6 BCM_NS2_LCPLL_DDR_CH5_UNUSED | ||
203 | |||
204 | lcpll_ports crystal 0 BCM_NS2_LCPLL_PORTS | ||
205 | wan lcpll_ports 1 BCM_NS2_LCPLL_PORTS_WAN_CLK | ||
206 | rgmii lcpll_ports 2 BCM_NS2_LCPLL_PORTS_RGMII_CLK | ||
207 | ch2_unused lcpll_ports 3 BCM_NS2_LCPLL_PORTS_CH2_UNUSED | ||
208 | ch3_unused lcpll_ports 4 BCM_NS2_LCPLL_PORTS_CH3_UNUSED | ||
209 | ch4_unused lcpll_ports 5 BCM_NS2_LCPLL_PORTS_CH4_UNUSED | ||
210 | ch5_unused lcpll_ports 6 BCM_NS2_LCPLL_PORTS_CH5_UNUSED | ||
diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc.txt b/Documentation/devicetree/bindings/clock/qcom,gcc.txt index 54c23f34f194..152dfaab2575 100644 --- a/Documentation/devicetree/bindings/clock/qcom,gcc.txt +++ b/Documentation/devicetree/bindings/clock/qcom,gcc.txt | |||
@@ -18,10 +18,14 @@ Required properties : | |||
18 | - #clock-cells : shall contain 1 | 18 | - #clock-cells : shall contain 1 |
19 | - #reset-cells : shall contain 1 | 19 | - #reset-cells : shall contain 1 |
20 | 20 | ||
21 | Optional properties : | ||
22 | - #power-domain-cells : shall contain 1 | ||
23 | |||
21 | Example: | 24 | Example: |
22 | clock-controller@900000 { | 25 | clock-controller@900000 { |
23 | compatible = "qcom,gcc-msm8960"; | 26 | compatible = "qcom,gcc-msm8960"; |
24 | reg = <0x900000 0x4000>; | 27 | reg = <0x900000 0x4000>; |
25 | #clock-cells = <1>; | 28 | #clock-cells = <1>; |
26 | #reset-cells = <1>; | 29 | #reset-cells = <1>; |
30 | #power-domain-cells = <1>; | ||
27 | }; | 31 | }; |
diff --git a/Documentation/devicetree/bindings/clock/qcom,mmcc.txt b/Documentation/devicetree/bindings/clock/qcom,mmcc.txt index 29ebf84d25af..34e7614d5074 100644 --- a/Documentation/devicetree/bindings/clock/qcom,mmcc.txt +++ b/Documentation/devicetree/bindings/clock/qcom,mmcc.txt | |||
@@ -14,10 +14,14 @@ Required properties : | |||
14 | - #clock-cells : shall contain 1 | 14 | - #clock-cells : shall contain 1 |
15 | - #reset-cells : shall contain 1 | 15 | - #reset-cells : shall contain 1 |
16 | 16 | ||
17 | Optional properties : | ||
18 | - #power-domain-cells : shall contain 1 | ||
19 | |||
17 | Example: | 20 | Example: |
18 | clock-controller@4000000 { | 21 | clock-controller@4000000 { |
19 | compatible = "qcom,mmcc-msm8960"; | 22 | compatible = "qcom,mmcc-msm8960"; |
20 | reg = <0x4000000 0x1000>; | 23 | reg = <0x4000000 0x1000>; |
21 | #clock-cells = <1>; | 24 | #clock-cells = <1>; |
22 | #reset-cells = <1>; | 25 | #reset-cells = <1>; |
26 | #power-domain-cells = <1>; | ||
23 | }; | 27 | }; |
diff --git a/Documentation/devicetree/bindings/clock/qoriq-clock.txt b/Documentation/devicetree/bindings/clock/qoriq-clock.txt index df4a259a6898..16a3ec433119 100644 --- a/Documentation/devicetree/bindings/clock/qoriq-clock.txt +++ b/Documentation/devicetree/bindings/clock/qoriq-clock.txt | |||
@@ -1,6 +1,6 @@ | |||
1 | * Clock Block on Freescale QorIQ Platforms | 1 | * Clock Block on Freescale QorIQ Platforms |
2 | 2 | ||
3 | Freescale qoriq chips take primary clocking input from the external | 3 | Freescale QorIQ chips take primary clocking input from the external |
4 | SYSCLK signal. The SYSCLK input (frequency) is multiplied using | 4 | SYSCLK signal. The SYSCLK input (frequency) is multiplied using |
5 | multiple phase locked loops (PLL) to create a variety of frequencies | 5 | multiple phase locked loops (PLL) to create a variety of frequencies |
6 | which can then be passed to a variety of internal logic, including | 6 | which can then be passed to a variety of internal logic, including |
@@ -13,14 +13,16 @@ which the chip complies. | |||
13 | Chassis Version Example Chips | 13 | Chassis Version Example Chips |
14 | --------------- ------------- | 14 | --------------- ------------- |
15 | 1.0 p4080, p5020, p5040 | 15 | 1.0 p4080, p5020, p5040 |
16 | 2.0 t4240, b4860, t1040 | 16 | 2.0 t4240, b4860 |
17 | 17 | ||
18 | 1. Clock Block Binding | 18 | 1. Clock Block Binding |
19 | 19 | ||
20 | Required properties: | 20 | Required properties: |
21 | - compatible: Should contain a specific clock block compatible string | 21 | - compatible: Should contain a chip-specific clock block compatible |
22 | and a single chassis clock compatible string. | 22 | string and (if applicable) may contain a chassis-version clock |
23 | Clock block strings include, but not limited to, one of the: | 23 | compatible string. |
24 | |||
25 | Chip-specific strings are of the form "fsl,<chip>-clockgen", such as: | ||
24 | * "fsl,p2041-clockgen" | 26 | * "fsl,p2041-clockgen" |
25 | * "fsl,p3041-clockgen" | 27 | * "fsl,p3041-clockgen" |
26 | * "fsl,p4080-clockgen" | 28 | * "fsl,p4080-clockgen" |
@@ -30,15 +32,14 @@ Required properties: | |||
30 | * "fsl,b4420-clockgen" | 32 | * "fsl,b4420-clockgen" |
31 | * "fsl,b4860-clockgen" | 33 | * "fsl,b4860-clockgen" |
32 | * "fsl,ls1021a-clockgen" | 34 | * "fsl,ls1021a-clockgen" |
33 | Chassis clock strings include: | 35 | Chassis-version clock strings include: |
34 | * "fsl,qoriq-clockgen-1.0": for chassis 1.0 clocks | 36 | * "fsl,qoriq-clockgen-1.0": for chassis 1.0 clocks |
35 | * "fsl,qoriq-clockgen-2.0": for chassis 2.0 clocks | 37 | * "fsl,qoriq-clockgen-2.0": for chassis 2.0 clocks |
36 | - reg: Describes the address of the device's resources within the | 38 | - reg: Describes the address of the device's resources within the |
37 | address space defined by its parent bus, and resource zero | 39 | address space defined by its parent bus, and resource zero |
38 | represents the clock register set | 40 | represents the clock register set |
39 | - clock-frequency: Input system clock frequency | ||
40 | 41 | ||
41 | Recommended properties: | 42 | Optional properties: |
42 | - ranges: Allows valid translation between child's address space and | 43 | - ranges: Allows valid translation between child's address space and |
43 | parent's. Must be present if the device has sub-nodes. | 44 | parent's. Must be present if the device has sub-nodes. |
44 | - #address-cells: Specifies the number of cells used to represent | 45 | - #address-cells: Specifies the number of cells used to represent |
@@ -47,8 +48,46 @@ Recommended properties: | |||
47 | - #size-cells: Specifies the number of cells used to represent | 48 | - #size-cells: Specifies the number of cells used to represent |
48 | the size of an address. Must be present if the device has | 49 | the size of an address. Must be present if the device has |
49 | sub-nodes and set to 1 if present | 50 | sub-nodes and set to 1 if present |
51 | - clock-frequency: Input system clock frequency (SYSCLK) | ||
52 | - clocks: If clock-frequency is not specified, sysclk may be provided | ||
53 | as an input clock. Either clock-frequency or clocks must be | ||
54 | provided. | ||
55 | |||
56 | 2. Clock Provider | ||
57 | |||
58 | The clockgen node should act as a clock provider, though in older device | ||
59 | trees the children of the clockgen node are the clock providers. | ||
60 | |||
61 | When the clockgen node is a clock provider, #clock-cells = <2>. | ||
62 | The first cell of the clock specifier is the clock type, and the | ||
63 | second cell is the clock index for the specified type. | ||
64 | |||
65 | Type# Name Index Cell | ||
66 | 0 sysclk must be 0 | ||
67 | 1 cmux index (n in CLKCnCSR) | ||
68 | 2 hwaccel index (n in CLKCGnHWACSR) | ||
69 | 3 fman 0 for fm1, 1 for fm2 | ||
70 | 4 platform pll 0=pll, 1=pll/2, 2=pll/3, 3=pll/4 | ||
71 | |||
72 | 3. Example | ||
73 | |||
74 | clockgen: global-utilities@e1000 { | ||
75 | compatible = "fsl,p5020-clockgen", "fsl,qoriq-clockgen-1.0"; | ||
76 | clock-frequency = <133333333>; | ||
77 | reg = <0xe1000 0x1000>; | ||
78 | #clock-cells = <2>; | ||
79 | }; | ||
80 | |||
81 | fman@400000 { | ||
82 | ... | ||
83 | clocks = <&clockgen 3 0>; | ||
84 | ... | ||
85 | }; | ||
86 | } | ||
87 | 4. Legacy Child Nodes | ||
50 | 88 | ||
51 | 2. Clock Provider/Consumer Binding | 89 | NOTE: These nodes are deprecated. Kernels should continue to support |
90 | device trees with these nodes, but new device trees should not use them. | ||
52 | 91 | ||
53 | Most of the bindings are from the common clock binding[1]. | 92 | Most of the bindings are from the common clock binding[1]. |
54 | [1] Documentation/devicetree/bindings/clock/clock-bindings.txt | 93 | [1] Documentation/devicetree/bindings/clock/clock-bindings.txt |
@@ -82,7 +121,7 @@ Recommended properties: | |||
82 | - reg: Should be the offset and length of clock block base address. | 121 | - reg: Should be the offset and length of clock block base address. |
83 | The length should be 4. | 122 | The length should be 4. |
84 | 123 | ||
85 | Example for clock block and clock provider: | 124 | Legacy Example: |
86 | / { | 125 | / { |
87 | clockgen: global-utilities@e1000 { | 126 | clockgen: global-utilities@e1000 { |
88 | compatible = "fsl,p5020-clockgen", "fsl,qoriq-clockgen-1.0"; | 127 | compatible = "fsl,p5020-clockgen", "fsl,qoriq-clockgen-1.0"; |
@@ -142,7 +181,7 @@ Example for clock block and clock provider: | |||
142 | }; | 181 | }; |
143 | }; | 182 | }; |
144 | 183 | ||
145 | Example for clock consumer: | 184 | Example for legacy clock consumer: |
146 | 185 | ||
147 | / { | 186 | / { |
148 | cpu0: PowerPC,e5500@0 { | 187 | cpu0: PowerPC,e5500@0 { |
diff --git a/Documentation/devicetree/bindings/clock/renesas,cpg-div6-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,cpg-div6-clocks.txt index 5ddb68418655..38dcf0370143 100644 --- a/Documentation/devicetree/bindings/clock/renesas,cpg-div6-clocks.txt +++ b/Documentation/devicetree/bindings/clock/renesas,cpg-div6-clocks.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | * Renesas CPG DIV6 Clock | 1 | * Renesas CPG DIV6 Clock |
2 | 2 | ||
3 | The CPG DIV6 clocks are variable factor clocks provided by the Clock Pulse | 3 | The CPG DIV6 clocks are variable factor clocks provided by the Clock Pulse |
4 | Generator (CPG). They clock input is divided by a configurable factor from 1 | 4 | Generator (CPG). Their clock input is divided by a configurable factor from 1 |
5 | to 64. | 5 | to 64. |
6 | 6 | ||
7 | Required Properties: | 7 | Required Properties: |
diff --git a/Documentation/devicetree/bindings/clock/renesas,cpg-mssr.txt b/Documentation/devicetree/bindings/clock/renesas,cpg-mssr.txt new file mode 100644 index 000000000000..59297d34b208 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/renesas,cpg-mssr.txt | |||
@@ -0,0 +1,69 @@ | |||
1 | * Renesas Clock Pulse Generator / Module Standby and Software Reset | ||
2 | |||
3 | On Renesas ARM SoCs (SH/R-Mobile, R-Car, RZ), the CPG (Clock Pulse Generator) | ||
4 | and MSSR (Module Standby and Software Reset) blocks are intimately connected, | ||
5 | and share the same register block. | ||
6 | |||
7 | They provide the following functionalities: | ||
8 | - The CPG block generates various core clocks, | ||
9 | - The MSSR block provides two functions: | ||
10 | 1. Module Standby, providing a Clock Domain to control the clock supply | ||
11 | to individual SoC devices, | ||
12 | 2. Reset Control, to perform a software reset of individual SoC devices. | ||
13 | |||
14 | Required Properties: | ||
15 | - compatible: Must be one of: | ||
16 | - "renesas,r8a7795-cpg-mssr" for the r8a7795 SoC | ||
17 | |||
18 | - reg: Base address and length of the memory resource used by the CPG/MSSR | ||
19 | block | ||
20 | |||
21 | - clocks: References to external parent clocks, one entry for each entry in | ||
22 | clock-names | ||
23 | - clock-names: List of external parent clock names. Valid names are: | ||
24 | - "extal" (r8a7795) | ||
25 | - "extalr" (r8a7795) | ||
26 | |||
27 | - #clock-cells: Must be 2 | ||
28 | - For CPG core clocks, the two clock specifier cells must be "CPG_CORE" | ||
29 | and a core clock reference, as defined in | ||
30 | <dt-bindings/clock/*-cpg-mssr.h>. | ||
31 | - For module clocks, the two clock specifier cells must be "CPG_MOD" and | ||
32 | a module number, as defined in the datasheet. | ||
33 | |||
34 | - #power-domain-cells: Must be 0 | ||
35 | - SoC devices that are part of the CPG/MSSR Clock Domain and can be | ||
36 | power-managed through Module Standby should refer to the CPG device | ||
37 | node in their "power-domains" property, as documented by the generic PM | ||
38 | Domain bindings in | ||
39 | Documentation/devicetree/bindings/power/power_domain.txt. | ||
40 | |||
41 | |||
42 | Examples | ||
43 | -------- | ||
44 | |||
45 | - CPG device node: | ||
46 | |||
47 | cpg: clock-controller@e6150000 { | ||
48 | compatible = "renesas,r8a7795-cpg-mssr"; | ||
49 | reg = <0 0xe6150000 0 0x1000>; | ||
50 | clocks = <&extal_clk>, <&extalr_clk>; | ||
51 | clock-names = "extal", "extalr"; | ||
52 | #clock-cells = <2>; | ||
53 | #power-domain-cells = <0>; | ||
54 | }; | ||
55 | |||
56 | |||
57 | - CPG/MSSR Clock Domain member device node: | ||
58 | |||
59 | scif2: serial@e6e88000 { | ||
60 | compatible = "renesas,scif-r8a7795", "renesas,scif"; | ||
61 | reg = <0 0xe6e88000 0 64>; | ||
62 | interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>; | ||
63 | clocks = <&cpg CPG_MOD 310>; | ||
64 | clock-names = "sci_ick"; | ||
65 | dmas = <&dmac1 0x13>, <&dmac1 0x12>; | ||
66 | dma-names = "tx", "rx"; | ||
67 | power-domains = <&cpg>; | ||
68 | status = "disabled"; | ||
69 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/silabs,si514.txt b/Documentation/devicetree/bindings/clock/silabs,si514.txt new file mode 100644 index 000000000000..ea1a9dbc63b6 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/silabs,si514.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | Binding for Silicon Labs 514 programmable I2C clock generator. | ||
2 | |||
3 | Reference | ||
4 | This binding uses the common clock binding[1]. Details about the device can be | ||
5 | found in the datasheet[2]. | ||
6 | |||
7 | [1] Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
8 | [2] Si514 datasheet | ||
9 | http://www.silabs.com/Support%20Documents/TechnicalDocs/si514.pdf | ||
10 | |||
11 | Required properties: | ||
12 | - compatible: Shall be "silabs,si514" | ||
13 | - reg: I2C device address. | ||
14 | - #clock-cells: From common clock bindings: Shall be 0. | ||
15 | |||
16 | Optional properties: | ||
17 | - clock-output-names: From common clock bindings. Recommended to be "si514". | ||
18 | |||
19 | Example: | ||
20 | si514: clock-generator@55 { | ||
21 | reg = <0x55>; | ||
22 | #clock-cells = <0>; | ||
23 | compatible = "silabs,si514"; | ||
24 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/st/st,clkgen-pll.txt b/Documentation/devicetree/bindings/clock/st/st,clkgen-pll.txt index d8b168ebd5f1..844b3a0976bf 100644 --- a/Documentation/devicetree/bindings/clock/st/st,clkgen-pll.txt +++ b/Documentation/devicetree/bindings/clock/st/st,clkgen-pll.txt | |||
@@ -23,6 +23,7 @@ Required properties: | |||
23 | "st,stih407-plls-c32-a9", "st,clkgen-plls-c32" | 23 | "st,stih407-plls-c32-a9", "st,clkgen-plls-c32" |
24 | "sst,plls-c32-cx_0", "st,clkgen-plls-c32" | 24 | "sst,plls-c32-cx_0", "st,clkgen-plls-c32" |
25 | "sst,plls-c32-cx_1", "st,clkgen-plls-c32" | 25 | "sst,plls-c32-cx_1", "st,clkgen-plls-c32" |
26 | "st,stih418-plls-c28-a9", "st,clkgen-plls-c32" | ||
26 | 27 | ||
27 | "st,stih415-gpu-pll-c32", "st,clkgengpu-pll-c32" | 28 | "st,stih415-gpu-pll-c32", "st,clkgengpu-pll-c32" |
28 | "st,stih416-gpu-pll-c32", "st,clkgengpu-pll-c32" | 29 | "st,stih416-gpu-pll-c32", "st,clkgengpu-pll-c32" |
diff --git a/Documentation/devicetree/bindings/crypto/fsl-sec4.txt b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt index 6831d025ec24..adeca34c5a33 100644 --- a/Documentation/devicetree/bindings/crypto/fsl-sec4.txt +++ b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt | |||
@@ -441,7 +441,7 @@ EXAMPLE: | |||
441 | regmap = <&snvs>; | 441 | regmap = <&snvs>; |
442 | interrupts = <0 4 0x4> | 442 | interrupts = <0 4 0x4> |
443 | linux,keycode = <116>; /* KEY_POWER */ | 443 | linux,keycode = <116>; /* KEY_POWER */ |
444 | wakeup; | 444 | wakeup-source; |
445 | }; | 445 | }; |
446 | 446 | ||
447 | ===================================================================== | 447 | ===================================================================== |
@@ -530,7 +530,7 @@ FULL EXAMPLE | |||
530 | regmap = <&sec_mon>; | 530 | regmap = <&sec_mon>; |
531 | interrupts = <0 4 0x4>; | 531 | interrupts = <0 4 0x4>; |
532 | linux,keycode = <116>; /* KEY_POWER */ | 532 | linux,keycode = <116>; /* KEY_POWER */ |
533 | wakeup; | 533 | wakeup-source; |
534 | }; | 534 | }; |
535 | }; | 535 | }; |
536 | 536 | ||
diff --git a/Documentation/devicetree/bindings/video/arm,pl11x.txt b/Documentation/devicetree/bindings/display/arm,pl11x.txt index 3e3039a8a253..3e3039a8a253 100644 --- a/Documentation/devicetree/bindings/video/arm,pl11x.txt +++ b/Documentation/devicetree/bindings/display/arm,pl11x.txt | |||
diff --git a/Documentation/devicetree/bindings/drm/armada/marvell,dove-lcd.txt b/Documentation/devicetree/bindings/display/armada/marvell,dove-lcd.txt index 46525ea3e646..46525ea3e646 100644 --- a/Documentation/devicetree/bindings/drm/armada/marvell,dove-lcd.txt +++ b/Documentation/devicetree/bindings/display/armada/marvell,dove-lcd.txt | |||
diff --git a/Documentation/devicetree/bindings/video/atmel,lcdc.txt b/Documentation/devicetree/bindings/display/atmel,lcdc.txt index ecb8da063d07..ecb8da063d07 100644 --- a/Documentation/devicetree/bindings/video/atmel,lcdc.txt +++ b/Documentation/devicetree/bindings/display/atmel,lcdc.txt | |||
diff --git a/Documentation/devicetree/bindings/drm/atmel/hlcdc-dc.txt b/Documentation/devicetree/bindings/display/atmel/hlcdc-dc.txt index ebc1a914bda3..ebc1a914bda3 100644 --- a/Documentation/devicetree/bindings/drm/atmel/hlcdc-dc.txt +++ b/Documentation/devicetree/bindings/display/atmel/hlcdc-dc.txt | |||
diff --git a/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt b/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt new file mode 100644 index 000000000000..56a961aa5061 --- /dev/null +++ b/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt | |||
@@ -0,0 +1,65 @@ | |||
1 | Broadcom VC4 (VideoCore4) GPU | ||
2 | |||
3 | The VC4 device present on the Raspberry Pi includes a display system | ||
4 | with HDMI output and the HVS (Hardware Video Scaler) for compositing | ||
5 | display planes. | ||
6 | |||
7 | Required properties for VC4: | ||
8 | - compatible: Should be "brcm,bcm2835-vc4" | ||
9 | |||
10 | Required properties for Pixel Valve: | ||
11 | - compatible: Should be one of "brcm,bcm2835-pixelvalve0", | ||
12 | "brcm,bcm2835-pixelvalve1", or "brcm,bcm2835-pixelvalve2" | ||
13 | - reg: Physical base address and length of the PV's registers | ||
14 | - interrupts: The interrupt number | ||
15 | See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt | ||
16 | |||
17 | Required properties for HVS: | ||
18 | - compatible: Should be "brcm,bcm2835-hvs" | ||
19 | - reg: Physical base address and length of the HVS's registers | ||
20 | - interrupts: The interrupt number | ||
21 | See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt | ||
22 | |||
23 | Required properties for HDMI | ||
24 | - compatible: Should be "brcm,bcm2835-hdmi" | ||
25 | - reg: Physical base address and length of the two register ranges | ||
26 | ("HDMI" and "HD", in that order) | ||
27 | - interrupts: The interrupt numbers | ||
28 | See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt | ||
29 | - ddc: phandle of the I2C controller used for DDC EDID probing | ||
30 | - clocks: a) hdmi: The HDMI state machine clock | ||
31 | b) pixel: The pixel clock. | ||
32 | |||
33 | Optional properties for HDMI: | ||
34 | - hpd-gpios: The GPIO pin for HDMI hotplug detect (if it doesn't appear | ||
35 | as an interrupt/status bit in the HDMI controller | ||
36 | itself). See bindings/pinctrl/brcm,bcm2835-gpio.txt | ||
37 | |||
38 | Example: | ||
39 | pixelvalve@7e807000 { | ||
40 | compatible = "brcm,bcm2835-pixelvalve2"; | ||
41 | reg = <0x7e807000 0x100>; | ||
42 | interrupts = <2 10>; /* pixelvalve */ | ||
43 | }; | ||
44 | |||
45 | hvs@7e400000 { | ||
46 | compatible = "brcm,bcm2835-hvs"; | ||
47 | reg = <0x7e400000 0x6000>; | ||
48 | interrupts = <2 1>; | ||
49 | }; | ||
50 | |||
51 | hdmi: hdmi@7e902000 { | ||
52 | compatible = "brcm,bcm2835-hdmi"; | ||
53 | reg = <0x7e902000 0x600>, | ||
54 | <0x7e808000 0x100>; | ||
55 | interrupts = <2 8>, <2 9>; | ||
56 | ddc = <&i2c2>; | ||
57 | hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>; | ||
58 | clocks = <&clocks BCM2835_PLLH_PIX>, | ||
59 | <&clocks BCM2835_CLOCK_HSM>; | ||
60 | clock-names = "pixel", "hdmi"; | ||
61 | }; | ||
62 | |||
63 | vc4: gpu { | ||
64 | compatible = "brcm,bcm2835-vc4"; | ||
65 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/adi,adv7123.txt b/Documentation/devicetree/bindings/display/bridge/adi,adv7123.txt index a6b2b2b8f3d9..a6b2b2b8f3d9 100644 --- a/Documentation/devicetree/bindings/video/adi,adv7123.txt +++ b/Documentation/devicetree/bindings/display/bridge/adi,adv7123.txt | |||
diff --git a/Documentation/devicetree/bindings/video/adi,adv7511.txt b/Documentation/devicetree/bindings/display/bridge/adi,adv7511.txt index 96c25ee01501..96c25ee01501 100644 --- a/Documentation/devicetree/bindings/video/adi,adv7511.txt +++ b/Documentation/devicetree/bindings/display/bridge/adi,adv7511.txt | |||
diff --git a/Documentation/devicetree/bindings/drm/bridge/dw_hdmi.txt b/Documentation/devicetree/bindings/display/bridge/dw_hdmi.txt index a905c1413558..dc1452f0d5d8 100644 --- a/Documentation/devicetree/bindings/drm/bridge/dw_hdmi.txt +++ b/Documentation/devicetree/bindings/display/bridge/dw_hdmi.txt | |||
@@ -14,8 +14,8 @@ Required properties: | |||
14 | -port@[X]: SoC specific port nodes with endpoint definitions as defined | 14 | -port@[X]: SoC specific port nodes with endpoint definitions as defined |
15 | in Documentation/devicetree/bindings/media/video-interfaces.txt, | 15 | in Documentation/devicetree/bindings/media/video-interfaces.txt, |
16 | please refer to the SoC specific binding document: | 16 | please refer to the SoC specific binding document: |
17 | * Documentation/devicetree/bindings/drm/imx/hdmi.txt | 17 | * Documentation/devicetree/bindings/display/imx/hdmi.txt |
18 | * Documentation/devicetree/bindings/video/dw_hdmi-rockchip.txt | 18 | * Documentation/devicetree/bindings/display/rockchip/dw_hdmi-rockchip.txt |
19 | 19 | ||
20 | Optional properties | 20 | Optional properties |
21 | - reg-io-width: the width of the reg:1,4, default set to 1 if not present | 21 | - reg-io-width: the width of the reg:1,4, default set to 1 if not present |
diff --git a/Documentation/devicetree/bindings/video/bridge/ps8622.txt b/Documentation/devicetree/bindings/display/bridge/ps8622.txt index c989c3807f2b..c989c3807f2b 100644 --- a/Documentation/devicetree/bindings/video/bridge/ps8622.txt +++ b/Documentation/devicetree/bindings/display/bridge/ps8622.txt | |||
diff --git a/Documentation/devicetree/bindings/video/bridge/ptn3460.txt b/Documentation/devicetree/bindings/display/bridge/ptn3460.txt index 361971ba104d..361971ba104d 100644 --- a/Documentation/devicetree/bindings/video/bridge/ptn3460.txt +++ b/Documentation/devicetree/bindings/display/bridge/ptn3460.txt | |||
diff --git a/Documentation/devicetree/bindings/drm/i2c/tda998x.txt b/Documentation/devicetree/bindings/display/bridge/tda998x.txt index e9e4bce40760..e9e4bce40760 100644 --- a/Documentation/devicetree/bindings/drm/i2c/tda998x.txt +++ b/Documentation/devicetree/bindings/display/bridge/tda998x.txt | |||
diff --git a/Documentation/devicetree/bindings/video/thine,thc63lvdm83d b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvdm83d.txt index 527e236e9a2a..527e236e9a2a 100644 --- a/Documentation/devicetree/bindings/video/thine,thc63lvdm83d +++ b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvdm83d.txt | |||
diff --git a/Documentation/devicetree/bindings/video/cirrus,clps711x-fb.txt b/Documentation/devicetree/bindings/display/cirrus,clps711x-fb.txt index 6fc3c6adeefa..d685be898d0c 100644 --- a/Documentation/devicetree/bindings/video/cirrus,clps711x-fb.txt +++ b/Documentation/devicetree/bindings/display/cirrus,clps711x-fb.txt | |||
@@ -6,7 +6,7 @@ Required properties: | |||
6 | location and size of the framebuffer memory. | 6 | location and size of the framebuffer memory. |
7 | - clocks : phandle + clock specifier pair of the FB reference clock. | 7 | - clocks : phandle + clock specifier pair of the FB reference clock. |
8 | - display : phandle to a display node as described in | 8 | - display : phandle to a display node as described in |
9 | Documentation/devicetree/bindings/video/display-timing.txt. | 9 | Documentation/devicetree/bindings/display/display-timing.txt. |
10 | Additionally, the display node has to define properties: | 10 | Additionally, the display node has to define properties: |
11 | - bits-per-pixel: Bits per pixel. | 11 | - bits-per-pixel: Bits per pixel. |
12 | - ac-prescale : LCD AC bias frequency. This frequency is the required | 12 | - ac-prescale : LCD AC bias frequency. This frequency is the required |
diff --git a/Documentation/devicetree/bindings/video/analog-tv-connector.txt b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt index 0c0970c210ab..0c0970c210ab 100644 --- a/Documentation/devicetree/bindings/video/analog-tv-connector.txt +++ b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt | |||
diff --git a/Documentation/devicetree/bindings/video/dvi-connector.txt b/Documentation/devicetree/bindings/display/connector/dvi-connector.txt index fc53f7c60bc6..fc53f7c60bc6 100644 --- a/Documentation/devicetree/bindings/video/dvi-connector.txt +++ b/Documentation/devicetree/bindings/display/connector/dvi-connector.txt | |||
diff --git a/Documentation/devicetree/bindings/video/hdmi-connector.txt b/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt index acd5668b1ce1..acd5668b1ce1 100644 --- a/Documentation/devicetree/bindings/video/hdmi-connector.txt +++ b/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt | |||
diff --git a/Documentation/devicetree/bindings/video/vga-connector.txt b/Documentation/devicetree/bindings/display/connector/vga-connector.txt index c727f298e7ad..c727f298e7ad 100644 --- a/Documentation/devicetree/bindings/video/vga-connector.txt +++ b/Documentation/devicetree/bindings/display/connector/vga-connector.txt | |||
diff --git a/Documentation/devicetree/bindings/video/exynos-mic.txt b/Documentation/devicetree/bindings/display/exynos/exynos-mic.txt index 0fba2ee6440a..0fba2ee6440a 100644 --- a/Documentation/devicetree/bindings/video/exynos-mic.txt +++ b/Documentation/devicetree/bindings/display/exynos/exynos-mic.txt | |||
diff --git a/Documentation/devicetree/bindings/video/exynos5433-decon.txt b/Documentation/devicetree/bindings/display/exynos/exynos5433-decon.txt index 377afbf5122a..377afbf5122a 100644 --- a/Documentation/devicetree/bindings/video/exynos5433-decon.txt +++ b/Documentation/devicetree/bindings/display/exynos/exynos5433-decon.txt | |||
diff --git a/Documentation/devicetree/bindings/video/exynos7-decon.txt b/Documentation/devicetree/bindings/display/exynos/exynos7-decon.txt index f5f9c8d4a55a..3938caacf11c 100644 --- a/Documentation/devicetree/bindings/video/exynos7-decon.txt +++ b/Documentation/devicetree/bindings/display/exynos/exynos7-decon.txt | |||
@@ -38,7 +38,7 @@ Optional Properties: | |||
38 | Can be used in case timings cannot be provided otherwise | 38 | Can be used in case timings cannot be provided otherwise |
39 | or to override timings provided by the panel. | 39 | or to override timings provided by the panel. |
40 | 40 | ||
41 | [1]: Documentation/devicetree/bindings/video/display-timing.txt | 41 | [1]: Documentation/devicetree/bindings/display/display-timing.txt |
42 | 42 | ||
43 | Example: | 43 | Example: |
44 | 44 | ||
diff --git a/Documentation/devicetree/bindings/video/exynos_dp.txt b/Documentation/devicetree/bindings/display/exynos/exynos_dp.txt index 7a3a9cdb86ab..64693f2ebc51 100644 --- a/Documentation/devicetree/bindings/video/exynos_dp.txt +++ b/Documentation/devicetree/bindings/display/exynos/exynos_dp.txt | |||
@@ -50,7 +50,7 @@ Required properties for dp-controller: | |||
50 | number of lanes supported by the panel. | 50 | number of lanes supported by the panel. |
51 | LANE_COUNT1 = 1, LANE_COUNT2 = 2, LANE_COUNT4 = 4 | 51 | LANE_COUNT1 = 1, LANE_COUNT2 = 2, LANE_COUNT4 = 4 |
52 | - display-timings: timings for the connected panel as described by | 52 | - display-timings: timings for the connected panel as described by |
53 | Documentation/devicetree/bindings/video/display-timing.txt | 53 | Documentation/devicetree/bindings/display/display-timing.txt |
54 | 54 | ||
55 | Optional properties for dp-controller: | 55 | Optional properties for dp-controller: |
56 | -interlaced: | 56 | -interlaced: |
diff --git a/Documentation/devicetree/bindings/video/exynos_dsim.txt b/Documentation/devicetree/bindings/display/exynos/exynos_dsim.txt index 0be036270661..0e6f0c024858 100644 --- a/Documentation/devicetree/bindings/video/exynos_dsim.txt +++ b/Documentation/devicetree/bindings/display/exynos/exynos_dsim.txt | |||
@@ -49,7 +49,7 @@ Video interfaces: | |||
49 | mode | 49 | mode |
50 | - samsung,esc-clock-frequency: specifies DSI frequency in escape mode | 50 | - samsung,esc-clock-frequency: specifies DSI frequency in escape mode |
51 | 51 | ||
52 | [1]: Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt | 52 | [1]: Documentation/devicetree/bindings/display/mipi-dsi-bus.txt |
53 | [2]: Documentation/devicetree/bindings/media/video-interfaces.txt | 53 | [2]: Documentation/devicetree/bindings/media/video-interfaces.txt |
54 | 54 | ||
55 | Example: | 55 | Example: |
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmi.txt b/Documentation/devicetree/bindings/display/exynos/exynos_hdmi.txt index 1fd8cf9cbfac..1fd8cf9cbfac 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmi.txt +++ b/Documentation/devicetree/bindings/display/exynos/exynos_hdmi.txt | |||
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt b/Documentation/devicetree/bindings/display/exynos/exynos_hdmiddc.txt index 41eee971562b..41eee971562b 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt +++ b/Documentation/devicetree/bindings/display/exynos/exynos_hdmiddc.txt | |||
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt b/Documentation/devicetree/bindings/display/exynos/exynos_hdmiphy.txt index 162f641f7639..162f641f7639 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt +++ b/Documentation/devicetree/bindings/display/exynos/exynos_hdmiphy.txt | |||
diff --git a/Documentation/devicetree/bindings/video/exynos_mixer.txt b/Documentation/devicetree/bindings/display/exynos/exynos_mixer.txt index 3e38128f866b..3e38128f866b 100644 --- a/Documentation/devicetree/bindings/video/exynos_mixer.txt +++ b/Documentation/devicetree/bindings/display/exynos/exynos_mixer.txt | |||
diff --git a/Documentation/devicetree/bindings/video/samsung-fimd.txt b/Documentation/devicetree/bindings/display/exynos/samsung-fimd.txt index a8bbbde03e79..27c3ce0db16a 100644 --- a/Documentation/devicetree/bindings/video/samsung-fimd.txt +++ b/Documentation/devicetree/bindings/display/exynos/samsung-fimd.txt | |||
@@ -82,7 +82,7 @@ in [2]. The following are properties specific to those nodes: | |||
82 | 3 - for parallel output, | 82 | 3 - for parallel output, |
83 | 4 - for write-back interface | 83 | 4 - for write-back interface |
84 | 84 | ||
85 | [1]: Documentation/devicetree/bindings/video/display-timing.txt | 85 | [1]: Documentation/devicetree/bindings/display/display-timing.txt |
86 | [2]: Documentation/devicetree/bindings/media/video-interfaces.txt | 86 | [2]: Documentation/devicetree/bindings/media/video-interfaces.txt |
87 | 87 | ||
88 | Example: | 88 | Example: |
diff --git a/Documentation/devicetree/bindings/video/fsl,dcu.txt b/Documentation/devicetree/bindings/display/fsl,dcu.txt index ebf1be9ae393..ebf1be9ae393 100644 --- a/Documentation/devicetree/bindings/video/fsl,dcu.txt +++ b/Documentation/devicetree/bindings/display/fsl,dcu.txt | |||
diff --git a/Documentation/devicetree/bindings/video/fsl,imx-fb.txt b/Documentation/devicetree/bindings/display/imx/fsl,imx-fb.txt index 8c8c2f4e4c3f..00d5f8ea7ec6 100644 --- a/Documentation/devicetree/bindings/video/fsl,imx-fb.txt +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx-fb.txt | |||
@@ -9,7 +9,7 @@ Required properties: | |||
9 | 9 | ||
10 | Required nodes: | 10 | Required nodes: |
11 | - display: Phandle to a display node as described in | 11 | - display: Phandle to a display node as described in |
12 | Documentation/devicetree/bindings/video/display-timing.txt | 12 | Documentation/devicetree/bindings/display/display-timing.txt |
13 | Additional, the display node has to define properties: | 13 | Additional, the display node has to define properties: |
14 | - bits-per-pixel: Bits per pixel | 14 | - bits-per-pixel: Bits per pixel |
15 | - fsl,pcr: LCDC PCR value | 15 | - fsl,pcr: LCDC PCR value |
diff --git a/Documentation/devicetree/bindings/drm/imx/fsl-imx-drm.txt b/Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt index 971c3eedb1c7..971c3eedb1c7 100644 --- a/Documentation/devicetree/bindings/drm/imx/fsl-imx-drm.txt +++ b/Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt | |||
diff --git a/Documentation/devicetree/bindings/drm/imx/hdmi.txt b/Documentation/devicetree/bindings/display/imx/hdmi.txt index 1b756cf9afb0..1b756cf9afb0 100644 --- a/Documentation/devicetree/bindings/drm/imx/hdmi.txt +++ b/Documentation/devicetree/bindings/display/imx/hdmi.txt | |||
diff --git a/Documentation/devicetree/bindings/drm/imx/ldb.txt b/Documentation/devicetree/bindings/display/imx/ldb.txt index 9a21366436f6..0a175d991b52 100644 --- a/Documentation/devicetree/bindings/drm/imx/ldb.txt +++ b/Documentation/devicetree/bindings/display/imx/ldb.txt | |||
@@ -63,7 +63,7 @@ Required properties: | |||
63 | 63 | ||
64 | Optional properties (required if display-timings are used): | 64 | Optional properties (required if display-timings are used): |
65 | - display-timings : A node that describes the display timings as defined in | 65 | - display-timings : A node that describes the display timings as defined in |
66 | Documentation/devicetree/bindings/video/display-timing.txt. | 66 | Documentation/devicetree/bindings/display/display-timing.txt. |
67 | - fsl,data-mapping : should be "spwg" or "jeida" | 67 | - fsl,data-mapping : should be "spwg" or "jeida" |
68 | This describes how the color bits are laid out in the | 68 | This describes how the color bits are laid out in the |
69 | serialized LVDS signal. | 69 | serialized LVDS signal. |
diff --git a/Documentation/devicetree/bindings/display/marvell,pxa2xx-lcdc.txt b/Documentation/devicetree/bindings/display/marvell,pxa2xx-lcdc.txt new file mode 100644 index 000000000000..309c47f25b87 --- /dev/null +++ b/Documentation/devicetree/bindings/display/marvell,pxa2xx-lcdc.txt | |||
@@ -0,0 +1,34 @@ | |||
1 | PXA LCD Controller | ||
2 | ------------------ | ||
3 | |||
4 | Required properties: | ||
5 | - compatible : one of these | ||
6 | "marvell,pxa2xx-lcdc", | ||
7 | "marvell,pxa270-lcdc", | ||
8 | "marvell,pxa300-lcdc" | ||
9 | - reg : should contain 1 register range (address and length). | ||
10 | - interrupts : framebuffer controller interrupt. | ||
11 | - clocks: phandle to input clocks | ||
12 | |||
13 | Required nodes: | ||
14 | - port: connection to the LCD panel (see video-interfaces.txt) | ||
15 | This node must have its properties bus-width and remote-endpoint set. | ||
16 | If the panel is not a TFT color panel, then a "lcd-type" property in | ||
17 | the panel should specify the panel type. | ||
18 | This panel node should be in the board dts. | ||
19 | |||
20 | Example: | ||
21 | lcd-controller@40500000 { | ||
22 | compatible = "marvell,pxa2xx-lcdc"; | ||
23 | reg = <0x44000000 0x10000>; | ||
24 | interrupts = <17>; | ||
25 | clocks = <&clks CLK_LCD>; | ||
26 | status = "okay"; | ||
27 | |||
28 | port { | ||
29 | lcdc_out: endpoint { | ||
30 | remote-endpoint = <&panel_in>; | ||
31 | bus-width = <16>; | ||
32 | }; | ||
33 | }; | ||
34 | }; | ||
diff --git a/Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt b/Documentation/devicetree/bindings/display/mipi-dsi-bus.txt index 973c27273772..973c27273772 100644 --- a/Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt +++ b/Documentation/devicetree/bindings/display/mipi-dsi-bus.txt | |||
diff --git a/Documentation/devicetree/bindings/drm/msm/dsi.txt b/Documentation/devicetree/bindings/display/msm/dsi.txt index d56923cd5590..f344b9e49198 100644 --- a/Documentation/devicetree/bindings/drm/msm/dsi.txt +++ b/Documentation/devicetree/bindings/display/msm/dsi.txt | |||
@@ -28,7 +28,7 @@ Required properties: | |||
28 | 28 | ||
29 | Optional properties: | 29 | Optional properties: |
30 | - panel@0: Node of panel connected to this DSI controller. | 30 | - panel@0: Node of panel connected to this DSI controller. |
31 | See files in Documentation/devicetree/bindings/panel/ for each supported | 31 | See files in Documentation/devicetree/bindings/display/panel/ for each supported |
32 | panel. | 32 | panel. |
33 | - qcom,dual-dsi-mode: Boolean value indicating if the DSI controller is | 33 | - qcom,dual-dsi-mode: Boolean value indicating if the DSI controller is |
34 | driving a panel which needs 2 DSI links. | 34 | driving a panel which needs 2 DSI links. |
diff --git a/Documentation/devicetree/bindings/drm/msm/edp.txt b/Documentation/devicetree/bindings/display/msm/edp.txt index 3a20f6ea5898..3a20f6ea5898 100644 --- a/Documentation/devicetree/bindings/drm/msm/edp.txt +++ b/Documentation/devicetree/bindings/display/msm/edp.txt | |||
diff --git a/Documentation/devicetree/bindings/drm/msm/gpu.txt b/Documentation/devicetree/bindings/display/msm/gpu.txt index 67d0a58dbb77..67d0a58dbb77 100644 --- a/Documentation/devicetree/bindings/drm/msm/gpu.txt +++ b/Documentation/devicetree/bindings/display/msm/gpu.txt | |||
diff --git a/Documentation/devicetree/bindings/drm/msm/hdmi.txt b/Documentation/devicetree/bindings/display/msm/hdmi.txt index e926239e1101..379ee2ea9a3d 100644 --- a/Documentation/devicetree/bindings/drm/msm/hdmi.txt +++ b/Documentation/devicetree/bindings/display/msm/hdmi.txt | |||
@@ -2,6 +2,7 @@ Qualcomm adreno/snapdragon hdmi output | |||
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: one of the following | 4 | - compatible: one of the following |
5 | * "qcom,hdmi-tx-8996" | ||
5 | * "qcom,hdmi-tx-8994" | 6 | * "qcom,hdmi-tx-8994" |
6 | * "qcom,hdmi-tx-8084" | 7 | * "qcom,hdmi-tx-8084" |
7 | * "qcom,hdmi-tx-8974" | 8 | * "qcom,hdmi-tx-8974" |
@@ -21,6 +22,7 @@ Required properties: | |||
21 | Optional properties: | 22 | Optional properties: |
22 | - qcom,hdmi-tx-mux-en-gpio: hdmi mux enable pin | 23 | - qcom,hdmi-tx-mux-en-gpio: hdmi mux enable pin |
23 | - qcom,hdmi-tx-mux-sel-gpio: hdmi mux select pin | 24 | - qcom,hdmi-tx-mux-sel-gpio: hdmi mux select pin |
25 | - power-domains: reference to the power domain(s), if available. | ||
24 | - pinctrl-names: the pin control state names; should contain "default" | 26 | - pinctrl-names: the pin control state names; should contain "default" |
25 | - pinctrl-0: the default pinctrl state (active) | 27 | - pinctrl-0: the default pinctrl state (active) |
26 | - pinctrl-1: the "sleep" pinctrl state | 28 | - pinctrl-1: the "sleep" pinctrl state |
@@ -35,6 +37,7 @@ Example: | |||
35 | reg-names = "core_physical"; | 37 | reg-names = "core_physical"; |
36 | reg = <0x04a00000 0x1000>; | 38 | reg = <0x04a00000 0x1000>; |
37 | interrupts = <GIC_SPI 79 0>; | 39 | interrupts = <GIC_SPI 79 0>; |
40 | power-domains = <&mmcc MDSS_GDSC>; | ||
38 | clock-names = | 41 | clock-names = |
39 | "core_clk", | 42 | "core_clk", |
40 | "master_iface_clk", | 43 | "master_iface_clk", |
diff --git a/Documentation/devicetree/bindings/drm/msm/mdp.txt b/Documentation/devicetree/bindings/display/msm/mdp.txt index 1a0598e5279d..0833edaba4c3 100644 --- a/Documentation/devicetree/bindings/drm/msm/mdp.txt +++ b/Documentation/devicetree/bindings/display/msm/mdp.txt | |||
@@ -11,13 +11,14 @@ Required properties: | |||
11 | - clock-names: the following clocks are required: | 11 | - clock-names: the following clocks are required: |
12 | * "core_clk" | 12 | * "core_clk" |
13 | * "iface_clk" | 13 | * "iface_clk" |
14 | * "lut_clk" | ||
15 | * "src_clk" | 14 | * "src_clk" |
16 | * "hdmi_clk" | 15 | * "hdmi_clk" |
17 | * "mpd_clk" | 16 | * "mpd_clk" |
18 | 17 | ||
19 | Optional properties: | 18 | Optional properties: |
20 | - gpus: phandle for gpu device | 19 | - gpus: phandle for gpu device |
20 | - clock-names: the following clocks are optional: | ||
21 | * "lut_clk" | ||
21 | 22 | ||
22 | Example: | 23 | Example: |
23 | 24 | ||
diff --git a/Documentation/devicetree/bindings/fb/mxsfb.txt b/Documentation/devicetree/bindings/display/mxsfb.txt index 96ec5179c8a0..96ec5179c8a0 100644 --- a/Documentation/devicetree/bindings/fb/mxsfb.txt +++ b/Documentation/devicetree/bindings/display/mxsfb.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/ampire,am800480r3tmqwa1h.txt b/Documentation/devicetree/bindings/display/panel/ampire,am800480r3tmqwa1h.txt index 83e2cae1cc1b..83e2cae1cc1b 100644 --- a/Documentation/devicetree/bindings/panel/ampire,am800480r3tmqwa1h.txt +++ b/Documentation/devicetree/bindings/display/panel/ampire,am800480r3tmqwa1h.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/auo,b080uan01.txt b/Documentation/devicetree/bindings/display/panel/auo,b080uan01.txt index bae0e2b51467..bae0e2b51467 100644 --- a/Documentation/devicetree/bindings/panel/auo,b080uan01.txt +++ b/Documentation/devicetree/bindings/display/panel/auo,b080uan01.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/auo,b101aw03.txt b/Documentation/devicetree/bindings/display/panel/auo,b101aw03.txt index 72e088a4fb3a..72e088a4fb3a 100644 --- a/Documentation/devicetree/bindings/panel/auo,b101aw03.txt +++ b/Documentation/devicetree/bindings/display/panel/auo,b101aw03.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/auo,b101ean01.txt b/Documentation/devicetree/bindings/display/panel/auo,b101ean01.txt index 3590b0741619..3590b0741619 100644 --- a/Documentation/devicetree/bindings/panel/auo,b101ean01.txt +++ b/Documentation/devicetree/bindings/display/panel/auo,b101ean01.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/auo,b101xtn01.txt b/Documentation/devicetree/bindings/display/panel/auo,b101xtn01.txt index 889d511d66c9..889d511d66c9 100644 --- a/Documentation/devicetree/bindings/panel/auo,b101xtn01.txt +++ b/Documentation/devicetree/bindings/display/panel/auo,b101xtn01.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/auo,b116xw03.txt b/Documentation/devicetree/bindings/display/panel/auo,b116xw03.txt index 690d0a568ef3..690d0a568ef3 100644 --- a/Documentation/devicetree/bindings/panel/auo,b116xw03.txt +++ b/Documentation/devicetree/bindings/display/panel/auo,b116xw03.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/auo,b133htn01.txt b/Documentation/devicetree/bindings/display/panel/auo,b133htn01.txt index 302226b5bb55..302226b5bb55 100644 --- a/Documentation/devicetree/bindings/panel/auo,b133htn01.txt +++ b/Documentation/devicetree/bindings/display/panel/auo,b133htn01.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/auo,b133xtn01.txt b/Documentation/devicetree/bindings/display/panel/auo,b133xtn01.txt index 7443b7c76769..7443b7c76769 100644 --- a/Documentation/devicetree/bindings/panel/auo,b133xtn01.txt +++ b/Documentation/devicetree/bindings/display/panel/auo,b133xtn01.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/avic,tm070ddh03.txt b/Documentation/devicetree/bindings/display/panel/avic,tm070ddh03.txt index b6f2f3e8f44e..b6f2f3e8f44e 100644 --- a/Documentation/devicetree/bindings/panel/avic,tm070ddh03.txt +++ b/Documentation/devicetree/bindings/display/panel/avic,tm070ddh03.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/chunghwa,claa101wa01a.txt b/Documentation/devicetree/bindings/display/panel/chunghwa,claa101wa01a.txt index f24614e4d5ec..f24614e4d5ec 100644 --- a/Documentation/devicetree/bindings/panel/chunghwa,claa101wa01a.txt +++ b/Documentation/devicetree/bindings/display/panel/chunghwa,claa101wa01a.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/chunghwa,claa101wb03.txt b/Documentation/devicetree/bindings/display/panel/chunghwa,claa101wb03.txt index 0ab2c05a4c22..0ab2c05a4c22 100644 --- a/Documentation/devicetree/bindings/panel/chunghwa,claa101wb03.txt +++ b/Documentation/devicetree/bindings/display/panel/chunghwa,claa101wb03.txt | |||
diff --git a/Documentation/devicetree/bindings/video/display-timing.txt b/Documentation/devicetree/bindings/display/panel/display-timing.txt index e1d4a0b59612..e1d4a0b59612 100644 --- a/Documentation/devicetree/bindings/video/display-timing.txt +++ b/Documentation/devicetree/bindings/display/panel/display-timing.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/edt,et057090dhu.txt b/Documentation/devicetree/bindings/display/panel/edt,et057090dhu.txt index 4903d7b1d947..4903d7b1d947 100644 --- a/Documentation/devicetree/bindings/panel/edt,et057090dhu.txt +++ b/Documentation/devicetree/bindings/display/panel/edt,et057090dhu.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/edt,et070080dh6.txt b/Documentation/devicetree/bindings/display/panel/edt,et070080dh6.txt index 20cb38e836e4..20cb38e836e4 100644 --- a/Documentation/devicetree/bindings/panel/edt,et070080dh6.txt +++ b/Documentation/devicetree/bindings/display/panel/edt,et070080dh6.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/edt,etm0700g0dh6.txt b/Documentation/devicetree/bindings/display/panel/edt,etm0700g0dh6.txt index ee4b18053e40..ee4b18053e40 100644 --- a/Documentation/devicetree/bindings/panel/edt,etm0700g0dh6.txt +++ b/Documentation/devicetree/bindings/display/panel/edt,etm0700g0dh6.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/foxlink,fl500wvr00-a0t.txt b/Documentation/devicetree/bindings/display/panel/foxlink,fl500wvr00-a0t.txt index b47f9d87bc19..b47f9d87bc19 100644 --- a/Documentation/devicetree/bindings/panel/foxlink,fl500wvr00-a0t.txt +++ b/Documentation/devicetree/bindings/display/panel/foxlink,fl500wvr00-a0t.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/giantplus,gpg482739qs5.txt b/Documentation/devicetree/bindings/display/panel/giantplus,gpg482739qs5.txt index 24b0b624434b..24b0b624434b 100644 --- a/Documentation/devicetree/bindings/panel/giantplus,gpg482739qs5.txt +++ b/Documentation/devicetree/bindings/display/panel/giantplus,gpg482739qs5.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/hannstar,hsd070pww1.txt b/Documentation/devicetree/bindings/display/panel/hannstar,hsd070pww1.txt index 7da1d5c038ff..7da1d5c038ff 100644 --- a/Documentation/devicetree/bindings/panel/hannstar,hsd070pww1.txt +++ b/Documentation/devicetree/bindings/display/panel/hannstar,hsd070pww1.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/hannstar,hsd100pxn1.txt b/Documentation/devicetree/bindings/display/panel/hannstar,hsd100pxn1.txt index 8270319a99de..8270319a99de 100644 --- a/Documentation/devicetree/bindings/panel/hannstar,hsd100pxn1.txt +++ b/Documentation/devicetree/bindings/display/panel/hannstar,hsd100pxn1.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/hit,tx23d38vm0caa.txt b/Documentation/devicetree/bindings/display/panel/hit,tx23d38vm0caa.txt index 04caaae19af6..04caaae19af6 100644 --- a/Documentation/devicetree/bindings/panel/hit,tx23d38vm0caa.txt +++ b/Documentation/devicetree/bindings/display/panel/hit,tx23d38vm0caa.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/innolux,at043tn24.txt b/Documentation/devicetree/bindings/display/panel/innolux,at043tn24.txt index 4104226b61bc..4104226b61bc 100644 --- a/Documentation/devicetree/bindings/panel/innolux,at043tn24.txt +++ b/Documentation/devicetree/bindings/display/panel/innolux,at043tn24.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/innolux,g121i1-l01.txt b/Documentation/devicetree/bindings/display/panel/innolux,g121i1-l01.txt index 2743b07cd2f2..2743b07cd2f2 100644 --- a/Documentation/devicetree/bindings/panel/innolux,g121i1-l01.txt +++ b/Documentation/devicetree/bindings/display/panel/innolux,g121i1-l01.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/innolux,n116bge.txt b/Documentation/devicetree/bindings/display/panel/innolux,n116bge.txt index 081bb939ed31..081bb939ed31 100644 --- a/Documentation/devicetree/bindings/panel/innolux,n116bge.txt +++ b/Documentation/devicetree/bindings/display/panel/innolux,n116bge.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/innolux,n156bge-l21.txt b/Documentation/devicetree/bindings/display/panel/innolux,n156bge-l21.txt index 7825844aafdf..7825844aafdf 100644 --- a/Documentation/devicetree/bindings/panel/innolux,n156bge-l21.txt +++ b/Documentation/devicetree/bindings/display/panel/innolux,n156bge-l21.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/innolux,zj070na-01p.txt b/Documentation/devicetree/bindings/display/panel/innolux,zj070na-01p.txt index 824f87f1526d..824f87f1526d 100644 --- a/Documentation/devicetree/bindings/panel/innolux,zj070na-01p.txt +++ b/Documentation/devicetree/bindings/display/panel/innolux,zj070na-01p.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/lg,lb070wv8.txt b/Documentation/devicetree/bindings/display/panel/lg,lb070wv8.txt index a7588e5259cf..a7588e5259cf 100644 --- a/Documentation/devicetree/bindings/panel/lg,lb070wv8.txt +++ b/Documentation/devicetree/bindings/display/panel/lg,lb070wv8.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/lg,ld070wx3-sl01.txt b/Documentation/devicetree/bindings/display/panel/lg,ld070wx3-sl01.txt index 5e649cb9aa1a..5e649cb9aa1a 100644 --- a/Documentation/devicetree/bindings/panel/lg,ld070wx3-sl01.txt +++ b/Documentation/devicetree/bindings/display/panel/lg,ld070wx3-sl01.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/lg,lg4573.txt b/Documentation/devicetree/bindings/display/panel/lg,lg4573.txt index 824441f4e95a..824441f4e95a 100644 --- a/Documentation/devicetree/bindings/panel/lg,lg4573.txt +++ b/Documentation/devicetree/bindings/display/panel/lg,lg4573.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/lg,lh500wx1-sd03.txt b/Documentation/devicetree/bindings/display/panel/lg,lh500wx1-sd03.txt index a04fd2b2e73d..a04fd2b2e73d 100644 --- a/Documentation/devicetree/bindings/panel/lg,lh500wx1-sd03.txt +++ b/Documentation/devicetree/bindings/display/panel/lg,lh500wx1-sd03.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/lg,lp129qe.txt b/Documentation/devicetree/bindings/display/panel/lg,lp129qe.txt index 9f262e0c5a2e..9f262e0c5a2e 100644 --- a/Documentation/devicetree/bindings/panel/lg,lp129qe.txt +++ b/Documentation/devicetree/bindings/display/panel/lg,lp129qe.txt | |||
diff --git a/Documentation/devicetree/bindings/video/lgphilips,lb035q02.txt b/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.txt index 1a1e653e5407..1a1e653e5407 100644 --- a/Documentation/devicetree/bindings/video/lgphilips,lb035q02.txt +++ b/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/nec,nl4827hc19-05b.txt b/Documentation/devicetree/bindings/display/panel/nec,nl4827hc19-05b.txt index 8e1914d1edb8..8e1914d1edb8 100644 --- a/Documentation/devicetree/bindings/panel/nec,nl4827hc19-05b.txt +++ b/Documentation/devicetree/bindings/display/panel/nec,nl4827hc19-05b.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/okaya,rs800480t-7x0gp.txt b/Documentation/devicetree/bindings/display/panel/okaya,rs800480t-7x0gp.txt index ddf8e211d382..ddf8e211d382 100644 --- a/Documentation/devicetree/bindings/panel/okaya,rs800480t-7x0gp.txt +++ b/Documentation/devicetree/bindings/display/panel/okaya,rs800480t-7x0gp.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/ortustech,com43h4m85ulc.txt b/Documentation/devicetree/bindings/display/panel/ortustech,com43h4m85ulc.txt index de19e9398618..de19e9398618 100644 --- a/Documentation/devicetree/bindings/panel/ortustech,com43h4m85ulc.txt +++ b/Documentation/devicetree/bindings/display/panel/ortustech,com43h4m85ulc.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/panasonic,vvx10f004b00.txt b/Documentation/devicetree/bindings/display/panel/panasonic,vvx10f004b00.txt index d328b0341bf4..d328b0341bf4 100644 --- a/Documentation/devicetree/bindings/panel/panasonic,vvx10f004b00.txt +++ b/Documentation/devicetree/bindings/display/panel/panasonic,vvx10f004b00.txt | |||
diff --git a/Documentation/devicetree/bindings/video/panel-dpi.txt b/Documentation/devicetree/bindings/display/panel/panel-dpi.txt index a40180b05bab..216c894d4f99 100644 --- a/Documentation/devicetree/bindings/video/panel-dpi.txt +++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.txt | |||
@@ -10,7 +10,7 @@ Optional properties: | |||
10 | 10 | ||
11 | Required nodes: | 11 | Required nodes: |
12 | - "panel-timing" containing video timings | 12 | - "panel-timing" containing video timings |
13 | (Documentation/devicetree/bindings/video/display-timing.txt) | 13 | (Documentation/devicetree/bindings/display/display-timing.txt) |
14 | - Video port for DPI input | 14 | - Video port for DPI input |
15 | 15 | ||
16 | Example | 16 | Example |
diff --git a/Documentation/devicetree/bindings/video/panel-dsi-cm.txt b/Documentation/devicetree/bindings/display/panel/panel-dsi-cm.txt index dce48eb9db57..dce48eb9db57 100644 --- a/Documentation/devicetree/bindings/video/panel-dsi-cm.txt +++ b/Documentation/devicetree/bindings/display/panel/panel-dsi-cm.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/samsung,ld9040.txt b/Documentation/devicetree/bindings/display/panel/samsung,ld9040.txt index 07c36c3f7b52..fc595d9b985b 100644 --- a/Documentation/devicetree/bindings/panel/samsung,ld9040.txt +++ b/Documentation/devicetree/bindings/display/panel/samsung,ld9040.txt | |||
@@ -20,7 +20,7 @@ The device node can contain one 'port' child node with one child | |||
20 | 'endpoint' node, according to the bindings defined in [3]. This | 20 | 'endpoint' node, according to the bindings defined in [3]. This |
21 | node should describe panel's video bus. | 21 | node should describe panel's video bus. |
22 | 22 | ||
23 | [1]: Documentation/devicetree/bindings/video/display-timing.txt | 23 | [1]: Documentation/devicetree/bindings/display/display-timing.txt |
24 | [2]: Documentation/devicetree/bindings/spi/spi-bus.txt | 24 | [2]: Documentation/devicetree/bindings/spi/spi-bus.txt |
25 | [3]: Documentation/devicetree/bindings/media/video-interfaces.txt | 25 | [3]: Documentation/devicetree/bindings/media/video-interfaces.txt |
26 | 26 | ||
diff --git a/Documentation/devicetree/bindings/panel/samsung,ltn101nt05.txt b/Documentation/devicetree/bindings/display/panel/samsung,ltn101nt05.txt index ef522c6bb85f..ef522c6bb85f 100644 --- a/Documentation/devicetree/bindings/panel/samsung,ltn101nt05.txt +++ b/Documentation/devicetree/bindings/display/panel/samsung,ltn101nt05.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/samsung,ltn140at29-301.txt b/Documentation/devicetree/bindings/display/panel/samsung,ltn140at29-301.txt index e7f969d891cc..e7f969d891cc 100644 --- a/Documentation/devicetree/bindings/panel/samsung,ltn140at29-301.txt +++ b/Documentation/devicetree/bindings/display/panel/samsung,ltn140at29-301.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/samsung,s6e8aa0.txt b/Documentation/devicetree/bindings/display/panel/samsung,s6e8aa0.txt index e7ee988e3156..25701c81b5e0 100644 --- a/Documentation/devicetree/bindings/panel/samsung,s6e8aa0.txt +++ b/Documentation/devicetree/bindings/display/panel/samsung,s6e8aa0.txt | |||
@@ -21,7 +21,7 @@ The device node can contain one 'port' child node with one child | |||
21 | 'endpoint' node, according to the bindings defined in [2]. This | 21 | 'endpoint' node, according to the bindings defined in [2]. This |
22 | node should describe panel's video bus. | 22 | node should describe panel's video bus. |
23 | 23 | ||
24 | [1]: Documentation/devicetree/bindings/video/display-timing.txt | 24 | [1]: Documentation/devicetree/bindings/display/display-timing.txt |
25 | [2]: Documentation/devicetree/bindings/media/video-interfaces.txt | 25 | [2]: Documentation/devicetree/bindings/media/video-interfaces.txt |
26 | 26 | ||
27 | Example: | 27 | Example: |
diff --git a/Documentation/devicetree/bindings/panel/sharp,lq101r1sx01.txt b/Documentation/devicetree/bindings/display/panel/sharp,lq101r1sx01.txt index f522bb8e47e1..f522bb8e47e1 100644 --- a/Documentation/devicetree/bindings/panel/sharp,lq101r1sx01.txt +++ b/Documentation/devicetree/bindings/display/panel/sharp,lq101r1sx01.txt | |||
diff --git a/Documentation/devicetree/bindings/video/sharp,ls037v7dw01.txt b/Documentation/devicetree/bindings/display/panel/sharp,ls037v7dw01.txt index 0cc8981e9d49..0cc8981e9d49 100644 --- a/Documentation/devicetree/bindings/video/sharp,ls037v7dw01.txt +++ b/Documentation/devicetree/bindings/display/panel/sharp,ls037v7dw01.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/shelly,sca07010-bfn-lnn.txt b/Documentation/devicetree/bindings/display/panel/shelly,sca07010-bfn-lnn.txt index fc1ea9e26c94..fc1ea9e26c94 100644 --- a/Documentation/devicetree/bindings/panel/shelly,sca07010-bfn-lnn.txt +++ b/Documentation/devicetree/bindings/display/panel/shelly,sca07010-bfn-lnn.txt | |||
diff --git a/Documentation/devicetree/bindings/panel/simple-panel.txt b/Documentation/devicetree/bindings/display/panel/simple-panel.txt index 1341bbf4aa3d..1341bbf4aa3d 100644 --- a/Documentation/devicetree/bindings/panel/simple-panel.txt +++ b/Documentation/devicetree/bindings/display/panel/simple-panel.txt | |||
diff --git a/Documentation/devicetree/bindings/video/sony,acx565akm.txt b/Documentation/devicetree/bindings/display/panel/sony,acx565akm.txt index e12333280749..e12333280749 100644 --- a/Documentation/devicetree/bindings/video/sony,acx565akm.txt +++ b/Documentation/devicetree/bindings/display/panel/sony,acx565akm.txt | |||
diff --git a/Documentation/devicetree/bindings/video/toppoly,td028ttec1.txt b/Documentation/devicetree/bindings/display/panel/toppoly,td028ttec1.txt index 7175dc3740ac..7175dc3740ac 100644 --- a/Documentation/devicetree/bindings/video/toppoly,td028ttec1.txt +++ b/Documentation/devicetree/bindings/display/panel/toppoly,td028ttec1.txt | |||
diff --git a/Documentation/devicetree/bindings/video/tpo,td043mtea1.txt b/Documentation/devicetree/bindings/display/panel/tpo,td043mtea1.txt index ec6d62975162..ec6d62975162 100644 --- a/Documentation/devicetree/bindings/video/tpo,td043mtea1.txt +++ b/Documentation/devicetree/bindings/display/panel/tpo,td043mtea1.txt | |||
diff --git a/Documentation/devicetree/bindings/video/renesas,du.txt b/Documentation/devicetree/bindings/display/renesas,du.txt index c902323928f7..eccd4f4867b2 100644 --- a/Documentation/devicetree/bindings/video/renesas,du.txt +++ b/Documentation/devicetree/bindings/display/renesas,du.txt | |||
@@ -5,7 +5,9 @@ Required Properties: | |||
5 | - compatible: must be one of the following. | 5 | - compatible: must be one of the following. |
6 | - "renesas,du-r8a7779" for R8A7779 (R-Car H1) compatible DU | 6 | - "renesas,du-r8a7779" for R8A7779 (R-Car H1) compatible DU |
7 | - "renesas,du-r8a7790" for R8A7790 (R-Car H2) compatible DU | 7 | - "renesas,du-r8a7790" for R8A7790 (R-Car H2) compatible DU |
8 | - "renesas,du-r8a7791" for R8A7791 (R-Car M2) compatible DU | 8 | - "renesas,du-r8a7791" for R8A7791 (R-Car M2-W) compatible DU |
9 | - "renesas,du-r8a7793" for R8A7793 (R-Car M2-N) compatible DU | ||
10 | - "renesas,du-r8a7794" for R8A7794 (R-Car E2) compatible DU | ||
9 | 11 | ||
10 | - reg: A list of base address and length of each memory resource, one for | 12 | - reg: A list of base address and length of each memory resource, one for |
11 | each entry in the reg-names property. | 13 | each entry in the reg-names property. |
@@ -22,9 +24,9 @@ Required Properties: | |||
22 | - clock-names: Name of the clocks. This property is model-dependent. | 24 | - clock-names: Name of the clocks. This property is model-dependent. |
23 | - R8A7779 uses a single functional clock. The clock doesn't need to be | 25 | - R8A7779 uses a single functional clock. The clock doesn't need to be |
24 | named. | 26 | named. |
25 | - R8A7790 and R8A7791 use one functional clock per channel and one clock | 27 | - R8A779[0134] use one functional clock per channel and one clock per LVDS |
26 | per LVDS encoder. The functional clocks must be named "du.x" with "x" | 28 | encoder (if available). The functional clocks must be named "du.x" with |
27 | being the channel numerical index. The LVDS clocks must be named | 29 | "x" being the channel numerical index. The LVDS clocks must be named |
28 | "lvds.x" with "x" being the LVDS encoder numerical index. | 30 | "lvds.x" with "x" being the LVDS encoder numerical index. |
29 | - In addition to the functional and encoder clocks, all DU versions also | 31 | - In addition to the functional and encoder clocks, all DU versions also |
30 | support externally supplied pixel clocks. Those clocks are optional. | 32 | support externally supplied pixel clocks. Those clocks are optional. |
@@ -43,7 +45,9 @@ corresponding to each DU output. | |||
43 | ----------------------------------------------------------------------------- | 45 | ----------------------------------------------------------------------------- |
44 | R8A7779 (H1) DPAD 0 DPAD 1 - | 46 | R8A7779 (H1) DPAD 0 DPAD 1 - |
45 | R8A7790 (H2) DPAD LVDS 0 LVDS 1 | 47 | R8A7790 (H2) DPAD LVDS 0 LVDS 1 |
46 | R8A7791 (M2) DPAD LVDS 0 - | 48 | R8A7791 (M2-W) DPAD LVDS 0 - |
49 | R8A7793 (M2-N) DPAD LVDS 0 - | ||
50 | R8A7794 (E2) DPAD 0 DPAD 1 - | ||
47 | 51 | ||
48 | 52 | ||
49 | Example: R8A7790 (R-Car H2) DU | 53 | Example: R8A7790 (R-Car H2) DU |
diff --git a/Documentation/devicetree/bindings/video/dw_hdmi-rockchip.txt b/Documentation/devicetree/bindings/display/rockchip/dw_hdmi-rockchip.txt index 668091f27674..668091f27674 100644 --- a/Documentation/devicetree/bindings/video/dw_hdmi-rockchip.txt +++ b/Documentation/devicetree/bindings/display/rockchip/dw_hdmi-rockchip.txt | |||
diff --git a/Documentation/devicetree/bindings/video/rockchip-drm.txt b/Documentation/devicetree/bindings/display/rockchip/rockchip-drm.txt index 7fff582495a2..5707af89319d 100644 --- a/Documentation/devicetree/bindings/video/rockchip-drm.txt +++ b/Documentation/devicetree/bindings/display/rockchip/rockchip-drm.txt | |||
@@ -9,7 +9,7 @@ Required properties: | |||
9 | - compatible: Should be "rockchip,display-subsystem" | 9 | - compatible: Should be "rockchip,display-subsystem" |
10 | - ports: Should contain a list of phandles pointing to display interface port | 10 | - ports: Should contain a list of phandles pointing to display interface port |
11 | of vop devices. vop definitions as defined in | 11 | of vop devices. vop definitions as defined in |
12 | Documentation/devicetree/bindings/video/rockchip-vop.txt | 12 | Documentation/devicetree/bindings/display/rockchip/rockchip-vop.txt |
13 | 13 | ||
14 | example: | 14 | example: |
15 | 15 | ||
diff --git a/Documentation/devicetree/bindings/video/rockchip-vop.txt b/Documentation/devicetree/bindings/display/rockchip/rockchip-vop.txt index d15351f2313d..d15351f2313d 100644 --- a/Documentation/devicetree/bindings/video/rockchip-vop.txt +++ b/Documentation/devicetree/bindings/display/rockchip/rockchip-vop.txt | |||
diff --git a/Documentation/devicetree/bindings/video/simple-framebuffer-sunxi.txt b/Documentation/devicetree/bindings/display/simple-framebuffer-sunxi.txt index c46ba641a1df..c46ba641a1df 100644 --- a/Documentation/devicetree/bindings/video/simple-framebuffer-sunxi.txt +++ b/Documentation/devicetree/bindings/display/simple-framebuffer-sunxi.txt | |||
diff --git a/Documentation/devicetree/bindings/video/simple-framebuffer.txt b/Documentation/devicetree/bindings/display/simple-framebuffer.txt index 4474ef6e0b95..4474ef6e0b95 100644 --- a/Documentation/devicetree/bindings/video/simple-framebuffer.txt +++ b/Documentation/devicetree/bindings/display/simple-framebuffer.txt | |||
diff --git a/Documentation/devicetree/bindings/fb/sm501fb.txt b/Documentation/devicetree/bindings/display/sm501fb.txt index 9d9f0098092b..9d9f0098092b 100644 --- a/Documentation/devicetree/bindings/fb/sm501fb.txt +++ b/Documentation/devicetree/bindings/display/sm501fb.txt | |||
diff --git a/Documentation/devicetree/bindings/video/ssd1289fb.txt b/Documentation/devicetree/bindings/display/ssd1289fb.txt index 4fcd5e68cb6e..4fcd5e68cb6e 100644 --- a/Documentation/devicetree/bindings/video/ssd1289fb.txt +++ b/Documentation/devicetree/bindings/display/ssd1289fb.txt | |||
diff --git a/Documentation/devicetree/bindings/video/ssd1307fb.txt b/Documentation/devicetree/bindings/display/ssd1307fb.txt index d1be78db63f5..eb31ed47a283 100644 --- a/Documentation/devicetree/bindings/video/ssd1307fb.txt +++ b/Documentation/devicetree/bindings/display/ssd1307fb.txt | |||
@@ -2,7 +2,8 @@ | |||
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: Should be "solomon,<chip>fb-<bus>". The only supported bus for | 4 | - compatible: Should be "solomon,<chip>fb-<bus>". The only supported bus for |
5 | now is i2c, and the supported chips are ssd1305, ssd1306 and ssd1307. | 5 | now is i2c, and the supported chips are ssd1305, ssd1306, ssd1307 and |
6 | ssd1309. | ||
6 | - reg: Should contain address of the controller on the I2C bus. Most likely | 7 | - reg: Should contain address of the controller on the I2C bus. Most likely |
7 | 0x3c or 0x3d | 8 | 0x3c or 0x3d |
8 | - pwm: Should contain the pwm to use according to the OF device tree PWM | 9 | - pwm: Should contain the pwm to use according to the OF device tree PWM |
diff --git a/Documentation/devicetree/bindings/gpu/st,stih4xx.txt b/Documentation/devicetree/bindings/display/st,stih4xx.txt index a36dfce0032e..a352ed30cd70 100644 --- a/Documentation/devicetree/bindings/gpu/st,stih4xx.txt +++ b/Documentation/devicetree/bindings/display/st,stih4xx.txt | |||
@@ -61,7 +61,7 @@ STMicroelectronics stih4xx platforms | |||
61 | - reg-names: names of the mapped memory regions listed in regs property in | 61 | - reg-names: names of the mapped memory regions listed in regs property in |
62 | the same order. | 62 | the same order. |
63 | - interrupts : HDMI interrupt number to the CPU. | 63 | - interrupts : HDMI interrupt number to the CPU. |
64 | - interrupt-names: name of the interrupts listed in interrupts property in | 64 | - interrupt-names: names of the interrupts listed in interrupts property in |
65 | the same order | 65 | the same order |
66 | - clocks: from common clock binding: handle hardware IP needed clocks, the | 66 | - clocks: from common clock binding: handle hardware IP needed clocks, the |
67 | number of clocks may depend of the SoC type. | 67 | number of clocks may depend of the SoC type. |
@@ -95,7 +95,7 @@ sti-dvo: | |||
95 | - clock-names: names of the clocks listed in clocks property in the same | 95 | - clock-names: names of the clocks listed in clocks property in the same |
96 | order. | 96 | order. |
97 | - pinctrl-0: pin control handle | 97 | - pinctrl-0: pin control handle |
98 | - pinctrl-name: names of the pin control to use | 98 | - pinctrl-names: names of the pin control states to use |
99 | - sti,panel: phandle of the panel connected to the DVO output | 99 | - sti,panel: phandle of the panel connected to the DVO output |
100 | 100 | ||
101 | sti-hqvdp: | 101 | sti-hqvdp: |
diff --git a/Documentation/devicetree/bindings/mipi/nvidia,tegra114-mipi.txt b/Documentation/devicetree/bindings/display/tegra/nvidia,tegra114-mipi.txt index e4a25cedc5cf..e4a25cedc5cf 100644 --- a/Documentation/devicetree/bindings/mipi/nvidia,tegra114-mipi.txt +++ b/Documentation/devicetree/bindings/display/tegra/nvidia,tegra114-mipi.txt | |||
diff --git a/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt b/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt index e685610d38e2..a3bd8c050c4e 100644 --- a/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt +++ b/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt | |||
@@ -184,7 +184,7 @@ of the following host1x client modules: | |||
184 | - avdd-dsi-supply: phandle of a supply that powers the DSI controller | 184 | - avdd-dsi-supply: phandle of a supply that powers the DSI controller |
185 | - nvidia,mipi-calibrate: Should contain a phandle and a specifier specifying | 185 | - nvidia,mipi-calibrate: Should contain a phandle and a specifier specifying |
186 | which pads are used by this DSI output and need to be calibrated. See also | 186 | which pads are used by this DSI output and need to be calibrated. See also |
187 | ../mipi/nvidia,tegra114-mipi.txt. | 187 | ../display/tegra/nvidia,tegra114-mipi.txt. |
188 | 188 | ||
189 | Optional properties: | 189 | Optional properties: |
190 | - nvidia,ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing | 190 | - nvidia,ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing |
diff --git a/Documentation/devicetree/bindings/video/ti,dra7-dss.txt b/Documentation/devicetree/bindings/display/ti/ti,dra7-dss.txt index f33a05137b0e..c30f9ec189ed 100644 --- a/Documentation/devicetree/bindings/video/ti,dra7-dss.txt +++ b/Documentation/devicetree/bindings/display/ti/ti,dra7-dss.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | Texas Instruments DRA7x Display Subsystem | 1 | Texas Instruments DRA7x Display Subsystem |
2 | ========================================= | 2 | ========================================= |
3 | 3 | ||
4 | See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic | 4 | See Documentation/devicetree/bindings/display/ti/ti,omap-dss.txt for generic |
5 | description about OMAP Display Subsystem bindings. | 5 | description about OMAP Display Subsystem bindings. |
6 | 6 | ||
7 | DSS Core | 7 | DSS Core |
diff --git a/Documentation/devicetree/bindings/video/ti,omap-dss.txt b/Documentation/devicetree/bindings/display/ti/ti,omap-dss.txt index e1ef29569338..e1ef29569338 100644 --- a/Documentation/devicetree/bindings/video/ti,omap-dss.txt +++ b/Documentation/devicetree/bindings/display/ti/ti,omap-dss.txt | |||
diff --git a/Documentation/devicetree/bindings/video/ti,omap2-dss.txt b/Documentation/devicetree/bindings/display/ti/ti,omap2-dss.txt index fa8bb2ed1170..afcd5a86c6a4 100644 --- a/Documentation/devicetree/bindings/video/ti,omap2-dss.txt +++ b/Documentation/devicetree/bindings/display/ti/ti,omap2-dss.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | Texas Instruments OMAP2 Display Subsystem | 1 | Texas Instruments OMAP2 Display Subsystem |
2 | ========================================= | 2 | ========================================= |
3 | 3 | ||
4 | See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic | 4 | See Documentation/devicetree/bindings/display/ti/ti,omap-dss.txt for generic |
5 | description about OMAP Display Subsystem bindings. | 5 | description about OMAP Display Subsystem bindings. |
6 | 6 | ||
7 | DSS Core | 7 | DSS Core |
diff --git a/Documentation/devicetree/bindings/video/ti,omap3-dss.txt b/Documentation/devicetree/bindings/display/ti/ti,omap3-dss.txt index 0023fa4b1328..dc66e1447c31 100644 --- a/Documentation/devicetree/bindings/video/ti,omap3-dss.txt +++ b/Documentation/devicetree/bindings/display/ti/ti,omap3-dss.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | Texas Instruments OMAP3 Display Subsystem | 1 | Texas Instruments OMAP3 Display Subsystem |
2 | ========================================= | 2 | ========================================= |
3 | 3 | ||
4 | See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic | 4 | See Documentation/devicetree/bindings/display/ti/ti,omap-dss.txt for generic |
5 | description about OMAP Display Subsystem bindings. | 5 | description about OMAP Display Subsystem bindings. |
6 | 6 | ||
7 | DSS Core | 7 | DSS Core |
diff --git a/Documentation/devicetree/bindings/video/ti,omap4-dss.txt b/Documentation/devicetree/bindings/display/ti/ti,omap4-dss.txt index b8c29fbd1fbb..bc624db8888d 100644 --- a/Documentation/devicetree/bindings/video/ti,omap4-dss.txt +++ b/Documentation/devicetree/bindings/display/ti/ti,omap4-dss.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | Texas Instruments OMAP4 Display Subsystem | 1 | Texas Instruments OMAP4 Display Subsystem |
2 | ========================================= | 2 | ========================================= |
3 | 3 | ||
4 | See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic | 4 | See Documentation/devicetree/bindings/display/ti/ti,omap-dss.txt for generic |
5 | description about OMAP Display Subsystem bindings. | 5 | description about OMAP Display Subsystem bindings. |
6 | 6 | ||
7 | DSS Core | 7 | DSS Core |
diff --git a/Documentation/devicetree/bindings/video/ti,omap5-dss.txt b/Documentation/devicetree/bindings/display/ti/ti,omap5-dss.txt index 38ffc8fcd816..118a486c47bb 100644 --- a/Documentation/devicetree/bindings/video/ti,omap5-dss.txt +++ b/Documentation/devicetree/bindings/display/ti/ti,omap5-dss.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | Texas Instruments OMAP5 Display Subsystem | 1 | Texas Instruments OMAP5 Display Subsystem |
2 | ========================================= | 2 | ========================================= |
3 | 3 | ||
4 | See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic | 4 | See Documentation/devicetree/bindings/display/ti/ti,omap-dss.txt for generic |
5 | description about OMAP Display Subsystem bindings. | 5 | description about OMAP Display Subsystem bindings. |
6 | 6 | ||
7 | DSS Core | 7 | DSS Core |
diff --git a/Documentation/devicetree/bindings/video/ti,opa362.txt b/Documentation/devicetree/bindings/display/ti/ti,opa362.txt index f96083c0bd17..f96083c0bd17 100644 --- a/Documentation/devicetree/bindings/video/ti,opa362.txt +++ b/Documentation/devicetree/bindings/display/ti/ti,opa362.txt | |||
diff --git a/Documentation/devicetree/bindings/video/ti,tfp410.txt b/Documentation/devicetree/bindings/display/ti/ti,tfp410.txt index 2cbe32a3d0bb..2cbe32a3d0bb 100644 --- a/Documentation/devicetree/bindings/video/ti,tfp410.txt +++ b/Documentation/devicetree/bindings/display/ti/ti,tfp410.txt | |||
diff --git a/Documentation/devicetree/bindings/video/ti,tpd12s015.txt b/Documentation/devicetree/bindings/display/ti/ti,tpd12s015.txt index 26e6d32e3f20..26e6d32e3f20 100644 --- a/Documentation/devicetree/bindings/video/ti,tpd12s015.txt +++ b/Documentation/devicetree/bindings/display/ti/ti,tpd12s015.txt | |||
diff --git a/Documentation/devicetree/bindings/drm/tilcdc/panel.txt b/Documentation/devicetree/bindings/display/tilcdc/panel.txt index 4ab9e2300907..f20b31cdc59a 100644 --- a/Documentation/devicetree/bindings/drm/tilcdc/panel.txt +++ b/Documentation/devicetree/bindings/display/tilcdc/panel.txt | |||
@@ -15,7 +15,7 @@ Required properties: | |||
15 | - display-timings: typical videomode of lcd panel. Multiple video modes | 15 | - display-timings: typical videomode of lcd panel. Multiple video modes |
16 | can be listed if the panel supports multiple timings, but the 'native-mode' | 16 | can be listed if the panel supports multiple timings, but the 'native-mode' |
17 | should be the preferred/default resolution. Refer to | 17 | should be the preferred/default resolution. Refer to |
18 | Documentation/devicetree/bindings/video/display-timing.txt for display | 18 | Documentation/devicetree/bindings/display/display-timing.txt for display |
19 | timing binding details. | 19 | timing binding details. |
20 | 20 | ||
21 | Optional properties: | 21 | Optional properties: |
diff --git a/Documentation/devicetree/bindings/drm/tilcdc/tfp410.txt b/Documentation/devicetree/bindings/display/tilcdc/tfp410.txt index a58ae7756fc6..a58ae7756fc6 100644 --- a/Documentation/devicetree/bindings/drm/tilcdc/tfp410.txt +++ b/Documentation/devicetree/bindings/display/tilcdc/tfp410.txt | |||
diff --git a/Documentation/devicetree/bindings/drm/tilcdc/tilcdc.txt b/Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt index 2136ee81e061..2136ee81e061 100644 --- a/Documentation/devicetree/bindings/drm/tilcdc/tilcdc.txt +++ b/Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt | |||
diff --git a/Documentation/devicetree/bindings/video/via,vt8500-fb.txt b/Documentation/devicetree/bindings/display/via,vt8500-fb.txt index 2871e218a0fb..2871e218a0fb 100644 --- a/Documentation/devicetree/bindings/video/via,vt8500-fb.txt +++ b/Documentation/devicetree/bindings/display/via,vt8500-fb.txt | |||
diff --git a/Documentation/devicetree/bindings/video/wm,prizm-ge-rops.txt b/Documentation/devicetree/bindings/display/wm,prizm-ge-rops.txt index a850fa011f02..a850fa011f02 100644 --- a/Documentation/devicetree/bindings/video/wm,prizm-ge-rops.txt +++ b/Documentation/devicetree/bindings/display/wm,prizm-ge-rops.txt | |||
diff --git a/Documentation/devicetree/bindings/video/wm,wm8505-fb.txt b/Documentation/devicetree/bindings/display/wm,wm8505-fb.txt index 0bcadb2840a5..0bcadb2840a5 100644 --- a/Documentation/devicetree/bindings/video/wm,wm8505-fb.txt +++ b/Documentation/devicetree/bindings/display/wm,wm8505-fb.txt | |||
diff --git a/Documentation/devicetree/bindings/dma/ti-dma-crossbar.txt b/Documentation/devicetree/bindings/dma/ti-dma-crossbar.txt index 63a48928f3a8..b152a75dceae 100644 --- a/Documentation/devicetree/bindings/dma/ti-dma-crossbar.txt +++ b/Documentation/devicetree/bindings/dma/ti-dma-crossbar.txt | |||
@@ -2,9 +2,10 @@ Texas Instruments DMA Crossbar (DMA request router) | |||
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: "ti,dra7-dma-crossbar" for DRA7xx DMA crossbar | 4 | - compatible: "ti,dra7-dma-crossbar" for DRA7xx DMA crossbar |
5 | "ti,am335x-edma-crossbar" for AM335x and AM437x | ||
5 | - reg: Memory map for accessing module | 6 | - reg: Memory map for accessing module |
6 | - #dma-cells: Should be set to <1>. | 7 | - #dma-cells: Should be set to to match with the DMA controller's dma-cells |
7 | Clients should use the crossbar request number (input) | 8 | for ti,dra7-dma-crossbar and <3> for ti,am335x-edma-crossbar. |
8 | - dma-requests: Number of DMA requests the crossbar can receive | 9 | - dma-requests: Number of DMA requests the crossbar can receive |
9 | - dma-masters: phandle pointing to the DMA controller | 10 | - dma-masters: phandle pointing to the DMA controller |
10 | 11 | ||
@@ -14,6 +15,15 @@ The DMA controller node need to have the following poroperties: | |||
14 | Optional properties: | 15 | Optional properties: |
15 | - ti,dma-safe-map: Safe routing value for unused request lines | 16 | - ti,dma-safe-map: Safe routing value for unused request lines |
16 | 17 | ||
18 | Notes: | ||
19 | When requesting channel via ti,dra7-dma-crossbar, the DMA clinet must request | ||
20 | the DMA event number as crossbar ID (input to the DMA crossbar). | ||
21 | |||
22 | For ti,am335x-edma-crossbar: the meaning of parameters of dmas for clients: | ||
23 | dmas = <&edma_xbar 12 0 1>; where <12> is the DMA request number, <0> is the TC | ||
24 | the event should be assigned and <1> is the mux selection for in the crossbar. | ||
25 | When mux 0 is used the DMA channel can be requested directly from edma node. | ||
26 | |||
17 | Example: | 27 | Example: |
18 | 28 | ||
19 | /* DMA controller */ | 29 | /* DMA controller */ |
@@ -47,6 +57,7 @@ uart1: serial@4806a000 { | |||
47 | ti,hwmods = "uart1"; | 57 | ti,hwmods = "uart1"; |
48 | clock-frequency = <48000000>; | 58 | clock-frequency = <48000000>; |
49 | status = "disabled"; | 59 | status = "disabled"; |
60 | /* Requesting crossbar input 49 and 50 */ | ||
50 | dmas = <&sdma_xbar 49>, <&sdma_xbar 50>; | 61 | dmas = <&sdma_xbar 49>, <&sdma_xbar 50>; |
51 | dma-names = "tx", "rx"; | 62 | dma-names = "tx", "rx"; |
52 | }; | 63 | }; |
diff --git a/Documentation/devicetree/bindings/dma/ti-edma.txt b/Documentation/devicetree/bindings/dma/ti-edma.txt index 5ba525a10035..d3d0a4fb1c73 100644 --- a/Documentation/devicetree/bindings/dma/ti-edma.txt +++ b/Documentation/devicetree/bindings/dma/ti-edma.txt | |||
@@ -1,4 +1,119 @@ | |||
1 | TI EDMA | 1 | Texas Instruments eDMA |
2 | |||
3 | The eDMA3 consists of two components: Channel controller (CC) and Transfer | ||
4 | Controller(s) (TC). The CC is the main entry for DMA users since it is | ||
5 | responsible for the DMA channel handling, while the TCs are responsible to | ||
6 | execute the actual DMA tansfer. | ||
7 | |||
8 | ------------------------------------------------------------------------------ | ||
9 | eDMA3 Channel Controller | ||
10 | |||
11 | Required properties: | ||
12 | - compatible: "ti,edma3-tpcc" for the channel controller(s) | ||
13 | - #dma-cells: Should be set to <2>. The first number is the DMA request | ||
14 | number and the second is the TC the channel is serviced on. | ||
15 | - reg: Memory map of eDMA CC | ||
16 | - reg-names: "edma3_cc" | ||
17 | - interrupts: Interrupt lines for CCINT, MPERR and CCERRINT. | ||
18 | - interrupt-names: "edma3_ccint", "emda3_mperr" and "edma3_ccerrint" | ||
19 | - ti,tptcs: List of TPTCs associated with the eDMA in the following form: | ||
20 | <&tptc_phandle TC_priority_number>. The highest priority is 0. | ||
21 | |||
22 | Optional properties: | ||
23 | - ti,hwmods: Name of the hwmods associated to the eDMA CC | ||
24 | - ti,edma-memcpy-channels: List of channels allocated to be used for memcpy, iow | ||
25 | these channels will be SW triggered channels. The list must | ||
26 | contain 16 bits numbers, see example. | ||
27 | - ti,edma-reserved-slot-ranges: PaRAM slot ranges which should not be used by | ||
28 | the driver, they are allocated to be used by for example the | ||
29 | DSP. See example. | ||
30 | |||
31 | ------------------------------------------------------------------------------ | ||
32 | eDMA3 Transfer Controller | ||
33 | |||
34 | Required properties: | ||
35 | - compatible: "ti,edma3-tptc" for the transfer controller(s) | ||
36 | - reg: Memory map of eDMA TC | ||
37 | - interrupts: Interrupt number for TCerrint. | ||
38 | |||
39 | Optional properties: | ||
40 | - ti,hwmods: Name of the hwmods associated to the given eDMA TC | ||
41 | - interrupt-names: "edma3_tcerrint" | ||
42 | |||
43 | ------------------------------------------------------------------------------ | ||
44 | Example: | ||
45 | |||
46 | edma: edma@49000000 { | ||
47 | compatible = "ti,edma3-tpcc"; | ||
48 | ti,hwmods = "tpcc"; | ||
49 | reg = <0x49000000 0x10000>; | ||
50 | reg-names = "edma3_cc"; | ||
51 | interrupts = <12 13 14>; | ||
52 | interrupt-names = "edma3_ccint", "emda3_mperr", "edma3_ccerrint"; | ||
53 | dma-requests = <64>; | ||
54 | #dma-cells = <2>; | ||
55 | |||
56 | ti,tptcs = <&edma_tptc0 7>, <&edma_tptc1 7>, <&edma_tptc2 0>; | ||
57 | |||
58 | /* Channel 20 and 21 is allocated for memcpy */ | ||
59 | ti,edma-memcpy-channels = /bits/ 16 <20 21>; | ||
60 | /* The following PaRAM slots are reserved: 35-45 and 100-110 */ | ||
61 | ti,edma-reserved-slot-ranges = /bits/ 16 <35 10>, | ||
62 | /bits/ 16 <100 10>; | ||
63 | }; | ||
64 | |||
65 | edma_tptc0: tptc@49800000 { | ||
66 | compatible = "ti,edma3-tptc"; | ||
67 | ti,hwmods = "tptc0"; | ||
68 | reg = <0x49800000 0x100000>; | ||
69 | interrupts = <112>; | ||
70 | interrupt-names = "edm3_tcerrint"; | ||
71 | }; | ||
72 | |||
73 | edma_tptc1: tptc@49900000 { | ||
74 | compatible = "ti,edma3-tptc"; | ||
75 | ti,hwmods = "tptc1"; | ||
76 | reg = <0x49900000 0x100000>; | ||
77 | interrupts = <113>; | ||
78 | interrupt-names = "edm3_tcerrint"; | ||
79 | }; | ||
80 | |||
81 | edma_tptc2: tptc@49a00000 { | ||
82 | compatible = "ti,edma3-tptc"; | ||
83 | ti,hwmods = "tptc2"; | ||
84 | reg = <0x49a00000 0x100000>; | ||
85 | interrupts = <114>; | ||
86 | interrupt-names = "edm3_tcerrint"; | ||
87 | }; | ||
88 | |||
89 | sham: sham@53100000 { | ||
90 | compatible = "ti,omap4-sham"; | ||
91 | ti,hwmods = "sham"; | ||
92 | reg = <0x53100000 0x200>; | ||
93 | interrupts = <109>; | ||
94 | /* DMA channel 36 executed on eDMA TC0 - low priority queue */ | ||
95 | dmas = <&edma 36 0>; | ||
96 | dma-names = "rx"; | ||
97 | }; | ||
98 | |||
99 | mcasp0: mcasp@48038000 { | ||
100 | compatible = "ti,am33xx-mcasp-audio"; | ||
101 | ti,hwmods = "mcasp0"; | ||
102 | reg = <0x48038000 0x2000>, | ||
103 | <0x46000000 0x400000>; | ||
104 | reg-names = "mpu", "dat"; | ||
105 | interrupts = <80>, <81>; | ||
106 | interrupt-names = "tx", "rx"; | ||
107 | status = "disabled"; | ||
108 | /* DMA channels 8 and 9 executed on eDMA TC2 - high priority queue */ | ||
109 | dmas = <&edma 8 2>, | ||
110 | <&edma 9 2>; | ||
111 | dma-names = "tx", "rx"; | ||
112 | }; | ||
113 | |||
114 | ------------------------------------------------------------------------------ | ||
115 | DEPRECATED binding, new DTS files must use the ti,edma3-tpcc/ti,edma3-tptc | ||
116 | binding. | ||
2 | 117 | ||
3 | Required properties: | 118 | Required properties: |
4 | - compatible : "ti,edma3" | 119 | - compatible : "ti,edma3" |
diff --git a/Documentation/devicetree/bindings/edac/apm-xgene-edac.txt b/Documentation/devicetree/bindings/edac/apm-xgene-edac.txt index 78edb80002c8..78e2a31c58d0 100644 --- a/Documentation/devicetree/bindings/edac/apm-xgene-edac.txt +++ b/Documentation/devicetree/bindings/edac/apm-xgene-edac.txt | |||
@@ -5,6 +5,8 @@ The follow error types are supported: | |||
5 | 5 | ||
6 | memory controller - Memory controller | 6 | memory controller - Memory controller |
7 | PMD (L1/L2) - Processor module unit (PMD) L1/L2 cache | 7 | PMD (L1/L2) - Processor module unit (PMD) L1/L2 cache |
8 | L3 - L3 cache controller | ||
9 | SoC - SoC IP's such as Ethernet, SATA, and etc | ||
8 | 10 | ||
9 | The following section describes the EDAC DT node binding. | 11 | The following section describes the EDAC DT node binding. |
10 | 12 | ||
@@ -30,6 +32,17 @@ Required properties for PMD subnode: | |||
30 | - reg : First resource shall be the PMD resource. | 32 | - reg : First resource shall be the PMD resource. |
31 | - pmd-controller : Instance number of the PMD controller. | 33 | - pmd-controller : Instance number of the PMD controller. |
32 | 34 | ||
35 | Required properties for L3 subnode: | ||
36 | - compatible : Shall be "apm,xgene-edac-l3" or | ||
37 | "apm,xgene-edac-l3-v2". | ||
38 | - reg : First resource shall be the L3 EDAC resource. | ||
39 | |||
40 | Required properties for SoC subnode: | ||
41 | - compatible : Shall be "apm,xgene-edac-soc-v1" for revision 1 or | ||
42 | "apm,xgene-edac-l3-soc" for general value reporting | ||
43 | only. | ||
44 | - reg : First resource shall be the SoC EDAC resource. | ||
45 | |||
33 | Example: | 46 | Example: |
34 | csw: csw@7e200000 { | 47 | csw: csw@7e200000 { |
35 | compatible = "apm,xgene-csw", "syscon"; | 48 | compatible = "apm,xgene-csw", "syscon"; |
@@ -76,4 +89,14 @@ Example: | |||
76 | reg = <0x0 0x7c000000 0x0 0x200000>; | 89 | reg = <0x0 0x7c000000 0x0 0x200000>; |
77 | pmd-controller = <0>; | 90 | pmd-controller = <0>; |
78 | }; | 91 | }; |
92 | |||
93 | edacl3@7e600000 { | ||
94 | compatible = "apm,xgene-edac-l3"; | ||
95 | reg = <0x0 0x7e600000 0x0 0x1000>; | ||
96 | }; | ||
97 | |||
98 | edacsoc@7e930000 { | ||
99 | compatible = "apm,xgene-edac-soc-v1"; | ||
100 | reg = <0x0 0x7e930000 0x0 0x1000>; | ||
101 | }; | ||
79 | }; | 102 | }; |
diff --git a/Documentation/devicetree/bindings/misc/at25.txt b/Documentation/devicetree/bindings/eeprom/at25.txt index 1d3447165c37..1d3447165c37 100644 --- a/Documentation/devicetree/bindings/misc/at25.txt +++ b/Documentation/devicetree/bindings/eeprom/at25.txt | |||
diff --git a/Documentation/devicetree/bindings/eeprom.txt b/Documentation/devicetree/bindings/eeprom/eeprom.txt index 4342c10de1bf..4342c10de1bf 100644 --- a/Documentation/devicetree/bindings/eeprom.txt +++ b/Documentation/devicetree/bindings/eeprom/eeprom.txt | |||
diff --git a/Documentation/devicetree/bindings/extcon/extcon-arizona.txt b/Documentation/devicetree/bindings/extcon/extcon-arizona.txt new file mode 100644 index 000000000000..e1705fae63a8 --- /dev/null +++ b/Documentation/devicetree/bindings/extcon/extcon-arizona.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | Cirrus Logic Arizona class audio SoCs | ||
2 | |||
3 | These devices are audio SoCs with extensive digital capabilities and a range | ||
4 | of analogue I/O. | ||
5 | |||
6 | This document lists Extcon specific bindings, see the primary binding document: | ||
7 | ../mfd/arizona.txt | ||
8 | |||
9 | Optional properties: | ||
10 | |||
11 | - wlf,hpdet-channel : Headphone detection channel. | ||
12 | ARIZONA_ACCDET_MODE_HPL or 1 - Headphone detect mode is set to HPDETL | ||
13 | ARIZONA_ACCDET_MODE_HPR or 2 - Headphone detect mode is set to HPDETR | ||
14 | If this node is not mentioned or if the value is unknown, then | ||
15 | headphone detection mode is set to HPDETL. | ||
diff --git a/Documentation/devicetree/bindings/fpga/altera-socfpga-fpga-mgr.txt b/Documentation/devicetree/bindings/fpga/altera-socfpga-fpga-mgr.txt index 9b027a615486..d52f3340414d 100644 --- a/Documentation/devicetree/bindings/fpga/altera-socfpga-fpga-mgr.txt +++ b/Documentation/devicetree/bindings/fpga/altera-socfpga-fpga-mgr.txt | |||
@@ -9,7 +9,7 @@ Required properties: | |||
9 | 9 | ||
10 | Example: | 10 | Example: |
11 | 11 | ||
12 | hps_0_fpgamgr: fpgamgr@0xff706000 { | 12 | hps_0_fpgamgr: fpgamgr@ff706000 { |
13 | compatible = "altr,socfpga-fpga-mgr"; | 13 | compatible = "altr,socfpga-fpga-mgr"; |
14 | reg = <0xFF706000 0x1000 | 14 | reg = <0xFF706000 0x1000 |
15 | 0xFFB90000 0x1000>; | 15 | 0xFFB90000 0x1000>; |
diff --git a/Documentation/devicetree/bindings/fpga/xilinx-zynq-fpga-mgr.txt b/Documentation/devicetree/bindings/fpga/xilinx-zynq-fpga-mgr.txt new file mode 100644 index 000000000000..7018aa896835 --- /dev/null +++ b/Documentation/devicetree/bindings/fpga/xilinx-zynq-fpga-mgr.txt | |||
@@ -0,0 +1,19 @@ | |||
1 | Xilinx Zynq FPGA Manager | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should contain "xlnx,zynq-devcfg-1.0" | ||
5 | - reg: base address and size for memory mapped io | ||
6 | - interrupts: interrupt for the FPGA manager device | ||
7 | - clocks: phandle for clocks required operation | ||
8 | - clock-names: name for the clock, should be "ref_clk" | ||
9 | - syscon: phandle for access to SLCR registers | ||
10 | |||
11 | Example: | ||
12 | devcfg: devcfg@f8007000 { | ||
13 | compatible = "xlnx,zynq-devcfg-1.0"; | ||
14 | reg = <0xf8007000 0x100>; | ||
15 | interrupts = <0 8 4>; | ||
16 | clocks = <&clkc 12>; | ||
17 | clock-names = "ref_clk"; | ||
18 | syscon = <&slcr>; | ||
19 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-mpc8xxx.txt b/Documentation/devicetree/bindings/gpio/gpio-mpc8xxx.txt index 805ddcd79a57..f2455c50533d 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-mpc8xxx.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-mpc8xxx.txt | |||
@@ -1,9 +1,9 @@ | |||
1 | * Freescale MPC512x/MPC8xxx GPIO controller | 1 | * Freescale MPC512x/MPC8xxx/Layerscape GPIO controller |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : Should be "fsl,<soc>-gpio" | 4 | - compatible : Should be "fsl,<soc>-gpio" |
5 | The following <soc>s are known to be supported: | 5 | The following <soc>s are known to be supported: |
6 | mpc5121, mpc5125, mpc8349, mpc8572, mpc8610, pq3, qoriq | 6 | mpc5121, mpc5125, mpc8349, mpc8572, mpc8610, pq3, qoriq. |
7 | - reg : Address and length of the register set for the device | 7 | - reg : Address and length of the register set for the device |
8 | - interrupts : Should be the port interrupt shared by all 32 pins. | 8 | - interrupts : Should be the port interrupt shared by all 32 pins. |
9 | - #gpio-cells : Should be two. The first cell is the pin number and | 9 | - #gpio-cells : Should be two. The first cell is the pin number and |
diff --git a/Documentation/devicetree/bindings/gpio/gpio-msm.txt b/Documentation/devicetree/bindings/gpio/gpio-msm.txt deleted file mode 100644 index ac20e68a004e..000000000000 --- a/Documentation/devicetree/bindings/gpio/gpio-msm.txt +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | MSM GPIO controller bindings | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: | ||
5 | - "qcom,msm-gpio" for MSM controllers | ||
6 | - #gpio-cells : Should be two. | ||
7 | - first cell is the pin number | ||
8 | - second cell is used to specify optional parameters (unused) | ||
9 | - gpio-controller : Marks the device node as a GPIO controller. | ||
10 | - #interrupt-cells : Should be 2. | ||
11 | - interrupt-controller: Mark the device node as an interrupt controller | ||
12 | - interrupts : Specify the TLMM summary interrupt number | ||
13 | - ngpio : Specify the number of MSM GPIOs | ||
14 | |||
15 | Example: | ||
16 | |||
17 | msmgpio: gpio@fd510000 { | ||
18 | compatible = "qcom,msm-gpio"; | ||
19 | gpio-controller; | ||
20 | #gpio-cells = <2>; | ||
21 | interrupt-controller; | ||
22 | #interrupt-cells = <2>; | ||
23 | reg = <0xfd510000 0x4000>; | ||
24 | interrupts = <0 208 0>; | ||
25 | ngpio = <150>; | ||
26 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt b/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt index b9a42f294dd0..13df9933f4cd 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt | |||
@@ -24,6 +24,7 @@ Required properties: | |||
24 | ti,tca6408 | 24 | ti,tca6408 |
25 | ti,tca6416 | 25 | ti,tca6416 |
26 | ti,tca6424 | 26 | ti,tca6424 |
27 | ti,tca9539 | ||
27 | exar,xra1202 | 28 | exar,xra1202 |
28 | 29 | ||
29 | Example: | 30 | Example: |
diff --git a/Documentation/devicetree/bindings/gpio/gpio-zynq.txt b/Documentation/devicetree/bindings/gpio/gpio-zynq.txt index db4c6a663c03..7b542657f259 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-zynq.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-zynq.txt | |||
@@ -12,6 +12,13 @@ Required properties: | |||
12 | - interrupts : Interrupt specifier (see interrupt bindings for | 12 | - interrupts : Interrupt specifier (see interrupt bindings for |
13 | details) | 13 | details) |
14 | - interrupt-parent : Must be core interrupt controller | 14 | - interrupt-parent : Must be core interrupt controller |
15 | - interrupt-controller : Marks the device node as an interrupt controller. | ||
16 | - #interrupt-cells : Should be 2. The first cell is the GPIO number. | ||
17 | The second cell bits[3:0] is used to specify trigger type and level flags: | ||
18 | 1 = low-to-high edge triggered. | ||
19 | 2 = high-to-low edge triggered. | ||
20 | 4 = active high level-sensitive. | ||
21 | 8 = active low level-sensitive. | ||
15 | - reg : Address and length of the register set for the device | 22 | - reg : Address and length of the register set for the device |
16 | 23 | ||
17 | Example: | 24 | Example: |
@@ -22,5 +29,7 @@ Example: | |||
22 | gpio-controller; | 29 | gpio-controller; |
23 | interrupt-parent = <&intc>; | 30 | interrupt-parent = <&intc>; |
24 | interrupts = <0 20 4>; | 31 | interrupts = <0 20 4>; |
32 | interrupt-controller; | ||
33 | #interrupt-cells = <2>; | ||
25 | reg = <0xe000a000 0x1000>; | 34 | reg = <0xe000a000 0x1000>; |
26 | }; | 35 | }; |
diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt b/Documentation/devicetree/bindings/gpio/gpio.txt index 5788d5cf1252..069cdf6f9dac 100644 --- a/Documentation/devicetree/bindings/gpio/gpio.txt +++ b/Documentation/devicetree/bindings/gpio/gpio.txt | |||
@@ -16,7 +16,9 @@ properties, each containing a 'gpio-list': | |||
16 | GPIO properties should be named "[<name>-]gpios", with <name> being the purpose | 16 | GPIO properties should be named "[<name>-]gpios", with <name> being the purpose |
17 | of this GPIO for the device. While a non-existent <name> is considered valid | 17 | of this GPIO for the device. While a non-existent <name> is considered valid |
18 | for compatibility reasons (resolving to the "gpios" property), it is not allowed | 18 | for compatibility reasons (resolving to the "gpios" property), it is not allowed |
19 | for new bindings. | 19 | for new bindings. Also, GPIO properties named "[<name>-]gpio" are valid and old |
20 | bindings use it, but are only supported for compatibility reasons and should not | ||
21 | be used for newer bindings since it has been deprecated. | ||
20 | 22 | ||
21 | GPIO properties can contain one or more GPIO phandles, but only in exceptional | 23 | GPIO properties can contain one or more GPIO phandles, but only in exceptional |
22 | cases should they contain more than one. If your device uses several GPIOs with | 24 | cases should they contain more than one. If your device uses several GPIOs with |
@@ -52,9 +54,13 @@ only uses one. | |||
52 | 54 | ||
53 | gpio-specifier may encode: bank, pin position inside the bank, | 55 | gpio-specifier may encode: bank, pin position inside the bank, |
54 | whether pin is open-drain and whether pin is logically inverted. | 56 | whether pin is open-drain and whether pin is logically inverted. |
57 | |||
55 | Exact meaning of each specifier cell is controller specific, and must | 58 | Exact meaning of each specifier cell is controller specific, and must |
56 | be documented in the device tree binding for the device. Use the macros | 59 | be documented in the device tree binding for the device. |
57 | defined in include/dt-bindings/gpio/gpio.h whenever possible: | 60 | |
61 | Most controllers are however specifying a generic flag bitfield | ||
62 | in the last cell, so for these, use the macros defined in | ||
63 | include/dt-bindings/gpio/gpio.h whenever possible: | ||
58 | 64 | ||
59 | Example of a node using GPIOs: | 65 | Example of a node using GPIOs: |
60 | 66 | ||
@@ -65,6 +71,15 @@ Example of a node using GPIOs: | |||
65 | GPIO_ACTIVE_HIGH is 0, so in this example gpio-specifier is "18 0" and encodes | 71 | GPIO_ACTIVE_HIGH is 0, so in this example gpio-specifier is "18 0" and encodes |
66 | GPIO pin number, and GPIO flags as accepted by the "qe_pio_e" gpio-controller. | 72 | GPIO pin number, and GPIO flags as accepted by the "qe_pio_e" gpio-controller. |
67 | 73 | ||
74 | Optional standard bitfield specifiers for the last cell: | ||
75 | |||
76 | - Bit 0: 0 means active high, 1 means active low | ||
77 | - Bit 1: 1 means single-ended wiring, see: | ||
78 | https://en.wikipedia.org/wiki/Single-ended_triode | ||
79 | When used with active-low, this means open drain/collector, see: | ||
80 | https://en.wikipedia.org/wiki/Open_collector | ||
81 | When used with active-high, this means open source/emitter | ||
82 | |||
68 | 1.1) GPIO specifier best practices | 83 | 1.1) GPIO specifier best practices |
69 | ---------------------------------- | 84 | ---------------------------------- |
70 | 85 | ||
@@ -116,6 +131,30 @@ Every GPIO controller node must contain both an empty "gpio-controller" | |||
116 | property, and a #gpio-cells integer property, which indicates the number of | 131 | property, and a #gpio-cells integer property, which indicates the number of |
117 | cells in a gpio-specifier. | 132 | cells in a gpio-specifier. |
118 | 133 | ||
134 | Optionally, a GPIO controller may have a "ngpios" property. This property | ||
135 | indicates the number of in-use slots of available slots for GPIOs. The | ||
136 | typical example is something like this: the hardware register is 32 bits | ||
137 | wide, but only 18 of the bits have a physical counterpart. The driver is | ||
138 | generally written so that all 32 bits can be used, but the IP block is reused | ||
139 | in a lot of designs, some using all 32 bits, some using 18 and some using | ||
140 | 12. In this case, setting "ngpios = <18>;" informs the driver that only the | ||
141 | first 18 GPIOs, at local offset 0 .. 17, are in use. | ||
142 | |||
143 | If these GPIOs do not happen to be the first N GPIOs at offset 0...N-1, an | ||
144 | additional bitmask is needed to specify which GPIOs are actually in use, | ||
145 | and which are dummies. The bindings for this case has not yet been | ||
146 | specified, but should be specified if/when such hardware appears. | ||
147 | |||
148 | Example: | ||
149 | |||
150 | gpio-controller@00000000 { | ||
151 | compatible = "foo"; | ||
152 | reg = <0x00000000 0x1000>; | ||
153 | gpio-controller; | ||
154 | #gpio-cells = <2>; | ||
155 | ngpios = <18>; | ||
156 | } | ||
157 | |||
119 | The GPIO chip may contain GPIO hog definitions. GPIO hogging is a mechanism | 158 | The GPIO chip may contain GPIO hog definitions. GPIO hogging is a mechanism |
120 | providing automatic GPIO request and configuration as part of the | 159 | providing automatic GPIO request and configuration as part of the |
121 | gpio-controller's driver probe function. | 160 | gpio-controller's driver probe function. |
diff --git a/Documentation/devicetree/bindings/gpio/netxbig-gpio-ext.txt b/Documentation/devicetree/bindings/gpio/netxbig-gpio-ext.txt new file mode 100644 index 000000000000..50ec2e690701 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/netxbig-gpio-ext.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | Binding for the GPIO extension bus found on some LaCie/Seagate boards | ||
2 | (Example: 2Big/5Big Network v2, 2Big NAS). | ||
3 | |||
4 | Required properties: | ||
5 | - compatible: "lacie,netxbig-gpio-ext". | ||
6 | - addr-gpios: GPIOs representing the address register (LSB -> MSB). | ||
7 | - data-gpios: GPIOs representing the data register (LSB -> MSB). | ||
8 | - enable-gpio: latches the new configuration (address, data) on raising edge. | ||
9 | |||
10 | Example: | ||
11 | |||
12 | netxbig_gpio_ext: netxbig-gpio-ext { | ||
13 | compatible = "lacie,netxbig-gpio-ext"; | ||
14 | |||
15 | addr-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH | ||
16 | &gpio1 16 GPIO_ACTIVE_HIGH | ||
17 | &gpio1 17 GPIO_ACTIVE_HIGH>; | ||
18 | data-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH | ||
19 | &gpio1 13 GPIO_ACTIVE_HIGH | ||
20 | &gpio1 14 GPIO_ACTIVE_HIGH>; | ||
21 | enable-gpio = <&gpio0 29 GPIO_ACTIVE_HIGH>; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/hwmon/ina209.txt b/Documentation/devicetree/bindings/hwmon/ina209.txt deleted file mode 100644 index 9dd2bee80840..000000000000 --- a/Documentation/devicetree/bindings/hwmon/ina209.txt +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | ina209 properties | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Must be "ti,ina209" | ||
5 | - reg: I2C address | ||
6 | |||
7 | Optional properties: | ||
8 | |||
9 | - shunt-resistor | ||
10 | Shunt resistor value in micro-Ohm | ||
11 | |||
12 | Example: | ||
13 | |||
14 | temp-sensor@4c { | ||
15 | compatible = "ti,ina209"; | ||
16 | reg = <0x4c>; | ||
17 | shunt-resistor = <5000>; | ||
18 | }; | ||
diff --git a/Documentation/devicetree/bindings/hwmon/ina2xx.txt b/Documentation/devicetree/bindings/hwmon/ina2xx.txt index a2ad85d7e747..9bcd5e87830d 100644 --- a/Documentation/devicetree/bindings/hwmon/ina2xx.txt +++ b/Documentation/devicetree/bindings/hwmon/ina2xx.txt | |||
@@ -2,6 +2,7 @@ ina2xx properties | |||
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: Must be one of the following: | 4 | - compatible: Must be one of the following: |
5 | - "ti,ina209" for ina209 | ||
5 | - "ti,ina219" for ina219 | 6 | - "ti,ina219" for ina219 |
6 | - "ti,ina220" for ina220 | 7 | - "ti,ina220" for ina220 |
7 | - "ti,ina226" for ina226 | 8 | - "ti,ina226" for ina226 |
diff --git a/Documentation/devicetree/bindings/hwmon/pwm-fan.txt b/Documentation/devicetree/bindings/hwmon/pwm-fan.txt index 610757ce4492..c6d533202d3e 100644 --- a/Documentation/devicetree/bindings/hwmon/pwm-fan.txt +++ b/Documentation/devicetree/bindings/hwmon/pwm-fan.txt | |||
@@ -3,10 +3,35 @@ Bindings for a fan connected to the PWM lines | |||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "pwm-fan" | 4 | - compatible : "pwm-fan" |
5 | - pwms : the PWM that is used to control the PWM fan | 5 | - pwms : the PWM that is used to control the PWM fan |
6 | - cooling-levels : PWM duty cycle values in a range from 0 to 255 | ||
7 | which correspond to thermal cooling states | ||
6 | 8 | ||
7 | Example: | 9 | Example: |
8 | pwm-fan { | 10 | fan0: pwm-fan { |
9 | compatible = "pwm-fan"; | 11 | compatible = "pwm-fan"; |
10 | status = "okay"; | 12 | cooling-min-state = <0>; |
13 | cooling-max-state = <3>; | ||
14 | #cooling-cells = <2>; | ||
11 | pwms = <&pwm 0 10000 0>; | 15 | pwms = <&pwm 0 10000 0>; |
16 | cooling-levels = <0 102 170 230>; | ||
12 | }; | 17 | }; |
18 | |||
19 | thermal-zones { | ||
20 | cpu_thermal: cpu-thermal { | ||
21 | thermal-sensors = <&tmu 0>; | ||
22 | polling-delay-passive = <0>; | ||
23 | polling-delay = <0>; | ||
24 | trips { | ||
25 | cpu_alert1: cpu-alert1 { | ||
26 | temperature = <100000>; /* millicelsius */ | ||
27 | hysteresis = <2000>; /* millicelsius */ | ||
28 | type = "passive"; | ||
29 | }; | ||
30 | }; | ||
31 | cooling-maps { | ||
32 | map0 { | ||
33 | trip = <&cpu_alert1>; | ||
34 | cooling-device = <&fan0 0 1>; | ||
35 | }; | ||
36 | }; | ||
37 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-davinci.txt b/Documentation/devicetree/bindings/i2c/i2c-davinci.txt index a4e1cbc810c1..5b123e0e4cc2 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-davinci.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-davinci.txt | |||
@@ -1,10 +1,10 @@ | |||
1 | * Texas Instruments Davinci I2C | 1 | * Texas Instruments Davinci/Keystone I2C |
2 | 2 | ||
3 | This file provides information, what the device node for the | 3 | This file provides information, what the device node for the |
4 | davinci i2c interface contain. | 4 | davinci/keystone i2c interface contains. |
5 | 5 | ||
6 | Required properties: | 6 | Required properties: |
7 | - compatible: "ti,davinci-i2c"; | 7 | - compatible: "ti,davinci-i2c" or "ti,keystone-i2c"; |
8 | - reg : Offset and length of the register set for the device | 8 | - reg : Offset and length of the register set for the device |
9 | 9 | ||
10 | Recommended properties : | 10 | Recommended properties : |
diff --git a/Documentation/devicetree/bindings/i2c/i2c-imx.txt b/Documentation/devicetree/bindings/i2c/i2c-imx.txt index ce4311d726ae..eab5836ba7f9 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-imx.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-imx.txt | |||
@@ -14,6 +14,10 @@ Optional properties: | |||
14 | The absence of the propoerty indicates the default frequency 100 kHz. | 14 | The absence of the propoerty indicates the default frequency 100 kHz. |
15 | - dmas: A list of two dma specifiers, one for each entry in dma-names. | 15 | - dmas: A list of two dma specifiers, one for each entry in dma-names. |
16 | - dma-names: should contain "tx" and "rx". | 16 | - dma-names: should contain "tx" and "rx". |
17 | - scl-gpios: specify the gpio related to SCL pin | ||
18 | - sda-gpios: specify the gpio related to SDA pin | ||
19 | - pinctrl: add extra pinctrl to configure i2c pins to gpio function for i2c | ||
20 | bus recovery, call it "gpio" state | ||
17 | 21 | ||
18 | Examples: | 22 | Examples: |
19 | 23 | ||
@@ -37,4 +41,9 @@ i2c0: i2c@40066000 { /* i2c0 on vf610 */ | |||
37 | dmas = <&edma0 0 50>, | 41 | dmas = <&edma0 0 50>, |
38 | <&edma0 0 51>; | 42 | <&edma0 0 51>; |
39 | dma-names = "rx","tx"; | 43 | dma-names = "rx","tx"; |
44 | pinctrl-names = "default", "gpio"; | ||
45 | pinctrl-0 = <&pinctrl_i2c1>; | ||
46 | pinctrl-1 = <&pinctrl_i2c1_gpio>; | ||
47 | scl-gpios = <&gpio5 26 GPIO_ACTIVE_HIGH>; | ||
48 | sda-gpios = <&gpio5 27 GPIO_ACTIVE_HIGH>; | ||
40 | }; | 49 | }; |
diff --git a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt index 16b3e07aa98f..ea406eb20fa5 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt | |||
@@ -10,6 +10,7 @@ Required properties: | |||
10 | "renesas,i2c-r8a7792" | 10 | "renesas,i2c-r8a7792" |
11 | "renesas,i2c-r8a7793" | 11 | "renesas,i2c-r8a7793" |
12 | "renesas,i2c-r8a7794" | 12 | "renesas,i2c-r8a7794" |
13 | "renesas,i2c-r8a7795" | ||
13 | - reg: physical base address of the controller and length of memory mapped | 14 | - reg: physical base address of the controller and length of memory mapped |
14 | region. | 15 | region. |
15 | - interrupts: interrupt specifier. | 16 | - interrupts: interrupt specifier. |
diff --git a/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt b/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt index 2bfc6e7ed094..214f94c25d37 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt | |||
@@ -10,6 +10,7 @@ Required properties: | |||
10 | - "renesas,iic-r8a7792" (R-Car V2H) | 10 | - "renesas,iic-r8a7792" (R-Car V2H) |
11 | - "renesas,iic-r8a7793" (R-Car M2-N) | 11 | - "renesas,iic-r8a7793" (R-Car M2-N) |
12 | - "renesas,iic-r8a7794" (R-Car E2) | 12 | - "renesas,iic-r8a7794" (R-Car E2) |
13 | - "renesas,iic-r8a7795" (R-Car H3) | ||
13 | - "renesas,iic-sh73a0" (SH-Mobile AG5) | 14 | - "renesas,iic-sh73a0" (SH-Mobile AG5) |
14 | - reg : address start and address range size of device | 15 | - reg : address start and address range size of device |
15 | - interrupts : interrupt of device | 16 | - interrupts : interrupt of device |
diff --git a/Documentation/devicetree/bindings/i2c/i2c-uniphier-f.txt b/Documentation/devicetree/bindings/i2c/i2c-uniphier-f.txt new file mode 100644 index 000000000000..27fc6f8c798b --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-uniphier-f.txt | |||
@@ -0,0 +1,25 @@ | |||
1 | UniPhier I2C controller (FIFO-builtin) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "socionext,uniphier-fi2c". | ||
5 | - #address-cells: should be 1. | ||
6 | - #size-cells: should be 0. | ||
7 | - reg: offset and length of the register set for the device. | ||
8 | - interrupts: a single interrupt specifier. | ||
9 | - clocks: phandle to the input clock. | ||
10 | |||
11 | Optional properties: | ||
12 | - clock-frequency: desired I2C bus frequency in Hz. The maximum supported | ||
13 | value is 400000. Defaults to 100000 if not specified. | ||
14 | |||
15 | Examples: | ||
16 | |||
17 | i2c0: i2c@58780000 { | ||
18 | compatible = "socionext,uniphier-fi2c"; | ||
19 | reg = <0x58780000 0x80>; | ||
20 | #address-cells = <1>; | ||
21 | #size-cells = <0>; | ||
22 | interrupts = <0 41 4>; | ||
23 | clocks = <&i2c_clk>; | ||
24 | clock-frequency = <100000>; | ||
25 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-uniphier.txt b/Documentation/devicetree/bindings/i2c/i2c-uniphier.txt new file mode 100644 index 000000000000..26f9d95b3436 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-uniphier.txt | |||
@@ -0,0 +1,25 @@ | |||
1 | UniPhier I2C controller (FIFO-less) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "socionext,uniphier-i2c". | ||
5 | - #address-cells: should be 1. | ||
6 | - #size-cells: should be 0. | ||
7 | - reg: offset and length of the register set for the device. | ||
8 | - interrupts: a single interrupt specifier. | ||
9 | - clocks: phandle to the input clock. | ||
10 | |||
11 | Optional properties: | ||
12 | - clock-frequency: desired I2C bus frequency in Hz. The maximum supported | ||
13 | value is 400000. Defaults to 100000 if not specified. | ||
14 | |||
15 | Examples: | ||
16 | |||
17 | i2c0: i2c@58400000 { | ||
18 | compatible = "socionext,uniphier-i2c"; | ||
19 | reg = <0x58400000 0x40>; | ||
20 | #address-cells = <1>; | ||
21 | #size-cells = <0>; | ||
22 | interrupts = <0 41 1>; | ||
23 | clocks = <&i2c_clk>; | ||
24 | clock-frequency = <100000>; | ||
25 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt b/Documentation/devicetree/bindings/i2c/trivial-devices.txt index d77d412cbc68..c50cf13c852e 100644 --- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt +++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt | |||
@@ -54,7 +54,6 @@ epson,rx8581 I2C-BUS INTERFACE REAL TIME CLOCK MODULE | |||
54 | fsl,mag3110 MAG3110: Xtrinsic High Accuracy, 3D Magnetometer | 54 | fsl,mag3110 MAG3110: Xtrinsic High Accuracy, 3D Magnetometer |
55 | fsl,mc13892 MC13892: Power Management Integrated Circuit (PMIC) for i.MX35/51 | 55 | fsl,mc13892 MC13892: Power Management Integrated Circuit (PMIC) for i.MX35/51 |
56 | fsl,mma8450 MMA8450Q: Xtrinsic Low-power, 3-axis Xtrinsic Accelerometer | 56 | fsl,mma8450 MMA8450Q: Xtrinsic Low-power, 3-axis Xtrinsic Accelerometer |
57 | fsl,mma8452 MMA8452Q: 3-axis 12-bit / 8-bit Digital Accelerometer | ||
58 | fsl,mpr121 MPR121: Proximity Capacitive Touch Sensor Controller | 57 | fsl,mpr121 MPR121: Proximity Capacitive Touch Sensor Controller |
59 | fsl,sgtl5000 SGTL5000: Ultra Low-Power Audio Codec | 58 | fsl,sgtl5000 SGTL5000: Ultra Low-Power Audio Codec |
60 | gmt,g751 G751: Digital Temperature Sensor and Thermal Watchdog with Two-Wire Interface | 59 | gmt,g751 G751: Digital Temperature Sensor and Thermal Watchdog with Two-Wire Interface |
@@ -80,6 +79,7 @@ oki,ml86v7667 OKI ML86V7667 video decoder | |||
80 | ovti,ov5642 OV5642: Color CMOS QSXGA (5-megapixel) Image Sensor with OmniBSI and Embedded TrueFocus | 79 | ovti,ov5642 OV5642: Color CMOS QSXGA (5-megapixel) Image Sensor with OmniBSI and Embedded TrueFocus |
81 | pericom,pt7c4338 Real-time Clock Module | 80 | pericom,pt7c4338 Real-time Clock Module |
82 | plx,pex8648 48-Lane, 12-Port PCI Express Gen 2 (5.0 GT/s) Switch | 81 | plx,pex8648 48-Lane, 12-Port PCI Express Gen 2 (5.0 GT/s) Switch |
82 | pulsedlight,lidar-lite-v2 Pulsedlight LIDAR range-finding sensor | ||
83 | ramtron,24c64 i2c serial eeprom (24cxx) | 83 | ramtron,24c64 i2c serial eeprom (24cxx) |
84 | ricoh,r2025sd I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC | 84 | ricoh,r2025sd I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC |
85 | ricoh,r2221tl I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC | 85 | ricoh,r2221tl I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC |
@@ -88,6 +88,7 @@ ricoh,rs5c372b I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC | |||
88 | ricoh,rv5c386 I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC | 88 | ricoh,rv5c386 I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC |
89 | ricoh,rv5c387a I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC | 89 | ricoh,rv5c387a I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC |
90 | samsung,24ad0xd1 S524AD0XF1 (128K/256K-bit Serial EEPROM for Low Power) | 90 | samsung,24ad0xd1 S524AD0XF1 (128K/256K-bit Serial EEPROM for Low Power) |
91 | sgx,vz89x SGX Sensortech VZ89X Sensors | ||
91 | sii,s35390a 2-wire CMOS real-time clock | 92 | sii,s35390a 2-wire CMOS real-time clock |
92 | skyworks,sky81452 Skyworks SKY81452: Six-Channel White LED Driver with Touch Panel Bias Supply | 93 | skyworks,sky81452 Skyworks SKY81452: Six-Channel White LED Driver with Touch Panel Bias Supply |
93 | st-micro,24c256 i2c serial eeprom (24cxx) | 94 | st-micro,24c256 i2c serial eeprom (24cxx) |
diff --git a/Documentation/devicetree/bindings/iio/accel/bma180.txt b/Documentation/devicetree/bindings/iio/accel/bma180.txt index c5933573e0f6..4a3679d54457 100644 --- a/Documentation/devicetree/bindings/iio/accel/bma180.txt +++ b/Documentation/devicetree/bindings/iio/accel/bma180.txt | |||
@@ -1,10 +1,11 @@ | |||
1 | * Bosch BMA180 triaxial acceleration sensor | 1 | * Bosch BMA180 / BMA250 triaxial acceleration sensor |
2 | 2 | ||
3 | http://omapworld.com/BMA180_111_1002839.pdf | 3 | http://omapworld.com/BMA180_111_1002839.pdf |
4 | http://ae-bst.resource.bosch.com/media/products/dokumente/bma250/bst-bma250-ds002-05.pdf | ||
4 | 5 | ||
5 | Required properties: | 6 | Required properties: |
6 | 7 | ||
7 | - compatible : should be "bosch,bma180" | 8 | - compatible : should be "bosch,bma180" or "bosch,bma250" |
8 | - reg : the I2C address of the sensor | 9 | - reg : the I2C address of the sensor |
9 | 10 | ||
10 | Optional properties: | 11 | Optional properties: |
@@ -13,6 +14,9 @@ Optional properties: | |||
13 | 14 | ||
14 | - interrupts : interrupt mapping for GPIO IRQ, it should by configured with | 15 | - interrupts : interrupt mapping for GPIO IRQ, it should by configured with |
15 | flags IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING | 16 | flags IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING |
17 | For the bma250 the first interrupt listed must be the one | ||
18 | connected to the INT1 pin, the second (optional) interrupt | ||
19 | listed must be the one connected to the INT2 pin. | ||
16 | 20 | ||
17 | Example: | 21 | Example: |
18 | 22 | ||
diff --git a/Documentation/devicetree/bindings/misc/lis302.txt b/Documentation/devicetree/bindings/iio/accel/lis302.txt index 2a19bff9693f..2a19bff9693f 100644 --- a/Documentation/devicetree/bindings/misc/lis302.txt +++ b/Documentation/devicetree/bindings/iio/accel/lis302.txt | |||
diff --git a/Documentation/devicetree/bindings/iio/accel/mma8452.txt b/Documentation/devicetree/bindings/iio/accel/mma8452.txt new file mode 100644 index 000000000000..e3c37467d7da --- /dev/null +++ b/Documentation/devicetree/bindings/iio/accel/mma8452.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | Freescale MMA8452Q, MMA8453Q, MMA8652FC or MMA8653FC triaxial accelerometer | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible: should contain one of | ||
6 | * "fsl,mma8452" | ||
7 | * "fsl,mma8453" | ||
8 | * "fsl,mma8652" | ||
9 | * "fsl,mma8653" | ||
10 | - reg: the I2C address of the chip | ||
11 | |||
12 | Optional properties: | ||
13 | |||
14 | - interrupt-parent: should be the phandle for the interrupt controller | ||
15 | - interrupts: interrupt mapping for GPIO IRQ | ||
16 | |||
17 | Example: | ||
18 | |||
19 | mma8453fc@1d { | ||
20 | compatible = "fsl,mma8453"; | ||
21 | reg = <0x1d>; | ||
22 | interrupt-parent = <&gpio1>; | ||
23 | interrupts = <5 0>; | ||
24 | }; | ||
diff --git a/Documentation/devicetree/bindings/iio/adc/hi8435.txt b/Documentation/devicetree/bindings/iio/adc/hi8435.txt new file mode 100644 index 000000000000..3b0348c5e516 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/hi8435.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | Holt Integrated Circuits HI-8435 threshold detector bindings | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "holt,hi8435" | ||
5 | - reg: spi chip select number for the device | ||
6 | |||
7 | Recommended properties: | ||
8 | - spi-max-frequency: definition as per | ||
9 | Documentation/devicetree/bindings/spi/spi-bus.txt | ||
10 | |||
11 | Optional properties: | ||
12 | - gpios: GPIO used for controlling the reset pin | ||
13 | |||
14 | Example: | ||
15 | sensor@0 { | ||
16 | compatible = "holt,hi8435"; | ||
17 | reg = <0>; | ||
18 | gpios = <&gpio6 1 0>; | ||
19 | |||
20 | spi-max-frequency = <1000000>; | ||
21 | }; | ||
diff --git a/Documentation/devicetree/bindings/misc/ti,dac7512.txt b/Documentation/devicetree/bindings/iio/dac/ti,dac7512.txt index 1db45939dac9..1db45939dac9 100644 --- a/Documentation/devicetree/bindings/misc/ti,dac7512.txt +++ b/Documentation/devicetree/bindings/iio/dac/ti,dac7512.txt | |||
diff --git a/Documentation/devicetree/bindings/iio/light/apds9960.txt b/Documentation/devicetree/bindings/iio/light/apds9960.txt new file mode 100644 index 000000000000..174b709f16db --- /dev/null +++ b/Documentation/devicetree/bindings/iio/light/apds9960.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | * Avago APDS9960 gesture/RGB/ALS/proximity sensor | ||
2 | |||
3 | http://www.avagotech.com/docs/AV02-4191EN | ||
4 | |||
5 | Required properties: | ||
6 | |||
7 | - compatible: must be "avago,apds9960" | ||
8 | - reg: the I2c address of the sensor | ||
9 | - interrupt-parent: should be the phandle for the interrupt controller | ||
10 | - interrupts : the sole interrupt generated by the device | ||
11 | |||
12 | Refer to interrupt-controller/interrupts.txt for generic interrupt client | ||
13 | node bindings. | ||
14 | |||
15 | Example: | ||
16 | |||
17 | apds9960@39 { | ||
18 | compatible = "avago,apds9960"; | ||
19 | reg = <0x39>; | ||
20 | interrupt-parent = <&gpio1>; | ||
21 | interrupts = <16 1>; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/iio/light/us5182d.txt b/Documentation/devicetree/bindings/iio/light/us5182d.txt new file mode 100644 index 000000000000..6f0a530144fd --- /dev/null +++ b/Documentation/devicetree/bindings/iio/light/us5182d.txt | |||
@@ -0,0 +1,34 @@ | |||
1 | * UPISEMI us5182d I2C ALS and Proximity sensor | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: must be "upisemi,usd5182" | ||
5 | - reg: the I2C address of the device | ||
6 | |||
7 | Optional properties: | ||
8 | - upisemi,glass-coef: glass attenuation factor - compensation factor of | ||
9 | resolution 1000 for material transmittance. | ||
10 | - upisemi,dark-ths: array of 8 elements containing 16-bit thresholds (adc | ||
11 | counts) corresponding to every scale. | ||
12 | - upisemi,upper-dark-gain: 8-bit dark gain compensation factor(4 int and 4 | ||
13 | fractional bits - Q4.4) applied when light > threshold | ||
14 | - upisemi,lower-dark-gain: 8-bit dark gain compensation factor(4 int and 4 | ||
15 | fractional bits - Q4.4) applied when light < threshold | ||
16 | |||
17 | If the optional properties are not specified these factors will default to the | ||
18 | values in the below example. | ||
19 | The glass-coef defaults to no compensation for the covering material. | ||
20 | The threshold array defaults to experimental values that work with US5182D | ||
21 | sensor on evaluation board - roughly between 12-32 lux. | ||
22 | There will be no dark-gain compensation by default when ALS > thresh | ||
23 | (0 * dark-gain), and a 1.35 compensation factor when ALS < thresh. | ||
24 | |||
25 | Example: | ||
26 | |||
27 | usd5182@39 { | ||
28 | compatible = "upisemi,usd5182"; | ||
29 | reg = <0x39>; | ||
30 | upisemi,glass-coef = < 1000 >; | ||
31 | upisemi,dark-ths = /bits/ 16 <170 200 512 512 800 2000 4000 8000>; | ||
32 | upisemi,upper-dark-gain = /bits/ 8 <0x00>; | ||
33 | upisemi,lower-dark-gain = /bits/ 8 <0x16>; | ||
34 | }; | ||
diff --git a/Documentation/devicetree/bindings/misc/bmp085.txt b/Documentation/devicetree/bindings/iio/pressure/bmp085.txt index d7a6deb6b21e..d7a6deb6b21e 100644 --- a/Documentation/devicetree/bindings/misc/bmp085.txt +++ b/Documentation/devicetree/bindings/iio/pressure/bmp085.txt | |||
diff --git a/Documentation/devicetree/bindings/input/ads7846.txt b/Documentation/devicetree/bindings/input/ads7846.txt index df8b1279491d..33a1638b61d6 100644 --- a/Documentation/devicetree/bindings/input/ads7846.txt +++ b/Documentation/devicetree/bindings/input/ads7846.txt | |||
@@ -65,6 +65,7 @@ Optional properties: | |||
65 | pendown-gpio GPIO handle describing the pin the !PENIRQ | 65 | pendown-gpio GPIO handle describing the pin the !PENIRQ |
66 | line is connected to. | 66 | line is connected to. |
67 | wakeup-source use any event on touchscreen as wakeup event. | 67 | wakeup-source use any event on touchscreen as wakeup event. |
68 | (Legacy property support: "linux,wakeup") | ||
68 | 69 | ||
69 | 70 | ||
70 | Example for a TSC2046 chip connected to an McSPI controller of an OMAP SoC:: | 71 | Example for a TSC2046 chip connected to an McSPI controller of an OMAP SoC:: |
@@ -86,6 +87,6 @@ Example for a TSC2046 chip connected to an McSPI controller of an OMAP SoC:: | |||
86 | ti,x-plate-ohms = /bits/ 16 <40>; | 87 | ti,x-plate-ohms = /bits/ 16 <40>; |
87 | ti,pressure-max = /bits/ 16 <255>; | 88 | ti,pressure-max = /bits/ 16 <255>; |
88 | 89 | ||
89 | linux,wakeup; | 90 | wakeup-source; |
90 | }; | 91 | }; |
91 | }; | 92 | }; |
diff --git a/Documentation/devicetree/bindings/input/cypress,cyapa.txt b/Documentation/devicetree/bindings/input/cypress,cyapa.txt index 635a3b036630..8d91ba9ff2fd 100644 --- a/Documentation/devicetree/bindings/input/cypress,cyapa.txt +++ b/Documentation/devicetree/bindings/input/cypress,cyapa.txt | |||
@@ -25,7 +25,7 @@ Example: | |||
25 | /* Cypress Gen3 touchpad */ | 25 | /* Cypress Gen3 touchpad */ |
26 | touchpad@67 { | 26 | touchpad@67 { |
27 | compatible = "cypress,cyapa"; | 27 | compatible = "cypress,cyapa"; |
28 | reg = <0x24>; | 28 | reg = <0x67>; |
29 | interrupt-parent = <&gpio>; | 29 | interrupt-parent = <&gpio>; |
30 | interrupts = <2 IRQ_TYPE_EDGE_FALLING>; /* GPIO 2 */ | 30 | interrupts = <2 IRQ_TYPE_EDGE_FALLING>; /* GPIO 2 */ |
31 | wakeup-source; | 31 | wakeup-source; |
diff --git a/Documentation/devicetree/bindings/input/da9062-onkey.txt b/Documentation/devicetree/bindings/input/da9062-onkey.txt new file mode 100644 index 000000000000..ab0e0488fe92 --- /dev/null +++ b/Documentation/devicetree/bindings/input/da9062-onkey.txt | |||
@@ -0,0 +1,32 @@ | |||
1 | * Dialog DA9062/63 OnKey Module | ||
2 | |||
3 | This module is part of the DA9062/DA9063. For more details about entire | ||
4 | chips see Documentation/devicetree/bindings/mfd/da9062.txt and | ||
5 | Documentation/devicetree/bindings/mfd/da9063.txt | ||
6 | |||
7 | This module provides KEY_POWER, KEY_SLEEP and events. | ||
8 | |||
9 | Required properties: | ||
10 | |||
11 | - compatible: should be one of: | ||
12 | dlg,da9062-onkey | ||
13 | dlg,da9063-onkey | ||
14 | |||
15 | Optional properties: | ||
16 | |||
17 | - dlg,disable-key-power : Disable power-down using a long key-press. If this | ||
18 | entry exists the OnKey driver will remove support for the KEY_POWER key | ||
19 | press. If this entry does not exist then by default the key-press | ||
20 | triggered power down is enabled and the OnKey will support both KEY_POWER | ||
21 | and KEY_SLEEP. | ||
22 | |||
23 | Example: | ||
24 | |||
25 | pmic0: da9062@58 { | ||
26 | |||
27 | onkey { | ||
28 | compatible = "dlg,da9063-onkey"; | ||
29 | dlg,disable-key-power; | ||
30 | }; | ||
31 | |||
32 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/gpio-keys-polled.txt b/Documentation/devicetree/bindings/input/gpio-keys-polled.txt index 5b91f5a3bd5c..95d0fb11a787 100644 --- a/Documentation/devicetree/bindings/input/gpio-keys-polled.txt +++ b/Documentation/devicetree/bindings/input/gpio-keys-polled.txt | |||
@@ -13,14 +13,22 @@ Subnode properties: | |||
13 | 13 | ||
14 | - gpios: OF device-tree gpio specification. | 14 | - gpios: OF device-tree gpio specification. |
15 | - label: Descriptive name of the key. | 15 | - label: Descriptive name of the key. |
16 | - linux,code: Keycode to emit. | 16 | - linux,code: Key / Axis code to emit. |
17 | 17 | ||
18 | Optional subnode-properties: | 18 | Optional subnode-properties: |
19 | - linux,input-type: Specify event type this button/key generates. | 19 | - linux,input-type: Specify event type this button/key generates. |
20 | If not specified defaults to <1> == EV_KEY. | 20 | If not specified defaults to <1> == EV_KEY. |
21 | - linux,input-value: If linux,input-type is EV_ABS or EV_REL then this | ||
22 | value is sent for events this button generates when pressed. | ||
23 | EV_ABS/EV_REL axis will generate an event with a value of 0 when | ||
24 | all buttons with linux,input-type == type and linux,code == axis | ||
25 | are released. This value is interpreted as a signed 32 bit value, | ||
26 | e.g. to make a button generate a value of -1 use: | ||
27 | linux,input-value = <0xffffffff>; /* -1 */ | ||
21 | - debounce-interval: Debouncing interval time in milliseconds. | 28 | - debounce-interval: Debouncing interval time in milliseconds. |
22 | If not specified defaults to 5. | 29 | If not specified defaults to 5. |
23 | - wakeup-source: Boolean, button can wake-up the system. | 30 | - wakeup-source: Boolean, button can wake-up the system. |
31 | (Legacy property supported: "gpio-key,wakeup") | ||
24 | 32 | ||
25 | Example nodes: | 33 | Example nodes: |
26 | 34 | ||
diff --git a/Documentation/devicetree/bindings/input/gpio-keys.txt b/Documentation/devicetree/bindings/input/gpio-keys.txt index 072bf7573c37..cf1333d1dd52 100644 --- a/Documentation/devicetree/bindings/input/gpio-keys.txt +++ b/Documentation/devicetree/bindings/input/gpio-keys.txt | |||
@@ -24,6 +24,7 @@ Optional subnode-properties: | |||
24 | - debounce-interval: Debouncing interval time in milliseconds. | 24 | - debounce-interval: Debouncing interval time in milliseconds. |
25 | If not specified defaults to 5. | 25 | If not specified defaults to 5. |
26 | - wakeup-source: Boolean, button can wake-up the system. | 26 | - wakeup-source: Boolean, button can wake-up the system. |
27 | (Legacy property supported: "gpio-key,wakeup") | ||
27 | - linux,can-disable: Boolean, indicates that button is connected | 28 | - linux,can-disable: Boolean, indicates that button is connected |
28 | to dedicated (not shared) interrupt which can be disabled to | 29 | to dedicated (not shared) interrupt which can be disabled to |
29 | suppress events from the button. | 30 | suppress events from the button. |
diff --git a/Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt b/Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt index 4d86059c370c..d0ea09ba249f 100644 --- a/Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt +++ b/Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt | |||
@@ -20,6 +20,7 @@ Required Properties: | |||
20 | Optional Properties: | 20 | Optional Properties: |
21 | - linux,no-autorepeat: do no enable autorepeat feature. | 21 | - linux,no-autorepeat: do no enable autorepeat feature. |
22 | - wakeup-source: use any event on keypad as wakeup event. | 22 | - wakeup-source: use any event on keypad as wakeup event. |
23 | (Legacy property supported: "linux,wakeup") | ||
23 | - debounce-delay-ms: debounce interval in milliseconds | 24 | - debounce-delay-ms: debounce interval in milliseconds |
24 | - col-scan-delay-us: delay, measured in microseconds, that is needed | 25 | - col-scan-delay-us: delay, measured in microseconds, that is needed |
25 | before we can scan keypad after activating column gpio | 26 | before we can scan keypad after activating column gpio |
diff --git a/Documentation/devicetree/bindings/hid/hid-over-i2c.txt b/Documentation/devicetree/bindings/input/hid-over-i2c.txt index 488edcb264c4..488edcb264c4 100644 --- a/Documentation/devicetree/bindings/hid/hid-over-i2c.txt +++ b/Documentation/devicetree/bindings/input/hid-over-i2c.txt | |||
diff --git a/Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt b/Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt index 0382b8bd69c6..1faa7292e21f 100644 --- a/Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt +++ b/Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt | |||
@@ -29,7 +29,8 @@ matrix-keyboard bindings: | |||
29 | - nvidia,debounce-delay-ms: delay in milliseconds per row scan for debouncing | 29 | - nvidia,debounce-delay-ms: delay in milliseconds per row scan for debouncing |
30 | - nvidia,repeat-delay-ms: delay in milliseconds before repeat starts | 30 | - nvidia,repeat-delay-ms: delay in milliseconds before repeat starts |
31 | - nvidia,ghost-filter: enable ghost filtering for this device | 31 | - nvidia,ghost-filter: enable ghost filtering for this device |
32 | - nvidia,wakeup-source: configure keyboard as a wakeup source for suspend/resume | 32 | - wakeup-source: configure keyboard as a wakeup source for suspend/resume |
33 | (Legacy property supported: "nvidia,wakeup-source") | ||
33 | 34 | ||
34 | Example: | 35 | Example: |
35 | 36 | ||
diff --git a/Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt b/Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt index ee6215681182..4a9dc6ba96b1 100644 --- a/Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt +++ b/Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt | |||
@@ -37,6 +37,7 @@ PROPERTIES | |||
37 | Usage: optional | 37 | Usage: optional |
38 | Value type: <bool> | 38 | Value type: <bool> |
39 | Definition: use any event on keypad as wakeup event. | 39 | Definition: use any event on keypad as wakeup event. |
40 | (Legacy property supported: "linux,keypad-wakeup") | ||
40 | 41 | ||
41 | - keypad,num-rows: | 42 | - keypad,num-rows: |
42 | Usage: required | 43 | Usage: required |
diff --git a/Documentation/devicetree/bindings/input/rotary-encoder.txt b/Documentation/devicetree/bindings/input/rotary-encoder.txt index 331549593ed5..de99cbbbf6da 100644 --- a/Documentation/devicetree/bindings/input/rotary-encoder.txt +++ b/Documentation/devicetree/bindings/input/rotary-encoder.txt | |||
@@ -14,7 +14,17 @@ Optional properties: | |||
14 | device, hence no steps need to be passed. | 14 | device, hence no steps need to be passed. |
15 | - rotary-encoder,rollover: Automatic rollove when the rotary value becomes | 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. | 16 | greater than the specified steps or smaller than 0. For absolute axis only. |
17 | - rotary-encoder,steps-per-period: Number of steps (stable states) per period. | ||
18 | The values have the following meaning: | ||
19 | 1: Full-period mode (default) | ||
20 | 2: Half-period mode | ||
21 | 4: Quarter-period mode | ||
22 | - wakeup-source: Boolean, rotary encoder can wake up the system. | ||
23 | |||
24 | Deprecated properties: | ||
17 | - rotary-encoder,half-period: Makes the driver work on half-period mode. | 25 | - rotary-encoder,half-period: Makes the driver work on half-period mode. |
26 | This property is deprecated. Instead, a 'steps-per-period ' value should | ||
27 | be used, such as "rotary-encoder,steps-per-period = <2>". | ||
18 | 28 | ||
19 | See Documentation/input/rotary-encoder.txt for more information. | 29 | See Documentation/input/rotary-encoder.txt for more information. |
20 | 30 | ||
diff --git a/Documentation/devicetree/bindings/input/samsung-keypad.txt b/Documentation/devicetree/bindings/input/samsung-keypad.txt index 863e77f619dc..5305e74e5742 100644 --- a/Documentation/devicetree/bindings/input/samsung-keypad.txt +++ b/Documentation/devicetree/bindings/input/samsung-keypad.txt | |||
@@ -38,6 +38,7 @@ Required Board Specific Properties: | |||
38 | 38 | ||
39 | Optional Properties: | 39 | Optional Properties: |
40 | - wakeup-source: use any event on keypad as wakeup event. | 40 | - wakeup-source: use any event on keypad as wakeup event. |
41 | (Legacy property supported: "linux,input-wakeup") | ||
41 | 42 | ||
42 | Optional Properties specific to linux: | 43 | Optional Properties specific to linux: |
43 | - linux,keypad-no-autorepeat: do no enable autorepeat feature. | 44 | - linux,keypad-no-autorepeat: do no enable autorepeat feature. |
@@ -51,7 +52,7 @@ Example: | |||
51 | samsung,keypad-num-rows = <2>; | 52 | samsung,keypad-num-rows = <2>; |
52 | samsung,keypad-num-columns = <8>; | 53 | samsung,keypad-num-columns = <8>; |
53 | linux,input-no-autorepeat; | 54 | linux,input-no-autorepeat; |
54 | linux,input-wakeup; | 55 | wakeup-source; |
55 | 56 | ||
56 | pinctrl-names = "default"; | 57 | pinctrl-names = "default"; |
57 | pinctrl-0 = <&keypad_rows &keypad_columns>; | 58 | pinctrl-0 = <&keypad_rows &keypad_columns>; |
diff --git a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt index 76db96704a60..f99528da1b1d 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt +++ b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt | |||
@@ -5,6 +5,7 @@ There are 3 variants of the chip for various touch panel sizes | |||
5 | FT5206GE1 2.8" .. 3.8" | 5 | FT5206GE1 2.8" .. 3.8" |
6 | FT5306DE4 4.3" .. 7" | 6 | FT5306DE4 4.3" .. 7" |
7 | FT5406EE8 7" .. 8.9" | 7 | FT5406EE8 7" .. 8.9" |
8 | FT5506EEG 7" .. 8.9" | ||
8 | 9 | ||
9 | The software interface is identical for all those chips, so that | 10 | The software interface is identical for all those chips, so that |
10 | currently there is no need for the driver to distinguish between the | 11 | currently there is no need for the driver to distinguish between the |
@@ -17,6 +18,7 @@ Required properties: | |||
17 | - compatible: "edt,edt-ft5206" | 18 | - compatible: "edt,edt-ft5206" |
18 | or: "edt,edt-ft5306" | 19 | or: "edt,edt-ft5306" |
19 | or: "edt,edt-ft5406" | 20 | or: "edt,edt-ft5406" |
21 | or: "edt,edt-ft5506" | ||
20 | 22 | ||
21 | - reg: I2C slave address of the chip (0x38) | 23 | - reg: I2C slave address of the chip (0x38) |
22 | - interrupt-parent: a phandle pointing to the interrupt controller | 24 | - interrupt-parent: a phandle pointing to the interrupt controller |
@@ -49,7 +51,7 @@ Example: | |||
49 | pinctrl-names = "default"; | 51 | pinctrl-names = "default"; |
50 | pinctrl-0 = <&edt_ft5x06_pins>; | 52 | pinctrl-0 = <&edt_ft5x06_pins>; |
51 | interrupt-parent = <&gpio2>; | 53 | interrupt-parent = <&gpio2>; |
52 | interrupts = <5 0>; | 54 | interrupts = <5 IRQ_TYPE_EDGE_FALLING>; |
53 | reset-gpios = <&gpio2 6 1>; | 55 | reset-gpios = <&gpio2 6 GPIO_ACTIVE_LOW>; |
54 | wake-gpios = <&gpio4 9 0>; | 56 | wake-gpios = <&gpio4 9 GPIO_ACTIVE_HIGH>; |
55 | }; | 57 | }; |
diff --git a/Documentation/devicetree/bindings/input/touchscreen/focaltech-ft6236.txt b/Documentation/devicetree/bindings/input/touchscreen/focaltech-ft6236.txt new file mode 100644 index 000000000000..777521da3da5 --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/focaltech-ft6236.txt | |||
@@ -0,0 +1,35 @@ | |||
1 | * FocalTech FT6236 I2C touchscreen controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "focaltech,ft6236" | ||
5 | - reg : I2C slave address of the chip (0x38) | ||
6 | - interrupt-parent : a phandle pointing to the interrupt controller | ||
7 | serving the interrupt for this chip | ||
8 | - interrupts : interrupt specification for the touch controller | ||
9 | interrupt | ||
10 | - reset-gpios : GPIO specification for the RSTN input | ||
11 | - touchscreen-size-x : horizontal resolution of touchscreen (in pixels) | ||
12 | - touchscreen-size-y : vertical resolution of touchscreen (in pixels) | ||
13 | |||
14 | Optional properties: | ||
15 | - touchscreen-fuzz-x : horizontal noise value of the absolute input | ||
16 | device (in pixels) | ||
17 | - touchscreen-fuzz-y : vertical noise value of the absolute input | ||
18 | device (in pixels) | ||
19 | - touchscreen-inverted-x : X axis is inverted (boolean) | ||
20 | - touchscreen-inverted-y : Y axis is inverted (boolean) | ||
21 | - touchscreen-swapped-x-y: X and Y axis are swapped (boolean) | ||
22 | Swapping is done after inverting the axis | ||
23 | |||
24 | Example: | ||
25 | |||
26 | ft6x06@38 { | ||
27 | compatible = "focaltech,ft6236"; | ||
28 | reg = <0x38>; | ||
29 | interrupt-parent = <&gpio>; | ||
30 | interrupts = <23 2>; | ||
31 | touchscreen-size-x = <320>; | ||
32 | touchscreen-size-y = <480>; | ||
33 | touchscreen-inverted-x; | ||
34 | touchscreen-swapped-x-y; | ||
35 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/gic-v3.txt b/Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.txt index ddfade40ac59..7803e77d85cb 100644 --- a/Documentation/devicetree/bindings/arm/gic-v3.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.txt | |||
@@ -57,6 +57,8 @@ used to route Message Signalled Interrupts (MSI) to the CPUs. | |||
57 | These nodes must have the following properties: | 57 | These nodes must have the following properties: |
58 | - compatible : Should at least contain "arm,gic-v3-its". | 58 | - compatible : Should at least contain "arm,gic-v3-its". |
59 | - msi-controller : Boolean property. Identifies the node as an MSI controller | 59 | - msi-controller : Boolean property. Identifies the node as an MSI controller |
60 | - #msi-cells: Must be <1>. The single msi-cell is the DeviceID of the device | ||
61 | which will generate the MSI. | ||
60 | - reg: Specifies the base physical address and size of the ITS | 62 | - reg: Specifies the base physical address and size of the ITS |
61 | registers. | 63 | registers. |
62 | 64 | ||
@@ -83,6 +85,7 @@ Examples: | |||
83 | gic-its@2c200000 { | 85 | gic-its@2c200000 { |
84 | compatible = "arm,gic-v3-its"; | 86 | compatible = "arm,gic-v3-its"; |
85 | msi-controller; | 87 | msi-controller; |
88 | #msi-cells = <1>; | ||
86 | reg = <0x0 0x2c200000 0 0x200000>; | 89 | reg = <0x0 0x2c200000 0 0x200000>; |
87 | }; | 90 | }; |
88 | }; | 91 | }; |
@@ -107,12 +110,14 @@ Examples: | |||
107 | gic-its@2c200000 { | 110 | gic-its@2c200000 { |
108 | compatible = "arm,gic-v3-its"; | 111 | compatible = "arm,gic-v3-its"; |
109 | msi-controller; | 112 | msi-controller; |
113 | #msi-cells = <1>; | ||
110 | reg = <0x0 0x2c200000 0 0x200000>; | 114 | reg = <0x0 0x2c200000 0 0x200000>; |
111 | }; | 115 | }; |
112 | 116 | ||
113 | gic-its@2c400000 { | 117 | gic-its@2c400000 { |
114 | compatible = "arm,gic-v3-its"; | 118 | compatible = "arm,gic-v3-its"; |
115 | msi-controller; | 119 | msi-controller; |
120 | #msi-cells = <1>; | ||
116 | reg = <0x0 0x2c400000 0 0x200000>; | 121 | reg = <0x0 0x2c400000 0 0x200000>; |
117 | }; | 122 | }; |
118 | }; | 123 | }; |
diff --git a/Documentation/devicetree/bindings/arm/gic.txt b/Documentation/devicetree/bindings/interrupt-controller/arm,gic.txt index 2da059a4790c..cc56021eb60b 100644 --- a/Documentation/devicetree/bindings/arm/gic.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/arm,gic.txt | |||
@@ -11,13 +11,14 @@ have PPIs or SGIs. | |||
11 | Main node required properties: | 11 | Main node required properties: |
12 | 12 | ||
13 | - compatible : should be one of: | 13 | - compatible : should be one of: |
14 | "arm,gic-400" | 14 | "arm,arm1176jzf-devchip-gic" |
15 | "arm,arm11mp-gic" | ||
15 | "arm,cortex-a15-gic" | 16 | "arm,cortex-a15-gic" |
16 | "arm,cortex-a9-gic" | ||
17 | "arm,cortex-a7-gic" | 17 | "arm,cortex-a7-gic" |
18 | "arm,arm11mp-gic" | 18 | "arm,cortex-a9-gic" |
19 | "arm,gic-400" | ||
20 | "arm,pl390" | ||
19 | "brcm,brahma-b15-gic" | 21 | "brcm,brahma-b15-gic" |
20 | "arm,arm1176jzf-devchip-gic" | ||
21 | "qcom,msm-8660-qgic" | 22 | "qcom,msm-8660-qgic" |
22 | "qcom,msm-qgic2" | 23 | "qcom,msm-qgic2" |
23 | - interrupt-controller : Identifies the node as an interrupt controller | 24 | - interrupt-controller : Identifies the node as an interrupt controller |
@@ -58,6 +59,21 @@ Optional | |||
58 | regions, used when the GIC doesn't have banked registers. The offset is | 59 | regions, used when the GIC doesn't have banked registers. The offset is |
59 | cpu-offset * cpu-nr. | 60 | cpu-offset * cpu-nr. |
60 | 61 | ||
62 | - clocks : List of phandle and clock-specific pairs, one for each entry | ||
63 | in clock-names. | ||
64 | - clock-names : List of names for the GIC clock input(s). Valid clock names | ||
65 | depend on the GIC variant: | ||
66 | "ic_clk" (for "arm,arm11mp-gic") | ||
67 | "PERIPHCLKEN" (for "arm,cortex-a15-gic") | ||
68 | "PERIPHCLK", "PERIPHCLKEN" (for "arm,cortex-a9-gic") | ||
69 | "clk" (for "arm,gic-400") | ||
70 | "gclk" (for "arm,pl390") | ||
71 | |||
72 | - power-domains : A phandle and PM domain specifier as defined by bindings of | ||
73 | the power controller specified by phandle, used when the GIC | ||
74 | is part of a Power or Clock Domain. | ||
75 | |||
76 | |||
61 | Example: | 77 | Example: |
62 | 78 | ||
63 | intc: interrupt-controller@fff11000 { | 79 | intc: interrupt-controller@fff11000 { |
diff --git a/Documentation/devicetree/bindings/arm/versatile-fpga-irq.txt b/Documentation/devicetree/bindings/interrupt-controller/arm,versatile-fpga-irq.txt index c9cf605bb995..c9cf605bb995 100644 --- a/Documentation/devicetree/bindings/arm/versatile-fpga-irq.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/arm,versatile-fpga-irq.txt | |||
diff --git a/Documentation/devicetree/bindings/arm/vic.txt b/Documentation/devicetree/bindings/interrupt-controller/arm,vic.txt index dd527216c5fb..dd527216c5fb 100644 --- a/Documentation/devicetree/bindings/arm/vic.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/arm,vic.txt | |||
diff --git a/Documentation/devicetree/bindings/cris/interrupts.txt b/Documentation/devicetree/bindings/interrupt-controller/axis,crisv32-intc.txt index e8b123b0a5e6..e8b123b0a5e6 100644 --- a/Documentation/devicetree/bindings/cris/interrupts.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/axis,crisv32-intc.txt | |||
diff --git a/Documentation/devicetree/bindings/metag/meta-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/img,meta-intc.txt index 80994adab392..80994adab392 100644 --- a/Documentation/devicetree/bindings/metag/meta-intc.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/img,meta-intc.txt | |||
diff --git a/Documentation/devicetree/bindings/metag/pdc-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/img,pdc-intc.txt index a69118550344..a69118550344 100644 --- a/Documentation/devicetree/bindings/metag/pdc-intc.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/img,pdc-intc.txt | |||
diff --git a/Documentation/devicetree/bindings/x86/interrupt.txt b/Documentation/devicetree/bindings/interrupt-controller/intel,ce4100-ioapic.txt index 7d19f494f19a..7d19f494f19a 100644 --- a/Documentation/devicetree/bindings/x86/interrupt.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/intel,ce4100-ioapic.txt | |||
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,sysirq.txt b/Documentation/devicetree/bindings/interrupt-controller/mediatek,sysirq.txt index afef6a85ac51..afef6a85ac51 100644 --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,sysirq.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/mediatek,sysirq.txt | |||
diff --git a/Documentation/devicetree/bindings/arm/mrvl/intc.txt b/Documentation/devicetree/bindings/interrupt-controller/mrvl,intc.txt index 8b53273cb22f..8b53273cb22f 100644 --- a/Documentation/devicetree/bindings/arm/mrvl/intc.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/mrvl,intc.txt | |||
diff --git a/Documentation/devicetree/bindings/arm/lpc32xx-mic.txt b/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.txt index 539adca19e8f..539adca19e8f 100644 --- a/Documentation/devicetree/bindings/arm/lpc32xx-mic.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.txt | |||
diff --git a/Documentation/devicetree/bindings/open-pic.txt b/Documentation/devicetree/bindings/interrupt-controller/open-pic.txt index 909a902dff85..909a902dff85 100644 --- a/Documentation/devicetree/bindings/open-pic.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/open-pic.txt | |||
diff --git a/Documentation/devicetree/bindings/interrupt-controller/qca,ath79-misc-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/qca,ath79-misc-intc.txt index 391717a68f3b..ec96b1f01478 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/qca,ath79-misc-intc.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/qca,ath79-misc-intc.txt | |||
@@ -4,8 +4,8 @@ The MISC interrupt controller is a secondary controller for lower priority | |||
4 | interrupt. | 4 | interrupt. |
5 | 5 | ||
6 | Required Properties: | 6 | Required Properties: |
7 | - compatible: has to be "qca,<soctype>-cpu-intc", "qca,ar7100-misc-intc" | 7 | - compatible: has to be "qca,<soctype>-cpu-intc", "qca,ar7100-misc-intc" or |
8 | as fallback | 8 | "qca,<soctype>-cpu-intc", "qca,ar7240-misc-intc" |
9 | - reg: Base address and size of the controllers memory area | 9 | - reg: Base address and size of the controllers memory area |
10 | - interrupt-parent: phandle of the parent interrupt controller. | 10 | - interrupt-parent: phandle of the parent interrupt controller. |
11 | - interrupts: Interrupt specifier for the controllers interrupt. | 11 | - interrupts: Interrupt specifier for the controllers interrupt. |
@@ -13,6 +13,9 @@ Required Properties: | |||
13 | - #interrupt-cells : Specifies the number of cells needed to encode interrupt | 13 | - #interrupt-cells : Specifies the number of cells needed to encode interrupt |
14 | source, should be 1 | 14 | source, should be 1 |
15 | 15 | ||
16 | Compatible fallback depends on the SoC. Use ar7100 for ar71xx and ar913x, | ||
17 | use ar7240 for all other SoCs. | ||
18 | |||
16 | Please refer to interrupts.txt in this directory for details of the common | 19 | Please refer to interrupts.txt in this directory for details of the common |
17 | Interrupt Controllers bindings used by client devices. | 20 | Interrupt Controllers bindings used by client devices. |
18 | 21 | ||
@@ -28,3 +31,16 @@ Example: | |||
28 | interrupt-controller; | 31 | interrupt-controller; |
29 | #interrupt-cells = <1>; | 32 | #interrupt-cells = <1>; |
30 | }; | 33 | }; |
34 | |||
35 | Another example: | ||
36 | |||
37 | interrupt-controller@18060010 { | ||
38 | compatible = "qca,ar9331-misc-intc", qca,ar7240-misc-intc"; | ||
39 | reg = <0x18060010 0x4>; | ||
40 | |||
41 | interrupt-parent = <&cpuintc>; | ||
42 | interrupts = <6>; | ||
43 | |||
44 | interrupt-controller; | ||
45 | #interrupt-cells = <1>; | ||
46 | }; | ||
diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt b/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt index 63633bdea7e4..ae5054c27c99 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt | |||
@@ -10,6 +10,7 @@ Required properties: | |||
10 | - "renesas,irqc-r8a7792" (R-Car V2H) | 10 | - "renesas,irqc-r8a7792" (R-Car V2H) |
11 | - "renesas,irqc-r8a7793" (R-Car M2-N) | 11 | - "renesas,irqc-r8a7793" (R-Car M2-N) |
12 | - "renesas,irqc-r8a7794" (R-Car E2) | 12 | - "renesas,irqc-r8a7794" (R-Car E2) |
13 | - "renesas,intc-ex-r8a7795" (R-Car H3) | ||
13 | - #interrupt-cells: has to be <2>: an interrupt index and flags, as defined in | 14 | - #interrupt-cells: has to be <2>: an interrupt index and flags, as defined in |
14 | interrupts.txt in this directory | 15 | interrupts.txt in this directory |
15 | - clocks: Must contain a reference to the functional clock. | 16 | - clocks: Must contain a reference to the functional clock. |
diff --git a/Documentation/devicetree/bindings/arm/samsung/interrupt-combiner.txt b/Documentation/devicetree/bindings/interrupt-controller/samsung,exynos4210-combiner.txt index 9e5f73412cd7..9e5f73412cd7 100644 --- a/Documentation/devicetree/bindings/arm/samsung/interrupt-combiner.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/samsung,exynos4210-combiner.txt | |||
diff --git a/Documentation/devicetree/bindings/arc/interrupts.txt b/Documentation/devicetree/bindings/interrupt-controller/snps,arc700-intc.txt index 9a5d562435ea..9a5d562435ea 100644 --- a/Documentation/devicetree/bindings/arc/interrupts.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/snps,arc700-intc.txt | |||
diff --git a/Documentation/devicetree/bindings/arc/archs-idu-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/snps,archs-idu-intc.txt index 0dcb7c7d3e40..0dcb7c7d3e40 100644 --- a/Documentation/devicetree/bindings/arc/archs-idu-intc.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/snps,archs-idu-intc.txt | |||
diff --git a/Documentation/devicetree/bindings/arc/archs-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/snps,archs-intc.txt index 69f326d6a5ad..69f326d6a5ad 100644 --- a/Documentation/devicetree/bindings/arc/archs-intc.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/snps,archs-intc.txt | |||
diff --git a/Documentation/devicetree/bindings/arm/spear/shirq.txt b/Documentation/devicetree/bindings/interrupt-controller/st,spear3xx-shirq.txt index 715a013ed4bd..715a013ed4bd 100644 --- a/Documentation/devicetree/bindings/arm/spear/shirq.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/st,spear3xx-shirq.txt | |||
diff --git a/Documentation/devicetree/bindings/c6x/interrupt.txt b/Documentation/devicetree/bindings/interrupt-controller/ti,c64x+megamod-pic.txt index 42bb796cc4ad..42bb796cc4ad 100644 --- a/Documentation/devicetree/bindings/c6x/interrupt.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/ti,c64x+megamod-pic.txt | |||
diff --git a/Documentation/devicetree/bindings/arm/davinci/cp-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/ti,cp-intc.txt index 597e8a089fe4..597e8a089fe4 100644 --- a/Documentation/devicetree/bindings/arm/davinci/cp-intc.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/ti,cp-intc.txt | |||
diff --git a/Documentation/devicetree/bindings/arm/omap/intc.txt b/Documentation/devicetree/bindings/interrupt-controller/ti,omap2-intc.txt index f2583e6ec060..f2583e6ec060 100644 --- a/Documentation/devicetree/bindings/arm/omap/intc.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/ti,omap2-intc.txt | |||
diff --git a/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.txt index 0a4ce1051b02..0a4ce1051b02 100644 --- a/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-intc.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.txt | |||
diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu-v3.txt b/Documentation/devicetree/bindings/iommu/arm,smmu-v3.txt index 3443e0f838df..947863acc2d4 100644 --- a/Documentation/devicetree/bindings/iommu/arm,smmu-v3.txt +++ b/Documentation/devicetree/bindings/iommu/arm,smmu-v3.txt | |||
@@ -36,5 +36,24 @@ the PCIe specification. | |||
36 | NOTE: this only applies to the SMMU itself, not | 36 | NOTE: this only applies to the SMMU itself, not |
37 | masters connected upstream of the SMMU. | 37 | masters connected upstream of the SMMU. |
38 | 38 | ||
39 | - msi-parent : See the generic MSI binding described in | ||
40 | devicetree/bindings/interrupt-controller/msi.txt | ||
41 | for a description of the msi-parent property. | ||
42 | |||
39 | - hisilicon,broken-prefetch-cmd | 43 | - hisilicon,broken-prefetch-cmd |
40 | : Avoid sending CMD_PREFETCH_* commands to the SMMU. | 44 | : Avoid sending CMD_PREFETCH_* commands to the SMMU. |
45 | |||
46 | ** Example | ||
47 | |||
48 | smmu@2b400000 { | ||
49 | compatible = "arm,smmu-v3"; | ||
50 | reg = <0x0 0x2b400000 0x0 0x20000>; | ||
51 | interrupts = <GIC_SPI 74 IRQ_TYPE_EDGE_RISING>, | ||
52 | <GIC_SPI 75 IRQ_TYPE_EDGE_RISING>, | ||
53 | <GIC_SPI 77 IRQ_TYPE_EDGE_RISING>, | ||
54 | <GIC_SPI 79 IRQ_TYPE_EDGE_RISING>; | ||
55 | interrupt-names = "eventq", "priq", "cmdq-sync", "gerror"; | ||
56 | dma-coherent; | ||
57 | #iommu-cells = <0>; | ||
58 | msi-parent = <&its 0xff0000>; | ||
59 | }; | ||
diff --git a/Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt b/Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt index 729543c47046..bc620fe32a70 100644 --- a/Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt +++ b/Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt | |||
@@ -47,7 +47,7 @@ Required properties: | |||
47 | - clocks: Required if the System MMU is needed to gate its clock. | 47 | - clocks: Required if the System MMU is needed to gate its clock. |
48 | - power-domains: Required if the System MMU is needed to gate its power. | 48 | - power-domains: Required if the System MMU is needed to gate its power. |
49 | Please refer to the following document: | 49 | Please refer to the following document: |
50 | Documentation/devicetree/bindings/arm/exynos/power_domain.txt | 50 | Documentation/devicetree/bindings/power/pd-samsung.txt |
51 | 51 | ||
52 | Examples: | 52 | Examples: |
53 | gsc_0: gsc@13e00000 { | 53 | gsc_0: gsc@13e00000 { |
diff --git a/Documentation/devicetree/bindings/iommu/ti,omap-iommu.txt b/Documentation/devicetree/bindings/iommu/ti,omap-iommu.txt index 869699925fd5..4bd10dd881b8 100644 --- a/Documentation/devicetree/bindings/iommu/ti,omap-iommu.txt +++ b/Documentation/devicetree/bindings/iommu/ti,omap-iommu.txt | |||
@@ -4,6 +4,7 @@ Required properties: | |||
4 | - compatible : Should be one of, | 4 | - compatible : Should be one of, |
5 | "ti,omap2-iommu" for OMAP2/OMAP3 IOMMU instances | 5 | "ti,omap2-iommu" for OMAP2/OMAP3 IOMMU instances |
6 | "ti,omap4-iommu" for OMAP4/OMAP5 IOMMU instances | 6 | "ti,omap4-iommu" for OMAP4/OMAP5 IOMMU instances |
7 | "ti,dra7-dsp-iommu" for DRA7xx DSP IOMMU instances | ||
7 | "ti,dra7-iommu" for DRA7xx IOMMU instances | 8 | "ti,dra7-iommu" for DRA7xx IOMMU instances |
8 | - ti,hwmods : Name of the hwmod associated with the IOMMU instance | 9 | - ti,hwmods : Name of the hwmod associated with the IOMMU instance |
9 | - reg : Address space for the configuration registers | 10 | - reg : Address space for the configuration registers |
@@ -19,6 +20,13 @@ Optional properties: | |||
19 | Should be either 8 or 32 (default: 32) | 20 | Should be either 8 or 32 (default: 32) |
20 | - ti,iommu-bus-err-back : Indicates the IOMMU instance supports throwing | 21 | - ti,iommu-bus-err-back : Indicates the IOMMU instance supports throwing |
21 | back a bus error response on MMU faults. | 22 | back a bus error response on MMU faults. |
23 | - ti,syscon-mmuconfig : Should be a pair of the phandle to the DSP_SYSTEM | ||
24 | syscon node that contains the additional control | ||
25 | register for enabling the MMU, and the MMU instance | ||
26 | number (0-indexed) within the sub-system. This property | ||
27 | is required for DSP IOMMU instances on DRA7xx SoCs. The | ||
28 | instance number should be 0 for DSP MDMA MMUs and 1 for | ||
29 | DSP EDMA MMUs. | ||
22 | 30 | ||
23 | Example: | 31 | Example: |
24 | /* OMAP3 ISP MMU */ | 32 | /* OMAP3 ISP MMU */ |
@@ -30,3 +38,22 @@ Example: | |||
30 | ti,hwmods = "mmu_isp"; | 38 | ti,hwmods = "mmu_isp"; |
31 | ti,#tlb-entries = <8>; | 39 | ti,#tlb-entries = <8>; |
32 | }; | 40 | }; |
41 | |||
42 | /* DRA74x DSP2 MMUs */ | ||
43 | mmu0_dsp2: mmu@41501000 { | ||
44 | compatible = "ti,dra7-dsp-iommu"; | ||
45 | reg = <0x41501000 0x100>; | ||
46 | interrupts = <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>; | ||
47 | ti,hwmods = "mmu0_dsp2"; | ||
48 | #iommu-cells = <0>; | ||
49 | ti,syscon-mmuconfig = <&dsp2_system 0x0>; | ||
50 | }; | ||
51 | |||
52 | mmu1_dsp2: mmu@41502000 { | ||
53 | compatible = "ti,dra7-dsp-iommu"; | ||
54 | reg = <0x41502000 0x100>; | ||
55 | interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>; | ||
56 | ti,hwmods = "mmu1_dsp2"; | ||
57 | #iommu-cells = <0>; | ||
58 | ti,syscon-mmuconfig = <&dsp2_system 0x1>; | ||
59 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/backlight/88pm860x.txt b/Documentation/devicetree/bindings/leds/backlight/88pm860x.txt index 261df2799315..261df2799315 100644 --- a/Documentation/devicetree/bindings/video/backlight/88pm860x.txt +++ b/Documentation/devicetree/bindings/leds/backlight/88pm860x.txt | |||
diff --git a/Documentation/devicetree/bindings/video/backlight/gpio-backlight.txt b/Documentation/devicetree/bindings/leds/backlight/gpio-backlight.txt index 321be6640533..321be6640533 100644 --- a/Documentation/devicetree/bindings/video/backlight/gpio-backlight.txt +++ b/Documentation/devicetree/bindings/leds/backlight/gpio-backlight.txt | |||
diff --git a/Documentation/devicetree/bindings/video/backlight/lp855x.txt b/Documentation/devicetree/bindings/leds/backlight/lp855x.txt index 0a3ecbc3a1b9..0a3ecbc3a1b9 100644 --- a/Documentation/devicetree/bindings/video/backlight/lp855x.txt +++ b/Documentation/devicetree/bindings/leds/backlight/lp855x.txt | |||
diff --git a/Documentation/devicetree/bindings/video/backlight/max8925-backlight.txt b/Documentation/devicetree/bindings/leds/backlight/max8925-backlight.txt index b4cffdaa4137..b4cffdaa4137 100644 --- a/Documentation/devicetree/bindings/video/backlight/max8925-backlight.txt +++ b/Documentation/devicetree/bindings/leds/backlight/max8925-backlight.txt | |||
diff --git a/Documentation/devicetree/bindings/video/backlight/pm8941-wled.txt b/Documentation/devicetree/bindings/leds/backlight/pm8941-wled.txt index 424f8444a6cd..e5b294dafc58 100644 --- a/Documentation/devicetree/bindings/video/backlight/pm8941-wled.txt +++ b/Documentation/devicetree/bindings/leds/backlight/pm8941-wled.txt | |||
@@ -5,6 +5,8 @@ Required properties: | |||
5 | - reg: slave address | 5 | - reg: slave address |
6 | 6 | ||
7 | Optional properties: | 7 | Optional properties: |
8 | - default-brightness: brightness value on boot, value from: 0-4095 | ||
9 | default: 2048 | ||
8 | - label: The name of the backlight device | 10 | - label: The name of the backlight device |
9 | - qcom,cs-out: bool; enable current sink output | 11 | - qcom,cs-out: bool; enable current sink output |
10 | - qcom,cabc: bool; enable content adaptive backlight control | 12 | - qcom,cabc: bool; enable content adaptive backlight control |
diff --git a/Documentation/devicetree/bindings/video/backlight/pwm-backlight.txt b/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt index 764db86d441a..764db86d441a 100644 --- a/Documentation/devicetree/bindings/video/backlight/pwm-backlight.txt +++ b/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt | |||
diff --git a/Documentation/devicetree/bindings/video/backlight/sky81452-backlight.txt b/Documentation/devicetree/bindings/leds/backlight/sky81452-backlight.txt index 8bf2940f54bc..8bf2940f54bc 100644 --- a/Documentation/devicetree/bindings/video/backlight/sky81452-backlight.txt +++ b/Documentation/devicetree/bindings/leds/backlight/sky81452-backlight.txt | |||
diff --git a/Documentation/devicetree/bindings/video/backlight/tps65217-backlight.txt b/Documentation/devicetree/bindings/leds/backlight/tps65217-backlight.txt index 5fb9279ac287..5fb9279ac287 100644 --- a/Documentation/devicetree/bindings/video/backlight/tps65217-backlight.txt +++ b/Documentation/devicetree/bindings/leds/backlight/tps65217-backlight.txt | |||
diff --git a/Documentation/devicetree/bindings/leds/leds-aat1290.txt b/Documentation/devicetree/bindings/leds/leds-aat1290.txt index c05ed91a4e42..85c0c58617f6 100644 --- a/Documentation/devicetree/bindings/leds/leds-aat1290.txt +++ b/Documentation/devicetree/bindings/leds/leds-aat1290.txt | |||
@@ -27,9 +27,9 @@ Required properties of the LED child node: | |||
27 | - flash-max-microamp : see Documentation/devicetree/bindings/leds/common.txt | 27 | - flash-max-microamp : see Documentation/devicetree/bindings/leds/common.txt |
28 | Maximum flash LED supply current can be calculated using | 28 | Maximum flash LED supply current can be calculated using |
29 | following formula: I = 1A * 162kohm / Rset. | 29 | following formula: I = 1A * 162kohm / Rset. |
30 | - flash-timeout-us : see Documentation/devicetree/bindings/leds/common.txt | 30 | - flash-max-timeout-us : see Documentation/devicetree/bindings/leds/common.txt |
31 | Maximum flash timeout can be calculated using following | 31 | Maximum flash timeout can be calculated using following |
32 | formula: T = 8.82 * 10^9 * Ct. | 32 | formula: T = 8.82 * 10^9 * Ct. |
33 | 33 | ||
34 | Optional properties of the LED child node: | 34 | Optional properties of the LED child node: |
35 | - label : see Documentation/devicetree/bindings/leds/common.txt | 35 | - label : see Documentation/devicetree/bindings/leds/common.txt |
@@ -54,7 +54,7 @@ aat1290 { | |||
54 | label = "aat1290-flash"; | 54 | label = "aat1290-flash"; |
55 | led-max-microamp = <520833>; | 55 | led-max-microamp = <520833>; |
56 | flash-max-microamp = <1012500>; | 56 | flash-max-microamp = <1012500>; |
57 | flash-timeout-us = <1940000>; | 57 | flash-max-timeout-us = <1940000>; |
58 | }; | 58 | }; |
59 | }; | 59 | }; |
60 | 60 | ||
diff --git a/Documentation/devicetree/bindings/leds/leds-bcm6328.txt b/Documentation/devicetree/bindings/leds/leds-bcm6328.txt index f9e36adc0ebf..3f48c1eaf085 100644 --- a/Documentation/devicetree/bindings/leds/leds-bcm6328.txt +++ b/Documentation/devicetree/bindings/leds/leds-bcm6328.txt | |||
@@ -29,6 +29,14 @@ Required properties: | |||
29 | Optional properties: | 29 | Optional properties: |
30 | - brcm,serial-leds : Boolean, enables Serial LEDs. | 30 | - brcm,serial-leds : Boolean, enables Serial LEDs. |
31 | Default : false | 31 | Default : false |
32 | - brcm,serial-mux : Boolean, enables Serial LEDs multiplexing. | ||
33 | Default : false | ||
34 | - brcm,serial-clk-low : Boolean, makes clock signal active low. | ||
35 | Default : false | ||
36 | - brcm,serial-dat-low : Boolean, makes data signal active low. | ||
37 | Default : false | ||
38 | - brcm,serial-shift-inv : Boolean, inverts Serial LEDs shift direction. | ||
39 | Default : false | ||
32 | 40 | ||
33 | Each LED is represented as a sub-node of the brcm,bcm6328-leds device. | 41 | Each LED is represented as a sub-node of the brcm,bcm6328-leds device. |
34 | 42 | ||
@@ -110,6 +118,8 @@ Scenario 2 : BCM63268 with Serial/GPHY0 LEDs | |||
110 | #size-cells = <0>; | 118 | #size-cells = <0>; |
111 | reg = <0x10001900 0x24>; | 119 | reg = <0x10001900 0x24>; |
112 | brcm,serial-leds; | 120 | brcm,serial-leds; |
121 | brcm,serial-dat-low; | ||
122 | brcm,serial-shift-inv; | ||
113 | 123 | ||
114 | gphy0_spd0@0 { | 124 | gphy0_spd0@0 { |
115 | reg = <0>; | 125 | reg = <0>; |
diff --git a/Documentation/devicetree/bindings/leds/leds-netxbig.txt b/Documentation/devicetree/bindings/leds/leds-netxbig.txt new file mode 100644 index 000000000000..5ef92a26d768 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-netxbig.txt | |||
@@ -0,0 +1,92 @@ | |||
1 | Binding for the CPLD LEDs (GPIO extension bus) found on some LaCie/Seagate | ||
2 | boards (Example: 2Big/5Big Network v2, 2Big NAS). | ||
3 | |||
4 | Required properties: | ||
5 | - compatible: "lacie,netxbig-leds". | ||
6 | - gpio-ext: Phandle for the gpio-ext bus. | ||
7 | |||
8 | Optional properties: | ||
9 | - timers: Timer array. Each timer entry is represented by three integers: | ||
10 | Mode (gpio-ext bus), delay_on and delay_off. | ||
11 | |||
12 | Each LED is represented as a sub-node of the netxbig-leds device. | ||
13 | |||
14 | Required sub-node properties: | ||
15 | - mode-addr: Mode register address on gpio-ext bus. | ||
16 | - mode-val: Mode to value mapping. Each entry is represented by two integers: | ||
17 | A mode and the corresponding value on the gpio-ext bus. | ||
18 | - bright-addr: Brightness register address on gpio-ext bus. | ||
19 | - max-brightness: Maximum brightness value. | ||
20 | |||
21 | Optional sub-node properties: | ||
22 | - label: Name for this LED. If omitted, the label is taken from the node name. | ||
23 | - linux,default-trigger: Trigger assigned to the LED. | ||
24 | |||
25 | Example: | ||
26 | |||
27 | netxbig-leds { | ||
28 | compatible = "lacie,netxbig-leds"; | ||
29 | |||
30 | gpio-ext = &gpio_ext; | ||
31 | |||
32 | timers = <NETXBIG_LED_TIMER1 500 500 | ||
33 | NETXBIG_LED_TIMER2 500 1000>; | ||
34 | |||
35 | blue-power { | ||
36 | label = "netxbig:blue:power"; | ||
37 | mode-addr = <0>; | ||
38 | mode-val = <NETXBIG_LED_OFF 0 | ||
39 | NETXBIG_LED_ON 1 | ||
40 | NETXBIG_LED_TIMER1 3 | ||
41 | NETXBIG_LED_TIMER2 7>; | ||
42 | bright-addr = <1>; | ||
43 | max-brightness = <7>; | ||
44 | }; | ||
45 | red-power { | ||
46 | label = "netxbig:red:power"; | ||
47 | mode-addr = <0>; | ||
48 | mode-val = <NETXBIG_LED_OFF 0 | ||
49 | NETXBIG_LED_ON 2 | ||
50 | NETXBIG_LED_TIMER1 4>; | ||
51 | bright-addr = <1>; | ||
52 | max-brightness = <7>; | ||
53 | }; | ||
54 | blue-sata0 { | ||
55 | label = "netxbig:blue:sata0"; | ||
56 | mode-addr = <3>; | ||
57 | mode-val = <NETXBIG_LED_OFF 0 | ||
58 | NETXBIG_LED_ON 7 | ||
59 | NETXBIG_LED_SATA 1 | ||
60 | NETXBIG_LED_TIMER1 3>; | ||
61 | bright-addr = <2>; | ||
62 | max-brightness = <7>; | ||
63 | }; | ||
64 | red-sata0 { | ||
65 | label = "netxbig:red:sata0"; | ||
66 | mode-addr = <3>; | ||
67 | mode-val = <NETXBIG_LED_OFF 0 | ||
68 | NETXBIG_LED_ON 2 | ||
69 | NETXBIG_LED_TIMER1 4>; | ||
70 | bright-addr = <2>; | ||
71 | max-brightness = <7>; | ||
72 | }; | ||
73 | blue-sata1 { | ||
74 | label = "netxbig:blue:sata1"; | ||
75 | mode-addr = <4>; | ||
76 | mode-val = <NETXBIG_LED_OFF 0 | ||
77 | NETXBIG_LED_ON 7 | ||
78 | NETXBIG_LED_SATA 1 | ||
79 | NETXBIG_LED_TIMER1 3>; | ||
80 | bright-addr = <2>; | ||
81 | max-brightness = <7>; | ||
82 | }; | ||
83 | red-sata1 { | ||
84 | label = "netxbig:red:sata1"; | ||
85 | mode-addr = <4>; | ||
86 | mode-val = <NETXBIG_LED_OFF 0 | ||
87 | NETXBIG_LED_ON 2 | ||
88 | NETXBIG_LED_TIMER1 4>; | ||
89 | bright-addr = <2>; | ||
90 | max-brightness = <7>; | ||
91 | }; | ||
92 | }; | ||
diff --git a/Documentation/devicetree/bindings/mailbox/omap-mailbox.txt b/Documentation/devicetree/bindings/mailbox/omap-mailbox.txt index d1a043339c11..9b40c4925aa9 100644 --- a/Documentation/devicetree/bindings/mailbox/omap-mailbox.txt +++ b/Documentation/devicetree/bindings/mailbox/omap-mailbox.txt | |||
@@ -75,6 +75,14 @@ data that represent the following: | |||
75 | Cell #3 (usr_id) - mailbox user id for identifying the interrupt line | 75 | Cell #3 (usr_id) - mailbox user id for identifying the interrupt line |
76 | associated with generating a tx/rx fifo interrupt. | 76 | associated with generating a tx/rx fifo interrupt. |
77 | 77 | ||
78 | Optional Properties: | ||
79 | -------------------- | ||
80 | - ti,mbox-send-noirq: Quirk flag to allow the client user of this sub-mailbox | ||
81 | to send messages without triggering a Tx ready interrupt, | ||
82 | and to control the Tx ticker. Should be used only on | ||
83 | sub-mailboxes used to communicate with WkupM3 remote | ||
84 | processor on AM33xx/AM43xx SoCs. | ||
85 | |||
78 | Mailbox Users: | 86 | Mailbox Users: |
79 | ============== | 87 | ============== |
80 | A device needing to communicate with a target processor device should specify | 88 | A device needing to communicate with a target processor device should specify |
diff --git a/Documentation/devicetree/bindings/mailbox/sti-mailbox.txt b/Documentation/devicetree/bindings/mailbox/sti-mailbox.txt new file mode 100644 index 000000000000..b61eec920359 --- /dev/null +++ b/Documentation/devicetree/bindings/mailbox/sti-mailbox.txt | |||
@@ -0,0 +1,51 @@ | |||
1 | ST Microelectronics Mailbox Driver | ||
2 | |||
3 | Each ST Mailbox IP currently consists of 4 instances of 32 channels. Messages | ||
4 | are passed between Application and Remote processors using shared memory. | ||
5 | |||
6 | Controller | ||
7 | ---------- | ||
8 | |||
9 | Required properties: | ||
10 | - compatible : Should be "st,stih407-mailbox" | ||
11 | - reg : Offset and length of the device's register set | ||
12 | - mbox-name : Name of the mailbox | ||
13 | - #mbox-cells: : Must be 2 | ||
14 | <&phandle instance channel direction> | ||
15 | phandle : Label name of controller | ||
16 | instance : Instance number | ||
17 | channel : Channel number | ||
18 | |||
19 | Optional properties | ||
20 | - interrupts : Contains the IRQ line for a Rx mailbox | ||
21 | |||
22 | Example: | ||
23 | |||
24 | mailbox0: mailbox@0 { | ||
25 | compatible = "st,stih407-mailbox"; | ||
26 | reg = <0x08f00000 0x1000>; | ||
27 | interrupts = <GIC_SPI 1 IRQ_TYPE_NONE>; | ||
28 | #mbox-cells = <2>; | ||
29 | mbox-name = "a9"; | ||
30 | }; | ||
31 | |||
32 | Client | ||
33 | ------ | ||
34 | |||
35 | Required properties: | ||
36 | - compatible : Many (See the client docs) | ||
37 | - reg : Shared (between Application and Remote) memory address | ||
38 | - mboxes : Standard property to specify a Mailbox (See ./mailbox.txt) | ||
39 | Cells must match 'mbox-cells' (See Controller docs above) | ||
40 | |||
41 | Optional properties | ||
42 | - mbox-names : Name given to channels seen in the 'mboxes' property. | ||
43 | |||
44 | Example: | ||
45 | |||
46 | mailbox_test { | ||
47 | compatible = "mailbox_test"; | ||
48 | reg = <0x[shared_memory_address], [shared_memory_size]>; | ||
49 | mboxes = <&mailbox2 0 1>, <&mailbox0 2 1>; | ||
50 | mbox-names = "tx", "rx"; | ||
51 | }; | ||
diff --git a/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt b/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt index 4ef45636ebde..38941db23dd2 100644 --- a/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt +++ b/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt | |||
@@ -4,7 +4,8 @@ Required properties: | |||
4 | 4 | ||
5 | - compatible : should be one of: | 5 | - compatible : should be one of: |
6 | "samsung,s5pv210-jpeg", "samsung,exynos4210-jpeg", | 6 | "samsung,s5pv210-jpeg", "samsung,exynos4210-jpeg", |
7 | "samsung,exynos3250-jpeg", "samsung,exynos5420-jpeg"; | 7 | "samsung,exynos3250-jpeg", "samsung,exynos5420-jpeg", |
8 | "samsung,exynos5433-jpeg"; | ||
8 | - reg : address and length of the JPEG codec IP register set; | 9 | - reg : address and length of the JPEG codec IP register set; |
9 | - interrupts : specifies the JPEG codec IP interrupt; | 10 | - interrupts : specifies the JPEG codec IP interrupt; |
10 | - clock-names : should contain: | 11 | - clock-names : should contain: |
diff --git a/Documentation/devicetree/bindings/memory-controllers/arm,pl172.txt b/Documentation/devicetree/bindings/memory-controllers/arm,pl172.txt index e6df32f9986d..22b77ee02f58 100644 --- a/Documentation/devicetree/bindings/memory-controllers/arm,pl172.txt +++ b/Documentation/devicetree/bindings/memory-controllers/arm,pl172.txt | |||
@@ -1,8 +1,9 @@ | |||
1 | * Device tree bindings for ARM PL172 MultiPort Memory Controller | 1 | * Device tree bindings for ARM PL172/PL175/PL176 MultiPort Memory Controller |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | 4 | ||
5 | - compatible: "arm,pl172", "arm,primecell" | 5 | - compatible: Must be "arm,primecell" and exactly one from |
6 | "arm,pl172", "arm,pl175" or "arm,pl176". | ||
6 | 7 | ||
7 | - reg: Must contains offset/length value for controller. | 8 | - reg: Must contains offset/length value for controller. |
8 | 9 | ||
@@ -56,7 +57,8 @@ Optional child cs node config properties: | |||
56 | 57 | ||
57 | - mpmc,extended-wait: Enable extended wait. | 58 | - mpmc,extended-wait: Enable extended wait. |
58 | 59 | ||
59 | - mpmc,buffer-enable: Enable write buffer. | 60 | - mpmc,buffer-enable: Enable write buffer, option is not supported by |
61 | PL175 and PL176 controllers. | ||
60 | 62 | ||
61 | - mpmc,write-protect: Enable write protect. | 63 | - mpmc,write-protect: Enable write protect. |
62 | 64 | ||
diff --git a/Documentation/devicetree/bindings/arm/calxeda/mem-ctrlr.txt b/Documentation/devicetree/bindings/memory-controllers/calxeda-ddr-ctrlr.txt index 049675944b78..049675944b78 100644 --- a/Documentation/devicetree/bindings/arm/calxeda/mem-ctrlr.txt +++ b/Documentation/devicetree/bindings/memory-controllers/calxeda-ddr-ctrlr.txt | |||
diff --git a/Documentation/devicetree/bindings/memory-controllers/renesas-memory-controllers.txt b/Documentation/devicetree/bindings/memory-controllers/renesas-memory-controllers.txt index c64b7925cd09..9f78e6c82740 100644 --- a/Documentation/devicetree/bindings/memory-controllers/renesas-memory-controllers.txt +++ b/Documentation/devicetree/bindings/memory-controllers/renesas-memory-controllers.txt | |||
@@ -24,9 +24,9 @@ Required properties: | |||
24 | Optional properties: | 24 | Optional properties: |
25 | - interrupts: Must contain a list of interrupt specifiers for memory | 25 | - interrupts: Must contain a list of interrupt specifiers for memory |
26 | controller interrupts, if available. | 26 | controller interrupts, if available. |
27 | - interrupts-names: Must contain a list of interrupt names corresponding to | 27 | - interrupt-names: Must contain a list of interrupt names corresponding to |
28 | the interrupts in the interrupts property, if available. | 28 | the interrupts in the interrupts property, if available. |
29 | Valid interrupt names are: | 29 | Valid interrupt names are: |
30 | - "sec" (secure interrupt) | 30 | - "sec" (secure interrupt) |
31 | - "temp" (normal (temperature) interrupt) | 31 | - "temp" (normal (temperature) interrupt) |
32 | - power-domains: Must contain a reference to the PM domain that the memory | 32 | - power-domains: Must contain a reference to the PM domain that the memory |
diff --git a/Documentation/devicetree/bindings/mfd/arizona.txt b/Documentation/devicetree/bindings/mfd/arizona.txt index a8fee60dc20d..18be0cbfb456 100644 --- a/Documentation/devicetree/bindings/mfd/arizona.txt +++ b/Documentation/devicetree/bindings/mfd/arizona.txt | |||
@@ -44,7 +44,6 @@ Required properties: | |||
44 | Optional properties: | 44 | Optional properties: |
45 | 45 | ||
46 | - wlf,reset : GPIO specifier for the GPIO controlling /RESET | 46 | - wlf,reset : GPIO specifier for the GPIO controlling /RESET |
47 | - wlf,ldoena : GPIO specifier for the GPIO controlling LDOENA | ||
48 | 47 | ||
49 | - wlf,gpio-defaults : A list of GPIO configuration register values. Defines | 48 | - wlf,gpio-defaults : A list of GPIO configuration register values. Defines |
50 | for the appropriate values can found in <dt-bindings/mfd/arizona.txt>. If | 49 | for the appropriate values can found in <dt-bindings/mfd/arizona.txt>. If |
@@ -67,21 +66,13 @@ Optional properties: | |||
67 | present, the number of values should be less than or equal to the | 66 | present, the number of values should be less than or equal to the |
68 | number of inputs, unspecified inputs will use the chip default. | 67 | number of inputs, unspecified inputs will use the chip default. |
69 | 68 | ||
70 | - wlf,hpdet-channel : Headphone detection channel. | ||
71 | ARIZONA_ACCDET_MODE_HPL or 1 - Headphone detect mode is set to HPDETL | ||
72 | ARIZONA_ACCDET_MODE_HPR or 2 - Headphone detect mode is set to HPDETR | ||
73 | If this node is not mentioned or if the value is unknown, then | ||
74 | headphone detection mode is set to HPDETL. | ||
75 | |||
76 | - DCVDD-supply, MICVDD-supply : Power supplies, only need to be specified if | 69 | - DCVDD-supply, MICVDD-supply : Power supplies, only need to be specified if |
77 | they are being externally supplied. As covered in | 70 | they are being externally supplied. As covered in |
78 | Documentation/devicetree/bindings/regulator/regulator.txt | 71 | Documentation/devicetree/bindings/regulator/regulator.txt |
79 | 72 | ||
80 | Optional subnodes: | 73 | Also see child specific device properties: |
81 | - ldo1 : Initial data for the LDO1 regulator, as covered in | 74 | Regulator - ../regulator/arizona-regulator.txt |
82 | Documentation/devicetree/bindings/regulator/regulator.txt | 75 | Extcon - ../extcon/extcon-arizona.txt |
83 | - micvdd : Initial data for the MICVDD regulator, as covered in | ||
84 | Documentation/devicetree/bindings/regulator/regulator.txt | ||
85 | 76 | ||
86 | Example: | 77 | Example: |
87 | 78 | ||
diff --git a/Documentation/devicetree/bindings/mfd/atmel-flexcom.txt b/Documentation/devicetree/bindings/mfd/atmel-flexcom.txt new file mode 100644 index 000000000000..692300117c64 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/atmel-flexcom.txt | |||
@@ -0,0 +1,63 @@ | |||
1 | * Device tree bindings for Atmel Flexcom (Flexible Serial Communication Unit) | ||
2 | |||
3 | The Atmel Flexcom is just a wrapper which embeds a SPI controller, an I2C | ||
4 | controller and an USART. Only one function can be used at a time and is chosen | ||
5 | at boot time according to the device tree. | ||
6 | |||
7 | Required properties: | ||
8 | - compatible: Should be "atmel,sama5d2-flexcom" | ||
9 | - reg: Should be the offset/length value for Flexcom dedicated | ||
10 | I/O registers (without USART, TWI or SPI registers). | ||
11 | - clocks: Should be the Flexcom peripheral clock from PMC. | ||
12 | - #address-cells: Should be <1> | ||
13 | - #size-cells: Should be <1> | ||
14 | - ranges: Should be one range for the full I/O register region | ||
15 | (including USART, TWI and SPI registers). | ||
16 | - atmel,flexcom-mode: Should be one of the following values: | ||
17 | - <1> for USART | ||
18 | - <2> for SPI | ||
19 | - <3> for I2C | ||
20 | |||
21 | Required child: | ||
22 | A single available child device of type matching the "atmel,flexcom-mode" | ||
23 | property. | ||
24 | |||
25 | The phandle provided by the clocks property of the child is the same as one for | ||
26 | the Flexcom parent. | ||
27 | |||
28 | For other properties, please refer to the documentations of the respective | ||
29 | device: | ||
30 | - ../serial/atmel-usart.txt | ||
31 | - ../spi/spi_atmel.txt | ||
32 | - ../i2c/i2c-at91.txt | ||
33 | |||
34 | Example: | ||
35 | |||
36 | flexcom@f8034000 { | ||
37 | compatible = "atmel,sama5d2-flexcom"; | ||
38 | reg = <0xf8034000 0x200>; | ||
39 | clocks = <&flx0_clk>; | ||
40 | #address-cells = <1>; | ||
41 | #size-cells = <1>; | ||
42 | ranges = <0x0 0xf8034000 0x800>; | ||
43 | atmel,flexcom-mode = <2>; | ||
44 | |||
45 | spi@400 { | ||
46 | compatible = "atmel,at91rm9200-spi"; | ||
47 | reg = <0x400 0x200>; | ||
48 | interrupts = <19 IRQ_TYPE_LEVEL_HIGH 7>; | ||
49 | pinctrl-names = "default"; | ||
50 | pinctrl-0 = <&pinctrl_flx0_default>; | ||
51 | #address-cells = <1>; | ||
52 | #size-cells = <0>; | ||
53 | clocks = <&flx0_clk>; | ||
54 | clock-names = "spi_clk"; | ||
55 | atmel,fifo-size = <32>; | ||
56 | |||
57 | mtd_dataflash@0 { | ||
58 | compatible = "atmel,at25f512b"; | ||
59 | reg = <0>; | ||
60 | spi-max-frequency = <20000000>; | ||
61 | }; | ||
62 | }; | ||
63 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt b/Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt index ad5d90482a0e..670831b29565 100644 --- a/Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt +++ b/Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt | |||
@@ -15,7 +15,7 @@ Required properties: | |||
15 | 15 | ||
16 | The HLCDC IP exposes two subdevices: | 16 | The HLCDC IP exposes two subdevices: |
17 | - a PWM chip: see ../pwm/atmel-hlcdc-pwm.txt | 17 | - a PWM chip: see ../pwm/atmel-hlcdc-pwm.txt |
18 | - a Display Controller: see ../drm/atmel-hlcdc-dc.txt | 18 | - a Display Controller: see ../display/atmel-hlcdc-dc.txt |
19 | 19 | ||
20 | Example: | 20 | Example: |
21 | 21 | ||
diff --git a/Documentation/devicetree/bindings/mfd/axp20x.txt b/Documentation/devicetree/bindings/mfd/axp20x.txt index 41811223e5be..a474359dd206 100644 --- a/Documentation/devicetree/bindings/mfd/axp20x.txt +++ b/Documentation/devicetree/bindings/mfd/axp20x.txt | |||
@@ -60,8 +60,8 @@ DCDC2 : DC-DC buck : vin2-supply | |||
60 | DCDC3 : DC-DC buck : vin3-supply | 60 | DCDC3 : DC-DC buck : vin3-supply |
61 | DCDC4 : DC-DC buck : vin4-supply | 61 | DCDC4 : DC-DC buck : vin4-supply |
62 | DCDC5 : DC-DC buck : vin5-supply | 62 | DCDC5 : DC-DC buck : vin5-supply |
63 | DC1SW : On/Off Switch : dcdc1-supply : DCDC1 secondary output | 63 | DC1SW : On/Off Switch : : DCDC1 secondary output |
64 | DC5LDO : LDO : dcdc5-supply : input from DCDC5 | 64 | DC5LDO : LDO : : input from DCDC5 |
65 | ALDO1 : LDO : aldoin-supply : shared supply | 65 | ALDO1 : LDO : aldoin-supply : shared supply |
66 | ALDO2 : LDO : aldoin-supply : shared supply | 66 | ALDO2 : LDO : aldoin-supply : shared supply |
67 | ALDO3 : LDO : aldoin-supply : shared supply | 67 | ALDO3 : LDO : aldoin-supply : shared supply |
diff --git a/Documentation/devicetree/bindings/mfd/cros-ec.txt b/Documentation/devicetree/bindings/mfd/cros-ec.txt index 1777916e9e28..136e0c2da44d 100644 --- a/Documentation/devicetree/bindings/mfd/cros-ec.txt +++ b/Documentation/devicetree/bindings/mfd/cros-ec.txt | |||
@@ -34,6 +34,10 @@ Required properties (LPC): | |||
34 | - compatible: "google,cros-ec-lpc" | 34 | - compatible: "google,cros-ec-lpc" |
35 | - reg: List of (IO address, size) pairs defining the interface uses | 35 | - reg: List of (IO address, size) pairs defining the interface uses |
36 | 36 | ||
37 | Optional properties (all): | ||
38 | - google,has-vbc-nvram: Some implementations of the EC include a small | ||
39 | nvram space used to store verified boot context data. This boolean flag | ||
40 | is used to specify whether this nvram is present or not. | ||
37 | 41 | ||
38 | Example for I2C: | 42 | Example for I2C: |
39 | 43 | ||
diff --git a/Documentation/devicetree/bindings/mfd/da9150.txt b/Documentation/devicetree/bindings/mfd/da9150.txt index d0588eaa0d71..fd4dca7f4aba 100644 --- a/Documentation/devicetree/bindings/mfd/da9150.txt +++ b/Documentation/devicetree/bindings/mfd/da9150.txt | |||
@@ -6,6 +6,7 @@ Device Description | |||
6 | ------ ----------- | 6 | ------ ----------- |
7 | da9150-gpadc : General Purpose ADC | 7 | da9150-gpadc : General Purpose ADC |
8 | da9150-charger : Battery Charger | 8 | da9150-charger : Battery Charger |
9 | da9150-fg : Battery Fuel-Gauge | ||
9 | 10 | ||
10 | ====== | 11 | ====== |
11 | 12 | ||
@@ -16,13 +17,13 @@ Required properties: | |||
16 | the IRQs from da9150 are delivered to. | 17 | the IRQs from da9150 are delivered to. |
17 | - interrupts: IRQ line info for da9150 chip. | 18 | - interrupts: IRQ line info for da9150 chip. |
18 | - interrupt-controller: da9150 has internal IRQs (own IRQ domain). | 19 | - interrupt-controller: da9150 has internal IRQs (own IRQ domain). |
19 | (See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt for | 20 | (See ../interrupt-controller/interrupts.txt for |
20 | further information relating to interrupt properties) | 21 | further information relating to interrupt properties) |
21 | 22 | ||
22 | Sub-devices: | 23 | Sub-devices: |
23 | - da9150-gpadc: See Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt | 24 | - da9150-gpadc: See ../iio/adc/da9150-gpadc.txt |
24 | - da9150-charger: See Documentation/devicetree/bindings/power/da9150-charger.txt | 25 | - da9150-charger: See ../power/da9150-charger.txt |
25 | 26 | - da9150-fg: See ../power/da9150-fg.txt | |
26 | 27 | ||
27 | Example: | 28 | Example: |
28 | 29 | ||
@@ -34,10 +35,28 @@ Example: | |||
34 | interrupt-controller; | 35 | interrupt-controller; |
35 | 36 | ||
36 | gpadc: da9150-gpadc { | 37 | gpadc: da9150-gpadc { |
37 | ... | 38 | compatible = "dlg,da9150-gpadc"; |
39 | #io-channel-cells = <1>; | ||
40 | }; | ||
41 | |||
42 | charger { | ||
43 | compatible = "dlg,da9150-charger"; | ||
44 | |||
45 | io-channels = <&gpadc 0>, | ||
46 | <&gpadc 2>, | ||
47 | <&gpadc 8>, | ||
48 | <&gpadc 5>; | ||
49 | io-channel-names = "CHAN_IBUS", | ||
50 | "CHAN_VBUS", | ||
51 | "CHAN_TJUNC", | ||
52 | "CHAN_VBAT"; | ||
38 | }; | 53 | }; |
39 | 54 | ||
40 | da9150-charger { | 55 | fuel-gauge { |
41 | ... | 56 | compatible = "dlg,da9150-fuel-gauge"; |
57 | |||
58 | dlg,update-interval = <10000>; | ||
59 | dlg,warn-soc-level = /bits/ 8 <15>; | ||
60 | dlg,crit-soc-level = /bits/ 8 <5> | ||
42 | }; | 61 | }; |
43 | }; | 62 | }; |
diff --git a/Documentation/devicetree/bindings/mfd/s2mps11.txt b/Documentation/devicetree/bindings/mfd/s2mps11.txt index 57a045016fca..09b94c97faac 100644 --- a/Documentation/devicetree/bindings/mfd/s2mps11.txt +++ b/Documentation/devicetree/bindings/mfd/s2mps11.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | 1 | ||
2 | * Samsung S2MPS11, S2MPS13, S2MPS14 and S2MPU02 Voltage and Current Regulator | 2 | * Samsung S2MPS11/13/14/15 and S2MPU02 Voltage and Current Regulator |
3 | 3 | ||
4 | The Samsung S2MPS11 is a multi-function device which includes voltage and | 4 | The Samsung S2MPS11 is a multi-function device which includes voltage and |
5 | current regulators, RTC, charger controller and other sub-blocks. It is | 5 | current regulators, RTC, charger controller and other sub-blocks. It is |
@@ -7,17 +7,28 @@ interfaced to the host controller using an I2C interface. Each sub-block is | |||
7 | addressed by the host system using different I2C slave addresses. | 7 | addressed by the host system using different I2C slave addresses. |
8 | 8 | ||
9 | Required properties: | 9 | Required properties: |
10 | - compatible: Should be "samsung,s2mps11-pmic" or "samsung,s2mps13-pmic" | 10 | - compatible: Should be one of the following |
11 | or "samsung,s2mps14-pmic" or "samsung,s2mpu02-pmic". | 11 | - "samsung,s2mps11-pmic" |
12 | - "samsung,s2mps13-pmic" | ||
13 | - "samsung,s2mps14-pmic" | ||
14 | - "samsung,s2mps15-pmic" | ||
15 | - "samsung,s2mpu02-pmic". | ||
12 | - reg: Specifies the I2C slave address of the pmic block. It should be 0x66. | 16 | - reg: Specifies the I2C slave address of the pmic block. It should be 0x66. |
13 | 17 | ||
14 | Optional properties: | 18 | Optional properties: |
15 | - interrupt-parent: Specifies the phandle of the interrupt controller to which | 19 | - interrupt-parent: Specifies the phandle of the interrupt controller to which |
16 | the interrupts from s2mps11 are delivered to. | 20 | the interrupts from s2mps11 are delivered to. |
17 | - interrupts: Interrupt specifiers for interrupt sources. | 21 | - interrupts: Interrupt specifiers for interrupt sources. |
22 | - samsung,s2mps11-wrstbi-ground: Indicates that WRSTBI pin of PMIC is pulled | ||
23 | down. When the system is suspended it will always go down thus triggerring | ||
24 | unwanted buck warm reset (setting buck voltages to default values). | ||
25 | - samsung,s2mps11-acokb-ground: Indicates that ACOKB pin of S2MPS11 PMIC is | ||
26 | connected to the ground so the PMIC must manually set PWRHOLD bit in CTRL1 | ||
27 | register to turn off the power. Usually the ACOKB is pulled up to VBATT so | ||
28 | when PWRHOLD pin goes low, the rising ACOKB will trigger power off. | ||
18 | 29 | ||
19 | Optional nodes: | 30 | Optional nodes: |
20 | - clocks: s2mps11, s2mps13 and s5m8767 provide three(AP/CP/BT) buffered 32.768 | 31 | - clocks: s2mps11, s2mps13, s2mps15 and s5m8767 provide three(AP/CP/BT) buffered 32.768 |
21 | KHz outputs, so to register these as clocks with common clock framework | 32 | KHz outputs, so to register these as clocks with common clock framework |
22 | instantiate a sub-node named "clocks". It uses the common clock binding | 33 | instantiate a sub-node named "clocks". It uses the common clock binding |
23 | documented in : | 34 | documented in : |
@@ -30,12 +41,13 @@ Optional nodes: | |||
30 | the clock which they consume. | 41 | the clock which they consume. |
31 | Clock ID Devices | 42 | Clock ID Devices |
32 | ---------------------------------------------------------- | 43 | ---------------------------------------------------------- |
33 | 32KhzAP 0 S2MPS11, S2MPS13, S2MPS14, S5M8767 | 44 | 32KhzAP 0 S2MPS11, S2MPS13, S2MPS14, S2MPS15, S5M8767 |
34 | 32KhzCP 1 S2MPS11, S2MPS13, S5M8767 | 45 | 32KhzCP 1 S2MPS11, S2MPS13, S2MPS15, S5M8767 |
35 | 32KhzBT 2 S2MPS11, S2MPS13, S2MPS14, S5M8767 | 46 | 32KhzBT 2 S2MPS11, S2MPS13, S2MPS14, S2MPS15, S5M8767 |
36 | 47 | ||
37 | - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk", | 48 | - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk", |
38 | "samsung,s2mps14-clk", "samsung,s5m8767-clk" | 49 | "samsung,s2mps14-clk", "samsung,s5m8767-clk" |
50 | The s2msp15 uses the same compatible as s2mps13, as both provides similar clocks. | ||
39 | 51 | ||
40 | - regulators: The regulators of s2mps11 that have to be instantiated should be | 52 | - regulators: The regulators of s2mps11 that have to be instantiated should be |
41 | included in a sub-node named 'regulators'. Regulator nodes included in this | 53 | included in a sub-node named 'regulators'. Regulator nodes included in this |
@@ -83,6 +95,7 @@ as per the datasheet of s2mps11. | |||
83 | - S2MPS11: 1 to 38 | 95 | - S2MPS11: 1 to 38 |
84 | - S2MPS13: 1 to 40 | 96 | - S2MPS13: 1 to 40 |
85 | - S2MPS14: 1 to 25 | 97 | - S2MPS14: 1 to 25 |
98 | - S2MPS15: 1 to 27 | ||
86 | - S2MPU02: 1 to 28 | 99 | - S2MPU02: 1 to 28 |
87 | - Example: LDO1, LDO2, LDO28 | 100 | - Example: LDO1, LDO2, LDO28 |
88 | - BUCKn | 101 | - BUCKn |
@@ -90,6 +103,7 @@ as per the datasheet of s2mps11. | |||
90 | - S2MPS11: 1 to 10 | 103 | - S2MPS11: 1 to 10 |
91 | - S2MPS13: 1 to 10 | 104 | - S2MPS13: 1 to 10 |
92 | - S2MPS14: 1 to 5 | 105 | - S2MPS14: 1 to 5 |
106 | - S2MPS15: 1 to 10 | ||
93 | - S2MPU02: 1 to 7 | 107 | - S2MPU02: 1 to 7 |
94 | - Example: BUCK1, BUCK2, BUCK9 | 108 | - Example: BUCK1, BUCK2, BUCK9 |
95 | 109 | ||
diff --git a/Documentation/devicetree/bindings/mfd/sky81452.txt b/Documentation/devicetree/bindings/mfd/sky81452.txt index 35181794aa24..511764acd4d5 100644 --- a/Documentation/devicetree/bindings/mfd/sky81452.txt +++ b/Documentation/devicetree/bindings/mfd/sky81452.txt | |||
@@ -6,7 +6,7 @@ Required properties: | |||
6 | 6 | ||
7 | Required child nodes: | 7 | Required child nodes: |
8 | - backlight : container node for backlight following the binding | 8 | - backlight : container node for backlight following the binding |
9 | in video/backlight/sky81452-backlight.txt | 9 | in leds/backlight/sky81452-backlight.txt |
10 | - regulator : container node for regulators following the binding | 10 | - regulator : container node for regulators following the binding |
11 | in regulator/sky81452-regulator.txt | 11 | in regulator/sky81452-regulator.txt |
12 | 12 | ||
diff --git a/Documentation/devicetree/bindings/mfd/tc3589x.txt b/Documentation/devicetree/bindings/mfd/tc3589x.txt index 37bf7f1aa70a..23fc2f21f5a4 100644 --- a/Documentation/devicetree/bindings/mfd/tc3589x.txt +++ b/Documentation/devicetree/bindings/mfd/tc3589x.txt | |||
@@ -56,6 +56,7 @@ Optional nodes: | |||
56 | bindings/input/matrix-keymap.txt | 56 | bindings/input/matrix-keymap.txt |
57 | - linux,no-autorepeat: do no enable autorepeat feature. | 57 | - linux,no-autorepeat: do no enable autorepeat feature. |
58 | - wakeup-source: use any event on keypad as wakeup event. | 58 | - wakeup-source: use any event on keypad as wakeup event. |
59 | (Legacy property supported: "linux,wakeup") | ||
59 | 60 | ||
60 | Example: | 61 | Example: |
61 | 62 | ||
diff --git a/Documentation/devicetree/bindings/misc/sram.txt b/Documentation/devicetree/bindings/misc/sram.txt index 36cbe5aea990..42ee9438b771 100644 --- a/Documentation/devicetree/bindings/misc/sram.txt +++ b/Documentation/devicetree/bindings/misc/sram.txt | |||
@@ -33,6 +33,12 @@ Optional properties in the area nodes: | |||
33 | 33 | ||
34 | - compatible : standard definition, should contain a vendor specific string | 34 | - compatible : standard definition, should contain a vendor specific string |
35 | in the form <vendor>,[<device>-]<usage> | 35 | in the form <vendor>,[<device>-]<usage> |
36 | - pool : indicates that the particular reserved SRAM area is addressable | ||
37 | and in use by another device or devices | ||
38 | - export : indicates that the reserved SRAM area may be accessed outside | ||
39 | of the kernel, e.g. by bootloader or userspace | ||
40 | - label : the name for the reserved partition, if omitted, the label | ||
41 | is taken from the node name excluding the unit address. | ||
36 | 42 | ||
37 | Example: | 43 | Example: |
38 | 44 | ||
@@ -48,4 +54,14 @@ sram: sram@5c000000 { | |||
48 | compatible = "socvendor,smp-sram"; | 54 | compatible = "socvendor,smp-sram"; |
49 | reg = <0x100 0x50>; | 55 | reg = <0x100 0x50>; |
50 | }; | 56 | }; |
57 | |||
58 | device-sram@1000 { | ||
59 | reg = <0x1000 0x1000>; | ||
60 | pool; | ||
61 | }; | ||
62 | |||
63 | exported@20000 { | ||
64 | reg = <0x20000 0x20000>; | ||
65 | export; | ||
66 | }; | ||
51 | }; | 67 | }; |
diff --git a/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt index b7943f3f9995..dedfb02c744a 100644 --- a/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt +++ b/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt | |||
@@ -22,6 +22,8 @@ Optional properties: | |||
22 | - voltage-ranges : two cells are required, first cell specifies minimum | 22 | - voltage-ranges : two cells are required, first cell specifies minimum |
23 | slot voltage (mV), second cell specifies maximum slot voltage (mV). | 23 | slot voltage (mV), second cell specifies maximum slot voltage (mV). |
24 | Several ranges could be specified. | 24 | Several ranges could be specified. |
25 | - little-endian : If the host controller is little-endian mode, specify | ||
26 | this property. The default endian mode is big-endian. | ||
25 | 27 | ||
26 | Example: | 28 | Example: |
27 | 29 | ||
diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt index 0384fc3f64e8..ed23b9bedfdc 100644 --- a/Documentation/devicetree/bindings/mmc/mmc.txt +++ b/Documentation/devicetree/bindings/mmc/mmc.txt | |||
@@ -37,6 +37,7 @@ Optional properties: | |||
37 | - sd-uhs-sdr104: SD UHS SDR104 speed is supported | 37 | - sd-uhs-sdr104: SD UHS SDR104 speed is supported |
38 | - sd-uhs-ddr50: SD UHS DDR50 speed is supported | 38 | - sd-uhs-ddr50: SD UHS DDR50 speed is supported |
39 | - cap-power-off-card: powering off the card is safe | 39 | - cap-power-off-card: powering off the card is safe |
40 | - cap-mmc-hw-reset: eMMC hardware reset is supported | ||
40 | - cap-sdio-irq: enable SDIO IRQ signalling on this interface | 41 | - cap-sdio-irq: enable SDIO IRQ signalling on this interface |
41 | - full-pwr-cycle: full power cycle of the card is supported | 42 | - full-pwr-cycle: full power cycle of the card is supported |
42 | - mmc-ddr-1_8v: eMMC high-speed DDR mode(1.8V I/O) is supported | 43 | - mmc-ddr-1_8v: eMMC high-speed DDR mode(1.8V I/O) is supported |
@@ -67,7 +68,8 @@ polarity is in effect. | |||
67 | 68 | ||
68 | Optional SDIO properties: | 69 | Optional SDIO properties: |
69 | - keep-power-in-suspend: Preserves card power during a suspend/resume cycle | 70 | - keep-power-in-suspend: Preserves card power during a suspend/resume cycle |
70 | - enable-sdio-wakeup: Enables wake up of host system on SDIO IRQ assertion | 71 | - wakeup-source: Enables wake up of host system on SDIO IRQ assertion |
72 | (Legacy property supported: "enable-sdio-wakeup") | ||
71 | 73 | ||
72 | 74 | ||
73 | MMC power sequences: | 75 | MMC power sequences: |
@@ -117,7 +119,7 @@ sdhci@ab000000 { | |||
117 | wp-gpios = <&gpio 70 0>; | 119 | wp-gpios = <&gpio 70 0>; |
118 | max-frequency = <50000000>; | 120 | max-frequency = <50000000>; |
119 | keep-power-in-suspend; | 121 | keep-power-in-suspend; |
120 | enable-sdio-wakeup; | 122 | wakeup-source; |
121 | mmc-pwrseq = <&sdhci0_pwrseq> | 123 | mmc-pwrseq = <&sdhci0_pwrseq> |
122 | } | 124 | } |
123 | 125 | ||
diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt index a1adfa495ad3..0120c7f1109c 100644 --- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt | |||
@@ -17,6 +17,11 @@ Required properties: | |||
17 | - vmmc-supply: power to the Core | 17 | - vmmc-supply: power to the Core |
18 | - vqmmc-supply: power to the IO | 18 | - vqmmc-supply: power to the IO |
19 | 19 | ||
20 | Optional properties: | ||
21 | - assigned-clocks: PLL of the source clock | ||
22 | - assigned-clock-parents: parent of source clock, used for HS400 mode to get 400Mhz source clock | ||
23 | - hs400-ds-delay: HS400 DS delay setting | ||
24 | |||
20 | Examples: | 25 | Examples: |
21 | mmc0: mmc@11230000 { | 26 | mmc0: mmc@11230000 { |
22 | compatible = "mediatek,mt8173-mmc", "mediatek,mt8135-mmc"; | 27 | compatible = "mediatek,mt8173-mmc", "mediatek,mt8135-mmc"; |
@@ -24,9 +29,13 @@ mmc0: mmc@11230000 { | |||
24 | interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_LOW>; | 29 | interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_LOW>; |
25 | vmmc-supply = <&mt6397_vemc_3v3_reg>; | 30 | vmmc-supply = <&mt6397_vemc_3v3_reg>; |
26 | vqmmc-supply = <&mt6397_vio18_reg>; | 31 | vqmmc-supply = <&mt6397_vio18_reg>; |
27 | clocks = <&pericfg CLK_PERI_MSDC30_0>, <&topckgen CLK_TOP_MSDC50_0_H_SEL>; | 32 | clocks = <&pericfg CLK_PERI_MSDC30_0>, |
33 | <&topckgen CLK_TOP_MSDC50_0_H_SEL>; | ||
28 | clock-names = "source", "hclk"; | 34 | clock-names = "source", "hclk"; |
29 | pinctrl-names = "default", "state_uhs"; | 35 | pinctrl-names = "default", "state_uhs"; |
30 | pinctrl-0 = <&mmc0_pins_default>; | 36 | pinctrl-0 = <&mmc0_pins_default>; |
31 | pinctrl-1 = <&mmc0_pins_uhs>; | 37 | pinctrl-1 = <&mmc0_pins_uhs>; |
38 | assigned-clocks = <&topckgen CLK_TOP_MSDC50_0_SEL>; | ||
39 | assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL_D2>; | ||
40 | hs400-ds-delay = <0x14015>; | ||
32 | }; | 41 | }; |
diff --git a/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt b/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt index d38942f6c5ae..cae29eb5733d 100644 --- a/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt +++ b/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt | |||
@@ -6,11 +6,12 @@ and the properties used by the MMCIF device. | |||
6 | 6 | ||
7 | Required properties: | 7 | Required properties: |
8 | 8 | ||
9 | - compatible: must contain one of the following | 9 | - compatible: should be "renesas,mmcif-<soctype>", "renesas,sh-mmcif" as a |
10 | fallback. Examples with <soctype> are: | ||
10 | - "renesas,mmcif-r8a7740" for the MMCIF found in r8a7740 SoCs | 11 | - "renesas,mmcif-r8a7740" for the MMCIF found in r8a7740 SoCs |
11 | - "renesas,mmcif-r8a7790" for the MMCIF found in r8a7790 SoCs | 12 | - "renesas,mmcif-r8a7790" for the MMCIF found in r8a7790 SoCs |
12 | - "renesas,mmcif-r8a7791" for the MMCIF found in r8a7791 SoCs | 13 | - "renesas,mmcif-r8a7791" for the MMCIF found in r8a7791 SoCs |
13 | - "renesas,sh-mmcif" for the generic MMCIF | 14 | - "renesas,mmcif-r8a7794" for the MMCIF found in r8a7794 SoCs |
14 | 15 | ||
15 | - clocks: reference to the functional clock | 16 | - clocks: reference to the functional clock |
16 | 17 | ||
diff --git a/Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.txt index c327c2d6f23d..3dc13b68fc3f 100644 --- a/Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.txt +++ b/Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.txt | |||
@@ -14,6 +14,19 @@ Required Properties: | |||
14 | before RK3288 | 14 | before RK3288 |
15 | - "rockchip,rk3288-dw-mshc": for Rockchip RK3288 | 15 | - "rockchip,rk3288-dw-mshc": for Rockchip RK3288 |
16 | 16 | ||
17 | Optional Properties: | ||
18 | * clocks: from common clock binding: if ciu_drive and ciu_sample are | ||
19 | specified in clock-names, should contain handles to these clocks. | ||
20 | |||
21 | * clock-names: Apart from the clock-names described in synopsys-dw-mshc.txt | ||
22 | two more clocks "ciu-drive" and "ciu-sample" are supported. They are used | ||
23 | to control the clock phases, "ciu-sample" is required for tuning high- | ||
24 | speed modes. | ||
25 | |||
26 | * rockchip,default-sample-phase: The default phase to set ciu_sample at | ||
27 | probing, low speeds or in case where all phases work at tuning time. | ||
28 | If not specified 0 deg will be used. | ||
29 | |||
17 | Example: | 30 | Example: |
18 | 31 | ||
19 | rkdwmmc0@12200000 { | 32 | rkdwmmc0@12200000 { |
diff --git a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt index 346c6095a615..8636f5ae97e5 100644 --- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt +++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt | |||
@@ -75,6 +75,12 @@ Optional properties: | |||
75 | * vmmc-supply: The phandle to the regulator to use for vmmc. If this is | 75 | * vmmc-supply: The phandle to the regulator to use for vmmc. If this is |
76 | specified we'll defer probe until we can find this regulator. | 76 | specified we'll defer probe until we can find this regulator. |
77 | 77 | ||
78 | * dmas: List of DMA specifiers with the controller specific format as described | ||
79 | in the generic DMA client binding. Refer to dma.txt for details. | ||
80 | |||
81 | * dma-names: request names for generic DMA client binding. Must be "rx-tx". | ||
82 | Refer to dma.txt for details. | ||
83 | |||
78 | Aliases: | 84 | Aliases: |
79 | 85 | ||
80 | - All the MSHC controller nodes should be represented in the aliases node using | 86 | - All the MSHC controller nodes should be represented in the aliases node using |
@@ -95,6 +101,23 @@ board specific portions as listed below. | |||
95 | #size-cells = <0>; | 101 | #size-cells = <0>; |
96 | }; | 102 | }; |
97 | 103 | ||
104 | [board specific internal DMA resources] | ||
105 | |||
106 | dwmmc0@12200000 { | ||
107 | clock-frequency = <400000000>; | ||
108 | clock-freq-min-max = <400000 200000000>; | ||
109 | num-slots = <1>; | ||
110 | broken-cd; | ||
111 | fifo-depth = <0x80>; | ||
112 | card-detect-delay = <200>; | ||
113 | vmmc-supply = <&buck8>; | ||
114 | bus-width = <8>; | ||
115 | cap-mmc-highspeed; | ||
116 | cap-sd-highspeed; | ||
117 | }; | ||
118 | |||
119 | [board specific generic DMA request binding] | ||
120 | |||
98 | dwmmc0@12200000 { | 121 | dwmmc0@12200000 { |
99 | clock-frequency = <400000000>; | 122 | clock-frequency = <400000000>; |
100 | clock-freq-min-max = <400000 200000000>; | 123 | clock-freq-min-max = <400000 200000000>; |
@@ -106,4 +129,6 @@ board specific portions as listed below. | |||
106 | bus-width = <8>; | 129 | bus-width = <8>; |
107 | cap-mmc-highspeed; | 130 | cap-mmc-highspeed; |
108 | cap-sd-highspeed; | 131 | cap-sd-highspeed; |
132 | dmas = <&pdma 12>; | ||
133 | dma-names = "rx-tx"; | ||
109 | }; | 134 | }; |
diff --git a/Documentation/devicetree/bindings/mtd/fsmc-nand.txt b/Documentation/devicetree/bindings/mtd/fsmc-nand.txt index 5235cbc551b0..32636eb77304 100644 --- a/Documentation/devicetree/bindings/mtd/fsmc-nand.txt +++ b/Documentation/devicetree/bindings/mtd/fsmc-nand.txt | |||
@@ -30,6 +30,12 @@ Optional properties: | |||
30 | command is asserted. Zero means one cycle, 255 means 256 | 30 | command is asserted. Zero means one cycle, 255 means 256 |
31 | cycles. | 31 | cycles. |
32 | - bank: default NAND bank to use (0-3 are valid, 0 is the default). | 32 | - bank: default NAND bank to use (0-3 are valid, 0 is the default). |
33 | - nand-ecc-mode : see nand.txt | ||
34 | - nand-ecc-strength : see nand.txt | ||
35 | - nand-ecc-step-size : see nand.txt | ||
36 | |||
37 | Can support 1-bit HW ECC (default) or if stronger correction is required, | ||
38 | software-based BCH. | ||
33 | 39 | ||
34 | Example: | 40 | Example: |
35 | 41 | ||
diff --git a/Documentation/devicetree/bindings/mtd/partition.txt b/Documentation/devicetree/bindings/mtd/partition.txt index 8e5557da1955..f1e2a02381a4 100644 --- a/Documentation/devicetree/bindings/mtd/partition.txt +++ b/Documentation/devicetree/bindings/mtd/partition.txt | |||
@@ -4,10 +4,17 @@ Partitions can be represented by sub-nodes of an mtd device. This can be used | |||
4 | on platforms which have strong conventions about which portions of a flash are | 4 | on platforms which have strong conventions about which portions of a flash are |
5 | used for what purposes, but which don't use an on-flash partition table such | 5 | used for what purposes, but which don't use an on-flash partition table such |
6 | as RedBoot. | 6 | as RedBoot. |
7 | NOTE: if the sub-node has a compatible string, then it is not a partition. | ||
8 | 7 | ||
9 | #address-cells & #size-cells must both be present in the mtd device. There are | 8 | The partition table should be a subnode of the mtd node and should be named |
10 | two valid values for both: | 9 | 'partitions'. Partitions are defined in subnodes of the partitions node. |
10 | |||
11 | For backwards compatibility partitions as direct subnodes of the mtd device are | ||
12 | supported. This use is discouraged. | ||
13 | NOTE: also for backwards compatibility, direct subnodes that have a compatible | ||
14 | string are not considered partitions, as they may be used for other bindings. | ||
15 | |||
16 | #address-cells & #size-cells must both be present in the partitions subnode of the | ||
17 | mtd device. There are two valid values for both: | ||
11 | <1>: for partitions that require a single 32-bit cell to represent their | 18 | <1>: for partitions that require a single 32-bit cell to represent their |
12 | size/address (aka the value is below 4 GiB) | 19 | size/address (aka the value is below 4 GiB) |
13 | <2>: for partitions that require two 32-bit cells to represent their | 20 | <2>: for partitions that require two 32-bit cells to represent their |
@@ -28,44 +35,50 @@ Examples: | |||
28 | 35 | ||
29 | 36 | ||
30 | flash@0 { | 37 | flash@0 { |
31 | #address-cells = <1>; | 38 | partitions { |
32 | #size-cells = <1>; | 39 | #address-cells = <1>; |
40 | #size-cells = <1>; | ||
33 | 41 | ||
34 | partition@0 { | 42 | partition@0 { |
35 | label = "u-boot"; | 43 | label = "u-boot"; |
36 | reg = <0x0000000 0x100000>; | 44 | reg = <0x0000000 0x100000>; |
37 | read-only; | 45 | read-only; |
38 | }; | 46 | }; |
39 | 47 | ||
40 | uimage@100000 { | 48 | uimage@100000 { |
41 | reg = <0x0100000 0x200000>; | 49 | reg = <0x0100000 0x200000>; |
50 | }; | ||
42 | }; | 51 | }; |
43 | }; | 52 | }; |
44 | 53 | ||
45 | flash@1 { | 54 | flash@1 { |
46 | #address-cells = <1>; | 55 | partitions { |
47 | #size-cells = <2>; | 56 | #address-cells = <1>; |
57 | #size-cells = <2>; | ||
48 | 58 | ||
49 | /* a 4 GiB partition */ | 59 | /* a 4 GiB partition */ |
50 | partition@0 { | 60 | partition@0 { |
51 | label = "filesystem"; | 61 | label = "filesystem"; |
52 | reg = <0x00000000 0x1 0x00000000>; | 62 | reg = <0x00000000 0x1 0x00000000>; |
63 | }; | ||
53 | }; | 64 | }; |
54 | }; | 65 | }; |
55 | 66 | ||
56 | flash@2 { | 67 | flash@2 { |
57 | #address-cells = <2>; | 68 | partitions { |
58 | #size-cells = <2>; | 69 | #address-cells = <2>; |
70 | #size-cells = <2>; | ||
59 | 71 | ||
60 | /* an 8 GiB partition */ | 72 | /* an 8 GiB partition */ |
61 | partition@0 { | 73 | partition@0 { |
62 | label = "filesystem #1"; | 74 | label = "filesystem #1"; |
63 | reg = <0x0 0x00000000 0x2 0x00000000>; | 75 | reg = <0x0 0x00000000 0x2 0x00000000>; |
64 | }; | 76 | }; |
65 | 77 | ||
66 | /* a 4 GiB partition */ | 78 | /* a 4 GiB partition */ |
67 | partition@200000000 { | 79 | partition@200000000 { |
68 | label = "filesystem #2"; | 80 | label = "filesystem #2"; |
69 | reg = <0x2 0x00000000 0x1 0x00000000>; | 81 | reg = <0x2 0x00000000 0x1 0x00000000>; |
82 | }; | ||
70 | }; | 83 | }; |
71 | }; | 84 | }; |
diff --git a/Documentation/devicetree/bindings/mtd/vf610-nfc.txt b/Documentation/devicetree/bindings/mtd/vf610-nfc.txt new file mode 100644 index 000000000000..c96eeb65f450 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/vf610-nfc.txt | |||
@@ -0,0 +1,59 @@ | |||
1 | Freescale's NAND flash controller (NFC) | ||
2 | |||
3 | This variant of the Freescale NAND flash controller (NFC) can be found on | ||
4 | Vybrid (vf610), MPC5125, MCF54418 and Kinetis K70. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: Should be set to "fsl,vf610-nfc". | ||
8 | - reg: address range of the NFC. | ||
9 | - interrupts: interrupt of the NFC. | ||
10 | - #address-cells: shall be set to 1. Encode the nand CS. | ||
11 | - #size-cells : shall be set to 0. | ||
12 | - assigned-clocks: main clock from the SoC, for Vybrid <&clks VF610_CLK_NFC>; | ||
13 | - assigned-clock-rates: The NAND bus timing is derived from this clock | ||
14 | rate and should not exceed maximum timing for any NAND memory chip | ||
15 | in a board stuffing. Typical NAND memory timings derived from this | ||
16 | clock are found in the SoC hardware reference manual. Furthermore, | ||
17 | there might be restrictions on maximum rates when using hardware ECC. | ||
18 | |||
19 | - #address-cells, #size-cells : Must be present if the device has sub-nodes | ||
20 | representing partitions. | ||
21 | |||
22 | Required children nodes: | ||
23 | Children nodes represent the available nand chips. Currently the driver can | ||
24 | only handle one NAND chip. | ||
25 | |||
26 | Required properties: | ||
27 | - compatible: Should be set to "fsl,vf610-nfc-cs". | ||
28 | - nand-bus-width: see nand.txt | ||
29 | - nand-ecc-mode: see nand.txt | ||
30 | |||
31 | Required properties for hardware ECC: | ||
32 | - nand-ecc-strength: supported strengths are 24 and 32 bit (see nand.txt) | ||
33 | - nand-ecc-step-size: step size equals page size, currently only 2k pages are | ||
34 | supported | ||
35 | - nand-on-flash-bbt: see nand.txt | ||
36 | |||
37 | Example: | ||
38 | |||
39 | nfc: nand@400e0000 { | ||
40 | compatible = "fsl,vf610-nfc"; | ||
41 | #address-cells = <1>; | ||
42 | #size-cells = <0>; | ||
43 | reg = <0x400e0000 0x4000>; | ||
44 | interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>; | ||
45 | clocks = <&clks VF610_CLK_NFC>; | ||
46 | clock-names = "nfc"; | ||
47 | assigned-clocks = <&clks VF610_CLK_NFC>; | ||
48 | assigned-clock-rates = <33000000>; | ||
49 | |||
50 | nand@0 { | ||
51 | compatible = "fsl,vf610-nfc-nandcs"; | ||
52 | reg = <0>; | ||
53 | nand-bus-width = <8>; | ||
54 | nand-ecc-mode = "hw"; | ||
55 | nand-ecc-strength = <32>; | ||
56 | nand-ecc-step-size = <2048>; | ||
57 | nand-on-flash-bbt; | ||
58 | }; | ||
59 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/apm-xgene-enet.txt b/Documentation/devicetree/bindings/net/apm-xgene-enet.txt index f55aa280d34f..078060a97f95 100644 --- a/Documentation/devicetree/bindings/net/apm-xgene-enet.txt +++ b/Documentation/devicetree/bindings/net/apm-xgene-enet.txt | |||
@@ -37,6 +37,14 @@ Required properties for ethernet interfaces that have external PHY: | |||
37 | 37 | ||
38 | Optional properties: | 38 | Optional properties: |
39 | - status: Should be "ok" or "disabled" for enabled/disabled. Default is "ok". | 39 | - status: Should be "ok" or "disabled" for enabled/disabled. Default is "ok". |
40 | - tx-delay: Delay value for RGMII bridge TX clock. | ||
41 | Valid values are between 0 to 7, that maps to | ||
42 | 417, 717, 1020, 1321, 1611, 1913, 2215, 2514 ps | ||
43 | Default value is 4, which corresponds to 1611 ps | ||
44 | - rx-delay: Delay value for RGMII bridge RX clock. | ||
45 | Valid values are between 0 to 7, that maps to | ||
46 | 273, 589, 899, 1222, 1480, 1806, 2147, 2464 ps | ||
47 | Default value is 2, which corresponds to 899 ps | ||
40 | 48 | ||
41 | Example: | 49 | Example: |
42 | menetclk: menetclk { | 50 | menetclk: menetclk { |
@@ -72,5 +80,7 @@ Example: | |||
72 | 80 | ||
73 | /* Board-specific peripheral configurations */ | 81 | /* Board-specific peripheral configurations */ |
74 | &menet { | 82 | &menet { |
83 | tx-delay = <4>; | ||
84 | rx-delay = <2>; | ||
75 | status = "ok"; | 85 | status = "ok"; |
76 | }; | 86 | }; |
diff --git a/Documentation/devicetree/bindings/net/brcm,iproc-mdio.txt b/Documentation/devicetree/bindings/net/brcm,iproc-mdio.txt new file mode 100644 index 000000000000..8ba9ed11d716 --- /dev/null +++ b/Documentation/devicetree/bindings/net/brcm,iproc-mdio.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | * Broadcom iProc MDIO bus controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "brcm,iproc-mdio" | ||
5 | - reg: address and length of the register set for the MDIO interface | ||
6 | - #size-cells: must be 1 | ||
7 | - #address-cells: must be 0 | ||
8 | |||
9 | Child nodes of this MDIO bus controller node are standard Ethernet PHY device | ||
10 | nodes as described in Documentation/devicetree/bindings/net/phy.txt | ||
11 | |||
12 | Example: | ||
13 | |||
14 | mdio@18002000 { | ||
15 | compatible = "brcm,iproc-mdio"; | ||
16 | reg = <0x18002000 0x8>; | ||
17 | #size-cells = <1>; | ||
18 | #address-cells = <0>; | ||
19 | |||
20 | enet-gphy@0 { | ||
21 | reg = <0>; | ||
22 | }; | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/can/sun4i_can.txt b/Documentation/devicetree/bindings/net/can/sun4i_can.txt new file mode 100644 index 000000000000..84ed1909df76 --- /dev/null +++ b/Documentation/devicetree/bindings/net/can/sun4i_can.txt | |||
@@ -0,0 +1,36 @@ | |||
1 | Allwinner A10/A20 CAN controller Device Tree Bindings | ||
2 | ----------------------------------------------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible: "allwinner,sun4i-a10-can" | ||
6 | - reg: physical base address and size of the Allwinner A10/A20 CAN register map. | ||
7 | - interrupts: interrupt specifier for the sole interrupt. | ||
8 | - clock: phandle and clock specifier. | ||
9 | |||
10 | Example | ||
11 | ------- | ||
12 | |||
13 | SoC common .dtsi file: | ||
14 | |||
15 | can0_pins_a: can0@0 { | ||
16 | allwinner,pins = "PH20","PH21"; | ||
17 | allwinner,function = "can"; | ||
18 | allwinner,drive = <0>; | ||
19 | allwinner,pull = <0>; | ||
20 | }; | ||
21 | ... | ||
22 | can0: can@01c2bc00 { | ||
23 | compatible = "allwinner,sun4i-a10-can"; | ||
24 | reg = <0x01c2bc00 0x400>; | ||
25 | interrupts = <0 26 4>; | ||
26 | clocks = <&apb1_gates 4>; | ||
27 | status = "disabled"; | ||
28 | }; | ||
29 | |||
30 | Board specific .dts file: | ||
31 | |||
32 | can0: can@01c2bc00 { | ||
33 | pinctrl-names = "default"; | ||
34 | pinctrl-0 = <&can0_pins_a>; | ||
35 | status = "okay"; | ||
36 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/cpsw.txt b/Documentation/devicetree/bindings/net/cpsw.txt index a9df21aaa154..9853f8e70966 100644 --- a/Documentation/devicetree/bindings/net/cpsw.txt +++ b/Documentation/devicetree/bindings/net/cpsw.txt | |||
@@ -30,6 +30,13 @@ Optional properties: | |||
30 | - dual_emac : Specifies Switch to act as Dual EMAC | 30 | - dual_emac : Specifies Switch to act as Dual EMAC |
31 | - syscon : Phandle to the system control device node, which is | 31 | - syscon : Phandle to the system control device node, which is |
32 | the control module device of the am33x | 32 | the control module device of the am33x |
33 | - mode-gpios : Should be added if one/multiple gpio lines are | ||
34 | required to be driven so that cpsw data lines | ||
35 | can be connected to the phy via selective mux. | ||
36 | For example in dra72x-evm, pcf gpio has to be | ||
37 | driven low so that cpsw slave 0 and phy data | ||
38 | lines are connected via mux. | ||
39 | |||
33 | 40 | ||
34 | Slave Properties: | 41 | Slave Properties: |
35 | Required properties: | 42 | Required properties: |
@@ -39,6 +46,12 @@ Required properties: | |||
39 | Optional properties: | 46 | Optional properties: |
40 | - dual_emac_res_vlan : Specifies VID to be used to segregate the ports | 47 | - dual_emac_res_vlan : Specifies VID to be used to segregate the ports |
41 | - mac-address : See ethernet.txt file in the same directory | 48 | - mac-address : See ethernet.txt file in the same directory |
49 | - phy-handle : See ethernet.txt file in the same directory | ||
50 | |||
51 | Slave sub-nodes: | ||
52 | - fixed-link : See fixed-link.txt file in the same directory | ||
53 | Either the properties phy_id and phy-mode, | ||
54 | or the sub-node fixed-link can be specified | ||
42 | 55 | ||
43 | Note: "ti,hwmods" field is used to fetch the base address and irq | 56 | Note: "ti,hwmods" field is used to fetch the base address and irq |
44 | resources from TI, omap hwmod data base during device registration. | 57 | resources from TI, omap hwmod data base during device registration. |
diff --git a/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt b/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt index 1e97532a0b79..db74f0dc290c 100644 --- a/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt +++ b/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt | |||
@@ -57,6 +57,10 @@ Properties: | |||
57 | "rgmii-id", as all other connection types are detected by hardware. | 57 | "rgmii-id", as all other connection types are detected by hardware. |
58 | - fsl,magic-packet : If present, indicates that the hardware supports | 58 | - fsl,magic-packet : If present, indicates that the hardware supports |
59 | waking up via magic packet. | 59 | waking up via magic packet. |
60 | - fsl,wake-on-filer : If present, indicates that the hardware supports | ||
61 | waking up by Filer General Purpose Interrupt (FGPI) asserted on the | ||
62 | Rx int line. This is an advanced power management capability allowing | ||
63 | certain packet types (user) defined by filer rules to wake up the system. | ||
60 | - bd-stash : If present, indicates that the hardware supports stashing | 64 | - bd-stash : If present, indicates that the hardware supports stashing |
61 | buffer descriptors in the L2. | 65 | buffer descriptors in the L2. |
62 | - rx-stash-len : Denotes the number of bytes of a received buffer to stash | 66 | - rx-stash-len : Denotes the number of bytes of a received buffer to stash |
diff --git a/Documentation/devicetree/bindings/net/hisilicon-hip04-net.txt b/Documentation/devicetree/bindings/net/hisilicon-hip04-net.txt index 988fc694b663..d1df8a00e1f3 100644 --- a/Documentation/devicetree/bindings/net/hisilicon-hip04-net.txt +++ b/Documentation/devicetree/bindings/net/hisilicon-hip04-net.txt | |||
@@ -32,13 +32,13 @@ Required properties: | |||
32 | 32 | ||
33 | Required properties: | 33 | Required properties: |
34 | 34 | ||
35 | - compatible: should be "hisilicon,hip04-mdio". | 35 | - compatible: should be "hisilicon,mdio". |
36 | - Inherits from MDIO bus node binding [2] | 36 | - Inherits from MDIO bus node binding [2] |
37 | [2] Documentation/devicetree/bindings/net/phy.txt | 37 | [2] Documentation/devicetree/bindings/net/phy.txt |
38 | 38 | ||
39 | Example: | 39 | Example: |
40 | mdio { | 40 | mdio { |
41 | compatible = "hisilicon,hip04-mdio"; | 41 | compatible = "hisilicon,mdio"; |
42 | reg = <0x28f1000 0x1000>; | 42 | reg = <0x28f1000 0x1000>; |
43 | #address-cells = <1>; | 43 | #address-cells = <1>; |
44 | #size-cells = <0>; | 44 | #size-cells = <0>; |
diff --git a/Documentation/devicetree/bindings/net/hisilicon-hns-dsaf.txt b/Documentation/devicetree/bindings/net/hisilicon-hns-dsaf.txt new file mode 100644 index 000000000000..80411b2f0490 --- /dev/null +++ b/Documentation/devicetree/bindings/net/hisilicon-hns-dsaf.txt | |||
@@ -0,0 +1,49 @@ | |||
1 | Hisilicon DSA Fabric device controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "hisilicon,hns-dsaf-v1" or "hisilicon,hns-dsaf-v2". | ||
5 | "hisilicon,hns-dsaf-v1" is for hip05. | ||
6 | "hisilicon,hns-dsaf-v2" is for Hi1610 and Hi1612. | ||
7 | - dsa-name: dsa fabric name who provide this interface. | ||
8 | should be "dsafX", X is the dsaf id. | ||
9 | - mode: dsa fabric mode string. only support one of dsaf modes like these: | ||
10 | "2port-64vf", | ||
11 | "6port-16rss", | ||
12 | "6port-16vf". | ||
13 | - interrupt-parent: the interrupt parent of this device. | ||
14 | - interrupts: should contain the DSA Fabric and rcb interrupt. | ||
15 | - reg: specifies base physical address(es) and size of the device registers. | ||
16 | The first region is external interface control register base and size. | ||
17 | The second region is SerDes base register and size. | ||
18 | The third region is the PPE register base and size. | ||
19 | The fourth region is dsa fabric base register and size. | ||
20 | The fifth region is cpld base register and size, it is not required if do not use cpld. | ||
21 | - phy-handle: phy handle of physicl port, 0 if not any phy device. see ethernet.txt [1]. | ||
22 | - buf-size: rx buffer size, should be 16-1024. | ||
23 | - desc-num: number of description in TX and RX queue, should be 512, 1024, 2048 or 4096. | ||
24 | |||
25 | [1] Documentation/devicetree/bindings/net/phy.txt | ||
26 | |||
27 | Example: | ||
28 | |||
29 | dsa: dsa@c7000000 { | ||
30 | compatible = "hisilicon,hns-dsaf-v1"; | ||
31 | dsa_name = "dsaf0"; | ||
32 | mode = "6port-16rss"; | ||
33 | interrupt-parent = <&mbigen_dsa>; | ||
34 | reg = <0x0 0xC0000000 0x0 0x420000 | ||
35 | 0x0 0xC2000000 0x0 0x300000 | ||
36 | 0x0 0xc5000000 0x0 0x890000 | ||
37 | 0x0 0xc7000000 0x0 0x60000>; | ||
38 | phy-handle = <0 0 0 0 &soc0_phy4 &soc0_phy5 0 0>; | ||
39 | interrupts = <131 4>,<132 4>, <133 4>,<134 4>, | ||
40 | <135 4>,<136 4>, <137 4>,<138 4>, | ||
41 | <139 4>,<140 4>, <141 4>,<142 4>, | ||
42 | <143 4>,<144 4>, <145 4>,<146 4>, | ||
43 | <147 4>,<148 4>, <384 1>,<385 1>, | ||
44 | <386 1>,<387 1>, <388 1>,<389 1>, | ||
45 | <390 1>,<391 1>, | ||
46 | buf-size = <4096>; | ||
47 | desc-num = <1024>; | ||
48 | dma-coherent; | ||
49 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/hisilicon-hns-mdio.txt b/Documentation/devicetree/bindings/net/hisilicon-hns-mdio.txt new file mode 100644 index 000000000000..9c23fdf25018 --- /dev/null +++ b/Documentation/devicetree/bindings/net/hisilicon-hns-mdio.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | Hisilicon MDIO bus controller | ||
2 | |||
3 | Properties: | ||
4 | - compatible: "hisilicon,mdio","hisilicon,hns-mdio". | ||
5 | - reg: The base address of the MDIO bus controller register bank. | ||
6 | - #address-cells: Must be <1>. | ||
7 | - #size-cells: Must be <0>. MDIO addresses have no size component. | ||
8 | |||
9 | Typically an MDIO bus might have several children. | ||
10 | |||
11 | Example: | ||
12 | mdio@803c0000 { | ||
13 | #address-cells = <1>; | ||
14 | #size-cells = <0>; | ||
15 | compatible = "hisilicon,hns-mdio","hisilicon,mdio"; | ||
16 | reg = <0x0 0x803c0000 0x0 0x10000>; | ||
17 | |||
18 | ethernet-phy@0 { | ||
19 | ... | ||
20 | reg = <0>; | ||
21 | }; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/hisilicon-hns-nic.txt b/Documentation/devicetree/bindings/net/hisilicon-hns-nic.txt new file mode 100644 index 000000000000..41d19be7011e --- /dev/null +++ b/Documentation/devicetree/bindings/net/hisilicon-hns-nic.txt | |||
@@ -0,0 +1,47 @@ | |||
1 | Hisilicon Network Subsystem NIC controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "hisilicon,hns-nic-v1" or "hisilicon,hns-nic-v2". | ||
5 | "hisilicon,hns-nic-v1" is for hip05. | ||
6 | "hisilicon,hns-nic-v2" is for Hi1610 and Hi1612. | ||
7 | - ae-name: accelerator name who provides this interface, | ||
8 | is simply a name referring to the name of name in the accelerator node. | ||
9 | - port-id: is the index of port provided by DSAF (the accelerator). DSAF can | ||
10 | connect to 8 PHYs. Port 0 to 1 are both used for adminstration purpose. They | ||
11 | are called debug ports. | ||
12 | |||
13 | The remaining 6 PHYs are taken according to the mode of DSAF. | ||
14 | |||
15 | In NIC mode of DSAF, all 6 PHYs are taken as ethernet ports to the CPU. The | ||
16 | port-id can be 2 to 7. Here is the diagram: | ||
17 | +-----+---------------+ | ||
18 | | CPU | | ||
19 | +-+-+-+---+-+-+-+-+-+-+ | ||
20 | | | | | | | | | | ||
21 | debug service | ||
22 | port port | ||
23 | (0,1) (2-7) | ||
24 | |||
25 | In Switch mode of DSAF, all 6 PHYs are taken as physical ports connect to a | ||
26 | LAN Switch while the CPU side assume itself have one single NIC connect to | ||
27 | this switch. In this case, the port-id will be 2 only. | ||
28 | +-----+---------------+ | ||
29 | | CPU | | ||
30 | +-+-+-+---+-+-+-+-+-+-+ | ||
31 | | | service| port(2) | ||
32 | debug +------------+ | ||
33 | port | switch | | ||
34 | (0,1) +-+-+-+-+-+-++ | ||
35 | | | | | | | | ||
36 | external port | ||
37 | |||
38 | - local-mac-address: mac addr of the ethernet interface | ||
39 | |||
40 | Example: | ||
41 | |||
42 | ethernet@0{ | ||
43 | compatible = "hisilicon,hns-nic-v1"; | ||
44 | ae-name = "dsaf0"; | ||
45 | port-id = <0>; | ||
46 | local-mac-address = [a2 14 e4 4b 56 76]; | ||
47 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/ieee802154/mrf24j40.txt b/Documentation/devicetree/bindings/net/ieee802154/mrf24j40.txt new file mode 100644 index 000000000000..a4ed2efb5b73 --- /dev/null +++ b/Documentation/devicetree/bindings/net/ieee802154/mrf24j40.txt | |||
@@ -0,0 +1,20 @@ | |||
1 | * MRF24J40 IEEE 802.15.4 * | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "microchip,mrf24j40", "microchip,mrf24j40ma", | ||
5 | or "microchip,mrf24j40mc" depends on your transceiver | ||
6 | board | ||
7 | - spi-max-frequency: maximal bus speed, should be set something under or equal | ||
8 | 10000000 | ||
9 | - reg: the chipselect index | ||
10 | - interrupts: the interrupt generated by the device. | ||
11 | |||
12 | Example: | ||
13 | |||
14 | mrf24j40ma@0 { | ||
15 | compatible = "microchip,mrf24j40ma"; | ||
16 | spi-max-frequency = <8500000>; | ||
17 | reg = <0>; | ||
18 | interrupts = <19 8>; | ||
19 | interrupt-parent = <&gpio3>; | ||
20 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/maxim,ds26522.txt b/Documentation/devicetree/bindings/net/maxim,ds26522.txt new file mode 100644 index 000000000000..ee8bb725f245 --- /dev/null +++ b/Documentation/devicetree/bindings/net/maxim,ds26522.txt | |||
@@ -0,0 +1,13 @@ | |||
1 | * Maxim (Dallas) DS26522 Dual T1/E1/J1 Transceiver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should contain "maxim,ds26522". | ||
5 | - reg: SPI CS. | ||
6 | - spi-max-frequency: SPI clock. | ||
7 | |||
8 | Example: | ||
9 | slic@1 { | ||
10 | compatible = "maxim,ds26522"; | ||
11 | reg = <1>; | ||
12 | spi-max-frequency = <2000000>; /* input clock */ | ||
13 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/nfc/nfcmrvl.txt b/Documentation/devicetree/bindings/net/nfc/nfcmrvl.txt index 7c4a0cc370cf..76df9173825a 100644 --- a/Documentation/devicetree/bindings/net/nfc/nfcmrvl.txt +++ b/Documentation/devicetree/bindings/net/nfc/nfcmrvl.txt | |||
@@ -1,7 +1,10 @@ | |||
1 | * Marvell International Ltd. NCI NFC Controller | 1 | * Marvell International Ltd. NCI NFC Controller |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: Should be "mrvl,nfc-uart". | 4 | - compatible: Should be: |
5 | - "marvell,nfc-uart" or "mrvl,nfc-uart" for UART devices | ||
6 | - "marvell,nfc-i2c" for I2C devices | ||
7 | - "marvell,nfc-spi" for SPI devices | ||
5 | 8 | ||
6 | Optional SoC specific properties: | 9 | Optional SoC specific properties: |
7 | - pinctrl-names: Contains only one value - "default". | 10 | - pinctrl-names: Contains only one value - "default". |
@@ -13,13 +16,19 @@ Optional UART-based chip specific properties: | |||
13 | - flow-control: Specifies that the chip is using RTS/CTS. | 16 | - flow-control: Specifies that the chip is using RTS/CTS. |
14 | - break-control: Specifies that the chip needs specific break management. | 17 | - break-control: Specifies that the chip needs specific break management. |
15 | 18 | ||
19 | Optional I2C-based chip specific properties: | ||
20 | - i2c-int-falling: Specifies that the chip read event shall be trigged on | ||
21 | falling edge. | ||
22 | - i2c-int-rising: Specifies that the chip read event shall be trigged on | ||
23 | rising edge. | ||
24 | |||
16 | Example (for ARM-based BeagleBoard Black with 88W8887 on UART5): | 25 | Example (for ARM-based BeagleBoard Black with 88W8887 on UART5): |
17 | 26 | ||
18 | &uart5 { | 27 | &uart5 { |
19 | status = "okay"; | 28 | status = "okay"; |
20 | 29 | ||
21 | nfcmrvluart: nfcmrvluart@5 { | 30 | nfcmrvluart: nfcmrvluart@5 { |
22 | compatible = "mrvl,nfc-uart"; | 31 | compatible = "marvell,nfc-uart"; |
23 | 32 | ||
24 | reset-n-io = <&gpio3 16 0>; | 33 | reset-n-io = <&gpio3 16 0>; |
25 | 34 | ||
@@ -27,3 +36,51 @@ Example (for ARM-based BeagleBoard Black with 88W8887 on UART5): | |||
27 | flow-control; | 36 | flow-control; |
28 | } | 37 | } |
29 | }; | 38 | }; |
39 | |||
40 | |||
41 | Example (for ARM-based BeagleBoard Black with 88W8887 on I2C1): | ||
42 | |||
43 | &i2c1 { | ||
44 | status = "okay"; | ||
45 | clock-frequency = <400000>; | ||
46 | |||
47 | nfcmrvli2c0: i2c@1 { | ||
48 | compatible = "marvell,nfc-i2c"; | ||
49 | |||
50 | reg = <0x8>; | ||
51 | |||
52 | /* I2C INT configuration */ | ||
53 | interrupt-parent = <&gpio3>; | ||
54 | interrupts = <21 0>; | ||
55 | |||
56 | /* I2C INT trigger configuration */ | ||
57 | i2c-int-rising; | ||
58 | |||
59 | /* Reset IO */ | ||
60 | reset-n-io = <&gpio3 19 0>; | ||
61 | }; | ||
62 | }; | ||
63 | |||
64 | |||
65 | Example (for ARM-based BeagleBoard Black on SPI0): | ||
66 | |||
67 | &spi0 { | ||
68 | |||
69 | mrvlnfcspi0: spi@0 { | ||
70 | compatible = "marvell,nfc-spi"; | ||
71 | |||
72 | reg = <0>; | ||
73 | |||
74 | /* SPI Bus configuration */ | ||
75 | spi-max-frequency = <3000000>; | ||
76 | spi-cpha; | ||
77 | spi-cpol; | ||
78 | |||
79 | /* SPI INT configuration */ | ||
80 | interrupt-parent = <&gpio1>; | ||
81 | interrupts = <17 0>; | ||
82 | |||
83 | /* Reset IO */ | ||
84 | reset-n-io = <&gpio3 19 0>; | ||
85 | }; | ||
86 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/nfc/st-nci-i2c.txt b/Documentation/devicetree/bindings/net/nfc/st-nci-i2c.txt index d707588ed734..263732e8879f 100644 --- a/Documentation/devicetree/bindings/net/nfc/st-nci-i2c.txt +++ b/Documentation/devicetree/bindings/net/nfc/st-nci-i2c.txt | |||
@@ -11,6 +11,10 @@ Required properties: | |||
11 | Optional SoC Specific Properties: | 11 | Optional SoC Specific Properties: |
12 | - pinctrl-names: Contains only one value - "default". | 12 | - pinctrl-names: Contains only one value - "default". |
13 | - pintctrl-0: Specifies the pin control groups used for this controller. | 13 | - pintctrl-0: Specifies the pin control groups used for this controller. |
14 | - ese-present: Specifies that an ese is physically connected to the nfc | ||
15 | controller. | ||
16 | - uicc-present: Specifies that the uicc swp signal can be physically | ||
17 | connected to the nfc controller. | ||
14 | 18 | ||
15 | Example (for ARM-based BeagleBoard xM with ST21NFCB on I2C2): | 19 | Example (for ARM-based BeagleBoard xM with ST21NFCB on I2C2): |
16 | 20 | ||
@@ -29,5 +33,8 @@ Example (for ARM-based BeagleBoard xM with ST21NFCB on I2C2): | |||
29 | interrupts = <2 IRQ_TYPE_LEVEL_HIGH>; | 33 | interrupts = <2 IRQ_TYPE_LEVEL_HIGH>; |
30 | 34 | ||
31 | reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>; | 35 | reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>; |
36 | |||
37 | ese-present; | ||
38 | uicc-present; | ||
32 | }; | 39 | }; |
33 | }; | 40 | }; |
diff --git a/Documentation/devicetree/bindings/net/nfc/st-nci-spi.txt b/Documentation/devicetree/bindings/net/nfc/st-nci-spi.txt index 525681b6dc39..711ca85a363d 100644 --- a/Documentation/devicetree/bindings/net/nfc/st-nci-spi.txt +++ b/Documentation/devicetree/bindings/net/nfc/st-nci-spi.txt | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: Should be "st,st21nfcb-spi" | 4 | - compatible: Should be "st,st21nfcb-spi" |
5 | - spi-max-frequency: Maximum SPI frequency (<= 10000000). | 5 | - spi-max-frequency: Maximum SPI frequency (<= 4000000). |
6 | - interrupt-parent: phandle for the interrupt gpio controller | 6 | - interrupt-parent: phandle for the interrupt gpio controller |
7 | - interrupts: GPIO interrupt to which the chip is connected | 7 | - interrupts: GPIO interrupt to which the chip is connected |
8 | - reset-gpios: Output GPIO pin used to reset the ST21NFCB | 8 | - reset-gpios: Output GPIO pin used to reset the ST21NFCB |
@@ -10,6 +10,10 @@ Required properties: | |||
10 | Optional SoC Specific Properties: | 10 | Optional SoC Specific Properties: |
11 | - pinctrl-names: Contains only one value - "default". | 11 | - pinctrl-names: Contains only one value - "default". |
12 | - pintctrl-0: Specifies the pin control groups used for this controller. | 12 | - pintctrl-0: Specifies the pin control groups used for this controller. |
13 | - ese-present: Specifies that an ese is physically connected to the nfc | ||
14 | controller. | ||
15 | - uicc-present: Specifies that the uicc swp signal can be physically | ||
16 | connected to the nfc controller. | ||
13 | 17 | ||
14 | Example (for ARM-based BeagleBoard xM with ST21NFCB on SPI4): | 18 | Example (for ARM-based BeagleBoard xM with ST21NFCB on SPI4): |
15 | 19 | ||
@@ -27,5 +31,8 @@ Example (for ARM-based BeagleBoard xM with ST21NFCB on SPI4): | |||
27 | interrupts = <2 IRQ_TYPE_EDGE_RISING>; | 31 | interrupts = <2 IRQ_TYPE_EDGE_RISING>; |
28 | 32 | ||
29 | reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>; | 33 | reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>; |
34 | |||
35 | ese-present; | ||
36 | uicc-present; | ||
30 | }; | 37 | }; |
31 | }; | 38 | }; |
diff --git a/Documentation/devicetree/bindings/net/renesas,ravb.txt b/Documentation/devicetree/bindings/net/renesas,ravb.txt index 1fd8831437bf..b486f3f5f6a3 100644 --- a/Documentation/devicetree/bindings/net/renesas,ravb.txt +++ b/Documentation/devicetree/bindings/net/renesas,ravb.txt | |||
@@ -6,8 +6,12 @@ interface contains. | |||
6 | Required properties: | 6 | Required properties: |
7 | - compatible: "renesas,etheravb-r8a7790" if the device is a part of R8A7790 SoC. | 7 | - compatible: "renesas,etheravb-r8a7790" if the device is a part of R8A7790 SoC. |
8 | "renesas,etheravb-r8a7794" if the device is a part of R8A7794 SoC. | 8 | "renesas,etheravb-r8a7794" if the device is a part of R8A7794 SoC. |
9 | "renesas,etheravb-r8a7795" if the device is a part of R8A7795 SoC. | ||
9 | - reg: offset and length of (1) the register block and (2) the stream buffer. | 10 | - reg: offset and length of (1) the register block and (2) the stream buffer. |
10 | - interrupts: interrupt specifier for the sole interrupt. | 11 | - interrupts: A list of interrupt-specifiers, one for each entry in |
12 | interrupt-names. | ||
13 | If interrupt-names is not present, an interrupt specifier | ||
14 | for a single muxed interrupt. | ||
11 | - phy-mode: see ethernet.txt file in the same directory. | 15 | - phy-mode: see ethernet.txt file in the same directory. |
12 | - phy-handle: see ethernet.txt file in the same directory. | 16 | - phy-handle: see ethernet.txt file in the same directory. |
13 | - #address-cells: number of address cells for the MDIO bus, must be equal to 1. | 17 | - #address-cells: number of address cells for the MDIO bus, must be equal to 1. |
@@ -18,6 +22,12 @@ Required properties: | |||
18 | Optional properties: | 22 | Optional properties: |
19 | - interrupt-parent: the phandle for the interrupt controller that services | 23 | - interrupt-parent: the phandle for the interrupt controller that services |
20 | interrupts for this device. | 24 | interrupts for this device. |
25 | - interrupt-names: A list of interrupt names. | ||
26 | For the R8A7795 SoC this property is mandatory; | ||
27 | it should include one entry per channel, named "ch%u", | ||
28 | where %u is the channel number ranging from 0 to 24. | ||
29 | For other SoCs this property is optional; if present | ||
30 | it should contain "mux" for a single muxed interrupt. | ||
21 | - pinctrl-names: pin configuration state name ("default"). | 31 | - pinctrl-names: pin configuration state name ("default"). |
22 | - renesas,no-ether-link: boolean, specify when a board does not provide a proper | 32 | - renesas,no-ether-link: boolean, specify when a board does not provide a proper |
23 | AVB_LINK signal. | 33 | AVB_LINK signal. |
@@ -27,13 +37,46 @@ Optional properties: | |||
27 | Example: | 37 | Example: |
28 | 38 | ||
29 | ethernet@e6800000 { | 39 | ethernet@e6800000 { |
30 | compatible = "renesas,etheravb-r8a7790"; | 40 | compatible = "renesas,etheravb-r8a7795"; |
31 | reg = <0 0xe6800000 0 0x800>, <0 0xee0e8000 0 0x4000>; | 41 | reg = <0 0xe6800000 0 0x800>, <0 0xe6a00000 0 0x10000>; |
32 | interrupt-parent = <&gic>; | 42 | interrupt-parent = <&gic>; |
33 | interrupts = <0 163 IRQ_TYPE_LEVEL_HIGH>; | 43 | interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>, |
34 | clocks = <&mstp8_clks R8A7790_CLK_ETHERAVB>; | 44 | <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>, |
35 | phy-mode = "rmii"; | 45 | <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>, |
46 | <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, | ||
47 | <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>, | ||
48 | <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>, | ||
49 | <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>, | ||
50 | <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>, | ||
51 | <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>, | ||
52 | <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>, | ||
53 | <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>, | ||
54 | <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>, | ||
55 | <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>, | ||
56 | <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>, | ||
57 | <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>, | ||
58 | <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>, | ||
59 | <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>, | ||
60 | <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>, | ||
61 | <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, | ||
62 | <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>, | ||
63 | <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>, | ||
64 | <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>, | ||
65 | <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>, | ||
66 | <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>, | ||
67 | <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>; | ||
68 | interrupt-names = "ch0", "ch1", "ch2", "ch3", | ||
69 | "ch4", "ch5", "ch6", "ch7", | ||
70 | "ch8", "ch9", "ch10", "ch11", | ||
71 | "ch12", "ch13", "ch14", "ch15", | ||
72 | "ch16", "ch17", "ch18", "ch19", | ||
73 | "ch20", "ch21", "ch22", "ch23", | ||
74 | "ch24"; | ||
75 | clocks = <&mstp8_clks R8A7795_CLK_ETHERAVB>; | ||
76 | power-domains = <&cpg_clocks>; | ||
77 | phy-mode = "rgmii-id"; | ||
36 | phy-handle = <&phy0>; | 78 | phy-handle = <&phy0>; |
79 | |||
37 | pinctrl-0 = <ðer_pins>; | 80 | pinctrl-0 = <ðer_pins>; |
38 | pinctrl-names = "default"; | 81 | pinctrl-names = "default"; |
39 | renesas,no-ether-link; | 82 | renesas,no-ether-link; |
@@ -41,8 +84,20 @@ Example: | |||
41 | #size-cells = <0>; | 84 | #size-cells = <0>; |
42 | 85 | ||
43 | phy0: ethernet-phy@0 { | 86 | phy0: ethernet-phy@0 { |
87 | rxc-skew-ps = <900>; | ||
88 | rxdv-skew-ps = <0>; | ||
89 | rxd0-skew-ps = <0>; | ||
90 | rxd1-skew-ps = <0>; | ||
91 | rxd2-skew-ps = <0>; | ||
92 | rxd3-skew-ps = <0>; | ||
93 | txc-skew-ps = <900>; | ||
94 | txen-skew-ps = <0>; | ||
95 | txd0-skew-ps = <0>; | ||
96 | txd1-skew-ps = <0>; | ||
97 | txd2-skew-ps = <0>; | ||
98 | txd3-skew-ps = <0>; | ||
44 | reg = <0>; | 99 | reg = <0>; |
45 | interrupt-parent = <&gpio2>; | 100 | interrupt-parent = <&gpio2>; |
46 | interrupts = <15 IRQ_TYPE_LEVEL_LOW>; | 101 | interrupts = <11 IRQ_TYPE_LEVEL_LOW>; |
47 | }; | 102 | }; |
48 | }; | 103 | }; |
diff --git a/Documentation/devicetree/bindings/net/smsc-lan87xx.txt b/Documentation/devicetree/bindings/net/smsc-lan87xx.txt new file mode 100644 index 000000000000..974edd5c85cc --- /dev/null +++ b/Documentation/devicetree/bindings/net/smsc-lan87xx.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | SMSC LAN87xx Ethernet PHY | ||
2 | |||
3 | Some boards require special tuning values. Configure them | ||
4 | through an Ethernet OF device node. | ||
5 | |||
6 | Optional properties: | ||
7 | |||
8 | - smsc,disable-energy-detect: | ||
9 | If set, do not enable energy detect mode for the SMSC phy. | ||
10 | default: enable energy detect mode | ||
11 | |||
12 | Examples: | ||
13 | smsc phy with disabled energy detect mode on an am335x based board. | ||
14 | &davinci_mdio { | ||
15 | pinctrl-names = "default", "sleep"; | ||
16 | pinctrl-0 = <&davinci_mdio_default>; | ||
17 | pinctrl-1 = <&davinci_mdio_sleep>; | ||
18 | status = "okay"; | ||
19 | |||
20 | ethernetphy0: ethernet-phy@0 { | ||
21 | reg = <0>; | ||
22 | smsc,disable-energy-detect; | ||
23 | }; | ||
24 | }; | ||
diff --git a/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt b/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt new file mode 100644 index 000000000000..383d5889e95a --- /dev/null +++ b/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt | |||
@@ -0,0 +1,20 @@ | |||
1 | Freescale i.MX6 On-Chip OTP Controller (OCOTP) device tree bindings | ||
2 | |||
3 | This binding represents the on-chip eFuse OTP controller found on | ||
4 | i.MX6Q/D, i.MX6DL/S, i.MX6SL, and i.MX6SX SoCs. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: should be one of | ||
8 | "fsl,imx6q-ocotp" (i.MX6Q/D/DL/S), | ||
9 | "fsl,imx6sl-ocotp" (i.MX6SL), or | ||
10 | "fsl,imx6sx-ocotp" (i.MX6SX), followed by "syscon". | ||
11 | - reg: Should contain the register base and length. | ||
12 | - clocks: Should contain a phandle pointing to the gated peripheral clock. | ||
13 | |||
14 | Example: | ||
15 | |||
16 | ocotp: ocotp@021bc000 { | ||
17 | compatible = "fsl,imx6q-ocotp", "syscon"; | ||
18 | reg = <0x021bc000 0x4000>; | ||
19 | clocks = <&clks IMX6QDL_CLK_IIM>; | ||
20 | }; | ||
diff --git a/Documentation/devicetree/bindings/nvmem/mxs-ocotp.txt b/Documentation/devicetree/bindings/nvmem/mxs-ocotp.txt new file mode 100644 index 000000000000..daebce9e6b07 --- /dev/null +++ b/Documentation/devicetree/bindings/nvmem/mxs-ocotp.txt | |||
@@ -0,0 +1,25 @@ | |||
1 | On-Chip OTP Memory for Freescale i.MX23/i.MX28 | ||
2 | |||
3 | Required properties : | ||
4 | - compatible : | ||
5 | - "fsl,imx23-ocotp" for i.MX23 | ||
6 | - "fsl,imx28-ocotp" for i.MX28 | ||
7 | - #address-cells : Should be 1 | ||
8 | - #size-cells : Should be 1 | ||
9 | - reg : Address and length of OTP controller registers | ||
10 | - clocks : Should contain a reference to the hbus clock | ||
11 | |||
12 | = Data cells = | ||
13 | Are child nodes of mxs-ocotp, bindings of which as described in | ||
14 | bindings/nvmem/nvmem.txt | ||
15 | |||
16 | Example for i.MX28: | ||
17 | |||
18 | ocotp: ocotp@8002c000 { | ||
19 | compatible = "fsl,imx28-ocotp", "fsl,ocotp"; | ||
20 | #address-cells = <1>; | ||
21 | #size-cells = <1>; | ||
22 | reg = <0x8002c000 0x2000>; | ||
23 | clocks = <&clks 25>; | ||
24 | status = "okay"; | ||
25 | }; | ||
diff --git a/Documentation/devicetree/bindings/nvmem/rockchip-efuse.txt b/Documentation/devicetree/bindings/nvmem/rockchip-efuse.txt new file mode 100644 index 000000000000..8f86ab3b1046 --- /dev/null +++ b/Documentation/devicetree/bindings/nvmem/rockchip-efuse.txt | |||
@@ -0,0 +1,38 @@ | |||
1 | = Rockchip eFuse device tree bindings = | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "rockchip,rockchip-efuse" | ||
5 | - reg: Should contain the registers location and exact eFuse size | ||
6 | - clocks: Should be the clock id of eFuse | ||
7 | - clock-names: Should be "pclk_efuse" | ||
8 | |||
9 | = Data cells = | ||
10 | Are child nodes of eFuse, bindings of which as described in | ||
11 | bindings/nvmem/nvmem.txt | ||
12 | |||
13 | Example: | ||
14 | |||
15 | efuse: efuse@ffb40000 { | ||
16 | compatible = "rockchip,rockchip-efuse"; | ||
17 | reg = <0xffb40000 0x20>; | ||
18 | #address-cells = <1>; | ||
19 | #size-cells = <1>; | ||
20 | clocks = <&cru PCLK_EFUSE256>; | ||
21 | clock-names = "pclk_efuse"; | ||
22 | |||
23 | /* Data cells */ | ||
24 | cpu_leakage: cpu_leakage { | ||
25 | reg = <0x17 0x1>; | ||
26 | }; | ||
27 | }; | ||
28 | |||
29 | = Data consumers = | ||
30 | Are device nodes which consume nvmem data cells. | ||
31 | |||
32 | Example: | ||
33 | |||
34 | cpu_leakage { | ||
35 | ... | ||
36 | nvmem-cells = <&cpu_leakage>; | ||
37 | nvmem-cell-names = "cpu_leakage"; | ||
38 | }; | ||
diff --git a/Documentation/devicetree/bindings/nvmem/vf610-ocotp.txt b/Documentation/devicetree/bindings/nvmem/vf610-ocotp.txt new file mode 100644 index 000000000000..56ed481c3e26 --- /dev/null +++ b/Documentation/devicetree/bindings/nvmem/vf610-ocotp.txt | |||
@@ -0,0 +1,19 @@ | |||
1 | On-Chip OTP Memory for Freescale Vybrid | ||
2 | |||
3 | Required Properties: | ||
4 | compatible: | ||
5 | - "fsl,vf610-ocotp" for VF5xx/VF6xx | ||
6 | #address-cells : Should be 1 | ||
7 | #size-cells : Should be 1 | ||
8 | reg : Address and length of OTP controller and fuse map registers | ||
9 | clocks : ipg clock we associate with the OCOTP peripheral | ||
10 | |||
11 | Example for Vybrid VF5xx/VF6xx: | ||
12 | |||
13 | ocotp: ocotp@400a5000 { | ||
14 | compatible = "fsl,vf610-ocotp"; | ||
15 | #address-cells = <1>; | ||
16 | #size-cells = <1>; | ||
17 | reg = <0x400a5000 0xCF0>; | ||
18 | clocks = <&clks VF610_CLK_OCOTP>; | ||
19 | }; | ||
diff --git a/Documentation/devicetree/bindings/pci/altera-pcie-msi.txt b/Documentation/devicetree/bindings/pci/altera-pcie-msi.txt new file mode 100644 index 000000000000..09cd3bc4d038 --- /dev/null +++ b/Documentation/devicetree/bindings/pci/altera-pcie-msi.txt | |||
@@ -0,0 +1,28 @@ | |||
1 | * Altera PCIe MSI controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should contain "altr,msi-1.0" | ||
5 | - reg: specifies the physical base address of the controller and | ||
6 | the length of the memory mapped region. | ||
7 | - reg-names: must include the following entries: | ||
8 | "csr": CSR registers | ||
9 | "vector_slave": vectors slave port region | ||
10 | - interrupt-parent: interrupt source phandle. | ||
11 | - interrupts: specifies the interrupt source of the parent interrupt | ||
12 | controller. The format of the interrupt specifier depends on the | ||
13 | parent interrupt controller. | ||
14 | - num-vectors: number of vectors, range 1 to 32. | ||
15 | - msi-controller: indicates that this is MSI controller node | ||
16 | |||
17 | |||
18 | Example | ||
19 | msi0: msi@0xFF200000 { | ||
20 | compatible = "altr,msi-1.0"; | ||
21 | reg = <0xFF200000 0x00000010 | ||
22 | 0xFF200010 0x00000080>; | ||
23 | reg-names = "csr", "vector_slave"; | ||
24 | interrupt-parent = <&hps_0_arm_gic_0>; | ||
25 | interrupts = <0 42 4>; | ||
26 | msi-controller; | ||
27 | num-vectors = <32>; | ||
28 | }; | ||
diff --git a/Documentation/devicetree/bindings/pci/altera-pcie.txt b/Documentation/devicetree/bindings/pci/altera-pcie.txt new file mode 100644 index 000000000000..2951a6a50704 --- /dev/null +++ b/Documentation/devicetree/bindings/pci/altera-pcie.txt | |||
@@ -0,0 +1,49 @@ | |||
1 | * Altera PCIe controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : should contain "altr,pcie-root-port-1.0" | ||
5 | - reg: a list of physical base address and length for TXS and CRA. | ||
6 | - reg-names: must include the following entries: | ||
7 | "Txs": TX slave port region | ||
8 | "Cra": Control register access region | ||
9 | - interrupt-parent: interrupt source phandle. | ||
10 | - interrupts: specifies the interrupt source of the parent interrupt controller. | ||
11 | The format of the interrupt specifier depends on the parent interrupt | ||
12 | controller. | ||
13 | - device_type: must be "pci" | ||
14 | - #address-cells: set to <3> | ||
15 | - #size-cells: set to <2> | ||
16 | - #interrupt-cells: set to <1> | ||
17 | - ranges: describes the translation of addresses for root ports and standard | ||
18 | PCI regions. | ||
19 | - interrupt-map-mask and interrupt-map: standard PCI properties to define the | ||
20 | mapping of the PCIe interface to interrupt numbers. | ||
21 | |||
22 | Optional properties: | ||
23 | - msi-parent: Link to the hardware entity that serves as the MSI controller for this PCIe | ||
24 | controller. | ||
25 | - bus-range: PCI bus numbers covered | ||
26 | |||
27 | Example | ||
28 | pcie_0: pcie@0xc00000000 { | ||
29 | compatible = "altr,pcie-root-port-1.0"; | ||
30 | reg = <0xc0000000 0x20000000>, | ||
31 | <0xff220000 0x00004000>; | ||
32 | reg-names = "Txs", "Cra"; | ||
33 | interrupt-parent = <&hps_0_arm_gic_0>; | ||
34 | interrupts = <0 40 4>; | ||
35 | interrupt-controller; | ||
36 | #interrupt-cells = <1>; | ||
37 | bus-range = <0x0 0xFF>; | ||
38 | device_type = "pci"; | ||
39 | msi-parent = <&msi_to_gic_gen_0>; | ||
40 | #address-cells = <3>; | ||
41 | #size-cells = <2>; | ||
42 | interrupt-map-mask = <0 0 0 7>; | ||
43 | interrupt-map = <0 0 0 1 &pcie_0 1>, | ||
44 | <0 0 0 2 &pcie_0 2>, | ||
45 | <0 0 0 3 &pcie_0 3>, | ||
46 | <0 0 0 4 &pcie_0 4>; | ||
47 | ranges = <0x82000000 0x00000000 0x00000000 0xc0000000 0x00000000 0x10000000 | ||
48 | 0x82000000 0x00000000 0x10000000 0xd0000000 0x00000000 0x10000000>; | ||
49 | }; | ||
diff --git a/Documentation/devicetree/bindings/pci/arm,juno-r1-pcie.txt b/Documentation/devicetree/bindings/pci/arm,juno-r1-pcie.txt new file mode 100644 index 000000000000..f7514c170a32 --- /dev/null +++ b/Documentation/devicetree/bindings/pci/arm,juno-r1-pcie.txt | |||
@@ -0,0 +1,10 @@ | |||
1 | * ARM Juno R1 PCIe interface | ||
2 | |||
3 | This PCIe host controller is based on PLDA XpressRICH3-AXI IP | ||
4 | and thus inherits all the common properties defined in plda,xpressrich3-axi.txt | ||
5 | as well as the base properties defined in host-generic-pci.txt. | ||
6 | |||
7 | Required properties: | ||
8 | - compatible: "arm,juno-r1-pcie" | ||
9 | - dma-coherent: The host controller bridges the AXI transactions into PCIe bus | ||
10 | in a manner that makes the DMA operations to appear coherent to the CPUs. | ||
diff --git a/Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt b/Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt index f7ce50e38ed4..45c2a8094a9f 100644 --- a/Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt +++ b/Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt | |||
@@ -17,6 +17,21 @@ Optional properties: | |||
17 | - phys: phandle of the PCIe PHY device | 17 | - phys: phandle of the PCIe PHY device |
18 | - phy-names: must be "pcie-phy" | 18 | - phy-names: must be "pcie-phy" |
19 | 19 | ||
20 | - brcm,pcie-ob: Some iProc SoCs do not have the outbound address mapping done | ||
21 | by the ASIC after power on reset. In this case, SW needs to configure it | ||
22 | |||
23 | If the brcm,pcie-ob property is present, the following properties become | ||
24 | effective: | ||
25 | |||
26 | Required: | ||
27 | - brcm,pcie-ob-axi-offset: The offset from the AXI address to the internal | ||
28 | address used by the iProc PCIe core (not the PCIe address) | ||
29 | - brcm,pcie-ob-window-size: The outbound address mapping window size (in MB) | ||
30 | |||
31 | Optional: | ||
32 | - brcm,pcie-ob-oarr-size: Some iProc SoCs need the OARR size bit to be set to | ||
33 | increase the outbound window size | ||
34 | |||
20 | Example: | 35 | Example: |
21 | pcie0: pcie@18012000 { | 36 | pcie0: pcie@18012000 { |
22 | compatible = "brcm,iproc-pcie"; | 37 | compatible = "brcm,iproc-pcie"; |
@@ -38,6 +53,11 @@ Example: | |||
38 | 53 | ||
39 | phys = <&phy 0 5>; | 54 | phys = <&phy 0 5>; |
40 | phy-names = "pcie-phy"; | 55 | phy-names = "pcie-phy"; |
56 | |||
57 | brcm,pcie-ob; | ||
58 | brcm,pcie-ob-oarr-size; | ||
59 | brcm,pcie-ob-axi-offset = <0x00000000>; | ||
60 | brcm,pcie-ob-window-size = <256>; | ||
41 | }; | 61 | }; |
42 | 62 | ||
43 | pcie1: pcie@18013000 { | 63 | pcie1: pcie@18013000 { |
diff --git a/Documentation/devicetree/bindings/pci/designware-pcie.txt b/Documentation/devicetree/bindings/pci/designware-pcie.txt index 9f4faa8e8d00..5b0853df9d5a 100644 --- a/Documentation/devicetree/bindings/pci/designware-pcie.txt +++ b/Documentation/devicetree/bindings/pci/designware-pcie.txt | |||
@@ -15,14 +15,16 @@ Required properties: | |||
15 | to define the mapping of the PCIe interface to interrupt | 15 | to define the mapping of the PCIe interface to interrupt |
16 | numbers. | 16 | numbers. |
17 | - num-lanes: number of lanes to use | 17 | - num-lanes: number of lanes to use |
18 | - clocks: Must contain an entry for each entry in clock-names. | ||
19 | See ../clocks/clock-bindings.txt for details. | ||
20 | - clock-names: Must include the following entries: | ||
21 | - "pcie" | ||
22 | - "pcie_bus" | ||
23 | 18 | ||
24 | Optional properties: | 19 | Optional properties: |
20 | - num-lanes: number of lanes to use (this property should be specified unless | ||
21 | the link is brought already up in BIOS) | ||
25 | - reset-gpio: gpio pin number of power good signal | 22 | - reset-gpio: gpio pin number of power good signal |
26 | - bus-range: PCI bus numbers covered (it is recommended for new devicetrees to | 23 | - bus-range: PCI bus numbers covered (it is recommended for new devicetrees to |
27 | specify this property, to keep backwards compatibility a range of 0x00-0xff | 24 | specify this property, to keep backwards compatibility a range of 0x00-0xff |
28 | is assumed if not present) | 25 | is assumed if not present) |
26 | - clocks: Must contain an entry for each entry in clock-names. | ||
27 | See ../clocks/clock-bindings.txt for details. | ||
28 | - clock-names: Must include the following entries: | ||
29 | - "pcie" | ||
30 | - "pcie_bus" | ||
diff --git a/Documentation/devicetree/bindings/pci/hisilicon-pcie.txt b/Documentation/devicetree/bindings/pci/hisilicon-pcie.txt new file mode 100644 index 000000000000..17c6ed9c6059 --- /dev/null +++ b/Documentation/devicetree/bindings/pci/hisilicon-pcie.txt | |||
@@ -0,0 +1,44 @@ | |||
1 | HiSilicon PCIe host bridge DT description | ||
2 | |||
3 | HiSilicon PCIe host controller is based on Designware PCI core. | ||
4 | It shares common functions with PCIe Designware core driver and inherits | ||
5 | common properties defined in | ||
6 | Documentation/devicetree/bindings/pci/designware-pci.txt. | ||
7 | |||
8 | Additional properties are described here: | ||
9 | |||
10 | Required properties: | ||
11 | - compatible: Should contain "hisilicon,hip05-pcie". | ||
12 | - reg: Should contain rc_dbi, config registers location and length. | ||
13 | - reg-names: Must include the following entries: | ||
14 | "rc_dbi": controller configuration registers; | ||
15 | "config": PCIe configuration space registers. | ||
16 | - msi-parent: Should be its_pcie which is an ITS receiving MSI interrupts. | ||
17 | - port-id: Should be 0, 1, 2 or 3. | ||
18 | |||
19 | Optional properties: | ||
20 | - status: Either "ok" or "disabled". | ||
21 | - dma-coherent: Present if DMA operations are coherent. | ||
22 | |||
23 | Example: | ||
24 | pcie@0xb0080000 { | ||
25 | compatible = "hisilicon,hip05-pcie", "snps,dw-pcie"; | ||
26 | reg = <0 0xb0080000 0 0x10000>, <0x220 0x00000000 0 0x2000>; | ||
27 | reg-names = "rc_dbi", "config"; | ||
28 | bus-range = <0 15>; | ||
29 | msi-parent = <&its_pcie>; | ||
30 | #address-cells = <3>; | ||
31 | #size-cells = <2>; | ||
32 | device_type = "pci"; | ||
33 | dma-coherent; | ||
34 | ranges = <0x82000000 0 0x00000000 0x220 0x00000000 0 0x10000000>; | ||
35 | num-lanes = <8>; | ||
36 | port-id = <1>; | ||
37 | #interrupts-cells = <1>; | ||
38 | interrupts-map-mask = <0xf800 0 0 7>; | ||
39 | interrupts-map = <0x0 0 0 1 &mbigen_pcie 1 10 | ||
40 | 0x0 0 0 2 &mbigen_pcie 2 11 | ||
41 | 0x0 0 0 3 &mbigen_pcie 3 12 | ||
42 | 0x0 0 0 4 &mbigen_pcie 4 13>; | ||
43 | status = "ok"; | ||
44 | }; | ||
diff --git a/Documentation/devicetree/bindings/pci/host-generic-pci.txt b/Documentation/devicetree/bindings/pci/host-generic-pci.txt index cf3e205e0b7e..3f1d3fca62bb 100644 --- a/Documentation/devicetree/bindings/pci/host-generic-pci.txt +++ b/Documentation/devicetree/bindings/pci/host-generic-pci.txt | |||
@@ -34,8 +34,9 @@ Properties of the host controller node: | |||
34 | - #size-cells : Must be 2. | 34 | - #size-cells : Must be 2. |
35 | 35 | ||
36 | - reg : The Configuration Space base address and size, as accessed | 36 | - reg : The Configuration Space base address and size, as accessed |
37 | from the parent bus. | 37 | from the parent bus. The base address corresponds to |
38 | 38 | the first bus in the "bus-range" property. If no | |
39 | "bus-range" is specified, this will be bus 0 (the default). | ||
39 | 40 | ||
40 | Properties of the /chosen node: | 41 | Properties of the /chosen node: |
41 | 42 | ||
diff --git a/Documentation/devicetree/bindings/pci/layerscape-pci.txt b/Documentation/devicetree/bindings/pci/layerscape-pci.txt index 6286f049bf18..e3767857d30d 100644 --- a/Documentation/devicetree/bindings/pci/layerscape-pci.txt +++ b/Documentation/devicetree/bindings/pci/layerscape-pci.txt | |||
@@ -1,10 +1,20 @@ | |||
1 | Freescale Layerscape PCIe controller | 1 | Freescale Layerscape PCIe controller |
2 | 2 | ||
3 | This PCIe host controller is based on the Synopsis Designware PCIe IP | 3 | This PCIe host controller is based on the Synopsys DesignWare PCIe IP |
4 | and thus inherits all the common properties defined in designware-pcie.txt. | 4 | and thus inherits all the common properties defined in designware-pcie.txt. |
5 | 5 | ||
6 | This controller derives its clocks from the Reset Configuration Word (RCW) | ||
7 | which is used to describe the PLL settings at the time of chip-reset. | ||
8 | |||
9 | Also as per the available Reference Manuals, there is no specific 'version' | ||
10 | register available in the Freescale PCIe controller register set, | ||
11 | which can allow determining the underlying DesignWare PCIe controller version | ||
12 | information. | ||
13 | |||
6 | Required properties: | 14 | Required properties: |
7 | - compatible: should contain the platform identifier such as "fsl,ls1021a-pcie" | 15 | - compatible: should contain the platform identifier such as: |
16 | "fsl,ls1021a-pcie", "snps,dw-pcie" | ||
17 | "fsl,ls2080a-pcie", "snps,dw-pcie" | ||
8 | - reg: base addresses and lengths of the PCIe controller | 18 | - reg: base addresses and lengths of the PCIe controller |
9 | - interrupts: A list of interrupt outputs of the controller. Must contain an | 19 | - interrupts: A list of interrupt outputs of the controller. Must contain an |
10 | entry for each entry in the interrupt-names property. | 20 | entry for each entry in the interrupt-names property. |
diff --git a/Documentation/devicetree/bindings/pci/pci-msi.txt b/Documentation/devicetree/bindings/pci/pci-msi.txt new file mode 100644 index 000000000000..9b3cc817d181 --- /dev/null +++ b/Documentation/devicetree/bindings/pci/pci-msi.txt | |||
@@ -0,0 +1,220 @@ | |||
1 | This document describes the generic device tree binding for describing the | ||
2 | relationship between PCI devices and MSI controllers. | ||
3 | |||
4 | Each PCI device under a root complex is uniquely identified by its Requester ID | ||
5 | (AKA RID). A Requester ID is a triplet of a Bus number, Device number, and | ||
6 | Function number. | ||
7 | |||
8 | For the purpose of this document, when treated as a numeric value, a RID is | ||
9 | formatted such that: | ||
10 | |||
11 | * Bits [15:8] are the Bus number. | ||
12 | * Bits [7:3] are the Device number. | ||
13 | * Bits [2:0] are the Function number. | ||
14 | * Any other bits required for padding must be zero. | ||
15 | |||
16 | MSIs may be distinguished in part through the use of sideband data accompanying | ||
17 | writes. In the case of PCI devices, this sideband data may be derived from the | ||
18 | Requester ID. A mechanism is required to associate a device with both the MSI | ||
19 | controllers it can address, and the sideband data that will be associated with | ||
20 | its writes to those controllers. | ||
21 | |||
22 | For generic MSI bindings, see | ||
23 | Documentation/devicetree/bindings/interrupt-controller/msi.txt. | ||
24 | |||
25 | |||
26 | PCI root complex | ||
27 | ================ | ||
28 | |||
29 | Optional properties | ||
30 | ------------------- | ||
31 | |||
32 | - msi-map: Maps a Requester ID to an MSI controller and associated | ||
33 | msi-specifier data. The property is an arbitrary number of tuples of | ||
34 | (rid-base,msi-controller,msi-base,length), where: | ||
35 | |||
36 | * rid-base is a single cell describing the first RID matched by the entry. | ||
37 | |||
38 | * msi-controller is a single phandle to an MSI controller | ||
39 | |||
40 | * msi-base is an msi-specifier describing the msi-specifier produced for the | ||
41 | first RID matched by the entry. | ||
42 | |||
43 | * length is a single cell describing how many consecutive RIDs are matched | ||
44 | following the rid-base. | ||
45 | |||
46 | Any RID r in the interval [rid-base, rid-base + length) is associated with | ||
47 | the listed msi-controller, with the msi-specifier (r - rid-base + msi-base). | ||
48 | |||
49 | - msi-map-mask: A mask to be applied to each Requester ID prior to being mapped | ||
50 | to an msi-specifier per the msi-map property. | ||
51 | |||
52 | - msi-parent: Describes the MSI parent of the root complex itself. Where | ||
53 | the root complex and MSI controller do not pass sideband data with MSI | ||
54 | writes, this property may be used to describe the MSI controller(s) | ||
55 | used by PCI devices under the root complex, if defined as such in the | ||
56 | binding for the root complex. | ||
57 | |||
58 | |||
59 | Example (1) | ||
60 | =========== | ||
61 | |||
62 | / { | ||
63 | #address-cells = <1>; | ||
64 | #size-cells = <1>; | ||
65 | |||
66 | msi: msi-controller@a { | ||
67 | reg = <0xa 0x1>; | ||
68 | compatible = "vendor,some-controller"; | ||
69 | msi-controller; | ||
70 | #msi-cells = <1>; | ||
71 | }; | ||
72 | |||
73 | pci: pci@f { | ||
74 | reg = <0xf 0x1>; | ||
75 | compatible = "vendor,pcie-root-complex"; | ||
76 | device_type = "pci"; | ||
77 | |||
78 | /* | ||
79 | * The sideband data provided to the MSI controller is | ||
80 | * the RID, identity-mapped. | ||
81 | */ | ||
82 | msi-map = <0x0 &msi_a 0x0 0x10000>, | ||
83 | }; | ||
84 | }; | ||
85 | |||
86 | |||
87 | Example (2) | ||
88 | =========== | ||
89 | |||
90 | / { | ||
91 | #address-cells = <1>; | ||
92 | #size-cells = <1>; | ||
93 | |||
94 | msi: msi-controller@a { | ||
95 | reg = <0xa 0x1>; | ||
96 | compatible = "vendor,some-controller"; | ||
97 | msi-controller; | ||
98 | #msi-cells = <1>; | ||
99 | }; | ||
100 | |||
101 | pci: pci@f { | ||
102 | reg = <0xf 0x1>; | ||
103 | compatible = "vendor,pcie-root-complex"; | ||
104 | device_type = "pci"; | ||
105 | |||
106 | /* | ||
107 | * The sideband data provided to the MSI controller is | ||
108 | * the RID, masked to only the device and function bits. | ||
109 | */ | ||
110 | msi-map = <0x0 &msi_a 0x0 0x100>, | ||
111 | msi-map-mask = <0xff> | ||
112 | }; | ||
113 | }; | ||
114 | |||
115 | |||
116 | Example (3) | ||
117 | =========== | ||
118 | |||
119 | / { | ||
120 | #address-cells = <1>; | ||
121 | #size-cells = <1>; | ||
122 | |||
123 | msi: msi-controller@a { | ||
124 | reg = <0xa 0x1>; | ||
125 | compatible = "vendor,some-controller"; | ||
126 | msi-controller; | ||
127 | #msi-cells = <1>; | ||
128 | }; | ||
129 | |||
130 | pci: pci@f { | ||
131 | reg = <0xf 0x1>; | ||
132 | compatible = "vendor,pcie-root-complex"; | ||
133 | device_type = "pci"; | ||
134 | |||
135 | /* | ||
136 | * The sideband data provided to the MSI controller is | ||
137 | * the RID, but the high bit of the bus number is | ||
138 | * ignored. | ||
139 | */ | ||
140 | msi-map = <0x0000 &msi 0x0000 0x8000>, | ||
141 | <0x8000 &msi 0x0000 0x8000>; | ||
142 | }; | ||
143 | }; | ||
144 | |||
145 | |||
146 | Example (4) | ||
147 | =========== | ||
148 | |||
149 | / { | ||
150 | #address-cells = <1>; | ||
151 | #size-cells = <1>; | ||
152 | |||
153 | msi: msi-controller@a { | ||
154 | reg = <0xa 0x1>; | ||
155 | compatible = "vendor,some-controller"; | ||
156 | msi-controller; | ||
157 | #msi-cells = <1>; | ||
158 | }; | ||
159 | |||
160 | pci: pci@f { | ||
161 | reg = <0xf 0x1>; | ||
162 | compatible = "vendor,pcie-root-complex"; | ||
163 | device_type = "pci"; | ||
164 | |||
165 | /* | ||
166 | * The sideband data provided to the MSI controller is | ||
167 | * the RID, but the high bit of the bus number is | ||
168 | * negated. | ||
169 | */ | ||
170 | msi-map = <0x0000 &msi 0x8000 0x8000>, | ||
171 | <0x8000 &msi 0x0000 0x8000>; | ||
172 | }; | ||
173 | }; | ||
174 | |||
175 | |||
176 | Example (5) | ||
177 | =========== | ||
178 | |||
179 | / { | ||
180 | #address-cells = <1>; | ||
181 | #size-cells = <1>; | ||
182 | |||
183 | msi_a: msi-controller@a { | ||
184 | reg = <0xa 0x1>; | ||
185 | compatible = "vendor,some-controller"; | ||
186 | msi-controller; | ||
187 | #msi-cells = <1>; | ||
188 | }; | ||
189 | |||
190 | msi_b: msi-controller@b { | ||
191 | reg = <0xb 0x1>; | ||
192 | compatible = "vendor,some-controller"; | ||
193 | msi-controller; | ||
194 | #msi-cells = <1>; | ||
195 | }; | ||
196 | |||
197 | msi_c: msi-controller@c { | ||
198 | reg = <0xc 0x1>; | ||
199 | compatible = "vendor,some-controller"; | ||
200 | msi-controller; | ||
201 | #msi-cells = <1>; | ||
202 | }; | ||
203 | |||
204 | pci: pci@c { | ||
205 | reg = <0xf 0x1>; | ||
206 | compatible = "vendor,pcie-root-complex"; | ||
207 | device_type = "pci"; | ||
208 | |||
209 | /* | ||
210 | * The sideband data provided to MSI controller a is the | ||
211 | * RID, but the high bit of the bus number is negated. | ||
212 | * The sideband data provided to MSI controller b is the | ||
213 | * RID, identity-mapped. | ||
214 | * MSI controller c is not addressable. | ||
215 | */ | ||
216 | msi-map = <0x0000 &msi_a 0x8000 0x08000>, | ||
217 | <0x8000 &msi_a 0x0000 0x08000>, | ||
218 | <0x0000 &msi_b 0x0000 0x10000>; | ||
219 | }; | ||
220 | }; | ||
diff --git a/Documentation/devicetree/bindings/pci/pci-rcar-gen2.txt b/Documentation/devicetree/bindings/pci/pci-rcar-gen2.txt index d8ef5bf50f11..7fab84b33531 100644 --- a/Documentation/devicetree/bindings/pci/pci-rcar-gen2.txt +++ b/Documentation/devicetree/bindings/pci/pci-rcar-gen2.txt | |||
@@ -7,7 +7,8 @@ OHCI and EHCI controllers. | |||
7 | 7 | ||
8 | Required properties: | 8 | Required properties: |
9 | - compatible: "renesas,pci-r8a7790" for the R8A7790 SoC; | 9 | - compatible: "renesas,pci-r8a7790" for the R8A7790 SoC; |
10 | "renesas,pci-r8a7791" for the R8A7791 SoC. | 10 | "renesas,pci-r8a7791" for the R8A7791 SoC; |
11 | "renesas,pci-r8a7794" for the R8A7794 SoC. | ||
11 | - reg: A list of physical regions to access the device: the first is | 12 | - reg: A list of physical regions to access the device: the first is |
12 | the operational registers for the OHCI/EHCI controllers and the | 13 | the operational registers for the OHCI/EHCI controllers and the |
13 | second is for the bridge configuration and control registers. | 14 | second is for the bridge configuration and control registers. |
diff --git a/Documentation/devicetree/bindings/pci/pci.txt b/Documentation/devicetree/bindings/pci/pci.txt index f8fbe9af7b2f..08dcfad09f8d 100644 --- a/Documentation/devicetree/bindings/pci/pci.txt +++ b/Documentation/devicetree/bindings/pci/pci.txt | |||
@@ -1,12 +1,12 @@ | |||
1 | PCI bus bridges have standardized Device Tree bindings: | 1 | PCI bus bridges have standardized Device Tree bindings: |
2 | 2 | ||
3 | PCI Bus Binding to: IEEE Std 1275-1994 | 3 | PCI Bus Binding to: IEEE Std 1275-1994 |
4 | http://www.openfirmware.org/ofwg/bindings/pci/pci2_1.pdf | 4 | http://www.firmware.org/1275/bindings/pci/pci2_1.pdf |
5 | 5 | ||
6 | And for the interrupt mapping part: | 6 | And for the interrupt mapping part: |
7 | 7 | ||
8 | Open Firmware Recommended Practice: Interrupt Mapping | 8 | Open Firmware Recommended Practice: Interrupt Mapping |
9 | http://www.openfirmware.org/1275/practice/imap/imap0_9d.pdf | 9 | http://www.firmware.org/1275/practice/imap/imap0_9d.pdf |
10 | 10 | ||
11 | Additionally to the properties specified in the above standards a host bridge | 11 | Additionally to the properties specified in the above standards a host bridge |
12 | driver implementation may support the following properties: | 12 | driver implementation may support the following properties: |
diff --git a/Documentation/devicetree/bindings/pci/plda,xpressrich3-axi.txt b/Documentation/devicetree/bindings/pci/plda,xpressrich3-axi.txt new file mode 100644 index 000000000000..f3f75bfb42bc --- /dev/null +++ b/Documentation/devicetree/bindings/pci/plda,xpressrich3-axi.txt | |||
@@ -0,0 +1,12 @@ | |||
1 | * PLDA XpressRICH3-AXI host controller | ||
2 | |||
3 | The PLDA XpressRICH3-AXI host controller can be configured in a manner that | ||
4 | makes it compliant with the SBSA[1] standard published by ARM Ltd. For those | ||
5 | scenarios, the host-generic-pci.txt bindings apply with the following additions | ||
6 | to the compatible property: | ||
7 | |||
8 | Required properties: | ||
9 | - compatible: should contain "plda,xpressrich3-axi" to identify the IP used. | ||
10 | |||
11 | |||
12 | [1] http://infocenter.arm.com/help/topic/com.arm.doc.den0029a/ | ||
diff --git a/Documentation/devicetree/bindings/phy/brcm,cygnus-pcie-phy.txt b/Documentation/devicetree/bindings/phy/brcm,cygnus-pcie-phy.txt new file mode 100644 index 000000000000..761c4bc24a9b --- /dev/null +++ b/Documentation/devicetree/bindings/phy/brcm,cygnus-pcie-phy.txt | |||
@@ -0,0 +1,47 @@ | |||
1 | Broadcom Cygnus PCIe PHY | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: must be "brcm,cygnus-pcie-phy" | ||
5 | - reg: base address and length of the PCIe PHY block | ||
6 | - #address-cells: must be 1 | ||
7 | - #size-cells: must be 0 | ||
8 | |||
9 | Each PCIe PHY should be represented by a child node | ||
10 | |||
11 | Required properties For the child node: | ||
12 | - reg: the PHY ID | ||
13 | 0 - PCIe RC 0 | ||
14 | 1 - PCIe RC 1 | ||
15 | - #phy-cells: must be 0 | ||
16 | |||
17 | Example: | ||
18 | pcie_phy: phy@0301d0a0 { | ||
19 | compatible = "brcm,cygnus-pcie-phy"; | ||
20 | reg = <0x0301d0a0 0x14>; | ||
21 | |||
22 | pcie0_phy: phy@0 { | ||
23 | reg = <0>; | ||
24 | #phy-cells = <0>; | ||
25 | }; | ||
26 | |||
27 | pcie1_phy: phy@1 { | ||
28 | reg = <1>; | ||
29 | #phy-cells = <0>; | ||
30 | }; | ||
31 | }; | ||
32 | |||
33 | /* users of the PCIe phy */ | ||
34 | |||
35 | pcie0: pcie@18012000 { | ||
36 | ... | ||
37 | ... | ||
38 | phys = <&pcie0_phy>; | ||
39 | phy-names = "pcie-phy"; | ||
40 | }; | ||
41 | |||
42 | pcie1: pcie@18013000 { | ||
43 | ... | ||
44 | ... | ||
45 | phys = <pcie1_phy>; | ||
46 | phy-names = "pcie-phy"; | ||
47 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/calxeda/combophy.txt b/Documentation/devicetree/bindings/phy/calxeda-combophy.txt index 6622bdb2e8bc..6622bdb2e8bc 100644 --- a/Documentation/devicetree/bindings/arm/calxeda/combophy.txt +++ b/Documentation/devicetree/bindings/phy/calxeda-combophy.txt | |||
diff --git a/Documentation/devicetree/bindings/usb/keystone-phy.txt b/Documentation/devicetree/bindings/phy/keystone-usb-phy.txt index f37b3a86341d..f37b3a86341d 100644 --- a/Documentation/devicetree/bindings/usb/keystone-phy.txt +++ b/Documentation/devicetree/bindings/phy/keystone-usb-phy.txt | |||
diff --git a/Documentation/devicetree/bindings/usb/mxs-phy.txt b/Documentation/devicetree/bindings/phy/mxs-usb-phy.txt index 379b84a567cc..379b84a567cc 100644 --- a/Documentation/devicetree/bindings/usb/mxs-phy.txt +++ b/Documentation/devicetree/bindings/phy/mxs-usb-phy.txt | |||
diff --git a/Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt b/Documentation/devicetree/bindings/phy/nvidia,tegra20-usb-phy.txt index a9aa79fb90ed..a9aa79fb90ed 100644 --- a/Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt +++ b/Documentation/devicetree/bindings/phy/nvidia,tegra20-usb-phy.txt | |||
diff --git a/Documentation/devicetree/bindings/phy/phy-mt65xx-usb.txt b/Documentation/devicetree/bindings/phy/phy-mt65xx-usb.txt new file mode 100644 index 000000000000..00100cf3e037 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/phy-mt65xx-usb.txt | |||
@@ -0,0 +1,68 @@ | |||
1 | mt65xx USB3.0 PHY binding | ||
2 | -------------------------- | ||
3 | |||
4 | This binding describes a usb3.0 phy for mt65xx platforms of Medaitek SoC. | ||
5 | |||
6 | Required properties (controller (parent) node): | ||
7 | - compatible : should be "mediatek,mt8173-u3phy" | ||
8 | - reg : offset and length of register for phy, exclude port's | ||
9 | register. | ||
10 | - clocks : a list of phandle + clock-specifier pairs, one for each | ||
11 | entry in clock-names | ||
12 | - clock-names : must contain | ||
13 | "u3phya_ref": for reference clock of usb3.0 analog phy. | ||
14 | |||
15 | Required nodes : a sub-node is required for each port the controller | ||
16 | provides. Address range information including the usual | ||
17 | 'reg' property is used inside these nodes to describe | ||
18 | the controller's topology. | ||
19 | |||
20 | Required properties (port (child) node): | ||
21 | - reg : address and length of the register set for the port. | ||
22 | - #phy-cells : should be 1 (See second example) | ||
23 | cell after port phandle is phy type from: | ||
24 | - PHY_TYPE_USB2 | ||
25 | - PHY_TYPE_USB3 | ||
26 | |||
27 | Example: | ||
28 | |||
29 | u3phy: usb-phy@11290000 { | ||
30 | compatible = "mediatek,mt8173-u3phy"; | ||
31 | reg = <0 0x11290000 0 0x800>; | ||
32 | clocks = <&apmixedsys CLK_APMIXED_REF2USB_TX>; | ||
33 | clock-names = "u3phya_ref"; | ||
34 | #address-cells = <2>; | ||
35 | #size-cells = <2>; | ||
36 | ranges; | ||
37 | status = "okay"; | ||
38 | |||
39 | phy_port0: port@11290800 { | ||
40 | reg = <0 0x11290800 0 0x800>; | ||
41 | #phy-cells = <1>; | ||
42 | status = "okay"; | ||
43 | }; | ||
44 | |||
45 | phy_port1: port@11291000 { | ||
46 | reg = <0 0x11291000 0 0x800>; | ||
47 | #phy-cells = <1>; | ||
48 | status = "okay"; | ||
49 | }; | ||
50 | }; | ||
51 | |||
52 | Specifying phy control of devices | ||
53 | --------------------------------- | ||
54 | |||
55 | Device nodes should specify the configuration required in their "phys" | ||
56 | property, containing a phandle to the phy port node and a device type; | ||
57 | phy-names for each port are optional. | ||
58 | |||
59 | Example: | ||
60 | |||
61 | #include <dt-bindings/phy/phy.h> | ||
62 | |||
63 | usb30: usb@11270000 { | ||
64 | ... | ||
65 | phys = <&phy_port0 PHY_TYPE_USB3>; | ||
66 | phy-names = "usb3-0"; | ||
67 | ... | ||
68 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/qcom,usb-8x16-phy.txt b/Documentation/devicetree/bindings/phy/qcom,usb-8x16-phy.txt index 2cb2168cef41..2cb2168cef41 100644 --- a/Documentation/devicetree/bindings/usb/qcom,usb-8x16-phy.txt +++ b/Documentation/devicetree/bindings/phy/qcom,usb-8x16-phy.txt | |||
diff --git a/Documentation/devicetree/bindings/phy/samsung-phy.txt b/Documentation/devicetree/bindings/phy/samsung-phy.txt index 60c6f2a633e0..0289d3b07853 100644 --- a/Documentation/devicetree/bindings/phy/samsung-phy.txt +++ b/Documentation/devicetree/bindings/phy/samsung-phy.txt | |||
@@ -44,6 +44,9 @@ Required properties: | |||
44 | - the "ref" clock is used to get the rate of the clock provided to the | 44 | - the "ref" clock is used to get the rate of the clock provided to the |
45 | PHY module | 45 | PHY module |
46 | 46 | ||
47 | Optional properties: | ||
48 | - vbus-supply: power-supply phandle for vbus power source | ||
49 | |||
47 | The first phandle argument in the PHY specifier identifies the PHY, its | 50 | The first phandle argument in the PHY specifier identifies the PHY, its |
48 | meaning is compatible dependent. For the currently supported SoCs (Exynos 4210 | 51 | meaning is compatible dependent. For the currently supported SoCs (Exynos 4210 |
49 | and Exynos 4212) it is as follows: | 52 | and Exynos 4212) it is as follows: |
diff --git a/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt index 3c821cda1ad0..b321b26780dc 100644 --- a/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt | |||
@@ -17,6 +17,7 @@ Required properties: | |||
17 | "allwinner,sun8i-a23-pinctrl" | 17 | "allwinner,sun8i-a23-pinctrl" |
18 | "allwinner,sun8i-a23-r-pinctrl" | 18 | "allwinner,sun8i-a23-r-pinctrl" |
19 | "allwinner,sun8i-a33-pinctrl" | 19 | "allwinner,sun8i-a33-pinctrl" |
20 | "allwinner,sun8i-a83t-pinctrl" | ||
20 | 21 | ||
21 | - reg: Should contain the register physical address and length for the | 22 | - reg: Should contain the register physical address and length for the |
22 | pin controller. | 23 | pin controller. |
diff --git a/Documentation/devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt new file mode 100644 index 000000000000..61ac75706cc9 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt | |||
@@ -0,0 +1,90 @@ | |||
1 | * Atmel PIO4 Controller | ||
2 | |||
3 | The Atmel PIO4 controller is used to select the function of a pin and to | ||
4 | configure it. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: "atmel,sama5d2-pinctrl". | ||
8 | - reg: base address and length of the PIO controller. | ||
9 | - interrupts: interrupt outputs from the controller, one for each bank. | ||
10 | - interrupt-controller: mark the device node as an interrupt controller. | ||
11 | - #interrupt-cells: should be two. | ||
12 | - gpio-controller: mark the device node as a gpio controller. | ||
13 | - #gpio-cells: should be two. | ||
14 | |||
15 | Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for | ||
16 | a general description of GPIO and interrupt bindings. | ||
17 | |||
18 | Please refer to pinctrl-bindings.txt in this directory for details of the | ||
19 | common pinctrl bindings used by client devices. | ||
20 | |||
21 | Subnode format | ||
22 | Each node (or subnode) will list the pins it needs and how to configured these | ||
23 | pins. | ||
24 | |||
25 | node { | ||
26 | pinmux = <PIN_NUMBER_PINMUX>; | ||
27 | GENERIC_PINCONFIG; | ||
28 | }; | ||
29 | |||
30 | Required properties: | ||
31 | - pinmux: integer array. Each integer represents a pin number plus mux and | ||
32 | ioset settings. Use the macros from boot/dts/<soc>-pinfunc.h file to get the | ||
33 | right representation of the pin. | ||
34 | |||
35 | Optional properties: | ||
36 | - GENERIC_PINCONFIG: generic pinconfig options to use, bias-disable, | ||
37 | bias-pull-down, bias-pull-up, drive-open-drain, input-schmitt-enable, | ||
38 | input-debounce, output-low, output-high. | ||
39 | |||
40 | Example: | ||
41 | |||
42 | #include <sama5d2-pinfunc.h> | ||
43 | |||
44 | ... | ||
45 | { | ||
46 | pioA: pinctrl@fc038000 { | ||
47 | compatible = "atmel,sama5d2-pinctrl"; | ||
48 | reg = <0xfc038000 0x600>; | ||
49 | interrupts = <18 IRQ_TYPE_LEVEL_HIGH 7>, | ||
50 | <68 IRQ_TYPE_LEVEL_HIGH 7>, | ||
51 | <69 IRQ_TYPE_LEVEL_HIGH 7>, | ||
52 | <70 IRQ_TYPE_LEVEL_HIGH 7>; | ||
53 | interrupt-controller; | ||
54 | #interrupt-cells = <2>; | ||
55 | gpio-controller; | ||
56 | #gpio-cells = <2>; | ||
57 | clocks = <&pioA_clk>; | ||
58 | |||
59 | pinctrl_i2c0_default: i2c0_default { | ||
60 | pinmux = <PIN_PD21__TWD0>, | ||
61 | <PIN_PD22__TWCK0>; | ||
62 | bias-disable; | ||
63 | }; | ||
64 | |||
65 | pinctrl_led_gpio_default: led_gpio_default { | ||
66 | pinmux = <PIN_PB0>, | ||
67 | <PIN_PB5>; | ||
68 | bias-pull-up; | ||
69 | }; | ||
70 | |||
71 | pinctrl_sdmmc1_default: sdmmc1_default { | ||
72 | cmd_data { | ||
73 | pinmux = <PIN_PA28__SDMMC1_CMD>, | ||
74 | <PIN_PA18__SDMMC1_DAT0>, | ||
75 | <PIN_PA19__SDMMC1_DAT1>, | ||
76 | <PIN_PA20__SDMMC1_DAT2>, | ||
77 | <PIN_PA21__SDMMC1_DAT3>; | ||
78 | bias-pull-up; | ||
79 | }; | ||
80 | |||
81 | ck_cd { | ||
82 | pinmux = <PIN_PA22__SDMMC1_CK>, | ||
83 | <PIN_PA30__SDMMC1_CD>; | ||
84 | bias-disable; | ||
85 | }; | ||
86 | }; | ||
87 | ... | ||
88 | }; | ||
89 | }; | ||
90 | ... | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/berlin,pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/berlin,pinctrl.txt index a8bb5e26019c..f8fa28ce163e 100644 --- a/Documentation/devicetree/bindings/pinctrl/berlin,pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/berlin,pinctrl.txt | |||
@@ -20,7 +20,10 @@ Required properties: | |||
20 | "marvell,berlin2cd-soc-pinctrl", | 20 | "marvell,berlin2cd-soc-pinctrl", |
21 | "marvell,berlin2cd-system-pinctrl", | 21 | "marvell,berlin2cd-system-pinctrl", |
22 | "marvell,berlin2q-soc-pinctrl", | 22 | "marvell,berlin2q-soc-pinctrl", |
23 | "marvell,berlin2q-system-pinctrl" | 23 | "marvell,berlin2q-system-pinctrl", |
24 | "marvell,berlin4ct-avio-pinctrl", | ||
25 | "marvell,berlin4ct-soc-pinctrl", | ||
26 | "marvell,berlin4ct-system-pinctrl" | ||
24 | 27 | ||
25 | Required subnode-properties: | 28 | Required subnode-properties: |
26 | - groups: a list of strings describing the group names. | 29 | - groups: a list of strings describing the group names. |
diff --git a/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-gpio.txt b/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-gpio.txt index 6540ca56be5e..16589fb6f420 100644 --- a/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-gpio.txt +++ b/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-gpio.txt | |||
@@ -3,8 +3,8 @@ Broadcom Cygnus GPIO/PINCONF Controller | |||
3 | Required properties: | 3 | Required properties: |
4 | 4 | ||
5 | - compatible: | 5 | - compatible: |
6 | Must be "brcm,cygnus-ccm-gpio", "brcm,cygnus-asiu-gpio", or | 6 | Must be "brcm,cygnus-ccm-gpio", "brcm,cygnus-asiu-gpio", |
7 | "brcm,cygnus-crmu-gpio" | 7 | "brcm,cygnus-crmu-gpio" or "brcm,iproc-gpio" |
8 | 8 | ||
9 | - reg: | 9 | - reg: |
10 | Define the base and range of the I/O address space that contains the Cygnus | 10 | Define the base and range of the I/O address space that contains the Cygnus |
@@ -26,9 +26,13 @@ Optional properties: | |||
26 | - interrupt-controller: | 26 | - interrupt-controller: |
27 | Specifies that the node is an interrupt controller | 27 | Specifies that the node is an interrupt controller |
28 | 28 | ||
29 | - pinmux: | 29 | - gpio-ranges: |
30 | Specifies the phandle to the IOMUX device, where pins can be individually | 30 | Specifies the mapping between gpio controller and pin-controllers pins. |
31 | muxed to GPIO | 31 | This requires 4 fields in cells defined as - |
32 | 1. Phandle of pin-controller. | ||
33 | 2. GPIO base pin offset. | ||
34 | 3 Pin-control base pin offset. | ||
35 | 4. number of gpio pins which are linearly mapped from pin base. | ||
32 | 36 | ||
33 | Supported generic PINCONF properties in child nodes: | 37 | Supported generic PINCONF properties in child nodes: |
34 | 38 | ||
@@ -78,6 +82,8 @@ Example: | |||
78 | gpio-controller; | 82 | gpio-controller; |
79 | interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>; | 83 | interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>; |
80 | interrupt-controller; | 84 | interrupt-controller; |
85 | gpio-ranges = <&pinctrl 0 42 1>, | ||
86 | <&pinctrl 1 44 3>; | ||
81 | }; | 87 | }; |
82 | 88 | ||
83 | /* | 89 | /* |
diff --git a/Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt index 8bbf25d58656..457b2c68d47b 100644 --- a/Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt | |||
@@ -1,16 +1,42 @@ | |||
1 | * Freescale i.MX7 Dual IOMUX Controller | 1 | * Freescale i.MX7 Dual IOMUX Controller |
2 | 2 | ||
3 | iMX7D supports two iomuxc controllers, fsl,imx7d-iomuxc controller is similar | ||
4 | as previous iMX SoC generation and fsl,imx7d-iomuxc-lpsr which provides low | ||
5 | power state retention capabilities on gpios that are part of iomuxc-lpsr | ||
6 | (GPIO1_IO7..GPIO1_IO0). While iomuxc-lpsr provides its own set of registers for | ||
7 | mux and pad control settings, it shares the input select register from main | ||
8 | iomuxc controller for daisy chain settings, the fsl,input-sel property extends | ||
9 | fsl,imx-pinctrl driver to support iomuxc-lpsr controller. | ||
10 | |||
11 | iomuxc_lpsr: iomuxc-lpsr@302c0000 { | ||
12 | compatible = "fsl,imx7d-iomuxc-lpsr"; | ||
13 | reg = <0x302c0000 0x10000>; | ||
14 | fsl,input-sel = <&iomuxc>; | ||
15 | }; | ||
16 | |||
17 | iomuxc: iomuxc@30330000 { | ||
18 | compatible = "fsl,imx7d-iomuxc"; | ||
19 | reg = <0x30330000 0x10000>; | ||
20 | }; | ||
21 | |||
22 | Pheriparials using pads from iomuxc-lpsr support low state retention power | ||
23 | state, under LPSR mode GPIO's state of pads are retain. | ||
24 | |||
3 | Please refer to fsl,imx-pinctrl.txt in this directory for common binding part | 25 | Please refer to fsl,imx-pinctrl.txt in this directory for common binding part |
4 | and usage. | 26 | and usage. |
5 | 27 | ||
6 | Required properties: | 28 | Required properties: |
7 | - compatible: "fsl,imx7d-iomuxc" | 29 | - compatible: "fsl,imx7d-iomuxc" for main IOMUXC controller, or |
30 | "fsl,imx7d-iomuxc-lpsr" for Low Power State Retention IOMUXC controller. | ||
8 | - fsl,pins: each entry consists of 6 integers and represents the mux and config | 31 | - fsl,pins: each entry consists of 6 integers and represents the mux and config |
9 | setting for one pin. The first 5 integers <mux_reg conf_reg input_reg mux_val | 32 | setting for one pin. The first 5 integers <mux_reg conf_reg input_reg mux_val |
10 | input_val> are specified using a PIN_FUNC_ID macro, which can be found in | 33 | input_val> are specified using a PIN_FUNC_ID macro, which can be found in |
11 | imx7d-pinfunc.h under device tree source folder. The last integer CONFIG is | 34 | imx7d-pinfunc.h under device tree source folder. The last integer CONFIG is |
12 | the pad setting value like pull-up on this pin. Please refer to i.MX7 Dual | 35 | the pad setting value like pull-up on this pin. Please refer to i.MX7 Dual |
13 | Reference Manual for detailed CONFIG settings. | 36 | Reference Manual for detailed CONFIG settings. |
37 | - fsl,input-sel: required property for iomuxc-lpsr controller, this property is | ||
38 | a phandle for main iomuxc controller which shares the input select register for | ||
39 | daisy chain settings. | ||
14 | 40 | ||
15 | CONFIG bits definition: | 41 | CONFIG bits definition: |
16 | PAD_CTL_PUS_100K_DOWN (0 << 5) | 42 | PAD_CTL_PUS_100K_DOWN (0 << 5) |
@@ -25,3 +51,38 @@ PAD_CTL_DSE_X1 (0 << 0) | |||
25 | PAD_CTL_DSE_X2 (1 << 0) | 51 | PAD_CTL_DSE_X2 (1 << 0) |
26 | PAD_CTL_DSE_X3 (2 << 0) | 52 | PAD_CTL_DSE_X3 (2 << 0) |
27 | PAD_CTL_DSE_X4 (3 << 0) | 53 | PAD_CTL_DSE_X4 (3 << 0) |
54 | |||
55 | Examples: | ||
56 | While iomuxc-lpsr is intended to be used by dedicated peripherals to take | ||
57 | advantages of LPSR power mode, is also possible that an IP to use pads from | ||
58 | any of the iomux controllers. For example the I2C1 IP can use SCL pad from | ||
59 | iomuxc-lpsr controller and SDA pad from iomuxc controller as: | ||
60 | |||
61 | i2c1: i2c@30a20000 { | ||
62 | pinctrl-names = "default"; | ||
63 | pinctrl-0 = <&pinctrl_i2c1_1 &pinctrl_i2c1_2>; | ||
64 | status = "okay"; | ||
65 | }; | ||
66 | |||
67 | iomuxc-lpsr@302c0000 { | ||
68 | compatible = "fsl,imx7d-iomuxc-lpsr"; | ||
69 | reg = <0x302c0000 0x10000>; | ||
70 | fsl,input-sel = <&iomuxc>; | ||
71 | |||
72 | pinctrl_i2c1_1: i2c1grp-1 { | ||
73 | fsl,pins = < | ||
74 | MX7D_PAD_GPIO1_IO04__I2C1_SCL 0x4000007f | ||
75 | >; | ||
76 | }; | ||
77 | }; | ||
78 | |||
79 | iomuxc@30330000 { | ||
80 | compatible = "fsl,imx7d-iomuxc"; | ||
81 | reg = <0x30330000 0x10000>; | ||
82 | |||
83 | pinctrl_i2c1_2: i2c1grp-2 { | ||
84 | fsl,pins = < | ||
85 | MX7D_PAD_I2C1_SDA__I2C1_SDA 0x4000007f | ||
86 | >; | ||
87 | }; | ||
88 | }; | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt index 9496934528bd..ffadb7a371f6 100644 --- a/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt | |||
@@ -19,6 +19,7 @@ Required Properties: | |||
19 | - "renesas,pfc-r8a7791": for R8A7791 (R-Car M2-W) compatible pin-controller. | 19 | - "renesas,pfc-r8a7791": for R8A7791 (R-Car M2-W) compatible pin-controller. |
20 | - "renesas,pfc-r8a7793": for R8A7793 (R-Car M2-N) compatible pin-controller. | 20 | - "renesas,pfc-r8a7793": for R8A7793 (R-Car M2-N) compatible pin-controller. |
21 | - "renesas,pfc-r8a7794": for R8A7794 (R-Car E2) compatible pin-controller. | 21 | - "renesas,pfc-r8a7794": for R8A7794 (R-Car E2) compatible pin-controller. |
22 | - "renesas,pfc-r8a7795": for R8A7795 (R-Car H3) compatible pin-controller. | ||
22 | - "renesas,pfc-sh73a0": for SH73A0 (SH-Mobile AG5) compatible pin-controller. | 23 | - "renesas,pfc-sh73a0": for SH73A0 (SH-Mobile AG5) compatible pin-controller. |
23 | 24 | ||
24 | - reg: Base address and length of each memory resource used by the pin | 25 | - reg: Base address and length of each memory resource used by the pin |
diff --git a/Documentation/devicetree/bindings/power/bq24257.txt b/Documentation/devicetree/bindings/power/bq24257.txt index 5c9d3940d07c..d693702c9c1e 100644 --- a/Documentation/devicetree/bindings/power/bq24257.txt +++ b/Documentation/devicetree/bindings/power/bq24257.txt | |||
@@ -1,21 +1,64 @@ | |||
1 | Binding for TI bq24257 Li-Ion Charger | 1 | Binding for TI bq24250/bq24251/bq24257 Li-Ion Charger |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: Should contain one of the following: | 4 | - compatible: Should contain one of the following: |
5 | * "ti,bq24250" | ||
6 | * "ti,bq24251" | ||
5 | * "ti,bq24257" | 7 | * "ti,bq24257" |
6 | - reg: integer, i2c address of the device. | 8 | - reg: integer, i2c address of the device. |
9 | - interrupt-parent: Should be the phandle for the interrupt controller. Use in | ||
10 | conjunction with "interrupts". | ||
11 | - interrupts: Interrupt mapping for GPIO IRQ (configure for both edges). Use in | ||
12 | conjunction with "interrupt-parent". | ||
7 | - ti,battery-regulation-voltage: integer, maximum charging voltage in uV. | 13 | - ti,battery-regulation-voltage: integer, maximum charging voltage in uV. |
8 | - ti,charge-current: integer, maximum charging current in uA. | 14 | - ti,charge-current: integer, maximum charging current in uA. |
9 | - ti,termination-current: integer, charge will be terminated when current in | 15 | - ti,termination-current: integer, charge will be terminated when current in |
10 | constant-voltage phase drops below this value (in uA). | 16 | constant-voltage phase drops below this value (in uA). |
17 | |||
18 | Optional properties: | ||
19 | - pg-gpios: GPIO used for connecting the bq2425x device PG (Power Good) pin. | ||
20 | This pin is not available on all devices however it should be used if | ||
21 | possible as this is the recommended way to obtain the charger's input PG | ||
22 | state. If this pin is not specified a software-based approach for PG | ||
23 | detection is used. | ||
24 | - ti,current-limit: The maximum current to be drawn from the charger's input | ||
25 | (in uA). If this property is not specified, the input limit current is | ||
26 | set automatically using USB D+/D- signal based charger type detection. | ||
27 | If the hardware does not support the D+/D- based detection, a default | ||
28 | of 500,000 is used (=500mA) instead. | ||
29 | - ti,ovp-voltage: Configures the over voltage protection voltage (in uV). If | ||
30 | not specified a default of 6,5000,000 (=6.5V) is used. | ||
31 | - ti,in-dpm-voltage: Configures the threshold input voltage for the dynamic | ||
32 | power path management (in uV). If not specified a default of 4,360,000 | ||
33 | (=4.36V) is used. | ||
11 | 34 | ||
12 | Example: | 35 | Example: |
13 | 36 | ||
14 | bq24257 { | 37 | bq24257 { |
15 | compatible = "ti,bq24257"; | 38 | compatible = "ti,bq24257"; |
16 | reg = <0x6a>; | 39 | reg = <0x6a>; |
40 | interrupt-parent = <&gpio1>; | ||
41 | interrupts = <16 IRQ_TYPE_EDGE_BOTH>; | ||
42 | |||
43 | pg-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; | ||
17 | 44 | ||
18 | ti,battery-regulation-voltage = <4200000>; | 45 | ti,battery-regulation-voltage = <4200000>; |
19 | ti,charge-current = <1000000>; | 46 | ti,charge-current = <1000000>; |
20 | ti,termination-current = <50000>; | 47 | ti,termination-current = <50000>; |
21 | }; | 48 | }; |
49 | |||
50 | Example: | ||
51 | |||
52 | bq24250 { | ||
53 | compatible = "ti,bq24250"; | ||
54 | reg = <0x6a>; | ||
55 | interrupt-parent = <&gpio1>; | ||
56 | interrupts = <16 IRQ_TYPE_EDGE_BOTH>; | ||
57 | |||
58 | ti,battery-regulation-voltage = <4200000>; | ||
59 | ti,charge-current = <500000>; | ||
60 | ti,termination-current = <50000>; | ||
61 | ti,current-limit = <900000>; | ||
62 | ti,ovp-voltage = <9500000>; | ||
63 | ti,in-dpm-voltage = <4440000>; | ||
64 | }; | ||
diff --git a/Documentation/devicetree/bindings/power/da9150-fg.txt b/Documentation/devicetree/bindings/power/da9150-fg.txt new file mode 100644 index 000000000000..00236fe3ea31 --- /dev/null +++ b/Documentation/devicetree/bindings/power/da9150-fg.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | Dialog Semiconductor DA9150 Fuel-Gauge Power Supply bindings | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "dlg,da9150-fuel-gauge" for DA9150 Fuel-Gauge Power Supply | ||
5 | |||
6 | Optional properties: | ||
7 | - dlg,update-interval: Interval time (milliseconds) between battery level checks. | ||
8 | - dlg,warn-soc-level: Battery discharge level (%) where warning event raised. | ||
9 | [1 - 100] | ||
10 | - dlg,crit-soc-level: Battery discharge level (%) where critical event raised. | ||
11 | This value should be lower than the warning level. | ||
12 | [1 - 100] | ||
13 | |||
14 | |||
15 | Example: | ||
16 | |||
17 | fuel-gauge { | ||
18 | compatible = "dlg,da9150-fuel-gauge"; | ||
19 | |||
20 | dlg,update-interval = <10000>; | ||
21 | dlg,warn-soc-level = /bits/ 8 <15>; | ||
22 | dlg,crit-soc-level = /bits/ 8 <5>; | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt b/Documentation/devicetree/bindings/power/pd-samsung.txt index e151057d92f0..4e947372a693 100644 --- a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt +++ b/Documentation/devicetree/bindings/power/pd-samsung.txt | |||
@@ -43,9 +43,8 @@ Example: | |||
43 | mfc_pd: power-domain@10044060 { | 43 | mfc_pd: power-domain@10044060 { |
44 | compatible = "samsung,exynos4210-pd"; | 44 | compatible = "samsung,exynos4210-pd"; |
45 | reg = <0x10044060 0x20>; | 45 | reg = <0x10044060 0x20>; |
46 | clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MOUT_SW_ACLK333>, | 46 | clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MOUT_USER_ACLK333>; |
47 | <&clock CLK_MOUT_USER_ACLK333>; | 47 | clock-names = "oscclk", "clk0"; |
48 | clock-names = "oscclk", "pclk0", "clk0"; | ||
49 | #power-domain-cells = <0>; | 48 | #power-domain-cells = <0>; |
50 | }; | 49 | }; |
51 | 50 | ||
diff --git a/Documentation/devicetree/bindings/power/wakeup-source.txt b/Documentation/devicetree/bindings/power/wakeup-source.txt new file mode 100644 index 000000000000..963c6dfd484d --- /dev/null +++ b/Documentation/devicetree/bindings/power/wakeup-source.txt | |||
@@ -0,0 +1,71 @@ | |||
1 | Specifying wakeup capability for devices | ||
2 | ============================================ | ||
3 | |||
4 | Any device nodes | ||
5 | ---------------- | ||
6 | Nodes that describe devices which has wakeup capability must contain an | ||
7 | "wakeup-source" boolean property. | ||
8 | |||
9 | Also, if device is marked as a wakeup source, then all the primary | ||
10 | interrupt(s) can be used as wakeup interrupt(s). | ||
11 | |||
12 | However if the devices have dedicated interrupt as the wakeup source | ||
13 | then they need to specify/identify the same using device specific | ||
14 | interrupt name. In such cases only that interrupt can be used as wakeup | ||
15 | interrupt. | ||
16 | |||
17 | List of legacy properties and respective binding document | ||
18 | --------------------------------------------------------- | ||
19 | |||
20 | 1. "enable-sdio-wakeup" Documentation/devicetree/bindings/mmc/mmc.txt | ||
21 | 2. "gpio-key,wakeup" Documentation/devicetree/bindings/input/gpio-keys{,-polled}.txt | ||
22 | 3. "has-tpo" Documentation/devicetree/bindings/rtc/rtc-opal.txt | ||
23 | 4. "isil,irq2-can-wakeup-machine" Documentation/devicetree/bindings/rtc/isil,isl12057.txt | ||
24 | 5. "linux,wakeup" Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt | ||
25 | Documentation/devicetree/bindings/mfd/tc3589x.txt | ||
26 | Documentation/devicetree/bindings/input/ads7846.txt | ||
27 | 6. "linux,keypad-wakeup" Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt | ||
28 | 7. "linux,input-wakeup" Documentation/devicetree/bindings/input/samsung-keypad.txt | ||
29 | 8. "nvidia,wakeup-source" Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt | ||
30 | |||
31 | Examples | ||
32 | -------- | ||
33 | |||
34 | 1. With "wakeup" interrupt name | ||
35 | |||
36 | device@10000 { | ||
37 | compatible = "vendor,device-id"; | ||
38 | reg = <0x10000 0x1000>; | ||
39 | interrupts = <0 19 4>, <0 21 4>, <0 22 4>; | ||
40 | interrupt-names = "ack", "err", "wakeup"; | ||
41 | wakeup-source; | ||
42 | }; | ||
43 | |||
44 | 2. Without "wakeup" interrupt name | ||
45 | |||
46 | embedded-controller { | ||
47 | compatible = "google,cros-ec-i2c"; | ||
48 | reg = <0x1e>; | ||
49 | interrupts = <6 0>; | ||
50 | interrupt-parent = <&gpx1>; | ||
51 | pinctrl-names = "default"; | ||
52 | pinctrl-0 = <&ec_irq>; | ||
53 | wakeup-source; | ||
54 | }; | ||
55 | |||
56 | 3. Without interrupts | ||
57 | |||
58 | gpio_keys { | ||
59 | compatible = "gpio-keys"; | ||
60 | #address-cells = <1>; | ||
61 | #size-cells = <0>; | ||
62 | |||
63 | button@1 { | ||
64 | debounce_interval = <50>; | ||
65 | wakeup-source; | ||
66 | linux,code = <116>; | ||
67 | label = "POWER"; | ||
68 | gpios = <&iofpga_gpio0 0 0x4>; | ||
69 | }; | ||
70 | [....] | ||
71 | }; | ||
diff --git a/Documentation/devicetree/bindings/power_supply/axp20x_usb_power.txt b/Documentation/devicetree/bindings/power_supply/axp20x_usb_power.txt new file mode 100644 index 000000000000..862f4a49dc49 --- /dev/null +++ b/Documentation/devicetree/bindings/power_supply/axp20x_usb_power.txt | |||
@@ -0,0 +1,34 @@ | |||
1 | AXP20x USB power supply | ||
2 | |||
3 | Required Properties: | ||
4 | -compatible: "x-powers,axp202-usb-power-supply" | ||
5 | |||
6 | This node is a subnode of the axp20x PMIC. | ||
7 | |||
8 | Example: | ||
9 | |||
10 | axp209: pmic@34 { | ||
11 | compatible = "x-powers,axp209"; | ||
12 | reg = <0x34>; | ||
13 | interrupt-parent = <&nmi_intc>; | ||
14 | interrupts = <0 IRQ_TYPE_LEVEL_LOW>; | ||
15 | interrupt-controller; | ||
16 | #interrupt-cells = <1>; | ||
17 | |||
18 | regulators { | ||
19 | x-powers,dcdc-freq = <1500>; | ||
20 | |||
21 | vdd_cpu: dcdc2 { | ||
22 | regulator-always-on; | ||
23 | regulator-min-microvolt = <1000000>; | ||
24 | regulator-max-microvolt = <1450000>; | ||
25 | regulator-name = "vdd-cpu"; | ||
26 | }; | ||
27 | |||
28 | ... | ||
29 | }; | ||
30 | |||
31 | usb-power-supply: usb-power-supply { | ||
32 | compatible = "x-powers,axp202-usb-power-supply"; | ||
33 | }; | ||
34 | }; | ||
diff --git a/Documentation/devicetree/bindings/power_supply/qcom_smbb.txt b/Documentation/devicetree/bindings/power_supply/qcom_smbb.txt new file mode 100644 index 000000000000..65b88fac854b --- /dev/null +++ b/Documentation/devicetree/bindings/power_supply/qcom_smbb.txt | |||
@@ -0,0 +1,131 @@ | |||
1 | Qualcomm Switch-Mode Battery Charger and Boost | ||
2 | |||
3 | PROPERTIES | ||
4 | - compatible: | ||
5 | Usage: required | ||
6 | Value type: <stringlist> | ||
7 | Description: Must be one of: | ||
8 | - "qcom,pm8941-charger" | ||
9 | |||
10 | - reg: | ||
11 | Usage: required | ||
12 | Value type: <prop-encoded-array> | ||
13 | Description: Base address of registers for SMBB block | ||
14 | |||
15 | - interrupts: | ||
16 | Usage: required | ||
17 | Value type: <prop-encoded-array> | ||
18 | Description: The format of the specifier is defined by the binding document | ||
19 | describing the node's interrupt parent. Must contain one | ||
20 | specifier for each of the following interrupts, in order: | ||
21 | - charge done | ||
22 | - charge fast mode | ||
23 | - charge trickle mode | ||
24 | - battery temperature ok | ||
25 | - battery present | ||
26 | - charger disconnected | ||
27 | - USB-in valid | ||
28 | - DC-in valid | ||
29 | |||
30 | - interrupt-names: | ||
31 | Usage: required | ||
32 | Value type: <stringlist> | ||
33 | Description: Must contain the following list, strictly ordered: | ||
34 | "chg-done", | ||
35 | "chg-fast", | ||
36 | "chg-trkl", | ||
37 | "bat-temp-ok", | ||
38 | "bat-present", | ||
39 | "chg-gone", | ||
40 | "usb-valid", | ||
41 | "dc-valid" | ||
42 | |||
43 | - qcom,fast-charge-current-limit: | ||
44 | Usage: optional (default: 1A, or pre-configured value) | ||
45 | Value type: <u32>; uA; range [100mA : 3A] | ||
46 | Description: Maximum charge current; May be clamped to safety limits. | ||
47 | |||
48 | - qcom,fast-charge-low-threshold-voltage: | ||
49 | Usage: optional (default: 3.2V, or pre-configured value) | ||
50 | Value type: <u32>; uV; range [2.1V : 3.6V] | ||
51 | Description: Battery voltage limit above which fast charging may operate; | ||
52 | Below this value linear or switch-mode auto-trickle-charging | ||
53 | will operate. | ||
54 | |||
55 | - qcom,fast-charge-high-threshold-voltage: | ||
56 | Usage: optional (default: 4.2V, or pre-configured value) | ||
57 | Value type: <u32>; uV; range [3.24V : 5V] | ||
58 | Description: Battery voltage limit below which fast charging may operate; | ||
59 | The fast charger will attempt to charge the battery to this | ||
60 | voltage. May be clamped to safety limits. | ||
61 | |||
62 | - qcom,fast-charge-safe-voltage: | ||
63 | Usage: optional (default: 4.2V, or pre-configured value) | ||
64 | Value type: <u32>; uV; range [3.24V : 5V] | ||
65 | Description: Maximum safe battery voltage; May be pre-set by bootloader, in | ||
66 | which case, setting this will harmlessly fail. The property | ||
67 | 'fast-charge-high-watermark' will be clamped by this value. | ||
68 | |||
69 | - qcom,fast-charge-safe-current: | ||
70 | Usage: optional (default: 1A, or pre-configured value) | ||
71 | Value type: <u32>; uA; range [100mA : 3A] | ||
72 | Description: Maximum safe battery charge current; May pre-set by bootloader, | ||
73 | in which case, setting this will harmlessly fail. The property | ||
74 | 'qcom,fast-charge-current-limit' will be clamped by this value. | ||
75 | |||
76 | - qcom,auto-recharge-threshold-voltage: | ||
77 | Usage: optional (default: 4.1V, or pre-configured value) | ||
78 | Value type: <u32>; uV; range [3.24V : 5V] | ||
79 | Description: Battery voltage limit below which auto-recharge functionality | ||
80 | will restart charging after end-of-charge; The high cutoff | ||
81 | limit for auto-recharge is 5% above this value. | ||
82 | |||
83 | - qcom,minimum-input-voltage: | ||
84 | Usage: optional (default: 4.3V, or pre-configured value) | ||
85 | Value type: <u32>; uV; range [4.2V : 9.6V] | ||
86 | Description: Input voltage level above which charging may operate | ||
87 | |||
88 | - qcom,dc-current-limit: | ||
89 | Usage: optional (default: 100mA, or pre-configured value) | ||
90 | Value type: <u32>; uA; range [100mA : 2.5A] | ||
91 | Description: Default DC charge current limit | ||
92 | |||
93 | - qcom,disable-dc: | ||
94 | Usage: optional (default: false) | ||
95 | Value type: boolean: <u32> or <empty> | ||
96 | Description: Disable DC charger | ||
97 | |||
98 | - qcom,jeita-extended-temp-range: | ||
99 | Usage: optional (default: false) | ||
100 | Value type: boolean: <u32> or <empty> | ||
101 | Description: Enable JEITA extended temperature range; This does *not* | ||
102 | adjust the maximum charge voltage or current in the extended | ||
103 | temperature range. It only allows charging when the battery | ||
104 | is in the extended temperature range. Voltage/current | ||
105 | regulation must be done externally to fully comply with | ||
106 | the JEITA safety guidelines if this flag is set. | ||
107 | |||
108 | EXAMPLE | ||
109 | charger@1000 { | ||
110 | compatible = "qcom,pm8941-charger"; | ||
111 | reg = <0x1000 0x700>; | ||
112 | interrupts = <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>, | ||
113 | <0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>, | ||
114 | <0x0 0x10 4 IRQ_TYPE_EDGE_BOTH>, | ||
115 | <0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>, | ||
116 | <0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>, | ||
117 | <0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>, | ||
118 | <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>, | ||
119 | <0x0 0x14 1 IRQ_TYPE_EDGE_BOTH>; | ||
120 | interrupt-names = "chg-done", | ||
121 | "chg-fast", | ||
122 | "chg-trkl", | ||
123 | "bat-temp-ok", | ||
124 | "bat-present", | ||
125 | "chg-gone", | ||
126 | "usb-valid", | ||
127 | "dc-valid"; | ||
128 | |||
129 | qcom,fast-charge-current-limit = <1000000>; | ||
130 | qcom,dc-charge-current-limit = <1000000>; | ||
131 | }; | ||
diff --git a/Documentation/devicetree/bindings/power_supply/tps65217_charger.txt b/Documentation/devicetree/bindings/power_supply/tps65217_charger.txt new file mode 100644 index 000000000000..98d131acee95 --- /dev/null +++ b/Documentation/devicetree/bindings/power_supply/tps65217_charger.txt | |||
@@ -0,0 +1,12 @@ | |||
1 | TPS65217 Charger | ||
2 | |||
3 | Required Properties: | ||
4 | -compatible: "ti,tps65217-charger" | ||
5 | |||
6 | This node is a subnode of the tps65217 PMIC. | ||
7 | |||
8 | Example: | ||
9 | |||
10 | tps65217-charger { | ||
11 | compatible = "ti,tps65090-charger"; | ||
12 | }; | ||
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/mpc512x_lpbfifo.txt b/Documentation/devicetree/bindings/powerpc/fsl/mpc512x_lpbfifo.txt new file mode 100644 index 000000000000..b3b392fe1f61 --- /dev/null +++ b/Documentation/devicetree/bindings/powerpc/fsl/mpc512x_lpbfifo.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | Freescale MPC512x LocalPlus Bus FIFO (called SCLPC in the Reference Manual) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "fsl,mpc512x-lpbfifo"; | ||
5 | - reg: should contain the offset and length of SCLPC register set; | ||
6 | - interrupts: should contain the interrupt specifier for SCLPC; syntax of an | ||
7 | interrupt client node is described in interrupt-controller/interrupts.txt; | ||
8 | - dmas: should contain the DMA specifier for SCLPC as described at | ||
9 | dma/dma.txt and dma/mpc512x-dma.txt; | ||
10 | - dma-names: should be "rx-tx"; | ||
11 | |||
12 | Example: | ||
13 | |||
14 | sclpc@10100 { | ||
15 | compatible = "fsl,mpc512x-lpbfifo"; | ||
16 | reg = <0x10100 0x50>; | ||
17 | interrupts = <7 0x8>; | ||
18 | dmas = <&dma0 26>; | ||
19 | dma-names = "rx-tx"; | ||
20 | }; | ||
21 | |||
diff --git a/Documentation/devicetree/bindings/regulator/act8865-regulator.txt b/Documentation/devicetree/bindings/regulator/act8865-regulator.txt index e91485d11241..6067d9830d07 100644 --- a/Documentation/devicetree/bindings/regulator/act8865-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/act8865-regulator.txt | |||
@@ -8,6 +8,8 @@ Required properties: | |||
8 | Optional properties: | 8 | Optional properties: |
9 | - system-power-controller: Telling whether or not this pmic is controlling | 9 | - system-power-controller: Telling whether or not this pmic is controlling |
10 | the system power. See Documentation/devicetree/bindings/power/power-controller.txt . | 10 | the system power. See Documentation/devicetree/bindings/power/power-controller.txt . |
11 | - active-semi,vsel-high: Indicates the VSEL pin is high. | ||
12 | If this property is missing, assume the VSEL pin is low(0). | ||
11 | 13 | ||
12 | Optional input supply properties: | 14 | Optional input supply properties: |
13 | - for act8600: | 15 | - for act8600: |
@@ -49,6 +51,7 @@ Example: | |||
49 | pmic: act8865@5b { | 51 | pmic: act8865@5b { |
50 | compatible = "active-semi,act8865"; | 52 | compatible = "active-semi,act8865"; |
51 | reg = <0x5b>; | 53 | reg = <0x5b>; |
54 | active-semi,vsel-high; | ||
52 | status = "disabled"; | 55 | status = "disabled"; |
53 | 56 | ||
54 | regulators { | 57 | regulators { |
diff --git a/Documentation/devicetree/bindings/regulator/anatop-regulator.txt b/Documentation/devicetree/bindings/regulator/anatop-regulator.txt index 758eae24082a..37c4ea076f88 100644 --- a/Documentation/devicetree/bindings/regulator/anatop-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/anatop-regulator.txt | |||
@@ -13,6 +13,7 @@ Optional properties: | |||
13 | - anatop-delay-reg-offset: Anatop MFD step time register offset | 13 | - anatop-delay-reg-offset: Anatop MFD step time register offset |
14 | - anatop-delay-bit-shift: Bit shift for the step time register | 14 | - anatop-delay-bit-shift: Bit shift for the step time register |
15 | - anatop-delay-bit-width: Number of bits used in the step time register | 15 | - anatop-delay-bit-width: Number of bits used in the step time register |
16 | - vin-supply: The supply for this regulator | ||
16 | 17 | ||
17 | Any property defined as part of the core regulator | 18 | Any property defined as part of the core regulator |
18 | binding, defined in regulator.txt, can also be used. | 19 | binding, defined in regulator.txt, can also be used. |
diff --git a/Documentation/devicetree/bindings/regulator/arizona-regulator.txt b/Documentation/devicetree/bindings/regulator/arizona-regulator.txt new file mode 100644 index 000000000000..443564d7784f --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/arizona-regulator.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | Cirrus Logic Arizona class audio SoCs | ||
2 | |||
3 | These devices are audio SoCs with extensive digital capabilities and a range | ||
4 | of analogue I/O. | ||
5 | |||
6 | This document lists regulator specific bindings, see the primary binding | ||
7 | document: | ||
8 | ../mfd/arizona.txt | ||
9 | |||
10 | Optional properties: | ||
11 | - wlf,ldoena : GPIO specifier for the GPIO controlling LDOENA | ||
12 | |||
13 | Optional subnodes: | ||
14 | - ldo1 : Initial data for the LDO1 regulator, as covered in | ||
15 | Documentation/devicetree/bindings/regulator/regulator.txt | ||
16 | - micvdd : Initial data for the MICVDD regulator, as covered in | ||
17 | Documentation/devicetree/bindings/regulator/regulator.txt | ||
diff --git a/Documentation/devicetree/bindings/regulator/max77802.txt b/Documentation/devicetree/bindings/regulator/max77802.txt index 79e5476444f7..09d796ed48be 100644 --- a/Documentation/devicetree/bindings/regulator/max77802.txt +++ b/Documentation/devicetree/bindings/regulator/max77802.txt | |||
@@ -8,7 +8,28 @@ regulators that can be controlled over I2C. | |||
8 | 8 | ||
9 | Following properties should be present in main device node of the MFD chip. | 9 | Following properties should be present in main device node of the MFD chip. |
10 | 10 | ||
11 | Optional node: | 11 | Optional properties: |
12 | - inb1-supply: The input supply for BUCK1 | ||
13 | - inb2-supply: The input supply for BUCK2 | ||
14 | - inb3-supply: The input supply for BUCK3 | ||
15 | - inb4-supply: The input supply for BUCK4 | ||
16 | - inb5-supply: The input supply for BUCK5 | ||
17 | - inb6-supply: The input supply for BUCK6 | ||
18 | - inb7-supply: The input supply for BUCK7 | ||
19 | - inb8-supply: The input supply for BUCK8 | ||
20 | - inb9-supply: The input supply for BUCK9 | ||
21 | - inb10-supply: The input supply for BUCK10 | ||
22 | - inl1-supply: The input supply for LDO8 and LDO15 | ||
23 | - inl2-supply: The input supply for LDO17, LDO27, LDO30 and LDO35 | ||
24 | - inl3-supply: The input supply for LDO3, LDO5, LDO6 and LDO7 | ||
25 | - inl4-supply: The input supply for LDO10, LDO11, LDO13 and LDO14 | ||
26 | - inl5-supply: The input supply for LDO9 and LDO19 | ||
27 | - inl6-supply: The input supply for LDO4, LDO21, LDO24 and LDO33 | ||
28 | - inl7-supply: The input supply for LDO18, LDO20, LDO28 and LDO29 | ||
29 | - inl9-supply: The input supply for LDO12, LDO23, LDO25, LDO26, LDO32 and LDO34 | ||
30 | - inl10-supply: The input supply for LDO1 and LDO2 | ||
31 | |||
32 | Optional nodes: | ||
12 | - regulators : The regulators of max77802 have to be instantiated | 33 | - regulators : The regulators of max77802 have to be instantiated |
13 | under subnode named "regulators" using the following format. | 34 | under subnode named "regulators" using the following format. |
14 | 35 | ||
@@ -58,6 +79,8 @@ Example: | |||
58 | #address-cells = <1>; | 79 | #address-cells = <1>; |
59 | #size-cells = <0>; | 80 | #size-cells = <0>; |
60 | 81 | ||
82 | inb1-supply = <&parent_reg>; | ||
83 | |||
61 | regulators { | 84 | regulators { |
62 | ldo1_reg: LDO1 { | 85 | ldo1_reg: LDO1 { |
63 | regulator-name = "vdd_1v0"; | 86 | regulator-name = "vdd_1v0"; |
diff --git a/Documentation/devicetree/bindings/regulator/pbias-regulator.txt b/Documentation/devicetree/bindings/regulator/pbias-regulator.txt index 32aa26f1e434..acbcb452a69a 100644 --- a/Documentation/devicetree/bindings/regulator/pbias-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/pbias-regulator.txt | |||
@@ -2,7 +2,12 @@ PBIAS internal regulator for SD card dual voltage i/o pads on OMAP SoCs. | |||
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: | 4 | - compatible: |
5 | - "ti,pbias-omap" for OMAP2, OMAP3, OMAP4, OMAP5, DRA7. | 5 | - should be "ti,pbias-dra7" for DRA7 |
6 | - should be "ti,pbias-omap2" for OMAP2 | ||
7 | - should be "ti,pbias-omap3" for OMAP3 | ||
8 | - should be "ti,pbias-omap4" for OMAP4 | ||
9 | - should be "ti,pbias-omap5" for OMAP5 | ||
10 | - "ti,pbias-omap" is deprecated | ||
6 | - reg: pbias register offset from syscon base and size of pbias register. | 11 | - reg: pbias register offset from syscon base and size of pbias register. |
7 | - syscon : phandle of the system control module | 12 | - syscon : phandle of the system control module |
8 | - regulator-name : should be | 13 | - regulator-name : should be |
diff --git a/Documentation/devicetree/bindings/regulator/regulator.txt b/Documentation/devicetree/bindings/regulator/regulator.txt index 24bd422cecd5..1d112fc456aa 100644 --- a/Documentation/devicetree/bindings/regulator/regulator.txt +++ b/Documentation/devicetree/bindings/regulator/regulator.txt | |||
@@ -11,6 +11,7 @@ Optional properties: | |||
11 | - regulator-always-on: boolean, regulator should never be disabled | 11 | - regulator-always-on: boolean, regulator should never be disabled |
12 | - regulator-boot-on: bootloader/firmware enabled regulator | 12 | - regulator-boot-on: bootloader/firmware enabled regulator |
13 | - regulator-allow-bypass: allow the regulator to go into bypass mode | 13 | - regulator-allow-bypass: allow the regulator to go into bypass mode |
14 | - regulator-allow-set-load: allow the regulator performance level to be configured | ||
14 | - <name>-supply: phandle to the parent supply/regulator node | 15 | - <name>-supply: phandle to the parent supply/regulator node |
15 | - regulator-ramp-delay: ramp delay for regulator(in uV/uS) | 16 | - regulator-ramp-delay: ramp delay for regulator(in uV/uS) |
16 | For hardware which supports disabling ramp rate, it should be explicitly | 17 | For hardware which supports disabling ramp rate, it should be explicitly |
diff --git a/Documentation/devicetree/bindings/regulator/tps65023.txt b/Documentation/devicetree/bindings/regulator/tps65023.txt new file mode 100644 index 000000000000..a4714e4da370 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/tps65023.txt | |||
@@ -0,0 +1,60 @@ | |||
1 | TPS65023 family of regulators | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Must be one of the following. | ||
5 | "ti,tps65020", | ||
6 | "ti,tps65021", | ||
7 | "ti,tps65023", | ||
8 | - reg: I2C slave address | ||
9 | - regulators: list of regulators provided by this controller, must be named | ||
10 | after their hardware counterparts: VDCDC[1-3] and LDO[1-2] | ||
11 | - regulators: This is the list of child nodes that specify the regulator | ||
12 | initialization data for defined regulators. The definition for each of | ||
13 | these nodes is defined using the standard binding for regulators found at | ||
14 | Documentation/devicetree/bindings/regulator/regulator.txt. | ||
15 | |||
16 | Each regulator is defined using the standard binding for regulators. | ||
17 | |||
18 | Example: | ||
19 | |||
20 | tps65023@48 { | ||
21 | compatible = "ti,tps65023"; | ||
22 | reg = <0x48>; | ||
23 | |||
24 | regulators { | ||
25 | VDCDC1 { | ||
26 | regulator-name = "vdd_mpu"; | ||
27 | regulator-always-on; | ||
28 | regulator-min-microvolt = <1200000>; | ||
29 | regulator-max-microvolt = <1200000>; | ||
30 | }; | ||
31 | |||
32 | VDCDC2 { | ||
33 | regulator-name = "vdd_core"; | ||
34 | regulator-always-on; | ||
35 | regulator-min-microvolt = <3300000>; | ||
36 | regulator-max-microvolt = <3300000>; | ||
37 | }; | ||
38 | |||
39 | VDCDC3 { | ||
40 | regulator-name = "vdd_io"; | ||
41 | regulator-always-on; | ||
42 | regulator-min-microvolt = <1800000>; | ||
43 | regulator-max-microvolt = <1800000>; | ||
44 | }; | ||
45 | |||
46 | LDO1 { | ||
47 | regulator-name = "vdd_usb18"; | ||
48 | regulator-always-on; | ||
49 | regulator-min-microvolt = <1800000>; | ||
50 | regulator-max-microvolt = <1800000>; | ||
51 | }; | ||
52 | |||
53 | LDO2 { | ||
54 | regulator-name = "vdd_usb33"; | ||
55 | regulator-always-on; | ||
56 | regulator-min-microvolt = <3300000>; | ||
57 | regulator-max-microvolt = <3300000>; | ||
58 | }; | ||
59 | }; | ||
60 | }; | ||
diff --git a/Documentation/devicetree/bindings/hwrng/atmel-trng.txt b/Documentation/devicetree/bindings/rng/atmel-trng.txt index 4ac5aaa2d024..4ac5aaa2d024 100644 --- a/Documentation/devicetree/bindings/hwrng/atmel-trng.txt +++ b/Documentation/devicetree/bindings/rng/atmel-trng.txt | |||
diff --git a/Documentation/devicetree/bindings/hwrng/brcm,iproc-rng200.txt b/Documentation/devicetree/bindings/rng/brcm,iproc-rng200.txt index e25a456664b9..e25a456664b9 100644 --- a/Documentation/devicetree/bindings/hwrng/brcm,iproc-rng200.txt +++ b/Documentation/devicetree/bindings/rng/brcm,iproc-rng200.txt | |||
diff --git a/Documentation/devicetree/bindings/hwrng/omap_rng.txt b/Documentation/devicetree/bindings/rng/omap_rng.txt index 6a62acd86953..6a62acd86953 100644 --- a/Documentation/devicetree/bindings/hwrng/omap_rng.txt +++ b/Documentation/devicetree/bindings/rng/omap_rng.txt | |||
diff --git a/Documentation/devicetree/bindings/rng/samsung,exynos-rng4.txt b/Documentation/devicetree/bindings/rng/samsung,exynos-rng4.txt new file mode 100644 index 000000000000..4ca8dd4d7e66 --- /dev/null +++ b/Documentation/devicetree/bindings/rng/samsung,exynos-rng4.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | Exynos Pseudo Random Number Generator | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible : Should be "samsung,exynos4-rng". | ||
6 | - reg : Specifies base physical address and size of the registers map. | ||
7 | - clocks : Phandle to clock-controller plus clock-specifier pair. | ||
8 | - clock-names : "secss" as a clock name. | ||
9 | |||
10 | Example: | ||
11 | |||
12 | rng@10830400 { | ||
13 | compatible = "samsung,exynos4-rng"; | ||
14 | reg = <0x10830400 0x200>; | ||
15 | clocks = <&clock CLK_SSS>; | ||
16 | clock-names = "secss"; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/rng/st,rng.txt b/Documentation/devicetree/bindings/rng/st,rng.txt new file mode 100644 index 000000000000..35734bc282e9 --- /dev/null +++ b/Documentation/devicetree/bindings/rng/st,rng.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | STMicroelectronics HW Random Number Generator | ||
2 | ---------------------------------------------- | ||
3 | |||
4 | Required parameters: | ||
5 | compatible : Should be "st,rng" | ||
6 | reg : Base address and size of IP's register map. | ||
7 | clocks : Phandle to device's clock (See: ../clocks/clock-bindings.txt) | ||
8 | |||
9 | Example: | ||
10 | |||
11 | rng@fee80000 { | ||
12 | compatible = "st,rng"; | ||
13 | reg = <0xfee80000 0x1000>; | ||
14 | clocks = <&clk_sysin>; | ||
15 | } | ||
diff --git a/Documentation/devicetree/bindings/rng/st,stm32-rng.txt b/Documentation/devicetree/bindings/rng/st,stm32-rng.txt new file mode 100644 index 000000000000..47f04176f93b --- /dev/null +++ b/Documentation/devicetree/bindings/rng/st,stm32-rng.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | STMicroelectronics STM32 HW RNG | ||
2 | =============================== | ||
3 | |||
4 | The STM32 hardware random number generator is a simple fixed purpose IP and | ||
5 | is fully separated from other crypto functions. | ||
6 | |||
7 | Required properties: | ||
8 | |||
9 | - compatible : Should be "st,stm32-rng" | ||
10 | - reg : Should be register base and length as documented in the datasheet | ||
11 | - interrupts : The designated IRQ line for the RNG | ||
12 | - clocks : The clock needed to enable the RNG | ||
13 | |||
14 | Example: | ||
15 | |||
16 | rng: rng@50060800 { | ||
17 | compatible = "st,stm32-rng"; | ||
18 | reg = <0x50060800 0x400>; | ||
19 | interrupts = <80>; | ||
20 | clocks = <&rcc 0 38>; | ||
21 | }; | ||
diff --git a/Documentation/devicetree/bindings/hwrng/timeriomem_rng.txt b/Documentation/devicetree/bindings/rng/timeriomem_rng.txt index 6616d15866a3..6616d15866a3 100644 --- a/Documentation/devicetree/bindings/hwrng/timeriomem_rng.txt +++ b/Documentation/devicetree/bindings/rng/timeriomem_rng.txt | |||
diff --git a/Documentation/devicetree/bindings/rtc/dallas,ds1390.txt b/Documentation/devicetree/bindings/rtc/dallas,ds1390.txt new file mode 100644 index 000000000000..8e76f2648796 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/dallas,ds1390.txt | |||
@@ -0,0 +1,18 @@ | |||
1 | * Dallas DS1390 SPI Serial Real-Time Clock | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should contain "dallas,ds1390". | ||
5 | - reg: SPI address for chip | ||
6 | |||
7 | Optional properties: | ||
8 | - trickle-resistor-ohms : Selected resistor for trickle charger | ||
9 | Values usable for ds1390 are 250, 2000, 4000 | ||
10 | Should be given if trickle charger should be enabled | ||
11 | - trickle-diode-disable : Do not use internal trickle charger diode | ||
12 | Should be given if internal trickle charger diode should be disabled | ||
13 | Example: | ||
14 | ds1390: rtc@68 { | ||
15 | compatible = "dallas,ds1390"; | ||
16 | trickle-resistor-ohms = <250>; | ||
17 | reg = <0>; | ||
18 | }; | ||
diff --git a/Documentation/devicetree/bindings/rtc/isil,isl12057.txt b/Documentation/devicetree/bindings/rtc/isil,isl12057.txt index 501c39ceae79..cf83e0940302 100644 --- a/Documentation/devicetree/bindings/rtc/isil,isl12057.txt +++ b/Documentation/devicetree/bindings/rtc/isil,isl12057.txt | |||
@@ -5,7 +5,7 @@ consisting of a compatible field, an address and possibly an interrupt | |||
5 | line). | 5 | line). |
6 | 6 | ||
7 | Nonetheless, it also supports an option boolean property | 7 | Nonetheless, it also supports an option boolean property |
8 | ("isil,irq2-can-wakeup-machine") to handle the specific use-case found | 8 | ("wakeup-source") to handle the specific use-case found |
9 | on at least three in-tree users of the chip (NETGEAR ReadyNAS 102, 104 | 9 | on at least three in-tree users of the chip (NETGEAR ReadyNAS 102, 104 |
10 | and 2120 ARM-based NAS); On those devices, the IRQ#2 pin of the chip | 10 | and 2120 ARM-based NAS); On those devices, the IRQ#2 pin of the chip |
11 | (associated with the alarm supported by the driver) is not connected | 11 | (associated with the alarm supported by the driver) is not connected |
@@ -22,9 +22,9 @@ Required properties supported by the device: | |||
22 | 22 | ||
23 | Optional properties: | 23 | Optional properties: |
24 | 24 | ||
25 | - "isil,irq2-can-wakeup-machine": mark the chip as a wakeup source, | 25 | - "wakeup-source": mark the chip as a wakeup source, independently of |
26 | independently of the availability of an IRQ line connected to the | 26 | the availability of an IRQ line connected to the SoC. |
27 | SoC. | 27 | (Legacy property supported: "isil,irq2-can-wakeup-machine") |
28 | 28 | ||
29 | - "interrupt-parent", "interrupts": for passing the interrupt line | 29 | - "interrupt-parent", "interrupts": for passing the interrupt line |
30 | of the SoC connected to IRQ#2 of the RTC chip. | 30 | of the SoC connected to IRQ#2 of the RTC chip. |
@@ -74,5 +74,5 @@ PMIC, allowing the device to be started based on configured alarm: | |||
74 | isl12057: isl12057@68 { | 74 | isl12057: isl12057@68 { |
75 | compatible = "isil,isl12057"; | 75 | compatible = "isil,isl12057"; |
76 | reg = <0x68>; | 76 | reg = <0x68>; |
77 | isil,irq2-can-wakeup-machine; | 77 | wakeup-source; |
78 | }; | 78 | }; |
diff --git a/Documentation/devicetree/bindings/rtc/pcf8563.txt b/Documentation/devicetree/bindings/rtc/pcf8563.txt new file mode 100644 index 000000000000..72f6d2c9665e --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/pcf8563.txt | |||
@@ -0,0 +1,25 @@ | |||
1 | * Philips PCF8563/Epson RTC8564 Real Time Clock | ||
2 | |||
3 | Philips PCF8563/Epson RTC8564 Real Time Clock | ||
4 | |||
5 | Required properties: | ||
6 | see: Documentation/devicetree/bindings/i2c/trivial-devices.txt | ||
7 | |||
8 | Optional property: | ||
9 | - #clock-cells: Should be 0. | ||
10 | - clock-output-names: | ||
11 | overwrite the default clock name "pcf8563-clkout" | ||
12 | |||
13 | Example: | ||
14 | |||
15 | pcf8563: pcf8563@51 { | ||
16 | compatible = "nxp,pcf8563"; | ||
17 | reg = <0x51>; | ||
18 | #clock-cells = <0>; | ||
19 | }; | ||
20 | |||
21 | device { | ||
22 | ... | ||
23 | clocks = <&pcf8563>; | ||
24 | ... | ||
25 | }; | ||
diff --git a/Documentation/devicetree/bindings/rtc/rtc-opal.txt b/Documentation/devicetree/bindings/rtc/rtc-opal.txt index af87e5ecac54..a1734e5cb75b 100644 --- a/Documentation/devicetree/bindings/rtc/rtc-opal.txt +++ b/Documentation/devicetree/bindings/rtc/rtc-opal.txt | |||
@@ -5,12 +5,13 @@ Required properties: | |||
5 | - comapatible: Should be "ibm,opal-rtc" | 5 | - comapatible: Should be "ibm,opal-rtc" |
6 | 6 | ||
7 | Optional properties: | 7 | Optional properties: |
8 | - has-tpo: Decides if the wakeup is supported or not. | 8 | - wakeup-source: Decides if the wakeup is supported or not |
9 | (Legacy property supported: "has-tpo") | ||
9 | 10 | ||
10 | Example: | 11 | Example: |
11 | rtc { | 12 | rtc { |
12 | compatible = "ibm,opal-rtc"; | 13 | compatible = "ibm,opal-rtc"; |
13 | has-tpo; | 14 | wakeup-source; |
14 | phandle = <0x10000029>; | 15 | phandle = <0x10000029>; |
15 | linux,phandle = <0x10000029>; | 16 | linux,phandle = <0x10000029>; |
16 | }; | 17 | }; |
diff --git a/Documentation/devicetree/bindings/serial/ingenic,uart.txt b/Documentation/devicetree/bindings/serial/ingenic,uart.txt index c2d3b3abe7d9..02cb7fe59cb7 100644 --- a/Documentation/devicetree/bindings/serial/ingenic,uart.txt +++ b/Documentation/devicetree/bindings/serial/ingenic,uart.txt | |||
@@ -1,7 +1,8 @@ | |||
1 | * Ingenic SoC UART | 1 | * Ingenic SoC UART |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "ingenic,jz4740-uart" or "ingenic,jz4780-uart" | 4 | - compatible : "ingenic,jz4740-uart", "ingenic,jz4760-uart", |
5 | "ingenic,jz4775-uart" or "ingenic,jz4780-uart" | ||
5 | - reg : offset and length of the register set for the device. | 6 | - reg : offset and length of the register set for the device. |
6 | - interrupts : should contain uart interrupt. | 7 | - interrupts : should contain uart interrupt. |
7 | - clocks : phandles to the module & baud clocks. | 8 | - clocks : phandles to the module & baud clocks. |
diff --git a/Documentation/devicetree/bindings/serial/mrvl,pxa-ssp.txt b/Documentation/devicetree/bindings/serial/mrvl,pxa-ssp.txt index 669b8140dd79..d10cc06c0c37 100644 --- a/Documentation/devicetree/bindings/serial/mrvl,pxa-ssp.txt +++ b/Documentation/devicetree/bindings/serial/mrvl,pxa-ssp.txt | |||
@@ -10,7 +10,6 @@ Required properties: | |||
10 | mvrl,pxa168-ssp | 10 | mvrl,pxa168-ssp |
11 | mrvl,pxa910-ssp | 11 | mrvl,pxa910-ssp |
12 | mrvl,ce4100-ssp | 12 | mrvl,ce4100-ssp |
13 | mrvl,lpss-ssp | ||
14 | 13 | ||
15 | - reg: The memory base | 14 | - reg: The memory base |
16 | - dmas: Two dma phandles, one for rx, one for tx | 15 | - dmas: Two dma phandles, one for rx, one for tx |
diff --git a/Documentation/devicetree/bindings/serial/pl011.txt b/Documentation/devicetree/bindings/serial/pl011.txt index cbae3d9a0278..77863aefe9ef 100644 --- a/Documentation/devicetree/bindings/serial/pl011.txt +++ b/Documentation/devicetree/bindings/serial/pl011.txt | |||
@@ -19,7 +19,7 @@ Optional properties: | |||
19 | must correspond to the PCLK clocking the internal logic | 19 | must correspond to the PCLK clocking the internal logic |
20 | of the block. Just listing one clock (the first one) is | 20 | of the block. Just listing one clock (the first one) is |
21 | deprecated. | 21 | deprecated. |
22 | - clocks-names: | 22 | - clock-names: |
23 | When present, the first clock listed must be named | 23 | When present, the first clock listed must be named |
24 | "uartclk" and the second clock listed must be named | 24 | "uartclk" and the second clock listed must be named |
25 | "apb_pclk" | 25 | "apb_pclk" |
diff --git a/Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt b/Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt index a2114c217376..182777fac9a2 100644 --- a/Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt +++ b/Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt | |||
@@ -26,6 +26,12 @@ Required properties: | |||
26 | Optional properties: | 26 | Optional properties: |
27 | - dmas: Should contain dma specifiers for transmit and receive channels | 27 | - dmas: Should contain dma specifiers for transmit and receive channels |
28 | - dma-names: Should contain "tx" for transmit and "rx" for receive channels | 28 | - dma-names: Should contain "tx" for transmit and "rx" for receive channels |
29 | - qcom,tx-crci: Identificator <u32> for Client Rate Control Interface to be | ||
30 | used with TX DMA channel. Required when using DMA for transmission | ||
31 | with UARTDM v1.3 and bellow. | ||
32 | - qcom,rx-crci: Identificator <u32> for Client Rate Control Interface to be | ||
33 | used with RX DMA channel. Required when using DMA for reception | ||
34 | with UARTDM v1.3 and bellow. | ||
29 | 35 | ||
30 | Note: Aliases may be defined to ensure the correct ordering of the UARTs. | 36 | Note: Aliases may be defined to ensure the correct ordering of the UARTs. |
31 | The alias serialN will result in the UART being assigned port N. If any | 37 | The alias serialN will result in the UART being assigned port N. If any |
diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt index e84b13a8eda3..73f825e5e644 100644 --- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt +++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | |||
@@ -23,6 +23,8 @@ Required properties: | |||
23 | - "renesas,scifa-r8a7794" for R8A7794 (R-Car E2) SCIFA compatible UART. | 23 | - "renesas,scifa-r8a7794" for R8A7794 (R-Car E2) SCIFA compatible UART. |
24 | - "renesas,scifb-r8a7794" for R8A7794 (R-Car E2) SCIFB compatible UART. | 24 | - "renesas,scifb-r8a7794" for R8A7794 (R-Car E2) SCIFB compatible UART. |
25 | - "renesas,hscif-r8a7794" for R8A7794 (R-Car E2) HSCIF compatible UART. | 25 | - "renesas,hscif-r8a7794" for R8A7794 (R-Car E2) HSCIF compatible UART. |
26 | - "renesas,scif-r8a7795" for R8A7795 (R-Car H3) SCIF compatible UART. | ||
27 | - "renesas,hscif-r8a7795" for R8A7795 (R-Car H3) HSCIF compatible UART. | ||
26 | - "renesas,scifa-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFA compatible UART. | 28 | - "renesas,scifa-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFA compatible UART. |
27 | - "renesas,scifb-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFB compatible UART. | 29 | - "renesas,scifb-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFB compatible UART. |
28 | - "renesas,scif" for generic SCIF compatible UART. | 30 | - "renesas,scif" for generic SCIF compatible UART. |
diff --git a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt index 289c40ed7470..12bbe9f22560 100644 --- a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt +++ b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt | |||
@@ -15,6 +15,9 @@ The supplying peripheral clock can also be handled, needing a second property | |||
15 | Required elements: "baudclk", "apb_pclk" | 15 | Required elements: "baudclk", "apb_pclk" |
16 | 16 | ||
17 | Optional properties: | 17 | Optional properties: |
18 | - snps,uart-16550-compatible : reflects the value of UART_16550_COMPATIBLE | ||
19 | configuration parameter. Define this if your UART does not implement the busy | ||
20 | functionality. | ||
18 | - resets : phandle to the parent reset controller. | 21 | - resets : phandle to the parent reset controller. |
19 | - reg-shift : quantity to shift the register offsets by. If this property is | 22 | - reg-shift : quantity to shift the register offsets by. If this property is |
20 | not present then the register offsets are not shifted. | 23 | not present then the register offsets are not shifted. |
diff --git a/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt b/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt index c0511142b39c..a6c8afc8385a 100644 --- a/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt +++ b/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt | |||
@@ -17,9 +17,9 @@ Required properties: | |||
17 | - reg: Address range of the SCPSYS unit | 17 | - reg: Address range of the SCPSYS unit |
18 | - infracfg: must contain a phandle to the infracfg controller | 18 | - infracfg: must contain a phandle to the infracfg controller |
19 | - clock, clock-names: clocks according to the common clock binding. | 19 | - clock, clock-names: clocks according to the common clock binding. |
20 | The clocks needed "mm" and "mfg". These are the | 20 | The clocks needed "mm", "mfg", "venc" and "venc_lt". |
21 | clocks which hardware needs to be enabled before | 21 | These are the clocks which hardware needs to be enabled |
22 | enabling certain power domains. | 22 | before enabling certain power domains. |
23 | 23 | ||
24 | Example: | 24 | Example: |
25 | 25 | ||
@@ -30,7 +30,9 @@ Example: | |||
30 | infracfg = <&infracfg>; | 30 | infracfg = <&infracfg>; |
31 | clocks = <&clk26m>, | 31 | clocks = <&clk26m>, |
32 | <&topckgen CLK_TOP_MM_SEL>; | 32 | <&topckgen CLK_TOP_MM_SEL>; |
33 | clock-names = "mfg", "mm"; | 33 | <&topckgen CLK_TOP_VENC_SEL>, |
34 | <&topckgen CLK_TOP_VENC_LT_SEL>; | ||
35 | clock-names = "mfg", "mm", "venc", "venc_lt"; | ||
34 | }; | 36 | }; |
35 | 37 | ||
36 | Example consumer: | 38 | Example consumer: |
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,smem.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,smem.txt new file mode 100644 index 000000000000..9326cdf6e1b1 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,smem.txt | |||
@@ -0,0 +1,57 @@ | |||
1 | Qualcomm Shared Memory Manager binding | ||
2 | |||
3 | This binding describes the Qualcomm Shared Memory Manager, used to share data | ||
4 | between various subsystems and OSes in Qualcomm platforms. | ||
5 | |||
6 | - compatible: | ||
7 | Usage: required | ||
8 | Value type: <stringlist> | ||
9 | Definition: must be: | ||
10 | "qcom,smem" | ||
11 | |||
12 | - memory-region: | ||
13 | Usage: required | ||
14 | Value type: <prop-encoded-array> | ||
15 | Definition: handle to memory reservation for main SMEM memory region. | ||
16 | |||
17 | - qcom,rpm-msg-ram: | ||
18 | Usage: required | ||
19 | Value type: <prop-encoded-array> | ||
20 | Definition: handle to RPM message memory resource | ||
21 | |||
22 | - hwlocks: | ||
23 | Usage: required | ||
24 | Value type: <prop-encoded-array> | ||
25 | Definition: reference to a hwspinlock used to protect allocations from | ||
26 | the shared memory | ||
27 | |||
28 | = EXAMPLE | ||
29 | The following example shows the SMEM setup for MSM8974, with a main SMEM region | ||
30 | at 0xfa00000 and the RPM message ram at 0xfc428000: | ||
31 | |||
32 | reserved-memory { | ||
33 | #address-cells = <1>; | ||
34 | #size-cells = <1>; | ||
35 | ranges; | ||
36 | |||
37 | smem_region: smem@fa00000 { | ||
38 | reg = <0xfa00000 0x200000>; | ||
39 | no-map; | ||
40 | }; | ||
41 | }; | ||
42 | |||
43 | smem@fa00000 { | ||
44 | compatible = "qcom,smem"; | ||
45 | |||
46 | memory-region = <&smem_region>; | ||
47 | qcom,rpm-msg-ram = <&rpm_msg_ram>; | ||
48 | |||
49 | hwlocks = <&tcsr_mutex 3>; | ||
50 | }; | ||
51 | |||
52 | soc { | ||
53 | rpm_msg_ram: memory@fc428000 { | ||
54 | compatible = "qcom,rpm-msg-ram"; | ||
55 | reg = <0xfc428000 0x4000>; | ||
56 | }; | ||
57 | }; | ||
diff --git a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt b/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt new file mode 100644 index 000000000000..112756e11802 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt | |||
@@ -0,0 +1,46 @@ | |||
1 | * Rockchip Power Domains | ||
2 | |||
3 | Rockchip processors include support for multiple power domains which can be | ||
4 | powered up/down by software based on different application scenes to save power. | ||
5 | |||
6 | Required properties for power domain controller: | ||
7 | - compatible: Should be one of the following. | ||
8 | "rockchip,rk3288-power-controller" - for RK3288 SoCs. | ||
9 | - #power-domain-cells: Number of cells in a power-domain specifier. | ||
10 | Should be 1 for multiple PM domains. | ||
11 | - #address-cells: Should be 1. | ||
12 | - #size-cells: Should be 0. | ||
13 | |||
14 | Required properties for power domain sub nodes: | ||
15 | - reg: index of the power domain, should use macros in: | ||
16 | "include/dt-bindings/power/rk3288-power.h" - for RK3288 type power domain. | ||
17 | - clocks (optional): phandles to clocks which need to be enabled while power domain | ||
18 | switches state. | ||
19 | |||
20 | Example: | ||
21 | |||
22 | power: power-controller { | ||
23 | compatible = "rockchip,rk3288-power-controller"; | ||
24 | #power-domain-cells = <1>; | ||
25 | #address-cells = <1>; | ||
26 | #size-cells = <0>; | ||
27 | |||
28 | pd_gpu { | ||
29 | reg = <RK3288_PD_GPU>; | ||
30 | clocks = <&cru ACLK_GPU>; | ||
31 | }; | ||
32 | }; | ||
33 | |||
34 | Node of a device using power domains must have a power-domains property, | ||
35 | containing a phandle to the power device node and an index specifying which | ||
36 | power domain to use. | ||
37 | The index should use macros in: | ||
38 | "include/dt-bindings/power/rk3288-power.h" - for rk3288 type power domain. | ||
39 | |||
40 | Example of the node using power domain: | ||
41 | |||
42 | node { | ||
43 | /* ... */ | ||
44 | power-domains = <&power RK3288_PD_GPU>; | ||
45 | /* ... */ | ||
46 | }; | ||
diff --git a/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt b/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt index d8e8cdb733f9..d1ce21a4904d 100644 --- a/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt +++ b/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt | |||
@@ -221,7 +221,6 @@ qmss: qmss@2a40000 { | |||
221 | #size-cells = <1>; | 221 | #size-cells = <1>; |
222 | ranges; | 222 | ranges; |
223 | pdsp0@0x2a10000 { | 223 | pdsp0@0x2a10000 { |
224 | firmware = "keystone/qmss_pdsp_acc48_k2_le_1_0_0_8.fw"; | ||
225 | reg = <0x2a10000 0x1000>, | 224 | reg = <0x2a10000 0x1000>, |
226 | <0x2a0f000 0x100>, | 225 | <0x2a0f000 0x100>, |
227 | <0x2a0c000 0x3c8>, | 226 | <0x2a0c000 0x3c8>, |
diff --git a/Documentation/devicetree/bindings/sound/ak4613.txt b/Documentation/devicetree/bindings/sound/ak4613.txt new file mode 100644 index 000000000000..15a919522b42 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/ak4613.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | AK4613 I2C transmitter | ||
2 | |||
3 | This device supports I2C mode only. | ||
4 | |||
5 | Required properties: | ||
6 | |||
7 | - compatible : "asahi-kasei,ak4613" | ||
8 | - reg : The chip select number on the I2C bus | ||
9 | |||
10 | Example: | ||
11 | |||
12 | &i2c { | ||
13 | ak4613: ak4613@0x10 { | ||
14 | compatible = "asahi-kasei,ak4613"; | ||
15 | reg = <0x10>; | ||
16 | }; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/ak4642.txt b/Documentation/devicetree/bindings/sound/ak4642.txt index 623d4e70ae11..340784db6808 100644 --- a/Documentation/devicetree/bindings/sound/ak4642.txt +++ b/Documentation/devicetree/bindings/sound/ak4642.txt | |||
@@ -7,7 +7,14 @@ Required properties: | |||
7 | - compatible : "asahi-kasei,ak4642" or "asahi-kasei,ak4643" or "asahi-kasei,ak4648" | 7 | - compatible : "asahi-kasei,ak4642" or "asahi-kasei,ak4643" or "asahi-kasei,ak4648" |
8 | - reg : The chip select number on the I2C bus | 8 | - reg : The chip select number on the I2C bus |
9 | 9 | ||
10 | Example: | 10 | Optional properties: |
11 | |||
12 | - #clock-cells : common clock binding; shall be set to 0 | ||
13 | - clocks : common clock binding; MCKI clock | ||
14 | - clock-frequency : common clock binding; frequency of MCKO | ||
15 | - clock-output-names : common clock binding; MCKO clock name | ||
16 | |||
17 | Example 1: | ||
11 | 18 | ||
12 | &i2c { | 19 | &i2c { |
13 | ak4648: ak4648@0x12 { | 20 | ak4648: ak4648@0x12 { |
@@ -15,3 +22,16 @@ Example: | |||
15 | reg = <0x12>; | 22 | reg = <0x12>; |
16 | }; | 23 | }; |
17 | }; | 24 | }; |
25 | |||
26 | Example 2: | ||
27 | |||
28 | &i2c { | ||
29 | ak4643: codec@12 { | ||
30 | compatible = "asahi-kasei,ak4643"; | ||
31 | reg = <0x12>; | ||
32 | #clock-cells = <0>; | ||
33 | clocks = <&audio_clock>; | ||
34 | clock-frequency = <12288000>; | ||
35 | clock-output-names = "ak4643_mcko"; | ||
36 | }; | ||
37 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/atmel-classd.txt b/Documentation/devicetree/bindings/sound/atmel-classd.txt new file mode 100644 index 000000000000..0018451c4351 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/atmel-classd.txt | |||
@@ -0,0 +1,52 @@ | |||
1 | * Atmel ClassD driver under ALSA SoC architecture | ||
2 | |||
3 | Required properties: | ||
4 | - compatible | ||
5 | Should be "atmel,sama5d2-classd". | ||
6 | - reg | ||
7 | Should contain ClassD registers location and length. | ||
8 | - interrupts | ||
9 | Should contain the IRQ line for the ClassD. | ||
10 | - dmas | ||
11 | One DMA specifiers as described in atmel-dma.txt and dma.txt files. | ||
12 | - dma-names | ||
13 | Must be "tx". | ||
14 | - clock-names | ||
15 | Tuple listing input clock names. | ||
16 | Required elements: "pclk", "gclk" and "aclk". | ||
17 | - clocks | ||
18 | Please refer to clock-bindings.txt. | ||
19 | |||
20 | Optional properties: | ||
21 | - pinctrl-names, pinctrl-0 | ||
22 | Please refer to pinctrl-bindings.txt. | ||
23 | - atmel,model | ||
24 | The user-visible name of this sound complex. | ||
25 | The default value is "CLASSD". | ||
26 | - atmel,pwm-type | ||
27 | PWM modulation type, "single" or "diff". | ||
28 | The default value is "single". | ||
29 | - atmel,non-overlap-time | ||
30 | Set non-overlapping time, the unit is nanosecond(ns). | ||
31 | There are four values, | ||
32 | <5>, <10>, <15>, <20>, the default value is <10>. | ||
33 | Non-overlapping will be disabled if not specified. | ||
34 | |||
35 | Example: | ||
36 | classd: classd@fc048000 { | ||
37 | compatible = "atmel,sama5d2-classd"; | ||
38 | reg = <0xfc048000 0x100>; | ||
39 | interrupts = <59 IRQ_TYPE_LEVEL_HIGH 7>; | ||
40 | dmas = <&dma0 | ||
41 | (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) | ||
42 | | AT91_XDMAC_DT_PERID(47))>; | ||
43 | dma-names = "tx"; | ||
44 | clocks = <&classd_clk>, <&classd_gclk>, <&audio_pll_pmc>; | ||
45 | clock-names = "pclk", "gclk", "aclk"; | ||
46 | |||
47 | pinctrl-names = "default"; | ||
48 | pinctrl-0 = <&pinctrl_classd_default>; | ||
49 | atmel,model = "classd @ SAMA5D2-Xplained"; | ||
50 | atmel,pwm-type = "diff"; | ||
51 | atmel,non-overlap-time = <10>; | ||
52 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/da7213.txt b/Documentation/devicetree/bindings/sound/da7213.txt new file mode 100644 index 000000000000..58902802d56c --- /dev/null +++ b/Documentation/devicetree/bindings/sound/da7213.txt | |||
@@ -0,0 +1,41 @@ | |||
1 | Dialog Semiconductor DA7213 Audio Codec bindings | ||
2 | |||
3 | ====== | ||
4 | |||
5 | Required properties: | ||
6 | - compatible : Should be "dlg,da7213" | ||
7 | - reg: Specifies the I2C slave address | ||
8 | |||
9 | Optional properties: | ||
10 | - clocks : phandle and clock specifier for codec MCLK. | ||
11 | - clock-names : Clock name string for 'clocks' attribute, should be "mclk". | ||
12 | |||
13 | - dlg,micbias1-lvl : Voltage (mV) for Mic Bias 1 | ||
14 | [<1600>, <2200>, <2500>, <3000>] | ||
15 | - dlg,micbias2-lvl : Voltage (mV) for Mic Bias 2 | ||
16 | [<1600>, <2200>, <2500>, <3000>] | ||
17 | - dlg,dmic-data-sel : DMIC channel select based on clock edge. | ||
18 | ["lrise_rfall", "lfall_rrise"] | ||
19 | - dlg,dmic-samplephase : When to sample audio from DMIC. | ||
20 | ["on_clkedge", "between_clkedge"] | ||
21 | - dlg,dmic-clkrate : DMIC clock frequency (Hz). | ||
22 | [<1500000>, <3000000>] | ||
23 | |||
24 | ====== | ||
25 | |||
26 | Example: | ||
27 | |||
28 | codec_i2c: da7213@1a { | ||
29 | compatible = "dlg,da7213"; | ||
30 | reg = <0x1a>; | ||
31 | |||
32 | clocks = <&clks 201>; | ||
33 | clock-names = "mclk"; | ||
34 | |||
35 | dlg,micbias1-lvl = <2500>; | ||
36 | dlg,micbias2-lvl = <2500>; | ||
37 | |||
38 | dlg,dmic-data-sel = "lrise_rfall"; | ||
39 | dlg,dmic-samplephase = "between_clkedge"; | ||
40 | dlg,dmic-clkrate = <3000000>; | ||
41 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/da7219.txt b/Documentation/devicetree/bindings/sound/da7219.txt new file mode 100644 index 000000000000..1b7030911a3b --- /dev/null +++ b/Documentation/devicetree/bindings/sound/da7219.txt | |||
@@ -0,0 +1,106 @@ | |||
1 | Dialog Semiconductor DA7219 Audio Codec bindings | ||
2 | |||
3 | DA7219 is an audio codec with advanced accessory detect features. | ||
4 | |||
5 | ====== | ||
6 | |||
7 | Required properties: | ||
8 | - compatible : Should be "dlg,da7219" | ||
9 | - reg: Specifies the I2C slave address | ||
10 | |||
11 | - interrupt-parent : Specifies the phandle of the interrupt controller to which | ||
12 | the IRQs from DA7219 are delivered to. | ||
13 | - interrupts : IRQ line info for DA7219. | ||
14 | (See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt for | ||
15 | further information relating to interrupt properties) | ||
16 | |||
17 | - VDD-supply: VDD power supply for the device | ||
18 | - VDDMIC-supply: VDDMIC power supply for the device | ||
19 | - VDDIO-supply: VDDIO power supply for the device | ||
20 | (See Documentation/devicetree/bindings/regulator/regulator.txt for further | ||
21 | information relating to regulators) | ||
22 | |||
23 | Optional properties: | ||
24 | - interrupt-names : Name associated with interrupt line. Should be "wakeup" if | ||
25 | interrupt is to be used to wake system, otherwise "irq" should be used. | ||
26 | - wakeup-source: Flag to indicate this device can wake system (suspend/resume). | ||
27 | |||
28 | - clocks : phandle and clock specifier for codec MCLK. | ||
29 | - clock-names : Clock name string for 'clocks' attribute, should be "mclk". | ||
30 | |||
31 | - dlg,ldo-lvl : Required internal LDO voltage (mV) level for digital engine | ||
32 | [<1050>, <1100>, <1200>, <1400>] | ||
33 | - dlg,micbias-lvl : Voltage (mV) for Mic Bias | ||
34 | [<1800>, <2000>, <2200>, <2400>, <2600>] | ||
35 | - dlg,mic-amp-in-sel : Mic input source type | ||
36 | ["diff", "se_p", "se_n"] | ||
37 | |||
38 | ====== | ||
39 | |||
40 | Child node - 'da7219_aad': | ||
41 | |||
42 | Optional properties: | ||
43 | - dlg,micbias-pulse-lvl : Mic bias higher voltage pulse level (mV). | ||
44 | [<2800>, <2900>] | ||
45 | - dlg,micbias-pulse-time : Mic bias higher voltage pulse duration (ms) | ||
46 | - dlg,btn-cfg : Periodic button press measurements for 4-pole jack (ms) | ||
47 | [<2>, <5>, <10>, <50>, <100>, <200>, <500>] | ||
48 | - dlg,mic-det-thr : Impedance threshold for mic detection measurement (Ohms) | ||
49 | [<200>, <500>, <750>, <1000>] | ||
50 | - dlg,jack-ins-deb : Debounce time for jack insertion (ms) | ||
51 | [<5>, <10>, <20>, <50>, <100>, <200>, <500>, <1000>] | ||
52 | - dlg,jack-det-rate: Jack type detection latency (3/4 pole) | ||
53 | ["32ms_64ms", "64ms_128ms", "128ms_256ms", "256ms_512ms"] | ||
54 | - dlg,jack-rem-deb : Debounce time for jack removal (ms) | ||
55 | [<1>, <5>, <10>, <20>] | ||
56 | - dlg,a-d-btn-thr : Impedance threshold between buttons A and D | ||
57 | [0x0 - 0xFF] | ||
58 | - dlg,d-b-btn-thr : Impedance threshold between buttons D and B | ||
59 | [0x0 - 0xFF] | ||
60 | - dlg,b-c-btn-thr : Impedance threshold between buttons B and C | ||
61 | [0x0 - 0xFF] | ||
62 | - dlg,c-mic-btn-thr : Impedance threshold between button C and Mic | ||
63 | [0x0 - 0xFF] | ||
64 | - dlg,btn-avg : Number of 8-bit readings for averaged button measurement | ||
65 | [<1>, <2>, <4>, <8>] | ||
66 | - dlg,adc-1bit-rpt : Repeat count for 1-bit button measurement | ||
67 | [<1>, <2>, <4>, <8>] | ||
68 | |||
69 | ====== | ||
70 | |||
71 | Example: | ||
72 | |||
73 | codec: da7219@1a { | ||
74 | compatible = "dlg,da7219"; | ||
75 | reg = <0x1a>; | ||
76 | |||
77 | interrupt-parent = <&gpio6>; | ||
78 | interrupts = <11 IRQ_TYPE_LEVEL_HIGH>; | ||
79 | |||
80 | VDD-supply = <®_audio>; | ||
81 | VDDMIC-supply = <®_audio>; | ||
82 | VDDIO-supply = <®_audio>; | ||
83 | |||
84 | clocks = <&clks 201>; | ||
85 | clock-names = "mclk"; | ||
86 | |||
87 | dlg,ldo-lvl = <1200>; | ||
88 | dlg,micbias-lvl = <2600>; | ||
89 | dlg,mic-amp-in-sel = "diff"; | ||
90 | |||
91 | da7219_aad { | ||
92 | dlg,btn-cfg = <50>; | ||
93 | dlg,mic-det-thr = <500>; | ||
94 | dlg,jack-ins-deb = <20>; | ||
95 | dlg,jack-det-rate = "32ms_64ms"; | ||
96 | dlg,jack-rem-deb = <1>; | ||
97 | |||
98 | dlg,a-d-btn-thr = <0xa>; | ||
99 | dlg,d-b-btn-thr = <0x16>; | ||
100 | dlg,b-c-btn-thr = <0x21>; | ||
101 | dlg,c-mic-btn-thr = <0x3E>; | ||
102 | |||
103 | dlg,btn-avg = <4>; | ||
104 | dlg,adc-1bit-rpt = <1>; | ||
105 | }; | ||
106 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt index a96774c194c8..ce55c0a6f757 100644 --- a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt +++ b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt | |||
@@ -13,13 +13,15 @@ So having this generic sound card allows all Freescale SoC users to benefit | |||
13 | from the simplification of a new card support and the capability of the wide | 13 | from the simplification of a new card support and the capability of the wide |
14 | sample rates support through ASRC. | 14 | sample rates support through ASRC. |
15 | 15 | ||
16 | Note: The card is initially designed for those sound cards who use I2S and | 16 | Note: The card is initially designed for those sound cards who use AC'97, I2S |
17 | PCM DAI formats. However, it'll be also possible to support those non | 17 | and PCM DAI formats. However, it'll be also possible to support those non |
18 | I2S/PCM type sound cards, such as S/PDIF audio and HDMI audio, as long | 18 | AC'97/I2S/PCM type sound cards, such as S/PDIF audio and HDMI audio, as |
19 | as the driver has been properly upgraded. | 19 | long as the driver has been properly upgraded. |
20 | 20 | ||
21 | 21 | ||
22 | The compatible list for this generic sound card currently: | 22 | The compatible list for this generic sound card currently: |
23 | "fsl,imx-audio-ac97" | ||
24 | |||
23 | "fsl,imx-audio-cs42888" | 25 | "fsl,imx-audio-cs42888" |
24 | 26 | ||
25 | "fsl,imx-audio-wm8962" | 27 | "fsl,imx-audio-wm8962" |
diff --git a/Documentation/devicetree/bindings/sound/nau8825.txt b/Documentation/devicetree/bindings/sound/nau8825.txt new file mode 100644 index 000000000000..d3374231c871 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/nau8825.txt | |||
@@ -0,0 +1,102 @@ | |||
1 | Nuvoton NAU8825 audio codec | ||
2 | |||
3 | This device supports I2C only. | ||
4 | |||
5 | Required properties: | ||
6 | - compatible : Must be "nuvoton,nau8825" | ||
7 | |||
8 | - reg : the I2C address of the device. This is either 0x1a (CSB=0) or 0x1b (CSB=1). | ||
9 | |||
10 | Optional properties: | ||
11 | - nuvoton,jkdet-enable: Enable jack detection via JKDET pin. | ||
12 | - nuvoton,jkdet-pull-enable: Enable JKDET pin pull. If set - pin pull enabled, | ||
13 | otherwise pin in high impedance state. | ||
14 | - nuvoton,jkdet-pull-up: Pull-up JKDET pin. If set then JKDET pin is pull up, otherwise pull down. | ||
15 | - nuvoton,jkdet-polarity: JKDET pin polarity. 0 - active high, 1 - active low. | ||
16 | |||
17 | - nuvoton,vref-impedance: VREF Impedance selection | ||
18 | 0 - Open | ||
19 | 1 - 25 kOhm | ||
20 | 2 - 125 kOhm | ||
21 | 3 - 2.5 kOhm | ||
22 | |||
23 | - nuvoton,micbias-voltage: Micbias voltage level. | ||
24 | 0 - VDDA | ||
25 | 1 - VDDA | ||
26 | 2 - VDDA * 1.1 | ||
27 | 3 - VDDA * 1.2 | ||
28 | 4 - VDDA * 1.3 | ||
29 | 5 - VDDA * 1.4 | ||
30 | 6 - VDDA * 1.53 | ||
31 | 7 - VDDA * 1.53 | ||
32 | |||
33 | - nuvoton,sar-threshold-num: Number of buttons supported | ||
34 | - nuvoton,sar-threshold: Impedance threshold for each button. Array that contains up to 8 buttons configuration. SAR value is calculated as | ||
35 | SAR = 255 * MICBIAS / SAR_VOLTAGE * R / (2000 + R) | ||
36 | where MICBIAS is configured by 'nuvoton,micbias-voltage', SAR_VOLTAGE is configured by 'nuvoton,sar-voltage', R - button impedance. | ||
37 | Refer datasheet section 10.2 for more information about threshold calculation. | ||
38 | |||
39 | - nuvoton,sar-hysteresis: Button impedance measurement hysteresis. | ||
40 | |||
41 | - nuvoton,sar-voltage: Reference voltage for button impedance measurement. | ||
42 | 0 - VDDA | ||
43 | 1 - VDDA | ||
44 | 2 - VDDA * 1.1 | ||
45 | 3 - VDDA * 1.2 | ||
46 | 4 - VDDA * 1.3 | ||
47 | 5 - VDDA * 1.4 | ||
48 | 6 - VDDA * 1.53 | ||
49 | 7 - VDDA * 1.53 | ||
50 | |||
51 | - nuvoton,sar-compare-time: SAR compare time | ||
52 | 0 - 500 ns | ||
53 | 1 - 1 us | ||
54 | 2 - 2 us | ||
55 | 3 - 4 us | ||
56 | |||
57 | - nuvoton,sar-sampling-time: SAR sampling time | ||
58 | 0 - 2 us | ||
59 | 1 - 4 us | ||
60 | 2 - 8 us | ||
61 | 3 - 16 us | ||
62 | |||
63 | - nuvoton,short-key-debounce: Button short key press debounce time. | ||
64 | 0 - 30 ms | ||
65 | 1 - 50 ms | ||
66 | 2 - 100 ms | ||
67 | 3 - 30 ms | ||
68 | |||
69 | - nuvoton,jack-insert-debounce: number from 0 to 7 that sets debounce time to 2^(n+2) ms | ||
70 | - nuvoton,jack-eject-debounce: number from 0 to 7 that sets debounce time to 2^(n+2) ms | ||
71 | |||
72 | - clocks: list of phandle and clock specifier pairs according to common clock bindings for the | ||
73 | clocks described in clock-names | ||
74 | - clock-names: should include "mclk" for the MCLK master clock | ||
75 | |||
76 | Example: | ||
77 | |||
78 | headset: nau8825@1a { | ||
79 | compatible = "nuvoton,nau8825"; | ||
80 | reg = <0x1a>; | ||
81 | interrupt-parent = <&gpio>; | ||
82 | interrupts = <TEGRA_GPIO(E, 6) IRQ_TYPE_LEVEL_LOW>; | ||
83 | nuvoton,jkdet-enable; | ||
84 | nuvoton,jkdet-pull-enable; | ||
85 | nuvoton,jkdet-pull-up; | ||
86 | nuvoton,jkdet-polarity = <GPIO_ACTIVE_LOW>; | ||
87 | nuvoton,vref-impedance = <2>; | ||
88 | nuvoton,micbias-voltage = <6>; | ||
89 | // Setup 4 buttons impedance according to Android specification | ||
90 | nuvoton,sar-threshold-num = <4>; | ||
91 | nuvoton,sar-threshold = <0xc 0x1e 0x38 0x60>; | ||
92 | nuvoton,sar-hysteresis = <1>; | ||
93 | nuvoton,sar-voltage = <0>; | ||
94 | nuvoton,sar-compare-time = <0>; | ||
95 | nuvoton,sar-sampling-time = <0>; | ||
96 | nuvoton,short-key-debounce = <2>; | ||
97 | nuvoton,jack-insert-debounce = <7>; | ||
98 | nuvoton,jack-eject-debounce = <7>; | ||
99 | |||
100 | clock-names = "mclk"; | ||
101 | clocks = <&tegra_car TEGRA210_CLK_CLK_OUT_2>; | ||
102 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt index 1173395b5e5c..c57cbd65736c 100644 --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt | |||
@@ -4,10 +4,12 @@ Required properties: | |||
4 | - compatible : "renesas,rcar_sound-<soctype>", fallbacks | 4 | - compatible : "renesas,rcar_sound-<soctype>", fallbacks |
5 | "renesas,rcar_sound-gen1" if generation1, and | 5 | "renesas,rcar_sound-gen1" if generation1, and |
6 | "renesas,rcar_sound-gen2" if generation2 | 6 | "renesas,rcar_sound-gen2" if generation2 |
7 | "renesas,rcar_sound-gen3" if generation3 | ||
7 | Examples with soctypes are: | 8 | Examples with soctypes are: |
8 | - "renesas,rcar_sound-r8a7778" (R-Car M1A) | 9 | - "renesas,rcar_sound-r8a7778" (R-Car M1A) |
9 | - "renesas,rcar_sound-r8a7790" (R-Car H2) | 10 | - "renesas,rcar_sound-r8a7790" (R-Car H2) |
10 | - "renesas,rcar_sound-r8a7791" (R-Car M2-W) | 11 | - "renesas,rcar_sound-r8a7791" (R-Car M2-W) |
12 | - "renesas,rcar_sound-r8a7795" (R-Car H3) | ||
11 | - reg : Should contain the register physical address. | 13 | - reg : Should contain the register physical address. |
12 | required register is | 14 | required register is |
13 | SRU/ADG/SSI if generation1 | 15 | SRU/ADG/SSI if generation1 |
@@ -30,6 +32,11 @@ Required properties: | |||
30 | - rcar_sound,dai : DAI contents. | 32 | - rcar_sound,dai : DAI contents. |
31 | The number of DAI subnode should be same as HW. | 33 | The number of DAI subnode should be same as HW. |
32 | see below for detail. | 34 | see below for detail. |
35 | - #sound-dai-cells : it must be 0 if your system is using single DAI | ||
36 | it must be 1 if your system is using multi DAI | ||
37 | - #clock-cells : it must be 0 if your system has audio_clkout | ||
38 | it must be 1 if your system has audio_clkout0/1/2/3 | ||
39 | - clock-frequency : for all audio_clkout0/1/2/3 | ||
33 | 40 | ||
34 | SSI subnode properties: | 41 | SSI subnode properties: |
35 | - interrupts : Should contain SSI interrupt for PIO transfer | 42 | - interrupts : Should contain SSI interrupt for PIO transfer |
diff --git a/Documentation/devicetree/bindings/sound/rockchip-i2s.txt b/Documentation/devicetree/bindings/sound/rockchip-i2s.txt index 9b82c20b306b..2267d249ca0e 100644 --- a/Documentation/devicetree/bindings/sound/rockchip-i2s.txt +++ b/Documentation/devicetree/bindings/sound/rockchip-i2s.txt | |||
@@ -12,8 +12,6 @@ Required properties: | |||
12 | - reg: physical base address of the controller and length of memory mapped | 12 | - reg: physical base address of the controller and length of memory mapped |
13 | region. | 13 | region. |
14 | - interrupts: should contain the I2S interrupt. | 14 | - interrupts: should contain the I2S interrupt. |
15 | - #address-cells: should be 1. | ||
16 | - #size-cells: should be 0. | ||
17 | - dmas: DMA specifiers for tx and rx dma. See the DMA client binding, | 15 | - dmas: DMA specifiers for tx and rx dma. See the DMA client binding, |
18 | Documentation/devicetree/bindings/dma/dma.txt | 16 | Documentation/devicetree/bindings/dma/dma.txt |
19 | - dma-names: should include "tx" and "rx". | 17 | - dma-names: should include "tx" and "rx". |
@@ -21,6 +19,7 @@ Required properties: | |||
21 | - clock-names: should contain followings: | 19 | - clock-names: should contain followings: |
22 | - "i2s_hclk": clock for I2S BUS | 20 | - "i2s_hclk": clock for I2S BUS |
23 | - "i2s_clk" : clock for I2S controller | 21 | - "i2s_clk" : clock for I2S controller |
22 | - rockchip,capture-channels: max capture channels, if not set, 2 channels default. | ||
24 | 23 | ||
25 | Example for rk3288 I2S controller: | 24 | Example for rk3288 I2S controller: |
26 | 25 | ||
@@ -28,10 +27,9 @@ i2s@ff890000 { | |||
28 | compatible = "rockchip,rk3288-i2s", "rockchip,rk3066-i2s"; | 27 | compatible = "rockchip,rk3288-i2s", "rockchip,rk3066-i2s"; |
29 | reg = <0xff890000 0x10000>; | 28 | reg = <0xff890000 0x10000>; |
30 | interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>; | 29 | interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>; |
31 | #address-cells = <1>; | ||
32 | #size-cells = <0>; | ||
33 | dmas = <&pdma1 0>, <&pdma1 1>; | 30 | dmas = <&pdma1 0>, <&pdma1 1>; |
34 | dma-names = "tx", "rx"; | 31 | dma-names = "tx", "rx"; |
35 | clock-names = "i2s_hclk", "i2s_clk"; | 32 | clock-names = "i2s_hclk", "i2s_clk"; |
36 | clocks = <&cru HCLK_I2S0>, <&cru SCLK_I2S0>; | 33 | clocks = <&cru HCLK_I2S0>, <&cru SCLK_I2S0>; |
34 | rockchip,capture-channels = <2>; | ||
37 | }; | 35 | }; |
diff --git a/Documentation/devicetree/bindings/sound/rockchip-spdif.txt b/Documentation/devicetree/bindings/sound/rockchip-spdif.txt new file mode 100644 index 000000000000..e64dbdea7db9 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/rockchip-spdif.txt | |||
@@ -0,0 +1,40 @@ | |||
1 | * Rockchip SPDIF transceiver | ||
2 | |||
3 | The S/PDIF audio block is a stereo transceiver that allows the | ||
4 | processor to receive and transmit digital audio via an coaxial cable or | ||
5 | a fibre cable. | ||
6 | |||
7 | Required properties: | ||
8 | |||
9 | - compatible: should be one of the following: | ||
10 | - "rockchip,rk3288-spdif", "rockchip,rk3188-spdif" or | ||
11 | "rockchip,rk3066-spdif" | ||
12 | - reg: physical base address of the controller and length of memory mapped | ||
13 | region. | ||
14 | - interrupts: should contain the SPDIF interrupt. | ||
15 | - dmas: DMA specifiers for tx dma. See the DMA client binding, | ||
16 | Documentation/devicetree/bindings/dma/dma.txt | ||
17 | - dma-names: should be "tx" | ||
18 | - clocks: a list of phandle + clock-specifier pairs, one for each entry | ||
19 | in clock-names. | ||
20 | - clock-names: should contain following: | ||
21 | - "hclk": clock for SPDIF controller | ||
22 | - "mclk" : clock for SPDIF bus | ||
23 | |||
24 | Required properties on RK3288: | ||
25 | - rockchip,grf: the phandle of the syscon node for the general register | ||
26 | file (GRF) | ||
27 | |||
28 | Example for the rk3188 SPDIF controller: | ||
29 | |||
30 | spdif: spdif@0x1011e000 { | ||
31 | compatible = "rockchip,rk3188-spdif", "rockchip,rk3066-spdif"; | ||
32 | reg = <0x1011e000 0x2000>; | ||
33 | interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>; | ||
34 | dmas = <&dmac1_s 8>; | ||
35 | dma-names = "tx"; | ||
36 | clock-names = "hclk", "mclk"; | ||
37 | clocks = <&cru HCLK_SPDIF>, <&cru SCLK_SPDIF>; | ||
38 | status = "disabled"; | ||
39 | #sound-dai-cells = <0>; | ||
40 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/rt5640.txt b/Documentation/devicetree/bindings/sound/rt5640.txt index bac4d9ac1edc..9e62f6eb348f 100644 --- a/Documentation/devicetree/bindings/sound/rt5640.txt +++ b/Documentation/devicetree/bindings/sound/rt5640.txt | |||
@@ -14,7 +14,8 @@ Optional properties: | |||
14 | 14 | ||
15 | - realtek,in1-differential | 15 | - realtek,in1-differential |
16 | - realtek,in2-differential | 16 | - realtek,in2-differential |
17 | Boolean. Indicate MIC1/2 input are differential, rather than single-ended. | 17 | - realtek,in3-differential |
18 | Boolean. Indicate MIC1/2/3 input are differential, rather than single-ended. | ||
18 | 19 | ||
19 | - realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin. | 20 | - realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin. |
20 | 21 | ||
@@ -24,9 +25,11 @@ Pins on the device (for linking into audio routes) for RT5639/RT5640: | |||
24 | * DMIC2 | 25 | * DMIC2 |
25 | * MICBIAS1 | 26 | * MICBIAS1 |
26 | * IN1P | 27 | * IN1P |
27 | * IN1R | 28 | * IN1N |
28 | * IN2P | 29 | * IN2P |
29 | * IN2R | 30 | * IN2N |
31 | * IN3P | ||
32 | * IN3N | ||
30 | * HPOL | 33 | * HPOL |
31 | * HPOR | 34 | * HPOR |
32 | * LOUTL | 35 | * LOUTL |
diff --git a/Documentation/devicetree/bindings/sound/sun4i-codec.txt b/Documentation/devicetree/bindings/sound/sun4i-codec.txt new file mode 100644 index 000000000000..c92966bd5488 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/sun4i-codec.txt | |||
@@ -0,0 +1,27 @@ | |||
1 | * Allwinner A10 Codec | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: must be either "allwinner,sun4i-a10-codec" or | ||
5 | "allwinner,sun7i-a20-codec" | ||
6 | - reg: must contain the registers location and length | ||
7 | - interrupts: must contain the codec interrupt | ||
8 | - dmas: DMA channels for tx and rx dma. See the DMA client binding, | ||
9 | Documentation/devicetree/bindings/dma/dma.txt | ||
10 | - dma-names: should include "tx" and "rx". | ||
11 | - clocks: a list of phandle + clock-specifer pairs, one for each entry | ||
12 | in clock-names. | ||
13 | - clock-names: should contain followings: | ||
14 | - "apb": the parent APB clock for this controller | ||
15 | - "codec": the parent module clock | ||
16 | |||
17 | Example: | ||
18 | codec: codec@01c22c00 { | ||
19 | #sound-dai-cells = <0>; | ||
20 | compatible = "allwinner,sun7i-a20-codec"; | ||
21 | reg = <0x01c22c00 0x40>; | ||
22 | interrupts = <0 30 4>; | ||
23 | clocks = <&apb0_gates 0>, <&codec_clk>; | ||
24 | clock-names = "apb", "codec"; | ||
25 | dmas = <&dma 0 19>, <&dma 0 19>; | ||
26 | dma-names = "rx", "tx"; | ||
27 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/tdm-slot.txt b/Documentation/devicetree/bindings/sound/tdm-slot.txt index 6a2c84247f91..34cf70e2cbc4 100644 --- a/Documentation/devicetree/bindings/sound/tdm-slot.txt +++ b/Documentation/devicetree/bindings/sound/tdm-slot.txt | |||
@@ -4,11 +4,15 @@ This specifies audio DAI's TDM slot. | |||
4 | 4 | ||
5 | TDM slot properties: | 5 | TDM slot properties: |
6 | dai-tdm-slot-num : Number of slots in use. | 6 | dai-tdm-slot-num : Number of slots in use. |
7 | dai-tdm-slot-width : Width in bits for each slot. | 7 | dai-tdm-slot-width : Width in bits for each slot. |
8 | dai-tdm-slot-tx-mask : Transmit direction slot mask, optional | ||
9 | dai-tdm-slot-rx-mask : Receive direction slot mask, optional | ||
8 | 10 | ||
9 | For instance: | 11 | For instance: |
10 | dai-tdm-slot-num = <2>; | 12 | dai-tdm-slot-num = <2>; |
11 | dai-tdm-slot-width = <8>; | 13 | dai-tdm-slot-width = <8>; |
14 | dai-tdm-slot-tx-mask = <0 1>; | ||
15 | dai-tdm-slot-rx-mask = <1 0>; | ||
12 | 16 | ||
13 | And for each spcified driver, there could be one .of_xlate_tdm_slot_mask() | 17 | And for each spcified driver, there could be one .of_xlate_tdm_slot_mask() |
14 | to specify a explicit mapping of the channels and the slots. If it's absent | 18 | to specify a explicit mapping of the channels and the slots. If it's absent |
@@ -18,3 +22,8 @@ tx and rx masks. | |||
18 | For snd_soc_of_xlate_tdm_slot_mask(), the tx and rx masks will use a 1 bit | 22 | For snd_soc_of_xlate_tdm_slot_mask(), the tx and rx masks will use a 1 bit |
19 | for an active slot as default, and the default active bits are at the LSB of | 23 | for an active slot as default, and the default active bits are at the LSB of |
20 | the masks. | 24 | the masks. |
25 | |||
26 | The explicit masks are given as array of integers, where the first | ||
27 | number presents bit-0 (LSB), second presents bit-1, etc. Any non zero | ||
28 | number is considered 1 and 0 is 0. snd_soc_of_xlate_tdm_slot_mask() | ||
29 | does not do anything, if either mask is set non zero value. | ||
diff --git a/Documentation/devicetree/bindings/spi/brcm,bcm2835-aux-spi.txt b/Documentation/devicetree/bindings/spi/brcm,bcm2835-aux-spi.txt new file mode 100644 index 000000000000..9887b0724759 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/brcm,bcm2835-aux-spi.txt | |||
@@ -0,0 +1,38 @@ | |||
1 | Broadcom BCM2835 auxiliar SPI1/2 controller | ||
2 | |||
3 | The BCM2835 contains two forms of SPI master controller, one known simply as | ||
4 | SPI0, and the other known as the "Universal SPI Master"; part of the | ||
5 | auxiliary block. This binding applies to the SPI1/2 controller. | ||
6 | |||
7 | Required properties: | ||
8 | - compatible: Should be "brcm,bcm2835-aux-spi". | ||
9 | - reg: Should contain register location and length for the spi block | ||
10 | - interrupts: Should contain shared interrupt of the aux block | ||
11 | - clocks: The clock feeding the SPI controller - needs to | ||
12 | point to the auxiliar clock driver of the bcm2835, | ||
13 | as this clock will enable the output gate for the specific | ||
14 | clock. | ||
15 | - cs-gpios: the cs-gpios (native cs is NOT supported) | ||
16 | see also spi-bus.txt | ||
17 | |||
18 | Example: | ||
19 | |||
20 | spi1@7e215080 { | ||
21 | compatible = "brcm,bcm2835-aux-spi"; | ||
22 | reg = <0x7e215080 0x40>; | ||
23 | interrupts = <1 29>; | ||
24 | clocks = <&aux_clocks BCM2835_AUX_CLOCK_SPI1>; | ||
25 | #address-cells = <1>; | ||
26 | #size-cells = <0>; | ||
27 | cs-gpios = <&gpio 18>, <&gpio 17>, <&gpio 16>; | ||
28 | }; | ||
29 | |||
30 | spi2@7e2150c0 { | ||
31 | compatible = "brcm,bcm2835-aux-spi"; | ||
32 | reg = <0x7e2150c0 0x40>; | ||
33 | interrupts = <1 29>; | ||
34 | clocks = <&aux_clocks BCM2835_AUX_CLOCK_SPI2>; | ||
35 | #address-cells = <1>; | ||
36 | #size-cells = <0>; | ||
37 | cs-gpios = <&gpio 43>, <&gpio 44>, <&gpio 45>; | ||
38 | }; | ||
diff --git a/Documentation/devicetree/bindings/spi/sh-msiof.txt b/Documentation/devicetree/bindings/spi/sh-msiof.txt index 8f771441be60..705075da2f10 100644 --- a/Documentation/devicetree/bindings/spi/sh-msiof.txt +++ b/Documentation/devicetree/bindings/spi/sh-msiof.txt | |||
@@ -51,7 +51,7 @@ Optional properties, deprecated for soctype-specific bindings: | |||
51 | - renesas,tx-fifo-size : Overrides the default tx fifo size given in words | 51 | - renesas,tx-fifo-size : Overrides the default tx fifo size given in words |
52 | (default is 64) | 52 | (default is 64) |
53 | - renesas,rx-fifo-size : Overrides the default rx fifo size given in words | 53 | - renesas,rx-fifo-size : Overrides the default rx fifo size given in words |
54 | (default is 64, or 256 on R-Car Gen2) | 54 | (default is 64) |
55 | 55 | ||
56 | Pinctrl properties might be needed, too. See | 56 | Pinctrl properties might be needed, too. See |
57 | Documentation/devicetree/bindings/pinctrl/renesas,*. | 57 | Documentation/devicetree/bindings/pinctrl/renesas,*. |
diff --git a/Documentation/devicetree/bindings/spi/spi-mt65xx.txt b/Documentation/devicetree/bindings/spi/spi-mt65xx.txt index dcefc438272f..ce363c923f44 100644 --- a/Documentation/devicetree/bindings/spi/spi-mt65xx.txt +++ b/Documentation/devicetree/bindings/spi/spi-mt65xx.txt | |||
@@ -15,21 +15,25 @@ Required properties: | |||
15 | - interrupts: Should contain spi interrupt | 15 | - interrupts: Should contain spi interrupt |
16 | 16 | ||
17 | - clocks: phandles to input clocks. | 17 | - clocks: phandles to input clocks. |
18 | The first should be <&topckgen CLK_TOP_SPI_SEL>. | 18 | The first should be one of the following. It's PLL. |
19 | The second should be one of the following. | ||
20 | - <&clk26m>: specify parent clock 26MHZ. | 19 | - <&clk26m>: specify parent clock 26MHZ. |
21 | - <&topckgen CLK_TOP_SYSPLL3_D2>: specify parent clock 109MHZ. | 20 | - <&topckgen CLK_TOP_SYSPLL3_D2>: specify parent clock 109MHZ. |
22 | It's the default one. | 21 | It's the default one. |
23 | - <&topckgen CLK_TOP_SYSPLL4_D2>: specify parent clock 78MHZ. | 22 | - <&topckgen CLK_TOP_SYSPLL4_D2>: specify parent clock 78MHZ. |
24 | - <&topckgen CLK_TOP_UNIVPLL2_D4>: specify parent clock 104MHZ. | 23 | - <&topckgen CLK_TOP_UNIVPLL2_D4>: specify parent clock 104MHZ. |
25 | - <&topckgen CLK_TOP_UNIVPLL1_D8>: specify parent clock 78MHZ. | 24 | - <&topckgen CLK_TOP_UNIVPLL1_D8>: specify parent clock 78MHZ. |
25 | The second should be <&topckgen CLK_TOP_SPI_SEL>. It's clock mux. | ||
26 | The third is <&pericfg CLK_PERI_SPI0>. It's clock gate. | ||
26 | 27 | ||
27 | - clock-names: shall be "spi-clk" for the controller clock, and | 28 | - clock-names: shall be "parent-clk" for the parent clock, "sel-clk" for the |
28 | "parent-clk" for the parent clock. | 29 | muxes clock, and "spi-clk" for the clock gate. |
29 | 30 | ||
30 | Optional properties: | 31 | Optional properties: |
32 | -cs-gpios: see spi-bus.txt, only required for MT8173. | ||
33 | |||
31 | - mediatek,pad-select: specify which pins group(ck/mi/mo/cs) spi | 34 | - mediatek,pad-select: specify which pins group(ck/mi/mo/cs) spi |
32 | controller used, this value should be 0~3, only required for MT8173. | 35 | controller used. This is a array, the element value should be 0~3, |
36 | only required for MT8173. | ||
33 | 0: specify GPIO69,70,71,72 for spi pins. | 37 | 0: specify GPIO69,70,71,72 for spi pins. |
34 | 1: specify GPIO102,103,104,105 for spi pins. | 38 | 1: specify GPIO102,103,104,105 for spi pins. |
35 | 2: specify GPIO128,129,130,131 for spi pins. | 39 | 2: specify GPIO128,129,130,131 for spi pins. |
@@ -44,8 +48,11 @@ spi: spi@1100a000 { | |||
44 | #size-cells = <0>; | 48 | #size-cells = <0>; |
45 | reg = <0 0x1100a000 0 0x1000>; | 49 | reg = <0 0x1100a000 0 0x1000>; |
46 | interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_LOW>; | 50 | interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_LOW>; |
47 | clocks = <&topckgen CLK_TOP_SPI_SEL>, <&topckgen CLK_TOP_SYSPLL3_D2>; | 51 | clocks = <&topckgen CLK_TOP_SYSPLL3_D2>, |
48 | clock-names = "spi-clk", "parent-clk"; | 52 | <&topckgen CLK_TOP_SPI_SEL>, |
49 | mediatek,pad-select = <0>; | 53 | <&pericfg CLK_PERI_SPI0>; |
54 | clock-names = "parent-clk", "sel-clk", "spi-clk"; | ||
55 | cs-gpios = <&pio 105 GPIO_ACTIVE_LOW>, <&pio 72 GPIO_ACTIVE_LOW>; | ||
56 | mediatek,pad-select = <1>, <0>; | ||
50 | status = "disabled"; | 57 | status = "disabled"; |
51 | }; | 58 | }; |
diff --git a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt index ef802de4957a..b38200d2583a 100644 --- a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt +++ b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt | |||
@@ -12,6 +12,11 @@ Required properties: | |||
12 | - resets : Must contain an entry for each entry in reset-names. | 12 | - resets : Must contain an entry for each entry in reset-names. |
13 | See ../reset/reset.txt for details. | 13 | See ../reset/reset.txt for details. |
14 | - reset-names : Must include the name "tsadc-apb". | 14 | - reset-names : Must include the name "tsadc-apb". |
15 | - pinctrl-names : The pin control state names; | ||
16 | - pinctrl-0 : The "init" pinctrl state, it will be set before device probe. | ||
17 | - pinctrl-1 : The "default" pinctrl state, it will be set after reset the | ||
18 | TSADC controller. | ||
19 | - pinctrl-2 : The "sleep" pinctrl state, it will be in for suspend. | ||
15 | - #thermal-sensor-cells : Should be 1. See ./thermal.txt for a description. | 20 | - #thermal-sensor-cells : Should be 1. See ./thermal.txt for a description. |
16 | - rockchip,hw-tshut-temp : The hardware-controlled shutdown temperature value. | 21 | - rockchip,hw-tshut-temp : The hardware-controlled shutdown temperature value. |
17 | - rockchip,hw-tshut-mode : The hardware-controlled shutdown mode 0:CRU 1:GPIO. | 22 | - rockchip,hw-tshut-mode : The hardware-controlled shutdown mode 0:CRU 1:GPIO. |
@@ -27,8 +32,10 @@ tsadc: tsadc@ff280000 { | |||
27 | clock-names = "tsadc", "apb_pclk"; | 32 | clock-names = "tsadc", "apb_pclk"; |
28 | resets = <&cru SRST_TSADC>; | 33 | resets = <&cru SRST_TSADC>; |
29 | reset-names = "tsadc-apb"; | 34 | reset-names = "tsadc-apb"; |
30 | pinctrl-names = "default"; | 35 | pinctrl-names = "init", "default", "sleep"; |
31 | pinctrl-0 = <&otp_out>; | 36 | pinctrl-0 = <&otp_gpio>; |
37 | pinctrl-1 = <&otp_out>; | ||
38 | pinctrl-2 = <&otp_gpio>; | ||
32 | #thermal-sensor-cells = <1>; | 39 | #thermal-sensor-cells = <1>; |
33 | rockchip,hw-tshut-temp = <95000>; | 40 | rockchip,hw-tshut-temp = <95000>; |
34 | rockchip,hw-tshut-mode = <0>; | 41 | rockchip,hw-tshut-mode = <0>; |
diff --git a/Documentation/devicetree/bindings/thermal/thermal.txt b/Documentation/devicetree/bindings/thermal/thermal.txt index 8a49362dea6e..41b817f7b670 100644 --- a/Documentation/devicetree/bindings/thermal/thermal.txt +++ b/Documentation/devicetree/bindings/thermal/thermal.txt | |||
@@ -55,19 +55,11 @@ of heat dissipation). For example a fan's cooling states correspond to | |||
55 | the different fan speeds possible. Cooling states are referred to by | 55 | the different fan speeds possible. Cooling states are referred to by |
56 | single unsigned integers, where larger numbers mean greater heat | 56 | single unsigned integers, where larger numbers mean greater heat |
57 | dissipation. The precise set of cooling states associated with a device | 57 | dissipation. The precise set of cooling states associated with a device |
58 | (as referred to be the cooling-min-state and cooling-max-state | 58 | (as referred to by the cooling-min-level and cooling-max-level |
59 | properties) should be defined in a particular device's binding. | 59 | properties) should be defined in a particular device's binding. |
60 | For more examples of cooling devices, refer to the example sections below. | 60 | For more examples of cooling devices, refer to the example sections below. |
61 | 61 | ||
62 | Required properties: | 62 | Required properties: |
63 | - cooling-min-state: An integer indicating the smallest | ||
64 | Type: unsigned cooling state accepted. Typically 0. | ||
65 | Size: one cell | ||
66 | |||
67 | - cooling-max-state: An integer indicating the largest | ||
68 | Type: unsigned cooling state accepted. | ||
69 | Size: one cell | ||
70 | |||
71 | - #cooling-cells: Used to provide cooling device specific information | 63 | - #cooling-cells: Used to provide cooling device specific information |
72 | Type: unsigned while referring to it. Must be at least 2, in order | 64 | Type: unsigned while referring to it. Must be at least 2, in order |
73 | Size: one cell to specify minimum and maximum cooling state used | 65 | Size: one cell to specify minimum and maximum cooling state used |
@@ -77,6 +69,15 @@ Required properties: | |||
77 | See Cooling device maps section below for more details | 69 | See Cooling device maps section below for more details |
78 | on how consumers refer to cooling devices. | 70 | on how consumers refer to cooling devices. |
79 | 71 | ||
72 | Optional properties: | ||
73 | - cooling-min-level: An integer indicating the smallest | ||
74 | Type: unsigned cooling state accepted. Typically 0. | ||
75 | Size: one cell | ||
76 | |||
77 | - cooling-max-level: An integer indicating the largest | ||
78 | Type: unsigned cooling state accepted. | ||
79 | Size: one cell | ||
80 | |||
80 | * Trip points | 81 | * Trip points |
81 | 82 | ||
82 | The trip node is a node to describe a point in the temperature domain | 83 | The trip node is a node to describe a point in the temperature domain |
@@ -225,8 +226,8 @@ cpus { | |||
225 | 396000 950000 | 226 | 396000 950000 |
226 | 198000 850000 | 227 | 198000 850000 |
227 | >; | 228 | >; |
228 | cooling-min-state = <0>; | 229 | cooling-min-level = <0>; |
229 | cooling-max-state = <3>; | 230 | cooling-max-level = <3>; |
230 | #cooling-cells = <2>; /* min followed by max */ | 231 | #cooling-cells = <2>; /* min followed by max */ |
231 | }; | 232 | }; |
232 | ... | 233 | ... |
@@ -240,8 +241,8 @@ cpus { | |||
240 | */ | 241 | */ |
241 | fan0: fan@0x48 { | 242 | fan0: fan@0x48 { |
242 | ... | 243 | ... |
243 | cooling-min-state = <0>; | 244 | cooling-min-level = <0>; |
244 | cooling-max-state = <9>; | 245 | cooling-max-level = <9>; |
245 | #cooling-cells = <2>; /* min followed by max */ | 246 | #cooling-cells = <2>; /* min followed by max */ |
246 | }; | 247 | }; |
247 | }; | 248 | }; |
diff --git a/Documentation/devicetree/bindings/thermal/ti_soc_thermal.txt b/Documentation/devicetree/bindings/thermal/ti_soc_thermal.txt index 0c9222d27fae..6299dd8de339 100644 --- a/Documentation/devicetree/bindings/thermal/ti_soc_thermal.txt +++ b/Documentation/devicetree/bindings/thermal/ti_soc_thermal.txt | |||
@@ -10,6 +10,8 @@ to the silicon temperature. | |||
10 | 10 | ||
11 | Required properties: | 11 | Required properties: |
12 | - compatible : Should be: | 12 | - compatible : Should be: |
13 | - "ti,omap34xx-bandgap" : for OMAP34xx bandgap | ||
14 | - "ti,omap36xx-bandgap" : for OMAP36xx bandgap | ||
13 | - "ti,omap4430-bandgap" : for OMAP4430 bandgap | 15 | - "ti,omap4430-bandgap" : for OMAP4430 bandgap |
14 | - "ti,omap4460-bandgap" : for OMAP4460 bandgap | 16 | - "ti,omap4460-bandgap" : for OMAP4460 bandgap |
15 | - "ti,omap4470-bandgap" : for OMAP4470 bandgap | 17 | - "ti,omap4470-bandgap" : for OMAP4470 bandgap |
@@ -25,6 +27,18 @@ to each bandgap version, because the mapping may change from | |||
25 | soc to soc, apart of depending on available features. | 27 | soc to soc, apart of depending on available features. |
26 | 28 | ||
27 | Example: | 29 | Example: |
30 | OMAP34xx: | ||
31 | bandgap { | ||
32 | reg = <0x48002524 0x4>; | ||
33 | compatible = "ti,omap34xx-bandgap"; | ||
34 | }; | ||
35 | |||
36 | OMAP36xx: | ||
37 | bandgap { | ||
38 | reg = <0x48002524 0x4>; | ||
39 | compatible = "ti,omap36xx-bandgap"; | ||
40 | }; | ||
41 | |||
28 | OMAP4430: | 42 | OMAP4430: |
29 | bandgap { | 43 | bandgap { |
30 | reg = <0x4a002260 0x4 0x4a00232C 0x4>; | 44 | reg = <0x4a002260 0x4 0x4a00232C 0x4>; |
diff --git a/Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt b/Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt index 53a3029b7589..64083bc5633c 100644 --- a/Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt +++ b/Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt | |||
@@ -3,10 +3,12 @@ Mediatek MT6577, MT6572 and MT6589 Timers | |||
3 | 3 | ||
4 | Required properties: | 4 | Required properties: |
5 | - compatible should contain: | 5 | - compatible should contain: |
6 | * "mediatek,mt6589-timer" for MT6589 compatible timers | ||
7 | * "mediatek,mt6580-timer" for MT6580 compatible timers | 6 | * "mediatek,mt6580-timer" for MT6580 compatible timers |
8 | * "mediatek,mt6577-timer" for all compatible timers (MT6589, MT6580, | 7 | * "mediatek,mt6589-timer" for MT6589 compatible timers |
9 | MT6577) | 8 | * "mediatek,mt8127-timer" for MT8127 compatible timers |
9 | * "mediatek,mt8135-timer" for MT8135 compatible timers | ||
10 | * "mediatek,mt8173-timer" for MT8173 compatible timers | ||
11 | * "mediatek,mt6577-timer" for MT6577 and all above compatible timers | ||
10 | - reg: Should contain location and length for timers register. | 12 | - reg: Should contain location and length for timers register. |
11 | - clocks: Clocks driving the timer hardware. This list should include two | 13 | - clocks: Clocks driving the timer hardware. This list should include two |
12 | clocks. The order is system clock and as second clock the RTC clock. | 14 | clocks. The order is system clock and as second clock the RTC clock. |
diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt index d71ef07bca5d..781296bfbe4f 100644 --- a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt +++ b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt | |||
@@ -6,6 +6,7 @@ Required properties: | |||
6 | "lsi,zevio-usb" | 6 | "lsi,zevio-usb" |
7 | "qcom,ci-hdrc" | 7 | "qcom,ci-hdrc" |
8 | "chipidea,usb2" | 8 | "chipidea,usb2" |
9 | "xlnx,zynq-usb-2.20a" | ||
9 | - reg: base address and length of the registers | 10 | - reg: base address and length of the registers |
10 | - interrupts: interrupt for the USB controller | 11 | - interrupts: interrupt for the USB controller |
11 | 12 | ||
@@ -26,10 +27,6 @@ Optional properties: | |||
26 | - vbus-supply: reference to the VBUS regulator | 27 | - vbus-supply: reference to the VBUS regulator |
27 | - maximum-speed: limit the maximum connection speed to "full-speed". | 28 | - maximum-speed: limit the maximum connection speed to "full-speed". |
28 | - tpl-support: TPL (Targeted Peripheral List) feature for targeted hosts | 29 | - tpl-support: TPL (Targeted Peripheral List) feature for targeted hosts |
29 | - fsl,usbmisc: (FSL only) phandler of non-core register device, with one | ||
30 | argument that indicate usb controller index | ||
31 | - disable-over-current: (FSL only) disable over current detect | ||
32 | - external-vbus-divider: (FSL only) enables off-chip resistor divider for Vbus | ||
33 | - itc-setting: interrupt threshold control register control, the setting | 30 | - itc-setting: interrupt threshold control register control, the setting |
34 | should be aligned with ITC bits at register USBCMD. | 31 | should be aligned with ITC bits at register USBCMD. |
35 | - ahb-burst-config: it is vendor dependent, the required value should be | 32 | - ahb-burst-config: it is vendor dependent, the required value should be |
@@ -40,11 +37,28 @@ Optional properties: | |||
40 | - tx-burst-size-dword: it is vendor dependent, the tx burst size in dword | 37 | - tx-burst-size-dword: it is vendor dependent, the tx burst size in dword |
41 | (4 bytes), This register represents the maximum length of a the burst | 38 | (4 bytes), This register represents the maximum length of a the burst |
42 | in 32-bit words while moving data from system memory to the USB | 39 | in 32-bit words while moving data from system memory to the USB |
43 | bus, changing this value takes effect only the SBUSCFG.AHBBRST is 0. | 40 | bus, the value of this property will only take effect if property |
41 | "ahb-burst-config" is set to 0, if this property is missing the reset | ||
42 | default of the hardware implementation will be used. | ||
44 | - rx-burst-size-dword: it is vendor dependent, the rx burst size in dword | 43 | - rx-burst-size-dword: it is vendor dependent, the rx burst size in dword |
45 | (4 bytes), This register represents the maximum length of a the burst | 44 | (4 bytes), This register represents the maximum length of a the burst |
46 | in 32-bit words while moving data from the USB bus to system memory, | 45 | in 32-bit words while moving data from the USB bus to system memory, |
47 | changing this value takes effect only the SBUSCFG.AHBBRST is 0. | 46 | the value of this property will only take effect if property |
47 | "ahb-burst-config" is set to 0, if this property is missing the reset | ||
48 | default of the hardware implementation will be used. | ||
49 | - extcon: phandles to external connector devices. First phandle should point to | ||
50 | external connector, which provide "USB" cable events, the second should point | ||
51 | to external connector device, which provide "USB-HOST" cable events. If one | ||
52 | of the external connector devices is not required, empty <0> phandle should | ||
53 | be specified. | ||
54 | - phy-clkgate-delay-us: the delay time (us) between putting the PHY into | ||
55 | low power mode and gating the PHY clock. | ||
56 | |||
57 | i.mx specific properties | ||
58 | - fsl,usbmisc: phandler of non-core register device, with one | ||
59 | argument that indicate usb controller index | ||
60 | - disable-over-current: disable over current detect | ||
61 | - external-vbus-divider: enables off-chip resistor divider for Vbus | ||
48 | 62 | ||
49 | Example: | 63 | Example: |
50 | 64 | ||
@@ -61,4 +75,6 @@ Example: | |||
61 | ahb-burst-config = <0x0>; | 75 | ahb-burst-config = <0x0>; |
62 | tx-burst-size-dword = <0x10>; /* 64 bytes */ | 76 | tx-burst-size-dword = <0x10>; /* 64 bytes */ |
63 | rx-burst-size-dword = <0x10>; | 77 | rx-burst-size-dword = <0x10>; |
78 | extcon = <0>, <&usb_id>; | ||
79 | phy-clkgate-delay-us = <400>; | ||
64 | }; | 80 | }; |
diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt index 0815eac5b185..fb2ad0acedbd 100644 --- a/Documentation/devicetree/bindings/usb/dwc3.txt +++ b/Documentation/devicetree/bindings/usb/dwc3.txt | |||
@@ -1,6 +1,7 @@ | |||
1 | synopsys DWC3 CORE | 1 | synopsys DWC3 CORE |
2 | 2 | ||
3 | DWC3- USB3 CONTROLLER | 3 | DWC3- USB3 CONTROLLER. Complies to the generic USB binding properties |
4 | as described in 'usb/generic.txt' | ||
4 | 5 | ||
5 | Required properties: | 6 | Required properties: |
6 | - compatible: must be "snps,dwc3" | 7 | - compatible: must be "snps,dwc3" |
@@ -35,11 +36,16 @@ Optional properties: | |||
35 | LTSSM during USB3 Compliance mode. | 36 | LTSSM during USB3 Compliance mode. |
36 | - snps,dis_u3_susphy_quirk: when set core will disable USB3 suspend phy. | 37 | - snps,dis_u3_susphy_quirk: when set core will disable USB3 suspend phy. |
37 | - snps,dis_u2_susphy_quirk: when set core will disable USB2 suspend phy. | 38 | - snps,dis_u2_susphy_quirk: when set core will disable USB2 suspend phy. |
39 | - snps,dis_enblslpm_quirk: when set clears the enblslpm in GUSB2PHYCFG, | ||
40 | disabling the suspend signal to the PHY. | ||
38 | - snps,is-utmi-l1-suspend: true when DWC3 asserts output signal | 41 | - snps,is-utmi-l1-suspend: true when DWC3 asserts output signal |
39 | utmi_l1_suspend_n, false when asserts utmi_sleep_n | 42 | utmi_l1_suspend_n, false when asserts utmi_sleep_n |
40 | - snps,hird-threshold: HIRD threshold | 43 | - snps,hird-threshold: HIRD threshold |
41 | - snps,hsphy_interface: High-Speed PHY interface selection between "utmi" for | 44 | - snps,hsphy_interface: High-Speed PHY interface selection between "utmi" for |
42 | UTMI+ and "ulpi" for ULPI when the DWC_USB3_HSPHY_INTERFACE has value 3. | 45 | UTMI+ and "ulpi" for ULPI when the DWC_USB3_HSPHY_INTERFACE has value 3. |
46 | - snps,quirk-frame-length-adjustment: Value for GFLADJ_30MHZ field of GFLADJ | ||
47 | register for post-silicon frame length adjustment when the | ||
48 | fladj_30mhz_sdbnd signal is invalid or incorrect. | ||
43 | 49 | ||
44 | This is usually a subnode to DWC3 glue to which it is connected. | 50 | This is usually a subnode to DWC3 glue to which it is connected. |
45 | 51 | ||
diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt index 64a4ca6cf96f..7d48f63db44e 100644 --- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt +++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt | |||
@@ -5,6 +5,7 @@ Required properties: | |||
5 | - "renesas,usbhs-r8a7790" | 5 | - "renesas,usbhs-r8a7790" |
6 | - "renesas,usbhs-r8a7791" | 6 | - "renesas,usbhs-r8a7791" |
7 | - "renesas,usbhs-r8a7794" | 7 | - "renesas,usbhs-r8a7794" |
8 | - "renesas,usbhs-r8a7795" | ||
8 | - reg: Base address and length of the register for the USBHS | 9 | - reg: Base address and length of the register for the USBHS |
9 | - interrupts: Interrupt specifier for the USBHS | 10 | - interrupts: Interrupt specifier for the USBHS |
10 | - clocks: A list of phandle + clock specifier pairs | 11 | - clocks: A list of phandle + clock specifier pairs |
diff --git a/Documentation/devicetree/bindings/usb/samsung-usbphy.txt b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt deleted file mode 100644 index 33fd3543f3f8..000000000000 --- a/Documentation/devicetree/bindings/usb/samsung-usbphy.txt +++ /dev/null | |||
@@ -1,117 +0,0 @@ | |||
1 | SAMSUNG USB-PHY controllers | ||
2 | |||
3 | ** Samsung's usb 2.0 phy transceiver | ||
4 | |||
5 | The Samsung's usb 2.0 phy transceiver is used for controlling | ||
6 | usb 2.0 phy for s3c-hsotg as well as ehci-s5p and ohci-exynos | ||
7 | usb controllers across Samsung SOCs. | ||
8 | TODO: Adding the PHY binding with controller(s) according to the under | ||
9 | development generic PHY driver. | ||
10 | |||
11 | Required properties: | ||
12 | |||
13 | Exynos4210: | ||
14 | - compatible : should be "samsung,exynos4210-usb2phy" | ||
15 | - reg : base physical address of the phy registers and length of memory mapped | ||
16 | region. | ||
17 | - clocks: Clock IDs array as required by the controller. | ||
18 | - clock-names: names of clock correseponding IDs clock property as requested | ||
19 | by the controller driver. | ||
20 | |||
21 | Exynos5250: | ||
22 | - compatible : should be "samsung,exynos5250-usb2phy" | ||
23 | - reg : base physical address of the phy registers and length of memory mapped | ||
24 | region. | ||
25 | |||
26 | Optional properties: | ||
27 | - #address-cells: should be '1' when usbphy node has a child node with 'reg' | ||
28 | property. | ||
29 | - #size-cells: should be '1' when usbphy node has a child node with 'reg' | ||
30 | property. | ||
31 | - ranges: allows valid translation between child's address space and parent's | ||
32 | address space. | ||
33 | |||
34 | - The child node 'usbphy-sys' to the node 'usbphy' is for the system controller | ||
35 | interface for usb-phy. It should provide the following information required by | ||
36 | usb-phy controller to control phy. | ||
37 | - reg : base physical address of PHY_CONTROL registers. | ||
38 | The size of this register is the total sum of size of all PHY_CONTROL | ||
39 | registers that the SoC has. For example, the size will be | ||
40 | '0x4' in case we have only one PHY_CONTROL register (e.g. | ||
41 | OTHERS register in S3C64XX or USB_PHY_CONTROL register in S5PV210) | ||
42 | and, '0x8' in case we have two PHY_CONTROL registers (e.g. | ||
43 | USBDEVICE_PHY_CONTROL and USBHOST_PHY_CONTROL registers in exynos4x). | ||
44 | and so on. | ||
45 | |||
46 | Example: | ||
47 | - Exynos4210 | ||
48 | |||
49 | usbphy@125B0000 { | ||
50 | #address-cells = <1>; | ||
51 | #size-cells = <1>; | ||
52 | compatible = "samsung,exynos4210-usb2phy"; | ||
53 | reg = <0x125B0000 0x100>; | ||
54 | ranges; | ||
55 | |||
56 | clocks = <&clock 2>, <&clock 305>; | ||
57 | clock-names = "xusbxti", "otg"; | ||
58 | |||
59 | usbphy-sys { | ||
60 | /* USB device and host PHY_CONTROL registers */ | ||
61 | reg = <0x10020704 0x8>; | ||
62 | }; | ||
63 | }; | ||
64 | |||
65 | |||
66 | ** Samsung's usb 3.0 phy transceiver | ||
67 | |||
68 | Starting exynso5250, Samsung's SoC have usb 3.0 phy transceiver | ||
69 | which is used for controlling usb 3.0 phy for dwc3-exynos usb 3.0 | ||
70 | controllers across Samsung SOCs. | ||
71 | |||
72 | Required properties: | ||
73 | |||
74 | Exynos5250: | ||
75 | - compatible : should be "samsung,exynos5250-usb3phy" | ||
76 | - reg : base physical address of the phy registers and length of memory mapped | ||
77 | region. | ||
78 | - clocks: Clock IDs array as required by the controller. | ||
79 | - clock-names: names of clocks correseponding to IDs in the clock property | ||
80 | as requested by the controller driver. | ||
81 | |||
82 | Optional properties: | ||
83 | - #address-cells: should be '1' when usbphy node has a child node with 'reg' | ||
84 | property. | ||
85 | - #size-cells: should be '1' when usbphy node has a child node with 'reg' | ||
86 | property. | ||
87 | - ranges: allows valid translation between child's address space and parent's | ||
88 | address space. | ||
89 | |||
90 | - The child node 'usbphy-sys' to the node 'usbphy' is for the system controller | ||
91 | interface for usb-phy. It should provide the following information required by | ||
92 | usb-phy controller to control phy. | ||
93 | - reg : base physical address of PHY_CONTROL registers. | ||
94 | The size of this register is the total sum of size of all PHY_CONTROL | ||
95 | registers that the SoC has. For example, the size will be | ||
96 | '0x4' in case we have only one PHY_CONTROL register (e.g. | ||
97 | OTHERS register in S3C64XX or USB_PHY_CONTROL register in S5PV210) | ||
98 | and, '0x8' in case we have two PHY_CONTROL registers (e.g. | ||
99 | USBDEVICE_PHY_CONTROL and USBHOST_PHY_CONTROL registers in exynos4x). | ||
100 | and so on. | ||
101 | |||
102 | Example: | ||
103 | usbphy@12100000 { | ||
104 | compatible = "samsung,exynos5250-usb3phy"; | ||
105 | reg = <0x12100000 0x100>; | ||
106 | #address-cells = <1>; | ||
107 | #size-cells = <1>; | ||
108 | ranges; | ||
109 | |||
110 | clocks = <&clock 1>, <&clock 286>; | ||
111 | clock-names = "ext_xtal", "usbdrd30"; | ||
112 | |||
113 | usbphy-sys { | ||
114 | /* USB device and host PHY_CONTROL registers */ | ||
115 | reg = <0x10040704 0x8>; | ||
116 | }; | ||
117 | }; | ||
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index ac5f0c34ae00..55df1d444e9f 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt | |||
@@ -34,6 +34,7 @@ avago Avago Technologies | |||
34 | avic Shanghai AVIC Optoelectronics Co., Ltd. | 34 | avic Shanghai AVIC Optoelectronics Co., Ltd. |
35 | axis Axis Communications AB | 35 | axis Axis Communications AB |
36 | bosch Bosch Sensortec GmbH | 36 | bosch Bosch Sensortec GmbH |
37 | boundary Boundary Devices Inc. | ||
37 | brcm Broadcom Corporation | 38 | brcm Broadcom Corporation |
38 | buffalo Buffalo, Inc. | 39 | buffalo Buffalo, Inc. |
39 | calxeda Calxeda | 40 | calxeda Calxeda |
@@ -51,6 +52,7 @@ cirrus Cirrus Logic, Inc. | |||
51 | cloudengines Cloud Engines, Inc. | 52 | cloudengines Cloud Engines, Inc. |
52 | cnm Chips&Media, Inc. | 53 | cnm Chips&Media, Inc. |
53 | cnxt Conexant Systems, Inc. | 54 | cnxt Conexant Systems, Inc. |
55 | compulab CompuLab Ltd. | ||
54 | cortina Cortina Systems, Inc. | 56 | cortina Cortina Systems, Inc. |
55 | cosmic Cosmic Circuits | 57 | cosmic Cosmic Circuits |
56 | crystalfontz Crystalfontz America, Inc. | 58 | crystalfontz Crystalfontz America, Inc. |
@@ -82,6 +84,7 @@ everspin Everspin Technologies, Inc. | |||
82 | excito Excito | 84 | excito Excito |
83 | fcs Fairchild Semiconductor | 85 | fcs Fairchild Semiconductor |
84 | firefly Firefly | 86 | firefly Firefly |
87 | focaltech FocalTech Systems Co.,Ltd | ||
85 | fsl Freescale Semiconductor | 88 | fsl Freescale Semiconductor |
86 | GEFanuc GE Fanuc Intelligent Platforms Embedded Systems, Inc. | 89 | GEFanuc GE Fanuc Intelligent Platforms Embedded Systems, Inc. |
87 | gef GE Fanuc Intelligent Platforms Embedded Systems, Inc. | 90 | gef GE Fanuc Intelligent Platforms Embedded Systems, Inc. |
@@ -101,6 +104,7 @@ himax Himax Technologies, Inc. | |||
101 | hisilicon Hisilicon Limited. | 104 | hisilicon Hisilicon Limited. |
102 | hit Hitachi Ltd. | 105 | hit Hitachi Ltd. |
103 | hitex Hitex Development Tools | 106 | hitex Hitex Development Tools |
107 | holt Holt Integrated Circuits, Inc. | ||
104 | honeywell Honeywell | 108 | honeywell Honeywell |
105 | hp Hewlett Packard | 109 | hp Hewlett Packard |
106 | i2se I2SE GmbH | 110 | i2se I2SE GmbH |
@@ -168,7 +172,9 @@ pericom Pericom Technology Inc. | |||
168 | phytec PHYTEC Messtechnik GmbH | 172 | phytec PHYTEC Messtechnik GmbH |
169 | picochip Picochip Ltd | 173 | picochip Picochip Ltd |
170 | plathome Plat'Home Co., Ltd. | 174 | plathome Plat'Home Co., Ltd. |
175 | plda PLDA | ||
171 | pixcir PIXCIR MICROELECTRONICS Co., Ltd | 176 | pixcir PIXCIR MICROELECTRONICS Co., Ltd |
177 | pulsedlight PulsedLight, Inc | ||
172 | powervr PowerVR (deprecated, use img) | 178 | powervr PowerVR (deprecated, use img) |
173 | qca Qualcomm Atheros, Inc. | 179 | qca Qualcomm Atheros, Inc. |
174 | qcom Qualcomm Technologies, Inc | 180 | qcom Qualcomm Technologies, Inc |
@@ -191,7 +197,9 @@ sbs Smart Battery System | |||
191 | schindler Schindler | 197 | schindler Schindler |
192 | seagate Seagate Technology PLC | 198 | seagate Seagate Technology PLC |
193 | semtech Semtech Corporation | 199 | semtech Semtech Corporation |
200 | sgx SGX Sensortech | ||
194 | sharp Sharp Corporation | 201 | sharp Sharp Corporation |
202 | sigma Sigma Designs, Inc. | ||
195 | sil Silicon Image | 203 | sil Silicon Image |
196 | silabs Silicon Laboratories | 204 | silabs Silicon Laboratories |
197 | siliconmitus Silicon Mitus, Inc. | 205 | siliconmitus Silicon Mitus, Inc. |
@@ -203,6 +211,7 @@ sitronix Sitronix Technology Corporation | |||
203 | skyworks Skyworks Solutions, Inc. | 211 | skyworks Skyworks Solutions, Inc. |
204 | smsc Standard Microsystems Corporation | 212 | smsc Standard Microsystems Corporation |
205 | snps Synopsys, Inc. | 213 | snps Synopsys, Inc. |
214 | socionext Socionext Inc. | ||
206 | solidrun SolidRun | 215 | solidrun SolidRun |
207 | solomon Solomon Systech Limited | 216 | solomon Solomon Systech Limited |
208 | sony Sony Corporation | 217 | sony Sony Corporation |
@@ -221,7 +230,9 @@ toradex Toradex AG | |||
221 | toshiba Toshiba Corporation | 230 | toshiba Toshiba Corporation |
222 | toumaz Toumaz | 231 | toumaz Toumaz |
223 | tplink TP-LINK Technologies Co., Ltd. | 232 | tplink TP-LINK Technologies Co., Ltd. |
233 | tronfy Tronfy | ||
224 | truly Truly Semiconductors Limited | 234 | truly Truly Semiconductors Limited |
235 | upisemi uPI Semiconductor Corp. | ||
225 | usi Universal Scientific Industrial Co., Ltd. | 236 | usi Universal Scientific Industrial Co., Ltd. |
226 | v3 V3 Semiconductor | 237 | v3 V3 Semiconductor |
227 | variscite Variscite Ltd. | 238 | variscite Variscite Ltd. |
diff --git a/Documentation/devicetree/bindings/w1/omap-hdq.txt b/Documentation/devicetree/bindings/w1/omap-hdq.txt index fef794741bd1..913c5f91a0f9 100644 --- a/Documentation/devicetree/bindings/w1/omap-hdq.txt +++ b/Documentation/devicetree/bindings/w1/omap-hdq.txt | |||
@@ -1,11 +1,15 @@ | |||
1 | * OMAP HDQ One wire bus master controller | 1 | * OMAP HDQ One wire bus master controller |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : should be "ti,omap3-1w" | 4 | - compatible : should be "ti,omap3-1w" or "ti,am4372-hdq" |
5 | - reg : Address and length of the register set for the device | 5 | - reg : Address and length of the register set for the device |
6 | - interrupts : interrupt line. | 6 | - interrupts : interrupt line. |
7 | - ti,hwmods : "hdq1w" | 7 | - ti,hwmods : "hdq1w" |
8 | 8 | ||
9 | Optional properties: | ||
10 | - ti,mode: should be "hdq": HDQ mode "1w": one-wire mode. | ||
11 | If not specified HDQ mode is implied. | ||
12 | |||
9 | Example: | 13 | Example: |
10 | 14 | ||
11 | - From omap3.dtsi | 15 | - From omap3.dtsi |
@@ -14,4 +18,5 @@ Example: | |||
14 | reg = <0x480b2000 0x1000>; | 18 | reg = <0x480b2000 0x1000>; |
15 | interrupts = <58>; | 19 | interrupts = <58>; |
16 | ti,hwmods = "hdq1w"; | 20 | ti,hwmods = "hdq1w"; |
21 | ti,mode = "hdq"; | ||
17 | }; | 22 | }; |
diff --git a/Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt b/Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt new file mode 100644 index 000000000000..84122270be8f --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt | |||
@@ -0,0 +1,19 @@ | |||
1 | BCM7038 Watchdog timer | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible : should be "brcm,bcm7038-wdt" | ||
6 | - reg : Specifies base physical address and size of the registers. | ||
7 | |||
8 | Optional properties: | ||
9 | |||
10 | - clocks: The clock running the watchdog. If no clock is found the | ||
11 | driver will default to 27000000 Hz. | ||
12 | |||
13 | Example: | ||
14 | |||
15 | watchdog@f040a7e8 { | ||
16 | compatible = "brcm,bcm7038-wdt"; | ||
17 | clocks = <&upg_fixed>; | ||
18 | reg = <0xf040a7e8 0x16>; | ||
19 | }; | ||
diff --git a/Documentation/driver-model/platform.txt b/Documentation/driver-model/platform.txt index 07795ec51cde..e456696cfef2 100644 --- a/Documentation/driver-model/platform.txt +++ b/Documentation/driver-model/platform.txt | |||
@@ -63,6 +63,20 @@ runtime memory footprint: | |||
63 | int platform_driver_probe(struct platform_driver *drv, | 63 | int platform_driver_probe(struct platform_driver *drv, |
64 | int (*probe)(struct platform_device *)) | 64 | int (*probe)(struct platform_device *)) |
65 | 65 | ||
66 | Kernel modules can be composed of several platform drivers. The platform core | ||
67 | provides helpers to register and unregister an array of drivers: | ||
68 | |||
69 | int __platform_register_drivers(struct platform_driver * const *drivers, | ||
70 | unsigned int count, struct module *owner); | ||
71 | void platform_unregister_drivers(struct platform_driver * const *drivers, | ||
72 | unsigned int count); | ||
73 | |||
74 | If one of the drivers fails to register, all drivers registered up to that | ||
75 | point will be unregistered in reverse order. Note that there is a convenience | ||
76 | macro that passes THIS_MODULE as owner parameter: | ||
77 | |||
78 | #define platform_register_driver(drivers, count) | ||
79 | |||
66 | 80 | ||
67 | Device Enumeration | 81 | Device Enumeration |
68 | ~~~~~~~~~~~~~~~~~~ | 82 | ~~~~~~~~~~~~~~~~~~ |
diff --git a/Documentation/edac.txt b/Documentation/edac.txt index 0cf27a3544a5..80841a2d640c 100644 --- a/Documentation/edac.txt +++ b/Documentation/edac.txt | |||
@@ -744,6 +744,52 @@ exports one | |||
744 | possible that some errors could be lost. With rdimm's, they display the | 744 | possible that some errors could be lost. With rdimm's, they display the |
745 | contents of the registers | 745 | contents of the registers |
746 | 746 | ||
747 | AMD64_EDAC REFERENCE DOCUMENTS USED | ||
748 | ----------------------------------- | ||
749 | amd64_edac module is based on the following documents | ||
750 | (available from http://support.amd.com/en-us/search/tech-docs): | ||
751 | |||
752 | 1. Title: BIOS and Kernel Developer's Guide for AMD Athlon 64 and AMD | ||
753 | Opteron Processors | ||
754 | AMD publication #: 26094 | ||
755 | Revision: 3.26 | ||
756 | Link: http://support.amd.com/TechDocs/26094.PDF | ||
757 | |||
758 | 2. Title: BIOS and Kernel Developer's Guide for AMD NPT Family 0Fh | ||
759 | Processors | ||
760 | AMD publication #: 32559 | ||
761 | Revision: 3.00 | ||
762 | Issue Date: May 2006 | ||
763 | Link: http://support.amd.com/TechDocs/32559.pdf | ||
764 | |||
765 | 3. Title: BIOS and Kernel Developer's Guide (BKDG) For AMD Family 10h | ||
766 | Processors | ||
767 | AMD publication #: 31116 | ||
768 | Revision: 3.00 | ||
769 | Issue Date: September 07, 2007 | ||
770 | Link: http://support.amd.com/TechDocs/31116.pdf | ||
771 | |||
772 | 4. Title: BIOS and Kernel Developer's Guide (BKDG) for AMD Family 15h | ||
773 | Models 30h-3Fh Processors | ||
774 | AMD publication #: 49125 | ||
775 | Revision: 3.06 | ||
776 | Issue Date: 2/12/2015 (latest release) | ||
777 | Link: http://support.amd.com/TechDocs/49125_15h_Models_30h-3Fh_BKDG.pdf | ||
778 | |||
779 | 5. Title: BIOS and Kernel Developer's Guide (BKDG) for AMD Family 15h | ||
780 | Models 60h-6Fh Processors | ||
781 | AMD publication #: 50742 | ||
782 | Revision: 3.01 | ||
783 | Issue Date: 7/23/2015 (latest release) | ||
784 | Link: http://support.amd.com/TechDocs/50742_15h_Models_60h-6Fh_BKDG.pdf | ||
785 | |||
786 | 6. Title: BIOS and Kernel Developer's Guide (BKDG) for AMD Family 16h | ||
787 | Models 00h-0Fh Processors | ||
788 | AMD publication #: 48751 | ||
789 | Revision: 3.03 | ||
790 | Issue Date: 2/23/2015 (latest release) | ||
791 | Link: http://support.amd.com/TechDocs/48751_16h_bkdg.pdf | ||
792 | |||
747 | CREDITS: | 793 | CREDITS: |
748 | ======== | 794 | ======== |
749 | 795 | ||
diff --git a/Documentation/email-clients.txt b/Documentation/email-clients.txt index 3fa450881ecb..aba85b39a400 100644 --- a/Documentation/email-clients.txt +++ b/Documentation/email-clients.txt | |||
@@ -220,7 +220,7 @@ to coerce it into behaving. | |||
220 | Compose dialog. | 220 | Compose dialog. |
221 | 221 | ||
222 | Please note that "external editor" requires that your editor must not | 222 | Please note that "external editor" requires that your editor must not |
223 | fork, or in other words, the editor must not return before closing. | 223 | fork, or in other words, the editor must not return before closing. |
224 | You may have to pass additional flags or change the settings of your | 224 | You may have to pass additional flags or change the settings of your |
225 | editor. Most notably if you are using gvim then you must pass the -f | 225 | editor. Most notably if you are using gvim then you must pass the -f |
226 | option to gvim by putting "/usr/bin/gvim -f" (if the binary is in | 226 | option to gvim by putting "/usr/bin/gvim -f" (if the binary is in |
diff --git a/Documentation/features/debug/KASAN/arch-support.txt b/Documentation/features/debug/KASAN/arch-support.txt index 14531da2fb54..703f5784bc90 100644 --- a/Documentation/features/debug/KASAN/arch-support.txt +++ b/Documentation/features/debug/KASAN/arch-support.txt | |||
@@ -9,7 +9,7 @@ | |||
9 | | alpha: | TODO | | 9 | | alpha: | TODO | |
10 | | arc: | TODO | | 10 | | arc: | TODO | |
11 | | arm: | TODO | | 11 | | arm: | TODO | |
12 | | arm64: | TODO | | 12 | | arm64: | ok | |
13 | | avr32: | TODO | | 13 | | avr32: | TODO | |
14 | | blackfin: | TODO | | 14 | | blackfin: | TODO | |
15 | | c6x: | TODO | | 15 | | c6x: | TODO | |
diff --git a/Documentation/features/vm/THP/arch-support.txt b/Documentation/features/vm/THP/arch-support.txt index df384e3e845f..523f8307b9cd 100644 --- a/Documentation/features/vm/THP/arch-support.txt +++ b/Documentation/features/vm/THP/arch-support.txt | |||
@@ -7,7 +7,7 @@ | |||
7 | | arch |status| | 7 | | arch |status| |
8 | ----------------------- | 8 | ----------------------- |
9 | | alpha: | TODO | | 9 | | alpha: | TODO | |
10 | | arc: | .. | | 10 | | arc: | ok | |
11 | | arm: | ok | | 11 | | arm: | ok | |
12 | | arm64: | ok | | 12 | | arm64: | ok | |
13 | | avr32: | .. | | 13 | | avr32: | .. | |
diff --git a/Documentation/features/vm/pte_special/arch-support.txt b/Documentation/features/vm/pte_special/arch-support.txt index aaaa21db6226..3de5434c857c 100644 --- a/Documentation/features/vm/pte_special/arch-support.txt +++ b/Documentation/features/vm/pte_special/arch-support.txt | |||
@@ -7,7 +7,7 @@ | |||
7 | | arch |status| | 7 | | arch |status| |
8 | ----------------------- | 8 | ----------------------- |
9 | | alpha: | TODO | | 9 | | alpha: | TODO | |
10 | | arc: | TODO | | 10 | | arc: | ok | |
11 | | arm: | ok | | 11 | | arm: | ok | |
12 | | arm64: | ok | | 12 | | arm64: | ok | |
13 | | avr32: | TODO | | 13 | | avr32: | TODO | |
diff --git a/Documentation/filesystems/debugfs.txt b/Documentation/filesystems/debugfs.txt index 463f595733e8..4f45f71149cb 100644 --- a/Documentation/filesystems/debugfs.txt +++ b/Documentation/filesystems/debugfs.txt | |||
@@ -105,7 +105,7 @@ a variable of type size_t. | |||
105 | Boolean values can be placed in debugfs with: | 105 | Boolean values can be placed in debugfs with: |
106 | 106 | ||
107 | struct dentry *debugfs_create_bool(const char *name, umode_t mode, | 107 | struct dentry *debugfs_create_bool(const char *name, umode_t mode, |
108 | struct dentry *parent, u32 *value); | 108 | struct dentry *parent, bool *value); |
109 | 109 | ||
110 | A read on the resulting file will yield either Y (for non-zero values) or | 110 | A read on the resulting file will yield either Y (for non-zero values) or |
111 | N, followed by a newline. If written to, it will accept either upper- or | 111 | N, followed by a newline. If written to, it will accept either upper- or |
diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt index e2d5105b7214..b102b436563e 100644 --- a/Documentation/filesystems/f2fs.txt +++ b/Documentation/filesystems/f2fs.txt | |||
@@ -102,7 +102,8 @@ background_gc=%s Turn on/off cleaning operations, namely garbage | |||
102 | collection, triggered in background when I/O subsystem is | 102 | collection, triggered in background when I/O subsystem is |
103 | idle. If background_gc=on, it will turn on the garbage | 103 | idle. If background_gc=on, it will turn on the garbage |
104 | collection and if background_gc=off, garbage collection | 104 | collection and if background_gc=off, garbage collection |
105 | will be truned off. | 105 | will be truned off. If background_gc=sync, it will turn |
106 | on synchronous garbage collection running in background. | ||
106 | Default value for this option is on. So garbage | 107 | Default value for this option is on. So garbage |
107 | collection is on by default. | 108 | collection is on by default. |
108 | disable_roll_forward Disable the roll-forward recovery routine | 109 | disable_roll_forward Disable the roll-forward recovery routine |
diff --git a/Documentation/filesystems/gfs2-glocks.txt b/Documentation/filesystems/gfs2-glocks.txt index fcc79957be63..1fb12f9dfe48 100644 --- a/Documentation/filesystems/gfs2-glocks.txt +++ b/Documentation/filesystems/gfs2-glocks.txt | |||
@@ -5,7 +5,7 @@ This documents the basic principles of the glock state machine | |||
5 | internals. Each glock (struct gfs2_glock in fs/gfs2/incore.h) | 5 | internals. Each glock (struct gfs2_glock in fs/gfs2/incore.h) |
6 | has two main (internal) locks: | 6 | has two main (internal) locks: |
7 | 7 | ||
8 | 1. A spinlock (gl_spin) which protects the internal state such | 8 | 1. A spinlock (gl_lockref.lock) which protects the internal state such |
9 | as gl_state, gl_target and the list of holders (gl_holders) | 9 | as gl_state, gl_target and the list of holders (gl_holders) |
10 | 2. A non-blocking bit lock, GLF_LOCK, which is used to prevent other | 10 | 2. A non-blocking bit lock, GLF_LOCK, which is used to prevent other |
11 | threads from making calls to the DLM, etc. at the same time. If a | 11 | threads from making calls to the DLM, etc. at the same time. If a |
@@ -82,8 +82,8 @@ rather than via the glock. | |||
82 | 82 | ||
83 | Locking rules for glock operations: | 83 | Locking rules for glock operations: |
84 | 84 | ||
85 | Operation | GLF_LOCK bit lock held | gl_spin spinlock held | 85 | Operation | GLF_LOCK bit lock held | gl_lockref.lock spinlock held |
86 | ----------------------------------------------------------------- | 86 | ------------------------------------------------------------------------- |
87 | go_xmote_th | Yes | No | 87 | go_xmote_th | Yes | No |
88 | go_xmote_bh | Yes | No | 88 | go_xmote_bh | Yes | No |
89 | go_inval | Yes | No | 89 | go_inval | Yes | No |
diff --git a/Documentation/filesystems/nfs/nfsroot.txt b/Documentation/filesystems/nfs/nfsroot.txt index 2d66ed688125..bb5ab6de5924 100644 --- a/Documentation/filesystems/nfs/nfsroot.txt +++ b/Documentation/filesystems/nfs/nfsroot.txt | |||
@@ -157,6 +157,9 @@ ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>: | |||
157 | both: use both BOOTP and RARP but not DHCP | 157 | both: use both BOOTP and RARP but not DHCP |
158 | (old option kept for backwards compatibility) | 158 | (old option kept for backwards compatibility) |
159 | 159 | ||
160 | if dhcp is used, the client identifier can be used by following | ||
161 | format "ip=dhcp,client-id-type,client-id-value" | ||
162 | |||
160 | Default: any | 163 | Default: any |
161 | 164 | ||
162 | <dns0-ip> IP address of first nameserver. | 165 | <dns0-ip> IP address of first nameserver. |
diff --git a/Documentation/filesystems/path-lookup.md b/Documentation/filesystems/path-lookup.md new file mode 100644 index 000000000000..1b39e084a2b2 --- /dev/null +++ b/Documentation/filesystems/path-lookup.md | |||
@@ -0,0 +1,1297 @@ | |||
1 | <head> | ||
2 | <style> p { max-width:50em} ol, ul {max-width: 40em}</style> | ||
3 | </head> | ||
4 | |||
5 | Pathname lookup in Linux. | ||
6 | ========================= | ||
7 | |||
8 | This write-up is based on three articles published at lwn.net: | ||
9 | |||
10 | - <https://lwn.net/Articles/649115/> Pathname lookup in Linux | ||
11 | - <https://lwn.net/Articles/649729/> RCU-walk: faster pathname lookup in Linux | ||
12 | - <https://lwn.net/Articles/650786/> A walk among the symlinks | ||
13 | |||
14 | Written by Neil Brown with help from Al Viro and Jon Corbet. | ||
15 | |||
16 | Introduction | ||
17 | ------------ | ||
18 | |||
19 | The most obvious aspect of pathname lookup, which very little | ||
20 | exploration is needed to discover, is that it is complex. There are | ||
21 | many rules, special cases, and implementation alternatives that all | ||
22 | combine to confuse the unwary reader. Computer science has long been | ||
23 | acquainted with such complexity and has tools to help manage it. One | ||
24 | tool that we will make extensive use of is "divide and conquer". For | ||
25 | the early parts of the analysis we will divide off symlinks - leaving | ||
26 | them until the final part. Well before we get to symlinks we have | ||
27 | another major division based on the VFS's approach to locking which | ||
28 | will allow us to review "REF-walk" and "RCU-walk" separately. But we | ||
29 | are getting ahead of ourselves. There are some important low level | ||
30 | distinctions we need to clarify first. | ||
31 | |||
32 | There are two sorts of ... | ||
33 | -------------------------- | ||
34 | |||
35 | [`openat()`]: http://man7.org/linux/man-pages/man2/openat.2.html | ||
36 | |||
37 | Pathnames (sometimes "file names"), used to identify objects in the | ||
38 | filesystem, will be familiar to most readers. They contain two sorts | ||
39 | of elements: "slashes" that are sequences of one or more "`/`" | ||
40 | characters, and "components" that are sequences of one or more | ||
41 | non-"`/`" characters. These form two kinds of paths. Those that | ||
42 | start with slashes are "absolute" and start from the filesystem root. | ||
43 | The others are "relative" and start from the current directory, or | ||
44 | from some other location specified by a file descriptor given to a | ||
45 | "xxx`at`" system call such as "[`openat()`]". | ||
46 | |||
47 | [`execveat()`]: http://man7.org/linux/man-pages/man2/execveat.2.html | ||
48 | |||
49 | It is tempting to describe the second kind as starting with a | ||
50 | component, but that isn't always accurate: a pathname can lack both | ||
51 | slashes and components, it can be empty, in other words. This is | ||
52 | generally forbidden in POSIX, but some of those "xxx`at`" system calls | ||
53 | in Linux permit it when the `AT_EMPTY_PATH` flag is given. For | ||
54 | example, if you have an open file descriptor on an executable file you | ||
55 | can execute it by calling [`execveat()`] passing the file descriptor, | ||
56 | an empty path, and the `AT_EMPTY_PATH` flag. | ||
57 | |||
58 | These paths can be divided into two sections: the final component and | ||
59 | everything else. The "everything else" is the easy bit. In all cases | ||
60 | it must identify a directory that already exists, otherwise an error | ||
61 | such as `ENOENT` or `ENOTDIR` will be reported. | ||
62 | |||
63 | The final component is not so simple. Not only do different system | ||
64 | calls interpret it quite differently (e.g. some create it, some do | ||
65 | not), but it might not even exist: neither the empty pathname nor the | ||
66 | pathname that is just slashes have a final component. If it does | ||
67 | exist, it could be "`.`" or "`..`" which are handled quite differently | ||
68 | from other components. | ||
69 | |||
70 | [POSIX]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_12 | ||
71 | |||
72 | If a pathname ends with a slash, such as "`/tmp/foo/`" it might be | ||
73 | tempting to consider that to have an empty final component. In many | ||
74 | ways that would lead to correct results, but not always. In | ||
75 | particular, `mkdir()` and `rmdir()` each create or remove a directory named | ||
76 | by the final component, and they are required to work with pathnames | ||
77 | ending in "`/`". According to [POSIX] | ||
78 | |||
79 | > A pathname that contains at least one non- <slash> character and | ||
80 | > that ends with one or more trailing <slash> characters shall not | ||
81 | > be resolved successfully unless the last pathname component before | ||
82 | > the trailing <slash> characters names an existing directory or a | ||
83 | > directory entry that is to be created for a directory immediately | ||
84 | > after the pathname is resolved. | ||
85 | |||
86 | The Linux pathname walking code (mostly in `fs/namei.c`) deals with | ||
87 | all of these issues: breaking the path into components, handling the | ||
88 | "everything else" quite separately from the final component, and | ||
89 | checking that the trailing slash is not used where it isn't | ||
90 | permitted. It also addresses the important issue of concurrent | ||
91 | access. | ||
92 | |||
93 | While one process is looking up a pathname, another might be making | ||
94 | changes that affect that lookup. One fairly extreme case is that if | ||
95 | "a/b" were renamed to "a/c/b" while another process were looking up | ||
96 | "a/b/..", that process might successfully resolve on "a/c". | ||
97 | Most races are much more subtle, and a big part of the task of | ||
98 | pathname lookup is to prevent them from having damaging effects. Many | ||
99 | of the possible races are seen most clearly in the context of the | ||
100 | "dcache" and an understanding of that is central to understanding | ||
101 | pathname lookup. | ||
102 | |||
103 | More than just a cache. | ||
104 | ----------------------- | ||
105 | |||
106 | The "dcache" caches information about names in each filesystem to | ||
107 | make them quickly available for lookup. Each entry (known as a | ||
108 | "dentry") contains three significant fields: a component name, a | ||
109 | pointer to a parent dentry, and a pointer to the "inode" which | ||
110 | contains further information about the object in that parent with | ||
111 | the given name. The inode pointer can be `NULL` indicating that the | ||
112 | name doesn't exist in the parent. While there can be linkage in the | ||
113 | dentry of a directory to the dentries of the children, that linkage is | ||
114 | not used for pathname lookup, and so will not be considered here. | ||
115 | |||
116 | The dcache has a number of uses apart from accelerating lookup. One | ||
117 | that will be particularly relevant is that it is closely integrated | ||
118 | with the mount table that records which filesystem is mounted where. | ||
119 | What the mount table actually stores is which dentry is mounted on top | ||
120 | of which other dentry. | ||
121 | |||
122 | When considering the dcache, we have another of our "two types" | ||
123 | distinctions: there are two types of filesystems. | ||
124 | |||
125 | Some filesystems ensure that the information in the dcache is always | ||
126 | completely accurate (though not necessarily complete). This can allow | ||
127 | the VFS to determine if a particular file does or doesn't exist | ||
128 | without checking with the filesystem, and means that the VFS can | ||
129 | protect the filesystem against certain races and other problems. | ||
130 | These are typically "local" filesystems such as ext3, XFS, and Btrfs. | ||
131 | |||
132 | Other filesystems don't provide that guarantee because they cannot. | ||
133 | These are typically filesystems that are shared across a network, | ||
134 | whether remote filesystems like NFS and 9P, or cluster filesystems | ||
135 | like ocfs2 or cephfs. These filesystems allow the VFS to revalidate | ||
136 | cached information, and must provide their own protection against | ||
137 | awkward races. The VFS can detect these filesystems by the | ||
138 | `DCACHE_OP_REVALIDATE` flag being set in the dentry. | ||
139 | |||
140 | REF-walk: simple concurrency management with refcounts and spinlocks | ||
141 | -------------------------------------------------------------------- | ||
142 | |||
143 | With all of those divisions carefully classified, we can now start | ||
144 | looking at the actual process of walking along a path. In particular | ||
145 | we will start with the handling of the "everything else" part of a | ||
146 | pathname, and focus on the "REF-walk" approach to concurrency | ||
147 | management. This code is found in the `link_path_walk()` function, if | ||
148 | you ignore all the places that only run when "`LOOKUP_RCU`" | ||
149 | (indicating the use of RCU-walk) is set. | ||
150 | |||
151 | [Meet the Lockers]: https://lwn.net/Articles/453685/ | ||
152 | |||
153 | REF-walk is fairly heavy-handed with locks and reference counts. Not | ||
154 | as heavy-handed as in the old "big kernel lock" days, but certainly not | ||
155 | afraid of taking a lock when one is needed. It uses a variety of | ||
156 | different concurrency controls. A background understanding of the | ||
157 | various primitives is assumed, or can be gleaned from elsewhere such | ||
158 | as in [Meet the Lockers]. | ||
159 | |||
160 | The locking mechanisms used by REF-walk include: | ||
161 | |||
162 | ### dentry->d_lockref ### | ||
163 | |||
164 | This uses the lockref primitive to provide both a spinlock and a | ||
165 | reference count. The special-sauce of this primitive is that the | ||
166 | conceptual sequence "lock; inc_ref; unlock;" can often be performed | ||
167 | with a single atomic memory operation. | ||
168 | |||
169 | Holding a reference on a dentry ensures that the dentry won't suddenly | ||
170 | be freed and used for something else, so the values in various fields | ||
171 | will behave as expected. It also protects the `->d_inode` reference | ||
172 | to the inode to some extent. | ||
173 | |||
174 | The association between a dentry and its inode is fairly permanent. | ||
175 | For example, when a file is renamed, the dentry and inode move | ||
176 | together to the new location. When a file is created the dentry will | ||
177 | initially be negative (i.e. `d_inode` is `NULL`), and will be assigned | ||
178 | to the new inode as part of the act of creation. | ||
179 | |||
180 | When a file is deleted, this can be reflected in the cache either by | ||
181 | setting `d_inode` to `NULL`, or by removing it from the hash table | ||
182 | (described shortly) used to look up the name in the parent directory. | ||
183 | If the dentry is still in use the second option is used as it is | ||
184 | perfectly legal to keep using an open file after it has been deleted | ||
185 | and having the dentry around helps. If the dentry is not otherwise in | ||
186 | use (i.e. if the refcount in `d_lockref` is one), only then will | ||
187 | `d_inode` be set to `NULL`. Doing it this way is more efficient for a | ||
188 | very common case. | ||
189 | |||
190 | So as long as a counted reference is held to a dentry, a non-`NULL` `->d_inode` | ||
191 | value will never be changed. | ||
192 | |||
193 | ### dentry->d_lock ### | ||
194 | |||
195 | `d_lock` is a synonym for the spinlock that is part of `d_lockref` above. | ||
196 | For our purposes, holding this lock protects against the dentry being | ||
197 | renamed or unlinked. In particular, its parent (`d_parent`), and its | ||
198 | name (`d_name`) cannot be changed, and it cannot be removed from the | ||
199 | dentry hash table. | ||
200 | |||
201 | When looking for a name in a directory, REF-walk takes `d_lock` on | ||
202 | each candidate dentry that it finds in the hash table and then checks | ||
203 | that the parent and name are correct. So it doesn't lock the parent | ||
204 | while searching in the cache; it only locks children. | ||
205 | |||
206 | When looking for the parent for a given name (to handle "`..`"), | ||
207 | REF-walk can take `d_lock` to get a stable reference to `d_parent`, | ||
208 | but it first tries a more lightweight approach. As seen in | ||
209 | `dget_parent()`, if a reference can be claimed on the parent, and if | ||
210 | subsequently `d_parent` can be seen to have not changed, then there is | ||
211 | no need to actually take the lock on the child. | ||
212 | |||
213 | ### rename_lock ### | ||
214 | |||
215 | Looking up a given name in a given directory involves computing a hash | ||
216 | from the two values (the name and the dentry of the directory), | ||
217 | accessing that slot in a hash table, and searching the linked list | ||
218 | that is found there. | ||
219 | |||
220 | When a dentry is renamed, the name and the parent dentry can both | ||
221 | change so the hash will almost certainly change too. This would move the | ||
222 | dentry to a different chain in the hash table. If a filename search | ||
223 | happened to be looking at a dentry that was moved in this way, | ||
224 | it might end up continuing the search down the wrong chain, | ||
225 | and so miss out on part of the correct chain. | ||
226 | |||
227 | The name-lookup process (`d_lookup()`) does _not_ try to prevent this | ||
228 | from happening, but only to detect when it happens. | ||
229 | `rename_lock` is a seqlock that is updated whenever any dentry is | ||
230 | renamed. If `d_lookup` finds that a rename happened while it | ||
231 | unsuccessfully scanned a chain in the hash table, it simply tries | ||
232 | again. | ||
233 | |||
234 | ### inode->i_mutex ### | ||
235 | |||
236 | `i_mutex` is a mutex that serializes all changes to a particular | ||
237 | directory. This ensures that, for example, an `unlink()` and a `rename()` | ||
238 | cannot both happen at the same time. It also keeps the directory | ||
239 | stable while the filesystem is asked to look up a name that is not | ||
240 | currently in the dcache. | ||
241 | |||
242 | This has a complementary role to that of `d_lock`: `i_mutex` on a | ||
243 | directory protects all of the names in that directory, while `d_lock` | ||
244 | on a name protects just one name in a directory. Most changes to the | ||
245 | dcache hold `i_mutex` on the relevant directory inode and briefly take | ||
246 | `d_lock` on one or more the dentries while the change happens. One | ||
247 | exception is when idle dentries are removed from the dcache due to | ||
248 | memory pressure. This uses `d_lock`, but `i_mutex` plays no role. | ||
249 | |||
250 | The mutex affects pathname lookup in two distinct ways. Firstly it | ||
251 | serializes lookup of a name in a directory. `walk_component()` uses | ||
252 | `lookup_fast()` first which, in turn, checks to see if the name is in the cache, | ||
253 | using only `d_lock` locking. If the name isn't found, then `walk_component()` | ||
254 | falls back to `lookup_slow()` which takes `i_mutex`, checks again that | ||
255 | the name isn't in the cache, and then calls in to the filesystem to get a | ||
256 | definitive answer. A new dentry will be added to the cache regardless of | ||
257 | the result. | ||
258 | |||
259 | Secondly, when pathname lookup reaches the final component, it will | ||
260 | sometimes need to take `i_mutex` before performing the last lookup so | ||
261 | that the required exclusion can be achieved. How path lookup chooses | ||
262 | to take, or not take, `i_mutex` is one of the | ||
263 | issues addressed in a subsequent section. | ||
264 | |||
265 | ### mnt->mnt_count ### | ||
266 | |||
267 | `mnt_count` is a per-CPU reference counter on "`mount`" structures. | ||
268 | Per-CPU here means that incrementing the count is cheap as it only | ||
269 | uses CPU-local memory, but checking if the count is zero is expensive as | ||
270 | it needs to check with every CPU. Taking a `mnt_count` reference | ||
271 | prevents the mount structure from disappearing as the result of regular | ||
272 | unmount operations, but does not prevent a "lazy" unmount. So holding | ||
273 | `mnt_count` doesn't ensure that the mount remains in the namespace and, | ||
274 | in particular, doesn't stabilize the link to the mounted-on dentry. It | ||
275 | does, however, ensure that the `mount` data structure remains coherent, | ||
276 | and it provides a reference to the root dentry of the mounted | ||
277 | filesystem. So a reference through `->mnt_count` provides a stable | ||
278 | reference to the mounted dentry, but not the mounted-on dentry. | ||
279 | |||
280 | ### mount_lock ### | ||
281 | |||
282 | `mount_lock` is a global seqlock, a bit like `rename_lock`. It can be used to | ||
283 | check if any change has been made to any mount points. | ||
284 | |||
285 | While walking down the tree (away from the root) this lock is used when | ||
286 | crossing a mount point to check that the crossing was safe. That is, | ||
287 | the value in the seqlock is read, then the code finds the mount that | ||
288 | is mounted on the current directory, if there is one, and increments | ||
289 | the `mnt_count`. Finally the value in `mount_lock` is checked against | ||
290 | the old value. If there is no change, then the crossing was safe. If there | ||
291 | was a change, the `mnt_count` is decremented and the whole process is | ||
292 | retried. | ||
293 | |||
294 | When walking up the tree (towards the root) by following a ".." link, | ||
295 | a little more care is needed. In this case the seqlock (which | ||
296 | contains both a counter and a spinlock) is fully locked to prevent | ||
297 | any changes to any mount points while stepping up. This locking is | ||
298 | needed to stabilize the link to the mounted-on dentry, which the | ||
299 | refcount on the mount itself doesn't ensure. | ||
300 | |||
301 | ### RCU ### | ||
302 | |||
303 | Finally the global (but extremely lightweight) RCU read lock is held | ||
304 | from time to time to ensure certain data structures don't get freed | ||
305 | unexpectedly. | ||
306 | |||
307 | In particular it is held while scanning chains in the dcache hash | ||
308 | table, and the mount point hash table. | ||
309 | |||
310 | Bringing it together with `struct nameidata` | ||
311 | -------------------------------------------- | ||
312 | |||
313 | [First edition Unix]: http://minnie.tuhs.org/cgi-bin/utree.pl?file=V1/u2.s | ||
314 | |||
315 | Throughout the process of walking a path, the current status is stored | ||
316 | in a `struct nameidata`, "namei" being the traditional name - dating | ||
317 | all the way back to [First Edition Unix] - of the function that | ||
318 | converts a "name" to an "inode". `struct nameidata` contains (among | ||
319 | other fields): | ||
320 | |||
321 | ### `struct path path` ### | ||
322 | |||
323 | A `path` contains a `struct vfsmount` (which is | ||
324 | embedded in a `struct mount`) and a `struct dentry`. Together these | ||
325 | record the current status of the walk. They start out referring to the | ||
326 | starting point (the current working directory, the root directory, or some other | ||
327 | directory identified by a file descriptor), and are updated on each | ||
328 | step. A reference through `d_lockref` and `mnt_count` is always | ||
329 | held. | ||
330 | |||
331 | ### `struct qstr last` ### | ||
332 | |||
333 | This is a string together with a length (i.e. _not_ `nul` terminated) | ||
334 | that is the "next" component in the pathname. | ||
335 | |||
336 | ### `int last_type` ### | ||
337 | |||
338 | This is one of `LAST_NORM`, `LAST_ROOT`, `LAST_DOT`, `LAST_DOTDOT`, or | ||
339 | `LAST_BIND`. The `last` field is only valid if the type is | ||
340 | `LAST_NORM`. `LAST_BIND` is used when following a symlink and no | ||
341 | components of the symlink have been processed yet. Others should be | ||
342 | fairly self-explanatory. | ||
343 | |||
344 | ### `struct path root` ### | ||
345 | |||
346 | This is used to hold a reference to the effective root of the | ||
347 | filesystem. Often that reference won't be needed, so this field is | ||
348 | only assigned the first time it is used, or when a non-standard root | ||
349 | is requested. Keeping a reference in the `nameidata` ensures that | ||
350 | only one root is in effect for the entire path walk, even if it races | ||
351 | with a `chroot()` system call. | ||
352 | |||
353 | The root is needed when either of two conditions holds: (1) either the | ||
354 | pathname or a symbolic link starts with a "'/'", or (2) a "`..`" | ||
355 | component is being handled, since "`..`" from the root must always stay | ||
356 | at the root. The value used is usually the current root directory of | ||
357 | the calling process. An alternate root can be provided as when | ||
358 | `sysctl()` calls `file_open_root()`, and when NFSv4 or Btrfs call | ||
359 | `mount_subtree()`. In each case a pathname is being looked up in a very | ||
360 | specific part of the filesystem, and the lookup must not be allowed to | ||
361 | escape that subtree. It works a bit like a local `chroot()`. | ||
362 | |||
363 | Ignoring the handling of symbolic links, we can now describe the | ||
364 | "`link_path_walk()`" function, which handles the lookup of everything | ||
365 | except the final component as: | ||
366 | |||
367 | > Given a path (`name`) and a nameidata structure (`nd`), check that the | ||
368 | > current directory has execute permission and then advance `name` | ||
369 | > over one component while updating `last_type` and `last`. If that | ||
370 | > was the final component, then return, otherwise call | ||
371 | > `walk_component()` and repeat from the top. | ||
372 | |||
373 | `walk_component()` is even easier. If the component is `LAST_DOTS`, | ||
374 | it calls `handle_dots()` which does the necessary locking as already | ||
375 | described. If it finds a `LAST_NORM` component it first calls | ||
376 | "`lookup_fast()`" which only looks in the dcache, but will ask the | ||
377 | filesystem to revalidate the result if it is that sort of filesystem. | ||
378 | If that doesn't get a good result, it calls "`lookup_slow()`" which | ||
379 | takes the `i_mutex`, rechecks the cache, and then asks the filesystem | ||
380 | to find a definitive answer. Each of these will call | ||
381 | `follow_managed()` (as described below) to handle any mount points. | ||
382 | |||
383 | In the absence of symbolic links, `walk_component()` creates a new | ||
384 | `struct path` containing a counted reference to the new dentry and a | ||
385 | reference to the new `vfsmount` which is only counted if it is | ||
386 | different from the previous `vfsmount`. It then calls | ||
387 | `path_to_nameidata()` to install the new `struct path` in the | ||
388 | `struct nameidata` and drop the unneeded references. | ||
389 | |||
390 | This "hand-over-hand" sequencing of getting a reference to the new | ||
391 | dentry before dropping the reference to the previous dentry may | ||
392 | seem obvious, but is worth pointing out so that we will recognize its | ||
393 | analogue in the "RCU-walk" version. | ||
394 | |||
395 | Handling the final component. | ||
396 | ----------------------------- | ||
397 | |||
398 | `link_path_walk()` only walks as far as setting `nd->last` and | ||
399 | `nd->last_type` to refer to the final component of the path. It does | ||
400 | not call `walk_component()` that last time. Handling that final | ||
401 | component remains for the caller to sort out. Those callers are | ||
402 | `path_lookupat()`, `path_parentat()`, `path_mountpoint()` and | ||
403 | `path_openat()` each of which handles the differing requirements of | ||
404 | different system calls. | ||
405 | |||
406 | `path_parentat()` is clearly the simplest - it just wraps a little bit | ||
407 | of housekeeping around `link_path_walk()` and returns the parent | ||
408 | directory and final component to the caller. The caller will be either | ||
409 | aiming to create a name (via `filename_create()`) or remove or rename | ||
410 | a name (in which case `user_path_parent()` is used). They will use | ||
411 | `i_mutex` to exclude other changes while they validate and then | ||
412 | perform their operation. | ||
413 | |||
414 | `path_lookupat()` is nearly as simple - it is used when an existing | ||
415 | object is wanted such as by `stat()` or `chmod()`. It essentially just | ||
416 | calls `walk_component()` on the final component through a call to | ||
417 | `lookup_last()`. `path_lookupat()` returns just the final dentry. | ||
418 | |||
419 | `path_mountpoint()` handles the special case of unmounting which must | ||
420 | not try to revalidate the mounted filesystem. It effectively | ||
421 | contains, through a call to `mountpoint_last()`, an alternate | ||
422 | implementation of `lookup_slow()` which skips that step. This is | ||
423 | important when unmounting a filesystem that is inaccessible, such as | ||
424 | one provided by a dead NFS server. | ||
425 | |||
426 | Finally `path_openat()` is used for the `open()` system call; it | ||
427 | contains, in support functions starting with "`do_last()`", all the | ||
428 | complexity needed to handle the different subtleties of O_CREAT (with | ||
429 | or without O_EXCL), final "`/`" characters, and trailing symbolic | ||
430 | links. We will revisit this in the final part of this series, which | ||
431 | focuses on those symbolic links. "`do_last()`" will sometimes, but | ||
432 | not always, take `i_mutex`, depending on what it finds. | ||
433 | |||
434 | Each of these, or the functions which call them, need to be alert to | ||
435 | the possibility that the final component is not `LAST_NORM`. If the | ||
436 | goal of the lookup is to create something, then any value for | ||
437 | `last_type` other than `LAST_NORM` will result in an error. For | ||
438 | example if `path_parentat()` reports `LAST_DOTDOT`, then the caller | ||
439 | won't try to create that name. They also check for trailing slashes | ||
440 | by testing `last.name[last.len]`. If there is any character beyond | ||
441 | the final component, it must be a trailing slash. | ||
442 | |||
443 | Revalidation and automounts | ||
444 | --------------------------- | ||
445 | |||
446 | Apart from symbolic links, there are only two parts of the "REF-walk" | ||
447 | process not yet covered. One is the handling of stale cache entries | ||
448 | and the other is automounts. | ||
449 | |||
450 | On filesystems that require it, the lookup routines will call the | ||
451 | `->d_revalidate()` dentry method to ensure that the cached information | ||
452 | is current. This will often confirm validity or update a few details | ||
453 | from a server. In some cases it may find that there has been change | ||
454 | further up the path and that something that was thought to be valid | ||
455 | previously isn't really. When this happens the lookup of the whole | ||
456 | path is aborted and retried with the "`LOOKUP_REVAL`" flag set. This | ||
457 | forces revalidation to be more thorough. We will see more details of | ||
458 | this retry process in the next article. | ||
459 | |||
460 | Automount points are locations in the filesystem where an attempt to | ||
461 | lookup a name can trigger changes to how that lookup should be | ||
462 | handled, in particular by mounting a filesystem there. These are | ||
463 | covered in greater detail in autofs4.txt in the Linux documentation | ||
464 | tree, but a few notes specifically related to path lookup are in order | ||
465 | here. | ||
466 | |||
467 | The Linux VFS has a concept of "managed" dentries which is reflected | ||
468 | in function names such as "`follow_managed()`". There are three | ||
469 | potentially interesting things about these dentries corresponding | ||
470 | to three different flags that might be set in `dentry->d_flags`: | ||
471 | |||
472 | ### `DCACHE_MANAGE_TRANSIT` ### | ||
473 | |||
474 | If this flag has been set, then the filesystem has requested that the | ||
475 | `d_manage()` dentry operation be called before handling any possible | ||
476 | mount point. This can perform two particular services: | ||
477 | |||
478 | It can block to avoid races. If an automount point is being | ||
479 | unmounted, the `d_manage()` function will usually wait for that | ||
480 | process to complete before letting the new lookup proceed and possibly | ||
481 | trigger a new automount. | ||
482 | |||
483 | It can selectively allow only some processes to transit through a | ||
484 | mount point. When a server process is managing automounts, it may | ||
485 | need to access a directory without triggering normal automount | ||
486 | processing. That server process can identify itself to the `autofs` | ||
487 | filesystem, which will then give it a special pass through | ||
488 | `d_manage()` by returning `-EISDIR`. | ||
489 | |||
490 | ### `DCACHE_MOUNTED` ### | ||
491 | |||
492 | This flag is set on every dentry that is mounted on. As Linux | ||
493 | supports multiple filesystem namespaces, it is possible that the | ||
494 | dentry may not be mounted on in *this* namespace, just in some | ||
495 | other. So this flag is seen as a hint, not a promise. | ||
496 | |||
497 | If this flag is set, and `d_manage()` didn't return `-EISDIR`, | ||
498 | `lookup_mnt()` is called to examine the mount hash table (honoring the | ||
499 | `mount_lock` described earlier) and possibly return a new `vfsmount` | ||
500 | and a new `dentry` (both with counted references). | ||
501 | |||
502 | ### `DCACHE_NEED_AUTOMOUNT` ### | ||
503 | |||
504 | If `d_manage()` allowed us to get this far, and `lookup_mnt()` didn't | ||
505 | find a mount point, then this flag causes the `d_automount()` dentry | ||
506 | operation to be called. | ||
507 | |||
508 | The `d_automount()` operation can be arbitrarily complex and may | ||
509 | communicate with server processes etc. but it should ultimately either | ||
510 | report that there was an error, that there was nothing to mount, or | ||
511 | should provide an updated `struct path` with new `dentry` and `vfsmount`. | ||
512 | |||
513 | In the latter case, `finish_automount()` will be called to safely | ||
514 | install the new mount point into the mount table. | ||
515 | |||
516 | There is no new locking of import here and it is important that no | ||
517 | locks (only counted references) are held over this processing due to | ||
518 | the very real possibility of extended delays. | ||
519 | This will become more important next time when we examine RCU-walk | ||
520 | which is particularly sensitive to delays. | ||
521 | |||
522 | RCU-walk - faster pathname lookup in Linux | ||
523 | ========================================== | ||
524 | |||
525 | RCU-walk is another algorithm for performing pathname lookup in Linux. | ||
526 | It is in many ways similar to REF-walk and the two share quite a bit | ||
527 | of code. The significant difference in RCU-walk is how it allows for | ||
528 | the possibility of concurrent access. | ||
529 | |||
530 | We noted that REF-walk is complex because there are numerous details | ||
531 | and special cases. RCU-walk reduces this complexity by simply | ||
532 | refusing to handle a number of cases -- it instead falls back to | ||
533 | REF-walk. The difficulty with RCU-walk comes from a different | ||
534 | direction: unfamiliarity. The locking rules when depending on RCU are | ||
535 | quite different from traditional locking, so we will spend a little extra | ||
536 | time when we come to those. | ||
537 | |||
538 | Clear demarcation of roles | ||
539 | -------------------------- | ||
540 | |||
541 | The easiest way to manage concurrency is to forcibly stop any other | ||
542 | thread from changing the data structures that a given thread is | ||
543 | looking at. In cases where no other thread would even think of | ||
544 | changing the data and lots of different threads want to read at the | ||
545 | same time, this can be very costly. Even when using locks that permit | ||
546 | multiple concurrent readers, the simple act of updating the count of | ||
547 | the number of current readers can impose an unwanted cost. So the | ||
548 | goal when reading a shared data structure that no other process is | ||
549 | changing is to avoid writing anything to memory at all. Take no | ||
550 | locks, increment no counts, leave no footprints. | ||
551 | |||
552 | The REF-walk mechanism already described certainly doesn't follow this | ||
553 | principle, but then it is really designed to work when there may well | ||
554 | be other threads modifying the data. RCU-walk, in contrast, is | ||
555 | designed for the common situation where there are lots of frequent | ||
556 | readers and only occasional writers. This may not be common in all | ||
557 | parts of the filesystem tree, but in many parts it will be. For the | ||
558 | other parts it is important that RCU-walk can quickly fall back to | ||
559 | using REF-walk. | ||
560 | |||
561 | Pathname lookup always starts in RCU-walk mode but only remains there | ||
562 | as long as what it is looking for is in the cache and is stable. It | ||
563 | dances lightly down the cached filesystem image, leaving no footprints | ||
564 | and carefully watching where it is, to be sure it doesn't trip. If it | ||
565 | notices that something has changed or is changing, or if something | ||
566 | isn't in the cache, then it tries to stop gracefully and switch to | ||
567 | REF-walk. | ||
568 | |||
569 | This stopping requires getting a counted reference on the current | ||
570 | `vfsmount` and `dentry`, and ensuring that these are still valid - | ||
571 | that a path walk with REF-walk would have found the same entries. | ||
572 | This is an invariant that RCU-walk must guarantee. It can only make | ||
573 | decisions, such as selecting the next step, that are decisions which | ||
574 | REF-walk could also have made if it were walking down the tree at the | ||
575 | same time. If the graceful stop succeeds, the rest of the path is | ||
576 | processed with the reliable, if slightly sluggish, REF-walk. If | ||
577 | RCU-walk finds it cannot stop gracefully, it simply gives up and | ||
578 | restarts from the top with REF-walk. | ||
579 | |||
580 | This pattern of "try RCU-walk, if that fails try REF-walk" can be | ||
581 | clearly seen in functions like `filename_lookup()`, | ||
582 | `filename_parentat()`, `filename_mountpoint()`, | ||
583 | `do_filp_open()`, and `do_file_open_root()`. These five | ||
584 | correspond roughly to the four `path_`* functions we met earlier, | ||
585 | each of which calls `link_path_walk()`. The `path_*` functions are | ||
586 | called using different mode flags until a mode is found which works. | ||
587 | They are first called with `LOOKUP_RCU` set to request "RCU-walk". If | ||
588 | that fails with the error `ECHILD` they are called again with no | ||
589 | special flag to request "REF-walk". If either of those report the | ||
590 | error `ESTALE` a final attempt is made with `LOOKUP_REVAL` set (and no | ||
591 | `LOOKUP_RCU`) to ensure that entries found in the cache are forcibly | ||
592 | revalidated - normally entries are only revalidated if the filesystem | ||
593 | determines that they are too old to trust. | ||
594 | |||
595 | The `LOOKUP_RCU` attempt may drop that flag internally and switch to | ||
596 | REF-walk, but will never then try to switch back to RCU-walk. Places | ||
597 | that trip up RCU-walk are much more likely to be near the leaves and | ||
598 | so it is very unlikely that there will be much, if any, benefit from | ||
599 | switching back. | ||
600 | |||
601 | RCU and seqlocks: fast and light | ||
602 | -------------------------------- | ||
603 | |||
604 | RCU is, unsurprisingly, critical to RCU-walk mode. The | ||
605 | `rcu_read_lock()` is held for the entire time that RCU-walk is walking | ||
606 | down a path. The particular guarantee it provides is that the key | ||
607 | data structures - dentries, inodes, super_blocks, and mounts - will | ||
608 | not be freed while the lock is held. They might be unlinked or | ||
609 | invalidated in one way or another, but the memory will not be | ||
610 | repurposed so values in various fields will still be meaningful. This | ||
611 | is the only guarantee that RCU provides; everything else is done using | ||
612 | seqlocks. | ||
613 | |||
614 | As we saw above, REF-walk holds a counted reference to the current | ||
615 | dentry and the current vfsmount, and does not release those references | ||
616 | before taking references to the "next" dentry or vfsmount. It also | ||
617 | sometimes takes the `d_lock` spinlock. These references and locks are | ||
618 | taken to prevent certain changes from happening. RCU-walk must not | ||
619 | take those references or locks and so cannot prevent such changes. | ||
620 | Instead, it checks to see if a change has been made, and aborts or | ||
621 | retries if it has. | ||
622 | |||
623 | To preserve the invariant mentioned above (that RCU-walk may only make | ||
624 | decisions that REF-walk could have made), it must make the checks at | ||
625 | or near the same places that REF-walk holds the references. So, when | ||
626 | REF-walk increments a reference count or takes a spinlock, RCU-walk | ||
627 | samples the status of a seqlock using `read_seqcount_begin()` or a | ||
628 | similar function. When REF-walk decrements the count or drops the | ||
629 | lock, RCU-walk checks if the sampled status is still valid using | ||
630 | `read_seqcount_retry()` or similar. | ||
631 | |||
632 | However, there is a little bit more to seqlocks than that. If | ||
633 | RCU-walk accesses two different fields in a seqlock-protected | ||
634 | structure, or accesses the same field twice, there is no a priori | ||
635 | guarantee of any consistency between those accesses. When consistency | ||
636 | is needed - which it usually is - RCU-walk must take a copy and then | ||
637 | use `read_seqcount_retry()` to validate that copy. | ||
638 | |||
639 | `read_seqcount_retry()` not only checks the sequence number, but also | ||
640 | imposes a memory barrier so that no memory-read instruction from | ||
641 | *before* the call can be delayed until *after* the call, either by the | ||
642 | CPU or by the compiler. A simple example of this can be seen in | ||
643 | `slow_dentry_cmp()` which, for filesystems which do not use simple | ||
644 | byte-wise name equality, calls into the filesystem to compare a name | ||
645 | against a dentry. The length and name pointer are copied into local | ||
646 | variables, then `read_seqcount_retry()` is called to confirm the two | ||
647 | are consistent, and only then is `->d_compare()` called. When | ||
648 | standard filename comparison is used, `dentry_cmp()` is called | ||
649 | instead. Notably it does _not_ use `read_seqcount_retry()`, but | ||
650 | instead has a large comment explaining why the consistency guarantee | ||
651 | isn't necessary. A subsequent `read_seqcount_retry()` will be | ||
652 | sufficient to catch any problem that could occur at this point. | ||
653 | |||
654 | With that little refresher on seqlocks out of the way we can look at | ||
655 | the bigger picture of how RCU-walk uses seqlocks. | ||
656 | |||
657 | ### `mount_lock` and `nd->m_seq` ### | ||
658 | |||
659 | We already met the `mount_lock` seqlock when REF-walk used it to | ||
660 | ensure that crossing a mount point is performed safely. RCU-walk uses | ||
661 | it for that too, but for quite a bit more. | ||
662 | |||
663 | Instead of taking a counted reference to each `vfsmount` as it | ||
664 | descends the tree, RCU-walk samples the state of `mount_lock` at the | ||
665 | start of the walk and stores this initial sequence number in the | ||
666 | `struct nameidata` in the `m_seq` field. This one lock and one | ||
667 | sequence number are used to validate all accesses to all `vfsmounts`, | ||
668 | and all mount point crossings. As changes to the mount table are | ||
669 | relatively rare, it is reasonable to fall back on REF-walk any time | ||
670 | that any "mount" or "unmount" happens. | ||
671 | |||
672 | `m_seq` is checked (using `read_seqretry()`) at the end of an RCU-walk | ||
673 | sequence, whether switching to REF-walk for the rest of the path or | ||
674 | when the end of the path is reached. It is also checked when stepping | ||
675 | down over a mount point (in `__follow_mount_rcu()`) or up (in | ||
676 | `follow_dotdot_rcu()`). If it is ever found to have changed, the | ||
677 | whole RCU-walk sequence is aborted and the path is processed again by | ||
678 | REF-walk. | ||
679 | |||
680 | If RCU-walk finds that `mount_lock` hasn't changed then it can be sure | ||
681 | that, had REF-walk taken counted references on each vfsmount, the | ||
682 | results would have been the same. This ensures the invariant holds, | ||
683 | at least for vfsmount structures. | ||
684 | |||
685 | ### `dentry->d_seq` and `nd->seq`. ### | ||
686 | |||
687 | In place of taking a count or lock on `d_reflock`, RCU-walk samples | ||
688 | the per-dentry `d_seq` seqlock, and stores the sequence number in the | ||
689 | `seq` field of the nameidata structure, so `nd->seq` should always be | ||
690 | the current sequence number of `nd->dentry`. This number needs to be | ||
691 | revalidated after copying, and before using, the name, parent, or | ||
692 | inode of the dentry. | ||
693 | |||
694 | The handling of the name we have already looked at, and the parent is | ||
695 | only accessed in `follow_dotdot_rcu()` which fairly trivially follows | ||
696 | the required pattern, though it does so for three different cases. | ||
697 | |||
698 | When not at a mount point, `d_parent` is followed and its `d_seq` is | ||
699 | collected. When we are at a mount point, we instead follow the | ||
700 | `mnt->mnt_mountpoint` link to get a new dentry and collect its | ||
701 | `d_seq`. Then, after finally finding a `d_parent` to follow, we must | ||
702 | check if we have landed on a mount point and, if so, must find that | ||
703 | mount point and follow the `mnt->mnt_root` link. This would imply a | ||
704 | somewhat unusual, but certainly possible, circumstance where the | ||
705 | starting point of the path lookup was in part of the filesystem that | ||
706 | was mounted on, and so not visible from the root. | ||
707 | |||
708 | The inode pointer, stored in `->d_inode`, is a little more | ||
709 | interesting. The inode will always need to be accessed at least | ||
710 | twice, once to determine if it is NULL and once to verify access | ||
711 | permissions. Symlink handling requires a validated inode pointer too. | ||
712 | Rather than revalidating on each access, a copy is made on the first | ||
713 | access and it is stored in the `inode` field of `nameidata` from where | ||
714 | it can be safely accessed without further validation. | ||
715 | |||
716 | `lookup_fast()` is the only lookup routine that is used in RCU-mode, | ||
717 | `lookup_slow()` being too slow and requiring locks. It is in | ||
718 | `lookup_fast()` that we find the important "hand over hand" tracking | ||
719 | of the current dentry. | ||
720 | |||
721 | The current `dentry` and current `seq` number are passed to | ||
722 | `__d_lookup_rcu()` which, on success, returns a new `dentry` and a | ||
723 | new `seq` number. `lookup_fast()` then copies the inode pointer and | ||
724 | revalidates the new `seq` number. It then validates the old `dentry` | ||
725 | with the old `seq` number one last time and only then continues. This | ||
726 | process of getting the `seq` number of the new dentry and then | ||
727 | checking the `seq` number of the old exactly mirrors the process of | ||
728 | getting a counted reference to the new dentry before dropping that for | ||
729 | the old dentry which we saw in REF-walk. | ||
730 | |||
731 | ### No `inode->i_mutex` or even `rename_lock` ### | ||
732 | |||
733 | A mutex is a fairly heavyweight lock that can only be taken when it is | ||
734 | permissible to sleep. As `rcu_read_lock()` forbids sleeping, | ||
735 | `inode->i_mutex` plays no role in RCU-walk. If some other thread does | ||
736 | take `i_mutex` and modifies the directory in a way that RCU-walk needs | ||
737 | to notice, the result will be either that RCU-walk fails to find the | ||
738 | dentry that it is looking for, or it will find a dentry which | ||
739 | `read_seqretry()` won't validate. In either case it will drop down to | ||
740 | REF-walk mode which can take whatever locks are needed. | ||
741 | |||
742 | Though `rename_lock` could be used by RCU-walk as it doesn't require | ||
743 | any sleeping, RCU-walk doesn't bother. REF-walk uses `rename_lock` to | ||
744 | protect against the possibility of hash chains in the dcache changing | ||
745 | while they are being searched. This can result in failing to find | ||
746 | something that actually is there. When RCU-walk fails to find | ||
747 | something in the dentry cache, whether it is really there or not, it | ||
748 | already drops down to REF-walk and tries again with appropriate | ||
749 | locking. This neatly handles all cases, so adding extra checks on | ||
750 | rename_lock would bring no significant value. | ||
751 | |||
752 | `unlazy walk()` and `complete_walk()` | ||
753 | ------------------------------------- | ||
754 | |||
755 | That "dropping down to REF-walk" typically involves a call to | ||
756 | `unlazy_walk()`, so named because "RCU-walk" is also sometimes | ||
757 | referred to as "lazy walk". `unlazy_walk()` is called when | ||
758 | following the path down to the current vfsmount/dentry pair seems to | ||
759 | have proceeded successfully, but the next step is problematic. This | ||
760 | can happen if the next name cannot be found in the dcache, if | ||
761 | permission checking or name revalidation couldn't be achieved while | ||
762 | the `rcu_read_lock()` is held (which forbids sleeping), if an | ||
763 | automount point is found, or in a couple of cases involving symlinks. | ||
764 | It is also called from `complete_walk()` when the lookup has reached | ||
765 | the final component, or the very end of the path, depending on which | ||
766 | particular flavor of lookup is used. | ||
767 | |||
768 | Other reasons for dropping out of RCU-walk that do not trigger a call | ||
769 | to `unlazy_walk()` are when some inconsistency is found that cannot be | ||
770 | handled immediately, such as `mount_lock` or one of the `d_seq` | ||
771 | seqlocks reporting a change. In these cases the relevant function | ||
772 | will return `-ECHILD` which will percolate up until it triggers a new | ||
773 | attempt from the top using REF-walk. | ||
774 | |||
775 | For those cases where `unlazy_walk()` is an option, it essentially | ||
776 | takes a reference on each of the pointers that it holds (vfsmount, | ||
777 | dentry, and possibly some symbolic links) and then verifies that the | ||
778 | relevant seqlocks have not been changed. If there have been changes, | ||
779 | it, too, aborts with `-ECHILD`, otherwise the transition to REF-walk | ||
780 | has been a success and the lookup process continues. | ||
781 | |||
782 | Taking a reference on those pointers is not quite as simple as just | ||
783 | incrementing a counter. That works to take a second reference if you | ||
784 | already have one (often indirectly through another object), but it | ||
785 | isn't sufficient if you don't actually have a counted reference at | ||
786 | all. For `dentry->d_lockref`, it is safe to increment the reference | ||
787 | counter to get a reference unless it has been explicitly marked as | ||
788 | "dead" which involves setting the counter to `-128`. | ||
789 | `lockref_get_not_dead()` achieves this. | ||
790 | |||
791 | For `mnt->mnt_count` it is safe to take a reference as long as | ||
792 | `mount_lock` is then used to validate the reference. If that | ||
793 | validation fails, it may *not* be safe to just drop that reference in | ||
794 | the standard way of calling `mnt_put()` - an unmount may have | ||
795 | progressed too far. So the code in `legitimize_mnt()`, when it | ||
796 | finds that the reference it got might not be safe, checks the | ||
797 | `MNT_SYNC_UMOUNT` flag to determine if a simple `mnt_put()` is | ||
798 | correct, or if it should just decrement the count and pretend none of | ||
799 | this ever happened. | ||
800 | |||
801 | Taking care in filesystems | ||
802 | --------------------------- | ||
803 | |||
804 | RCU-walk depends almost entirely on cached information and often will | ||
805 | not call into the filesystem at all. However there are two places, | ||
806 | besides the already-mentioned component-name comparison, where the | ||
807 | file system might be included in RCU-walk, and it must know to be | ||
808 | careful. | ||
809 | |||
810 | If the filesystem has non-standard permission-checking requirements - | ||
811 | such as a networked filesystem which may need to check with the server | ||
812 | - the `i_op->permission` interface might be called during RCU-walk. | ||
813 | In this case an extra "`MAY_NOT_BLOCK`" flag is passed so that it | ||
814 | knows not to sleep, but to return `-ECHILD` if it cannot complete | ||
815 | promptly. `i_op->permission` is given the inode pointer, not the | ||
816 | dentry, so it doesn't need to worry about further consistency checks. | ||
817 | However if it accesses any other filesystem data structures, it must | ||
818 | ensure they are safe to be accessed with only the `rcu_read_lock()` | ||
819 | held. This typically means they must be freed using `kfree_rcu()` or | ||
820 | similar. | ||
821 | |||
822 | [`READ_ONCE()`]: https://lwn.net/Articles/624126/ | ||
823 | |||
824 | If the filesystem may need to revalidate dcache entries, then | ||
825 | `d_op->d_revalidate` may be called in RCU-walk too. This interface | ||
826 | *is* passed the dentry but does not have access to the `inode` or the | ||
827 | `seq` number from the `nameidata`, so it needs to be extra careful | ||
828 | when accessing fields in the dentry. This "extra care" typically | ||
829 | involves using `ACCESS_ONCE()` or the newer [`READ_ONCE()`] to access | ||
830 | fields, and verifying the result is not NULL before using it. This | ||
831 | pattern can be see in `nfs_lookup_revalidate()`. | ||
832 | |||
833 | A pair of patterns | ||
834 | ------------------ | ||
835 | |||
836 | In various places in the details of REF-walk and RCU-walk, and also in | ||
837 | the big picture, there are a couple of related patterns that are worth | ||
838 | being aware of. | ||
839 | |||
840 | The first is "try quickly and check, if that fails try slowly". We | ||
841 | can see that in the high-level approach of first trying RCU-walk and | ||
842 | then trying REF-walk, and in places where `unlazy_walk()` is used to | ||
843 | switch to REF-walk for the rest of the path. We also saw it earlier | ||
844 | in `dget_parent()` when following a "`..`" link. It tries a quick way | ||
845 | to get a reference, then falls back to taking locks if needed. | ||
846 | |||
847 | The second pattern is "try quickly and check, if that fails try | ||
848 | again - repeatedly". This is seen with the use of `rename_lock` and | ||
849 | `mount_lock` in REF-walk. RCU-walk doesn't make use of this pattern - | ||
850 | if anything goes wrong it is much safer to just abort and try a more | ||
851 | sedate approach. | ||
852 | |||
853 | The emphasis here is "try quickly and check". It should probably be | ||
854 | "try quickly _and carefully,_ then check". The fact that checking is | ||
855 | needed is a reminder that the system is dynamic and only a limited | ||
856 | number of things are safe at all. The most likely cause of errors in | ||
857 | this whole process is assuming something is safe when in reality it | ||
858 | isn't. Careful consideration of what exactly guarantees the safety of | ||
859 | each access is sometimes necessary. | ||
860 | |||
861 | A walk among the symlinks | ||
862 | ========================= | ||
863 | |||
864 | There are several basic issues that we will examine to understand the | ||
865 | handling of symbolic links: the symlink stack, together with cache | ||
866 | lifetimes, will help us understand the overall recursive handling of | ||
867 | symlinks and lead to the special care needed for the final component. | ||
868 | Then a consideration of access-time updates and summary of the various | ||
869 | flags controlling lookup will finish the story. | ||
870 | |||
871 | The symlink stack | ||
872 | ----------------- | ||
873 | |||
874 | There are only two sorts of filesystem objects that can usefully | ||
875 | appear in a path prior to the final component: directories and symlinks. | ||
876 | Handling directories is quite straightforward: the new directory | ||
877 | simply becomes the starting point at which to interpret the next | ||
878 | component on the path. Handling symbolic links requires a bit more | ||
879 | work. | ||
880 | |||
881 | Conceptually, symbolic links could be handled by editing the path. If | ||
882 | a component name refers to a symbolic link, then that component is | ||
883 | replaced by the body of the link and, if that body starts with a '/', | ||
884 | then all preceding parts of the path are discarded. This is what the | ||
885 | "`readlink -f`" command does, though it also edits out "`.`" and | ||
886 | "`..`" components. | ||
887 | |||
888 | Directly editing the path string is not really necessary when looking | ||
889 | up a path, and discarding early components is pointless as they aren't | ||
890 | looked at anyway. Keeping track of all remaining components is | ||
891 | important, but they can of course be kept separately; there is no need | ||
892 | to concatenate them. As one symlink may easily refer to another, | ||
893 | which in turn can refer to a third, we may need to keep the remaining | ||
894 | components of several paths, each to be processed when the preceding | ||
895 | ones are completed. These path remnants are kept on a stack of | ||
896 | limited size. | ||
897 | |||
898 | There are two reasons for placing limits on how many symlinks can | ||
899 | occur in a single path lookup. The most obvious is to avoid loops. | ||
900 | If a symlink referred to itself either directly or through | ||
901 | intermediaries, then following the symlink can never complete | ||
902 | successfully - the error `ELOOP` must be returned. Loops can be | ||
903 | detected without imposing limits, but limits are the simplest solution | ||
904 | and, given the second reason for restriction, quite sufficient. | ||
905 | |||
906 | [outlined recently]: http://thread.gmane.org/gmane.linux.kernel/1934390/focus=1934550 | ||
907 | |||
908 | The second reason was [outlined recently] by Linus: | ||
909 | |||
910 | > Because it's a latency and DoS issue too. We need to react well to | ||
911 | > true loops, but also to "very deep" non-loops. It's not about memory | ||
912 | > use, it's about users triggering unreasonable CPU resources. | ||
913 | |||
914 | Linux imposes a limit on the length of any pathname: `PATH_MAX`, which | ||
915 | is 4096. There are a number of reasons for this limit; not letting the | ||
916 | kernel spend too much time on just one path is one of them. With | ||
917 | symbolic links you can effectively generate much longer paths so some | ||
918 | sort of limit is needed for the same reason. Linux imposes a limit of | ||
919 | at most 40 symlinks in any one path lookup. It previously imposed a | ||
920 | further limit of eight on the maximum depth of recursion, but that was | ||
921 | raised to 40 when a separate stack was implemented, so there is now | ||
922 | just the one limit. | ||
923 | |||
924 | The `nameidata` structure that we met in an earlier article contains a | ||
925 | small stack that can be used to store the remaining part of up to two | ||
926 | symlinks. In many cases this will be sufficient. If it isn't, a | ||
927 | separate stack is allocated with room for 40 symlinks. Pathname | ||
928 | lookup will never exceed that stack as, once the 40th symlink is | ||
929 | detected, an error is returned. | ||
930 | |||
931 | It might seem that the name remnants are all that needs to be stored on | ||
932 | this stack, but we need a bit more. To see that, we need to move on to | ||
933 | cache lifetimes. | ||
934 | |||
935 | Storage and lifetime of cached symlinks | ||
936 | --------------------------------------- | ||
937 | |||
938 | Like other filesystem resources, such as inodes and directory | ||
939 | entries, symlinks are cached by Linux to avoid repeated costly access | ||
940 | to external storage. It is particularly important for RCU-walk to be | ||
941 | able to find and temporarily hold onto these cached entries, so that | ||
942 | it doesn't need to drop down into REF-walk. | ||
943 | |||
944 | [object-oriented design pattern]: https://lwn.net/Articles/446317/ | ||
945 | |||
946 | While each filesystem is free to make its own choice, symlinks are | ||
947 | typically stored in one of two places. Short symlinks are often | ||
948 | stored directly in the inode. When a filesystem allocates a `struct | ||
949 | inode` it typically allocates extra space to store private data (a | ||
950 | common [object-oriented design pattern] in the kernel). This will | ||
951 | sometimes include space for a symlink. The other common location is | ||
952 | in the page cache, which normally stores the content of files. The | ||
953 | pathname in a symlink can be seen as the content of that symlink and | ||
954 | can easily be stored in the page cache just like file content. | ||
955 | |||
956 | When neither of these is suitable, the next most likely scenario is | ||
957 | that the filesystem will allocate some temporary memory and copy or | ||
958 | construct the symlink content into that memory whenever it is needed. | ||
959 | |||
960 | When the symlink is stored in the inode, it has the same lifetime as | ||
961 | the inode which, itself, is protected by RCU or by a counted reference | ||
962 | on the dentry. This means that the mechanisms that pathname lookup | ||
963 | uses to access the dcache and icache (inode cache) safely are quite | ||
964 | sufficient for accessing some cached symlinks safely. In these cases, | ||
965 | the `i_link` pointer in the inode is set to point to wherever the | ||
966 | symlink is stored and it can be accessed directly whenever needed. | ||
967 | |||
968 | When the symlink is stored in the page cache or elsewhere, the | ||
969 | situation is not so straightforward. A reference on a dentry or even | ||
970 | on an inode does not imply any reference on cached pages of that | ||
971 | inode, and even an `rcu_read_lock()` is not sufficient to ensure that | ||
972 | a page will not disappear. So for these symlinks the pathname lookup | ||
973 | code needs to ask the filesystem to provide a stable reference and, | ||
974 | significantly, needs to release that reference when it is finished | ||
975 | with it. | ||
976 | |||
977 | Taking a reference to a cache page is often possible even in RCU-walk | ||
978 | mode. It does require making changes to memory, which is best avoided, | ||
979 | but that isn't necessarily a big cost and it is better than dropping | ||
980 | out of RCU-walk mode completely. Even filesystems that allocate | ||
981 | space to copy the symlink into can use `GFP_ATOMIC` to often successfully | ||
982 | allocate memory without the need to drop out of RCU-walk. If a | ||
983 | filesystem cannot successfully get a reference in RCU-walk mode, it | ||
984 | must return `-ECHILD` and `unlazy_walk()` will be called to return to | ||
985 | REF-walk mode in which the filesystem is allowed to sleep. | ||
986 | |||
987 | The place for all this to happen is the `i_op->follow_link()` inode | ||
988 | method. In the present mainline code this is never actually called in | ||
989 | RCU-walk mode as the rewrite is not quite complete. It is likely that | ||
990 | in a future release this method will be passed an `inode` pointer when | ||
991 | called in RCU-walk mode so it both (1) knows to be careful, and (2) has the | ||
992 | validated pointer. Much like the `i_op->permission()` method we | ||
993 | looked at previously, `->follow_link()` would need to be careful that | ||
994 | all the data structures it references are safe to be accessed while | ||
995 | holding no counted reference, only the RCU lock. Though getting a | ||
996 | reference with `->follow_link()` is not yet done in RCU-walk mode, the | ||
997 | code is ready to release the reference when that does happen. | ||
998 | |||
999 | This need to drop the reference to a symlink adds significant | ||
1000 | complexity. It requires a reference to the inode so that the | ||
1001 | `i_op->put_link()` inode operation can be called. In REF-walk, that | ||
1002 | reference is kept implicitly through a reference to the dentry, so | ||
1003 | keeping the `struct path` of the symlink is easiest. For RCU-walk, | ||
1004 | the pointer to the inode is kept separately. To allow switching from | ||
1005 | RCU-walk back to REF-walk in the middle of processing nested symlinks | ||
1006 | we also need the seq number for the dentry so we can confirm that | ||
1007 | switching back was safe. | ||
1008 | |||
1009 | Finally, when providing a reference to a symlink, the filesystem also | ||
1010 | provides an opaque "cookie" that must be passed to `->put_link()` so that it | ||
1011 | knows what to free. This might be the allocated memory area, or a | ||
1012 | pointer to the `struct page` in the page cache, or something else | ||
1013 | completely. Only the filesystem knows what it is. | ||
1014 | |||
1015 | In order for the reference to each symlink to be dropped when the walk completes, | ||
1016 | whether in RCU-walk or REF-walk, the symlink stack needs to contain, | ||
1017 | along with the path remnants: | ||
1018 | |||
1019 | - the `struct path` to provide a reference to the inode in REF-walk | ||
1020 | - the `struct inode *` to provide a reference to the inode in RCU-walk | ||
1021 | - the `seq` to allow the path to be safely switched from RCU-walk to REF-walk | ||
1022 | - the `cookie` that tells `->put_path()` what to put. | ||
1023 | |||
1024 | This means that each entry in the symlink stack needs to hold five | ||
1025 | pointers and an integer instead of just one pointer (the path | ||
1026 | remnant). On a 64-bit system, this is about 40 bytes per entry; | ||
1027 | with 40 entries it adds up to 1600 bytes total, which is less than | ||
1028 | half a page. So it might seem like a lot, but is by no means | ||
1029 | excessive. | ||
1030 | |||
1031 | Note that, in a given stack frame, the path remnant (`name`) is not | ||
1032 | part of the symlink that the other fields refer to. It is the remnant | ||
1033 | to be followed once that symlink has been fully parsed. | ||
1034 | |||
1035 | Following the symlink | ||
1036 | --------------------- | ||
1037 | |||
1038 | The main loop in `link_path_walk()` iterates seamlessly over all | ||
1039 | components in the path and all of the non-final symlinks. As symlinks | ||
1040 | are processed, the `name` pointer is adjusted to point to a new | ||
1041 | symlink, or is restored from the stack, so that much of the loop | ||
1042 | doesn't need to notice. Getting this `name` variable on and off the | ||
1043 | stack is very straightforward; pushing and popping the references is | ||
1044 | a little more complex. | ||
1045 | |||
1046 | When a symlink is found, `walk_component()` returns the value `1` | ||
1047 | (`0` is returned for any other sort of success, and a negative number | ||
1048 | is, as usual, an error indicator). This causes `get_link()` to be | ||
1049 | called; it then gets the link from the filesystem. Providing that | ||
1050 | operation is successful, the old path `name` is placed on the stack, | ||
1051 | and the new value is used as the `name` for a while. When the end of | ||
1052 | the path is found (i.e. `*name` is `'\0'`) the old `name` is restored | ||
1053 | off the stack and path walking continues. | ||
1054 | |||
1055 | Pushing and popping the reference pointers (inode, cookie, etc.) is more | ||
1056 | complex in part because of the desire to handle tail recursion. When | ||
1057 | the last component of a symlink itself points to a symlink, we | ||
1058 | want to pop the symlink-just-completed off the stack before pushing | ||
1059 | the symlink-just-found to avoid leaving empty path remnants that would | ||
1060 | just get in the way. | ||
1061 | |||
1062 | It is most convenient to push the new symlink references onto the | ||
1063 | stack in `walk_component()` immediately when the symlink is found; | ||
1064 | `walk_component()` is also the last piece of code that needs to look at the | ||
1065 | old symlink as it walks that last component. So it is quite | ||
1066 | convenient for `walk_component()` to release the old symlink and pop | ||
1067 | the references just before pushing the reference information for the | ||
1068 | new symlink. It is guided in this by two flags; `WALK_GET`, which | ||
1069 | gives it permission to follow a symlink if it finds one, and | ||
1070 | `WALK_PUT`, which tells it to release the current symlink after it has been | ||
1071 | followed. `WALK_PUT` is tested first, leading to a call to | ||
1072 | `put_link()`. `WALK_GET` is tested subsequently (by | ||
1073 | `should_follow_link()`) leading to a call to `pick_link()` which sets | ||
1074 | up the stack frame. | ||
1075 | |||
1076 | ### Symlinks with no final component ### | ||
1077 | |||
1078 | A pair of special-case symlinks deserve a little further explanation. | ||
1079 | Both result in a new `struct path` (with mount and dentry) being set | ||
1080 | up in the `nameidata`, and result in `get_link()` returning `NULL`. | ||
1081 | |||
1082 | The more obvious case is a symlink to "`/`". All symlinks starting | ||
1083 | with "`/`" are detected in `get_link()` which resets the `nameidata` | ||
1084 | to point to the effective filesystem root. If the symlink only | ||
1085 | contains "`/`" then there is nothing more to do, no components at all, | ||
1086 | so `NULL` is returned to indicate that the symlink can be released and | ||
1087 | the stack frame discarded. | ||
1088 | |||
1089 | The other case involves things in `/proc` that look like symlinks but | ||
1090 | aren't really. | ||
1091 | |||
1092 | > $ ls -l /proc/self/fd/1 | ||
1093 | > lrwx------ 1 neilb neilb 64 Jun 13 10:19 /proc/self/fd/1 -> /dev/pts/4 | ||
1094 | |||
1095 | Every open file descriptor in any process is represented in `/proc` by | ||
1096 | something that looks like a symlink. It is really a reference to the | ||
1097 | target file, not just the name of it. When you `readlink` these | ||
1098 | objects you get a name that might refer to the same file - unless it | ||
1099 | has been unlinked or mounted over. When `walk_component()` follows | ||
1100 | one of these, the `->follow_link()` method in "procfs" doesn't return | ||
1101 | a string name, but instead calls `nd_jump_link()` which updates the | ||
1102 | `nameidata` in place to point to that target. `->follow_link()` then | ||
1103 | returns `NULL`. Again there is no final component and `get_link()` | ||
1104 | reports this by leaving the `last_type` field of `nameidata` as | ||
1105 | `LAST_BIND`. | ||
1106 | |||
1107 | Following the symlink in the final component | ||
1108 | -------------------------------------------- | ||
1109 | |||
1110 | All this leads to `link_path_walk()` walking down every component, and | ||
1111 | following all symbolic links it finds, until it reaches the final | ||
1112 | component. This is just returned in the `last` field of `nameidata`. | ||
1113 | For some callers, this is all they need; they want to create that | ||
1114 | `last` name if it doesn't exist or give an error if it does. Other | ||
1115 | callers will want to follow a symlink if one is found, and possibly | ||
1116 | apply special handling to the last component of that symlink, rather | ||
1117 | than just the last component of the original file name. These callers | ||
1118 | potentially need to call `link_path_walk()` again and again on | ||
1119 | successive symlinks until one is found that doesn't point to another | ||
1120 | symlink. | ||
1121 | |||
1122 | This case is handled by the relevant caller of `link_path_walk()`, such as | ||
1123 | `path_lookupat()` using a loop that calls `link_path_walk()`, and then | ||
1124 | handles the final component. If the final component is a symlink | ||
1125 | that needs to be followed, then `trailing_symlink()` is called to set | ||
1126 | things up properly and the loop repeats, calling `link_path_walk()` | ||
1127 | again. This could loop as many as 40 times if the last component of | ||
1128 | each symlink is another symlink. | ||
1129 | |||
1130 | The various functions that examine the final component and possibly | ||
1131 | report that it is a symlink are `lookup_last()`, `mountpoint_last()` | ||
1132 | and `do_last()`, each of which use the same convention as | ||
1133 | `walk_component()` of returning `1` if a symlink was found that needs | ||
1134 | to be followed. | ||
1135 | |||
1136 | Of these, `do_last()` is the most interesting as it is used for | ||
1137 | opening a file. Part of `do_last()` runs with `i_mutex` held and this | ||
1138 | part is in a separate function: `lookup_open()`. | ||
1139 | |||
1140 | Explaining `do_last()` completely is beyond the scope of this article, | ||
1141 | but a few highlights should help those interested in exploring the | ||
1142 | code. | ||
1143 | |||
1144 | 1. Rather than just finding the target file, `do_last()` needs to open | ||
1145 | it. If the file was found in the dcache, then `vfs_open()` is used for | ||
1146 | this. If not, then `lookup_open()` will either call `atomic_open()` (if | ||
1147 | the filesystem provides it) to combine the final lookup with the open, or | ||
1148 | will perform the separate `lookup_real()` and `vfs_create()` steps | ||
1149 | directly. In the later case the actual "open" of this newly found or | ||
1150 | created file will be performed by `vfs_open()`, just as if the name | ||
1151 | were found in the dcache. | ||
1152 | |||
1153 | 2. `vfs_open()` can fail with `-EOPENSTALE` if the cached information | ||
1154 | wasn't quite current enough. Rather than restarting the lookup from | ||
1155 | the top with `LOOKUP_REVAL` set, `lookup_open()` is called instead, | ||
1156 | giving the filesystem a chance to resolve small inconsistencies. | ||
1157 | If that doesn't work, only then is the lookup restarted from the top. | ||
1158 | |||
1159 | 3. An open with O_CREAT **does** follow a symlink in the final component, | ||
1160 | unlike other creation system calls (like `mkdir`). So the sequence: | ||
1161 | |||
1162 | > ln -s bar /tmp/foo | ||
1163 | > echo hello > /tmp/foo | ||
1164 | |||
1165 | will create a file called `/tmp/bar`. This is not permitted if | ||
1166 | `O_EXCL` is set but otherwise is handled for an O_CREAT open much | ||
1167 | like for a non-creating open: `should_follow_link()` returns `1`, and | ||
1168 | so does `do_last()` so that `trailing_symlink()` gets called and the | ||
1169 | open process continues on the symlink that was found. | ||
1170 | |||
1171 | Updating the access time | ||
1172 | ------------------------ | ||
1173 | |||
1174 | We previously said of RCU-walk that it would "take no locks, increment | ||
1175 | no counts, leave no footprints." We have since seen that some | ||
1176 | "footprints" can be needed when handling symlinks as a counted | ||
1177 | reference (or even a memory allocation) may be needed. But these | ||
1178 | footprints are best kept to a minimum. | ||
1179 | |||
1180 | One other place where walking down a symlink can involve leaving | ||
1181 | footprints in a way that doesn't affect directories is in updating access times. | ||
1182 | In Unix (and Linux) every filesystem object has a "last accessed | ||
1183 | time", or "`atime`". Passing through a directory to access a file | ||
1184 | within is not considered to be an access for the purposes of | ||
1185 | `atime`; only listing the contents of a directory can update its `atime`. | ||
1186 | Symlinks are different it seems. Both reading a symlink (with `readlink()`) | ||
1187 | and looking up a symlink on the way to some other destination can | ||
1188 | update the atime on that symlink. | ||
1189 | |||
1190 | [clearest statement]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_08 | ||
1191 | |||
1192 | It is not clear why this is the case; POSIX has little to say on the | ||
1193 | subject. The [clearest statement] is that, if a particular implementation | ||
1194 | updates a timestamp in a place not specified by POSIX, this must be | ||
1195 | documented "except that any changes caused by pathname resolution need | ||
1196 | not be documented". This seems to imply that POSIX doesn't really | ||
1197 | care about access-time updates during pathname lookup. | ||
1198 | |||
1199 | [Linux 1.3.87]: https://git.kernel.org/cgit/linux/kernel/git/history/history.git/diff/fs/ext2/symlink.c?id=f806c6db77b8eaa6e00dcfb6b567706feae8dbb8 | ||
1200 | |||
1201 | An examination of history shows that prior to [Linux 1.3.87], the ext2 | ||
1202 | filesystem, at least, didn't update atime when following a link. | ||
1203 | Unfortunately we have no record of why that behavior was changed. | ||
1204 | |||
1205 | In any case, access time must now be updated and that operation can be | ||
1206 | quite complex. Trying to stay in RCU-walk while doing it is best | ||
1207 | avoided. Fortunately it is often permitted to skip the `atime` | ||
1208 | update. Because `atime` updates cause performance problems in various | ||
1209 | areas, Linux supports the `relatime` mount option, which generally | ||
1210 | limits the updates of `atime` to once per day on files that aren't | ||
1211 | being changed (and symlinks never change once created). Even without | ||
1212 | `relatime`, many filesystems record `atime` with a one-second | ||
1213 | granularity, so only one update per second is required. | ||
1214 | |||
1215 | It is easy to test if an `atime` update is needed while in RCU-walk | ||
1216 | mode and, if it isn't, the update can be skipped and RCU-walk mode | ||
1217 | continues. Only when an `atime` update is actually required does the | ||
1218 | path walk drop down to REF-walk. All of this is handled in the | ||
1219 | `get_link()` function. | ||
1220 | |||
1221 | A few flags | ||
1222 | ----------- | ||
1223 | |||
1224 | A suitable way to wrap up this tour of pathname walking is to list | ||
1225 | the various flags that can be stored in the `nameidata` to guide the | ||
1226 | lookup process. Many of these are only meaningful on the final | ||
1227 | component, others reflect the current state of the pathname lookup. | ||
1228 | And then there is `LOOKUP_EMPTY`, which doesn't fit conceptually with | ||
1229 | the others. If this is not set, an empty pathname causes an error | ||
1230 | very early on. If it is set, empty pathnames are not considered to be | ||
1231 | an error. | ||
1232 | |||
1233 | ### Global state flags ### | ||
1234 | |||
1235 | We have already met two global state flags: `LOOKUP_RCU` and | ||
1236 | `LOOKUP_REVAL`. These select between one of three overall approaches | ||
1237 | to lookup: RCU-walk, REF-walk, and REF-walk with forced revalidation. | ||
1238 | |||
1239 | `LOOKUP_PARENT` indicates that the final component hasn't been reached | ||
1240 | yet. This is primarily used to tell the audit subsystem the full | ||
1241 | context of a particular access being audited. | ||
1242 | |||
1243 | `LOOKUP_ROOT` indicates that the `root` field in the `nameidata` was | ||
1244 | provided by the caller, so it shouldn't be released when it is no | ||
1245 | longer needed. | ||
1246 | |||
1247 | `LOOKUP_JUMPED` means that the current dentry was chosen not because | ||
1248 | it had the right name but for some other reason. This happens when | ||
1249 | following "`..`", following a symlink to `/`, crossing a mount point | ||
1250 | or accessing a "`/proc/$PID/fd/$FD`" symlink. In this case the | ||
1251 | filesystem has not been asked to revalidate the name (with | ||
1252 | `d_revalidate()`). In such cases the inode may still need to be | ||
1253 | revalidated, so `d_op->d_weak_revalidate()` is called if | ||
1254 | `LOOKUP_JUMPED` is set when the look completes - which may be at the | ||
1255 | final component or, when creating, unlinking, or renaming, at the penultimate component. | ||
1256 | |||
1257 | ### Final-component flags ### | ||
1258 | |||
1259 | Some of these flags are only set when the final component is being | ||
1260 | considered. Others are only checked for when considering that final | ||
1261 | component. | ||
1262 | |||
1263 | `LOOKUP_AUTOMOUNT` ensures that, if the final component is an automount | ||
1264 | point, then the mount is triggered. Some operations would trigger it | ||
1265 | anyway, but operations like `stat()` deliberately don't. `statfs()` | ||
1266 | needs to trigger the mount but otherwise behaves a lot like `stat()`, so | ||
1267 | it sets `LOOKUP_AUTOMOUNT`, as does "`quotactl()`" and the handling of | ||
1268 | "`mount --bind`". | ||
1269 | |||
1270 | `LOOKUP_FOLLOW` has a similar function to `LOOKUP_AUTOMOUNT` but for | ||
1271 | symlinks. Some system calls set or clear it implicitly, while | ||
1272 | others have API flags such as `AT_SYMLINK_FOLLOW` and | ||
1273 | `UMOUNT_NOFOLLOW` to control it. Its effect is similar to | ||
1274 | `WALK_GET` that we already met, but it is used in a different way. | ||
1275 | |||
1276 | `LOOKUP_DIRECTORY` insists that the final component is a directory. | ||
1277 | Various callers set this and it is also set when the final component | ||
1278 | is found to be followed by a slash. | ||
1279 | |||
1280 | Finally `LOOKUP_OPEN`, `LOOKUP_CREATE`, `LOOKUP_EXCL`, and | ||
1281 | `LOOKUP_RENAME_TARGET` are not used directly by the VFS but are made | ||
1282 | available to the filesystem and particularly the `->d_revalidate()` | ||
1283 | method. A filesystem can choose not to bother revalidating too hard | ||
1284 | if it knows that it will be asked to open or create the file soon. | ||
1285 | These flags were previously useful for `->lookup()` too but with the | ||
1286 | introduction of `->atomic_open()` they are less relevant there. | ||
1287 | |||
1288 | End of the road | ||
1289 | --------------- | ||
1290 | |||
1291 | Despite its complexity, all this pathname lookup code appears to be | ||
1292 | in good shape - various parts are certainly easier to understand now | ||
1293 | than even a couple of releases ago. But that doesn't mean it is | ||
1294 | "finished". As already mentioned, RCU-walk currently only follows | ||
1295 | symlinks that are stored in the inode so, while it handles many ext4 | ||
1296 | symlinks, it doesn't help with NFS, XFS, or Btrfs. That support | ||
1297 | is not likely to be long delayed. | ||
diff --git a/Documentation/filesystems/path-lookup.txt b/Documentation/filesystems/path-lookup.txt index 3571667c7105..9b8930f589d9 100644 --- a/Documentation/filesystems/path-lookup.txt +++ b/Documentation/filesystems/path-lookup.txt | |||
@@ -379,4 +379,4 @@ Papers and other documentation on dcache locking | |||
379 | 379 | ||
380 | 2. http://lse.sourceforge.net/locking/dcache/dcache.html | 380 | 2. http://lse.sourceforge.net/locking/dcache/dcache.html |
381 | 381 | ||
382 | 382 | 3. path-lookup.md in this directory. | |
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index d411ca63c8b6..402ab99e409f 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -140,7 +140,8 @@ Table 1-1: Process specific entries in /proc | |||
140 | stat Process status | 140 | stat Process status |
141 | statm Process memory status information | 141 | statm Process memory status information |
142 | status Process status in human readable form | 142 | status Process status in human readable form |
143 | wchan If CONFIG_KALLSYMS is set, a pre-decoded wchan | 143 | wchan Present with CONFIG_KALLSYMS=y: it shows the kernel function |
144 | symbol the task is blocked in - or "0" if not blocked. | ||
144 | pagemap Page table | 145 | pagemap Page table |
145 | stack Report full stack trace, enable via CONFIG_STACKTRACE | 146 | stack Report full stack trace, enable via CONFIG_STACKTRACE |
146 | smaps a extension based on maps, showing the memory consumption of | 147 | smaps a extension based on maps, showing the memory consumption of |
@@ -174,6 +175,7 @@ read the file /proc/PID/status: | |||
174 | VmLib: 1412 kB | 175 | VmLib: 1412 kB |
175 | VmPTE: 20 kb | 176 | VmPTE: 20 kb |
176 | VmSwap: 0 kB | 177 | VmSwap: 0 kB |
178 | HugetlbPages: 0 kB | ||
177 | Threads: 1 | 179 | Threads: 1 |
178 | SigQ: 0/28578 | 180 | SigQ: 0/28578 |
179 | SigPnd: 0000000000000000 | 181 | SigPnd: 0000000000000000 |
@@ -237,6 +239,7 @@ Table 1-2: Contents of the status files (as of 4.1) | |||
237 | VmPTE size of page table entries | 239 | VmPTE size of page table entries |
238 | VmPMD size of second level page tables | 240 | VmPMD size of second level page tables |
239 | VmSwap size of swap usage (the number of referred swapents) | 241 | VmSwap size of swap usage (the number of referred swapents) |
242 | HugetlbPages size of hugetlb memory portions | ||
240 | Threads number of threads | 243 | Threads number of threads |
241 | SigQ number of signals queued/max. number for queue | 244 | SigQ number of signals queued/max. number for queue |
242 | SigPnd bitmap of pending signals for the thread | 245 | SigPnd bitmap of pending signals for the thread |
@@ -310,7 +313,7 @@ Table 1-4: Contents of the stat files (as of 2.6.30-rc7) | |||
310 | blocked bitmap of blocked signals | 313 | blocked bitmap of blocked signals |
311 | sigign bitmap of ignored signals | 314 | sigign bitmap of ignored signals |
312 | sigcatch bitmap of caught signals | 315 | sigcatch bitmap of caught signals |
313 | wchan address where process went to sleep | 316 | 0 (place holder, used to be the wchan address, use /proc/PID/wchan instead) |
314 | 0 (place holder) | 317 | 0 (place holder) |
315 | 0 (place holder) | 318 | 0 (place holder) |
316 | exit_signal signal to send to parent thread on exit | 319 | exit_signal signal to send to parent thread on exit |
@@ -423,12 +426,15 @@ Private_Clean: 0 kB | |||
423 | Private_Dirty: 0 kB | 426 | Private_Dirty: 0 kB |
424 | Referenced: 892 kB | 427 | Referenced: 892 kB |
425 | Anonymous: 0 kB | 428 | Anonymous: 0 kB |
429 | AnonHugePages: 0 kB | ||
430 | Shared_Hugetlb: 0 kB | ||
431 | Private_Hugetlb: 0 kB | ||
426 | Swap: 0 kB | 432 | Swap: 0 kB |
427 | SwapPss: 0 kB | 433 | SwapPss: 0 kB |
428 | KernelPageSize: 4 kB | 434 | KernelPageSize: 4 kB |
429 | MMUPageSize: 4 kB | 435 | MMUPageSize: 4 kB |
430 | Locked: 374 kB | 436 | Locked: 0 kB |
431 | VmFlags: rd ex mr mw me de | 437 | VmFlags: rd ex mr mw me dw |
432 | 438 | ||
433 | the first of these lines shows the same information as is displayed for the | 439 | the first of these lines shows the same information as is displayed for the |
434 | mapping in /proc/PID/maps. The remaining lines show the size of the mapping | 440 | mapping in /proc/PID/maps. The remaining lines show the size of the mapping |
@@ -448,9 +454,14 @@ accessed. | |||
448 | "Anonymous" shows the amount of memory that does not belong to any file. Even | 454 | "Anonymous" shows the amount of memory that does not belong to any file. Even |
449 | a mapping associated with a file may contain anonymous pages: when MAP_PRIVATE | 455 | a mapping associated with a file may contain anonymous pages: when MAP_PRIVATE |
450 | and a page is modified, the file page is replaced by a private anonymous copy. | 456 | and a page is modified, the file page is replaced by a private anonymous copy. |
451 | "Swap" shows how much would-be-anonymous memory is also used, but out on | 457 | "AnonHugePages" shows the ammount of memory backed by transparent hugepage. |
452 | swap. | 458 | "Shared_Hugetlb" and "Private_Hugetlb" show the ammounts of memory backed by |
459 | hugetlbfs page which is *not* counted in "RSS" or "PSS" field for historical | ||
460 | reasons. And these are not included in {Shared,Private}_{Clean,Dirty} field. | ||
461 | "Swap" shows how much would-be-anonymous memory is also used, but out on swap. | ||
453 | "SwapPss" shows proportional swap share of this mapping. | 462 | "SwapPss" shows proportional swap share of this mapping. |
463 | "Locked" indicates whether the mapping is locked in memory or not. | ||
464 | |||
454 | "VmFlags" field deserves a separate description. This member represents the kernel | 465 | "VmFlags" field deserves a separate description. This member represents the kernel |
455 | flags associated with the particular virtual memory area in two letter encoded | 466 | flags associated with the particular virtual memory area in two letter encoded |
456 | manner. The codes are the following: | 467 | manner. The codes are the following: |
@@ -474,7 +485,6 @@ manner. The codes are the following: | |||
474 | ac - area is accountable | 485 | ac - area is accountable |
475 | nr - swap space is not reserved for the area | 486 | nr - swap space is not reserved for the area |
476 | ht - area uses huge tlb pages | 487 | ht - area uses huge tlb pages |
477 | nl - non-linear mapping | ||
478 | ar - architecture specific flag | 488 | ar - architecture specific flag |
479 | dd - do not include area into core dump | 489 | dd - do not include area into core dump |
480 | sd - soft-dirty flag | 490 | sd - soft-dirty flag |
@@ -814,9 +824,6 @@ varies by architecture and compile options. The following is from a | |||
814 | 824 | ||
815 | > cat /proc/meminfo | 825 | > cat /proc/meminfo |
816 | 826 | ||
817 | The "Locked" indicates whether the mapping is locked in memory or not. | ||
818 | |||
819 | |||
820 | MemTotal: 16344972 kB | 827 | MemTotal: 16344972 kB |
821 | MemFree: 13634064 kB | 828 | MemFree: 13634064 kB |
822 | MemAvailable: 14836172 kB | 829 | MemAvailable: 14836172 kB |
@@ -1598,16 +1605,16 @@ Documentation/accounting. | |||
1598 | --------------------------------------------------------------- | 1605 | --------------------------------------------------------------- |
1599 | When a process is dumped, all anonymous memory is written to a core file as | 1606 | When a process is dumped, all anonymous memory is written to a core file as |
1600 | long as the size of the core file isn't limited. But sometimes we don't want | 1607 | long as the size of the core file isn't limited. But sometimes we don't want |
1601 | to dump some memory segments, for example, huge shared memory. Conversely, | 1608 | to dump some memory segments, for example, huge shared memory or DAX. |
1602 | sometimes we want to save file-backed memory segments into a core file, not | 1609 | Conversely, sometimes we want to save file-backed memory segments into a core |
1603 | only the individual files. | 1610 | file, not only the individual files. |
1604 | 1611 | ||
1605 | /proc/<pid>/coredump_filter allows you to customize which memory segments | 1612 | /proc/<pid>/coredump_filter allows you to customize which memory segments |
1606 | will be dumped when the <pid> process is dumped. coredump_filter is a bitmask | 1613 | will be dumped when the <pid> process is dumped. coredump_filter is a bitmask |
1607 | of memory types. If a bit of the bitmask is set, memory segments of the | 1614 | of memory types. If a bit of the bitmask is set, memory segments of the |
1608 | corresponding memory type are dumped, otherwise they are not dumped. | 1615 | corresponding memory type are dumped, otherwise they are not dumped. |
1609 | 1616 | ||
1610 | The following 7 memory types are supported: | 1617 | The following 9 memory types are supported: |
1611 | - (bit 0) anonymous private memory | 1618 | - (bit 0) anonymous private memory |
1612 | - (bit 1) anonymous shared memory | 1619 | - (bit 1) anonymous shared memory |
1613 | - (bit 2) file-backed private memory | 1620 | - (bit 2) file-backed private memory |
@@ -1616,20 +1623,22 @@ The following 7 memory types are supported: | |||
1616 | effective only if the bit 2 is cleared) | 1623 | effective only if the bit 2 is cleared) |
1617 | - (bit 5) hugetlb private memory | 1624 | - (bit 5) hugetlb private memory |
1618 | - (bit 6) hugetlb shared memory | 1625 | - (bit 6) hugetlb shared memory |
1626 | - (bit 7) DAX private memory | ||
1627 | - (bit 8) DAX shared memory | ||
1619 | 1628 | ||
1620 | Note that MMIO pages such as frame buffer are never dumped and vDSO pages | 1629 | Note that MMIO pages such as frame buffer are never dumped and vDSO pages |
1621 | are always dumped regardless of the bitmask status. | 1630 | are always dumped regardless of the bitmask status. |
1622 | 1631 | ||
1623 | Note bit 0-4 doesn't effect any hugetlb memory. hugetlb memory are only | 1632 | Note that bits 0-4 don't affect hugetlb or DAX memory. hugetlb memory is |
1624 | effected by bit 5-6. | 1633 | only affected by bit 5-6, and DAX is only affected by bits 7-8. |
1625 | 1634 | ||
1626 | Default value of coredump_filter is 0x23; this means all anonymous memory | 1635 | The default value of coredump_filter is 0x33; this means all anonymous memory |
1627 | segments and hugetlb private memory are dumped. | 1636 | segments, ELF header pages and hugetlb private memory are dumped. |
1628 | 1637 | ||
1629 | If you don't want to dump all shared memory segments attached to pid 1234, | 1638 | If you don't want to dump all shared memory segments attached to pid 1234, |
1630 | write 0x21 to the process's proc file. | 1639 | write 0x31 to the process's proc file. |
1631 | 1640 | ||
1632 | $ echo 0x21 > /proc/1234/coredump_filter | 1641 | $ echo 0x31 > /proc/1234/coredump_filter |
1633 | 1642 | ||
1634 | When a new process is created, the process inherits the bitmask status from its | 1643 | When a new process is created, the process inherits the bitmask status from its |
1635 | parent. It is useful to set up coredump_filter before the program runs. | 1644 | parent. It is useful to set up coredump_filter before the program runs. |
diff --git a/Documentation/filesystems/sysfs-tagging.txt b/Documentation/filesystems/sysfs-tagging.txt index eb843e49c5a3..c7c8e6438958 100644 --- a/Documentation/filesystems/sysfs-tagging.txt +++ b/Documentation/filesystems/sysfs-tagging.txt | |||
@@ -17,13 +17,13 @@ the sysfs directory entries we ensure that we don't have conflicts | |||
17 | in the directories and applications only see a limited set of | 17 | in the directories and applications only see a limited set of |
18 | the network devices. | 18 | the network devices. |
19 | 19 | ||
20 | Each sysfs directory entry may be tagged with zero or one | 20 | Each sysfs directory entry may be tagged with a namespace via the |
21 | namespaces. A sysfs_dirent is augmented with a void *s_ns. If a | 21 | void *ns member of its kernfs_node. If a directory entry is tagged, |
22 | directory entry is tagged, then sysfs_dirent->s_flags will have a | 22 | then kernfs_node->flags will have a flag between KOBJ_NS_TYPE_NONE |
23 | flag between KOBJ_NS_TYPE_NONE and KOBJ_NS_TYPES, and s_ns will | 23 | and KOBJ_NS_TYPES, and ns will point to the namespace to which it |
24 | point to the namespace to which it belongs. | 24 | belongs. |
25 | 25 | ||
26 | Each sysfs superblock's sysfs_super_info contains an array void | 26 | Each sysfs superblock's kernfs_super_info contains an array void |
27 | *ns[KOBJ_NS_TYPES]. When a task in a tagging namespace | 27 | *ns[KOBJ_NS_TYPES]. When a task in a tagging namespace |
28 | kobj_nstype first mounts sysfs, a new superblock is created. It | 28 | kobj_nstype first mounts sysfs, a new superblock is created. It |
29 | will be differentiated from other sysfs mounts by having its | 29 | will be differentiated from other sysfs mounts by having its |
@@ -31,7 +31,7 @@ s_fs_info->ns[kobj_nstype] set to the new namespace. Note that | |||
31 | through bind mounting and mounts propagation, a task can easily view | 31 | through bind mounting and mounts propagation, a task can easily view |
32 | the contents of other namespaces' sysfs mounts. Therefore, when a | 32 | the contents of other namespaces' sysfs mounts. Therefore, when a |
33 | namespace exits, it will call kobj_ns_exit() to invalidate any | 33 | namespace exits, it will call kobj_ns_exit() to invalidate any |
34 | sysfs_dirent->s_ns pointers pointing to it. | 34 | kernfs_node->ns pointers pointing to it. |
35 | 35 | ||
36 | Users of this interface: | 36 | Users of this interface: |
37 | - define a type in the kobj_ns_type enumeration. | 37 | - define a type in the kobj_ns_type enumeration. |
diff --git a/Documentation/filesystems/sysfs.txt b/Documentation/filesystems/sysfs.txt index 9494afb9476a..24da7b32c489 100644 --- a/Documentation/filesystems/sysfs.txt +++ b/Documentation/filesystems/sysfs.txt | |||
@@ -40,7 +40,7 @@ ancestors of object hierarchies; i.e. the subsystems the objects | |||
40 | belong to. | 40 | belong to. |
41 | 41 | ||
42 | Sysfs internally stores a pointer to the kobject that implements a | 42 | Sysfs internally stores a pointer to the kobject that implements a |
43 | directory in the sysfs_dirent object associated with the directory. In | 43 | directory in the kernfs_node object associated with the directory. In |
44 | the past this kobject pointer has been used by sysfs to do reference | 44 | the past this kobject pointer has been used by sysfs to do reference |
45 | counting directly on the kobject whenever the file is opened or closed. | 45 | counting directly on the kobject whenever the file is opened or closed. |
46 | With the current sysfs implementation the kobject reference count is | 46 | With the current sysfs implementation the kobject reference count is |
@@ -191,9 +191,10 @@ implementations: | |||
191 | be called again, rearmed, to fill the buffer. | 191 | be called again, rearmed, to fill the buffer. |
192 | 192 | ||
193 | - On write(2), sysfs expects the entire buffer to be passed during the | 193 | - On write(2), sysfs expects the entire buffer to be passed during the |
194 | first write. Sysfs then passes the entire buffer to the store() | 194 | first write. Sysfs then passes the entire buffer to the store() method. |
195 | method. | 195 | A terminating null is added after the data on stores. This makes |
196 | 196 | functions like sysfs_streq() safe to use. | |
197 | |||
197 | When writing sysfs files, userspace processes should first read the | 198 | When writing sysfs files, userspace processes should first read the |
198 | entire file, modify the values it wishes to change, then write the | 199 | entire file, modify the values it wishes to change, then write the |
199 | entire buffer back. | 200 | entire buffer back. |
diff --git a/Documentation/fpga/fpga-mgr.txt b/Documentation/fpga/fpga-mgr.txt new file mode 100644 index 000000000000..ce3e84fa9023 --- /dev/null +++ b/Documentation/fpga/fpga-mgr.txt | |||
@@ -0,0 +1,171 @@ | |||
1 | FPGA Manager Core | ||
2 | |||
3 | Alan Tull 2015 | ||
4 | |||
5 | Overview | ||
6 | ======== | ||
7 | |||
8 | The FPGA manager core exports a set of functions for programming an FPGA with | ||
9 | an image. The API is manufacturer agnostic. All manufacturer specifics are | ||
10 | hidden away in a low level driver which registers a set of ops with the core. | ||
11 | The FPGA image data itself is very manufacturer specific, but for our purposes | ||
12 | it's just binary data. The FPGA manager core won't parse it. | ||
13 | |||
14 | |||
15 | API Functions: | ||
16 | ============== | ||
17 | |||
18 | To program the FPGA from a file or from a buffer: | ||
19 | ------------------------------------------------- | ||
20 | |||
21 | int fpga_mgr_buf_load(struct fpga_manager *mgr, u32 flags, | ||
22 | const char *buf, size_t count); | ||
23 | |||
24 | Load the FPGA from an image which exists as a buffer in memory. | ||
25 | |||
26 | int fpga_mgr_firmware_load(struct fpga_manager *mgr, u32 flags, | ||
27 | const char *image_name); | ||
28 | |||
29 | Load the FPGA from an image which exists as a file. The image file must be on | ||
30 | the firmware search path (see the firmware class documentation). | ||
31 | |||
32 | For both these functions, flags == 0 for normal full reconfiguration or | ||
33 | FPGA_MGR_PARTIAL_RECONFIG for partial reconfiguration. If successful, the FPGA | ||
34 | ends up in operating mode. Return 0 on success or a negative error code. | ||
35 | |||
36 | |||
37 | To get/put a reference to a FPGA manager: | ||
38 | ----------------------------------------- | ||
39 | |||
40 | struct fpga_manager *of_fpga_mgr_get(struct device_node *node); | ||
41 | |||
42 | void fpga_mgr_put(struct fpga_manager *mgr); | ||
43 | |||
44 | Given a DT node, get an exclusive reference to a FPGA manager or release | ||
45 | the reference. | ||
46 | |||
47 | |||
48 | To register or unregister the low level FPGA-specific driver: | ||
49 | ------------------------------------------------------------- | ||
50 | |||
51 | int fpga_mgr_register(struct device *dev, const char *name, | ||
52 | const struct fpga_manager_ops *mops, | ||
53 | void *priv); | ||
54 | |||
55 | void fpga_mgr_unregister(struct device *dev); | ||
56 | |||
57 | Use of these two functions is described below in "How To Support a new FPGA | ||
58 | device." | ||
59 | |||
60 | |||
61 | How to write an image buffer to a supported FPGA | ||
62 | ================================================ | ||
63 | /* Include to get the API */ | ||
64 | #include <linux/fpga/fpga-mgr.h> | ||
65 | |||
66 | /* device node that specifies the FPGA manager to use */ | ||
67 | struct device_node *mgr_node = ... | ||
68 | |||
69 | /* FPGA image is in this buffer. count is size of the buffer. */ | ||
70 | char *buf = ... | ||
71 | int count = ... | ||
72 | |||
73 | /* flags indicates whether to do full or partial reconfiguration */ | ||
74 | int flags = 0; | ||
75 | |||
76 | int ret; | ||
77 | |||
78 | /* Get exclusive control of FPGA manager */ | ||
79 | struct fpga_manager *mgr = of_fpga_mgr_get(mgr_node); | ||
80 | |||
81 | /* Load the buffer to the FPGA */ | ||
82 | ret = fpga_mgr_buf_load(mgr, flags, buf, count); | ||
83 | |||
84 | /* Release the FPGA manager */ | ||
85 | fpga_mgr_put(mgr); | ||
86 | |||
87 | |||
88 | How to write an image file to a supported FPGA | ||
89 | ============================================== | ||
90 | /* Include to get the API */ | ||
91 | #include <linux/fpga/fpga-mgr.h> | ||
92 | |||
93 | /* device node that specifies the FPGA manager to use */ | ||
94 | struct device_node *mgr_node = ... | ||
95 | |||
96 | /* FPGA image is in this file which is in the firmware search path */ | ||
97 | const char *path = "fpga-image-9.rbf" | ||
98 | |||
99 | /* flags indicates whether to do full or partial reconfiguration */ | ||
100 | int flags = 0; | ||
101 | |||
102 | int ret; | ||
103 | |||
104 | /* Get exclusive control of FPGA manager */ | ||
105 | struct fpga_manager *mgr = of_fpga_mgr_get(mgr_node); | ||
106 | |||
107 | /* Get the firmware image (path) and load it to the FPGA */ | ||
108 | ret = fpga_mgr_firmware_load(mgr, flags, path); | ||
109 | |||
110 | /* Release the FPGA manager */ | ||
111 | fpga_mgr_put(mgr); | ||
112 | |||
113 | |||
114 | How to support a new FPGA device | ||
115 | ================================ | ||
116 | To add another FPGA manager, write a driver that implements a set of ops. The | ||
117 | probe function calls fpga_mgr_register(), such as: | ||
118 | |||
119 | static const struct fpga_manager_ops socfpga_fpga_ops = { | ||
120 | .write_init = socfpga_fpga_ops_configure_init, | ||
121 | .write = socfpga_fpga_ops_configure_write, | ||
122 | .write_complete = socfpga_fpga_ops_configure_complete, | ||
123 | .state = socfpga_fpga_ops_state, | ||
124 | }; | ||
125 | |||
126 | static int socfpga_fpga_probe(struct platform_device *pdev) | ||
127 | { | ||
128 | struct device *dev = &pdev->dev; | ||
129 | struct socfpga_fpga_priv *priv; | ||
130 | int ret; | ||
131 | |||
132 | priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); | ||
133 | if (!priv) | ||
134 | return -ENOMEM; | ||
135 | |||
136 | /* ... do ioremaps, get interrupts, etc. and save | ||
137 | them in priv... */ | ||
138 | |||
139 | return fpga_mgr_register(dev, "Altera SOCFPGA FPGA Manager", | ||
140 | &socfpga_fpga_ops, priv); | ||
141 | } | ||
142 | |||
143 | static int socfpga_fpga_remove(struct platform_device *pdev) | ||
144 | { | ||
145 | fpga_mgr_unregister(&pdev->dev); | ||
146 | |||
147 | return 0; | ||
148 | } | ||
149 | |||
150 | |||
151 | The ops will implement whatever device specific register writes are needed to | ||
152 | do the programming sequence for this particular FPGA. These ops return 0 for | ||
153 | success or negative error codes otherwise. | ||
154 | |||
155 | The programming sequence is: | ||
156 | 1. .write_init | ||
157 | 2. .write (may be called once or multiple times) | ||
158 | 3. .write_complete | ||
159 | |||
160 | The .write_init function will prepare the FPGA to receive the image data. | ||
161 | |||
162 | The .write function writes a buffer to the FPGA. The buffer may be contain the | ||
163 | whole FPGA image or may be a smaller chunk of an FPGA image. In the latter | ||
164 | case, this function is called multiple times for successive chunks. | ||
165 | |||
166 | The .write_complete function is called after all the image has been written | ||
167 | to put the FPGA into operating mode. | ||
168 | |||
169 | The ops include a .state function which will read the hardware FPGA manager and | ||
170 | return a code of type enum fpga_mgr_states. It doesn't result in a change in | ||
171 | hardware state. | ||
diff --git a/Documentation/gpio/board.txt b/Documentation/gpio/board.txt index b80606de545a..3092178628c4 100644 --- a/Documentation/gpio/board.txt +++ b/Documentation/gpio/board.txt | |||
@@ -34,20 +34,33 @@ through gpiod_get(). For example: | |||
34 | power-gpios = <&gpio 1 GPIO_ACTIVE_LOW>; | 34 | power-gpios = <&gpio 1 GPIO_ACTIVE_LOW>; |
35 | }; | 35 | }; |
36 | 36 | ||
37 | Properties named <function>-gpio are also considered valid and old bindings use | ||
38 | it but are only supported for compatibility reasons and should not be used for | ||
39 | newer bindings since it has been deprecated. | ||
40 | |||
37 | This property will make GPIOs 15, 16 and 17 available to the driver under the | 41 | This property will make GPIOs 15, 16 and 17 available to the driver under the |
38 | "led" function, and GPIO 1 as the "power" GPIO: | 42 | "led" function, and GPIO 1 as the "power" GPIO: |
39 | 43 | ||
40 | struct gpio_desc *red, *green, *blue, *power; | 44 | struct gpio_desc *red, *green, *blue, *power; |
41 | 45 | ||
42 | red = gpiod_get_index(dev, "led", 0); | 46 | red = gpiod_get_index(dev, "led", 0, GPIOD_OUT_HIGH); |
43 | green = gpiod_get_index(dev, "led", 1); | 47 | green = gpiod_get_index(dev, "led", 1, GPIOD_OUT_HIGH); |
44 | blue = gpiod_get_index(dev, "led", 2); | 48 | blue = gpiod_get_index(dev, "led", 2, GPIOD_OUT_HIGH); |
45 | 49 | ||
46 | power = gpiod_get(dev, "power"); | 50 | power = gpiod_get(dev, "power", GPIOD_OUT_HIGH); |
47 | 51 | ||
48 | The led GPIOs will be active-high, while the power GPIO will be active-low (i.e. | 52 | The led GPIOs will be active-high, while the power GPIO will be active-low (i.e. |
49 | gpiod_is_active_low(power) will be true). | 53 | gpiod_is_active_low(power) will be true). |
50 | 54 | ||
55 | The second parameter of the gpiod_get() functions, the con_id string, has to be | ||
56 | the <function>-prefix of the GPIO suffixes ("gpios" or "gpio", automatically | ||
57 | looked up by the gpiod functions internally) used in the device tree. With above | ||
58 | "led-gpios" example, use the prefix without the "-" as con_id parameter: "led". | ||
59 | |||
60 | Internally, the GPIO subsystem prefixes the GPIO suffix ("gpios" or "gpio") | ||
61 | with the string passed in con_id to get the resulting string | ||
62 | (snprintf(... "%s-%s", con_id, gpio_suffixes[]). | ||
63 | |||
51 | ACPI | 64 | ACPI |
52 | ---- | 65 | ---- |
53 | ACPI also supports function names for GPIOs in a similar fashion to DT. | 66 | ACPI also supports function names for GPIOs in a similar fashion to DT. |
@@ -142,13 +155,14 @@ The driver controlling "foo.0" will then be able to obtain its GPIOs as follows: | |||
142 | 155 | ||
143 | struct gpio_desc *red, *green, *blue, *power; | 156 | struct gpio_desc *red, *green, *blue, *power; |
144 | 157 | ||
145 | red = gpiod_get_index(dev, "led", 0); | 158 | red = gpiod_get_index(dev, "led", 0, GPIOD_OUT_HIGH); |
146 | green = gpiod_get_index(dev, "led", 1); | 159 | green = gpiod_get_index(dev, "led", 1, GPIOD_OUT_HIGH); |
147 | blue = gpiod_get_index(dev, "led", 2); | 160 | blue = gpiod_get_index(dev, "led", 2, GPIOD_OUT_HIGH); |
148 | 161 | ||
149 | power = gpiod_get(dev, "power"); | 162 | power = gpiod_get(dev, "power", GPIOD_OUT_HIGH); |
150 | gpiod_direction_output(power, 1); | ||
151 | 163 | ||
152 | Since the "power" GPIO is mapped as active-low, its actual signal will be 0 | 164 | Since the "led" GPIOs are mapped as active-high, this example will switch their |
153 | after this code. Contrary to the legacy integer GPIO interface, the active-low | 165 | signals to 1, i.e. enabling the LEDs. And for the "power" GPIO, which is mapped |
154 | property is handled during mapping and is thus transparent to GPIO consumers. | 166 | as active-low, its actual signal will be 0 after this code. Contrary to the legacy |
167 | integer GPIO interface, the active-low property is handled during mapping and is | ||
168 | thus transparent to GPIO consumers. | ||
diff --git a/Documentation/gpio/consumer.txt b/Documentation/gpio/consumer.txt index a206639454ab..e000502fde20 100644 --- a/Documentation/gpio/consumer.txt +++ b/Documentation/gpio/consumer.txt | |||
@@ -39,6 +39,9 @@ device that displays digits), an additional index argument can be specified: | |||
39 | const char *con_id, unsigned int idx, | 39 | const char *con_id, unsigned int idx, |
40 | enum gpiod_flags flags) | 40 | enum gpiod_flags flags) |
41 | 41 | ||
42 | For a more detailed description of the con_id parameter in the DeviceTree case | ||
43 | see Documentation/gpio/board.txt | ||
44 | |||
42 | The flags parameter is used to optionally specify a direction and initial value | 45 | The flags parameter is used to optionally specify a direction and initial value |
43 | for the GPIO. Values can be: | 46 | for the GPIO. Values can be: |
44 | 47 | ||
diff --git a/Documentation/gpio/driver.txt b/Documentation/gpio/driver.txt index 90d0f6aba7a6..12a61948ec91 100644 --- a/Documentation/gpio/driver.txt +++ b/Documentation/gpio/driver.txt | |||
@@ -62,6 +62,11 @@ Any debugfs dump method should normally ignore signals which haven't been | |||
62 | requested as GPIOs. They can use gpiochip_is_requested(), which returns either | 62 | requested as GPIOs. They can use gpiochip_is_requested(), which returns either |
63 | NULL or the label associated with that GPIO when it was requested. | 63 | NULL or the label associated with that GPIO when it was requested. |
64 | 64 | ||
65 | RT_FULL: GPIO driver should not use spinlock_t or any sleepable APIs | ||
66 | (like PM runtime) in its gpio_chip implementation (.get/.set and direction | ||
67 | control callbacks) if it is expected to call GPIO APIs from atomic context | ||
68 | on -RT (inside hard IRQ handlers and similar contexts). Normally this should | ||
69 | not be required. | ||
65 | 70 | ||
66 | GPIO drivers providing IRQs | 71 | GPIO drivers providing IRQs |
67 | --------------------------- | 72 | --------------------------- |
@@ -73,6 +78,13 @@ The IRQ portions of the GPIO block are implemented using an irqchip, using | |||
73 | the header <linux/irq.h>. So basically such a driver is utilizing two sub- | 78 | the header <linux/irq.h>. So basically such a driver is utilizing two sub- |
74 | systems simultaneously: gpio and irq. | 79 | systems simultaneously: gpio and irq. |
75 | 80 | ||
81 | RT_FULL: GPIO driver should not use spinlock_t or any sleepable APIs | ||
82 | (like PM runtime) as part of its irq_chip implementation on -RT. | ||
83 | - spinlock_t should be replaced with raw_spinlock_t [1]. | ||
84 | - If sleepable APIs have to be used, these can be done from the .irq_bus_lock() | ||
85 | and .irq_bus_unlock() callbacks, as these are the only slowpath callbacks | ||
86 | on an irqchip. Create the callbacks if needed [2]. | ||
87 | |||
76 | GPIO irqchips usually fall in one of two categories: | 88 | GPIO irqchips usually fall in one of two categories: |
77 | 89 | ||
78 | * CHAINED GPIO irqchips: these are usually the type that is embedded on | 90 | * CHAINED GPIO irqchips: these are usually the type that is embedded on |
@@ -93,6 +105,38 @@ GPIO irqchips usually fall in one of two categories: | |||
93 | Chained GPIO irqchips typically can NOT set the .can_sleep flag on | 105 | Chained GPIO irqchips typically can NOT set the .can_sleep flag on |
94 | struct gpio_chip, as everything happens directly in the callbacks. | 106 | struct gpio_chip, as everything happens directly in the callbacks. |
95 | 107 | ||
108 | RT_FULL: Note, chained IRQ handlers will not be forced threaded on -RT. | ||
109 | As result, spinlock_t or any sleepable APIs (like PM runtime) can't be used | ||
110 | in chained IRQ handler. | ||
111 | if required (and if it can't be converted to the nested threaded GPIO irqchip) | ||
112 | - chained IRQ handler can be converted to generic irq handler and this way | ||
113 | it will be threaded IRQ handler on -RT and hard IRQ handler on non-RT | ||
114 | (for example, see [3]). | ||
115 | Know W/A: The generic_handle_irq() is expected to be called with IRQ disabled, | ||
116 | so IRQ core will complain if it will be called from IRQ handler wich is forced | ||
117 | thread. The "fake?" raw lock can be used to W/A this problem: | ||
118 | |||
119 | raw_spinlock_t wa_lock; | ||
120 | static irqreturn_t omap_gpio_irq_handler(int irq, void *gpiobank) | ||
121 | unsigned long wa_lock_flags; | ||
122 | raw_spin_lock_irqsave(&bank->wa_lock, wa_lock_flags); | ||
123 | generic_handle_irq(irq_find_mapping(bank->chip.irqdomain, bit)); | ||
124 | raw_spin_unlock_irqrestore(&bank->wa_lock, wa_lock_flags); | ||
125 | |||
126 | * GENERIC CHAINED GPIO irqchips: these are the same as "CHAINED GPIO irqchips", | ||
127 | but chained IRQ handlers are not used. Instead GPIO IRQs dispatching is | ||
128 | performed by generic IRQ handler which is configured using request_irq(). | ||
129 | The GPIO irqchip will then end up calling something like this sequence in | ||
130 | its interrupt handler: | ||
131 | |||
132 | static irqreturn_t gpio_rcar_irq_handler(int irq, void *dev_id) | ||
133 | for each detected GPIO IRQ | ||
134 | generic_handle_irq(...); | ||
135 | |||
136 | RT_FULL: Such kind of handlers will be forced threaded on -RT, as result IRQ | ||
137 | core will complain that generic_handle_irq() is called with IRQ enabled and | ||
138 | the same W/A as for "CHAINED GPIO irqchips" can be applied. | ||
139 | |||
96 | * NESTED THREADED GPIO irqchips: these are off-chip GPIO expanders and any | 140 | * NESTED THREADED GPIO irqchips: these are off-chip GPIO expanders and any |
97 | other GPIO irqchip residing on the other side of a sleeping bus. Of course | 141 | other GPIO irqchip residing on the other side of a sleeping bus. Of course |
98 | such drivers that need slow bus traffic to read out IRQ status and similar, | 142 | such drivers that need slow bus traffic to read out IRQ status and similar, |
@@ -133,6 +177,13 @@ To use the helpers please keep the following in mind: | |||
133 | the irqchip can initialize. E.g. .dev and .can_sleep shall be set up | 177 | the irqchip can initialize. E.g. .dev and .can_sleep shall be set up |
134 | properly. | 178 | properly. |
135 | 179 | ||
180 | - Nominally set all handlers to handle_bad_irq() in the setup call and pass | ||
181 | handle_bad_irq() as flow handler parameter in gpiochip_irqchip_add() if it is | ||
182 | expected for GPIO driver that irqchip .set_type() callback have to be called | ||
183 | before using/enabling GPIO IRQ. Then set the handler to handle_level_irq() | ||
184 | and/or handle_edge_irq() in the irqchip .set_type() callback depending on | ||
185 | what your controller supports. | ||
186 | |||
136 | It is legal for any IRQ consumer to request an IRQ from any irqchip no matter | 187 | It is legal for any IRQ consumer to request an IRQ from any irqchip no matter |
137 | if that is a combined GPIO+IRQ driver. The basic premise is that gpio_chip and | 188 | if that is a combined GPIO+IRQ driver. The basic premise is that gpio_chip and |
138 | irq_chip are orthogonal, and offering their services independent of each | 189 | irq_chip are orthogonal, and offering their services independent of each |
@@ -169,6 +220,31 @@ When implementing an irqchip inside a GPIO driver, these two functions should | |||
169 | typically be called in the .startup() and .shutdown() callbacks from the | 220 | typically be called in the .startup() and .shutdown() callbacks from the |
170 | irqchip. | 221 | irqchip. |
171 | 222 | ||
223 | Real-Time compliance for GPIO IRQ chips | ||
224 | --------------------------------------- | ||
225 | |||
226 | Any provider of irqchips needs to be carefully tailored to support Real Time | ||
227 | preemption. It is desireable that all irqchips in the GPIO subsystem keep this | ||
228 | in mind and does the proper testing to assure they are real time-enabled. | ||
229 | So, pay attention on above " RT_FULL:" notes, please. | ||
230 | The following is a checklist to follow when preparing a driver for real | ||
231 | time-compliance: | ||
232 | |||
233 | - ensure spinlock_t is not used as part irq_chip implementation; | ||
234 | - ensure that sleepable APIs are not used as part irq_chip implementation. | ||
235 | If sleepable APIs have to be used, these can be done from the .irq_bus_lock() | ||
236 | and .irq_bus_unlock() callbacks; | ||
237 | - Chained GPIO irqchips: ensure spinlock_t or any sleepable APIs are not used | ||
238 | from chained IRQ handler; | ||
239 | - Generic chained GPIO irqchips: take care about generic_handle_irq() calls and | ||
240 | apply corresponding W/A; | ||
241 | - Chained GPIO irqchips: get rid of chained IRQ handler and use generic irq | ||
242 | handler if possible :) | ||
243 | - regmap_mmio: Sry, but you are in trouble :( if MMIO regmap is used as for | ||
244 | GPIO IRQ chip implementation; | ||
245 | - Test your driver with the appropriate in-kernel real time test cases for both | ||
246 | level and edge IRQs. | ||
247 | |||
172 | 248 | ||
173 | Requesting self-owned GPIO pins | 249 | Requesting self-owned GPIO pins |
174 | ------------------------------- | 250 | ------------------------------- |
@@ -190,3 +266,7 @@ gpiochip_free_own_desc(). | |||
190 | These functions must be used with care since they do not affect module use | 266 | These functions must be used with care since they do not affect module use |
191 | count. Do not use the functions to request gpio descriptors not owned by the | 267 | count. Do not use the functions to request gpio descriptors not owned by the |
192 | calling driver. | 268 | calling driver. |
269 | |||
270 | [1] http://www.spinics.net/lists/linux-omap/msg120425.html | ||
271 | [2] https://lkml.org/lkml/2015/9/25/494 | ||
272 | [3] https://lkml.org/lkml/2015/9/25/495 | ||
diff --git a/Documentation/gpio/sysfs.txt b/Documentation/gpio/sysfs.txt index 0700b55637f5..aeab01aa4d00 100644 --- a/Documentation/gpio/sysfs.txt +++ b/Documentation/gpio/sysfs.txt | |||
@@ -20,14 +20,14 @@ userspace GPIO can be used to determine system configuration data that | |||
20 | standard kernels won't know about. And for some tasks, simple userspace | 20 | standard kernels won't know about. And for some tasks, simple userspace |
21 | GPIO drivers could be all that the system really needs. | 21 | GPIO drivers could be all that the system really needs. |
22 | 22 | ||
23 | DO NOT ABUSE SYFS TO CONTROL HARDWARE THAT HAS PROPER KERNEL DRIVERS. | 23 | DO NOT ABUSE SYSFS TO CONTROL HARDWARE THAT HAS PROPER KERNEL DRIVERS. |
24 | PLEASE READ THE DOCUMENT NAMED "drivers-on-gpio.txt" IN THIS DOCUMENTATION | 24 | PLEASE READ THE DOCUMENT NAMED "drivers-on-gpio.txt" IN THIS DOCUMENTATION |
25 | DIRECTORY TO AVOID REINVENTING KERNEL WHEELS IN USERSPACE. I MEAN IT. | 25 | DIRECTORY TO AVOID REINVENTING KERNEL WHEELS IN USERSPACE. I MEAN IT. |
26 | REALLY. | 26 | REALLY. |
27 | 27 | ||
28 | Paths in Sysfs | 28 | Paths in Sysfs |
29 | -------------- | 29 | -------------- |
30 | There are three kinds of entry in /sys/class/gpio: | 30 | There are three kinds of entries in /sys/class/gpio: |
31 | 31 | ||
32 | - Control interfaces used to get userspace control over GPIOs; | 32 | - Control interfaces used to get userspace control over GPIOs; |
33 | 33 | ||
@@ -106,7 +106,7 @@ read-only attributes: | |||
106 | 106 | ||
107 | "label" ... provided for diagnostics (not always unique) | 107 | "label" ... provided for diagnostics (not always unique) |
108 | 108 | ||
109 | "ngpio" ... how many GPIOs this manges (N to N + ngpio - 1) | 109 | "ngpio" ... how many GPIOs this manages (N to N + ngpio - 1) |
110 | 110 | ||
111 | Board documentation should in most cases cover what GPIOs are used for | 111 | Board documentation should in most cases cover what GPIOs are used for |
112 | what purposes. However, those numbers are not always stable; GPIOs on | 112 | what purposes. However, those numbers are not always stable; GPIOs on |
diff --git a/Documentation/hw_random.txt b/Documentation/hw_random.txt index 026e237bbc87..fce1634907d0 100644 --- a/Documentation/hw_random.txt +++ b/Documentation/hw_random.txt | |||
@@ -3,7 +3,7 @@ Introduction: | |||
3 | The hw_random framework is software that makes use of a | 3 | The hw_random framework is software that makes use of a |
4 | special hardware feature on your CPU or motherboard, | 4 | special hardware feature on your CPU or motherboard, |
5 | a Random Number Generator (RNG). The software has two parts: | 5 | a Random Number Generator (RNG). The software has two parts: |
6 | a core providing the /dev/hw_random character device and its | 6 | a core providing the /dev/hwrng character device and its |
7 | sysfs support, plus a hardware-specific driver that plugs | 7 | sysfs support, plus a hardware-specific driver that plugs |
8 | into that core. | 8 | into that core. |
9 | 9 | ||
@@ -14,7 +14,7 @@ Introduction: | |||
14 | 14 | ||
15 | http://sourceforge.net/projects/gkernel/ | 15 | http://sourceforge.net/projects/gkernel/ |
16 | 16 | ||
17 | Those tools use /dev/hw_random to fill the kernel entropy pool, | 17 | Those tools use /dev/hwrng to fill the kernel entropy pool, |
18 | which is used internally and exported by the /dev/urandom and | 18 | which is used internally and exported by the /dev/urandom and |
19 | /dev/random special files. | 19 | /dev/random special files. |
20 | 20 | ||
@@ -32,13 +32,13 @@ Theory of operation: | |||
32 | The rng-tools package uses such tests in "rngd", and lets you | 32 | The rng-tools package uses such tests in "rngd", and lets you |
33 | run them by hand with a "rngtest" utility. | 33 | run them by hand with a "rngtest" utility. |
34 | 34 | ||
35 | /dev/hw_random is char device major 10, minor 183. | 35 | /dev/hwrng is char device major 10, minor 183. |
36 | 36 | ||
37 | CLASS DEVICE. There is a /sys/class/misc/hw_random node with | 37 | CLASS DEVICE. There is a /sys/class/misc/hw_random node with |
38 | two unique attributes, "rng_available" and "rng_current". The | 38 | two unique attributes, "rng_available" and "rng_current". The |
39 | "rng_available" attribute lists the hardware-specific drivers | 39 | "rng_available" attribute lists the hardware-specific drivers |
40 | available, while "rng_current" lists the one which is currently | 40 | available, while "rng_current" lists the one which is currently |
41 | connected to /dev/hw_random. If your system has more than one | 41 | connected to /dev/hwrng. If your system has more than one |
42 | RNG available, you may change the one used by writing a name from | 42 | RNG available, you may change the one used by writing a name from |
43 | the list in "rng_available" into "rng_current". | 43 | the list in "rng_available" into "rng_current". |
44 | 44 | ||
diff --git a/Documentation/hwmon/lm75 b/Documentation/hwmon/lm75 index 67691a0aa41d..ac95edfcd907 100644 --- a/Documentation/hwmon/lm75 +++ b/Documentation/hwmon/lm75 | |||
@@ -42,8 +42,8 @@ Supported chips: | |||
42 | Addresses scanned: none | 42 | Addresses scanned: none |
43 | Datasheet: Publicly available at the ST website | 43 | Datasheet: Publicly available at the ST website |
44 | http://www.st.com/internet/analog/product/121769.jsp | 44 | http://www.st.com/internet/analog/product/121769.jsp |
45 | * Texas Instruments TMP100, TMP101, TMP105, TMP112, TMP75, TMP175, TMP275 | 45 | * Texas Instruments TMP100, TMP101, TMP105, TMP112, TMP75, TMP75C, TMP175, TMP275 |
46 | Prefixes: 'tmp100', 'tmp101', 'tmp105', 'tmp112', 'tmp175', 'tmp75', 'tmp275' | 46 | Prefixes: 'tmp100', 'tmp101', 'tmp105', 'tmp112', 'tmp175', 'tmp75', 'tmp75c', 'tmp275' |
47 | Addresses scanned: none | 47 | Addresses scanned: none |
48 | Datasheet: Publicly available at the Texas Instruments website | 48 | Datasheet: Publicly available at the Texas Instruments website |
49 | http://www.ti.com/product/tmp100 | 49 | http://www.ti.com/product/tmp100 |
@@ -51,6 +51,7 @@ Supported chips: | |||
51 | http://www.ti.com/product/tmp105 | 51 | http://www.ti.com/product/tmp105 |
52 | http://www.ti.com/product/tmp112 | 52 | http://www.ti.com/product/tmp112 |
53 | http://www.ti.com/product/tmp75 | 53 | http://www.ti.com/product/tmp75 |
54 | http://www.ti.com/product/tmp75c | ||
54 | http://www.ti.com/product/tmp175 | 55 | http://www.ti.com/product/tmp175 |
55 | http://www.ti.com/product/tmp275 | 56 | http://www.ti.com/product/tmp275 |
56 | * NXP LM75B | 57 | * NXP LM75B |
diff --git a/Documentation/hwmon/max31790 b/Documentation/hwmon/max31790 new file mode 100644 index 000000000000..855e62430da9 --- /dev/null +++ b/Documentation/hwmon/max31790 | |||
@@ -0,0 +1,37 @@ | |||
1 | Kernel driver max31790 | ||
2 | ====================== | ||
3 | |||
4 | Supported chips: | ||
5 | * Maxim MAX31790 | ||
6 | Prefix: 'max31790' | ||
7 | Addresses scanned: - | ||
8 | Datasheet: http://pdfserv.maximintegrated.com/en/ds/MAX31790.pdf | ||
9 | |||
10 | Author: Il Han <corone.il.han@gmail.com> | ||
11 | |||
12 | |||
13 | Description | ||
14 | ----------- | ||
15 | |||
16 | This driver implements support for the Maxim MAX31790 chip. | ||
17 | |||
18 | The MAX31790 controls the speeds of up to six fans using six independent | ||
19 | PWM outputs. The desired fan speeds (or PWM duty cycles) are written | ||
20 | through the I2C interface. The outputs drive "4-wire" fans directly, | ||
21 | or can be used to modulate the fan's power terminals using an external | ||
22 | pass transistor. | ||
23 | |||
24 | Tachometer inputs monitor fan tachometer logic outputs for precise (+/-1%) | ||
25 | monitoring and control of fan RPM as well as detection of fan failure. | ||
26 | Six pins are dedicated tachometer inputs. Any of the six PWM outputs can | ||
27 | also be configured to serve as tachometer inputs. | ||
28 | |||
29 | |||
30 | Sysfs entries | ||
31 | ------------- | ||
32 | |||
33 | fan[1-12]_input RO fan tachometer speed in RPM | ||
34 | fan[1-12]_fault RO fan experienced fault | ||
35 | fan[1-6]_target RW desired fan speed in RPM | ||
36 | pwm[1-6]_enable RW regulator mode, 0=disabled, 1=manual mode, 2=rpm mode | ||
37 | pwm[1-6] RW fan target duty cycle (0-255) | ||
diff --git a/Documentation/hwmon/nct6775 b/Documentation/hwmon/nct6775 index f0dd3d2fec96..76add4c9cd68 100644 --- a/Documentation/hwmon/nct6775 +++ b/Documentation/hwmon/nct6775 | |||
@@ -32,6 +32,10 @@ Supported chips: | |||
32 | Prefix: 'nct6792' | 32 | Prefix: 'nct6792' |
33 | Addresses scanned: ISA address retrieved from Super I/O registers | 33 | Addresses scanned: ISA address retrieved from Super I/O registers |
34 | Datasheet: Available from Nuvoton upon request | 34 | Datasheet: Available from Nuvoton upon request |
35 | * Nuvoton NCT6793D | ||
36 | Prefix: 'nct6793' | ||
37 | Addresses scanned: ISA address retrieved from Super I/O registers | ||
38 | Datasheet: Available from Nuvoton upon request | ||
35 | 39 | ||
36 | Authors: | 40 | Authors: |
37 | Guenter Roeck <linux@roeck-us.net> | 41 | Guenter Roeck <linux@roeck-us.net> |
diff --git a/Documentation/hwmon/scpi-hwmon b/Documentation/hwmon/scpi-hwmon new file mode 100644 index 000000000000..4cfcdf2d5eab --- /dev/null +++ b/Documentation/hwmon/scpi-hwmon | |||
@@ -0,0 +1,33 @@ | |||
1 | Kernel driver scpi-hwmon | ||
2 | ======================== | ||
3 | |||
4 | Supported chips: | ||
5 | * Chips based on ARM System Control Processor Interface | ||
6 | Addresses scanned: - | ||
7 | Datasheet: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0922b/index.html | ||
8 | |||
9 | Author: Punit Agrawal <punit.agrawal@arm.com> | ||
10 | |||
11 | Description | ||
12 | ----------- | ||
13 | |||
14 | This driver supports hardware monitoring for SoC's based on the ARM | ||
15 | System Control Processor (SCP) implementing the System Control | ||
16 | Processor Interface (SCPI). The following sensor types are supported | ||
17 | by the SCP - | ||
18 | |||
19 | * temperature | ||
20 | * voltage | ||
21 | * current | ||
22 | * power | ||
23 | |||
24 | The SCP interface provides an API to query the available sensors and | ||
25 | their values which are then exported to userspace by this driver. | ||
26 | |||
27 | Usage Notes | ||
28 | ----------- | ||
29 | |||
30 | The driver relies on device tree node to indicate the presence of SCPI | ||
31 | support in the kernel. See | ||
32 | Documentation/devicetree/bindings/arm/arm,scpi.txt for details of the | ||
33 | devicetree node. \ No newline at end of file | ||
diff --git a/Documentation/i2c/busses/i2c-i801 b/Documentation/i2c/busses/i2c-i801 index 82f48f774afb..6a4b1af724f8 100644 --- a/Documentation/i2c/busses/i2c-i801 +++ b/Documentation/i2c/busses/i2c-i801 | |||
@@ -30,6 +30,8 @@ Supported adapters: | |||
30 | * Intel BayTrail (SOC) | 30 | * Intel BayTrail (SOC) |
31 | * Intel Sunrise Point-H (PCH) | 31 | * Intel Sunrise Point-H (PCH) |
32 | * Intel Sunrise Point-LP (PCH) | 32 | * Intel Sunrise Point-LP (PCH) |
33 | * Intel DNV (SOC) | ||
34 | * Intel Broxton (SOC) | ||
33 | Datasheets: Publicly available at the Intel website | 35 | Datasheets: Publicly available at the Intel website |
34 | 36 | ||
35 | On Intel Patsburg and later chipsets, both the normal host SMBus controller | 37 | On Intel Patsburg and later chipsets, both the normal host SMBus controller |
diff --git a/Documentation/input/multi-touch-protocol.txt b/Documentation/input/multi-touch-protocol.txt index b85d000faeb4..c51f1146f3bd 100644 --- a/Documentation/input/multi-touch-protocol.txt +++ b/Documentation/input/multi-touch-protocol.txt | |||
@@ -361,7 +361,7 @@ For win8 devices with both T and C coordinates, the position mapping is | |||
361 | ABS_MT_POSITION_X := T_X | 361 | ABS_MT_POSITION_X := T_X |
362 | ABS_MT_POSITION_Y := T_Y | 362 | ABS_MT_POSITION_Y := T_Y |
363 | ABS_MT_TOOL_X := C_X | 363 | ABS_MT_TOOL_X := C_X |
364 | ABS_MT_TOOL_X := C_Y | 364 | ABS_MT_TOOL_Y := C_Y |
365 | 365 | ||
366 | Unfortunately, there is not enough information to specify both the touching | 366 | Unfortunately, there is not enough information to specify both the touching |
367 | ellipse and the tool ellipse, so one has to resort to approximations. One | 367 | ellipse and the tool ellipse, so one has to resort to approximations. One |
diff --git a/Documentation/input/rotary-encoder.txt b/Documentation/input/rotary-encoder.txt index 5737e3590adb..46a74f0c551a 100644 --- a/Documentation/input/rotary-encoder.txt +++ b/Documentation/input/rotary-encoder.txt | |||
@@ -9,8 +9,9 @@ peripherals with two wires. The outputs are phase-shifted by 90 degrees | |||
9 | and by triggering on falling and rising edges, the turn direction can | 9 | and by triggering on falling and rising edges, the turn direction can |
10 | be determined. | 10 | be determined. |
11 | 11 | ||
12 | Some encoders have both outputs low in stable states, whereas others also have | 12 | Some encoders have both outputs low in stable states, others also have |
13 | a stable state with both outputs high (half-period mode). | 13 | a stable state with both outputs high (half-period mode) and some have |
14 | a stable state in all steps (quarter-period mode). | ||
14 | 15 | ||
15 | The phase diagram of these two outputs look like this: | 16 | The phase diagram of these two outputs look like this: |
16 | 17 | ||
@@ -32,6 +33,9 @@ The phase diagram of these two outputs look like this: | |||
32 | |<-->| | 33 | |<-->| |
33 | one step (half-period mode) | 34 | one step (half-period mode) |
34 | 35 | ||
36 | |<>| | ||
37 | one step (quarter-period mode) | ||
38 | |||
35 | For more information, please see | 39 | For more information, please see |
36 | https://en.wikipedia.org/wiki/Rotary_encoder | 40 | https://en.wikipedia.org/wiki/Rotary_encoder |
37 | 41 | ||
@@ -109,6 +113,7 @@ static struct rotary_encoder_platform_data my_rotary_encoder_info = { | |||
109 | .inverted_a = 0, | 113 | .inverted_a = 0, |
110 | .inverted_b = 0, | 114 | .inverted_b = 0, |
111 | .half_period = false, | 115 | .half_period = false, |
116 | .wakeup_source = false, | ||
112 | }; | 117 | }; |
113 | 118 | ||
114 | static struct platform_device rotary_encoder_device = { | 119 | static struct platform_device rotary_encoder_device = { |
diff --git a/Documentation/input/userio.txt b/Documentation/input/userio.txt new file mode 100644 index 000000000000..0880c0f447a6 --- /dev/null +++ b/Documentation/input/userio.txt | |||
@@ -0,0 +1,70 @@ | |||
1 | The userio Protocol | ||
2 | (c) 2015 Stephen Chandler Paul <thatslyude@gmail.com> | ||
3 | Sponsored by Red Hat | ||
4 | -------------------------------------------------------------------------------- | ||
5 | |||
6 | 1. Introduction | ||
7 | ~~~~~~~~~~~~~~~ | ||
8 | This module is intended to try to make the lives of input driver developers | ||
9 | easier by allowing them to test various serio devices (mainly the various | ||
10 | touchpads found on laptops) without having to have the physical device in front | ||
11 | of them. userio accomplishes this by allowing any privileged userspace program | ||
12 | to directly interact with the kernel's serio driver and control a virtual serio | ||
13 | port from there. | ||
14 | |||
15 | 2. Usage overview | ||
16 | ~~~~~~~~~~~~~~~~~ | ||
17 | In order to interact with the userio kernel module, one simply opens the | ||
18 | /dev/userio character device in their applications. Commands are sent to the | ||
19 | kernel module by writing to the device, and any data received from the serio | ||
20 | driver is read as-is from the /dev/userio device. All of the structures and | ||
21 | macros you need to interact with the device are defined in <linux/userio.h> and | ||
22 | <linux/serio.h>. | ||
23 | |||
24 | 3. Command Structure | ||
25 | ~~~~~~~~~~~~~~~~~~~~ | ||
26 | The struct used for sending commands to /dev/userio is as follows: | ||
27 | |||
28 | struct userio_cmd { | ||
29 | __u8 type; | ||
30 | __u8 data; | ||
31 | }; | ||
32 | |||
33 | "type" describes the type of command that is being sent. This can be any one | ||
34 | of the USERIO_CMD macros defined in <linux/userio.h>. "data" is the argument | ||
35 | that goes along with the command. In the event that the command doesn't have an | ||
36 | argument, this field can be left untouched and will be ignored by the kernel. | ||
37 | Each command should be sent by writing the struct directly to the character | ||
38 | device. In the event that the command you send is invalid, an error will be | ||
39 | returned by the character device and a more descriptive error will be printed | ||
40 | to the kernel log. Only one command can be sent at a time, any additional data | ||
41 | written to the character device after the initial command will be ignored. | ||
42 | To close the virtual serio port, just close /dev/userio. | ||
43 | |||
44 | 4. Commands | ||
45 | ~~~~~~~~~~~ | ||
46 | |||
47 | 4.1 USERIO_CMD_REGISTER | ||
48 | ~~~~~~~~~~~~~~~~~~~~~~~ | ||
49 | Registers the port with the serio driver and begins transmitting data back and | ||
50 | forth. Registration can only be performed once a port type is set with | ||
51 | USERIO_CMD_SET_PORT_TYPE. Has no argument. | ||
52 | |||
53 | 4.2 USERIO_CMD_SET_PORT_TYPE | ||
54 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
55 | Sets the type of port we're emulating, where "data" is the port type being | ||
56 | set. Can be any of the macros from <linux/serio.h>. For example: SERIO_8042 | ||
57 | would set the port type to be a normal PS/2 port. | ||
58 | |||
59 | 4.3 USERIO_CMD_SEND_INTERRUPT | ||
60 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
61 | Sends an interrupt through the virtual serio port to the serio driver, where | ||
62 | "data" is the interrupt data being sent. | ||
63 | |||
64 | 5. Userspace tools | ||
65 | ~~~~~~~~~~~~~~~~~~ | ||
66 | The userio userspace tools are able to record PS/2 devices using some of the | ||
67 | debugging information from i8042, and play back the devices on /dev/userio. The | ||
68 | latest version of these tools can be found at: | ||
69 | |||
70 | https://github.com/Lyude/ps2emu | ||
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt index df1b25eb8382..91261a32a573 100644 --- a/Documentation/ioctl/ioctl-number.txt +++ b/Documentation/ioctl/ioctl-number.txt | |||
@@ -81,6 +81,9 @@ Code Seq#(hex) Include File Comments | |||
81 | 0x22 all scsi/sg.h | 81 | 0x22 all scsi/sg.h |
82 | '#' 00-3F IEEE 1394 Subsystem Block for the entire subsystem | 82 | '#' 00-3F IEEE 1394 Subsystem Block for the entire subsystem |
83 | '$' 00-0F linux/perf_counter.h, linux/perf_event.h | 83 | '$' 00-0F linux/perf_counter.h, linux/perf_event.h |
84 | '%' 00-0F include/uapi/linux/stm.h | ||
85 | System Trace Module subsystem | ||
86 | <mailto:alexander.shishkin@linux.intel.com> | ||
84 | '&' 00-07 drivers/firewire/nosy-user.h | 87 | '&' 00-07 drivers/firewire/nosy-user.h |
85 | '1' 00-1F <linux/timepps.h> PPS kit from Ulrich Windl | 88 | '1' 00-1F <linux/timepps.h> PPS kit from Ulrich Windl |
86 | <ftp://ftp.de.kernel.org/pub/linux/daemons/ntp/PPS/> | 89 | <ftp://ftp.de.kernel.org/pub/linux/daemons/ntp/PPS/> |
@@ -149,6 +152,7 @@ Code Seq#(hex) Include File Comments | |||
149 | 'K' all linux/kd.h | 152 | 'K' all linux/kd.h |
150 | 'L' 00-1F linux/loop.h conflict! | 153 | 'L' 00-1F linux/loop.h conflict! |
151 | 'L' 10-1F drivers/scsi/mpt2sas/mpt2sas_ctl.h conflict! | 154 | 'L' 10-1F drivers/scsi/mpt2sas/mpt2sas_ctl.h conflict! |
155 | 'L' 20-2F linux/lightnvm.h | ||
152 | 'L' E0-FF linux/ppdd.h encrypted disk device driver | 156 | 'L' E0-FF linux/ppdd.h encrypted disk device driver |
153 | <http://linux01.gwdg.de/~alatham/ppdd.html> | 157 | <http://linux01.gwdg.de/~alatham/ppdd.html> |
154 | 'M' all linux/soundcard.h conflict! | 158 | 'M' all linux/soundcard.h conflict! |
diff --git a/Documentation/kasan.txt b/Documentation/kasan.txt index 0d32355a4c34..aa1e0c91e368 100644 --- a/Documentation/kasan.txt +++ b/Documentation/kasan.txt | |||
@@ -1,36 +1,34 @@ | |||
1 | Kernel address sanitizer | 1 | KernelAddressSanitizer (KASAN) |
2 | ================ | 2 | ============================== |
3 | 3 | ||
4 | 0. Overview | 4 | 0. Overview |
5 | =========== | 5 | =========== |
6 | 6 | ||
7 | Kernel Address sanitizer (KASan) is a dynamic memory error detector. It provides | 7 | KernelAddressSANitizer (KASAN) is a dynamic memory error detector. It provides |
8 | a fast and comprehensive solution for finding use-after-free and out-of-bounds | 8 | a fast and comprehensive solution for finding use-after-free and out-of-bounds |
9 | bugs. | 9 | bugs. |
10 | 10 | ||
11 | KASan uses compile-time instrumentation for checking every memory access, | 11 | KASAN uses compile-time instrumentation for checking every memory access, |
12 | therefore you will need a gcc version of 4.9.2 or later. KASan could detect out | 12 | therefore you will need a GCC version 4.9.2 or later. GCC 5.0 or later is |
13 | of bounds accesses to stack or global variables, but only if gcc 5.0 or later was | 13 | required for detection of out-of-bounds accesses to stack or global variables. |
14 | used to built the kernel. | ||
15 | 14 | ||
16 | Currently KASan is supported only for x86_64 architecture and requires that the | 15 | Currently KASAN is supported only for x86_64 architecture and requires the |
17 | kernel be built with the SLUB allocator. | 16 | kernel to be built with the SLUB allocator. |
18 | 17 | ||
19 | 1. Usage | 18 | 1. Usage |
20 | ========= | 19 | ======== |
21 | 20 | ||
22 | To enable KASAN configure kernel with: | 21 | To enable KASAN configure kernel with: |
23 | 22 | ||
24 | CONFIG_KASAN = y | 23 | CONFIG_KASAN = y |
25 | 24 | ||
26 | and choose between CONFIG_KASAN_OUTLINE and CONFIG_KASAN_INLINE. Outline/inline | 25 | and choose between CONFIG_KASAN_OUTLINE and CONFIG_KASAN_INLINE. Outline and |
27 | is compiler instrumentation types. The former produces smaller binary the | 26 | inline are compiler instrumentation types. The former produces smaller binary |
28 | latter is 1.1 - 2 times faster. Inline instrumentation requires a gcc version | 27 | the latter is 1.1 - 2 times faster. Inline instrumentation requires a GCC |
29 | of 5.0 or later. | 28 | version 5.0 or later. |
30 | 29 | ||
31 | Currently KASAN works only with the SLUB memory allocator. | 30 | Currently KASAN works only with the SLUB memory allocator. |
32 | For better bug detection and nicer report, enable CONFIG_STACKTRACE and put | 31 | For better bug detection and nicer reporting, enable CONFIG_STACKTRACE. |
33 | at least 'slub_debug=U' in the boot cmdline. | ||
34 | 32 | ||
35 | To disable instrumentation for specific files or directories, add a line | 33 | To disable instrumentation for specific files or directories, add a line |
36 | similar to the following to the respective kernel Makefile: | 34 | similar to the following to the respective kernel Makefile: |
@@ -42,7 +40,7 @@ similar to the following to the respective kernel Makefile: | |||
42 | KASAN_SANITIZE := n | 40 | KASAN_SANITIZE := n |
43 | 41 | ||
44 | 1.1 Error reports | 42 | 1.1 Error reports |
45 | ========== | 43 | ================= |
46 | 44 | ||
47 | A typical out of bounds access report looks like this: | 45 | A typical out of bounds access report looks like this: |
48 | 46 | ||
@@ -119,14 +117,16 @@ Memory state around the buggy address: | |||
119 | ffff8800693bc800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb | 117 | ffff8800693bc800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb |
120 | ================================================================== | 118 | ================================================================== |
121 | 119 | ||
122 | First sections describe slub object where bad access happened. | 120 | The header of the report discribe what kind of bug happened and what kind of |
123 | See 'SLUB Debug output' section in Documentation/vm/slub.txt for details. | 121 | access caused it. It's followed by the description of the accessed slub object |
122 | (see 'SLUB Debug output' section in Documentation/vm/slub.txt for details) and | ||
123 | the description of the accessed memory page. | ||
124 | 124 | ||
125 | In the last section the report shows memory state around the accessed address. | 125 | In the last section the report shows memory state around the accessed address. |
126 | Reading this part requires some more understanding of how KASAN works. | 126 | Reading this part requires some understanding of how KASAN works. |
127 | 127 | ||
128 | Each 8 bytes of memory are encoded in one shadow byte as accessible, | 128 | The state of each 8 aligned bytes of memory is encoded in one shadow byte. |
129 | partially accessible, freed or they can be part of a redzone. | 129 | Those 8 bytes can be accessible, partially accessible, freed or be a redzone. |
130 | We use the following encoding for each shadow byte: 0 means that all 8 bytes | 130 | We use the following encoding for each shadow byte: 0 means that all 8 bytes |
131 | of the corresponding memory region are accessible; number N (1 <= N <= 7) means | 131 | of the corresponding memory region are accessible; number N (1 <= N <= 7) means |
132 | that the first N bytes are accessible, and other (8 - N) bytes are not; | 132 | that the first N bytes are accessible, and other (8 - N) bytes are not; |
@@ -139,7 +139,7 @@ the accessed address is partially accessible. | |||
139 | 139 | ||
140 | 140 | ||
141 | 2. Implementation details | 141 | 2. Implementation details |
142 | ======================== | 142 | ========================= |
143 | 143 | ||
144 | From a high level, our approach to memory error detection is similar to that | 144 | From a high level, our approach to memory error detection is similar to that |
145 | of kmemcheck: use shadow memory to record whether each byte of memory is safe | 145 | of kmemcheck: use shadow memory to record whether each byte of memory is safe |
diff --git a/Documentation/kbuild/Kconfig.recursion-issue-01 b/Documentation/kbuild/Kconfig.recursion-issue-01 new file mode 100644 index 000000000000..e8877db0461f --- /dev/null +++ b/Documentation/kbuild/Kconfig.recursion-issue-01 | |||
@@ -0,0 +1,57 @@ | |||
1 | # Simple Kconfig recursive issue | ||
2 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
3 | # | ||
4 | # Test with: | ||
5 | # | ||
6 | # make KBUILD_KCONFIG=Documentation/kbuild/Kconfig.recursion-issue-01 allnoconfig | ||
7 | # | ||
8 | # This Kconfig file has a simple recursive dependency issue. In order to | ||
9 | # understand why this recursive dependency issue occurs lets consider what | ||
10 | # Kconfig needs to address. We iterate over what Kconfig needs to address | ||
11 | # by stepping through the questions it needs to address sequentially. | ||
12 | # | ||
13 | # * What values are possible for CORE? | ||
14 | # | ||
15 | # CORE_BELL_A_ADVANCED selects CORE, which means that it influences the values | ||
16 | # that are possible for CORE. So for example if CORE_BELL_A_ADVANCED is 'y', | ||
17 | # CORE must be 'y' too. | ||
18 | # | ||
19 | # * What influences CORE_BELL_A_ADVANCED ? | ||
20 | # | ||
21 | # As the name implies CORE_BELL_A_ADVANCED is an advanced feature of | ||
22 | # CORE_BELL_A so naturally it depends on CORE_BELL_A. So if CORE_BELL_A is 'y' | ||
23 | # we know CORE_BELL_A_ADVANCED can be 'y' too. | ||
24 | # | ||
25 | # * What influences CORE_BELL_A ? | ||
26 | # | ||
27 | # CORE_BELL_A depends on CORE, so CORE influences CORE_BELL_A. | ||
28 | # | ||
29 | # But that is a problem, because this means that in order to determine | ||
30 | # what values are possible for CORE we ended up needing to address questions | ||
31 | # regarding possible values of CORE itself again. Answering the original | ||
32 | # question of what are the possible values of CORE would make the kconfig | ||
33 | # tools run in a loop. When this happens Kconfig exits and complains about | ||
34 | # the "recursive dependency detected" error. | ||
35 | # | ||
36 | # Reading the Documentation/kbuild/Kconfig.recursion-issue-01 file it may be | ||
37 | # obvious that an easy to solution to this problem should just be the removal | ||
38 | # of the "select CORE" from CORE_BELL_A_ADVANCED as that is implicit already | ||
39 | # since CORE_BELL_A depends on CORE. Recursive dependency issues are not always | ||
40 | # so trivial to resolve, we provide another example below of practical | ||
41 | # implications of this recursive issue where the solution is perhaps not so | ||
42 | # easy to understand. Note that matching semantics on the dependency on | ||
43 | # CORE also consist of a solution to this recursive problem. | ||
44 | |||
45 | mainmenu "Simple example to demo kconfig recursive dependency issue" | ||
46 | |||
47 | config CORE | ||
48 | tristate | ||
49 | |||
50 | config CORE_BELL_A | ||
51 | tristate | ||
52 | depends on CORE | ||
53 | |||
54 | config CORE_BELL_A_ADVANCED | ||
55 | tristate | ||
56 | depends on CORE_BELL_A | ||
57 | select CORE | ||
diff --git a/Documentation/kbuild/Kconfig.recursion-issue-02 b/Documentation/kbuild/Kconfig.recursion-issue-02 new file mode 100644 index 000000000000..b9fd56c4b57e --- /dev/null +++ b/Documentation/kbuild/Kconfig.recursion-issue-02 | |||
@@ -0,0 +1,63 @@ | |||
1 | # Cumulative Kconfig recursive issue | ||
2 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
3 | # | ||
4 | # Test with: | ||
5 | # | ||
6 | # make KBUILD_KCONFIG=Documentation/kbuild/Kconfig.recursion-issue-02 allnoconfig | ||
7 | # | ||
8 | # The recursive limitations with Kconfig has some non intuitive implications on | ||
9 | # kconfig sematics which are documented here. One known practical implication | ||
10 | # of the recursive limitation is that drivers cannot negate features from other | ||
11 | # drivers if they share a common core requirement and use disjoint semantics to | ||
12 | # annotate those requirements, ie, some drivers use "depends on" while others | ||
13 | # use "select". For instance it means if a driver A and driver B share the same | ||
14 | # core requirement, and one uses "select" while the other uses "depends on" to | ||
15 | # annotate this, all features that driver A selects cannot now be negated by | ||
16 | # driver B. | ||
17 | # | ||
18 | # A perhaps not so obvious implication of this is that, if semantics on these | ||
19 | # core requirements are not carefully synced, as drivers evolve features | ||
20 | # they select or depend on end up becoming shared requirements which cannot be | ||
21 | # negated by other drivers. | ||
22 | # | ||
23 | # The example provided in Documentation/kbuild/Kconfig.recursion-issue-02 | ||
24 | # describes a simple driver core layout of example features a kernel might | ||
25 | # have. Let's assume we have some CORE functionality, then the kernel has a | ||
26 | # series of bells and whistles it desires to implement, its not so advanced so | ||
27 | # it only supports bells at this time: CORE_BELL_A and CORE_BELL_B. If | ||
28 | # CORE_BELL_A has some advanced feature CORE_BELL_A_ADVANCED which selects | ||
29 | # CORE_BELL_A then CORE_BELL_A ends up becoming a common BELL feature which | ||
30 | # other bells in the system cannot negate. The reason for this issue is | ||
31 | # due to the disjoint use of semantics on expressing each bell's relationship | ||
32 | # with CORE, one uses "depends on" while the other uses "select". Another | ||
33 | # more important reason is that kconfig does not check for dependencies listed | ||
34 | # under 'select' for a symbol, when such symbols are selected kconfig them | ||
35 | # as mandatory required symbols. For more details on the heavy handed nature | ||
36 | # of select refer to Documentation/kbuild/Kconfig.select-break | ||
37 | # | ||
38 | # To fix this the "depends on CORE" must be changed to "select CORE", or the | ||
39 | # "select CORE" must be changed to "depends on CORE". | ||
40 | # | ||
41 | # For an example real world scenario issue refer to the attempt to remove | ||
42 | # "select FW_LOADER" [0], in the end the simple alternative solution to this | ||
43 | # problem consisted on matching semantics with newly introduced features. | ||
44 | # | ||
45 | # [0] http://lkml.kernel.org/r/1432241149-8762-1-git-send-email-mcgrof@do-not-panic.com | ||
46 | |||
47 | mainmenu "Simple example to demo cumulative kconfig recursive dependency implication" | ||
48 | |||
49 | config CORE | ||
50 | tristate | ||
51 | |||
52 | config CORE_BELL_A | ||
53 | tristate | ||
54 | depends on CORE | ||
55 | |||
56 | config CORE_BELL_A_ADVANCED | ||
57 | tristate | ||
58 | select CORE_BELL_A | ||
59 | |||
60 | config CORE_BELL_B | ||
61 | tristate | ||
62 | depends on !CORE_BELL_A | ||
63 | select CORE | ||
diff --git a/Documentation/kbuild/Kconfig.select-break b/Documentation/kbuild/Kconfig.select-break new file mode 100644 index 000000000000..365ceb3424b1 --- /dev/null +++ b/Documentation/kbuild/Kconfig.select-break | |||
@@ -0,0 +1,33 @@ | |||
1 | # Select broken dependency issue | ||
2 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
3 | # | ||
4 | # Test with: | ||
5 | # | ||
6 | # make KBUILD_KCONFIG=Documentation/kbuild/Kconfig.select-break menuconfig | ||
7 | # | ||
8 | # kconfig will not complain and enable this layout for configuration. This is | ||
9 | # currently a feature of kconfig, given select was designed to be heavy handed. | ||
10 | # Kconfig currently does not check the list of symbols listed on a symbol's | ||
11 | # "select" list, this is done on purpose to help load a set of known required | ||
12 | # symbols. Because of this use of select should be used with caution. An | ||
13 | # example of this issue is below. | ||
14 | # | ||
15 | # The option B and C are clearly contradicting with respect to A. | ||
16 | # However, when A is set, C can be set as well because Kconfig does not | ||
17 | # visit the dependencies of the select target (in this case B). And since | ||
18 | # Kconfig does not visit the dependencies, it breaks the dependencies of B | ||
19 | # (!A). | ||
20 | |||
21 | mainmenu "Simple example to demo kconfig select broken dependency issue" | ||
22 | |||
23 | config A | ||
24 | bool "CONFIG A" | ||
25 | |||
26 | config B | ||
27 | bool "CONFIG B" | ||
28 | depends on !A | ||
29 | |||
30 | config C | ||
31 | bool "CONFIG C" | ||
32 | depends on A | ||
33 | select B | ||
diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt index 350f733bf2c7..c52856da0cad 100644 --- a/Documentation/kbuild/kconfig-language.txt +++ b/Documentation/kbuild/kconfig-language.txt | |||
@@ -393,3 +393,164 @@ config FOO | |||
393 | depends on BAR && m | 393 | depends on BAR && m |
394 | 394 | ||
395 | limits FOO to module (=m) or disabled (=n). | 395 | limits FOO to module (=m) or disabled (=n). |
396 | |||
397 | Kconfig recursive dependency limitations | ||
398 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
399 | |||
400 | If you've hit the Kconfig error: "recursive dependency detected" you've run | ||
401 | into a recursive dependency issue with Kconfig, a recursive dependency can be | ||
402 | summarized as a circular dependency. The kconfig tools need to ensure that | ||
403 | Kconfig files comply with specified configuration requirements. In order to do | ||
404 | that kconfig must determine the values that are possible for all Kconfig | ||
405 | symbols, this is currently not possible if there is a circular relation | ||
406 | between two or more Kconfig symbols. For more details refer to the "Simple | ||
407 | Kconfig recursive issue" subsection below. Kconfig does not do recursive | ||
408 | dependency resolution; this has a few implications for Kconfig file writers. | ||
409 | We'll first explain why this issues exists and then provide an example | ||
410 | technical limitation which this brings upon Kconfig developers. Eager | ||
411 | developers wishing to try to address this limitation should read the next | ||
412 | subsections. | ||
413 | |||
414 | Simple Kconfig recursive issue | ||
415 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
416 | |||
417 | Read: Documentation/kbuild/Kconfig.recursion-issue-01 | ||
418 | |||
419 | Test with: | ||
420 | |||
421 | make KBUILD_KCONFIG=Documentation/kbuild/Kconfig.recursion-issue-01 allnoconfig | ||
422 | |||
423 | Cumulative Kconfig recursive issue | ||
424 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
425 | |||
426 | Read: Documentation/kbuild/Kconfig.recursion-issue-02 | ||
427 | |||
428 | Test with: | ||
429 | |||
430 | make KBUILD_KCONFIG=Documentation/kbuild/Kconfig.recursion-issue-02 allnoconfig | ||
431 | |||
432 | Practical solutions to kconfig recursive issue | ||
433 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
434 | |||
435 | Developers who run into the recursive Kconfig issue have three options | ||
436 | at their disposal. We document them below and also provide a list of | ||
437 | historical issues resolved through these different solutions. | ||
438 | |||
439 | a) Remove any superfluous "select FOO" or "depends on FOO" | ||
440 | b) Match dependency semantics: | ||
441 | b1) Swap all "select FOO" to "depends on FOO" or, | ||
442 | b2) Swap all "depends on FOO" to "select FOO" | ||
443 | |||
444 | The resolution to a) can be tested with the sample Kconfig file | ||
445 | Documentation/kbuild/Kconfig.recursion-issue-01 through the removal | ||
446 | of the "select CORE" from CORE_BELL_A_ADVANCED as that is implicit already | ||
447 | since CORE_BELL_A depends on CORE. At times it may not be possible to remove | ||
448 | some dependency criteria, for such cases you can work with solution b). | ||
449 | |||
450 | The two different resolutions for b) can be tested in the sample Kconfig file | ||
451 | Documentation/kbuild/Kconfig.recursion-issue-02. | ||
452 | |||
453 | Below is a list of examples of prior fixes for these types of recursive issues; | ||
454 | all errors appear to involve one or more select's and one or more "depends on". | ||
455 | |||
456 | commit fix | ||
457 | ====== === | ||
458 | 06b718c01208 select A -> depends on A | ||
459 | c22eacfe82f9 depends on A -> depends on B | ||
460 | 6a91e854442c select A -> depends on A | ||
461 | 118c565a8f2e select A -> select B | ||
462 | f004e5594705 select A -> depends on A | ||
463 | c7861f37b4c6 depends on A -> (null) | ||
464 | 80c69915e5fb select A -> (null) (1) | ||
465 | c2218e26c0d0 select A -> depends on A (1) | ||
466 | d6ae99d04e1c select A -> depends on A | ||
467 | 95ca19cf8cbf select A -> depends on A | ||
468 | 8f057d7bca54 depends on A -> (null) | ||
469 | 8f057d7bca54 depends on A -> select A | ||
470 | a0701f04846e select A -> depends on A | ||
471 | 0c8b92f7f259 depends on A -> (null) | ||
472 | e4e9e0540928 select A -> depends on A (2) | ||
473 | 7453ea886e87 depends on A > (null) (1) | ||
474 | 7b1fff7e4fdf select A -> depends on A | ||
475 | 86c747d2a4f0 select A -> depends on A | ||
476 | d9f9ab51e55e select A -> depends on A | ||
477 | 0c51a4d8abd6 depends on A -> select A (3) | ||
478 | e98062ed6dc4 select A -> depends on A (3) | ||
479 | 91e5d284a7f1 select A -> (null) | ||
480 | |||
481 | (1) Partial (or no) quote of error. | ||
482 | (2) That seems to be the gist of that fix. | ||
483 | (3) Same error. | ||
484 | |||
485 | Future kconfig work | ||
486 | ~~~~~~~~~~~~~~~~~~~ | ||
487 | |||
488 | Work on kconfig is welcomed on both areas of clarifying semantics and on | ||
489 | evaluating the use of a full SAT solver for it. A full SAT solver can be | ||
490 | desirable to enable more complex dependency mappings and / or queries, | ||
491 | for instance on possible use case for a SAT solver could be that of handling | ||
492 | the current known recursive dependency issues. It is not known if this would | ||
493 | address such issues but such evaluation is desirable. If support for a full SAT | ||
494 | solver proves too complex or that it cannot address recursive dependency issues | ||
495 | Kconfig should have at least clear and well defined semantics which also | ||
496 | addresses and documents limitations or requirements such as the ones dealing | ||
497 | with recursive dependencies. | ||
498 | |||
499 | Further work on both of these areas is welcomed on Kconfig. We elaborate | ||
500 | on both of these in the next two subsections. | ||
501 | |||
502 | Semantics of Kconfig | ||
503 | ~~~~~~~~~~~~~~~~~~~~ | ||
504 | |||
505 | The use of Kconfig is broad, Linux is now only one of Kconfig's users: | ||
506 | one study has completed a broad analysis of Kconfig use in 12 projects [0]. | ||
507 | Despite its widespread use, and although this document does a reasonable job | ||
508 | in documenting basic Kconfig syntax a more precise definition of Kconfig | ||
509 | semantics is welcomed. One project deduced Kconfig semantics through | ||
510 | the use of the xconfig configurator [1]. Work should be done to confirm if | ||
511 | the deduced semantics matches our intended Kconfig design goals. | ||
512 | |||
513 | Having well defined semantics can be useful for tools for practical | ||
514 | evaluation of depenencies, for instance one such use known case was work to | ||
515 | express in boolean abstraction of the inferred semantics of Kconfig to | ||
516 | translate Kconfig logic into boolean formulas and run a SAT solver on this to | ||
517 | find dead code / features (always inactive), 114 dead features were found in | ||
518 | Linux using this methodology [1] (Section 8: Threats to validity). | ||
519 | |||
520 | Confirming this could prove useful as Kconfig stands as one of the the leading | ||
521 | industrial variability modeling languages [1] [2]. Its study would help | ||
522 | evaluate practical uses of such languages, their use was only theoretical | ||
523 | and real world requirements were not well understood. As it stands though | ||
524 | only reverse engineering techniques have been used to deduce semantics from | ||
525 | variability modeling languages such as Kconfig [3]. | ||
526 | |||
527 | [0] http://www.eng.uwaterloo.ca/~shshe/kconfig_semantics.pdf | ||
528 | [1] http://gsd.uwaterloo.ca/sites/default/files/vm-2013-berger.pdf | ||
529 | [2] http://gsd.uwaterloo.ca/sites/default/files/ase241-berger_0.pdf | ||
530 | [3] http://gsd.uwaterloo.ca/sites/default/files/icse2011.pdf | ||
531 | |||
532 | Full SAT solver for Kconfig | ||
533 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
534 | |||
535 | Although SAT solvers [0] haven't yet been used by Kconfig directly, as noted in | ||
536 | the previous subsection, work has been done however to express in boolean | ||
537 | abstraction the inferred semantics of Kconfig to translate Kconfig logic into | ||
538 | boolean formulas and run a SAT solver on it [1]. Another known related project | ||
539 | is CADOS [2] (former VAMOS [3]) and the tools, mainly undertaker [4], which has | ||
540 | been introduced first with [5]. The basic concept of undertaker is to exract | ||
541 | variability models from Kconfig, and put them together with a propositional | ||
542 | formula extracted from CPP #ifdefs and build-rules into a SAT solver in order | ||
543 | to find dead code, dead files, and dead symbols. If using a SAT solver is | ||
544 | desirable on Kconfig one approach would be to evaluate repurposing such efforts | ||
545 | somehow on Kconfig. There is enough interest from mentors of existing projects | ||
546 | to not only help advise how to integrate this work upstream but also help | ||
547 | maintain it long term. Interested developers should visit: | ||
548 | |||
549 | http://kernelnewbies.org/KernelProjects/kconfig-sat | ||
550 | |||
551 | [0] http://www.cs.cornell.edu/~sabhar/chapters/SATSolvers-KR-Handbook.pdf | ||
552 | [1] http://gsd.uwaterloo.ca/sites/default/files/vm-2013-berger.pdf | ||
553 | [2] https://cados.cs.fau.de | ||
554 | [3] https://vamos.cs.fau.de | ||
555 | [4] https://undertaker.cs.fau.de | ||
556 | [5] https://www4.cs.fau.de/Publications/2011/tartler_11_eurosys.pdf | ||
diff --git a/Documentation/kernel-docs.txt b/Documentation/kernel-docs.txt index eda1eb1451a0..08913361e054 100644 --- a/Documentation/kernel-docs.txt +++ b/Documentation/kernel-docs.txt | |||
@@ -696,18 +696,18 @@ | |||
696 | Memory related patches, HOWTOs, links, mm developers... Don't miss | 696 | Memory related patches, HOWTOs, links, mm developers... Don't miss |
697 | it if you are interested in memory management development! | 697 | it if you are interested in memory management development! |
698 | 698 | ||
699 | * Name: "Kernel Newbies IRC Channel" | 699 | * Name: "Kernel Newbies IRC Channel and Website" |
700 | URL: http://www.kernelnewbies.org | 700 | URL: http://www.kernelnewbies.org |
701 | Keywords: IRC, newbies, channel, asking doubts. | 701 | Keywords: IRC, newbies, channel, asking doubts. |
702 | Description: #kernelnewbies on irc.openprojects.net. From the web | 702 | Description: #kernelnewbies on irc.oftc.net. |
703 | page: "#kernelnewbies is an IRC network dedicated to the 'newbie' | 703 | #kernelnewbies is an IRC network dedicated to the 'newbie' |
704 | kernel hacker. The audience mostly consists of people who are | 704 | kernel hacker. The audience mostly consists of people who are |
705 | learning about the kernel, working on kernel projects or | 705 | learning about the kernel, working on kernel projects or |
706 | professional kernel hackers that want to help less seasoned kernel | 706 | professional kernel hackers that want to help less seasoned kernel |
707 | people. [...] #kernelnewbies is on the Open Projects IRC Network, | 707 | people. |
708 | try irc.openprojects.net or irc.<country>.openprojects.net as your | 708 | #kernelnewbies is on the OFTC IRC Network. |
709 | server and then /join #kernelnewbies". It also hosts articles, | 709 | Try irc.oftc.net as your server and then /join #kernelnewbies. |
710 | documents, FAQs... | 710 | The kernelnewbies website also hosts articles, documents, FAQs... |
711 | 711 | ||
712 | * Name: "linux-kernel mailing list archives and search engines" | 712 | * Name: "linux-kernel mailing list archives and search engines" |
713 | URL: http://vger.kernel.org/vger-lists.html | 713 | URL: http://vger.kernel.org/vger-lists.html |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 22a4b687ea5b..f8aae632f02f 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -167,7 +167,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
167 | 167 | ||
168 | acpi= [HW,ACPI,X86,ARM64] | 168 | acpi= [HW,ACPI,X86,ARM64] |
169 | Advanced Configuration and Power Interface | 169 | Advanced Configuration and Power Interface |
170 | Format: { force | off | strict | noirq | rsdt } | 170 | Format: { force | off | strict | noirq | rsdt | |
171 | copy_dsdt } | ||
171 | force -- enable ACPI if default was off | 172 | force -- enable ACPI if default was off |
172 | off -- disable ACPI if default was on | 173 | off -- disable ACPI if default was on |
173 | noirq -- do not use ACPI for IRQ routing | 174 | noirq -- do not use ACPI for IRQ routing |
@@ -789,8 +790,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
789 | is passed, kernel could allocate physical memory region | 790 | is passed, kernel could allocate physical memory region |
790 | above 4G, that cause second kernel crash on system | 791 | above 4G, that cause second kernel crash on system |
791 | that require some amount of low memory, e.g. swiotlb | 792 | that require some amount of low memory, e.g. swiotlb |
792 | requires at least 64M+32K low memory. Kernel would | 793 | requires at least 64M+32K low memory, also enough extra |
793 | try to allocate 72M below 4G automatically. | 794 | low memory is needed to make sure DMA buffers for 32-bit |
795 | devices won't run out. Kernel would try to allocate at | ||
796 | at least 256M below 4G automatically. | ||
794 | This one let user to specify own low range under 4G | 797 | This one let user to specify own low range under 4G |
795 | for second kernel instead. | 798 | for second kernel instead. |
796 | 0: to disable low allocation. | 799 | 0: to disable low allocation. |
@@ -929,11 +932,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
929 | The filter can be disabled or changed to another | 932 | The filter can be disabled or changed to another |
930 | driver later using sysfs. | 933 | driver later using sysfs. |
931 | 934 | ||
932 | drm_kms_helper.edid_firmware=[<connector>:]<file> | 935 | drm_kms_helper.edid_firmware=[<connector>:]<file>[,[<connector>:]<file>] |
933 | Broken monitors, graphic adapters and KVMs may | 936 | Broken monitors, graphic adapters, KVMs and EDIDless |
934 | send no or incorrect EDID data sets. This parameter | 937 | panels may send no or incorrect EDID data sets. |
935 | allows to specify an EDID data set in the | 938 | This parameter allows to specify an EDID data sets |
936 | /lib/firmware directory that is used instead. | 939 | in the /lib/firmware directory that are used instead. |
937 | Generic built-in EDID data sets are used, if one of | 940 | Generic built-in EDID data sets are used, if one of |
938 | edid/1024x768.bin, edid/1280x1024.bin, | 941 | edid/1024x768.bin, edid/1280x1024.bin, |
939 | edid/1680x1050.bin, or edid/1920x1080.bin is given | 942 | edid/1680x1050.bin, or edid/1920x1080.bin is given |
@@ -942,7 +945,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
942 | available in Documentation/EDID/HOWTO.txt. An EDID | 945 | available in Documentation/EDID/HOWTO.txt. An EDID |
943 | data set will only be used for a particular connector, | 946 | data set will only be used for a particular connector, |
944 | if its name and a colon are prepended to the EDID | 947 | if its name and a colon are prepended to the EDID |
945 | name. | 948 | name. Each connector may use a unique EDID data |
949 | set by separating the files with a comma. An EDID | ||
950 | data set with no connector name will be used for | ||
951 | any connectors not explicitly specified. | ||
946 | 952 | ||
947 | dscc4.setup= [NET] | 953 | dscc4.setup= [NET] |
948 | 954 | ||
@@ -971,6 +977,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
971 | 977 | ||
972 | earlycon= [KNL] Output early console device and options. | 978 | earlycon= [KNL] Output early console device and options. |
973 | 979 | ||
980 | When used with no options, the early console is | ||
981 | determined by the stdout-path property in device | ||
982 | tree's chosen node. | ||
983 | |||
974 | cdns,<addr> | 984 | cdns,<addr> |
975 | Start an early, polled-mode console on a cadence serial | 985 | Start an early, polled-mode console on a cadence serial |
976 | port at the specified address. The cadence serial port | 986 | port at the specified address. The cadence serial port |
@@ -1023,6 +1033,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1023 | serial port must already be setup and configured. | 1033 | serial port must already be setup and configured. |
1024 | Options are not yet supported. | 1034 | Options are not yet supported. |
1025 | 1035 | ||
1036 | lpuart,<addr> | ||
1037 | lpuart32,<addr> | ||
1038 | Use early console provided by Freescale LP UART driver | ||
1039 | found on Freescale Vybrid and QorIQ LS1021A processors. | ||
1040 | A valid base address must be provided, and the serial | ||
1041 | port must already be setup and configured. | ||
1042 | |||
1026 | earlyprintk= [X86,SH,BLACKFIN,ARM,M68k] | 1043 | earlyprintk= [X86,SH,BLACKFIN,ARM,M68k] |
1027 | earlyprintk=vga | 1044 | earlyprintk=vga |
1028 | earlyprintk=efi | 1045 | earlyprintk=efi |
@@ -1094,6 +1111,21 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1094 | you are really sure that your UEFI does sane gc and | 1111 | you are really sure that your UEFI does sane gc and |
1095 | fulfills the spec otherwise your board may brick. | 1112 | fulfills the spec otherwise your board may brick. |
1096 | 1113 | ||
1114 | efi_fake_mem= nn[KMG]@ss[KMG]:aa[,nn[KMG]@ss[KMG]:aa,..] [EFI; X86] | ||
1115 | Add arbitrary attribute to specific memory range by | ||
1116 | updating original EFI memory map. | ||
1117 | Region of memory which aa attribute is added to is | ||
1118 | from ss to ss+nn. | ||
1119 | If efi_fake_mem=2G@4G:0x10000,2G@0x10a0000000:0x10000 | ||
1120 | is specified, EFI_MEMORY_MORE_RELIABLE(0x10000) | ||
1121 | attribute is added to range 0x100000000-0x180000000 and | ||
1122 | 0x10a0000000-0x1120000000. | ||
1123 | |||
1124 | Using this parameter you can do debugging of EFI memmap | ||
1125 | related feature. For example, you can do debugging of | ||
1126 | Address Range Mirroring feature even if your box | ||
1127 | doesn't support it. | ||
1128 | |||
1097 | eisa_irq_edge= [PARISC,HW] | 1129 | eisa_irq_edge= [PARISC,HW] |
1098 | See header of drivers/parisc/eisa.c. | 1130 | See header of drivers/parisc/eisa.c. |
1099 | 1131 | ||
@@ -1246,6 +1278,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1246 | Format: <unsigned int> such that (rxsize & ~0x1fffc0) == 0. | 1278 | Format: <unsigned int> such that (rxsize & ~0x1fffc0) == 0. |
1247 | Default: 1024 | 1279 | Default: 1024 |
1248 | 1280 | ||
1281 | hardlockup_all_cpu_backtrace= | ||
1282 | [KNL] Should the hard-lockup detector generate | ||
1283 | backtraces on all cpus. | ||
1284 | Format: <integer> | ||
1285 | |||
1249 | hashdist= [KNL,NUMA] Large hashes allocated during boot | 1286 | hashdist= [KNL,NUMA] Large hashes allocated during boot |
1250 | are distributed across NUMA nodes. Defaults on | 1287 | are distributed across NUMA nodes. Defaults on |
1251 | for 64-bit NUMA, off otherwise. | 1288 | for 64-bit NUMA, off otherwise. |
@@ -1546,6 +1583,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1546 | hwp_only | 1583 | hwp_only |
1547 | Only load intel_pstate on systems which support | 1584 | Only load intel_pstate on systems which support |
1548 | hardware P state control (HWP) if available. | 1585 | hardware P state control (HWP) if available. |
1586 | no_acpi | ||
1587 | Don't use ACPI processor performance control objects | ||
1588 | _PSS and _PPC specified limits. | ||
1549 | 1589 | ||
1550 | intremap= [X86-64, Intel-IOMMU] | 1590 | intremap= [X86-64, Intel-IOMMU] |
1551 | on enable Interrupt Remapping (default) | 1591 | on enable Interrupt Remapping (default) |
@@ -1553,6 +1593,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1553 | nosid disable Source ID checking | 1593 | nosid disable Source ID checking |
1554 | no_x2apic_optout | 1594 | no_x2apic_optout |
1555 | BIOS x2APIC opt-out request will be ignored | 1595 | BIOS x2APIC opt-out request will be ignored |
1596 | nopost disable Interrupt Posting | ||
1556 | 1597 | ||
1557 | iomem= Disable strict checking of access to MMIO memory | 1598 | iomem= Disable strict checking of access to MMIO memory |
1558 | strict regions from userspace. | 1599 | strict regions from userspace. |
@@ -2314,11 +2355,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2314 | nmi_watchdog= [KNL,BUGS=X86] Debugging features for SMP kernels | 2355 | nmi_watchdog= [KNL,BUGS=X86] Debugging features for SMP kernels |
2315 | Format: [panic,][nopanic,][num] | 2356 | Format: [panic,][nopanic,][num] |
2316 | Valid num: 0 or 1 | 2357 | Valid num: 0 or 1 |
2317 | 0 - turn nmi_watchdog off | 2358 | 0 - turn hardlockup detector in nmi_watchdog off |
2318 | 1 - turn nmi_watchdog on | 2359 | 1 - turn hardlockup detector in nmi_watchdog on |
2319 | When panic is specified, panic when an NMI watchdog | 2360 | When panic is specified, panic when an NMI watchdog |
2320 | timeout occurs (or 'nopanic' to override the opposite | 2361 | timeout occurs (or 'nopanic' to override the opposite |
2321 | default). | 2362 | default). To disable both hard and soft lockup detectors, |
2363 | please see 'nowatchdog'. | ||
2322 | This is useful when you use a panic=... timeout and | 2364 | This is useful when you use a panic=... timeout and |
2323 | need the box quickly up again. | 2365 | need the box quickly up again. |
2324 | 2366 | ||
@@ -3074,9 +3116,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
3074 | cache-to-cache transfer latencies. | 3116 | cache-to-cache transfer latencies. |
3075 | 3117 | ||
3076 | rcutree.rcu_fanout_leaf= [KNL] | 3118 | rcutree.rcu_fanout_leaf= [KNL] |
3077 | Increase the number of CPUs assigned to each | 3119 | Change the number of CPUs assigned to each |
3078 | leaf rcu_node structure. Useful for very large | 3120 | leaf rcu_node structure. Useful for very |
3079 | systems. | 3121 | large systems, which will choose the value 64, |
3122 | and for NUMA systems with large remote-access | ||
3123 | latencies, which will choose a value aligned | ||
3124 | with the appropriate hardware boundaries. | ||
3080 | 3125 | ||
3081 | rcutree.jiffies_till_sched_qs= [KNL] | 3126 | rcutree.jiffies_till_sched_qs= [KNL] |
3082 | Set required age in jiffies for a | 3127 | Set required age in jiffies for a |
diff --git a/Documentation/kselftest.txt b/Documentation/kselftest.txt index a87d840bacfe..9bbbcdc598d9 100644 --- a/Documentation/kselftest.txt +++ b/Documentation/kselftest.txt | |||
@@ -54,6 +54,22 @@ To run the hotplug tests: | |||
54 | - note that some tests will require root privileges. | 54 | - note that some tests will require root privileges. |
55 | 55 | ||
56 | 56 | ||
57 | Install selftests | ||
58 | ================= | ||
59 | |||
60 | You can use kselftest_install.sh tool installs selftests in default | ||
61 | location which is tools/testing/selftests/kselftest or an user specified | ||
62 | location. | ||
63 | |||
64 | To install selftests in default location: | ||
65 | $ cd tools/testing/selftests | ||
66 | $ ./kselftest_install.sh | ||
67 | |||
68 | To install selftests in an user specified location: | ||
69 | $ cd tools/testing/selftests | ||
70 | $ ./kselftest_install.sh install_dir | ||
71 | |||
72 | |||
57 | Contributing new tests | 73 | Contributing new tests |
58 | ====================== | 74 | ====================== |
59 | 75 | ||
diff --git a/Documentation/locking/lockstat.txt b/Documentation/locking/lockstat.txt index 568bbbacee91..5786ad2cd5e6 100644 --- a/Documentation/locking/lockstat.txt +++ b/Documentation/locking/lockstat.txt | |||
@@ -12,7 +12,7 @@ Because things like lock contention can severely impact performance. | |||
12 | - HOW | 12 | - HOW |
13 | 13 | ||
14 | Lockdep already has hooks in the lock functions and maps lock instances to | 14 | Lockdep already has hooks in the lock functions and maps lock instances to |
15 | lock classes. We build on that (see Documentation/lokcing/lockdep-design.txt). | 15 | lock classes. We build on that (see Documentation/locking/lockdep-design.txt). |
16 | The graph below shows the relation between the lock functions and the various | 16 | The graph below shows the relation between the lock functions and the various |
17 | hooks therein. | 17 | hooks therein. |
18 | 18 | ||
diff --git a/Documentation/locking/locktorture.txt b/Documentation/locking/locktorture.txt index 619f2bb136a5..a2ef3a929bf1 100644 --- a/Documentation/locking/locktorture.txt +++ b/Documentation/locking/locktorture.txt | |||
@@ -52,6 +52,9 @@ torture_type Type of lock to torture. By default, only spinlocks will | |||
52 | 52 | ||
53 | o "mutex_lock": mutex_lock() and mutex_unlock() pairs. | 53 | o "mutex_lock": mutex_lock() and mutex_unlock() pairs. |
54 | 54 | ||
55 | o "rtmutex_lock": rtmutex_lock() and rtmutex_unlock() | ||
56 | pairs. Kernel must have CONFIG_RT_MUTEX=y. | ||
57 | |||
55 | o "rwsem_lock": read/write down() and up() semaphore pairs. | 58 | o "rwsem_lock": read/write down() and up() semaphore pairs. |
56 | 59 | ||
57 | torture_runnable Start locktorture at boot time in the case where the | 60 | torture_runnable Start locktorture at boot time in the case where the |
diff --git a/Documentation/lockup-watchdogs.txt b/Documentation/lockup-watchdogs.txt index 22dd6af2e4bd..4a6e33e1af61 100644 --- a/Documentation/lockup-watchdogs.txt +++ b/Documentation/lockup-watchdogs.txt | |||
@@ -20,8 +20,9 @@ kernel mode for more than 10 seconds (see "Implementation" below for | |||
20 | details), without letting other interrupts have a chance to run. | 20 | details), without letting other interrupts have a chance to run. |
21 | Similarly to the softlockup case, the current stack trace is displayed | 21 | Similarly to the softlockup case, the current stack trace is displayed |
22 | upon detection and the system will stay locked up unless the default | 22 | upon detection and the system will stay locked up unless the default |
23 | behavior is changed, which can be done through a compile time knob, | 23 | behavior is changed, which can be done through a sysctl, |
24 | "BOOTPARAM_HARDLOCKUP_PANIC", and a kernel parameter, "nmi_watchdog" | 24 | 'hardlockup_panic', a compile time knob, "BOOTPARAM_HARDLOCKUP_PANIC", |
25 | and a kernel parameter, "nmi_watchdog" | ||
25 | (see "Documentation/kernel-parameters.txt" for details). | 26 | (see "Documentation/kernel-parameters.txt" for details). |
26 | 27 | ||
27 | The panic option can be used in combination with panic_timeout (this | 28 | The panic option can be used in combination with panic_timeout (this |
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt index 2ba8461b0631..aef9487303d0 100644 --- a/Documentation/memory-barriers.txt +++ b/Documentation/memory-barriers.txt | |||
@@ -617,16 +617,16 @@ case what's actually required is: | |||
617 | However, stores are not speculated. This means that ordering -is- provided | 617 | However, stores are not speculated. This means that ordering -is- provided |
618 | for load-store control dependencies, as in the following example: | 618 | for load-store control dependencies, as in the following example: |
619 | 619 | ||
620 | q = READ_ONCE_CTRL(a); | 620 | q = READ_ONCE(a); |
621 | if (q) { | 621 | if (q) { |
622 | WRITE_ONCE(b, p); | 622 | WRITE_ONCE(b, p); |
623 | } | 623 | } |
624 | 624 | ||
625 | Control dependencies pair normally with other types of barriers. That | 625 | Control dependencies pair normally with other types of barriers. That |
626 | said, please note that READ_ONCE_CTRL() is not optional! Without the | 626 | said, please note that READ_ONCE() is not optional! Without the |
627 | READ_ONCE_CTRL(), the compiler might combine the load from 'a' with | 627 | READ_ONCE(), the compiler might combine the load from 'a' with other |
628 | other loads from 'a', and the store to 'b' with other stores to 'b', | 628 | loads from 'a', and the store to 'b' with other stores to 'b', with |
629 | with possible highly counterintuitive effects on ordering. | 629 | possible highly counterintuitive effects on ordering. |
630 | 630 | ||
631 | Worse yet, if the compiler is able to prove (say) that the value of | 631 | Worse yet, if the compiler is able to prove (say) that the value of |
632 | variable 'a' is always non-zero, it would be well within its rights | 632 | variable 'a' is always non-zero, it would be well within its rights |
@@ -636,15 +636,12 @@ as follows: | |||
636 | q = a; | 636 | q = a; |
637 | b = p; /* BUG: Compiler and CPU can both reorder!!! */ | 637 | b = p; /* BUG: Compiler and CPU can both reorder!!! */ |
638 | 638 | ||
639 | Finally, the READ_ONCE_CTRL() includes an smp_read_barrier_depends() | 639 | So don't leave out the READ_ONCE(). |
640 | that DEC Alpha needs in order to respect control depedencies. | ||
641 | |||
642 | So don't leave out the READ_ONCE_CTRL(). | ||
643 | 640 | ||
644 | It is tempting to try to enforce ordering on identical stores on both | 641 | It is tempting to try to enforce ordering on identical stores on both |
645 | branches of the "if" statement as follows: | 642 | branches of the "if" statement as follows: |
646 | 643 | ||
647 | q = READ_ONCE_CTRL(a); | 644 | q = READ_ONCE(a); |
648 | if (q) { | 645 | if (q) { |
649 | barrier(); | 646 | barrier(); |
650 | WRITE_ONCE(b, p); | 647 | WRITE_ONCE(b, p); |
@@ -658,7 +655,7 @@ branches of the "if" statement as follows: | |||
658 | Unfortunately, current compilers will transform this as follows at high | 655 | Unfortunately, current compilers will transform this as follows at high |
659 | optimization levels: | 656 | optimization levels: |
660 | 657 | ||
661 | q = READ_ONCE_CTRL(a); | 658 | q = READ_ONCE(a); |
662 | barrier(); | 659 | barrier(); |
663 | WRITE_ONCE(b, p); /* BUG: No ordering vs. load from a!!! */ | 660 | WRITE_ONCE(b, p); /* BUG: No ordering vs. load from a!!! */ |
664 | if (q) { | 661 | if (q) { |
@@ -688,7 +685,7 @@ memory barriers, for example, smp_store_release(): | |||
688 | In contrast, without explicit memory barriers, two-legged-if control | 685 | In contrast, without explicit memory barriers, two-legged-if control |
689 | ordering is guaranteed only when the stores differ, for example: | 686 | ordering is guaranteed only when the stores differ, for example: |
690 | 687 | ||
691 | q = READ_ONCE_CTRL(a); | 688 | q = READ_ONCE(a); |
692 | if (q) { | 689 | if (q) { |
693 | WRITE_ONCE(b, p); | 690 | WRITE_ONCE(b, p); |
694 | do_something(); | 691 | do_something(); |
@@ -697,14 +694,14 @@ ordering is guaranteed only when the stores differ, for example: | |||
697 | do_something_else(); | 694 | do_something_else(); |
698 | } | 695 | } |
699 | 696 | ||
700 | The initial READ_ONCE_CTRL() is still required to prevent the compiler | 697 | The initial READ_ONCE() is still required to prevent the compiler from |
701 | from proving the value of 'a'. | 698 | proving the value of 'a'. |
702 | 699 | ||
703 | In addition, you need to be careful what you do with the local variable 'q', | 700 | In addition, you need to be careful what you do with the local variable 'q', |
704 | otherwise the compiler might be able to guess the value and again remove | 701 | otherwise the compiler might be able to guess the value and again remove |
705 | the needed conditional. For example: | 702 | the needed conditional. For example: |
706 | 703 | ||
707 | q = READ_ONCE_CTRL(a); | 704 | q = READ_ONCE(a); |
708 | if (q % MAX) { | 705 | if (q % MAX) { |
709 | WRITE_ONCE(b, p); | 706 | WRITE_ONCE(b, p); |
710 | do_something(); | 707 | do_something(); |
@@ -717,7 +714,7 @@ If MAX is defined to be 1, then the compiler knows that (q % MAX) is | |||
717 | equal to zero, in which case the compiler is within its rights to | 714 | equal to zero, in which case the compiler is within its rights to |
718 | transform the above code into the following: | 715 | transform the above code into the following: |
719 | 716 | ||
720 | q = READ_ONCE_CTRL(a); | 717 | q = READ_ONCE(a); |
721 | WRITE_ONCE(b, p); | 718 | WRITE_ONCE(b, p); |
722 | do_something_else(); | 719 | do_something_else(); |
723 | 720 | ||
@@ -728,7 +725,7 @@ is gone, and the barrier won't bring it back. Therefore, if you are | |||
728 | relying on this ordering, you should make sure that MAX is greater than | 725 | relying on this ordering, you should make sure that MAX is greater than |
729 | one, perhaps as follows: | 726 | one, perhaps as follows: |
730 | 727 | ||
731 | q = READ_ONCE_CTRL(a); | 728 | q = READ_ONCE(a); |
732 | BUILD_BUG_ON(MAX <= 1); /* Order load from a with store to b. */ | 729 | BUILD_BUG_ON(MAX <= 1); /* Order load from a with store to b. */ |
733 | if (q % MAX) { | 730 | if (q % MAX) { |
734 | WRITE_ONCE(b, p); | 731 | WRITE_ONCE(b, p); |
@@ -745,7 +742,7 @@ of the 'if' statement. | |||
745 | You must also be careful not to rely too much on boolean short-circuit | 742 | You must also be careful not to rely too much on boolean short-circuit |
746 | evaluation. Consider this example: | 743 | evaluation. Consider this example: |
747 | 744 | ||
748 | q = READ_ONCE_CTRL(a); | 745 | q = READ_ONCE(a); |
749 | if (q || 1 > 0) | 746 | if (q || 1 > 0) |
750 | WRITE_ONCE(b, 1); | 747 | WRITE_ONCE(b, 1); |
751 | 748 | ||
@@ -753,7 +750,7 @@ Because the first condition cannot fault and the second condition is | |||
753 | always true, the compiler can transform this example as following, | 750 | always true, the compiler can transform this example as following, |
754 | defeating control dependency: | 751 | defeating control dependency: |
755 | 752 | ||
756 | q = READ_ONCE_CTRL(a); | 753 | q = READ_ONCE(a); |
757 | WRITE_ONCE(b, 1); | 754 | WRITE_ONCE(b, 1); |
758 | 755 | ||
759 | This example underscores the need to ensure that the compiler cannot | 756 | This example underscores the need to ensure that the compiler cannot |
@@ -767,7 +764,7 @@ x and y both being zero: | |||
767 | 764 | ||
768 | CPU 0 CPU 1 | 765 | CPU 0 CPU 1 |
769 | ======================= ======================= | 766 | ======================= ======================= |
770 | r1 = READ_ONCE_CTRL(x); r2 = READ_ONCE_CTRL(y); | 767 | r1 = READ_ONCE(x); r2 = READ_ONCE(y); |
771 | if (r1 > 0) if (r2 > 0) | 768 | if (r1 > 0) if (r2 > 0) |
772 | WRITE_ONCE(y, 1); WRITE_ONCE(x, 1); | 769 | WRITE_ONCE(y, 1); WRITE_ONCE(x, 1); |
773 | 770 | ||
@@ -796,11 +793,6 @@ site: https://www.cl.cam.ac.uk/~pes20/ppcmem/index.html. | |||
796 | 793 | ||
797 | In summary: | 794 | In summary: |
798 | 795 | ||
799 | (*) Control dependencies must be headed by READ_ONCE_CTRL(). | ||
800 | Or, as a much less preferable alternative, interpose | ||
801 | smp_read_barrier_depends() between a READ_ONCE() and the | ||
802 | control-dependent write. | ||
803 | |||
804 | (*) Control dependencies can order prior loads against later stores. | 796 | (*) Control dependencies can order prior loads against later stores. |
805 | However, they do -not- guarantee any other sort of ordering: | 797 | However, they do -not- guarantee any other sort of ordering: |
806 | Not prior loads against later loads, nor prior stores against | 798 | Not prior loads against later loads, nor prior stores against |
@@ -816,14 +808,13 @@ In summary: | |||
816 | between the prior load and the subsequent store, and this | 808 | between the prior load and the subsequent store, and this |
817 | conditional must involve the prior load. If the compiler is able | 809 | conditional must involve the prior load. If the compiler is able |
818 | to optimize the conditional away, it will have also optimized | 810 | to optimize the conditional away, it will have also optimized |
819 | away the ordering. Careful use of READ_ONCE_CTRL() READ_ONCE(), | 811 | away the ordering. Careful use of READ_ONCE() and WRITE_ONCE() |
820 | and WRITE_ONCE() can help to preserve the needed conditional. | 812 | can help to preserve the needed conditional. |
821 | 813 | ||
822 | (*) Control dependencies require that the compiler avoid reordering the | 814 | (*) Control dependencies require that the compiler avoid reordering the |
823 | dependency into nonexistence. Careful use of READ_ONCE_CTRL() | 815 | dependency into nonexistence. Careful use of READ_ONCE() or |
824 | or smp_read_barrier_depends() can help to preserve your control | 816 | atomic{,64}_read() can help to preserve your control dependency. |
825 | dependency. Please see the Compiler Barrier section for more | 817 | Please see the Compiler Barrier section for more information. |
826 | information. | ||
827 | 818 | ||
828 | (*) Control dependencies pair normally with other types of barriers. | 819 | (*) Control dependencies pair normally with other types of barriers. |
829 | 820 | ||
@@ -1710,6 +1701,17 @@ There are some more advanced barrier functions: | |||
1710 | operations" subsection for information on where to use these. | 1701 | operations" subsection for information on where to use these. |
1711 | 1702 | ||
1712 | 1703 | ||
1704 | (*) lockless_dereference(); | ||
1705 | This can be thought of as a pointer-fetch wrapper around the | ||
1706 | smp_read_barrier_depends() data-dependency barrier. | ||
1707 | |||
1708 | This is also similar to rcu_dereference(), but in cases where | ||
1709 | object lifetime is handled by some mechanism other than RCU, for | ||
1710 | example, when the objects removed only when the system goes down. | ||
1711 | In addition, lockless_dereference() is used in some data structures | ||
1712 | that can be used both with and without RCU. | ||
1713 | |||
1714 | |||
1713 | (*) dma_wmb(); | 1715 | (*) dma_wmb(); |
1714 | (*) dma_rmb(); | 1716 | (*) dma_rmb(); |
1715 | 1717 | ||
@@ -1789,7 +1791,6 @@ The Linux kernel has a number of locking constructs: | |||
1789 | (*) mutexes | 1791 | (*) mutexes |
1790 | (*) semaphores | 1792 | (*) semaphores |
1791 | (*) R/W semaphores | 1793 | (*) R/W semaphores |
1792 | (*) RCU | ||
1793 | 1794 | ||
1794 | In all cases there are variants on "ACQUIRE" operations and "RELEASE" operations | 1795 | In all cases there are variants on "ACQUIRE" operations and "RELEASE" operations |
1795 | for each construct. These operations all imply certain barriers: | 1796 | for each construct. These operations all imply certain barriers: |
diff --git a/Documentation/mic/mic_overview.txt b/Documentation/mic/mic_overview.txt index 1a2f2c8ec59e..73f44fc3e715 100644 --- a/Documentation/mic/mic_overview.txt +++ b/Documentation/mic/mic_overview.txt | |||
@@ -28,6 +28,10 @@ The Symmetric Communication Interface (SCIF (pronounced as skiff)) is a | |||
28 | low level communications API across PCIe currently implemented for MIC. | 28 | low level communications API across PCIe currently implemented for MIC. |
29 | More details are available at scif_overview.txt. | 29 | More details are available at scif_overview.txt. |
30 | 30 | ||
31 | The Coprocessor State Management (COSM) driver on the host allows for | ||
32 | boot, shutdown and reset of Intel MIC devices. It communicates with a COSM | ||
33 | "client" driver on the MIC cards over SCIF to perform these functions. | ||
34 | |||
31 | Here is a block diagram of the various components described above. The | 35 | Here is a block diagram of the various components described above. The |
32 | virtio backends are situated on the host rather than the card given better | 36 | virtio backends are situated on the host rather than the card given better |
33 | single threaded performance for the host compared to MIC, the ability of | 37 | single threaded performance for the host compared to MIC, the ability of |
@@ -51,19 +55,20 @@ the fact that the virtio block storage backend can only be on the host. | |||
51 | | | | Virtio over PCIe IOCTLs | | 55 | | | | Virtio over PCIe IOCTLs | |
52 | | | +--------------------------+ | 56 | | | +--------------------------+ |
53 | +-----------+ | | | +-----------+ | 57 | +-----------+ | | | +-----------+ |
54 | | MIC DMA | | +----------+ | +-----------+ | | MIC DMA | | 58 | | MIC DMA | | +------+ | +------+ +------+ | | MIC DMA | |
55 | | Driver | | | SCIF | | | SCIF | | | Driver | | 59 | | Driver | | | SCIF | | | SCIF | | COSM | | | Driver | |
56 | +-----------+ | +----------+ | +-----------+ | +-----------+ | 60 | +-----------+ | +------+ | +------+ +--+---+ | +-----------+ |
57 | | | | | | | | | 61 | | | | | | | | | |
58 | +---------------+ | +-----+-----+ | +-----+-----+ | +---------------+ | 62 | +---------------+ | +------+ | +--+---+ +--+---+ | +----------------+ |
59 | |MIC virtual Bus| | |SCIF HW Bus| | |SCIF HW BUS| | |MIC virtual Bus| | 63 | |MIC virtual Bus| | |SCIF | | |SCIF | | COSM | | |MIC virtual Bus | |
60 | +---------------+ | +-----------+ | +-----+-----+ | +---------------+ | 64 | +---------------+ | |HW Bus| | |HW Bus| | Bus | | +----------------+ |
61 | | | | | | | | | 65 | | | +------+ | +--+---+ +------+ | | |
62 | | +--------------+ | | | +---------------+ | | 66 | | | | | | | | | |
63 | | |Intel MIC | | | | |Intel MIC | | | 67 | | +-----------+---+ | | | +---------------+ | |
64 | +---|Card Driver +----+ | | |Host Driver | | | 68 | | |Intel MIC | | | | |Intel MIC | | |
65 | +--------------+ | +----+---------------+-----+ | 69 | +---|Card Driver | | | | |Host Driver | | |
66 | | | | | 70 | +------------+--------+ | +----+---------------+-----+ |
71 | | | | | ||
67 | +-------------------------------------------------------------+ | 72 | +-------------------------------------------------------------+ |
68 | | | | 73 | | | |
69 | | PCIe Bus | | 74 | | PCIe Bus | |
diff --git a/Documentation/mic/mpssd/mpss b/Documentation/mic/mpssd/mpss index 582aad4811ae..09ea90931649 100755 --- a/Documentation/mic/mpssd/mpss +++ b/Documentation/mic/mpssd/mpss | |||
@@ -119,10 +119,10 @@ stop() | |||
119 | # Wait for the cards to go offline | 119 | # Wait for the cards to go offline |
120 | for f in $sysfs/* | 120 | for f in $sysfs/* |
121 | do | 121 | do |
122 | while [ "`cat $f/state`" != "offline" ] | 122 | while [ "`cat $f/state`" != "ready" ] |
123 | do | 123 | do |
124 | sleep 1 | 124 | sleep 1 |
125 | echo -e "Waiting for "`basename $f`" to go offline" | 125 | echo -e "Waiting for "`basename $f`" to become ready" |
126 | done | 126 | done |
127 | done | 127 | done |
128 | 128 | ||
diff --git a/Documentation/mic/mpssd/mpssd.c b/Documentation/mic/mpssd/mpssd.c index 3c5c379fc29d..aaeafa18d99b 100644 --- a/Documentation/mic/mpssd/mpssd.c +++ b/Documentation/mic/mpssd/mpssd.c | |||
@@ -43,7 +43,7 @@ | |||
43 | #include <linux/mic_common.h> | 43 | #include <linux/mic_common.h> |
44 | #include <tools/endian.h> | 44 | #include <tools/endian.h> |
45 | 45 | ||
46 | static void init_mic(struct mic_info *mic); | 46 | static void *init_mic(void *arg); |
47 | 47 | ||
48 | static FILE *logfp; | 48 | static FILE *logfp; |
49 | static struct mic_info mic_list; | 49 | static struct mic_info mic_list; |
@@ -116,19 +116,18 @@ static struct { | |||
116 | .num = htole16(MIC_VRING_ENTRIES), | 116 | .num = htole16(MIC_VRING_ENTRIES), |
117 | }, | 117 | }, |
118 | #if GSO_ENABLED | 118 | #if GSO_ENABLED |
119 | .host_features = htole32( | 119 | .host_features = htole32( |
120 | 1 << VIRTIO_NET_F_CSUM | | 120 | 1 << VIRTIO_NET_F_CSUM | |
121 | 1 << VIRTIO_NET_F_GSO | | 121 | 1 << VIRTIO_NET_F_GSO | |
122 | 1 << VIRTIO_NET_F_GUEST_TSO4 | | 122 | 1 << VIRTIO_NET_F_GUEST_TSO4 | |
123 | 1 << VIRTIO_NET_F_GUEST_TSO6 | | 123 | 1 << VIRTIO_NET_F_GUEST_TSO6 | |
124 | 1 << VIRTIO_NET_F_GUEST_ECN | | 124 | 1 << VIRTIO_NET_F_GUEST_ECN), |
125 | 1 << VIRTIO_NET_F_GUEST_UFO), | ||
126 | #else | 125 | #else |
127 | .host_features = 0, | 126 | .host_features = 0, |
128 | #endif | 127 | #endif |
129 | }; | 128 | }; |
130 | 129 | ||
131 | static const char *mic_config_dir = "/etc/sysconfig/mic"; | 130 | static const char *mic_config_dir = "/etc/mpss"; |
132 | static const char *virtblk_backend = "VIRTBLK_BACKEND"; | 131 | static const char *virtblk_backend = "VIRTBLK_BACKEND"; |
133 | static struct { | 132 | static struct { |
134 | struct mic_device_desc dd; | 133 | struct mic_device_desc dd; |
@@ -192,7 +191,7 @@ tap_configure(struct mic_info *mic, char *dev) | |||
192 | return ret; | 191 | return ret; |
193 | } | 192 | } |
194 | 193 | ||
195 | snprintf(ipaddr, IFNAMSIZ, "172.31.%d.254/24", mic->id); | 194 | snprintf(ipaddr, IFNAMSIZ, "172.31.%d.254/24", mic->id + 1); |
196 | 195 | ||
197 | pid = fork(); | 196 | pid = fork(); |
198 | if (pid == 0) { | 197 | if (pid == 0) { |
@@ -255,8 +254,7 @@ static int tun_alloc(struct mic_info *mic, char *dev) | |||
255 | return err; | 254 | return err; |
256 | } | 255 | } |
257 | #if GSO_ENABLED | 256 | #if GSO_ENABLED |
258 | offload = TUN_F_CSUM | TUN_F_TSO4 | TUN_F_TSO6 | | 257 | offload = TUN_F_CSUM | TUN_F_TSO4 | TUN_F_TSO6 | TUN_F_TSO_ECN; |
259 | TUN_F_TSO_ECN | TUN_F_UFO; | ||
260 | 258 | ||
261 | err = ioctl(fd, TUNSETOFFLOAD, offload); | 259 | err = ioctl(fd, TUNSETOFFLOAD, offload); |
262 | if (err < 0) { | 260 | if (err < 0) { |
@@ -332,7 +330,6 @@ static struct mic_device_desc *get_device_desc(struct mic_info *mic, int type) | |||
332 | return d; | 330 | return d; |
333 | } | 331 | } |
334 | mpsslog("%s %s %d not found\n", mic->name, __func__, type); | 332 | mpsslog("%s %s %d not found\n", mic->name, __func__, type); |
335 | assert(0); | ||
336 | return NULL; | 333 | return NULL; |
337 | } | 334 | } |
338 | 335 | ||
@@ -415,6 +412,13 @@ mic_virtio_copy(struct mic_info *mic, int fd, | |||
415 | return ret; | 412 | return ret; |
416 | } | 413 | } |
417 | 414 | ||
415 | static inline unsigned _vring_size(unsigned int num, unsigned long align) | ||
416 | { | ||
417 | return ((sizeof(struct vring_desc) * num + sizeof(__u16) * (3 + num) | ||
418 | + align - 1) & ~(align - 1)) | ||
419 | + sizeof(__u16) * 3 + sizeof(struct vring_used_elem) * num; | ||
420 | } | ||
421 | |||
418 | /* | 422 | /* |
419 | * This initialization routine requires at least one | 423 | * This initialization routine requires at least one |
420 | * vring i.e. vr0. vr1 is optional. | 424 | * vring i.e. vr0. vr1 is optional. |
@@ -426,8 +430,9 @@ init_vr(struct mic_info *mic, int fd, int type, | |||
426 | int vr_size; | 430 | int vr_size; |
427 | char *va; | 431 | char *va; |
428 | 432 | ||
429 | vr_size = PAGE_ALIGN(vring_size(MIC_VRING_ENTRIES, | 433 | vr_size = PAGE_ALIGN(_vring_size(MIC_VRING_ENTRIES, |
430 | MIC_VIRTIO_RING_ALIGN) + sizeof(struct _mic_vring_info)); | 434 | MIC_VIRTIO_RING_ALIGN) + |
435 | sizeof(struct _mic_vring_info)); | ||
431 | va = mmap(NULL, MIC_DEVICE_PAGE_END + vr_size * num_vq, | 436 | va = mmap(NULL, MIC_DEVICE_PAGE_END + vr_size * num_vq, |
432 | PROT_READ, MAP_SHARED, fd, 0); | 437 | PROT_READ, MAP_SHARED, fd, 0); |
433 | if (MAP_FAILED == va) { | 438 | if (MAP_FAILED == va) { |
@@ -439,25 +444,25 @@ init_vr(struct mic_info *mic, int fd, int type, | |||
439 | set_dp(mic, type, va); | 444 | set_dp(mic, type, va); |
440 | vr0->va = (struct mic_vring *)&va[MIC_DEVICE_PAGE_END]; | 445 | vr0->va = (struct mic_vring *)&va[MIC_DEVICE_PAGE_END]; |
441 | vr0->info = vr0->va + | 446 | vr0->info = vr0->va + |
442 | vring_size(MIC_VRING_ENTRIES, MIC_VIRTIO_RING_ALIGN); | 447 | _vring_size(MIC_VRING_ENTRIES, MIC_VIRTIO_RING_ALIGN); |
443 | vring_init(&vr0->vr, | 448 | vring_init(&vr0->vr, |
444 | MIC_VRING_ENTRIES, vr0->va, MIC_VIRTIO_RING_ALIGN); | 449 | MIC_VRING_ENTRIES, vr0->va, MIC_VIRTIO_RING_ALIGN); |
445 | mpsslog("%s %s vr0 %p vr0->info %p vr_size 0x%x vring 0x%x ", | 450 | mpsslog("%s %s vr0 %p vr0->info %p vr_size 0x%x vring 0x%x ", |
446 | __func__, mic->name, vr0->va, vr0->info, vr_size, | 451 | __func__, mic->name, vr0->va, vr0->info, vr_size, |
447 | vring_size(MIC_VRING_ENTRIES, MIC_VIRTIO_RING_ALIGN)); | 452 | _vring_size(MIC_VRING_ENTRIES, MIC_VIRTIO_RING_ALIGN)); |
448 | mpsslog("magic 0x%x expected 0x%x\n", | 453 | mpsslog("magic 0x%x expected 0x%x\n", |
449 | le32toh(vr0->info->magic), MIC_MAGIC + type); | 454 | le32toh(vr0->info->magic), MIC_MAGIC + type); |
450 | assert(le32toh(vr0->info->magic) == MIC_MAGIC + type); | 455 | assert(le32toh(vr0->info->magic) == MIC_MAGIC + type); |
451 | if (vr1) { | 456 | if (vr1) { |
452 | vr1->va = (struct mic_vring *) | 457 | vr1->va = (struct mic_vring *) |
453 | &va[MIC_DEVICE_PAGE_END + vr_size]; | 458 | &va[MIC_DEVICE_PAGE_END + vr_size]; |
454 | vr1->info = vr1->va + vring_size(MIC_VRING_ENTRIES, | 459 | vr1->info = vr1->va + _vring_size(MIC_VRING_ENTRIES, |
455 | MIC_VIRTIO_RING_ALIGN); | 460 | MIC_VIRTIO_RING_ALIGN); |
456 | vring_init(&vr1->vr, | 461 | vring_init(&vr1->vr, |
457 | MIC_VRING_ENTRIES, vr1->va, MIC_VIRTIO_RING_ALIGN); | 462 | MIC_VRING_ENTRIES, vr1->va, MIC_VIRTIO_RING_ALIGN); |
458 | mpsslog("%s %s vr1 %p vr1->info %p vr_size 0x%x vring 0x%x ", | 463 | mpsslog("%s %s vr1 %p vr1->info %p vr_size 0x%x vring 0x%x ", |
459 | __func__, mic->name, vr1->va, vr1->info, vr_size, | 464 | __func__, mic->name, vr1->va, vr1->info, vr_size, |
460 | vring_size(MIC_VRING_ENTRIES, MIC_VIRTIO_RING_ALIGN)); | 465 | _vring_size(MIC_VRING_ENTRIES, MIC_VIRTIO_RING_ALIGN)); |
461 | mpsslog("magic 0x%x expected 0x%x\n", | 466 | mpsslog("magic 0x%x expected 0x%x\n", |
462 | le32toh(vr1->info->magic), MIC_MAGIC + type + 1); | 467 | le32toh(vr1->info->magic), MIC_MAGIC + type + 1); |
463 | assert(le32toh(vr1->info->magic) == MIC_MAGIC + type + 1); | 468 | assert(le32toh(vr1->info->magic) == MIC_MAGIC + type + 1); |
@@ -466,16 +471,21 @@ done: | |||
466 | return va; | 471 | return va; |
467 | } | 472 | } |
468 | 473 | ||
469 | static void | 474 | static int |
470 | wait_for_card_driver(struct mic_info *mic, int fd, int type) | 475 | wait_for_card_driver(struct mic_info *mic, int fd, int type) |
471 | { | 476 | { |
472 | struct pollfd pollfd; | 477 | struct pollfd pollfd; |
473 | int err; | 478 | int err; |
474 | struct mic_device_desc *desc = get_device_desc(mic, type); | 479 | struct mic_device_desc *desc = get_device_desc(mic, type); |
480 | __u8 prev_status; | ||
475 | 481 | ||
482 | if (!desc) | ||
483 | return -ENODEV; | ||
484 | prev_status = desc->status; | ||
476 | pollfd.fd = fd; | 485 | pollfd.fd = fd; |
477 | mpsslog("%s %s Waiting .... desc-> type %d status 0x%x\n", | 486 | mpsslog("%s %s Waiting .... desc-> type %d status 0x%x\n", |
478 | mic->name, __func__, type, desc->status); | 487 | mic->name, __func__, type, desc->status); |
488 | |||
479 | while (1) { | 489 | while (1) { |
480 | pollfd.events = POLLIN; | 490 | pollfd.events = POLLIN; |
481 | pollfd.revents = 0; | 491 | pollfd.revents = 0; |
@@ -487,8 +497,13 @@ wait_for_card_driver(struct mic_info *mic, int fd, int type) | |||
487 | } | 497 | } |
488 | 498 | ||
489 | if (pollfd.revents) { | 499 | if (pollfd.revents) { |
490 | mpsslog("%s %s Waiting... desc-> type %d status 0x%x\n", | 500 | if (desc->status != prev_status) { |
491 | mic->name, __func__, type, desc->status); | 501 | mpsslog("%s %s Waiting... desc-> type %d " |
502 | "status 0x%x\n", | ||
503 | mic->name, __func__, type, | ||
504 | desc->status); | ||
505 | prev_status = desc->status; | ||
506 | } | ||
492 | if (desc->status & VIRTIO_CONFIG_S_DRIVER_OK) { | 507 | if (desc->status & VIRTIO_CONFIG_S_DRIVER_OK) { |
493 | mpsslog("%s %s poll.revents %d\n", | 508 | mpsslog("%s %s poll.revents %d\n", |
494 | mic->name, __func__, pollfd.revents); | 509 | mic->name, __func__, pollfd.revents); |
@@ -499,6 +514,7 @@ wait_for_card_driver(struct mic_info *mic, int fd, int type) | |||
499 | } | 514 | } |
500 | } | 515 | } |
501 | } | 516 | } |
517 | return 0; | ||
502 | } | 518 | } |
503 | 519 | ||
504 | /* Spin till we have some descriptors */ | 520 | /* Spin till we have some descriptors */ |
@@ -575,9 +591,16 @@ virtio_net(void *arg) | |||
575 | __func__, strerror(errno)); | 591 | __func__, strerror(errno)); |
576 | continue; | 592 | continue; |
577 | } | 593 | } |
578 | if (!(desc->status & VIRTIO_CONFIG_S_DRIVER_OK)) | 594 | if (!(desc->status & VIRTIO_CONFIG_S_DRIVER_OK)) { |
579 | wait_for_card_driver(mic, mic->mic_net.virtio_net_fd, | 595 | err = wait_for_card_driver(mic, |
580 | VIRTIO_ID_NET); | 596 | mic->mic_net.virtio_net_fd, |
597 | VIRTIO_ID_NET); | ||
598 | if (err) { | ||
599 | mpsslog("%s %s %d Exiting...\n", | ||
600 | mic->name, __func__, __LINE__); | ||
601 | break; | ||
602 | } | ||
603 | } | ||
581 | /* | 604 | /* |
582 | * Check if there is data to be read from TUN and write to | 605 | * Check if there is data to be read from TUN and write to |
583 | * virtio net fd if there is. | 606 | * virtio net fd if there is. |
@@ -786,10 +809,16 @@ virtio_console(void *arg) | |||
786 | strerror(errno)); | 809 | strerror(errno)); |
787 | continue; | 810 | continue; |
788 | } | 811 | } |
789 | if (!(desc->status & VIRTIO_CONFIG_S_DRIVER_OK)) | 812 | if (!(desc->status & VIRTIO_CONFIG_S_DRIVER_OK)) { |
790 | wait_for_card_driver(mic, | 813 | err = wait_for_card_driver(mic, |
791 | mic->mic_console.virtio_console_fd, | 814 | mic->mic_console.virtio_console_fd, |
792 | VIRTIO_ID_CONSOLE); | 815 | VIRTIO_ID_CONSOLE); |
816 | if (err) { | ||
817 | mpsslog("%s %s %d Exiting...\n", | ||
818 | mic->name, __func__, __LINE__); | ||
819 | break; | ||
820 | } | ||
821 | } | ||
793 | 822 | ||
794 | if (console_poll[MONITOR_FD].revents & POLLIN) { | 823 | if (console_poll[MONITOR_FD].revents & POLLIN) { |
795 | copy.iov = iov0; | 824 | copy.iov = iov0; |
@@ -1048,8 +1077,9 @@ stop_virtblk(struct mic_info *mic) | |||
1048 | { | 1077 | { |
1049 | int vr_size, ret; | 1078 | int vr_size, ret; |
1050 | 1079 | ||
1051 | vr_size = PAGE_ALIGN(vring_size(MIC_VRING_ENTRIES, | 1080 | vr_size = PAGE_ALIGN(_vring_size(MIC_VRING_ENTRIES, |
1052 | MIC_VIRTIO_RING_ALIGN) + sizeof(struct _mic_vring_info)); | 1081 | MIC_VIRTIO_RING_ALIGN) + |
1082 | sizeof(struct _mic_vring_info)); | ||
1053 | ret = munmap(mic->mic_virtblk.block_dp, | 1083 | ret = munmap(mic->mic_virtblk.block_dp, |
1054 | MIC_DEVICE_PAGE_END + vr_size * virtblk_dev_page.dd.num_vq); | 1084 | MIC_DEVICE_PAGE_END + vr_size * virtblk_dev_page.dd.num_vq); |
1055 | if (ret < 0) | 1085 | if (ret < 0) |
@@ -1131,6 +1161,10 @@ write_status(int fd, __u8 *status) | |||
1131 | return ioctl(fd, MIC_VIRTIO_COPY_DESC, ©); | 1161 | return ioctl(fd, MIC_VIRTIO_COPY_DESC, ©); |
1132 | } | 1162 | } |
1133 | 1163 | ||
1164 | #ifndef VIRTIO_BLK_T_GET_ID | ||
1165 | #define VIRTIO_BLK_T_GET_ID 8 | ||
1166 | #endif | ||
1167 | |||
1134 | static void * | 1168 | static void * |
1135 | virtio_block(void *arg) | 1169 | virtio_block(void *arg) |
1136 | { | 1170 | { |
@@ -1297,12 +1331,7 @@ reset(struct mic_info *mic) | |||
1297 | mpsslog("%s: %s %d state %s\n", | 1331 | mpsslog("%s: %s %d state %s\n", |
1298 | mic->name, __func__, __LINE__, state); | 1332 | mic->name, __func__, __LINE__, state); |
1299 | 1333 | ||
1300 | /* | 1334 | if (!strcmp(state, "ready")) { |
1301 | * If the shutdown was initiated by OSPM, the state stays | ||
1302 | * in "suspended" which is also a valid condition for reset. | ||
1303 | */ | ||
1304 | if ((!strcmp(state, "offline")) || | ||
1305 | (!strcmp(state, "suspended"))) { | ||
1306 | free(state); | 1335 | free(state); |
1307 | break; | 1336 | break; |
1308 | } | 1337 | } |
@@ -1331,34 +1360,50 @@ get_mic_shutdown_status(struct mic_info *mic, char *shutdown_status) | |||
1331 | assert(0); | 1360 | assert(0); |
1332 | }; | 1361 | }; |
1333 | 1362 | ||
1334 | static int get_mic_state(struct mic_info *mic, char *state) | 1363 | static int get_mic_state(struct mic_info *mic) |
1335 | { | 1364 | { |
1336 | if (!strcmp(state, "offline")) | 1365 | char *state = NULL; |
1337 | return MIC_OFFLINE; | 1366 | enum mic_states mic_state; |
1338 | if (!strcmp(state, "online")) | 1367 | |
1339 | return MIC_ONLINE; | 1368 | while (!state) { |
1340 | if (!strcmp(state, "shutting_down")) | 1369 | state = readsysfs(mic->name, "state"); |
1341 | return MIC_SHUTTING_DOWN; | 1370 | sleep(1); |
1342 | if (!strcmp(state, "reset_failed")) | 1371 | } |
1343 | return MIC_RESET_FAILED; | 1372 | mpsslog("%s: %s %d state %s\n", |
1344 | if (!strcmp(state, "suspending")) | 1373 | mic->name, __func__, __LINE__, state); |
1345 | return MIC_SUSPENDING; | 1374 | |
1346 | if (!strcmp(state, "suspended")) | 1375 | if (!strcmp(state, "ready")) { |
1347 | return MIC_SUSPENDED; | 1376 | mic_state = MIC_READY; |
1348 | mpsslog("%s: BUG invalid state %s\n", mic->name, state); | 1377 | } else if (!strcmp(state, "booting")) { |
1349 | /* Invalid state */ | 1378 | mic_state = MIC_BOOTING; |
1350 | assert(0); | 1379 | } else if (!strcmp(state, "online")) { |
1380 | mic_state = MIC_ONLINE; | ||
1381 | } else if (!strcmp(state, "shutting_down")) { | ||
1382 | mic_state = MIC_SHUTTING_DOWN; | ||
1383 | } else if (!strcmp(state, "reset_failed")) { | ||
1384 | mic_state = MIC_RESET_FAILED; | ||
1385 | } else if (!strcmp(state, "resetting")) { | ||
1386 | mic_state = MIC_RESETTING; | ||
1387 | } else { | ||
1388 | mpsslog("%s: BUG invalid state %s\n", mic->name, state); | ||
1389 | assert(0); | ||
1390 | } | ||
1391 | |||
1392 | free(state); | ||
1393 | return mic_state; | ||
1351 | }; | 1394 | }; |
1352 | 1395 | ||
1353 | static void mic_handle_shutdown(struct mic_info *mic) | 1396 | static void mic_handle_shutdown(struct mic_info *mic) |
1354 | { | 1397 | { |
1355 | #define SHUTDOWN_TIMEOUT 60 | 1398 | #define SHUTDOWN_TIMEOUT 60 |
1356 | int i = SHUTDOWN_TIMEOUT, ret, stat = 0; | 1399 | int i = SHUTDOWN_TIMEOUT; |
1357 | char *shutdown_status; | 1400 | char *shutdown_status; |
1358 | while (i) { | 1401 | while (i) { |
1359 | shutdown_status = readsysfs(mic->name, "shutdown_status"); | 1402 | shutdown_status = readsysfs(mic->name, "shutdown_status"); |
1360 | if (!shutdown_status) | 1403 | if (!shutdown_status) { |
1404 | sleep(1); | ||
1361 | continue; | 1405 | continue; |
1406 | } | ||
1362 | mpsslog("%s: %s %d shutdown_status %s\n", | 1407 | mpsslog("%s: %s %d shutdown_status %s\n", |
1363 | mic->name, __func__, __LINE__, shutdown_status); | 1408 | mic->name, __func__, __LINE__, shutdown_status); |
1364 | switch (get_mic_shutdown_status(mic, shutdown_status)) { | 1409 | switch (get_mic_shutdown_status(mic, shutdown_status)) { |
@@ -1377,94 +1422,110 @@ static void mic_handle_shutdown(struct mic_info *mic) | |||
1377 | i--; | 1422 | i--; |
1378 | } | 1423 | } |
1379 | reset: | 1424 | reset: |
1380 | ret = kill(mic->pid, SIGTERM); | 1425 | if (!i) |
1381 | mpsslog("%s: %s %d kill pid %d ret %d\n", | 1426 | mpsslog("%s: %s %d timing out waiting for shutdown_status %s\n", |
1382 | mic->name, __func__, __LINE__, | 1427 | mic->name, __func__, __LINE__, shutdown_status); |
1383 | mic->pid, ret); | 1428 | reset(mic); |
1384 | if (!ret) { | ||
1385 | ret = waitpid(mic->pid, &stat, | ||
1386 | WIFSIGNALED(stat)); | ||
1387 | mpsslog("%s: %s %d waitpid ret %d pid %d\n", | ||
1388 | mic->name, __func__, __LINE__, | ||
1389 | ret, mic->pid); | ||
1390 | } | ||
1391 | if (ret == mic->pid) | ||
1392 | reset(mic); | ||
1393 | } | 1429 | } |
1394 | 1430 | ||
1395 | static void * | 1431 | static int open_state_fd(struct mic_info *mic) |
1396 | mic_config(void *arg) | ||
1397 | { | 1432 | { |
1398 | struct mic_info *mic = (struct mic_info *)arg; | ||
1399 | char *state = NULL; | ||
1400 | char pathname[PATH_MAX]; | 1433 | char pathname[PATH_MAX]; |
1401 | int fd, ret; | 1434 | int fd; |
1402 | struct pollfd ufds[1]; | ||
1403 | char value[4096]; | ||
1404 | 1435 | ||
1405 | snprintf(pathname, PATH_MAX - 1, "%s/%s/%s", | 1436 | snprintf(pathname, PATH_MAX - 1, "%s/%s/%s", |
1406 | MICSYSFSDIR, mic->name, "state"); | 1437 | MICSYSFSDIR, mic->name, "state"); |
1407 | 1438 | ||
1408 | fd = open(pathname, O_RDONLY); | 1439 | fd = open(pathname, O_RDONLY); |
1409 | if (fd < 0) { | 1440 | if (fd < 0) |
1410 | mpsslog("%s: opening file %s failed %s\n", | 1441 | mpsslog("%s: opening file %s failed %s\n", |
1411 | mic->name, pathname, strerror(errno)); | 1442 | mic->name, pathname, strerror(errno)); |
1412 | goto error; | 1443 | return fd; |
1444 | } | ||
1445 | |||
1446 | static int block_till_state_change(int fd, struct mic_info *mic) | ||
1447 | { | ||
1448 | struct pollfd ufds[1]; | ||
1449 | char value[PAGE_SIZE]; | ||
1450 | int ret; | ||
1451 | |||
1452 | ufds[0].fd = fd; | ||
1453 | ufds[0].events = POLLERR | POLLPRI; | ||
1454 | ret = poll(ufds, 1, -1); | ||
1455 | if (ret < 0) { | ||
1456 | mpsslog("%s: %s %d poll failed %s\n", | ||
1457 | mic->name, __func__, __LINE__, strerror(errno)); | ||
1458 | return ret; | ||
1459 | } | ||
1460 | |||
1461 | ret = lseek(fd, 0, SEEK_SET); | ||
1462 | if (ret < 0) { | ||
1463 | mpsslog("%s: %s %d Failed to seek to 0: %s\n", | ||
1464 | mic->name, __func__, __LINE__, strerror(errno)); | ||
1465 | return ret; | ||
1466 | } | ||
1467 | |||
1468 | ret = read(fd, value, sizeof(value)); | ||
1469 | if (ret < 0) { | ||
1470 | mpsslog("%s: %s %d Failed to read sysfs entry: %s\n", | ||
1471 | mic->name, __func__, __LINE__, strerror(errno)); | ||
1472 | return ret; | ||
1473 | } | ||
1474 | |||
1475 | return 0; | ||
1476 | } | ||
1477 | |||
1478 | static void * | ||
1479 | mic_config(void *arg) | ||
1480 | { | ||
1481 | struct mic_info *mic = (struct mic_info *)arg; | ||
1482 | int fd, ret, stat = 0; | ||
1483 | |||
1484 | fd = open_state_fd(mic); | ||
1485 | if (fd < 0) { | ||
1486 | mpsslog("%s: %s %d open state fd failed %s\n", | ||
1487 | mic->name, __func__, __LINE__, strerror(errno)); | ||
1488 | goto exit; | ||
1413 | } | 1489 | } |
1414 | 1490 | ||
1415 | do { | 1491 | do { |
1416 | ret = lseek(fd, 0, SEEK_SET); | 1492 | ret = block_till_state_change(fd, mic); |
1417 | if (ret < 0) { | 1493 | if (ret < 0) { |
1418 | mpsslog("%s: Failed to seek to file start '%s': %s\n", | 1494 | mpsslog("%s: %s %d block_till_state_change error %s\n", |
1419 | mic->name, pathname, strerror(errno)); | 1495 | mic->name, __func__, __LINE__, strerror(errno)); |
1420 | goto close_error1; | 1496 | goto close_exit; |
1421 | } | 1497 | } |
1422 | ret = read(fd, value, sizeof(value)); | 1498 | |
1423 | if (ret < 0) { | 1499 | switch (get_mic_state(mic)) { |
1424 | mpsslog("%s: Failed to read sysfs entry '%s': %s\n", | ||
1425 | mic->name, pathname, strerror(errno)); | ||
1426 | goto close_error1; | ||
1427 | } | ||
1428 | retry: | ||
1429 | state = readsysfs(mic->name, "state"); | ||
1430 | if (!state) | ||
1431 | goto retry; | ||
1432 | mpsslog("%s: %s %d state %s\n", | ||
1433 | mic->name, __func__, __LINE__, state); | ||
1434 | switch (get_mic_state(mic, state)) { | ||
1435 | case MIC_SHUTTING_DOWN: | 1500 | case MIC_SHUTTING_DOWN: |
1436 | mic_handle_shutdown(mic); | 1501 | mic_handle_shutdown(mic); |
1437 | goto close_error; | 1502 | break; |
1438 | case MIC_SUSPENDING: | 1503 | case MIC_READY: |
1439 | mic->boot_on_resume = 1; | 1504 | case MIC_RESET_FAILED: |
1440 | setsysfs(mic->name, "state", "suspend"); | 1505 | ret = kill(mic->pid, SIGTERM); |
1441 | mic_handle_shutdown(mic); | 1506 | mpsslog("%s: %s %d kill pid %d ret %d\n", |
1442 | goto close_error; | 1507 | mic->name, __func__, __LINE__, |
1443 | case MIC_OFFLINE: | 1508 | mic->pid, ret); |
1509 | if (!ret) { | ||
1510 | ret = waitpid(mic->pid, &stat, | ||
1511 | WIFSIGNALED(stat)); | ||
1512 | mpsslog("%s: %s %d waitpid ret %d pid %d\n", | ||
1513 | mic->name, __func__, __LINE__, | ||
1514 | ret, mic->pid); | ||
1515 | } | ||
1444 | if (mic->boot_on_resume) { | 1516 | if (mic->boot_on_resume) { |
1445 | setsysfs(mic->name, "state", "boot"); | 1517 | setsysfs(mic->name, "state", "boot"); |
1446 | mic->boot_on_resume = 0; | 1518 | mic->boot_on_resume = 0; |
1447 | } | 1519 | } |
1448 | break; | 1520 | goto close_exit; |
1449 | default: | 1521 | default: |
1450 | break; | 1522 | break; |
1451 | } | 1523 | } |
1452 | free(state); | ||
1453 | |||
1454 | ufds[0].fd = fd; | ||
1455 | ufds[0].events = POLLERR | POLLPRI; | ||
1456 | ret = poll(ufds, 1, -1); | ||
1457 | if (ret < 0) { | ||
1458 | mpsslog("%s: poll failed %s\n", | ||
1459 | mic->name, strerror(errno)); | ||
1460 | goto close_error1; | ||
1461 | } | ||
1462 | } while (1); | 1524 | } while (1); |
1463 | close_error: | 1525 | |
1464 | free(state); | 1526 | close_exit: |
1465 | close_error1: | ||
1466 | close(fd); | 1527 | close(fd); |
1467 | error: | 1528 | exit: |
1468 | init_mic(mic); | 1529 | init_mic(mic); |
1469 | pthread_exit(NULL); | 1530 | pthread_exit(NULL); |
1470 | } | 1531 | } |
@@ -1477,15 +1538,15 @@ set_cmdline(struct mic_info *mic) | |||
1477 | 1538 | ||
1478 | len = snprintf(buffer, PATH_MAX, | 1539 | len = snprintf(buffer, PATH_MAX, |
1479 | "clocksource=tsc highres=off nohz=off "); | 1540 | "clocksource=tsc highres=off nohz=off "); |
1480 | len += snprintf(buffer + len, PATH_MAX - len, | 1541 | len += snprintf(buffer + len, PATH_MAX, |
1481 | "cpufreq_on;corec6_off;pc3_off;pc6_off "); | 1542 | "cpufreq_on;corec6_off;pc3_off;pc6_off "); |
1482 | len += snprintf(buffer + len, PATH_MAX - len, | 1543 | len += snprintf(buffer + len, PATH_MAX, |
1483 | "ifcfg=static;address,172.31.%d.1;netmask,255.255.255.0", | 1544 | "ifcfg=static;address,172.31.%d.1;netmask,255.255.255.0", |
1484 | mic->id); | 1545 | mic->id + 1); |
1485 | 1546 | ||
1486 | setsysfs(mic->name, "cmdline", buffer); | 1547 | setsysfs(mic->name, "cmdline", buffer); |
1487 | mpsslog("%s: Command line: \"%s\"\n", mic->name, buffer); | 1548 | mpsslog("%s: Command line: \"%s\"\n", mic->name, buffer); |
1488 | snprintf(buffer, PATH_MAX, "172.31.%d.1", mic->id); | 1549 | snprintf(buffer, PATH_MAX, "172.31.%d.1", mic->id + 1); |
1489 | mpsslog("%s: IPADDR: \"%s\"\n", mic->name, buffer); | 1550 | mpsslog("%s: IPADDR: \"%s\"\n", mic->name, buffer); |
1490 | } | 1551 | } |
1491 | 1552 | ||
@@ -1541,8 +1602,6 @@ set_log_buf_info(struct mic_info *mic) | |||
1541 | close(fd); | 1602 | close(fd); |
1542 | } | 1603 | } |
1543 | 1604 | ||
1544 | static void init_mic(struct mic_info *mic); | ||
1545 | |||
1546 | static void | 1605 | static void |
1547 | change_virtblk_backend(int x, siginfo_t *siginfo, void *p) | 1606 | change_virtblk_backend(int x, siginfo_t *siginfo, void *p) |
1548 | { | 1607 | { |
@@ -1553,8 +1612,16 @@ change_virtblk_backend(int x, siginfo_t *siginfo, void *p) | |||
1553 | } | 1612 | } |
1554 | 1613 | ||
1555 | static void | 1614 | static void |
1556 | init_mic(struct mic_info *mic) | 1615 | set_mic_boot_params(struct mic_info *mic) |
1616 | { | ||
1617 | set_log_buf_info(mic); | ||
1618 | set_cmdline(mic); | ||
1619 | } | ||
1620 | |||
1621 | static void * | ||
1622 | init_mic(void *arg) | ||
1557 | { | 1623 | { |
1624 | struct mic_info *mic = (struct mic_info *)arg; | ||
1558 | struct sigaction ignore = { | 1625 | struct sigaction ignore = { |
1559 | .sa_flags = 0, | 1626 | .sa_flags = 0, |
1560 | .sa_handler = SIG_IGN | 1627 | .sa_handler = SIG_IGN |
@@ -1564,7 +1631,7 @@ init_mic(struct mic_info *mic) | |||
1564 | .sa_sigaction = change_virtblk_backend, | 1631 | .sa_sigaction = change_virtblk_backend, |
1565 | }; | 1632 | }; |
1566 | char buffer[PATH_MAX]; | 1633 | char buffer[PATH_MAX]; |
1567 | int err; | 1634 | int err, fd; |
1568 | 1635 | ||
1569 | /* | 1636 | /* |
1570 | * Currently, one virtio block device is supported for each MIC card | 1637 | * Currently, one virtio block device is supported for each MIC card |
@@ -1577,12 +1644,38 @@ init_mic(struct mic_info *mic) | |||
1577 | * the MIC daemon. | 1644 | * the MIC daemon. |
1578 | */ | 1645 | */ |
1579 | sigaction(SIGUSR1, &ignore, NULL); | 1646 | sigaction(SIGUSR1, &ignore, NULL); |
1647 | retry: | ||
1648 | fd = open_state_fd(mic); | ||
1649 | if (fd < 0) { | ||
1650 | mpsslog("%s: %s %d open state fd failed %s\n", | ||
1651 | mic->name, __func__, __LINE__, strerror(errno)); | ||
1652 | sleep(2); | ||
1653 | goto retry; | ||
1654 | } | ||
1655 | |||
1656 | if (mic->restart) { | ||
1657 | snprintf(buffer, PATH_MAX, "boot"); | ||
1658 | setsysfs(mic->name, "state", buffer); | ||
1659 | mpsslog("%s restarting mic %d\n", | ||
1660 | mic->name, mic->restart); | ||
1661 | mic->restart = 0; | ||
1662 | } | ||
1663 | |||
1664 | while (1) { | ||
1665 | while (block_till_state_change(fd, mic)) { | ||
1666 | mpsslog("%s: %s %d block_till_state_change error %s\n", | ||
1667 | mic->name, __func__, __LINE__, strerror(errno)); | ||
1668 | sleep(2); | ||
1669 | continue; | ||
1670 | } | ||
1671 | |||
1672 | if (get_mic_state(mic) == MIC_BOOTING) | ||
1673 | break; | ||
1674 | } | ||
1580 | 1675 | ||
1581 | mic->pid = fork(); | 1676 | mic->pid = fork(); |
1582 | switch (mic->pid) { | 1677 | switch (mic->pid) { |
1583 | case 0: | 1678 | case 0: |
1584 | set_log_buf_info(mic); | ||
1585 | set_cmdline(mic); | ||
1586 | add_virtio_device(mic, &virtcons_dev_page.dd); | 1679 | add_virtio_device(mic, &virtcons_dev_page.dd); |
1587 | add_virtio_device(mic, &virtnet_dev_page.dd); | 1680 | add_virtio_device(mic, &virtnet_dev_page.dd); |
1588 | err = pthread_create(&mic->mic_console.console_thread, NULL, | 1681 | err = pthread_create(&mic->mic_console.console_thread, NULL, |
@@ -1612,24 +1705,29 @@ init_mic(struct mic_info *mic) | |||
1612 | mic->name, mic->id, errno); | 1705 | mic->name, mic->id, errno); |
1613 | break; | 1706 | break; |
1614 | default: | 1707 | default: |
1615 | if (mic->restart) { | 1708 | err = pthread_create(&mic->config_thread, NULL, |
1616 | snprintf(buffer, PATH_MAX, "boot"); | 1709 | mic_config, mic); |
1617 | setsysfs(mic->name, "state", buffer); | 1710 | if (err) |
1618 | mpsslog("%s restarting mic %d\n", | 1711 | mpsslog("%s mic_config pthread_create failed %s\n", |
1619 | mic->name, mic->restart); | 1712 | mic->name, strerror(err)); |
1620 | mic->restart = 0; | ||
1621 | } | ||
1622 | pthread_create(&mic->config_thread, NULL, mic_config, mic); | ||
1623 | } | 1713 | } |
1714 | |||
1715 | return NULL; | ||
1624 | } | 1716 | } |
1625 | 1717 | ||
1626 | static void | 1718 | static void |
1627 | start_daemon(void) | 1719 | start_daemon(void) |
1628 | { | 1720 | { |
1629 | struct mic_info *mic; | 1721 | struct mic_info *mic; |
1722 | int err; | ||
1630 | 1723 | ||
1631 | for (mic = mic_list.next; mic != NULL; mic = mic->next) | 1724 | for (mic = mic_list.next; mic; mic = mic->next) { |
1632 | init_mic(mic); | 1725 | set_mic_boot_params(mic); |
1726 | err = pthread_create(&mic->init_thread, NULL, init_mic, mic); | ||
1727 | if (err) | ||
1728 | mpsslog("%s init_mic pthread_create failed %s\n", | ||
1729 | mic->name, strerror(err)); | ||
1730 | } | ||
1633 | 1731 | ||
1634 | while (1) | 1732 | while (1) |
1635 | sleep(60); | 1733 | sleep(60); |
diff --git a/Documentation/mic/mpssd/mpssd.h b/Documentation/mic/mpssd/mpssd.h index f5f18b15d9a0..8bd64944aacc 100644 --- a/Documentation/mic/mpssd/mpssd.h +++ b/Documentation/mic/mpssd/mpssd.h | |||
@@ -86,6 +86,7 @@ struct mic_info { | |||
86 | int id; | 86 | int id; |
87 | char *name; | 87 | char *name; |
88 | pthread_t config_thread; | 88 | pthread_t config_thread; |
89 | pthread_t init_thread; | ||
89 | pid_t pid; | 90 | pid_t pid; |
90 | struct mic_console_info mic_console; | 91 | struct mic_console_info mic_console; |
91 | struct mic_net_info mic_net; | 92 | struct mic_net_info mic_net; |
diff --git a/Documentation/misc-devices/apds990x.txt b/Documentation/misc-devices/apds990x.txt index d5408cade32f..454d95d623b3 100644 --- a/Documentation/misc-devices/apds990x.txt +++ b/Documentation/misc-devices/apds990x.txt | |||
@@ -30,7 +30,7 @@ lead to false interrupt, but that doesn't harm. | |||
30 | 30 | ||
31 | ALS contains 4 different gain steps. Driver automatically | 31 | ALS contains 4 different gain steps. Driver automatically |
32 | selects suitable gain step. After each measurement, reliability of the results | 32 | selects suitable gain step. After each measurement, reliability of the results |
33 | is estimated and new measurement is trigged if necessary. | 33 | is estimated and new measurement is triggered if necessary. |
34 | 34 | ||
35 | Platform data can provide tuned values to the conversion formulas if | 35 | Platform data can provide tuned values to the conversion formulas if |
36 | values are known. Otherwise plain sensor default values are used. | 36 | values are known. Otherwise plain sensor default values are used. |
diff --git a/Documentation/misc-devices/isl29003 b/Documentation/misc-devices/isl29003 index c4ff5f38e010..80b952fd32ff 100644 --- a/Documentation/misc-devices/isl29003 +++ b/Documentation/misc-devices/isl29003 | |||
@@ -29,7 +29,7 @@ Detection | |||
29 | 29 | ||
30 | The ISL29003 does not have an ID register which could be used to identify | 30 | The ISL29003 does not have an ID register which could be used to identify |
31 | it, so the detection routine will just try to read from the configured I2C | 31 | it, so the detection routine will just try to read from the configured I2C |
32 | addess and consider the device to be present as soon as it ACKs the | 32 | address and consider the device to be present as soon as it ACKs the |
33 | transfer. | 33 | transfer. |
34 | 34 | ||
35 | 35 | ||
diff --git a/Documentation/misc-devices/max6875 b/Documentation/misc-devices/max6875 index 1e89ee3ccc1b..2f2bd0b17b5d 100644 --- a/Documentation/misc-devices/max6875 +++ b/Documentation/misc-devices/max6875 | |||
@@ -22,7 +22,7 @@ At reset, the MAX6875 reads the configuration EEPROM into its configuration | |||
22 | registers. The chip then begins to operate according to the values in the | 22 | registers. The chip then begins to operate according to the values in the |
23 | registers. | 23 | registers. |
24 | 24 | ||
25 | The Maxim MAX6874 is a similar, mostly compatible device, with more intputs | 25 | The Maxim MAX6874 is a similar, mostly compatible device, with more inputs |
26 | and outputs: | 26 | and outputs: |
27 | vin gpi vout | 27 | vin gpi vout |
28 | MAX6874 6 4 8 | 28 | MAX6874 6 4 8 |
diff --git a/Documentation/mmc/mmc-dev-attrs.txt b/Documentation/mmc/mmc-dev-attrs.txt index 189bab09255a..caa555706f89 100644 --- a/Documentation/mmc/mmc-dev-attrs.txt +++ b/Documentation/mmc/mmc-dev-attrs.txt | |||
@@ -72,13 +72,3 @@ Note on raw_rpmb_size_mult: | |||
72 | "raw_rpmb_size_mult" is a mutliple of 128kB block. | 72 | "raw_rpmb_size_mult" is a mutliple of 128kB block. |
73 | RPMB size in byte is calculated by using the following equation: | 73 | RPMB size in byte is calculated by using the following equation: |
74 | RPMB partition size = 128kB x raw_rpmb_size_mult | 74 | RPMB partition size = 128kB x raw_rpmb_size_mult |
75 | |||
76 | SD/MMC/SDIO Clock Gating Attribute | ||
77 | ================================== | ||
78 | |||
79 | Read and write access is provided to following attribute. | ||
80 | This attribute appears only if CONFIG_MMC_CLKGATE is enabled. | ||
81 | |||
82 | clkgate_delay Tune the clock gating delay with desired value in milliseconds. | ||
83 | |||
84 | echo <desired delay> > /sys/class/mmc_host/mmcX/clkgate_delay | ||
diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt index fd1a1aad49a9..4636b94518da 100644 --- a/Documentation/networking/can.txt +++ b/Documentation/networking/can.txt | |||
@@ -1018,25 +1018,34 @@ solution for a couple of reasons: | |||
1018 | 1018 | ||
1019 | $ ip link set can0 type can help | 1019 | $ ip link set can0 type can help |
1020 | Usage: ip link set DEVICE type can | 1020 | Usage: ip link set DEVICE type can |
1021 | [ bitrate BITRATE [ sample-point SAMPLE-POINT] ] | | 1021 | [ bitrate BITRATE [ sample-point SAMPLE-POINT] ] | |
1022 | [ tq TQ prop-seg PROP_SEG phase-seg1 PHASE-SEG1 | 1022 | [ tq TQ prop-seg PROP_SEG phase-seg1 PHASE-SEG1 |
1023 | phase-seg2 PHASE-SEG2 [ sjw SJW ] ] | 1023 | phase-seg2 PHASE-SEG2 [ sjw SJW ] ] |
1024 | 1024 | ||
1025 | [ loopback { on | off } ] | 1025 | [ dbitrate BITRATE [ dsample-point SAMPLE-POINT] ] | |
1026 | [ listen-only { on | off } ] | 1026 | [ dtq TQ dprop-seg PROP_SEG dphase-seg1 PHASE-SEG1 |
1027 | [ triple-sampling { on | off } ] | 1027 | dphase-seg2 PHASE-SEG2 [ dsjw SJW ] ] |
1028 | 1028 | ||
1029 | [ restart-ms TIME-MS ] | 1029 | [ loopback { on | off } ] |
1030 | [ restart ] | 1030 | [ listen-only { on | off } ] |
1031 | 1031 | [ triple-sampling { on | off } ] | |
1032 | Where: BITRATE := { 1..1000000 } | 1032 | [ one-shot { on | off } ] |
1033 | SAMPLE-POINT := { 0.000..0.999 } | 1033 | [ berr-reporting { on | off } ] |
1034 | TQ := { NUMBER } | 1034 | [ fd { on | off } ] |
1035 | PROP-SEG := { 1..8 } | 1035 | [ fd-non-iso { on | off } ] |
1036 | PHASE-SEG1 := { 1..8 } | 1036 | [ presume-ack { on | off } ] |
1037 | PHASE-SEG2 := { 1..8 } | 1037 | |
1038 | SJW := { 1..4 } | 1038 | [ restart-ms TIME-MS ] |
1039 | RESTART-MS := { 0 | NUMBER } | 1039 | [ restart ] |
1040 | |||
1041 | Where: BITRATE := { 1..1000000 } | ||
1042 | SAMPLE-POINT := { 0.000..0.999 } | ||
1043 | TQ := { NUMBER } | ||
1044 | PROP-SEG := { 1..8 } | ||
1045 | PHASE-SEG1 := { 1..8 } | ||
1046 | PHASE-SEG2 := { 1..8 } | ||
1047 | SJW := { 1..4 } | ||
1048 | RESTART-MS := { 0 | NUMBER } | ||
1040 | 1049 | ||
1041 | - Display CAN device details and statistics: | 1050 | - Display CAN device details and statistics: |
1042 | 1051 | ||
@@ -1178,7 +1187,55 @@ solution for a couple of reasons: | |||
1178 | The CAN device MTU can be retrieved e.g. with a SIOCGIFMTU ioctl() syscall. | 1187 | The CAN device MTU can be retrieved e.g. with a SIOCGIFMTU ioctl() syscall. |
1179 | N.B. CAN FD capable devices can also handle and send legacy CAN frames. | 1188 | N.B. CAN FD capable devices can also handle and send legacy CAN frames. |
1180 | 1189 | ||
1181 | FIXME: Add details about the CAN FD controller configuration when available. | 1190 | When configuring CAN FD capable CAN controllers an additional 'data' bitrate |
1191 | has to be set. This bitrate for the data phase of the CAN FD frame has to be | ||
1192 | at least the bitrate which was configured for the arbitration phase. This | ||
1193 | second bitrate is specified analogue to the first bitrate but the bitrate | ||
1194 | setting keywords for the 'data' bitrate start with 'd' e.g. dbitrate, | ||
1195 | dsample-point, dsjw or dtq and similar settings. When a data bitrate is set | ||
1196 | within the configuration process the controller option "fd on" can be | ||
1197 | specified to enable the CAN FD mode in the CAN controller. This controller | ||
1198 | option also switches the device MTU to 72 (CANFD_MTU). | ||
1199 | |||
1200 | The first CAN FD specification presented as whitepaper at the International | ||
1201 | CAN Conference 2012 needed to be improved for data integrity reasons. | ||
1202 | Therefore two CAN FD implementations have to be distinguished today: | ||
1203 | |||
1204 | - ISO compliant: The ISO 11898-1:2015 CAN FD implementation (default) | ||
1205 | - non-ISO compliant: The CAN FD implementation following the 2012 whitepaper | ||
1206 | |||
1207 | Finally there are three types of CAN FD controllers: | ||
1208 | |||
1209 | 1. ISO compliant (fixed) | ||
1210 | 2. non-ISO compliant (fixed, like the M_CAN IP core v3.0.1 in m_can.c) | ||
1211 | 3. ISO/non-ISO CAN FD controllers (switchable, like the PEAK PCAN-USB FD) | ||
1212 | |||
1213 | The current ISO/non-ISO mode is announced by the CAN controller driver via | ||
1214 | netlink and displayed by the 'ip' tool (controller option FD-NON-ISO). | ||
1215 | The ISO/non-ISO-mode can be altered by setting 'fd-non-iso {on|off}' for | ||
1216 | switchable CAN FD controllers only. | ||
1217 | |||
1218 | Example configuring 500 kbit/s arbitration bitrate and 4 Mbit/s data bitrate: | ||
1219 | |||
1220 | $ ip link set can0 up type can bitrate 500000 sample-point 0.75 \ | ||
1221 | dbitrate 4000000 dsample-point 0.8 fd on | ||
1222 | $ ip -details link show can0 | ||
1223 | 5: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 72 qdisc pfifo_fast state UNKNOWN \ | ||
1224 | mode DEFAULT group default qlen 10 | ||
1225 | link/can promiscuity 0 | ||
1226 | can <FD> state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0 | ||
1227 | bitrate 500000 sample-point 0.750 | ||
1228 | tq 50 prop-seg 14 phase-seg1 15 phase-seg2 10 sjw 1 | ||
1229 | pcan_usb_pro_fd: tseg1 1..64 tseg2 1..16 sjw 1..16 brp 1..1024 \ | ||
1230 | brp-inc 1 | ||
1231 | dbitrate 4000000 dsample-point 0.800 | ||
1232 | dtq 12 dprop-seg 7 dphase-seg1 8 dphase-seg2 4 dsjw 1 | ||
1233 | pcan_usb_pro_fd: dtseg1 1..16 dtseg2 1..8 dsjw 1..4 dbrp 1..1024 \ | ||
1234 | dbrp-inc 1 | ||
1235 | clock 80000000 | ||
1236 | |||
1237 | Example when 'fd-non-iso on' is added on this switchable CAN FD adapter: | ||
1238 | can <FD,FD-NON-ISO> state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0 | ||
1182 | 1239 | ||
1183 | 6.7 Supported CAN hardware | 1240 | 6.7 Supported CAN hardware |
1184 | 1241 | ||
diff --git a/Documentation/networking/filter.txt b/Documentation/networking/filter.txt index 135581f015e1..96da119a47e7 100644 --- a/Documentation/networking/filter.txt +++ b/Documentation/networking/filter.txt | |||
@@ -596,9 +596,9 @@ skb pointer). All constraints and restrictions from bpf_check_classic() apply | |||
596 | before a conversion to the new layout is being done behind the scenes! | 596 | before a conversion to the new layout is being done behind the scenes! |
597 | 597 | ||
598 | Currently, the classic BPF format is being used for JITing on most of the | 598 | Currently, the classic BPF format is being used for JITing on most of the |
599 | architectures. Only x86-64 performs JIT compilation from eBPF instruction set, | 599 | architectures. x86-64, aarch64 and s390x perform JIT compilation from eBPF |
600 | however, future work will migrate other JIT compilers as well, so that they | 600 | instruction set, however, future work will migrate other JIT compilers as well, |
601 | will profit from the very same benefits. | 601 | so that they will profit from the very same benefits. |
602 | 602 | ||
603 | Some core changes of the new internal format: | 603 | Some core changes of the new internal format: |
604 | 604 | ||
diff --git a/Documentation/networking/ieee802154.txt b/Documentation/networking/ieee802154.txt index 1700756af057..aa69ccc481db 100644 --- a/Documentation/networking/ieee802154.txt +++ b/Documentation/networking/ieee802154.txt | |||
@@ -7,11 +7,11 @@ Introduction | |||
7 | The IEEE 802.15.4 working group focuses on standardization of bottom | 7 | The IEEE 802.15.4 working group focuses on standardization of bottom |
8 | two layers: Medium Access Control (MAC) and Physical (PHY). And there | 8 | two layers: Medium Access Control (MAC) and Physical (PHY). And there |
9 | are mainly two options available for upper layers: | 9 | are mainly two options available for upper layers: |
10 | - ZigBee - proprietary protocol from ZigBee Alliance | 10 | - ZigBee - proprietary protocol from the ZigBee Alliance |
11 | - 6LowPAN - IPv6 networking over low rate personal area networks | 11 | - 6LoWPAN - IPv6 networking over low rate personal area networks |
12 | 12 | ||
13 | The Linux-ZigBee project goal is to provide complete implementation | 13 | The linux-wpan project goal is to provide a complete implementation |
14 | of IEEE 802.15.4 and 6LoWPAN protocols. IEEE 802.15.4 is a stack | 14 | of the IEEE 802.15.4 and 6LoWPAN protocols. IEEE 802.15.4 is a stack |
15 | of protocols for organizing Low-Rate Wireless Personal Area Networks. | 15 | of protocols for organizing Low-Rate Wireless Personal Area Networks. |
16 | 16 | ||
17 | The stack is composed of three main parts: | 17 | The stack is composed of three main parts: |
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index ebe94f2cab98..2ea4c45cf1c8 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -384,6 +384,14 @@ tcp_mem - vector of 3 INTEGERs: min, pressure, max | |||
384 | Defaults are calculated at boot time from amount of available | 384 | Defaults are calculated at boot time from amount of available |
385 | memory. | 385 | memory. |
386 | 386 | ||
387 | tcp_min_rtt_wlen - INTEGER | ||
388 | The window length of the windowed min filter to track the minimum RTT. | ||
389 | A shorter window lets a flow more quickly pick up new (higher) | ||
390 | minimum RTT when it is moved to a longer path (e.g., due to traffic | ||
391 | engineering). A longer window makes the filter more resistant to RTT | ||
392 | inflations such as transient congestion. The unit is seconds. | ||
393 | Default: 300 | ||
394 | |||
387 | tcp_moderate_rcvbuf - BOOLEAN | 395 | tcp_moderate_rcvbuf - BOOLEAN |
388 | If set, TCP performs receive buffer auto-tuning, attempting to | 396 | If set, TCP performs receive buffer auto-tuning, attempting to |
389 | automatically size the buffer (no greater than tcp_rmem[2]) to | 397 | automatically size the buffer (no greater than tcp_rmem[2]) to |
@@ -425,6 +433,15 @@ tcp_orphan_retries - INTEGER | |||
425 | you should think about lowering this value, such sockets | 433 | you should think about lowering this value, such sockets |
426 | may consume significant resources. Cf. tcp_max_orphans. | 434 | may consume significant resources. Cf. tcp_max_orphans. |
427 | 435 | ||
436 | tcp_recovery - INTEGER | ||
437 | This value is a bitmap to enable various experimental loss recovery | ||
438 | features. | ||
439 | |||
440 | RACK: 0x1 enables the RACK loss detection for fast detection of lost | ||
441 | retransmissions and tail drops. | ||
442 | |||
443 | Default: 0x1 | ||
444 | |||
428 | tcp_reordering - INTEGER | 445 | tcp_reordering - INTEGER |
429 | Initial reordering level of packets in a TCP stream. | 446 | Initial reordering level of packets in a TCP stream. |
430 | TCP stack can then dynamically adjust flow reordering level | 447 | TCP stack can then dynamically adjust flow reordering level |
@@ -692,7 +709,7 @@ tcp_limit_output_bytes - INTEGER | |||
692 | typical pfifo_fast qdiscs. | 709 | typical pfifo_fast qdiscs. |
693 | tcp_limit_output_bytes limits the number of bytes on qdisc | 710 | tcp_limit_output_bytes limits the number of bytes on qdisc |
694 | or device to reduce artificial RTT/cwnd and reduce bufferbloat. | 711 | or device to reduce artificial RTT/cwnd and reduce bufferbloat. |
695 | Default: 131072 | 712 | Default: 262144 |
696 | 713 | ||
697 | tcp_challenge_ack_limit - INTEGER | 714 | tcp_challenge_ack_limit - INTEGER |
698 | Limits number of Challenge ACK sent per second, as recommended | 715 | Limits number of Challenge ACK sent per second, as recommended |
@@ -1199,7 +1216,8 @@ tag - INTEGER | |||
1199 | xfrm4_gc_thresh - INTEGER | 1216 | xfrm4_gc_thresh - INTEGER |
1200 | The threshold at which we will start garbage collecting for IPv4 | 1217 | The threshold at which we will start garbage collecting for IPv4 |
1201 | destination cache entries. At twice this value the system will | 1218 | destination cache entries. At twice this value the system will |
1202 | refuse new allocations. | 1219 | refuse new allocations. The value must be set below the flowcache |
1220 | limit (4096 * number of online cpus) to take effect. | ||
1203 | 1221 | ||
1204 | igmp_link_local_mcast_reports - BOOLEAN | 1222 | igmp_link_local_mcast_reports - BOOLEAN |
1205 | Enable IGMP reports for link local multicast groups in the | 1223 | Enable IGMP reports for link local multicast groups in the |
@@ -1645,7 +1663,8 @@ ratelimit - INTEGER | |||
1645 | xfrm6_gc_thresh - INTEGER | 1663 | xfrm6_gc_thresh - INTEGER |
1646 | The threshold at which we will start garbage collecting for IPv6 | 1664 | The threshold at which we will start garbage collecting for IPv6 |
1647 | destination cache entries. At twice this value the system will | 1665 | destination cache entries. At twice this value the system will |
1648 | refuse new allocations. | 1666 | refuse new allocations. The value must be set below the flowcache |
1667 | limit (4096 * number of online cpus) to take effect. | ||
1649 | 1668 | ||
1650 | 1669 | ||
1651 | IPv6 Update by: | 1670 | IPv6 Update by: |
diff --git a/Documentation/networking/ipvs-sysctl.txt b/Documentation/networking/ipvs-sysctl.txt index 3ba709531adb..e6b1c025fdd8 100644 --- a/Documentation/networking/ipvs-sysctl.txt +++ b/Documentation/networking/ipvs-sysctl.txt | |||
@@ -157,6 +157,16 @@ expire_quiescent_template - BOOLEAN | |||
157 | persistence template if it is to be used to schedule a new | 157 | persistence template if it is to be used to schedule a new |
158 | connection and the destination server is quiescent. | 158 | connection and the destination server is quiescent. |
159 | 159 | ||
160 | ignore_tunneled - BOOLEAN | ||
161 | 0 - disabled (default) | ||
162 | not 0 - enabled | ||
163 | |||
164 | If set, ipvs will set the ipvs_property on all packets which are of | ||
165 | unrecognized protocols. This prevents us from routing tunneled | ||
166 | protocols like ipip, which is useful to prevent rescheduling | ||
167 | packets that have been tunneled to the ipvs host (i.e. to prevent | ||
168 | ipvs routing loops when ipvs is also acting as a real server). | ||
169 | |||
160 | nat_icmp_send - BOOLEAN | 170 | nat_icmp_send - BOOLEAN |
161 | 0 - disabled (default) | 171 | 0 - disabled (default) |
162 | not 0 - enabled | 172 | not 0 - enabled |
diff --git a/Documentation/networking/l2tp.txt b/Documentation/networking/l2tp.txt index c74434de2fa5..4650a00ed012 100644 --- a/Documentation/networking/l2tp.txt +++ b/Documentation/networking/l2tp.txt | |||
@@ -213,15 +213,12 @@ To create an L2TPv3 ethernet pseudowire between local host 192.168.1.1 | |||
213 | and peer 192.168.1.2, using IP addresses 10.5.1.1 and 10.5.1.2 for the | 213 | and peer 192.168.1.2, using IP addresses 10.5.1.1 and 10.5.1.2 for the |
214 | tunnel endpoints:- | 214 | tunnel endpoints:- |
215 | 215 | ||
216 | # modprobe l2tp_eth | ||
217 | # modprobe l2tp_netlink | ||
218 | |||
219 | # ip l2tp add tunnel tunnel_id 1 peer_tunnel_id 1 udp_sport 5000 \ | 216 | # ip l2tp add tunnel tunnel_id 1 peer_tunnel_id 1 udp_sport 5000 \ |
220 | udp_dport 5000 encap udp local 192.168.1.1 remote 192.168.1.2 | 217 | udp_dport 5000 encap udp local 192.168.1.1 remote 192.168.1.2 |
221 | # ip l2tp add session tunnel_id 1 session_id 1 peer_session_id 1 | 218 | # ip l2tp add session tunnel_id 1 session_id 1 peer_session_id 1 |
222 | # ifconfig -a | 219 | # ip -s -d show dev l2tpeth0 |
223 | # ip addr add 10.5.1.2/32 peer 10.5.1.1/32 dev l2tpeth0 | 220 | # ip addr add 10.5.1.2/32 peer 10.5.1.1/32 dev l2tpeth0 |
224 | # ifconfig l2tpeth0 up | 221 | # ip li set dev l2tpeth0 up |
225 | 222 | ||
226 | Choose IP addresses to be the address of a local IP interface and that | 223 | Choose IP addresses to be the address of a local IP interface and that |
227 | of the remote system. The IP addresses of the l2tpeth0 interface can be | 224 | of the remote system. The IP addresses of the l2tpeth0 interface can be |
diff --git a/Documentation/networking/switchdev.txt b/Documentation/networking/switchdev.txt index 476df0496686..91994134efca 100644 --- a/Documentation/networking/switchdev.txt +++ b/Documentation/networking/switchdev.txt | |||
@@ -115,7 +115,7 @@ Switch ID | |||
115 | ^^^^^^^^^ | 115 | ^^^^^^^^^ |
116 | 116 | ||
117 | The switchdev driver must implement the switchdev op switchdev_port_attr_get | 117 | The switchdev driver must implement the switchdev op switchdev_port_attr_get |
118 | for SWITCHDEV_ATTR_PORT_PARENT_ID for each port netdev, returning the same | 118 | for SWITCHDEV_ATTR_ID_PORT_PARENT_ID for each port netdev, returning the same |
119 | physical ID for each port of a switch. The ID must be unique between switches | 119 | physical ID for each port of a switch. The ID must be unique between switches |
120 | on the same system. The ID does not need to be unique between switches on | 120 | on the same system. The ID does not need to be unique between switches on |
121 | different systems. | 121 | different systems. |
@@ -178,7 +178,7 @@ entries are installed, for example, using iproute2 bridge cmd: | |||
178 | bridge fdb add ADDR dev DEV [vlan VID] [self] | 178 | bridge fdb add ADDR dev DEV [vlan VID] [self] |
179 | 179 | ||
180 | The driver should use the helper switchdev_port_fdb_xxx ops for ndo_fdb_xxx | 180 | The driver should use the helper switchdev_port_fdb_xxx ops for ndo_fdb_xxx |
181 | ops, and handle add/delete/dump of SWITCHDEV_OBJ_PORT_FDB object using | 181 | ops, and handle add/delete/dump of SWITCHDEV_OBJ_ID_PORT_FDB object using |
182 | switchdev_port_obj_xxx ops. | 182 | switchdev_port_obj_xxx ops. |
183 | 183 | ||
184 | XXX: what should be done if offloading this rule to hardware fails (for | 184 | XXX: what should be done if offloading this rule to hardware fails (for |
@@ -233,26 +233,27 @@ the bridge's FDB. It's possible, but not optimal, to enable learning on the | |||
233 | device port and on the bridge port, and disable learning_sync. | 233 | device port and on the bridge port, and disable learning_sync. |
234 | 234 | ||
235 | To support learning and learning_sync port attributes, the driver implements | 235 | To support learning and learning_sync port attributes, the driver implements |
236 | switchdev op switchdev_port_attr_get/set for SWITCHDEV_ATTR_PORT_BRIDGE_FLAGS. | 236 | switchdev op switchdev_port_attr_get/set for |
237 | The driver should initialize the attributes to the hardware defaults. | 237 | SWITCHDEV_ATTR_PORT_ID_BRIDGE_FLAGS. The driver should initialize the attributes |
238 | to the hardware defaults. | ||
238 | 239 | ||
239 | FDB Ageing | 240 | FDB Ageing |
240 | ^^^^^^^^^^ | 241 | ^^^^^^^^^^ |
241 | 242 | ||
242 | There are two FDB ageing models supported: 1) ageing by the device, and 2) | 243 | The bridge will skip ageing FDB entries marked with NTF_EXT_LEARNED and it is |
243 | ageing by the kernel. Ageing by the device is preferred if many FDB entries | 244 | the responsibility of the port driver/device to age out these entries. If the |
244 | are supported. The driver calls call_switchdev_notifiers(SWITCHDEV_FDB_DEL, | 245 | port device supports ageing, when the FDB entry expires, it will notify the |
245 | ...) to age out the FDB entry. In this model, ageing by the kernel should be | 246 | driver which in turn will notify the bridge with SWITCHDEV_FDB_DEL. If the |
246 | turned off. XXX: how to turn off ageing in kernel on a per-port basis or | 247 | device does not support ageing, the driver can simulate ageing using a |
247 | otherwise prevent the kernel from ageing out the FDB entry? | 248 | garbage collection timer to monitor FBD entries. Expired entries will be |
248 | 249 | notified to the bridge using SWITCHDEV_FDB_DEL. See rocker driver for | |
249 | In the kernel ageing model, the standard bridge ageing mechanism is used to age | 250 | example of driver running ageing timer. |
250 | out stale FDB entries. To keep an FDB entry "alive", the driver should refresh | 251 | |
251 | the FDB entry by calling call_switchdev_notifiers(SWITCHDEV_FDB_ADD, ...). The | 252 | To keep an NTF_EXT_LEARNED entry "alive", the driver should refresh the FDB |
253 | entry by calling call_switchdev_notifiers(SWITCHDEV_FDB_ADD, ...). The | ||
252 | notification will reset the FDB entry's last-used time to now. The driver | 254 | notification will reset the FDB entry's last-used time to now. The driver |
253 | should rate limit refresh notifications, for example, no more than once a | 255 | should rate limit refresh notifications, for example, no more than once a |
254 | second. If the FDB entry expires, fdb_delete is called to remove entry from | 256 | second. (The last-used time is visible using the bridge -s fdb option). |
255 | the device. | ||
256 | 257 | ||
257 | STP State Change on Port | 258 | STP State Change on Port |
258 | ^^^^^^^^^^^^^^^^^^^^^^^^ | 259 | ^^^^^^^^^^^^^^^^^^^^^^^^ |
@@ -260,7 +261,7 @@ STP State Change on Port | |||
260 | Internally or with a third-party STP protocol implementation (e.g. mstpd), the | 261 | Internally or with a third-party STP protocol implementation (e.g. mstpd), the |
261 | bridge driver maintains the STP state for ports, and will notify the switch | 262 | bridge driver maintains the STP state for ports, and will notify the switch |
262 | driver of STP state change on a port using the switchdev op | 263 | driver of STP state change on a port using the switchdev op |
263 | switchdev_attr_port_set for SWITCHDEV_ATTR_PORT_STP_UPDATE. | 264 | switchdev_attr_port_set for SWITCHDEV_ATTR_PORT_ID_STP_UPDATE. |
264 | 265 | ||
265 | State is one of BR_STATE_*. The switch driver can use STP state updates to | 266 | State is one of BR_STATE_*. The switch driver can use STP state updates to |
266 | update ingress packet filter list for the port. For example, if port is | 267 | update ingress packet filter list for the port. For example, if port is |
@@ -277,8 +278,8 @@ Flooding L2 domain | |||
277 | For a given L2 VLAN domain, the switch device should flood multicast/broadcast | 278 | For a given L2 VLAN domain, the switch device should flood multicast/broadcast |
278 | and unknown unicast packets to all ports in domain, if allowed by port's | 279 | and unknown unicast packets to all ports in domain, if allowed by port's |
279 | current STP state. The switch driver, knowing which ports are within which | 280 | current STP state. The switch driver, knowing which ports are within which |
280 | vlan L2 domain, can program the switch device for flooding. The packet should | 281 | vlan L2 domain, can program the switch device for flooding. The packet may |
281 | also be sent to the port netdev for processing by the bridge driver. The | 282 | be sent to the port netdev for processing by the bridge driver. The |
282 | bridge should not reflood the packet to the same ports the device flooded, | 283 | bridge should not reflood the packet to the same ports the device flooded, |
283 | otherwise there will be duplicate packets on the wire. | 284 | otherwise there will be duplicate packets on the wire. |
284 | 285 | ||
@@ -297,6 +298,9 @@ packets up to the bridge driver for flooding. This is not ideal as the number | |||
297 | of ports scale in the L2 domain as the device is much more efficient at | 298 | of ports scale in the L2 domain as the device is much more efficient at |
298 | flooding packets that software. | 299 | flooding packets that software. |
299 | 300 | ||
301 | If supported by the device, flood control can be offloaded to it, preventing | ||
302 | certain netdevs from flooding unicast traffic for which there is no FDB entry. | ||
303 | |||
300 | IGMP Snooping | 304 | IGMP Snooping |
301 | ^^^^^^^^^^^^^ | 305 | ^^^^^^^^^^^^^ |
302 | 306 | ||
@@ -316,9 +320,9 @@ SWITCHDEV_OBJ_IPV[4|6]_FIB object using switchdev_port_obj_xxx ops. | |||
316 | switchdev_port_obj_add is used for both adding a new FIB entry to the device, | 320 | switchdev_port_obj_add is used for both adding a new FIB entry to the device, |
317 | or modifying an existing entry on the device. | 321 | or modifying an existing entry on the device. |
318 | 322 | ||
319 | XXX: Currently, only SWITCHDEV_OBJ_IPV4_FIB objects are supported. | 323 | XXX: Currently, only SWITCHDEV_OBJ_ID_IPV4_FIB objects are supported. |
320 | 324 | ||
321 | SWITCHDEV_OBJ_IPV4_FIB object passes: | 325 | SWITCHDEV_OBJ_ID_IPV4_FIB object passes: |
322 | 326 | ||
323 | struct switchdev_obj_ipv4_fib { /* IPV4_FIB */ | 327 | struct switchdev_obj_ipv4_fib { /* IPV4_FIB */ |
324 | u32 dst; | 328 | u32 dst; |
@@ -369,3 +373,22 @@ The driver can monitor for updates to arp_tbl using the netevent notifier | |||
369 | NETEVENT_NEIGH_UPDATE. The device can be programmed with resolved nexthops | 373 | NETEVENT_NEIGH_UPDATE. The device can be programmed with resolved nexthops |
370 | for the routes as arp_tbl updates. The driver implements ndo_neigh_destroy | 374 | for the routes as arp_tbl updates. The driver implements ndo_neigh_destroy |
371 | to know when arp_tbl neighbor entries are purged from the port. | 375 | to know when arp_tbl neighbor entries are purged from the port. |
376 | |||
377 | Transaction item queue | ||
378 | ^^^^^^^^^^^^^^^^^^^^^^ | ||
379 | |||
380 | For switchdev ops attr_set and obj_add, there is a 2 phase transaction model | ||
381 | used. First phase is to "prepare" anything needed, including various checks, | ||
382 | memory allocation, etc. The goal is to handle the stuff that is not unlikely | ||
383 | to fail here. The second phase is to "commit" the actual changes. | ||
384 | |||
385 | Switchdev provides an inftrastructure for sharing items (for example memory | ||
386 | allocations) between the two phases. | ||
387 | |||
388 | The object created by a driver in "prepare" phase and it is queued up by: | ||
389 | switchdev_trans_item_enqueue() | ||
390 | During the "commit" phase, the driver gets the object by: | ||
391 | switchdev_trans_item_dequeue() | ||
392 | |||
393 | If a transaction is aborted during "prepare" phase, switchdev code will handle | ||
394 | cleanup of the queued-up objects. | ||
diff --git a/Documentation/networking/vrf.txt b/Documentation/networking/vrf.txt new file mode 100644 index 000000000000..d52aa10cfe91 --- /dev/null +++ b/Documentation/networking/vrf.txt | |||
@@ -0,0 +1,393 @@ | |||
1 | Virtual Routing and Forwarding (VRF) | ||
2 | ==================================== | ||
3 | The VRF device combined with ip rules provides the ability to create virtual | ||
4 | routing and forwarding domains (aka VRFs, VRF-lite to be specific) in the | ||
5 | Linux network stack. One use case is the multi-tenancy problem where each | ||
6 | tenant has their own unique routing tables and in the very least need | ||
7 | different default gateways. | ||
8 | |||
9 | Processes can be "VRF aware" by binding a socket to the VRF device. Packets | ||
10 | through the socket then use the routing table associated with the VRF | ||
11 | device. An important feature of the VRF device implementation is that it | ||
12 | impacts only Layer 3 and above so L2 tools (e.g., LLDP) are not affected | ||
13 | (ie., they do not need to be run in each VRF). The design also allows | ||
14 | the use of higher priority ip rules (Policy Based Routing, PBR) to take | ||
15 | precedence over the VRF device rules directing specific traffic as desired. | ||
16 | |||
17 | In addition, VRF devices allow VRFs to be nested within namespaces. For | ||
18 | example network namespaces provide separation of network interfaces at L1 | ||
19 | (Layer 1 separation), VLANs on the interfaces within a namespace provide | ||
20 | L2 separation and then VRF devices provide L3 separation. | ||
21 | |||
22 | Design | ||
23 | ------ | ||
24 | A VRF device is created with an associated route table. Network interfaces | ||
25 | are then enslaved to a VRF device: | ||
26 | |||
27 | +-----------------------------+ | ||
28 | | vrf-blue | ===> route table 10 | ||
29 | +-----------------------------+ | ||
30 | | | | | ||
31 | +------+ +------+ +-------------+ | ||
32 | | eth1 | | eth2 | ... | bond1 | | ||
33 | +------+ +------+ +-------------+ | ||
34 | | | | ||
35 | +------+ +------+ | ||
36 | | eth8 | | eth9 | | ||
37 | +------+ +------+ | ||
38 | |||
39 | Packets received on an enslaved device and are switched to the VRF device | ||
40 | using an rx_handler which gives the impression that packets flow through | ||
41 | the VRF device. Similarly on egress routing rules are used to send packets | ||
42 | to the VRF device driver before getting sent out the actual interface. This | ||
43 | allows tcpdump on a VRF device to capture all packets into and out of the | ||
44 | VRF as a whole.[1] Similiarly, netfilter [2] and tc rules can be applied | ||
45 | using the VRF device to specify rules that apply to the VRF domain as a whole. | ||
46 | |||
47 | [1] Packets in the forwarded state do not flow through the device, so those | ||
48 | packets are not seen by tcpdump. Will revisit this limitation in a | ||
49 | future release. | ||
50 | |||
51 | [2] Iptables on ingress is limited to NF_INET_PRE_ROUTING only with skb->dev | ||
52 | set to real ingress device and egress is limited to NF_INET_POST_ROUTING. | ||
53 | Will revisit this limitation in a future release. | ||
54 | |||
55 | |||
56 | Setup | ||
57 | ----- | ||
58 | 1. VRF device is created with an association to a FIB table. | ||
59 | e.g, ip link add vrf-blue type vrf table 10 | ||
60 | ip link set dev vrf-blue up | ||
61 | |||
62 | 2. Rules are added that send lookups to the associated FIB table when the | ||
63 | iif or oif is the VRF device. e.g., | ||
64 | ip ru add oif vrf-blue table 10 | ||
65 | ip ru add iif vrf-blue table 10 | ||
66 | |||
67 | Set the default route for the table (and hence default route for the VRF). | ||
68 | e.g, ip route add table 10 prohibit default | ||
69 | |||
70 | 3. Enslave L3 interfaces to a VRF device. | ||
71 | e.g, ip link set dev eth1 master vrf-blue | ||
72 | |||
73 | Local and connected routes for enslaved devices are automatically moved to | ||
74 | the table associated with VRF device. Any additional routes depending on | ||
75 | the enslaved device will need to be reinserted following the enslavement. | ||
76 | |||
77 | 4. Additional VRF routes are added to associated table. | ||
78 | e.g., ip route add table 10 ... | ||
79 | |||
80 | |||
81 | Applications | ||
82 | ------------ | ||
83 | Applications that are to work within a VRF need to bind their socket to the | ||
84 | VRF device: | ||
85 | |||
86 | setsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, dev, strlen(dev)+1); | ||
87 | |||
88 | or to specify the output device using cmsg and IP_PKTINFO. | ||
89 | |||
90 | |||
91 | Limitations | ||
92 | ----------- | ||
93 | Index of original ingress interface is not available via cmsg. Will address | ||
94 | soon. | ||
95 | |||
96 | ################################################################################ | ||
97 | |||
98 | Using iproute2 for VRFs | ||
99 | ======================= | ||
100 | VRF devices do *not* have to start with 'vrf-'. That is a convention used here | ||
101 | for emphasis of the device type, similar to use of 'br' in bridge names. | ||
102 | |||
103 | 1. Create a VRF | ||
104 | |||
105 | To instantiate a VRF device and associate it with a table: | ||
106 | $ ip link add dev NAME type vrf table ID | ||
107 | |||
108 | Remember to add the ip rules as well: | ||
109 | $ ip ru add oif NAME table 10 | ||
110 | $ ip ru add iif NAME table 10 | ||
111 | $ ip -6 ru add oif NAME table 10 | ||
112 | $ ip -6 ru add iif NAME table 10 | ||
113 | |||
114 | Without the rules route lookups are not directed to the table. | ||
115 | |||
116 | For example: | ||
117 | $ ip link add dev vrf-blue type vrf table 10 | ||
118 | $ ip ru add pref 200 oif vrf-blue table 10 | ||
119 | $ ip ru add pref 200 iif vrf-blue table 10 | ||
120 | $ ip -6 ru add pref 200 oif vrf-blue table 10 | ||
121 | $ ip -6 ru add pref 200 iif vrf-blue table 10 | ||
122 | |||
123 | |||
124 | 2. List VRFs | ||
125 | |||
126 | To list VRFs that have been created: | ||
127 | $ ip [-d] link show type vrf | ||
128 | NOTE: The -d option is needed to show the table id | ||
129 | |||
130 | For example: | ||
131 | $ ip -d link show type vrf | ||
132 | 11: vrf-mgmt: <NOARP,MASTER,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 | ||
133 | link/ether 72:b3:ba:91:e2:24 brd ff:ff:ff:ff:ff:ff promiscuity 0 | ||
134 | vrf table 1 addrgenmode eui64 | ||
135 | 12: vrf-red: <NOARP,MASTER,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 | ||
136 | link/ether b6:6f:6e:f6:da:73 brd ff:ff:ff:ff:ff:ff promiscuity 0 | ||
137 | vrf table 10 addrgenmode eui64 | ||
138 | 13: vrf-blue: <NOARP,MASTER,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 | ||
139 | link/ether 36:62:e8:7d:bb:8c brd ff:ff:ff:ff:ff:ff promiscuity 0 | ||
140 | vrf table 66 addrgenmode eui64 | ||
141 | 14: vrf-green: <NOARP,MASTER,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 | ||
142 | link/ether e6:28:b8:63:70:bb brd ff:ff:ff:ff:ff:ff promiscuity 0 | ||
143 | vrf table 81 addrgenmode eui64 | ||
144 | |||
145 | |||
146 | Or in brief output: | ||
147 | |||
148 | $ ip -br link show type vrf | ||
149 | vrf-mgmt UP 72:b3:ba:91:e2:24 <NOARP,MASTER,UP,LOWER_UP> | ||
150 | vrf-red UP b6:6f:6e:f6:da:73 <NOARP,MASTER,UP,LOWER_UP> | ||
151 | vrf-blue UP 36:62:e8:7d:bb:8c <NOARP,MASTER,UP,LOWER_UP> | ||
152 | vrf-green UP e6:28:b8:63:70:bb <NOARP,MASTER,UP,LOWER_UP> | ||
153 | |||
154 | |||
155 | 3. Assign a Network Interface to a VRF | ||
156 | |||
157 | Network interfaces are assigned to a VRF by enslaving the netdevice to a | ||
158 | VRF device: | ||
159 | $ ip link set dev NAME master VRF-NAME | ||
160 | |||
161 | On enslavement connected and local routes are automatically moved to the | ||
162 | table associated with the VRF device. | ||
163 | |||
164 | For example: | ||
165 | $ ip link set dev eth0 master vrf-mgmt | ||
166 | |||
167 | |||
168 | 4. Show Devices Assigned to a VRF | ||
169 | |||
170 | To show devices that have been assigned to a specific VRF add the master | ||
171 | option to the ip command: | ||
172 | $ ip link show master VRF-NAME | ||
173 | |||
174 | For example: | ||
175 | $ ip link show master vrf-red | ||
176 | 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master vrf-red state UP mode DEFAULT group default qlen 1000 | ||
177 | link/ether 02:00:00:00:02:02 brd ff:ff:ff:ff:ff:ff | ||
178 | 4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master vrf-red state UP mode DEFAULT group default qlen 1000 | ||
179 | link/ether 02:00:00:00:02:03 brd ff:ff:ff:ff:ff:ff | ||
180 | 7: eth5: <BROADCAST,MULTICAST> mtu 1500 qdisc noop master vrf-red state DOWN mode DEFAULT group default qlen 1000 | ||
181 | link/ether 02:00:00:00:02:06 brd ff:ff:ff:ff:ff:ff | ||
182 | |||
183 | |||
184 | Or using the brief output: | ||
185 | $ ip -br link show master vrf-red | ||
186 | eth1 UP 02:00:00:00:02:02 <BROADCAST,MULTICAST,UP,LOWER_UP> | ||
187 | eth2 UP 02:00:00:00:02:03 <BROADCAST,MULTICAST,UP,LOWER_UP> | ||
188 | eth5 DOWN 02:00:00:00:02:06 <BROADCAST,MULTICAST> | ||
189 | |||
190 | |||
191 | 5. Show Neighbor Entries for a VRF | ||
192 | |||
193 | To list neighbor entries associated with devices enslaved to a VRF device | ||
194 | add the master option to the ip command: | ||
195 | $ ip [-6] neigh show master VRF-NAME | ||
196 | |||
197 | For example: | ||
198 | $ ip neigh show master vrf-red | ||
199 | 10.2.1.254 dev eth1 lladdr a6:d9:c7:4f:06:23 REACHABLE | ||
200 | 10.2.2.254 dev eth2 lladdr 5e:54:01:6a:ee:80 REACHABLE | ||
201 | |||
202 | $ ip -6 neigh show master vrf-red | ||
203 | 2002:1::64 dev eth1 lladdr a6:d9:c7:4f:06:23 REACHABLE | ||
204 | |||
205 | |||
206 | 6. Show Addresses for a VRF | ||
207 | |||
208 | To show addresses for interfaces associated with a VRF add the master | ||
209 | option to the ip command: | ||
210 | $ ip addr show master VRF-NAME | ||
211 | |||
212 | For example: | ||
213 | $ ip addr show master vrf-red | ||
214 | 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master vrf-red state UP group default qlen 1000 | ||
215 | link/ether 02:00:00:00:02:02 brd ff:ff:ff:ff:ff:ff | ||
216 | inet 10.2.1.2/24 brd 10.2.1.255 scope global eth1 | ||
217 | valid_lft forever preferred_lft forever | ||
218 | inet6 2002:1::2/120 scope global | ||
219 | valid_lft forever preferred_lft forever | ||
220 | inet6 fe80::ff:fe00:202/64 scope link | ||
221 | valid_lft forever preferred_lft forever | ||
222 | 4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master vrf-red state UP group default qlen 1000 | ||
223 | link/ether 02:00:00:00:02:03 brd ff:ff:ff:ff:ff:ff | ||
224 | inet 10.2.2.2/24 brd 10.2.2.255 scope global eth2 | ||
225 | valid_lft forever preferred_lft forever | ||
226 | inet6 2002:2::2/120 scope global | ||
227 | valid_lft forever preferred_lft forever | ||
228 | inet6 fe80::ff:fe00:203/64 scope link | ||
229 | valid_lft forever preferred_lft forever | ||
230 | 7: eth5: <BROADCAST,MULTICAST> mtu 1500 qdisc noop master vrf-red state DOWN group default qlen 1000 | ||
231 | link/ether 02:00:00:00:02:06 brd ff:ff:ff:ff:ff:ff | ||
232 | |||
233 | Or in brief format: | ||
234 | $ ip -br addr show master vrf-red | ||
235 | eth1 UP 10.2.1.2/24 2002:1::2/120 fe80::ff:fe00:202/64 | ||
236 | eth2 UP 10.2.2.2/24 2002:2::2/120 fe80::ff:fe00:203/64 | ||
237 | eth5 DOWN | ||
238 | |||
239 | |||
240 | 7. Show Routes for a VRF | ||
241 | |||
242 | To show routes for a VRF use the ip command to display the table associated | ||
243 | with the VRF device: | ||
244 | $ ip [-6] route show table ID | ||
245 | |||
246 | For example: | ||
247 | $ ip route show table vrf-red | ||
248 | prohibit default | ||
249 | broadcast 10.2.1.0 dev eth1 proto kernel scope link src 10.2.1.2 | ||
250 | 10.2.1.0/24 dev eth1 proto kernel scope link src 10.2.1.2 | ||
251 | local 10.2.1.2 dev eth1 proto kernel scope host src 10.2.1.2 | ||
252 | broadcast 10.2.1.255 dev eth1 proto kernel scope link src 10.2.1.2 | ||
253 | broadcast 10.2.2.0 dev eth2 proto kernel scope link src 10.2.2.2 | ||
254 | 10.2.2.0/24 dev eth2 proto kernel scope link src 10.2.2.2 | ||
255 | local 10.2.2.2 dev eth2 proto kernel scope host src 10.2.2.2 | ||
256 | broadcast 10.2.2.255 dev eth2 proto kernel scope link src 10.2.2.2 | ||
257 | |||
258 | $ ip -6 route show table vrf-red | ||
259 | local 2002:1:: dev lo proto none metric 0 pref medium | ||
260 | local 2002:1::2 dev lo proto none metric 0 pref medium | ||
261 | 2002:1::/120 dev eth1 proto kernel metric 256 pref medium | ||
262 | local 2002:2:: dev lo proto none metric 0 pref medium | ||
263 | local 2002:2::2 dev lo proto none metric 0 pref medium | ||
264 | 2002:2::/120 dev eth2 proto kernel metric 256 pref medium | ||
265 | local fe80:: dev lo proto none metric 0 pref medium | ||
266 | local fe80:: dev lo proto none metric 0 pref medium | ||
267 | local fe80::ff:fe00:202 dev lo proto none metric 0 pref medium | ||
268 | local fe80::ff:fe00:203 dev lo proto none metric 0 pref medium | ||
269 | fe80::/64 dev eth1 proto kernel metric 256 pref medium | ||
270 | fe80::/64 dev eth2 proto kernel metric 256 pref medium | ||
271 | ff00::/8 dev vrf-red metric 256 pref medium | ||
272 | ff00::/8 dev eth1 metric 256 pref medium | ||
273 | ff00::/8 dev eth2 metric 256 pref medium | ||
274 | |||
275 | |||
276 | 8. Route Lookup for a VRF | ||
277 | |||
278 | A test route lookup can be done for a VRF by adding the oif option to ip: | ||
279 | $ ip [-6] route get oif VRF-NAME ADDRESS | ||
280 | |||
281 | For example: | ||
282 | $ ip route get 10.2.1.40 oif vrf-red | ||
283 | 10.2.1.40 dev eth1 table vrf-red src 10.2.1.2 | ||
284 | cache | ||
285 | |||
286 | $ ip -6 route get 2002:1::32 oif vrf-red | ||
287 | 2002:1::32 from :: dev eth1 table vrf-red proto kernel src 2002:1::2 metric 256 pref medium | ||
288 | |||
289 | |||
290 | 9. Removing Network Interface from a VRF | ||
291 | |||
292 | Network interfaces are removed from a VRF by breaking the enslavement to | ||
293 | the VRF device: | ||
294 | $ ip link set dev NAME nomaster | ||
295 | |||
296 | Connected routes are moved back to the default table and local entries are | ||
297 | moved to the local table. | ||
298 | |||
299 | For example: | ||
300 | $ ip link set dev eth0 nomaster | ||
301 | |||
302 | -------------------------------------------------------------------------------- | ||
303 | |||
304 | Commands used in this example: | ||
305 | |||
306 | cat >> /etc/iproute2/rt_tables <<EOF | ||
307 | 1 vrf-mgmt | ||
308 | 10 vrf-red | ||
309 | 66 vrf-blue | ||
310 | 81 vrf-green | ||
311 | EOF | ||
312 | |||
313 | function vrf_create | ||
314 | { | ||
315 | VRF=$1 | ||
316 | TBID=$2 | ||
317 | # create VRF device | ||
318 | ip link add vrf-${VRF} type vrf table ${TBID} | ||
319 | |||
320 | # add rules that direct lookups to vrf table | ||
321 | ip ru add pref 200 oif vrf-${VRF} table ${TBID} | ||
322 | ip ru add pref 200 iif vrf-${VRF} table ${TBID} | ||
323 | ip -6 ru add pref 200 oif vrf-${VRF} table ${TBID} | ||
324 | ip -6 ru add pref 200 iif vrf-${VRF} table ${TBID} | ||
325 | |||
326 | if [ "${VRF}" != "mgmt" ]; then | ||
327 | ip route add table ${TBID} prohibit default | ||
328 | fi | ||
329 | ip link set dev vrf-${VRF} up | ||
330 | ip link set dev vrf-${VRF} state up | ||
331 | } | ||
332 | |||
333 | vrf_create mgmt 1 | ||
334 | ip link set dev eth0 master vrf-mgmt | ||
335 | |||
336 | vrf_create red 10 | ||
337 | ip link set dev eth1 master vrf-red | ||
338 | ip link set dev eth2 master vrf-red | ||
339 | ip link set dev eth5 master vrf-red | ||
340 | |||
341 | vrf_create blue 66 | ||
342 | ip link set dev eth3 master vrf-blue | ||
343 | |||
344 | vrf_create green 81 | ||
345 | ip link set dev eth4 master vrf-green | ||
346 | |||
347 | |||
348 | Interface addresses from /etc/network/interfaces: | ||
349 | auto eth0 | ||
350 | iface eth0 inet static | ||
351 | address 10.0.0.2 | ||
352 | netmask 255.255.255.0 | ||
353 | gateway 10.0.0.254 | ||
354 | |||
355 | iface eth0 inet6 static | ||
356 | address 2000:1::2 | ||
357 | netmask 120 | ||
358 | |||
359 | auto eth1 | ||
360 | iface eth1 inet static | ||
361 | address 10.2.1.2 | ||
362 | netmask 255.255.255.0 | ||
363 | |||
364 | iface eth1 inet6 static | ||
365 | address 2002:1::2 | ||
366 | netmask 120 | ||
367 | |||
368 | auto eth2 | ||
369 | iface eth2 inet static | ||
370 | address 10.2.2.2 | ||
371 | netmask 255.255.255.0 | ||
372 | |||
373 | iface eth2 inet6 static | ||
374 | address 2002:2::2 | ||
375 | netmask 120 | ||
376 | |||
377 | auto eth3 | ||
378 | iface eth3 inet static | ||
379 | address 10.2.3.2 | ||
380 | netmask 255.255.255.0 | ||
381 | |||
382 | iface eth3 inet6 static | ||
383 | address 2002:3::2 | ||
384 | netmask 120 | ||
385 | |||
386 | auto eth4 | ||
387 | iface eth4 inet static | ||
388 | address 10.2.4.2 | ||
389 | netmask 255.255.255.0 | ||
390 | |||
391 | iface eth4 inet6 static | ||
392 | address 2002:4::2 | ||
393 | netmask 120 | ||
diff --git a/Documentation/power/pci.txt b/Documentation/power/pci.txt index 62328d76b55b..b0e911e0e8f5 100644 --- a/Documentation/power/pci.txt +++ b/Documentation/power/pci.txt | |||
@@ -979,20 +979,45 @@ every time right after the runtime_resume() callback has returned | |||
979 | (alternatively, the runtime_suspend() callback will have to check if the | 979 | (alternatively, the runtime_suspend() callback will have to check if the |
980 | device should really be suspended and return -EAGAIN if that is not the case). | 980 | device should really be suspended and return -EAGAIN if that is not the case). |
981 | 981 | ||
982 | The runtime PM of PCI devices is disabled by default. It is also blocked by | 982 | The runtime PM of PCI devices is enabled by default by the PCI core. PCI |
983 | pci_pm_init() that runs the pm_runtime_forbid() helper function. If a PCI | 983 | device drivers do not need to enable it and should not attempt to do so. |
984 | driver implements the runtime PM callbacks and intends to use the runtime PM | 984 | However, it is blocked by pci_pm_init() that runs the pm_runtime_forbid() |
985 | framework provided by the PM core and the PCI subsystem, it should enable this | 985 | helper function. In addition to that, the runtime PM usage counter of |
986 | feature by executing the pm_runtime_enable() helper function. However, the | 986 | each PCI device is incremented by local_pci_probe() before executing the |
987 | driver should not call the pm_runtime_allow() helper function unblocking | 987 | probe callback provided by the device's driver. |
988 | the runtime PM of the device. Instead, it should allow user space or some | 988 | |
989 | platform-specific code to do that (user space can do it via sysfs), although | 989 | If a PCI driver implements the runtime PM callbacks and intends to use the |
990 | once it has called pm_runtime_enable(), it must be prepared to handle the | 990 | runtime PM framework provided by the PM core and the PCI subsystem, it needs |
991 | to decrement the device's runtime PM usage counter in its probe callback | ||
992 | function. If it doesn't do that, the counter will always be different from | ||
993 | zero for the device and it will never be runtime-suspended. The simplest | ||
994 | way to do that is by calling pm_runtime_put_noidle(), but if the driver | ||
995 | wants to schedule an autosuspend right away, for example, it may call | ||
996 | pm_runtime_put_autosuspend() instead for this purpose. Generally, it | ||
997 | just needs to call a function that decrements the devices usage counter | ||
998 | from its probe routine to make runtime PM work for the device. | ||
999 | |||
1000 | It is important to remember that the driver's runtime_suspend() callback | ||
1001 | may be executed right after the usage counter has been decremented, because | ||
1002 | user space may already have cuased the pm_runtime_allow() helper function | ||
1003 | unblocking the runtime PM of the device to run via sysfs, so the driver must | ||
1004 | be prepared to cope with that. | ||
1005 | |||
1006 | The driver itself should not call pm_runtime_allow(), though. Instead, it | ||
1007 | should let user space or some platform-specific code do that (user space can | ||
1008 | do it via sysfs as stated above), but it must be prepared to handle the | ||
991 | runtime PM of the device correctly as soon as pm_runtime_allow() is called | 1009 | runtime PM of the device correctly as soon as pm_runtime_allow() is called |
992 | (which may happen at any time). [It also is possible that user space causes | 1010 | (which may happen at any time, even before the driver is loaded). |
993 | pm_runtime_allow() to be called via sysfs before the driver is loaded, so in | 1011 | |
994 | fact the driver has to be prepared to handle the runtime PM of the device as | 1012 | When the driver's remove callback runs, it has to balance the decrementation |
995 | soon as it calls pm_runtime_enable().] | 1013 | of the device's runtime PM usage counter at the probe time. For this reason, |
1014 | if it has decremented the counter in its probe callback, it must run | ||
1015 | pm_runtime_get_noresume() in its remove callback. [Since the core carries | ||
1016 | out a runtime resume of the device and bumps up the device's usage counter | ||
1017 | before running the driver's remove callback, the runtime PM of the device | ||
1018 | is effectively disabled for the duration of the remove execution and all | ||
1019 | runtime PM helper functions incrementing the device's usage counter are | ||
1020 | then effectively equivalent to pm_runtime_get_noresume().] | ||
996 | 1021 | ||
997 | The runtime PM framework works by processing requests to suspend or resume | 1022 | The runtime PM framework works by processing requests to suspend or resume |
998 | devices, or to check if they are idle (in which cases it is reasonable to | 1023 | devices, or to check if they are idle (in which cases it is reasonable to |
diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt index 2216eb187c21..b784c270105f 100644 --- a/Documentation/printk-formats.txt +++ b/Documentation/printk-formats.txt | |||
@@ -23,6 +23,10 @@ Example: | |||
23 | 23 | ||
24 | Reminder: sizeof() result is of type size_t. | 24 | Reminder: sizeof() result is of type size_t. |
25 | 25 | ||
26 | The kernel's printf does not support %n. For obvious reasons, floating | ||
27 | point formats (%e, %f, %g, %a) are also not recognized. Use of any | ||
28 | unsupported specifier or length qualifier results in a WARN and early | ||
29 | return from vsnprintf. | ||
26 | 30 | ||
27 | Raw pointer value SHOULD be printed with %p. The kernel supports | 31 | Raw pointer value SHOULD be printed with %p. The kernel supports |
28 | the following extended format specifiers for pointer types: | 32 | the following extended format specifiers for pointer types: |
@@ -119,6 +123,7 @@ Raw buffer as an escaped string: | |||
119 | If field width is omitted the 1 byte only will be escaped. | 123 | If field width is omitted the 1 byte only will be escaped. |
120 | 124 | ||
121 | Raw buffer as a hex string: | 125 | Raw buffer as a hex string: |
126 | |||
122 | %*ph 00 01 02 ... 3f | 127 | %*ph 00 01 02 ... 3f |
123 | %*phC 00:01:02: ... :3f | 128 | %*phC 00:01:02: ... :3f |
124 | %*phD 00-01-02- ... -3f | 129 | %*phD 00-01-02- ... -3f |
@@ -234,6 +239,7 @@ UUID/GUID addresses: | |||
234 | Passed by reference. | 239 | Passed by reference. |
235 | 240 | ||
236 | dentry names: | 241 | dentry names: |
242 | |||
237 | %pd{,2,3,4} | 243 | %pd{,2,3,4} |
238 | %pD{,2,3,4} | 244 | %pD{,2,3,4} |
239 | 245 | ||
@@ -256,6 +262,8 @@ struct va_format: | |||
256 | va_list *va; | 262 | va_list *va; |
257 | }; | 263 | }; |
258 | 264 | ||
265 | Implements a "recursive vsnprintf". | ||
266 | |||
259 | Do not use this feature without some mechanism to verify the | 267 | Do not use this feature without some mechanism to verify the |
260 | correctness of the format string and va_list arguments. | 268 | correctness of the format string and va_list arguments. |
261 | 269 | ||
@@ -284,6 +292,27 @@ bitmap and its derivatives such as cpumask and nodemask: | |||
284 | 292 | ||
285 | Passed by reference. | 293 | Passed by reference. |
286 | 294 | ||
295 | Network device features: | ||
296 | |||
297 | %pNF 0x000000000000c000 | ||
298 | |||
299 | For printing netdev_features_t. | ||
300 | |||
301 | Passed by reference. | ||
302 | |||
303 | Command from struct task_struct | ||
304 | |||
305 | %pT ls | ||
306 | |||
307 | For printing executable name excluding path from struct | ||
308 | task_struct. | ||
309 | |||
310 | Passed by reference. | ||
311 | |||
312 | If you add other %p extensions, please extend lib/test_printf.c with | ||
313 | one or more test cases, if at all feasible. | ||
314 | |||
315 | |||
287 | Thank you for your cooperation and attention. | 316 | Thank you for your cooperation and attention. |
288 | 317 | ||
289 | 318 | ||
diff --git a/Documentation/ptp/testptp.c b/Documentation/ptp/testptp.c index 2bc8abc57fa0..6c6247aaa7b9 100644 --- a/Documentation/ptp/testptp.c +++ b/Documentation/ptp/testptp.c | |||
@@ -18,6 +18,7 @@ | |||
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 | */ | 19 | */ |
20 | #define _GNU_SOURCE | 20 | #define _GNU_SOURCE |
21 | #define __SANE_USERSPACE_TYPES__ /* For PPC64, to get LL64 types */ | ||
21 | #include <errno.h> | 22 | #include <errno.h> |
22 | #include <fcntl.h> | 23 | #include <fcntl.h> |
23 | #include <inttypes.h> | 24 | #include <inttypes.h> |
diff --git a/Documentation/rbtree.txt b/Documentation/rbtree.txt index 39873ef41bf9..b9d9cc57be18 100644 --- a/Documentation/rbtree.txt +++ b/Documentation/rbtree.txt | |||
@@ -203,7 +203,7 @@ functions with the user provided augmentation callback when inserting | |||
203 | and erasing nodes. | 203 | and erasing nodes. |
204 | 204 | ||
205 | C files implementing augmented rbtree manipulation must include | 205 | C files implementing augmented rbtree manipulation must include |
206 | <linux/rbtree_augmented.h> instead of <linus/rbtree.h>. Note that | 206 | <linux/rbtree_augmented.h> instead of <linux/rbtree.h>. Note that |
207 | linux/rbtree_augmented.h exposes some rbtree implementations details | 207 | linux/rbtree_augmented.h exposes some rbtree implementations details |
208 | you are not expected to rely on; please stick to the documented APIs | 208 | you are not expected to rely on; please stick to the documented APIs |
209 | there and do not include <linux/rbtree_augmented.h> from header files | 209 | there and do not include <linux/rbtree_augmented.h> from header files |
diff --git a/Documentation/security/Smack.txt b/Documentation/security/Smack.txt index 5e6d07fbed07..945cc633d883 100644 --- a/Documentation/security/Smack.txt +++ b/Documentation/security/Smack.txt | |||
@@ -255,6 +255,16 @@ unconfined | |||
255 | the access permitted if it wouldn't be otherwise. Note that this | 255 | the access permitted if it wouldn't be otherwise. Note that this |
256 | is dangerous and can ruin the proper labeling of your system. | 256 | is dangerous and can ruin the proper labeling of your system. |
257 | It should never be used in production. | 257 | It should never be used in production. |
258 | relabel-self | ||
259 | This interface contains a list of labels to which the process can | ||
260 | transition to, by writing to /proc/self/attr/current. | ||
261 | Normally a process can change its own label to any legal value, but only | ||
262 | if it has CAP_MAC_ADMIN. This interface allows a process without | ||
263 | CAP_MAC_ADMIN to relabel itself to one of labels from predefined list. | ||
264 | A process without CAP_MAC_ADMIN can change its label only once. When it | ||
265 | does, this list will be cleared. | ||
266 | The values are set by writing the desired labels, separated | ||
267 | by spaces, to the file or cleared by writing "-" to the file. | ||
258 | 268 | ||
259 | If you are using the smackload utility | 269 | If you are using the smackload utility |
260 | you can add access rules in /etc/smack/accesses. They take the form: | 270 | you can add access rules in /etc/smack/accesses. They take the form: |
diff --git a/Documentation/security/keys.txt b/Documentation/security/keys.txt index c9e7f4f223a5..8c183873b2b7 100644 --- a/Documentation/security/keys.txt +++ b/Documentation/security/keys.txt | |||
@@ -1049,12 +1049,12 @@ search a specific keyring, so using keyrings in this way is of limited utility. | |||
1049 | NOTES ON ACCESSING PAYLOAD CONTENTS | 1049 | NOTES ON ACCESSING PAYLOAD CONTENTS |
1050 | =================================== | 1050 | =================================== |
1051 | 1051 | ||
1052 | The simplest payload is just a number in key->payload.value. In this case, | 1052 | The simplest payload is just data stored in key->payload directly. In this |
1053 | there's no need to indulge in RCU or locking when accessing the payload. | 1053 | case, there's no need to indulge in RCU or locking when accessing the payload. |
1054 | 1054 | ||
1055 | More complex payload contents must be allocated and a pointer to them set in | 1055 | More complex payload contents must be allocated and pointers to them set in the |
1056 | key->payload.data. One of the following ways must be selected to access the | 1056 | key->payload.data[] array. One of the following ways must be selected to |
1057 | data: | 1057 | access the data: |
1058 | 1058 | ||
1059 | (1) Unmodifiable key type. | 1059 | (1) Unmodifiable key type. |
1060 | 1060 | ||
@@ -1092,6 +1092,13 @@ data: | |||
1092 | the payload. key->datalen cannot be relied upon to be consistent with the | 1092 | the payload. key->datalen cannot be relied upon to be consistent with the |
1093 | payload just dereferenced if the key's semaphore is not held. | 1093 | payload just dereferenced if the key's semaphore is not held. |
1094 | 1094 | ||
1095 | Note that key->payload.data[0] has a shadow that is marked for __rcu | ||
1096 | usage. This is called key->payload.rcu_data0. The following accessors | ||
1097 | wrap the RCU calls to this element: | ||
1098 | |||
1099 | rcu_assign_keypointer(struct key *key, void *data); | ||
1100 | void *rcu_dereference_key(struct key *key); | ||
1101 | |||
1095 | 1102 | ||
1096 | =================== | 1103 | =================== |
1097 | DEFINING A KEY TYPE | 1104 | DEFINING A KEY TYPE |
@@ -1143,8 +1150,7 @@ The structure has a number of fields, some of which are mandatory: | |||
1143 | 1150 | ||
1144 | struct key_preparsed_payload { | 1151 | struct key_preparsed_payload { |
1145 | char *description; | 1152 | char *description; |
1146 | void *type_data[2]; | 1153 | union key_payload payload; |
1147 | void *payload; | ||
1148 | const void *data; | 1154 | const void *data; |
1149 | size_t datalen; | 1155 | size_t datalen; |
1150 | size_t quotalen; | 1156 | size_t quotalen; |
@@ -1160,10 +1166,9 @@ The structure has a number of fields, some of which are mandatory: | |||
1160 | attached as a string to the description field. This will be used for the | 1166 | attached as a string to the description field. This will be used for the |
1161 | key description if the caller of add_key() passes NULL or "". | 1167 | key description if the caller of add_key() passes NULL or "". |
1162 | 1168 | ||
1163 | The method can attach anything it likes to type_data[] and payload. These | 1169 | The method can attach anything it likes to payload. This is merely passed |
1164 | are merely passed along to the instantiate() or update() operations. If | 1170 | along to the instantiate() or update() operations. If set, the expiry |
1165 | set, the expiry time will be applied to the key if it is instantiated from | 1171 | time will be applied to the key if it is instantiated from this data. |
1166 | this data. | ||
1167 | 1172 | ||
1168 | The method should return 0 if successful or a negative error code | 1173 | The method should return 0 if successful or a negative error code |
1169 | otherwise. | 1174 | otherwise. |
@@ -1172,11 +1177,10 @@ The structure has a number of fields, some of which are mandatory: | |||
1172 | (*) void (*free_preparse)(struct key_preparsed_payload *prep); | 1177 | (*) void (*free_preparse)(struct key_preparsed_payload *prep); |
1173 | 1178 | ||
1174 | This method is only required if the preparse() method is provided, | 1179 | This method is only required if the preparse() method is provided, |
1175 | otherwise it is unused. It cleans up anything attached to the | 1180 | otherwise it is unused. It cleans up anything attached to the description |
1176 | description, type_data and payload fields of the key_preparsed_payload | 1181 | and payload fields of the key_preparsed_payload struct as filled in by the |
1177 | struct as filled in by the preparse() method. It will always be called | 1182 | preparse() method. It will always be called after preparse() returns |
1178 | after preparse() returns successfully, even if instantiate() or update() | 1183 | successfully, even if instantiate() or update() succeed. |
1179 | succeed. | ||
1180 | 1184 | ||
1181 | 1185 | ||
1182 | (*) int (*instantiate)(struct key *key, struct key_preparsed_payload *prep); | 1186 | (*) int (*instantiate)(struct key *key, struct key_preparsed_payload *prep); |
@@ -1197,6 +1201,11 @@ The structure has a number of fields, some of which are mandatory: | |||
1197 | 1201 | ||
1198 | It is safe to sleep in this method. | 1202 | It is safe to sleep in this method. |
1199 | 1203 | ||
1204 | generic_key_instantiate() is provided to simply copy the data from | ||
1205 | prep->payload.data[] to key->payload.data[], with RCU-safe assignment on | ||
1206 | the first element. It will then clear prep->payload.data[] so that the | ||
1207 | free_preparse method doesn't release the data. | ||
1208 | |||
1200 | 1209 | ||
1201 | (*) int (*update)(struct key *key, const void *data, size_t datalen); | 1210 | (*) int (*update)(struct key *key, const void *data, size_t datalen); |
1202 | 1211 | ||
diff --git a/Documentation/serial/driver b/Documentation/serial/driver index c415b0ef4493..379468e12680 100644 --- a/Documentation/serial/driver +++ b/Documentation/serial/driver | |||
@@ -439,11 +439,13 @@ Modem control lines via GPIO | |||
439 | 439 | ||
440 | Some helpers are provided in order to set/get modem control lines via GPIO. | 440 | Some helpers are provided in order to set/get modem control lines via GPIO. |
441 | 441 | ||
442 | mctrl_gpio_init(dev, idx): | 442 | mctrl_gpio_init(port, idx): |
443 | This will get the {cts,rts,...}-gpios from device tree if they are | 443 | This will get the {cts,rts,...}-gpios from device tree if they are |
444 | present and request them, set direction etc, and return an | 444 | present and request them, set direction etc, and return an |
445 | allocated structure. devm_* functions are used, so there's no need | 445 | allocated structure. devm_* functions are used, so there's no need |
446 | to call mctrl_gpio_free(). | 446 | to call mctrl_gpio_free(). |
447 | As this sets up the irq handling make sure to not handle changes to the | ||
448 | gpio input lines in your driver, too. | ||
447 | 449 | ||
448 | mctrl_gpio_free(dev, gpios): | 450 | mctrl_gpio_free(dev, gpios): |
449 | This will free the requested gpios in mctrl_gpio_init(). | 451 | This will free the requested gpios in mctrl_gpio_init(). |
@@ -458,3 +460,9 @@ mctrl_gpio_set(gpios, mctrl): | |||
458 | 460 | ||
459 | mctrl_gpio_get(gpios, mctrl): | 461 | mctrl_gpio_get(gpios, mctrl): |
460 | This will update mctrl with the gpios values. | 462 | This will update mctrl with the gpios values. |
463 | |||
464 | mctrl_gpio_enable_ms(gpios): | ||
465 | Enables irqs and handling of changes to the ms lines. | ||
466 | |||
467 | mctrl_gpio_disable_ms(gpios): | ||
468 | Disables irqs and handling of changes to the ms lines. | ||
diff --git a/Documentation/serial/tty.txt b/Documentation/serial/tty.txt index 973c8ad3f959..bc3842dc323a 100644 --- a/Documentation/serial/tty.txt +++ b/Documentation/serial/tty.txt | |||
@@ -39,8 +39,13 @@ TTY side interfaces: | |||
39 | open() - Called when the line discipline is attached to | 39 | open() - Called when the line discipline is attached to |
40 | the terminal. No other call into the line | 40 | the terminal. No other call into the line |
41 | discipline for this tty will occur until it | 41 | discipline for this tty will occur until it |
42 | completes successfully. Returning an error will | 42 | completes successfully. Should initialize any |
43 | prevent the ldisc from being attached. Can sleep. | 43 | state needed by the ldisc, and set receive_room |
44 | in the tty_struct to the maximum amount of data | ||
45 | the line discipline is willing to accept from the | ||
46 | driver with a single call to receive_buf(). | ||
47 | Returning an error will prevent the ldisc from | ||
48 | being attached. Can sleep. | ||
44 | 49 | ||
45 | close() - This is called on a terminal when the line | 50 | close() - This is called on a terminal when the line |
46 | discipline is being unplugged. At the point of | 51 | discipline is being unplugged. At the point of |
@@ -52,9 +57,16 @@ hangup() - Called when the tty line is hung up. | |||
52 | No further calls into the ldisc code will occur. | 57 | No further calls into the ldisc code will occur. |
53 | The return value is ignored. Can sleep. | 58 | The return value is ignored. Can sleep. |
54 | 59 | ||
55 | write() - A process is writing data through the line | 60 | read() - (optional) A process requests reading data from |
56 | discipline. Multiple write calls are serialized | 61 | the line. Multiple read calls may occur in parallel |
57 | by the tty layer for the ldisc. May sleep. | 62 | and the ldisc must deal with serialization issues. |
63 | If not defined, the process will receive an EIO | ||
64 | error. May sleep. | ||
65 | |||
66 | write() - (optional) A process requests writing data to the | ||
67 | line. Multiple write calls are serialized by the | ||
68 | tty layer for the ldisc. If not defined, the | ||
69 | process will receive an EIO error. May sleep. | ||
58 | 70 | ||
59 | flush_buffer() - (optional) May be called at any point between | 71 | flush_buffer() - (optional) May be called at any point between |
60 | open and close, and instructs the line discipline | 72 | open and close, and instructs the line discipline |
@@ -69,27 +81,33 @@ set_termios() - (optional) Called on termios structure changes. | |||
69 | termios semaphore so allowed to sleep. Serialized | 81 | termios semaphore so allowed to sleep. Serialized |
70 | against itself only. | 82 | against itself only. |
71 | 83 | ||
72 | read() - Move data from the line discipline to the user. | 84 | poll() - (optional) Check the status for the poll/select |
73 | Multiple read calls may occur in parallel and the | 85 | calls. Multiple poll calls may occur in parallel. |
74 | ldisc must deal with serialization issues. May | 86 | May sleep. |
75 | sleep. | ||
76 | |||
77 | poll() - Check the status for the poll/select calls. Multiple | ||
78 | poll calls may occur in parallel. May sleep. | ||
79 | 87 | ||
80 | ioctl() - Called when an ioctl is handed to the tty layer | 88 | ioctl() - (optional) Called when an ioctl is handed to the |
81 | that might be for the ldisc. Multiple ioctl calls | 89 | tty layer that might be for the ldisc. Multiple |
82 | may occur in parallel. May sleep. | 90 | ioctl calls may occur in parallel. May sleep. |
83 | 91 | ||
84 | compat_ioctl() - Called when a 32 bit ioctl is handed to the tty layer | 92 | compat_ioctl() - (optional) Called when a 32 bit ioctl is handed |
85 | that might be for the ldisc. Multiple ioctl calls | 93 | to the tty layer that might be for the ldisc. |
86 | may occur in parallel. May sleep. | 94 | Multiple ioctl calls may occur in parallel. |
95 | May sleep. | ||
87 | 96 | ||
88 | Driver Side Interfaces: | 97 | Driver Side Interfaces: |
89 | 98 | ||
90 | receive_buf() - Hand buffers of bytes from the driver to the ldisc | 99 | receive_buf() - (optional) Called by the low-level driver to hand |
91 | for processing. Semantics currently rather | 100 | a buffer of received bytes to the ldisc for |
92 | mysterious 8( | 101 | processing. The number of bytes is guaranteed not |
102 | to exceed the current value of tty->receive_room. | ||
103 | All bytes must be processed. | ||
104 | |||
105 | receive_buf2() - (optional) Called by the low-level driver to hand | ||
106 | a buffer of received bytes to the ldisc for | ||
107 | processing. Returns the number of bytes processed. | ||
108 | |||
109 | If both receive_buf() and receive_buf2() are | ||
110 | defined, receive_buf2() should be preferred. | ||
93 | 111 | ||
94 | write_wakeup() - May be called at any point between open and close. | 112 | write_wakeup() - May be called at any point between open and close. |
95 | The TTY_DO_WRITE_WAKEUP flag indicates if a call | 113 | The TTY_DO_WRITE_WAKEUP flag indicates if a call |
diff --git a/Documentation/sound/alsa/hda_codec.txt b/Documentation/sound/alsa/hda_codec.txt deleted file mode 100644 index de8efbc7e4bd..000000000000 --- a/Documentation/sound/alsa/hda_codec.txt +++ /dev/null | |||
@@ -1,322 +0,0 @@ | |||
1 | Notes on Universal Interface for Intel High Definition Audio Codec | ||
2 | ------------------------------------------------------------------ | ||
3 | |||
4 | Takashi Iwai <tiwai@suse.de> | ||
5 | |||
6 | |||
7 | [Still a draft version] | ||
8 | |||
9 | |||
10 | General | ||
11 | ======= | ||
12 | |||
13 | The snd-hda-codec module supports the generic access function for the | ||
14 | High Definition (HD) audio codecs. It's designed to be independent | ||
15 | from the controller code like ac97 codec module. The real accessors | ||
16 | from/to the controller must be implemented in the lowlevel driver. | ||
17 | |||
18 | The structure of this module is similar with ac97_codec module. | ||
19 | Each codec chip belongs to a bus class which communicates with the | ||
20 | controller. | ||
21 | |||
22 | |||
23 | Initialization of Bus Instance | ||
24 | ============================== | ||
25 | |||
26 | The card driver has to create struct hda_bus at first. The template | ||
27 | struct should be filled and passed to the constructor: | ||
28 | |||
29 | struct hda_bus_template { | ||
30 | void *private_data; | ||
31 | struct pci_dev *pci; | ||
32 | const char *modelname; | ||
33 | struct hda_bus_ops ops; | ||
34 | }; | ||
35 | |||
36 | The card driver can set and use the private_data field to retrieve its | ||
37 | own data in callback functions. The pci field is used when the patch | ||
38 | needs to check the PCI subsystem IDs, so on. For non-PCI system, it | ||
39 | doesn't have to be set, of course. | ||
40 | The modelname field specifies the board's specific configuration. The | ||
41 | string is passed to the codec parser, and it depends on the parser how | ||
42 | the string is used. | ||
43 | These fields, private_data, pci and modelname are all optional. | ||
44 | |||
45 | The ops field contains the callback functions as the following: | ||
46 | |||
47 | struct hda_bus_ops { | ||
48 | int (*command)(struct hda_codec *codec, hda_nid_t nid, int direct, | ||
49 | unsigned int verb, unsigned int parm); | ||
50 | unsigned int (*get_response)(struct hda_codec *codec); | ||
51 | void (*private_free)(struct hda_bus *); | ||
52 | #ifdef CONFIG_SND_HDA_POWER_SAVE | ||
53 | void (*pm_notify)(struct hda_codec *codec); | ||
54 | #endif | ||
55 | }; | ||
56 | |||
57 | The command callback is called when the codec module needs to send a | ||
58 | VERB to the controller. It's always a single command. | ||
59 | The get_response callback is called when the codec requires the answer | ||
60 | for the last command. These two callbacks are mandatory and have to | ||
61 | be given. | ||
62 | The third, private_free callback, is optional. It's called in the | ||
63 | destructor to release any necessary data in the lowlevel driver. | ||
64 | |||
65 | The pm_notify callback is available only with | ||
66 | CONFIG_SND_HDA_POWER_SAVE kconfig. It's called when the codec needs | ||
67 | to power up or may power down. The controller should check the all | ||
68 | belonging codecs on the bus whether they are actually powered off | ||
69 | (check codec->power_on), and optionally the driver may power down the | ||
70 | controller side, too. | ||
71 | |||
72 | The bus instance is created via snd_hda_bus_new(). You need to pass | ||
73 | the card instance, the template, and the pointer to store the | ||
74 | resultant bus instance. | ||
75 | |||
76 | int snd_hda_bus_new(struct snd_card *card, const struct hda_bus_template *temp, | ||
77 | struct hda_bus **busp); | ||
78 | |||
79 | It returns zero if successful. A negative return value means any | ||
80 | error during creation. | ||
81 | |||
82 | |||
83 | Creation of Codec Instance | ||
84 | ========================== | ||
85 | |||
86 | Each codec chip on the board is then created on the BUS instance. | ||
87 | To create a codec instance, call snd_hda_codec_new(). | ||
88 | |||
89 | int snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr, | ||
90 | struct hda_codec **codecp); | ||
91 | |||
92 | The first argument is the BUS instance, the second argument is the | ||
93 | address of the codec, and the last one is the pointer to store the | ||
94 | resultant codec instance (can be NULL if not needed). | ||
95 | |||
96 | The codec is stored in a linked list of bus instance. You can follow | ||
97 | the codec list like: | ||
98 | |||
99 | struct hda_codec *codec; | ||
100 | list_for_each_entry(codec, &bus->codec_list, list) { | ||
101 | ... | ||
102 | } | ||
103 | |||
104 | The codec isn't initialized at this stage properly. The | ||
105 | initialization sequence is called when the controls are built later. | ||
106 | |||
107 | |||
108 | Codec Access | ||
109 | ============ | ||
110 | |||
111 | To access codec, use snd_hda_codec_read() and snd_hda_codec_write(). | ||
112 | snd_hda_param_read() is for reading parameters. | ||
113 | For writing a sequence of verbs, use snd_hda_sequence_write(). | ||
114 | |||
115 | There are variants of cached read/write, snd_hda_codec_write_cache(), | ||
116 | snd_hda_sequence_write_cache(). These are used for recording the | ||
117 | register states for the power-management resume. When no PM is needed, | ||
118 | these are equivalent with non-cached version. | ||
119 | |||
120 | To retrieve the number of sub nodes connected to the given node, use | ||
121 | snd_hda_get_sub_nodes(). The connection list can be obtained via | ||
122 | snd_hda_get_connections() call. | ||
123 | |||
124 | When an unsolicited event happens, pass the event via | ||
125 | snd_hda_queue_unsol_event() so that the codec routines will process it | ||
126 | later. | ||
127 | |||
128 | |||
129 | (Mixer) Controls | ||
130 | ================ | ||
131 | |||
132 | To create mixer controls of all codecs, call | ||
133 | snd_hda_build_controls(). It then builds the mixers and does | ||
134 | initialization stuff on each codec. | ||
135 | |||
136 | |||
137 | PCM Stuff | ||
138 | ========= | ||
139 | |||
140 | snd_hda_build_pcms() gives the necessary information to create PCM | ||
141 | streams. When it's called, each codec belonging to the bus stores | ||
142 | codec->num_pcms and codec->pcm_info fields. The num_pcms indicates | ||
143 | the number of elements in pcm_info array. The card driver is supposed | ||
144 | to traverse the codec linked list, read the pcm information in | ||
145 | pcm_info array, and build pcm instances according to them. | ||
146 | |||
147 | The pcm_info array contains the following record: | ||
148 | |||
149 | /* PCM information for each substream */ | ||
150 | struct hda_pcm_stream { | ||
151 | unsigned int substreams; /* number of substreams, 0 = not exist */ | ||
152 | unsigned int channels_min; /* min. number of channels */ | ||
153 | unsigned int channels_max; /* max. number of channels */ | ||
154 | hda_nid_t nid; /* default NID to query rates/formats/bps, or set up */ | ||
155 | u32 rates; /* supported rates */ | ||
156 | u64 formats; /* supported formats (SNDRV_PCM_FMTBIT_) */ | ||
157 | unsigned int maxbps; /* supported max. bit per sample */ | ||
158 | struct hda_pcm_ops ops; | ||
159 | }; | ||
160 | |||
161 | /* for PCM creation */ | ||
162 | struct hda_pcm { | ||
163 | char *name; | ||
164 | struct hda_pcm_stream stream[2]; | ||
165 | }; | ||
166 | |||
167 | The name can be passed to snd_pcm_new(). The stream field contains | ||
168 | the information for playback (SNDRV_PCM_STREAM_PLAYBACK = 0) and | ||
169 | capture (SNDRV_PCM_STREAM_CAPTURE = 1) directions. The card driver | ||
170 | should pass substreams to snd_pcm_new() for the number of substreams | ||
171 | to create. | ||
172 | |||
173 | The channels_min, channels_max, rates and formats should be copied to | ||
174 | runtime->hw record. They and maxbps fields are used also to compute | ||
175 | the format value for the HDA codec and controller. Call | ||
176 | snd_hda_calc_stream_format() to get the format value. | ||
177 | |||
178 | The ops field contains the following callback functions: | ||
179 | |||
180 | struct hda_pcm_ops { | ||
181 | int (*open)(struct hda_pcm_stream *info, struct hda_codec *codec, | ||
182 | struct snd_pcm_substream *substream); | ||
183 | int (*close)(struct hda_pcm_stream *info, struct hda_codec *codec, | ||
184 | struct snd_pcm_substream *substream); | ||
185 | int (*prepare)(struct hda_pcm_stream *info, struct hda_codec *codec, | ||
186 | unsigned int stream_tag, unsigned int format, | ||
187 | struct snd_pcm_substream *substream); | ||
188 | int (*cleanup)(struct hda_pcm_stream *info, struct hda_codec *codec, | ||
189 | struct snd_pcm_substream *substream); | ||
190 | }; | ||
191 | |||
192 | All are non-NULL, so you can call them safely without NULL check. | ||
193 | |||
194 | The open callback should be called in PCM open after runtime->hw is | ||
195 | set up. It may override some setting and constraints additionally. | ||
196 | Similarly, the close callback should be called in the PCM close. | ||
197 | |||
198 | The prepare callback should be called in PCM prepare. This will set | ||
199 | up the codec chip properly for the operation. The cleanup should be | ||
200 | called in hw_free to clean up the configuration. | ||
201 | |||
202 | The caller should check the return value, at least for open and | ||
203 | prepare callbacks. When a negative value is returned, some error | ||
204 | occurred. | ||
205 | |||
206 | |||
207 | Proc Files | ||
208 | ========== | ||
209 | |||
210 | Each codec dumps the widget node information in | ||
211 | /proc/asound/card*/codec#* file. This information would be really | ||
212 | helpful for debugging. Please provide its contents together with the | ||
213 | bug report. | ||
214 | |||
215 | |||
216 | Power Management | ||
217 | ================ | ||
218 | |||
219 | It's simple: | ||
220 | Call snd_hda_suspend() in the PM suspend callback. | ||
221 | Call snd_hda_resume() in the PM resume callback. | ||
222 | |||
223 | |||
224 | Codec Preset (Patch) | ||
225 | ==================== | ||
226 | |||
227 | To set up and handle the codec functionality fully, each codec may | ||
228 | have a codec preset (patch). It's defined in struct hda_codec_preset: | ||
229 | |||
230 | struct hda_codec_preset { | ||
231 | unsigned int id; | ||
232 | unsigned int mask; | ||
233 | unsigned int subs; | ||
234 | unsigned int subs_mask; | ||
235 | unsigned int rev; | ||
236 | const char *name; | ||
237 | int (*patch)(struct hda_codec *codec); | ||
238 | }; | ||
239 | |||
240 | When the codec id and codec subsystem id match with the given id and | ||
241 | subs fields bitwise (with bitmask mask and subs_mask), the callback | ||
242 | patch is called. The patch callback should initialize the codec and | ||
243 | set the codec->patch_ops field. This is defined as below: | ||
244 | |||
245 | struct hda_codec_ops { | ||
246 | int (*build_controls)(struct hda_codec *codec); | ||
247 | int (*build_pcms)(struct hda_codec *codec); | ||
248 | int (*init)(struct hda_codec *codec); | ||
249 | void (*free)(struct hda_codec *codec); | ||
250 | void (*unsol_event)(struct hda_codec *codec, unsigned int res); | ||
251 | #ifdef CONFIG_PM | ||
252 | int (*suspend)(struct hda_codec *codec, pm_message_t state); | ||
253 | int (*resume)(struct hda_codec *codec); | ||
254 | #endif | ||
255 | #ifdef CONFIG_SND_HDA_POWER_SAVE | ||
256 | int (*check_power_status)(struct hda_codec *codec, | ||
257 | hda_nid_t nid); | ||
258 | #endif | ||
259 | }; | ||
260 | |||
261 | The build_controls callback is called from snd_hda_build_controls(). | ||
262 | Similarly, the build_pcms callback is called from | ||
263 | snd_hda_build_pcms(). The init callback is called after | ||
264 | build_controls to initialize the hardware. | ||
265 | The free callback is called as a destructor. | ||
266 | |||
267 | The unsol_event callback is called when an unsolicited event is | ||
268 | received. | ||
269 | |||
270 | The suspend and resume callbacks are for power management. | ||
271 | They can be NULL if no special sequence is required. When the resume | ||
272 | callback is NULL, the driver calls the init callback and resumes the | ||
273 | registers from the cache. If other handling is needed, you'd need to | ||
274 | write your own resume callback. There, the amp values can be resumed | ||
275 | via | ||
276 | void snd_hda_codec_resume_amp(struct hda_codec *codec); | ||
277 | and the other codec registers via | ||
278 | void snd_hda_codec_resume_cache(struct hda_codec *codec); | ||
279 | |||
280 | The check_power_status callback is called when the amp value of the | ||
281 | given widget NID is changed. The codec code can turn on/off the power | ||
282 | appropriately from this information. | ||
283 | |||
284 | Each entry can be NULL if not necessary to be called. | ||
285 | |||
286 | |||
287 | Generic Parser | ||
288 | ============== | ||
289 | |||
290 | When the device doesn't match with any given presets, the widgets are | ||
291 | parsed via th generic parser (hda_generic.c). Its support is | ||
292 | limited: no multi-channel support, for example. | ||
293 | |||
294 | |||
295 | Digital I/O | ||
296 | =========== | ||
297 | |||
298 | Call snd_hda_create_spdif_out_ctls() from the patch to create controls | ||
299 | related with SPDIF out. | ||
300 | |||
301 | |||
302 | Helper Functions | ||
303 | ================ | ||
304 | |||
305 | snd_hda_get_codec_name() stores the codec name on the given string. | ||
306 | |||
307 | snd_hda_check_board_config() can be used to obtain the configuration | ||
308 | information matching with the device. Define the model string table | ||
309 | and the table with struct snd_pci_quirk entries (zero-terminated), | ||
310 | and pass it to the function. The function checks the modelname given | ||
311 | as a module parameter, and PCI subsystem IDs. If the matching entry | ||
312 | is found, it returns the config field value. | ||
313 | |||
314 | snd_hda_add_new_ctls() can be used to create and add control entries. | ||
315 | Pass the zero-terminated array of struct snd_kcontrol_new | ||
316 | |||
317 | Macros HDA_CODEC_VOLUME(), HDA_CODEC_MUTE() and their variables can be | ||
318 | used for the entry of struct snd_kcontrol_new. | ||
319 | |||
320 | The input MUX helper callbacks for such a control are provided, too: | ||
321 | snd_hda_input_mux_info() and snd_hda_input_mux_put(). See | ||
322 | patch_realtek.c for example. | ||
diff --git a/Documentation/spi/pxa2xx b/Documentation/spi/pxa2xx index 3352f97430e4..13a0b7fb192f 100644 --- a/Documentation/spi/pxa2xx +++ b/Documentation/spi/pxa2xx | |||
@@ -22,15 +22,10 @@ Typically a SPI master is defined in the arch/.../mach-*/board-*.c as a | |||
22 | found in include/linux/spi/pxa2xx_spi.h: | 22 | found in include/linux/spi/pxa2xx_spi.h: |
23 | 23 | ||
24 | struct pxa2xx_spi_master { | 24 | struct pxa2xx_spi_master { |
25 | u32 clock_enable; | ||
26 | u16 num_chipselect; | 25 | u16 num_chipselect; |
27 | u8 enable_dma; | 26 | u8 enable_dma; |
28 | }; | 27 | }; |
29 | 28 | ||
30 | The "pxa2xx_spi_master.clock_enable" field is used to enable/disable the | ||
31 | corresponding SSP peripheral block in the "Clock Enable Register (CKEN"). See | ||
32 | the "PXA2xx Developer Manual" section "Clocks and Power Management". | ||
33 | |||
34 | The "pxa2xx_spi_master.num_chipselect" field is used to determine the number of | 29 | The "pxa2xx_spi_master.num_chipselect" field is used to determine the number of |
35 | slave device (chips) attached to this SPI master. | 30 | slave device (chips) attached to this SPI master. |
36 | 31 | ||
@@ -57,7 +52,6 @@ static struct resource pxa_spi_nssp_resources[] = { | |||
57 | }; | 52 | }; |
58 | 53 | ||
59 | static struct pxa2xx_spi_master pxa_nssp_master_info = { | 54 | static struct pxa2xx_spi_master pxa_nssp_master_info = { |
60 | .clock_enable = CKEN_NSSP, /* NSSP Peripheral clock */ | ||
61 | .num_chipselect = 1, /* Matches the number of chips attached to NSSP */ | 55 | .num_chipselect = 1, /* Matches the number of chips attached to NSSP */ |
62 | .enable_dma = 1, /* Enables NSSP DMA */ | 56 | .enable_dma = 1, /* Enables NSSP DMA */ |
63 | }; | 57 | }; |
diff --git a/Documentation/static-keys.txt b/Documentation/static-keys.txt index f4cb0b2d5cd7..477927becacb 100644 --- a/Documentation/static-keys.txt +++ b/Documentation/static-keys.txt | |||
@@ -15,8 +15,8 @@ The updated API replacements are: | |||
15 | 15 | ||
16 | DEFINE_STATIC_KEY_TRUE(key); | 16 | DEFINE_STATIC_KEY_TRUE(key); |
17 | DEFINE_STATIC_KEY_FALSE(key); | 17 | DEFINE_STATIC_KEY_FALSE(key); |
18 | static_key_likely() | 18 | static_branch_likely() |
19 | statick_key_unlikely() | 19 | static_branch_unlikely() |
20 | 20 | ||
21 | 0) Abstract | 21 | 0) Abstract |
22 | 22 | ||
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index 6fccb69c03e7..af70d1541d3a 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt | |||
@@ -33,6 +33,7 @@ show up in /proc/sys/kernel: | |||
33 | - domainname | 33 | - domainname |
34 | - hostname | 34 | - hostname |
35 | - hotplug | 35 | - hotplug |
36 | - hardlockup_all_cpu_backtrace | ||
36 | - hung_task_panic | 37 | - hung_task_panic |
37 | - hung_task_check_count | 38 | - hung_task_check_count |
38 | - hung_task_timeout_secs | 39 | - hung_task_timeout_secs |
@@ -293,6 +294,17 @@ domain names are in general different. For a detailed discussion | |||
293 | see the hostname(1) man page. | 294 | see the hostname(1) man page. |
294 | 295 | ||
295 | ============================================================== | 296 | ============================================================== |
297 | hardlockup_all_cpu_backtrace: | ||
298 | |||
299 | This value controls the hard lockup detector behavior when a hard | ||
300 | lockup condition is detected as to whether or not to gather further | ||
301 | debug information. If enabled, arch-specific all-CPU stack dumping | ||
302 | will be initiated. | ||
303 | |||
304 | 0: do nothing. This is the default behavior. | ||
305 | |||
306 | 1: on detection capture more debug information. | ||
307 | ============================================================== | ||
296 | 308 | ||
297 | hotplug: | 309 | hotplug: |
298 | 310 | ||
diff --git a/Documentation/sysctl/net.txt b/Documentation/sysctl/net.txt index 6294b5186ae5..809ab6efcc74 100644 --- a/Documentation/sysctl/net.txt +++ b/Documentation/sysctl/net.txt | |||
@@ -54,13 +54,15 @@ default_qdisc | |||
54 | -------------- | 54 | -------------- |
55 | 55 | ||
56 | The default queuing discipline to use for network devices. This allows | 56 | The default queuing discipline to use for network devices. This allows |
57 | overriding the default queue discipline of pfifo_fast with an | 57 | overriding the default of pfifo_fast with an alternative. Since the default |
58 | alternative. Since the default queuing discipline is created with the | 58 | queuing discipline is created without additional parameters so is best suited |
59 | no additional parameters so is best suited to queuing disciplines that | 59 | to queuing disciplines that work well without configuration like stochastic |
60 | work well without configuration like stochastic fair queue (sfq), | 60 | fair queue (sfq), CoDel (codel) or fair queue CoDel (fq_codel). Don't use |
61 | CoDel (codel) or fair queue CoDel (fq_codel). Don't use queuing disciplines | 61 | queuing disciplines like Hierarchical Token Bucket or Deficit Round Robin |
62 | like Hierarchical Token Bucket or Deficit Round Robin which require setting | 62 | which require setting up classes and bandwidths. Note that physical multiqueue |
63 | up classes and bandwidths. | 63 | interfaces still use mq as root qdisc, which in turn uses this default for its |
64 | leaves. Virtual devices (like e.g. lo or veth) ignore this setting and instead | ||
65 | default to noqueue. | ||
64 | Default: pfifo_fast | 66 | Default: pfifo_fast |
65 | 67 | ||
66 | busy_read | 68 | busy_read |
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index a4482fceacec..f72370b440b1 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt | |||
@@ -639,7 +639,7 @@ and don't use much of it. | |||
639 | The default value is 0. | 639 | The default value is 0. |
640 | 640 | ||
641 | See Documentation/vm/overcommit-accounting and | 641 | See Documentation/vm/overcommit-accounting and |
642 | security/commoncap.c::cap_vm_enough_memory() for more information. | 642 | mm/mmap.c::__vm_enough_memory() for more information. |
643 | 643 | ||
644 | ============================================================== | 644 | ============================================================== |
645 | 645 | ||
diff --git a/Documentation/thermal/power_allocator.txt b/Documentation/thermal/power_allocator.txt index c3797b529991..a1ce2235f121 100644 --- a/Documentation/thermal/power_allocator.txt +++ b/Documentation/thermal/power_allocator.txt | |||
@@ -4,7 +4,7 @@ Power allocator governor tunables | |||
4 | Trip points | 4 | Trip points |
5 | ----------- | 5 | ----------- |
6 | 6 | ||
7 | The governor requires the following two passive trip points: | 7 | The governor works optimally with the following two passive trip points: |
8 | 8 | ||
9 | 1. "switch on" trip point: temperature above which the governor | 9 | 1. "switch on" trip point: temperature above which the governor |
10 | control loop starts operating. This is the first passive trip | 10 | control loop starts operating. This is the first passive trip |
diff --git a/Documentation/trace/events.txt b/Documentation/trace/events.txt index 75d25a1d6e42..c010be8c85d7 100644 --- a/Documentation/trace/events.txt +++ b/Documentation/trace/events.txt | |||
@@ -288,6 +288,24 @@ prev_pid == 0 | |||
288 | # cat sched_wakeup/filter | 288 | # cat sched_wakeup/filter |
289 | common_pid == 0 | 289 | common_pid == 0 |
290 | 290 | ||
291 | 5.4 PID filtering | ||
292 | ----------------- | ||
293 | |||
294 | The set_event_pid file in the same directory as the top events directory | ||
295 | exists, will filter all events from tracing any task that does not have the | ||
296 | PID listed in the set_event_pid file. | ||
297 | |||
298 | # cd /sys/kernel/debug/tracing | ||
299 | # echo $$ > set_event_pid | ||
300 | # echo 1 > events/enabled | ||
301 | |||
302 | Will only trace events for the current task. | ||
303 | |||
304 | To add more PIDs without losing the PIDs already included, use '>>'. | ||
305 | |||
306 | # echo 123 244 1 >> set_event_pid | ||
307 | |||
308 | |||
291 | 6. Event triggers | 309 | 6. Event triggers |
292 | ================= | 310 | ================= |
293 | 311 | ||
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt index ef621d34ba5b..f52f297cb406 100644 --- a/Documentation/trace/ftrace.txt +++ b/Documentation/trace/ftrace.txt | |||
@@ -204,6 +204,12 @@ of ftrace. Here is a list of some of the key files: | |||
204 | 204 | ||
205 | Have the function tracer only trace a single thread. | 205 | Have the function tracer only trace a single thread. |
206 | 206 | ||
207 | set_event_pid: | ||
208 | |||
209 | Have the events only trace a task with a PID listed in this file. | ||
210 | Note, sched_switch and sched_wake_up will also trace events | ||
211 | listed in this file. | ||
212 | |||
207 | set_graph_function: | 213 | set_graph_function: |
208 | 214 | ||
209 | Set a "trigger" function where tracing should start | 215 | Set a "trigger" function where tracing should start |
@@ -2437,6 +2443,23 @@ The following commands are supported: | |||
2437 | 2443 | ||
2438 | echo '!writeback*:mod:ext3' >> set_ftrace_filter | 2444 | echo '!writeback*:mod:ext3' >> set_ftrace_filter |
2439 | 2445 | ||
2446 | Mod command supports module globbing. Disable tracing for all | ||
2447 | functions except a specific module: | ||
2448 | |||
2449 | echo '!*:mod:!ext3' >> set_ftrace_filter | ||
2450 | |||
2451 | Disable tracing for all modules, but still trace kernel: | ||
2452 | |||
2453 | echo '!*:mod:*' >> set_ftrace_filter | ||
2454 | |||
2455 | Enable filter only for kernel: | ||
2456 | |||
2457 | echo '*write*:mod:!*' >> set_ftrace_filter | ||
2458 | |||
2459 | Enable filter for module globbing: | ||
2460 | |||
2461 | echo '*write*:mod:*snd*' >> set_ftrace_filter | ||
2462 | |||
2440 | - traceon/traceoff | 2463 | - traceon/traceoff |
2441 | These commands turn tracing on and off when the specified | 2464 | These commands turn tracing on and off when the specified |
2442 | functions are hit. The parameter determines how many times the | 2465 | functions are hit. The parameter determines how many times the |
diff --git a/Documentation/trace/intel_th.txt b/Documentation/trace/intel_th.txt new file mode 100644 index 000000000000..f7fc5ba5df8d --- /dev/null +++ b/Documentation/trace/intel_th.txt | |||
@@ -0,0 +1,99 @@ | |||
1 | Intel(R) Trace Hub (TH) | ||
2 | ======================= | ||
3 | |||
4 | Overview | ||
5 | -------- | ||
6 | |||
7 | Intel(R) Trace Hub (TH) is a set of hardware blocks that produce, | ||
8 | switch and output trace data from multiple hardware and software | ||
9 | sources over several types of trace output ports encoded in System | ||
10 | Trace Protocol (MIPI STPv2) and is intended to perform full system | ||
11 | debugging. For more information on the hardware, see Intel(R) Trace | ||
12 | Hub developer's manual [1]. | ||
13 | |||
14 | It consists of trace sources, trace destinations (outputs) and a | ||
15 | switch (Global Trace Hub, GTH). These devices are placed on a bus of | ||
16 | their own ("intel_th"), where they can be discovered and configured | ||
17 | via sysfs attributes. | ||
18 | |||
19 | Currently, the following Intel TH subdevices (blocks) are supported: | ||
20 | - Software Trace Hub (STH), trace source, which is a System Trace | ||
21 | Module (STM) device, | ||
22 | - Memory Storage Unit (MSU), trace output, which allows storing | ||
23 | trace hub output in system memory, | ||
24 | - Parallel Trace Interface output (PTI), trace output to an external | ||
25 | debug host via a PTI port, | ||
26 | - Global Trace Hub (GTH), which is a switch and a central component | ||
27 | of Intel(R) Trace Hub architecture. | ||
28 | |||
29 | Common attributes for output devices are described in | ||
30 | Documentation/ABI/testing/sysfs-bus-intel_th-output-devices, the most | ||
31 | notable of them is "active", which enables or disables trace output | ||
32 | into that particular output device. | ||
33 | |||
34 | GTH allows directing different STP masters into different output ports | ||
35 | via its "masters" attribute group. More detailed GTH interface | ||
36 | description is at Documentation/ABI/testing/sysfs-bus-intel_th-devices-gth. | ||
37 | |||
38 | STH registers an stm class device, through which it provides interface | ||
39 | to userspace and kernelspace software trace sources. See | ||
40 | Documentation/tracing/stm.txt for more information on that. | ||
41 | |||
42 | MSU can be configured to collect trace data into a system memory | ||
43 | buffer, which can later on be read from its device nodes via read() or | ||
44 | mmap() interface. | ||
45 | |||
46 | On the whole, Intel(R) Trace Hub does not require any special | ||
47 | userspace software to function; everything can be configured, started | ||
48 | and collected via sysfs attributes, and device nodes. | ||
49 | |||
50 | [1] https://software.intel.com/sites/default/files/managed/d3/3c/intel-th-developer-manual.pdf | ||
51 | |||
52 | Bus and Subdevices | ||
53 | ------------------ | ||
54 | |||
55 | For each Intel TH device in the system a bus of its own is | ||
56 | created and assigned an id number that reflects the order in which TH | ||
57 | devices were emumerated. All TH subdevices (devices on intel_th bus) | ||
58 | begin with this id: 0-gth, 0-msc0, 0-msc1, 0-pti, 0-sth, which is | ||
59 | followed by device's name and an optional index. | ||
60 | |||
61 | Output devices also get a device node in /dev/intel_thN, where N is | ||
62 | the Intel TH device id. For example, MSU's memory buffers, when | ||
63 | allocated, are accessible via /dev/intel_th0/msc{0,1}. | ||
64 | |||
65 | Quick example | ||
66 | ------------- | ||
67 | |||
68 | # figure out which GTH port is the first memory controller: | ||
69 | |||
70 | $ cat /sys/bus/intel_th/devices/0-msc0/port | ||
71 | 0 | ||
72 | |||
73 | # looks like it's port 0, configure master 33 to send data to port 0: | ||
74 | |||
75 | $ echo 0 > /sys/bus/intel_th/devices/0-gth/masters/33 | ||
76 | |||
77 | # allocate a 2-windowed multiblock buffer on the first memory | ||
78 | # controller, each with 64 pages: | ||
79 | |||
80 | $ echo multi > /sys/bus/intel_th/devices/0-msc0/mode | ||
81 | $ echo 64,64 > /sys/bus/intel_th/devices/0-msc0/nr_pages | ||
82 | |||
83 | # enable wrapping for this controller, too: | ||
84 | |||
85 | $ echo 1 > /sys/bus/intel_th/devices/0-msc0/wrap | ||
86 | |||
87 | # and enable tracing into this port: | ||
88 | |||
89 | $ echo 1 > /sys/bus/intel_th/devices/0-msc0/active | ||
90 | |||
91 | # .. send data to master 33, see stm.txt for more details .. | ||
92 | # .. wait for traces to pile up .. | ||
93 | # .. and stop the trace: | ||
94 | |||
95 | $ echo 0 > /sys/bus/intel_th/devices/0-msc0/active | ||
96 | |||
97 | # and now you can collect the trace from the device node: | ||
98 | |||
99 | $ cat /dev/intel_th0/msc0 > my_stp_trace | ||
diff --git a/Documentation/trace/stm.txt b/Documentation/trace/stm.txt new file mode 100644 index 000000000000..ea035f9dbfd7 --- /dev/null +++ b/Documentation/trace/stm.txt | |||
@@ -0,0 +1,80 @@ | |||
1 | System Trace Module | ||
2 | =================== | ||
3 | |||
4 | System Trace Module (STM) is a device described in MIPI STP specs as | ||
5 | STP trace stream generator. STP (System Trace Protocol) is a trace | ||
6 | protocol multiplexing data from multiple trace sources, each one of | ||
7 | which is assigned a unique pair of master and channel. While some of | ||
8 | these masters and channels are statically allocated to certain | ||
9 | hardware trace sources, others are available to software. Software | ||
10 | trace sources are usually free to pick for themselves any | ||
11 | master/channel combination from this pool. | ||
12 | |||
13 | On the receiving end of this STP stream (the decoder side), trace | ||
14 | sources can only be identified by master/channel combination, so in | ||
15 | order for the decoder to be able to make sense of the trace that | ||
16 | involves multiple trace sources, it needs to be able to map those | ||
17 | master/channel pairs to the trace sources that it understands. | ||
18 | |||
19 | For instance, it is helpful to know that syslog messages come on | ||
20 | master 7 channel 15, while arbitrary user applications can use masters | ||
21 | 48 to 63 and channels 0 to 127. | ||
22 | |||
23 | To solve this mapping problem, stm class provides a policy management | ||
24 | mechanism via configfs, that allows defining rules that map string | ||
25 | identifiers to ranges of masters and channels. If these rules (policy) | ||
26 | are consistent with what decoder expects, it will be able to properly | ||
27 | process the trace data. | ||
28 | |||
29 | This policy is a tree structure containing rules (policy_node) that | ||
30 | have a name (string identifier) and a range of masters and channels | ||
31 | associated with it, located in "stp-policy" subsystem directory in | ||
32 | configfs. The topmost directory's name (the policy) is formatted as | ||
33 | the STM device name to which this policy applies and and arbitrary | ||
34 | string identifier separated by a stop. From the examle above, a rule | ||
35 | may look like this: | ||
36 | |||
37 | $ ls /config/stp-policy/dummy_stm.my-policy/user | ||
38 | channels masters | ||
39 | $ cat /config/stp-policy/dummy_stm.my-policy/user/masters | ||
40 | 48 63 | ||
41 | $ cat /config/stp-policy/dummy_stm.my-policy/user/channels | ||
42 | 0 127 | ||
43 | |||
44 | which means that the master allocation pool for this rule consists of | ||
45 | masters 48 through 63 and channel allocation pool has channels 0 | ||
46 | through 127 in it. Now, any producer (trace source) identifying itself | ||
47 | with "user" identification string will be allocated a master and | ||
48 | channel from within these ranges. | ||
49 | |||
50 | These rules can be nested, for example, one can define a rule "dummy" | ||
51 | under "user" directory from the example above and this new rule will | ||
52 | be used for trace sources with the id string of "user/dummy". | ||
53 | |||
54 | Trace sources have to open the stm class device's node and write their | ||
55 | trace data into its file descriptor. In order to identify themselves | ||
56 | to the policy, they need to do a STP_POLICY_ID_SET ioctl on this file | ||
57 | descriptor providing their id string. Otherwise, they will be | ||
58 | automatically allocated a master/channel pair upon first write to this | ||
59 | file descriptor according to the "default" rule of the policy, if such | ||
60 | exists. | ||
61 | |||
62 | Some STM devices may allow direct mapping of the channel mmio regions | ||
63 | to userspace for zero-copy writing. One mappable page (in terms of | ||
64 | mmu) will usually contain multiple channels' mmios, so the user will | ||
65 | need to allocate that many channels to themselves (via the | ||
66 | aforementioned ioctl() call) to be able to do this. That is, if your | ||
67 | stm device's channel mmio region is 64 bytes and hardware page size is | ||
68 | 4096 bytes, after a successful STP_POLICY_ID_SET ioctl() call with | ||
69 | width==64, you should be able to mmap() one page on this file | ||
70 | descriptor and obtain direct access to an mmio region for 64 channels. | ||
71 | |||
72 | For kernel-based trace sources, there is "stm_source" device | ||
73 | class. Devices of this class can be connected and disconnected to/from | ||
74 | stm devices at runtime via a sysfs attribute. | ||
75 | |||
76 | Examples of STM devices are Intel(R) Trace Hub [1] and Coresight STM | ||
77 | [2]. | ||
78 | |||
79 | [1] https://software.intel.com/sites/default/files/managed/d3/3c/intel-th-developer-manual.pdf | ||
80 | [2] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0444b/index.html | ||
diff --git a/Documentation/usb/authorization.txt b/Documentation/usb/authorization.txt index c069b6884c77..c7e985f05d8f 100644 --- a/Documentation/usb/authorization.txt +++ b/Documentation/usb/authorization.txt | |||
@@ -90,3 +90,34 @@ etc, but you get the idea. Anybody with access to a device gadget kit | |||
90 | can fake descriptors and device info. Don't trust that. You are | 90 | can fake descriptors and device info. Don't trust that. You are |
91 | welcome. | 91 | welcome. |
92 | 92 | ||
93 | |||
94 | Interface authorization | ||
95 | ----------------------- | ||
96 | There is a similar approach to allow or deny specific USB interfaces. | ||
97 | That allows to block only a subset of an USB device. | ||
98 | |||
99 | Authorize an interface: | ||
100 | $ echo 1 > /sys/bus/usb/devices/INTERFACE/authorized | ||
101 | |||
102 | Deauthorize an interface: | ||
103 | $ echo 0 > /sys/bus/usb/devices/INTERFACE/authorized | ||
104 | |||
105 | The default value for new interfaces | ||
106 | on a particular USB bus can be changed, too. | ||
107 | |||
108 | Allow interfaces per default: | ||
109 | $ echo 1 > /sys/bus/usb/devices/usbX/interface_authorized_default | ||
110 | |||
111 | Deny interfaces per default: | ||
112 | $ echo 0 > /sys/bus/usb/devices/usbX/interface_authorized_default | ||
113 | |||
114 | Per default the interface_authorized_default bit is 1. | ||
115 | So all interfaces would authorized per default. | ||
116 | |||
117 | Note: | ||
118 | If a deauthorized interface will be authorized so the driver probing must | ||
119 | be triggered manually by writing INTERFACE to /sys/bus/usb/drivers_probe | ||
120 | |||
121 | For drivers that need multiple interfaces all needed interfaces should be | ||
122 | authroized first. After that the drivers should be probed. | ||
123 | This avoids side effects. | ||
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134 index f4b395bdc090..282102014bb9 100644 --- a/Documentation/video4linux/CARDLIST.saa7134 +++ b/Documentation/video4linux/CARDLIST.saa7134 | |||
@@ -193,3 +193,4 @@ | |||
193 | 192 -> AverMedia AverTV Satellite Hybrid+FM A706 [1461:2055] | 193 | 192 -> AverMedia AverTV Satellite Hybrid+FM A706 [1461:2055] |
194 | 193 -> WIS Voyager or compatible [1905:7007] | 194 | 193 -> WIS Voyager or compatible [1905:7007] |
195 | 194 -> AverMedia AverTV/505 [1461:a10a] | 195 | 194 -> AverMedia AverTV/505 [1461:a10a] |
196 | 195 -> Leadtek Winfast TV2100 FM [107d:6f3a] | ||
diff --git a/Documentation/video4linux/v4l2-pci-skeleton.c b/Documentation/video4linux/v4l2-pci-skeleton.c index 9c80c090e92d..95ae82860092 100644 --- a/Documentation/video4linux/v4l2-pci-skeleton.c +++ b/Documentation/video4linux/v4l2-pci-skeleton.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <media/v4l2-dv-timings.h> | 37 | #include <media/v4l2-dv-timings.h> |
38 | #include <media/v4l2-ctrls.h> | 38 | #include <media/v4l2-ctrls.h> |
39 | #include <media/v4l2-event.h> | 39 | #include <media/v4l2-event.h> |
40 | #include <media/videobuf2-v4l2.h> | ||
40 | #include <media/videobuf2-dma-contig.h> | 41 | #include <media/videobuf2-dma-contig.h> |
41 | 42 | ||
42 | MODULE_DESCRIPTION("V4L2 PCI Skeleton Driver"); | 43 | MODULE_DESCRIPTION("V4L2 PCI Skeleton Driver"); |
@@ -162,10 +163,11 @@ static irqreturn_t skeleton_irq(int irq, void *dev_id) | |||
162 | * minimum number: many DMA engines need a minimum of 2 buffers in the | 163 | * minimum number: many DMA engines need a minimum of 2 buffers in the |
163 | * queue and you need to have another available for userspace processing. | 164 | * queue and you need to have another available for userspace processing. |
164 | */ | 165 | */ |
165 | static int queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt, | 166 | static int queue_setup(struct vb2_queue *vq, const void *parg, |
166 | unsigned int *nbuffers, unsigned int *nplanes, | 167 | unsigned int *nbuffers, unsigned int *nplanes, |
167 | unsigned int sizes[], void *alloc_ctxs[]) | 168 | unsigned int sizes[], void *alloc_ctxs[]) |
168 | { | 169 | { |
170 | const struct v4l2_format *fmt = parg; | ||
169 | struct skeleton *skel = vb2_get_drv_priv(vq); | 171 | struct skeleton *skel = vb2_get_drv_priv(vq); |
170 | 172 | ||
171 | skel->field = skel->format.field; | 173 | skel->field = skel->format.field; |
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index d9ecceea5a02..092ee9fbaf2b 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt | |||
@@ -401,10 +401,9 @@ Capability: basic | |||
401 | Architectures: x86, ppc, mips | 401 | Architectures: x86, ppc, mips |
402 | Type: vcpu ioctl | 402 | Type: vcpu ioctl |
403 | Parameters: struct kvm_interrupt (in) | 403 | Parameters: struct kvm_interrupt (in) |
404 | Returns: 0 on success, -1 on error | 404 | Returns: 0 on success, negative on failure. |
405 | 405 | ||
406 | Queues a hardware interrupt vector to be injected. This is only | 406 | Queues a hardware interrupt vector to be injected. |
407 | useful if in-kernel local APIC or equivalent is not used. | ||
408 | 407 | ||
409 | /* for KVM_INTERRUPT */ | 408 | /* for KVM_INTERRUPT */ |
410 | struct kvm_interrupt { | 409 | struct kvm_interrupt { |
@@ -414,7 +413,14 @@ struct kvm_interrupt { | |||
414 | 413 | ||
415 | X86: | 414 | X86: |
416 | 415 | ||
417 | Note 'irq' is an interrupt vector, not an interrupt pin or line. | 416 | Returns: 0 on success, |
417 | -EEXIST if an interrupt is already enqueued | ||
418 | -EINVAL the the irq number is invalid | ||
419 | -ENXIO if the PIC is in the kernel | ||
420 | -EFAULT if the pointer is invalid | ||
421 | |||
422 | Note 'irq' is an interrupt vector, not an interrupt pin or line. This | ||
423 | ioctl is useful if the in-kernel PIC is not used. | ||
418 | 424 | ||
419 | PPC: | 425 | PPC: |
420 | 426 | ||
@@ -1598,7 +1604,7 @@ provided event instead of triggering an exit. | |||
1598 | struct kvm_ioeventfd { | 1604 | struct kvm_ioeventfd { |
1599 | __u64 datamatch; | 1605 | __u64 datamatch; |
1600 | __u64 addr; /* legal pio/mmio address */ | 1606 | __u64 addr; /* legal pio/mmio address */ |
1601 | __u32 len; /* 1, 2, 4, or 8 bytes */ | 1607 | __u32 len; /* 0, 1, 2, 4, or 8 bytes */ |
1602 | __s32 fd; | 1608 | __s32 fd; |
1603 | __u32 flags; | 1609 | __u32 flags; |
1604 | __u8 pad[36]; | 1610 | __u8 pad[36]; |
@@ -1621,6 +1627,10 @@ to the registered address is equal to datamatch in struct kvm_ioeventfd. | |||
1621 | For virtio-ccw devices, addr contains the subchannel id and datamatch the | 1627 | For virtio-ccw devices, addr contains the subchannel id and datamatch the |
1622 | virtqueue index. | 1628 | virtqueue index. |
1623 | 1629 | ||
1630 | With KVM_CAP_IOEVENTFD_ANY_LENGTH, a zero length ioeventfd is allowed, and | ||
1631 | the kernel will ignore the length of guest write and may get a faster vmexit. | ||
1632 | The speedup may only apply to specific architectures, but the ioeventfd will | ||
1633 | work anyway. | ||
1624 | 1634 | ||
1625 | 4.60 KVM_DIRTY_TLB | 1635 | 4.60 KVM_DIRTY_TLB |
1626 | 1636 | ||
@@ -1774,7 +1784,7 @@ has been called, this interface is completely emulated within the kernel. | |||
1774 | To use this to emulate the LINT1 input with KVM_CREATE_IRQCHIP, use the | 1784 | To use this to emulate the LINT1 input with KVM_CREATE_IRQCHIP, use the |
1775 | following algorithm: | 1785 | following algorithm: |
1776 | 1786 | ||
1777 | - pause the vpcu | 1787 | - pause the vcpu |
1778 | - read the local APIC's state (KVM_GET_LAPIC) | 1788 | - read the local APIC's state (KVM_GET_LAPIC) |
1779 | - check whether changing LINT1 will queue an NMI (see the LVT entry for LINT1) | 1789 | - check whether changing LINT1 will queue an NMI (see the LVT entry for LINT1) |
1780 | - if so, issue KVM_NMI | 1790 | - if so, issue KVM_NMI |
@@ -2798,7 +2808,7 @@ Returns: = 0 on success, | |||
2798 | < 0 on generic error (e.g. -EFAULT or -ENOMEM), | 2808 | < 0 on generic error (e.g. -EFAULT or -ENOMEM), |
2799 | > 0 if an exception occurred while walking the page tables | 2809 | > 0 if an exception occurred while walking the page tables |
2800 | 2810 | ||
2801 | Read or write data from/to the logical (virtual) memory of a VPCU. | 2811 | Read or write data from/to the logical (virtual) memory of a VCPU. |
2802 | 2812 | ||
2803 | Parameters are specified via the following structure: | 2813 | Parameters are specified via the following structure: |
2804 | 2814 | ||
@@ -3309,6 +3319,18 @@ Valid values for 'type' are: | |||
3309 | to ignore the request, or to gather VM memory core dump and/or | 3319 | to ignore the request, or to gather VM memory core dump and/or |
3310 | reset/shutdown of the VM. | 3320 | reset/shutdown of the VM. |
3311 | 3321 | ||
3322 | /* KVM_EXIT_IOAPIC_EOI */ | ||
3323 | struct { | ||
3324 | __u8 vector; | ||
3325 | } eoi; | ||
3326 | |||
3327 | Indicates that the VCPU's in-kernel local APIC received an EOI for a | ||
3328 | level-triggered IOAPIC interrupt. This exit only triggers when the | ||
3329 | IOAPIC is implemented in userspace (i.e. KVM_CAP_SPLIT_IRQCHIP is enabled); | ||
3330 | the userspace IOAPIC should process the EOI and retrigger the interrupt if | ||
3331 | it is still asserted. Vector is the LAPIC interrupt vector for which the | ||
3332 | EOI was received. | ||
3333 | |||
3312 | /* Fix the size of the union. */ | 3334 | /* Fix the size of the union. */ |
3313 | char padding[256]; | 3335 | char padding[256]; |
3314 | }; | 3336 | }; |
@@ -3627,6 +3649,26 @@ struct { | |||
3627 | 3649 | ||
3628 | KVM handlers should exit to userspace with rc = -EREMOTE. | 3650 | KVM handlers should exit to userspace with rc = -EREMOTE. |
3629 | 3651 | ||
3652 | 7.5 KVM_CAP_SPLIT_IRQCHIP | ||
3653 | |||
3654 | Architectures: x86 | ||
3655 | Parameters: args[0] - number of routes reserved for userspace IOAPICs | ||
3656 | Returns: 0 on success, -1 on error | ||
3657 | |||
3658 | Create a local apic for each processor in the kernel. This can be used | ||
3659 | instead of KVM_CREATE_IRQCHIP if the userspace VMM wishes to emulate the | ||
3660 | IOAPIC and PIC (and also the PIT, even though this has to be enabled | ||
3661 | separately). | ||
3662 | |||
3663 | This capability also enables in kernel routing of interrupt requests; | ||
3664 | when KVM_CAP_SPLIT_IRQCHIP only routes of KVM_IRQ_ROUTING_MSI type are | ||
3665 | used in the IRQ routing table. The first args[0] MSI routes are reserved | ||
3666 | for the IOAPIC pins. Whenever the LAPIC receives an EOI for these routes, | ||
3667 | a KVM_EXIT_IOAPIC_EOI vmexit will be reported to userspace. | ||
3668 | |||
3669 | Fails if VCPU has already been created, or if the irqchip is already in the | ||
3670 | kernel (i.e. KVM_CREATE_IRQCHIP has already been called). | ||
3671 | |||
3630 | 3672 | ||
3631 | 8. Other capabilities. | 3673 | 8. Other capabilities. |
3632 | ---------------------- | 3674 | ---------------------- |
diff --git a/Documentation/virtual/kvm/arm/vgic-mapped-irqs.txt b/Documentation/virtual/kvm/arm/vgic-mapped-irqs.txt new file mode 100644 index 000000000000..38bca2835278 --- /dev/null +++ b/Documentation/virtual/kvm/arm/vgic-mapped-irqs.txt | |||
@@ -0,0 +1,187 @@ | |||
1 | KVM/ARM VGIC Forwarded Physical Interrupts | ||
2 | ========================================== | ||
3 | |||
4 | The KVM/ARM code implements software support for the ARM Generic | ||
5 | Interrupt Controller's (GIC's) hardware support for virtualization by | ||
6 | allowing software to inject virtual interrupts to a VM, which the guest | ||
7 | OS sees as regular interrupts. The code is famously known as the VGIC. | ||
8 | |||
9 | Some of these virtual interrupts, however, correspond to physical | ||
10 | interrupts from real physical devices. One example could be the | ||
11 | architected timer, which itself supports virtualization, and therefore | ||
12 | lets a guest OS program the hardware device directly to raise an | ||
13 | interrupt at some point in time. When such an interrupt is raised, the | ||
14 | host OS initially handles the interrupt and must somehow signal this | ||
15 | event as a virtual interrupt to the guest. Another example could be a | ||
16 | passthrough device, where the physical interrupts are initially handled | ||
17 | by the host, but the device driver for the device lives in the guest OS | ||
18 | and KVM must therefore somehow inject a virtual interrupt on behalf of | ||
19 | the physical one to the guest OS. | ||
20 | |||
21 | These virtual interrupts corresponding to a physical interrupt on the | ||
22 | host are called forwarded physical interrupts, but are also sometimes | ||
23 | referred to as 'virtualized physical interrupts' and 'mapped interrupts'. | ||
24 | |||
25 | Forwarded physical interrupts are handled slightly differently compared | ||
26 | to virtual interrupts generated purely by a software emulated device. | ||
27 | |||
28 | |||
29 | The HW bit | ||
30 | ---------- | ||
31 | Virtual interrupts are signalled to the guest by programming the List | ||
32 | Registers (LRs) on the GIC before running a VCPU. The LR is programmed | ||
33 | with the virtual IRQ number and the state of the interrupt (Pending, | ||
34 | Active, or Pending+Active). When the guest ACKs and EOIs a virtual | ||
35 | interrupt, the LR state moves from Pending to Active, and finally to | ||
36 | inactive. | ||
37 | |||
38 | The LRs include an extra bit, called the HW bit. When this bit is set, | ||
39 | KVM must also program an additional field in the LR, the physical IRQ | ||
40 | number, to link the virtual with the physical IRQ. | ||
41 | |||
42 | When the HW bit is set, KVM must EITHER set the Pending OR the Active | ||
43 | bit, never both at the same time. | ||
44 | |||
45 | Setting the HW bit causes the hardware to deactivate the physical | ||
46 | interrupt on the physical distributor when the guest deactivates the | ||
47 | corresponding virtual interrupt. | ||
48 | |||
49 | |||
50 | Forwarded Physical Interrupts Life Cycle | ||
51 | ---------------------------------------- | ||
52 | |||
53 | The state of forwarded physical interrupts is managed in the following way: | ||
54 | |||
55 | - The physical interrupt is acked by the host, and becomes active on | ||
56 | the physical distributor (*). | ||
57 | - KVM sets the LR.Pending bit, because this is the only way the GICV | ||
58 | interface is going to present it to the guest. | ||
59 | - LR.Pending will stay set as long as the guest has not acked the interrupt. | ||
60 | - LR.Pending transitions to LR.Active on the guest read of the IAR, as | ||
61 | expected. | ||
62 | - On guest EOI, the *physical distributor* active bit gets cleared, | ||
63 | but the LR.Active is left untouched (set). | ||
64 | - KVM clears the LR on VM exits when the physical distributor | ||
65 | active state has been cleared. | ||
66 | |||
67 | (*): The host handling is slightly more complicated. For some forwarded | ||
68 | interrupts (shared), KVM directly sets the active state on the physical | ||
69 | distributor before entering the guest, because the interrupt is never actually | ||
70 | handled on the host (see details on the timer as an example below). For other | ||
71 | forwarded interrupts (non-shared) the host does not deactivate the interrupt | ||
72 | when the host ISR completes, but leaves the interrupt active until the guest | ||
73 | deactivates it. Leaving the interrupt active is allowed, because Linux | ||
74 | configures the physical GIC with EOIMode=1, which causes EOI operations to | ||
75 | perform a priority drop allowing the GIC to receive other interrupts of the | ||
76 | default priority. | ||
77 | |||
78 | |||
79 | Forwarded Edge and Level Triggered PPIs and SPIs | ||
80 | ------------------------------------------------ | ||
81 | Forwarded physical interrupts injected should always be active on the | ||
82 | physical distributor when injected to a guest. | ||
83 | |||
84 | Level-triggered interrupts will keep the interrupt line to the GIC | ||
85 | asserted, typically until the guest programs the device to deassert the | ||
86 | line. This means that the interrupt will remain pending on the physical | ||
87 | distributor until the guest has reprogrammed the device. Since we | ||
88 | always run the VM with interrupts enabled on the CPU, a pending | ||
89 | interrupt will exit the guest as soon as we switch into the guest, | ||
90 | preventing the guest from ever making progress as the process repeats | ||
91 | over and over. Therefore, the active state on the physical distributor | ||
92 | must be set when entering the guest, preventing the GIC from forwarding | ||
93 | the pending interrupt to the CPU. As soon as the guest deactivates the | ||
94 | interrupt, the physical line is sampled by the hardware again and the host | ||
95 | takes a new interrupt if and only if the physical line is still asserted. | ||
96 | |||
97 | Edge-triggered interrupts do not exhibit the same problem with | ||
98 | preventing guest execution that level-triggered interrupts do. One | ||
99 | option is to not use HW bit at all, and inject edge-triggered interrupts | ||
100 | from a physical device as pure virtual interrupts. But that would | ||
101 | potentially slow down handling of the interrupt in the guest, because a | ||
102 | physical interrupt occurring in the middle of the guest ISR would | ||
103 | preempt the guest for the host to handle the interrupt. Additionally, | ||
104 | if you configure the system to handle interrupts on a separate physical | ||
105 | core from that running your VCPU, you still have to interrupt the VCPU | ||
106 | to queue the pending state onto the LR, even though the guest won't use | ||
107 | this information until the guest ISR completes. Therefore, the HW | ||
108 | bit should always be set for forwarded edge-triggered interrupts. With | ||
109 | the HW bit set, the virtual interrupt is injected and additional | ||
110 | physical interrupts occurring before the guest deactivates the interrupt | ||
111 | simply mark the state on the physical distributor as Pending+Active. As | ||
112 | soon as the guest deactivates the interrupt, the host takes another | ||
113 | interrupt if and only if there was a physical interrupt between injecting | ||
114 | the forwarded interrupt to the guest and the guest deactivating the | ||
115 | interrupt. | ||
116 | |||
117 | Consequently, whenever we schedule a VCPU with one or more LRs with the | ||
118 | HW bit set, the interrupt must also be active on the physical | ||
119 | distributor. | ||
120 | |||
121 | |||
122 | Forwarded LPIs | ||
123 | -------------- | ||
124 | LPIs, introduced in GICv3, are always edge-triggered and do not have an | ||
125 | active state. They become pending when a device signal them, and as | ||
126 | soon as they are acked by the CPU, they are inactive again. | ||
127 | |||
128 | It therefore doesn't make sense, and is not supported, to set the HW bit | ||
129 | for physical LPIs that are forwarded to a VM as virtual interrupts, | ||
130 | typically virtual SPIs. | ||
131 | |||
132 | For LPIs, there is no other choice than to preempt the VCPU thread if | ||
133 | necessary, and queue the pending state onto the LR. | ||
134 | |||
135 | |||
136 | Putting It Together: The Architected Timer | ||
137 | ------------------------------------------ | ||
138 | The architected timer is a device that signals interrupts with level | ||
139 | triggered semantics. The timer hardware is directly accessed by VCPUs | ||
140 | which program the timer to fire at some point in time. Each VCPU on a | ||
141 | system programs the timer to fire at different times, and therefore the | ||
142 | hardware is multiplexed between multiple VCPUs. This is implemented by | ||
143 | context-switching the timer state along with each VCPU thread. | ||
144 | |||
145 | However, this means that a scenario like the following is entirely | ||
146 | possible, and in fact, typical: | ||
147 | |||
148 | 1. KVM runs the VCPU | ||
149 | 2. The guest programs the time to fire in T+100 | ||
150 | 3. The guest is idle and calls WFI (wait-for-interrupts) | ||
151 | 4. The hardware traps to the host | ||
152 | 5. KVM stores the timer state to memory and disables the hardware timer | ||
153 | 6. KVM schedules a soft timer to fire in T+(100 - time since step 2) | ||
154 | 7. KVM puts the VCPU thread to sleep (on a waitqueue) | ||
155 | 8. The soft timer fires, waking up the VCPU thread | ||
156 | 9. KVM reprograms the timer hardware with the VCPU's values | ||
157 | 10. KVM marks the timer interrupt as active on the physical distributor | ||
158 | 11. KVM injects a forwarded physical interrupt to the guest | ||
159 | 12. KVM runs the VCPU | ||
160 | |||
161 | Notice that KVM injects a forwarded physical interrupt in step 11 without | ||
162 | the corresponding interrupt having actually fired on the host. That is | ||
163 | exactly why we mark the timer interrupt as active in step 10, because | ||
164 | the active state on the physical distributor is part of the state | ||
165 | belonging to the timer hardware, which is context-switched along with | ||
166 | the VCPU thread. | ||
167 | |||
168 | If the guest does not idle because it is busy, the flow looks like this | ||
169 | instead: | ||
170 | |||
171 | 1. KVM runs the VCPU | ||
172 | 2. The guest programs the time to fire in T+100 | ||
173 | 4. At T+100 the timer fires and a physical IRQ causes the VM to exit | ||
174 | (note that this initially only traps to EL2 and does not run the host ISR | ||
175 | until KVM has returned to the host). | ||
176 | 5. With interrupts still disabled on the CPU coming back from the guest, KVM | ||
177 | stores the virtual timer state to memory and disables the virtual hw timer. | ||
178 | 6. KVM looks at the timer state (in memory) and injects a forwarded physical | ||
179 | interrupt because it concludes the timer has expired. | ||
180 | 7. KVM marks the timer interrupt as active on the physical distributor | ||
181 | 7. KVM enables the timer, enables interrupts, and runs the VCPU | ||
182 | |||
183 | Notice that again the forwarded physical interrupt is injected to the | ||
184 | guest without having actually been handled on the host. In this case it | ||
185 | is because the physical interrupt is never actually seen by the host because the | ||
186 | timer is disabled upon guest return, and the virtual forwarded interrupt is | ||
187 | injected on the KVM guest entry path. | ||
diff --git a/Documentation/virtual/kvm/devices/arm-vgic.txt b/Documentation/virtual/kvm/devices/arm-vgic.txt index 3fb905429e8a..59541d49e15c 100644 --- a/Documentation/virtual/kvm/devices/arm-vgic.txt +++ b/Documentation/virtual/kvm/devices/arm-vgic.txt | |||
@@ -44,28 +44,29 @@ Groups: | |||
44 | Attributes: | 44 | Attributes: |
45 | The attr field of kvm_device_attr encodes two values: | 45 | The attr field of kvm_device_attr encodes two values: |
46 | bits: | 63 .... 40 | 39 .. 32 | 31 .... 0 | | 46 | bits: | 63 .... 40 | 39 .. 32 | 31 .... 0 | |
47 | values: | reserved | cpu id | offset | | 47 | values: | reserved | vcpu_index | offset | |
48 | 48 | ||
49 | All distributor regs are (rw, 32-bit) | 49 | All distributor regs are (rw, 32-bit) |
50 | 50 | ||
51 | The offset is relative to the "Distributor base address" as defined in the | 51 | The offset is relative to the "Distributor base address" as defined in the |
52 | GICv2 specs. Getting or setting such a register has the same effect as | 52 | GICv2 specs. Getting or setting such a register has the same effect as |
53 | reading or writing the register on the actual hardware from the cpu | 53 | reading or writing the register on the actual hardware from the cpu whose |
54 | specified with cpu id field. Note that most distributor fields are not | 54 | index is specified with the vcpu_index field. Note that most distributor |
55 | banked, but return the same value regardless of the cpu id used to access | 55 | fields are not banked, but return the same value regardless of the |
56 | the register. | 56 | vcpu_index used to access the register. |
57 | Limitations: | 57 | Limitations: |
58 | - Priorities are not implemented, and registers are RAZ/WI | 58 | - Priorities are not implemented, and registers are RAZ/WI |
59 | - Currently only implemented for KVM_DEV_TYPE_ARM_VGIC_V2. | 59 | - Currently only implemented for KVM_DEV_TYPE_ARM_VGIC_V2. |
60 | Errors: | 60 | Errors: |
61 | -ENODEV: Getting or setting this register is not yet supported | 61 | -ENXIO: Getting or setting this register is not yet supported |
62 | -EBUSY: One or more VCPUs are running | 62 | -EBUSY: One or more VCPUs are running |
63 | -EINVAL: Invalid vcpu_index supplied | ||
63 | 64 | ||
64 | KVM_DEV_ARM_VGIC_GRP_CPU_REGS | 65 | KVM_DEV_ARM_VGIC_GRP_CPU_REGS |
65 | Attributes: | 66 | Attributes: |
66 | The attr field of kvm_device_attr encodes two values: | 67 | The attr field of kvm_device_attr encodes two values: |
67 | bits: | 63 .... 40 | 39 .. 32 | 31 .... 0 | | 68 | bits: | 63 .... 40 | 39 .. 32 | 31 .... 0 | |
68 | values: | reserved | cpu id | offset | | 69 | values: | reserved | vcpu_index | offset | |
69 | 70 | ||
70 | All CPU interface regs are (rw, 32-bit) | 71 | All CPU interface regs are (rw, 32-bit) |
71 | 72 | ||
@@ -91,8 +92,9 @@ Groups: | |||
91 | - Priorities are not implemented, and registers are RAZ/WI | 92 | - Priorities are not implemented, and registers are RAZ/WI |
92 | - Currently only implemented for KVM_DEV_TYPE_ARM_VGIC_V2. | 93 | - Currently only implemented for KVM_DEV_TYPE_ARM_VGIC_V2. |
93 | Errors: | 94 | Errors: |
94 | -ENODEV: Getting or setting this register is not yet supported | 95 | -ENXIO: Getting or setting this register is not yet supported |
95 | -EBUSY: One or more VCPUs are running | 96 | -EBUSY: One or more VCPUs are running |
97 | -EINVAL: Invalid vcpu_index supplied | ||
96 | 98 | ||
97 | KVM_DEV_ARM_VGIC_GRP_NR_IRQS | 99 | KVM_DEV_ARM_VGIC_GRP_NR_IRQS |
98 | Attributes: | 100 | Attributes: |
diff --git a/Documentation/virtual/kvm/devices/vm.txt b/Documentation/virtual/kvm/devices/vm.txt index 5542c4641a3c..2d09d1ed86d0 100644 --- a/Documentation/virtual/kvm/devices/vm.txt +++ b/Documentation/virtual/kvm/devices/vm.txt | |||
@@ -74,7 +74,7 @@ struct kvm_s390_vm_cpu_processor { | |||
74 | 74 | ||
75 | KVM does not enforce or limit the cpu model data in any form. Take the information | 75 | KVM does not enforce or limit the cpu model data in any form. Take the information |
76 | retrieved by means of KVM_S390_VM_CPU_MACHINE as hint for reasonable configuration | 76 | retrieved by means of KVM_S390_VM_CPU_MACHINE as hint for reasonable configuration |
77 | setups. Instruction interceptions triggered by additionally set facilitiy bits that | 77 | setups. Instruction interceptions triggered by additionally set facility bits that |
78 | are not handled by KVM need to by imlemented in the VM driver code. | 78 | are not handled by KVM need to by imlemented in the VM driver code. |
79 | 79 | ||
80 | Parameters: address of buffer to store/set the processor related cpu | 80 | Parameters: address of buffer to store/set the processor related cpu |
diff --git a/Documentation/virtual/kvm/locking.txt b/Documentation/virtual/kvm/locking.txt index d68af4dc3006..19f94a6b9bb0 100644 --- a/Documentation/virtual/kvm/locking.txt +++ b/Documentation/virtual/kvm/locking.txt | |||
@@ -166,3 +166,15 @@ Comment: The srcu read lock must be held while accessing memslots (e.g. | |||
166 | MMIO/PIO address->device structure mapping (kvm->buses). | 166 | MMIO/PIO address->device structure mapping (kvm->buses). |
167 | The srcu index can be stored in kvm_vcpu->srcu_idx per vcpu | 167 | The srcu index can be stored in kvm_vcpu->srcu_idx per vcpu |
168 | if it is needed by multiple functions. | 168 | if it is needed by multiple functions. |
169 | |||
170 | Name: blocked_vcpu_on_cpu_lock | ||
171 | Type: spinlock_t | ||
172 | Arch: x86 | ||
173 | Protects: blocked_vcpu_on_cpu | ||
174 | Comment: This is a per-CPU lock and it is used for VT-d posted-interrupts. | ||
175 | When VT-d posted-interrupts is supported and the VM has assigned | ||
176 | devices, we put the blocked vCPU on the list blocked_vcpu_on_cpu | ||
177 | protected by blocked_vcpu_on_cpu_lock, when VT-d hardware issues | ||
178 | wakeup notification event since external interrupts from the | ||
179 | assigned devices happens, we will find the vCPU on the list to | ||
180 | wakeup. | ||
diff --git a/Documentation/virtual/kvm/ppc-pv.txt b/Documentation/virtual/kvm/ppc-pv.txt index 319560646f32..e26115ce4258 100644 --- a/Documentation/virtual/kvm/ppc-pv.txt +++ b/Documentation/virtual/kvm/ppc-pv.txt | |||
@@ -110,7 +110,7 @@ Flags are passed to the host in the low 12 bits of the Effective Address. | |||
110 | 110 | ||
111 | The following flags are currently available for a guest to expose: | 111 | The following flags are currently available for a guest to expose: |
112 | 112 | ||
113 | MAGIC_PAGE_FLAG_NOT_MAPPED_NX Guest handles NX bits correclty wrt magic page | 113 | MAGIC_PAGE_FLAG_NOT_MAPPED_NX Guest handles NX bits correctly wrt magic page |
114 | 114 | ||
115 | MSR bits | 115 | MSR bits |
116 | ======== | 116 | ======== |
diff --git a/Documentation/vm/balance b/Documentation/vm/balance index c46e68cf9344..964595481af6 100644 --- a/Documentation/vm/balance +++ b/Documentation/vm/balance | |||
@@ -1,12 +1,14 @@ | |||
1 | Started Jan 2000 by Kanoj Sarcar <kanoj@sgi.com> | 1 | Started Jan 2000 by Kanoj Sarcar <kanoj@sgi.com> |
2 | 2 | ||
3 | Memory balancing is needed for non __GFP_WAIT as well as for non | 3 | Memory balancing is needed for !__GFP_ATOMIC and !__GFP_KSWAPD_RECLAIM as |
4 | __GFP_IO allocations. | 4 | well as for non __GFP_IO allocations. |
5 | 5 | ||
6 | There are two reasons to be requesting non __GFP_WAIT allocations: | 6 | The first reason why a caller may avoid reclaim is that the caller can not |
7 | the caller can not sleep (typically intr context), or does not want | 7 | sleep due to holding a spinlock or is in interrupt context. The second may |
8 | to incur cost overheads of page stealing and possible swap io for | 8 | be that the caller is willing to fail the allocation without incurring the |
9 | whatever reasons. | 9 | overhead of page reclaim. This may happen for opportunistic high-order |
10 | allocation requests that have order-0 fallback options. In such cases, | ||
11 | the caller may also wish to avoid waking kswapd. | ||
10 | 12 | ||
11 | __GFP_IO allocation requests are made to prevent file system deadlocks. | 13 | __GFP_IO allocation requests are made to prevent file system deadlocks. |
12 | 14 | ||
diff --git a/Documentation/vm/page_migration b/Documentation/vm/page_migration index 6513fe2d90b8..fea5c0864170 100644 --- a/Documentation/vm/page_migration +++ b/Documentation/vm/page_migration | |||
@@ -92,29 +92,26 @@ Steps: | |||
92 | 92 | ||
93 | 2. Insure that writeback is complete. | 93 | 2. Insure that writeback is complete. |
94 | 94 | ||
95 | 3. Prep the new page that we want to move to. It is locked | 95 | 3. Lock the new page that we want to move to. It is locked so that accesses to |
96 | and set to not being uptodate so that all accesses to the new | 96 | this (not yet uptodate) page immediately lock while the move is in progress. |
97 | page immediately lock while the move is in progress. | ||
98 | 97 | ||
99 | 4. The new page is prepped with some settings from the old page so that | 98 | 4. All the page table references to the page are converted to migration |
100 | accesses to the new page will discover a page with the correct settings. | 99 | entries. This decreases the mapcount of a page. If the resulting |
101 | 100 | mapcount is not zero then we do not migrate the page. All user space | |
102 | 5. All the page table references to the page are converted | 101 | processes that attempt to access the page will now wait on the page lock. |
103 | to migration entries or dropped (nonlinear vmas). | ||
104 | This decrease the mapcount of a page. If the resulting | ||
105 | mapcount is not zero then we do not migrate the page. | ||
106 | All user space processes that attempt to access the page | ||
107 | will now wait on the page lock. | ||
108 | 102 | ||
109 | 6. The radix tree lock is taken. This will cause all processes trying | 103 | 5. The radix tree lock is taken. This will cause all processes trying |
110 | to access the page via the mapping to block on the radix tree spinlock. | 104 | to access the page via the mapping to block on the radix tree spinlock. |
111 | 105 | ||
112 | 7. The refcount of the page is examined and we back out if references remain | 106 | 6. The refcount of the page is examined and we back out if references remain |
113 | otherwise we know that we are the only one referencing this page. | 107 | otherwise we know that we are the only one referencing this page. |
114 | 108 | ||
115 | 8. The radix tree is checked and if it does not contain the pointer to this | 109 | 7. The radix tree is checked and if it does not contain the pointer to this |
116 | page then we back out because someone else modified the radix tree. | 110 | page then we back out because someone else modified the radix tree. |
117 | 111 | ||
112 | 8. The new page is prepped with some settings from the old page so that | ||
113 | accesses to the new page will discover a page with the correct settings. | ||
114 | |||
118 | 9. The radix tree is changed to point to the new page. | 115 | 9. The radix tree is changed to point to the new page. |
119 | 116 | ||
120 | 10. The reference count of the old page is dropped because the radix tree | 117 | 10. The reference count of the old page is dropped because the radix tree |
diff --git a/Documentation/vm/slub.txt b/Documentation/vm/slub.txt index b0c6d1bbb434..699d8ea5c230 100644 --- a/Documentation/vm/slub.txt +++ b/Documentation/vm/slub.txt | |||
@@ -280,4 +280,63 @@ of other objects. | |||
280 | 280 | ||
281 | slub_debug=FZ,dentry | 281 | slub_debug=FZ,dentry |
282 | 282 | ||
283 | Extended slabinfo mode and plotting | ||
284 | ----------------------------------- | ||
285 | |||
286 | The slabinfo tool has a special 'extended' ('-X') mode that includes: | ||
287 | - Slabcache Totals | ||
288 | - Slabs sorted by size (up to -N <num> slabs, default 1) | ||
289 | - Slabs sorted by loss (up to -N <num> slabs, default 1) | ||
290 | |||
291 | Additionally, in this mode slabinfo does not dynamically scale sizes (G/M/K) | ||
292 | and reports everything in bytes (this functionality is also available to | ||
293 | other slabinfo modes via '-B' option) which makes reporting more precise and | ||
294 | accurate. Moreover, in some sense the `-X' mode also simplifies the analysis | ||
295 | of slabs' behaviour, because its output can be plotted using the | ||
296 | slabinfo-gnuplot.sh script. So it pushes the analysis from looking through | ||
297 | the numbers (tons of numbers) to something easier -- visual analysis. | ||
298 | |||
299 | To generate plots: | ||
300 | a) collect slabinfo extended records, for example: | ||
301 | |||
302 | while [ 1 ]; do slabinfo -X >> FOO_STATS; sleep 1; done | ||
303 | |||
304 | b) pass stats file(-s) to slabinfo-gnuplot.sh script: | ||
305 | slabinfo-gnuplot.sh FOO_STATS [FOO_STATS2 .. FOO_STATSN] | ||
306 | |||
307 | The slabinfo-gnuplot.sh script will pre-processes the collected records | ||
308 | and generates 3 png files (and 3 pre-processing cache files) per STATS | ||
309 | file: | ||
310 | - Slabcache Totals: FOO_STATS-totals.png | ||
311 | - Slabs sorted by size: FOO_STATS-slabs-by-size.png | ||
312 | - Slabs sorted by loss: FOO_STATS-slabs-by-loss.png | ||
313 | |||
314 | Another use case, when slabinfo-gnuplot can be useful, is when you need | ||
315 | to compare slabs' behaviour "prior to" and "after" some code modification. | ||
316 | To help you out there, slabinfo-gnuplot.sh script can 'merge' the | ||
317 | `Slabcache Totals` sections from different measurements. To visually | ||
318 | compare N plots: | ||
319 | |||
320 | a) Collect as many STATS1, STATS2, .. STATSN files as you need | ||
321 | while [ 1 ]; do slabinfo -X >> STATS<X>; sleep 1; done | ||
322 | |||
323 | b) Pre-process those STATS files | ||
324 | slabinfo-gnuplot.sh STATS1 STATS2 .. STATSN | ||
325 | |||
326 | c) Execute slabinfo-gnuplot.sh in '-t' mode, passing all of the | ||
327 | generated pre-processed *-totals | ||
328 | slabinfo-gnuplot.sh -t STATS1-totals STATS2-totals .. STATSN-totals | ||
329 | |||
330 | This will produce a single plot (png file). | ||
331 | |||
332 | Plots, expectedly, can be large so some fluctuations or small spikes | ||
333 | can go unnoticed. To deal with that, `slabinfo-gnuplot.sh' has two | ||
334 | options to 'zoom-in'/'zoom-out': | ||
335 | a) -s %d,%d overwrites the default image width and heigh | ||
336 | b) -r %d,%d specifies a range of samples to use (for example, | ||
337 | in `slabinfo -X >> FOO_STATS; sleep 1;' case, using | ||
338 | a "-r 40,60" range will plot only samples collected | ||
339 | between 40th and 60th seconds). | ||
340 | |||
283 | Christoph Lameter, May 30, 2007 | 341 | Christoph Lameter, May 30, 2007 |
342 | Sergey Senozhatsky, October 23, 2015 | ||
diff --git a/Documentation/vm/split_page_table_lock b/Documentation/vm/split_page_table_lock index 6dea4fd5c961..62842a857dab 100644 --- a/Documentation/vm/split_page_table_lock +++ b/Documentation/vm/split_page_table_lock | |||
@@ -54,8 +54,8 @@ everything required is done by pgtable_page_ctor() and pgtable_page_dtor(), | |||
54 | which must be called on PTE table allocation / freeing. | 54 | which must be called on PTE table allocation / freeing. |
55 | 55 | ||
56 | Make sure the architecture doesn't use slab allocator for page table | 56 | Make sure the architecture doesn't use slab allocator for page table |
57 | allocation: slab uses page->slab_cache and page->first_page for its pages. | 57 | allocation: slab uses page->slab_cache for its pages. |
58 | These fields share storage with page->ptl. | 58 | This field shares storage with page->ptl. |
59 | 59 | ||
60 | PMD split lock only makes sense if you have more than two page table | 60 | PMD split lock only makes sense if you have more than two page table |
61 | levels. | 61 | levels. |
diff --git a/Documentation/vm/transhuge.txt b/Documentation/vm/transhuge.txt index 8143b9e8373d..8a282687ee06 100644 --- a/Documentation/vm/transhuge.txt +++ b/Documentation/vm/transhuge.txt | |||
@@ -170,6 +170,16 @@ A lower value leads to gain less thp performance. Value of | |||
170 | max_ptes_none can waste cpu time very little, you can | 170 | max_ptes_none can waste cpu time very little, you can |
171 | ignore it. | 171 | ignore it. |
172 | 172 | ||
173 | max_ptes_swap specifies how many pages can be brought in from | ||
174 | swap when collapsing a group of pages into a transparent huge page. | ||
175 | |||
176 | /sys/kernel/mm/transparent_hugepage/khugepaged/max_ptes_swap | ||
177 | |||
178 | A higher value can cause excessive swap IO and waste | ||
179 | memory. A lower value can prevent THPs from being | ||
180 | collapsed, resulting fewer pages being collapsed into | ||
181 | THPs, and lower memory access performance. | ||
182 | |||
173 | == Boot parameter == | 183 | == Boot parameter == |
174 | 184 | ||
175 | You can change the sysfs boot time defaults of Transparent Hugepage | 185 | You can change the sysfs boot time defaults of Transparent Hugepage |
diff --git a/Documentation/vm/unevictable-lru.txt b/Documentation/vm/unevictable-lru.txt index 32ee3a67dba2..fa3b527086fa 100644 --- a/Documentation/vm/unevictable-lru.txt +++ b/Documentation/vm/unevictable-lru.txt | |||
@@ -531,83 +531,20 @@ map. | |||
531 | 531 | ||
532 | try_to_unmap() is always called, by either vmscan for reclaim or for page | 532 | try_to_unmap() is always called, by either vmscan for reclaim or for page |
533 | migration, with the argument page locked and isolated from the LRU. Separate | 533 | migration, with the argument page locked and isolated from the LRU. Separate |
534 | functions handle anonymous and mapped file pages, as these types of pages have | 534 | functions handle anonymous and mapped file and KSM pages, as these types of |
535 | different reverse map mechanisms. | 535 | pages have different reverse map lookup mechanisms, with different locking. |
536 | 536 | In each case, whether rmap_walk_anon() or rmap_walk_file() or rmap_walk_ksm(), | |
537 | (*) try_to_unmap_anon() | 537 | it will call try_to_unmap_one() for every VMA which might contain the page. |
538 | 538 | ||
539 | To unmap anonymous pages, each VMA in the list anchored in the anon_vma | 539 | When trying to reclaim, if try_to_unmap_one() finds the page in a VM_LOCKED |
540 | must be visited - at least until a VM_LOCKED VMA is encountered. If the | 540 | VMA, it will then mlock the page via mlock_vma_page() instead of unmapping it, |
541 | page is being unmapped for migration, VM_LOCKED VMAs do not stop the | 541 | and return SWAP_MLOCK to indicate that the page is unevictable: and the scan |
542 | process because mlocked pages are migratable. However, for reclaim, if | 542 | stops there. |
543 | the page is mapped into a VM_LOCKED VMA, the scan stops. | 543 | |
544 | 544 | mlock_vma_page() is called while holding the page table's lock (in addition | |
545 | try_to_unmap_anon() attempts to acquire in read mode the mmap semaphore of | 545 | to the page lock, and the rmap lock): to serialize against concurrent mlock or |
546 | the mm_struct to which the VMA belongs. If this is successful, it will | 546 | munlock or munmap system calls, mm teardown (munlock_vma_pages_all), reclaim, |
547 | mlock the page via mlock_vma_page() - we wouldn't have gotten to | 547 | holepunching, and truncation of file pages and their anonymous COWed pages. |
548 | try_to_unmap_anon() if the page were already mlocked - and will return | ||
549 | SWAP_MLOCK, indicating that the page is unevictable. | ||
550 | |||
551 | If the mmap semaphore cannot be acquired, we are not sure whether the page | ||
552 | is really unevictable or not. In this case, try_to_unmap_anon() will | ||
553 | return SWAP_AGAIN. | ||
554 | |||
555 | (*) try_to_unmap_file() - linear mappings | ||
556 | |||
557 | Unmapping of a mapped file page works the same as for anonymous mappings, | ||
558 | except that the scan visits all VMAs that map the page's index/page offset | ||
559 | in the page's mapping's reverse map priority search tree. It also visits | ||
560 | each VMA in the page's mapping's non-linear list, if the list is | ||
561 | non-empty. | ||
562 | |||
563 | As for anonymous pages, on encountering a VM_LOCKED VMA for a mapped file | ||
564 | page, try_to_unmap_file() will attempt to acquire the associated | ||
565 | mm_struct's mmap semaphore to mlock the page, returning SWAP_MLOCK if this | ||
566 | is successful, and SWAP_AGAIN, if not. | ||
567 | |||
568 | (*) try_to_unmap_file() - non-linear mappings | ||
569 | |||
570 | If a page's mapping contains a non-empty non-linear mapping VMA list, then | ||
571 | try_to_un{map|lock}() must also visit each VMA in that list to determine | ||
572 | whether the page is mapped in a VM_LOCKED VMA. Again, the scan must visit | ||
573 | all VMAs in the non-linear list to ensure that the pages is not/should not | ||
574 | be mlocked. | ||
575 | |||
576 | If a VM_LOCKED VMA is found in the list, the scan could terminate. | ||
577 | However, there is no easy way to determine whether the page is actually | ||
578 | mapped in a given VMA - either for unmapping or testing whether the | ||
579 | VM_LOCKED VMA actually pins the page. | ||
580 | |||
581 | try_to_unmap_file() handles non-linear mappings by scanning a certain | ||
582 | number of pages - a "cluster" - in each non-linear VMA associated with the | ||
583 | page's mapping, for each file mapped page that vmscan tries to unmap. If | ||
584 | this happens to unmap the page we're trying to unmap, try_to_unmap() will | ||
585 | notice this on return (page_mapcount(page) will be 0) and return | ||
586 | SWAP_SUCCESS. Otherwise, it will return SWAP_AGAIN, causing vmscan to | ||
587 | recirculate this page. We take advantage of the cluster scan in | ||
588 | try_to_unmap_cluster() as follows: | ||
589 | |||
590 | For each non-linear VMA, try_to_unmap_cluster() attempts to acquire the | ||
591 | mmap semaphore of the associated mm_struct for read without blocking. | ||
592 | |||
593 | If this attempt is successful and the VMA is VM_LOCKED, | ||
594 | try_to_unmap_cluster() will retain the mmap semaphore for the scan; | ||
595 | otherwise it drops it here. | ||
596 | |||
597 | Then, for each page in the cluster, if we're holding the mmap semaphore | ||
598 | for a locked VMA, try_to_unmap_cluster() calls mlock_vma_page() to | ||
599 | mlock the page. This call is a no-op if the page is already locked, | ||
600 | but will mlock any pages in the non-linear mapping that happen to be | ||
601 | unlocked. | ||
602 | |||
603 | If one of the pages so mlocked is the page passed in to try_to_unmap(), | ||
604 | try_to_unmap_cluster() will return SWAP_MLOCK, rather than the default | ||
605 | SWAP_AGAIN. This will allow vmscan to cull the page, rather than | ||
606 | recirculating it on the inactive list. | ||
607 | |||
608 | Again, if try_to_unmap_cluster() cannot acquire the VMA's mmap sem, it | ||
609 | returns SWAP_AGAIN, indicating that the page is mapped by a VM_LOCKED | ||
610 | VMA, but couldn't be mlocked. | ||
611 | 548 | ||
612 | 549 | ||
613 | try_to_munlock() REVERSE MAP SCAN | 550 | try_to_munlock() REVERSE MAP SCAN |
@@ -623,29 +560,15 @@ all PTEs from the page. For this purpose, the unevictable/mlock infrastructure | |||
623 | introduced a variant of try_to_unmap() called try_to_munlock(). | 560 | introduced a variant of try_to_unmap() called try_to_munlock(). |
624 | 561 | ||
625 | try_to_munlock() calls the same functions as try_to_unmap() for anonymous and | 562 | try_to_munlock() calls the same functions as try_to_unmap() for anonymous and |
626 | mapped file pages with an additional argument specifying unlock versus unmap | 563 | mapped file and KSM pages with a flag argument specifying unlock versus unmap |
627 | processing. Again, these functions walk the respective reverse maps looking | 564 | processing. Again, these functions walk the respective reverse maps looking |
628 | for VM_LOCKED VMAs. When such a VMA is found for anonymous pages and file | 565 | for VM_LOCKED VMAs. When such a VMA is found, as in the try_to_unmap() case, |
629 | pages mapped in linear VMAs, as in the try_to_unmap() case, the functions | 566 | the functions mlock the page via mlock_vma_page() and return SWAP_MLOCK. This |
630 | attempt to acquire the associated mmap semaphore, mlock the page via | 567 | undoes the pre-clearing of the page's PG_mlocked done by munlock_vma_page. |
631 | mlock_vma_page() and return SWAP_MLOCK. This effectively undoes the | ||
632 | pre-clearing of the page's PG_mlocked done by munlock_vma_page. | ||
633 | |||
634 | If try_to_unmap() is unable to acquire a VM_LOCKED VMA's associated mmap | ||
635 | semaphore, it will return SWAP_AGAIN. This will allow shrink_page_list() to | ||
636 | recycle the page on the inactive list and hope that it has better luck with the | ||
637 | page next time. | ||
638 | |||
639 | For file pages mapped into non-linear VMAs, the try_to_munlock() logic works | ||
640 | slightly differently. On encountering a VM_LOCKED non-linear VMA that might | ||
641 | map the page, try_to_munlock() returns SWAP_AGAIN without actually mlocking the | ||
642 | page. munlock_vma_page() will just leave the page unlocked and let vmscan deal | ||
643 | with it - the usual fallback position. | ||
644 | 568 | ||
645 | Note that try_to_munlock()'s reverse map walk must visit every VMA in a page's | 569 | Note that try_to_munlock()'s reverse map walk must visit every VMA in a page's |
646 | reverse map to determine that a page is NOT mapped into any VM_LOCKED VMA. | 570 | reverse map to determine that a page is NOT mapped into any VM_LOCKED VMA. |
647 | However, the scan can terminate when it encounters a VM_LOCKED VMA and can | 571 | However, the scan can terminate when it encounters a VM_LOCKED VMA. |
648 | successfully acquire the VMA's mmap semaphore for read and mlock the page. | ||
649 | Although try_to_munlock() might be called a great many times when munlocking a | 572 | Although try_to_munlock() might be called a great many times when munlocking a |
650 | large region or tearing down a large address space that has been mlocked via | 573 | large region or tearing down a large address space that has been mlocked via |
651 | mlockall(), overall this is a fairly rare event. | 574 | mlockall(), overall this is a fairly rare event. |
@@ -673,11 +596,6 @@ Some examples of these unevictable pages on the LRU lists are: | |||
673 | (3) mlocked pages that could not be isolated from the LRU and moved to the | 596 | (3) mlocked pages that could not be isolated from the LRU and moved to the |
674 | unevictable list in mlock_vma_page(). | 597 | unevictable list in mlock_vma_page(). |
675 | 598 | ||
676 | (4) Pages mapped into multiple VM_LOCKED VMAs, but try_to_munlock() couldn't | ||
677 | acquire the VMA's mmap semaphore to test the flags and set PageMlocked. | ||
678 | munlock_vma_page() was forced to let the page back on to the normal LRU | ||
679 | list for vmscan to handle. | ||
680 | |||
681 | shrink_inactive_list() also diverts any unevictable pages that it finds on the | 599 | shrink_inactive_list() also diverts any unevictable pages that it finds on the |
682 | inactive lists to the appropriate zone's unevictable list. | 600 | inactive lists to the appropriate zone's unevictable list. |
683 | 601 | ||
diff --git a/Documentation/w1/masters/omap-hdq b/Documentation/w1/masters/omap-hdq index 884dc284b215..234522709a5f 100644 --- a/Documentation/w1/masters/omap-hdq +++ b/Documentation/w1/masters/omap-hdq | |||
@@ -44,3 +44,9 @@ e.g: | |||
44 | insmod omap_hdq.ko W1_ID=2 | 44 | insmod omap_hdq.ko W1_ID=2 |
45 | inamod w1_bq27000.ko F_ID=2 | 45 | inamod w1_bq27000.ko F_ID=2 |
46 | 46 | ||
47 | The driver also supports 1-wire mode. In this mode, there is no need to | ||
48 | pass slave ID as parameter. The driver will auto-detect slaves connected | ||
49 | to the bus using SEARCH_ROM procedure. 1-wire mode can be selected by | ||
50 | setting "ti,mode" property to "1w" in DT (see | ||
51 | Documentation/devicetree/bindings/w1/omap-hdq.txt for more details). | ||
52 | By default driver is in HDQ mode. | ||
diff --git a/Documentation/zh_CN/filesystems/sysfs.txt b/Documentation/zh_CN/filesystems/sysfs.txt index e230eaa33122..7d3b05edb8ce 100644 --- a/Documentation/zh_CN/filesystems/sysfs.txt +++ b/Documentation/zh_CN/filesystems/sysfs.txt | |||
@@ -61,7 +61,7 @@ Documentation/kobject.txt 文档以获得更多关于 kobject 接口的 | |||
61 | 内核的对象层次到用户空间。sysfs 中的顶层目录代表着内核对象层次的 | 61 | 内核的对象层次到用户空间。sysfs 中的顶层目录代表着内核对象层次的 |
62 | 共同祖先;例如:某些对象属于某个子系统。 | 62 | 共同祖先;例如:某些对象属于某个子系统。 |
63 | 63 | ||
64 | Sysfs 在与其目录关联的 sysfs_dirent 对象中内部保存一个指向实现 | 64 | Sysfs 在与其目录关联的 kernfs_node 对象中内部保存一个指向实现 |
65 | 目录的 kobject 的指针。以前,这个 kobject 指针被 sysfs 直接用于 | 65 | 目录的 kobject 的指针。以前,这个 kobject 指针被 sysfs 直接用于 |
66 | kobject 文件打开和关闭的引用计数。而现在的 sysfs 实现中,kobject | 66 | kobject 文件打开和关闭的引用计数。而现在的 sysfs 实现中,kobject |
67 | 引用计数只能通过 sysfs_schedule_callback() 函数直接修改。 | 67 | 引用计数只能通过 sysfs_schedule_callback() 函数直接修改。 |