diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/devicetree/bindings/thermal/spear-thermal.txt | 14 | ||||
-rw-r--r-- | Documentation/thermal/sysfs-api.txt | 30 |
2 files changed, 33 insertions, 11 deletions
diff --git a/Documentation/devicetree/bindings/thermal/spear-thermal.txt b/Documentation/devicetree/bindings/thermal/spear-thermal.txt new file mode 100644 index 000000000000..93e3b67c102d --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/spear-thermal.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | * SPEAr Thermal | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "st,thermal-spear1340" | ||
5 | - reg : Address range of the thermal registers | ||
6 | - st,thermal-flags: flags used to enable thermal sensor | ||
7 | |||
8 | Example: | ||
9 | |||
10 | thermal@fc000000 { | ||
11 | compatible = "st,thermal-spear1340"; | ||
12 | reg = <0xfc000000 0x1000>; | ||
13 | st,thermal-flags = <0x7000>; | ||
14 | }; | ||
diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt index 1733ab947a95..c087dbcf3535 100644 --- a/Documentation/thermal/sysfs-api.txt +++ b/Documentation/thermal/sysfs-api.txt | |||
@@ -32,7 +32,8 @@ temperature) and throttle appropriate devices. | |||
32 | 32 | ||
33 | 1.1 thermal zone device interface | 33 | 1.1 thermal zone device interface |
34 | 1.1.1 struct thermal_zone_device *thermal_zone_device_register(char *name, | 34 | 1.1.1 struct thermal_zone_device *thermal_zone_device_register(char *name, |
35 | int trips, void *devdata, struct thermal_zone_device_ops *ops) | 35 | int trips, int mask, void *devdata, |
36 | struct thermal_zone_device_ops *ops) | ||
36 | 37 | ||
37 | This interface function adds a new thermal zone device (sensor) to | 38 | This interface function adds a new thermal zone device (sensor) to |
38 | /sys/class/thermal folder as thermal_zone[0-*]. It tries to bind all the | 39 | /sys/class/thermal folder as thermal_zone[0-*]. It tries to bind all the |
@@ -40,16 +41,17 @@ temperature) and throttle appropriate devices. | |||
40 | 41 | ||
41 | name: the thermal zone name. | 42 | name: the thermal zone name. |
42 | trips: the total number of trip points this thermal zone supports. | 43 | trips: the total number of trip points this thermal zone supports. |
44 | mask: Bit string: If 'n'th bit is set, then trip point 'n' is writeable. | ||
43 | devdata: device private data | 45 | devdata: device private data |
44 | ops: thermal zone device call-backs. | 46 | ops: thermal zone device call-backs. |
45 | .bind: bind the thermal zone device with a thermal cooling device. | 47 | .bind: bind the thermal zone device with a thermal cooling device. |
46 | .unbind: unbind the thermal zone device with a thermal cooling device. | 48 | .unbind: unbind the thermal zone device with a thermal cooling device. |
47 | .get_temp: get the current temperature of the thermal zone. | 49 | .get_temp: get the current temperature of the thermal zone. |
48 | .get_mode: get the current mode (user/kernel) of the thermal zone. | 50 | .get_mode: get the current mode (enabled/disabled) of the thermal zone. |
49 | - "kernel" means thermal management is done in kernel. | 51 | - "enabled" means the kernel thermal management is enabled. |
50 | - "user" will prevent kernel thermal driver actions upon trip points | 52 | - "disabled" will prevent kernel thermal driver action upon trip points |
51 | so that user applications can take charge of thermal management. | 53 | so that user applications can take charge of thermal management. |
52 | .set_mode: set the mode (user/kernel) of the thermal zone. | 54 | .set_mode: set the mode (enabled/disabled) of the thermal zone. |
53 | .get_trip_type: get the type of certain trip point. | 55 | .get_trip_type: get the type of certain trip point. |
54 | .get_trip_temp: get the temperature above which the certain trip point | 56 | .get_trip_temp: get the temperature above which the certain trip point |
55 | will be fired. | 57 | will be fired. |
@@ -119,6 +121,7 @@ Thermal zone device sys I/F, created once it's registered: | |||
119 | |---mode: Working mode of the thermal zone | 121 | |---mode: Working mode of the thermal zone |
120 | |---trip_point_[0-*]_temp: Trip point temperature | 122 | |---trip_point_[0-*]_temp: Trip point temperature |
121 | |---trip_point_[0-*]_type: Trip point type | 123 | |---trip_point_[0-*]_type: Trip point type |
124 | |---trip_point_[0-*]_hyst: Hysteresis value for this trip point | ||
122 | 125 | ||
123 | Thermal cooling device sys I/F, created once it's registered: | 126 | Thermal cooling device sys I/F, created once it's registered: |
124 | /sys/class/thermal/cooling_device[0-*]: | 127 | /sys/class/thermal/cooling_device[0-*]: |
@@ -167,14 +170,14 @@ temp | |||
167 | RO, Required | 170 | RO, Required |
168 | 171 | ||
169 | mode | 172 | mode |
170 | One of the predefined values in [kernel, user]. | 173 | One of the predefined values in [enabled, disabled]. |
171 | This file gives information about the algorithm that is currently | 174 | This file gives information about the algorithm that is currently |
172 | managing the thermal zone. It can be either default kernel based | 175 | managing the thermal zone. It can be either default kernel based |
173 | algorithm or user space application. | 176 | algorithm or user space application. |
174 | kernel = Thermal management in kernel thermal zone driver. | 177 | enabled = enable Kernel Thermal management. |
175 | user = Preventing kernel thermal zone driver actions upon | 178 | disabled = Preventing kernel thermal zone driver actions upon |
176 | trip points so that user application can take full | 179 | trip points so that user application can take full |
177 | charge of the thermal management. | 180 | charge of the thermal management. |
178 | RW, Optional | 181 | RW, Optional |
179 | 182 | ||
180 | trip_point_[0-*]_temp | 183 | trip_point_[0-*]_temp |
@@ -188,6 +191,11 @@ trip_point_[0-*]_type | |||
188 | thermal zone. | 191 | thermal zone. |
189 | RO, Optional | 192 | RO, Optional |
190 | 193 | ||
194 | trip_point_[0-*]_hyst | ||
195 | The hysteresis value for a trip point, represented as an integer | ||
196 | Unit: Celsius | ||
197 | RW, Optional | ||
198 | |||
191 | cdev[0-*] | 199 | cdev[0-*] |
192 | Sysfs link to the thermal cooling device node where the sys I/F | 200 | Sysfs link to the thermal cooling device node where the sys I/F |
193 | for cooling device throttling control represents. | 201 | for cooling device throttling control represents. |
@@ -248,7 +256,7 @@ method, the sys I/F structure will be built like this: | |||
248 | |thermal_zone1: | 256 | |thermal_zone1: |
249 | |---type: acpitz | 257 | |---type: acpitz |
250 | |---temp: 37000 | 258 | |---temp: 37000 |
251 | |---mode: kernel | 259 | |---mode: enabled |
252 | |---trip_point_0_temp: 100000 | 260 | |---trip_point_0_temp: 100000 |
253 | |---trip_point_0_type: critical | 261 | |---trip_point_0_type: critical |
254 | |---trip_point_1_temp: 80000 | 262 | |---trip_point_1_temp: 80000 |