* [PATCH] thermal: Fix examples in DT documentation
@ 2015-01-27 10:50 Srinivas Kandagatla
2015-01-27 15:07 ` Eduardo Valentin
0 siblings, 1 reply; 3+ messages in thread
From: Srinivas Kandagatla @ 2015-01-27 10:50 UTC (permalink / raw)
To: linux-pm
Cc: Zhang Rui, Eduardo Valentin, linux-kernel, devicetree,
Rob Herring, Srinivas Kandagatla
There are various issues with the examples in this documentation, some
of the DT labels are invalid and one of the macro THERMAL_NO_LIMITS
referenced is not available as well.
As Its highly likely that people would pick some samples from the
documentation, I though fixing these would be best rather than giving
starter a challenge to figure out whats going wrong with examples.
This patch attempts to fix such errors in the documentation.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
.../devicetree/bindings/thermal/thermal.txt | 44 +++++++++++-----------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/Documentation/devicetree/bindings/thermal/thermal.txt b/Documentation/devicetree/bindings/thermal/thermal.txt
index f5db6b7..97ed14e 100644
--- a/Documentation/devicetree/bindings/thermal/thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/thermal.txt
@@ -251,24 +251,24 @@ ocp {
};
thermal-zones {
- cpu-thermal: cpu-thermal {
+ cpu_thermal: cpu-thermal {
polling-delay-passive = <250>; /* milliseconds */
polling-delay = <1000>; /* milliseconds */
thermal-sensors = <&bandgap0>;
trips {
- cpu-alert0: cpu-alert {
+ cpu_alert0: cpu-alert0 {
temperature = <90000>; /* millicelsius */
hysteresis = <2000>; /* millicelsius */
type = "active";
};
- cpu-alert1: cpu-alert {
+ cpu_alert1: cpu-alert1 {
temperature = <100000>; /* millicelsius */
hysteresis = <2000>; /* millicelsius */
type = "passive";
};
- cpu-crit: cpu-crit {
+ cpu_crit: cpu-crit {
temperature = <125000>; /* millicelsius */
hysteresis = <2000>; /* millicelsius */
type = "critical";
@@ -277,17 +277,17 @@ thermal-zones {
cooling-maps {
map0 {
- trip = <&cpu-alert0>;
- cooling-device = <&fan0 THERMAL_NO_LIMITS 4>;
+ trip = <&cpu_alert0>;
+ cooling-device = <&fan0 THERMAL_NO_LIMIT 4>;
};
map1 {
- trip = <&cpu-alert1>;
- cooling-device = <&fan0 5 THERMAL_NO_LIMITS>;
+ trip = <&cpu_alert1>;
+ cooling-device = <&fan0 5 THERMAL_NO_LIMIT>;
};
map2 {
- trip = <&cpu-alert1>;
+ trip = <&cpu_alert1>;
cooling-device =
- <&cpu0 THERMAL_NO_LIMITS THERMAL_NO_LIMITS>;
+ <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
};
};
@@ -298,13 +298,13 @@ used to monitor the zone 'cpu-thermal' using its sole sensor. A fan
device (fan0) is controlled via I2C bus 1, at address 0x48, and has ten
different cooling states 0-9. It is used to remove the heat out of
the thermal zone 'cpu-thermal' using its cooling states
-from its minimum to 4, when it reaches trip point 'cpu-alert0'
+from its minimum to 4, when it reaches trip point 'cpu_alert0'
at 90C, as an example of active cooling. The same cooling device is used at
-'cpu-alert1', but from 5 to its maximum state. The cpu@0 device is also
+'cpu_alert1', but from 5 to its maximum state. The cpu@0 device is also
linked to the same thermal zone, 'cpu-thermal', as a passive cooling device,
-using all its cooling states at trip point 'cpu-alert1',
+using all its cooling states at trip point 'cpu_alert1',
which is a trip point at 100C. On the thermal zone 'cpu-thermal', at the
-temperature of 125C, represented by the trip point 'cpu-crit', the silicon
+temperature of 125C, represented by the trip point 'cpu_crit', the silicon
is not reliable anymore.
(b) - IC with several internal sensors
@@ -329,7 +329,7 @@ ocp {
};
thermal-zones {
- cpu-thermal: cpu-thermal {
+ cpu_thermal: cpu-thermal {
polling-delay-passive = <250>; /* milliseconds */
polling-delay = <1000>; /* milliseconds */
@@ -338,12 +338,12 @@ thermal-zones {
trips {
/* each zone within the SoC may have its own trips */
- cpu-alert: cpu-alert {
+ cpu_alert: cpu-alert {
temperature = <100000>; /* millicelsius */
hysteresis = <2000>; /* millicelsius */
type = "passive";
};
- cpu-crit: cpu-crit {
+ cpu_crit: cpu-crit {
temperature = <125000>; /* millicelsius */
hysteresis = <2000>; /* millicelsius */
type = "critical";
@@ -365,12 +365,12 @@ thermal-zones {
trips {
/* each zone within the SoC may have its own trips */
- gpu-alert: gpu-alert {
+ gpu_alert: gpu-alert {
temperature = <90000>; /* millicelsius */
hysteresis = <2000>; /* millicelsius */
type = "passive";
};
- gpu-crit: gpu-crit {
+ gpu_crit: gpu-crit {
temperature = <105000>; /* millicelsius */
hysteresis = <2000>; /* millicelsius */
type = "critical";
@@ -392,12 +392,12 @@ thermal-zones {
trips {
/* each zone within the SoC may have its own trips */
- dsp-alert: gpu-alert {
+ dsp_alert: gpu-alert {
temperature = <90000>; /* millicelsius */
hysteresis = <2000>; /* millicelsius */
type = "passive";
};
- dsp-crit: gpu-crit {
+ dsp_crit: gpu-crit {
temperature = <135000>; /* millicelsius */
hysteresis = <2000>; /* millicelsius */
type = "critical";
@@ -457,7 +457,7 @@ ocp {
};
thermal-zones {
- cpu-thermal: cpu-thermal {
+ cpu_thermal: cpu-thermal {
polling-delay-passive = <250>; /* milliseconds */
polling-delay = <1000>; /* milliseconds */
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] thermal: Fix examples in DT documentation
2015-01-27 10:50 [PATCH] thermal: Fix examples in DT documentation Srinivas Kandagatla
@ 2015-01-27 15:07 ` Eduardo Valentin
2015-01-27 15:49 ` Srinivas Kandagatla
0 siblings, 1 reply; 3+ messages in thread
From: Eduardo Valentin @ 2015-01-27 15:07 UTC (permalink / raw)
To: Srinivas Kandagatla
Cc: linux-pm, Zhang Rui, linux-kernel, devicetree, Rob Herring
[-- Attachment #1: Type: text/plain, Size: 6278 bytes --]
Hello Srinivas,
On Tue, Jan 27, 2015 at 10:50:47AM +0000, Srinivas Kandagatla wrote:
> There are various issues with the examples in this documentation, some
> of the DT labels are invalid and one of the macro THERMAL_NO_LIMITS
> referenced is not available as well.
>
> As Its highly likely that people would pick some samples from the
> documentation, I though fixing these would be best rather than giving
> starter a challenge to figure out whats going wrong with examples.
>
> This patch attempts to fix such errors in the documentation.
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Thanks for doing this. It's been a while that I want to make these small
fixes in the of thermal example section and I always forget.
Just a minor request in the end:
> ---
> .../devicetree/bindings/thermal/thermal.txt | 44 +++++++++++-----------
> 1 file changed, 22 insertions(+), 22 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/thermal/thermal.txt b/Documentation/devicetree/bindings/thermal/thermal.txt
> index f5db6b7..97ed14e 100644
> --- a/Documentation/devicetree/bindings/thermal/thermal.txt
> +++ b/Documentation/devicetree/bindings/thermal/thermal.txt
> @@ -251,24 +251,24 @@ ocp {
> };
>
> thermal-zones {
> - cpu-thermal: cpu-thermal {
> + cpu_thermal: cpu-thermal {
> polling-delay-passive = <250>; /* milliseconds */
> polling-delay = <1000>; /* milliseconds */
>
> thermal-sensors = <&bandgap0>;
>
> trips {
> - cpu-alert0: cpu-alert {
> + cpu_alert0: cpu-alert0 {
> temperature = <90000>; /* millicelsius */
> hysteresis = <2000>; /* millicelsius */
> type = "active";
> };
> - cpu-alert1: cpu-alert {
> + cpu_alert1: cpu-alert1 {
> temperature = <100000>; /* millicelsius */
> hysteresis = <2000>; /* millicelsius */
> type = "passive";
> };
> - cpu-crit: cpu-crit {
> + cpu_crit: cpu-crit {
> temperature = <125000>; /* millicelsius */
> hysteresis = <2000>; /* millicelsius */
> type = "critical";
> @@ -277,17 +277,17 @@ thermal-zones {
>
> cooling-maps {
> map0 {
> - trip = <&cpu-alert0>;
> - cooling-device = <&fan0 THERMAL_NO_LIMITS 4>;
> + trip = <&cpu_alert0>;
> + cooling-device = <&fan0 THERMAL_NO_LIMIT 4>;
> };
> map1 {
> - trip = <&cpu-alert1>;
> - cooling-device = <&fan0 5 THERMAL_NO_LIMITS>;
> + trip = <&cpu_alert1>;
> + cooling-device = <&fan0 5 THERMAL_NO_LIMIT>;
> };
> map2 {
> - trip = <&cpu-alert1>;
> + trip = <&cpu_alert1>;
> cooling-device =
> - <&cpu0 THERMAL_NO_LIMITS THERMAL_NO_LIMITS>;
> + <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
> };
> };
> };
> @@ -298,13 +298,13 @@ used to monitor the zone 'cpu-thermal' using its sole sensor. A fan
> device (fan0) is controlled via I2C bus 1, at address 0x48, and has ten
> different cooling states 0-9. It is used to remove the heat out of
> the thermal zone 'cpu-thermal' using its cooling states
> -from its minimum to 4, when it reaches trip point 'cpu-alert0'
> +from its minimum to 4, when it reaches trip point 'cpu_alert0'
> at 90C, as an example of active cooling. The same cooling device is used at
> -'cpu-alert1', but from 5 to its maximum state. The cpu@0 device is also
> +'cpu_alert1', but from 5 to its maximum state. The cpu@0 device is also
> linked to the same thermal zone, 'cpu-thermal', as a passive cooling device,
> -using all its cooling states at trip point 'cpu-alert1',
> +using all its cooling states at trip point 'cpu_alert1',
> which is a trip point at 100C. On the thermal zone 'cpu-thermal', at the
> -temperature of 125C, represented by the trip point 'cpu-crit', the silicon
> +temperature of 125C, represented by the trip point 'cpu_crit', the silicon
> is not reliable anymore.
>
> (b) - IC with several internal sensors
> @@ -329,7 +329,7 @@ ocp {
> };
>
> thermal-zones {
> - cpu-thermal: cpu-thermal {
> + cpu_thermal: cpu-thermal {
> polling-delay-passive = <250>; /* milliseconds */
> polling-delay = <1000>; /* milliseconds */
>
> @@ -338,12 +338,12 @@ thermal-zones {
>
> trips {
> /* each zone within the SoC may have its own trips */
> - cpu-alert: cpu-alert {
> + cpu_alert: cpu-alert {
> temperature = <100000>; /* millicelsius */
> hysteresis = <2000>; /* millicelsius */
> type = "passive";
> };
> - cpu-crit: cpu-crit {
> + cpu_crit: cpu-crit {
> temperature = <125000>; /* millicelsius */
> hysteresis = <2000>; /* millicelsius */
> type = "critical";
> @@ -365,12 +365,12 @@ thermal-zones {
>
> trips {
> /* each zone within the SoC may have its own trips */
> - gpu-alert: gpu-alert {
> + gpu_alert: gpu-alert {
> temperature = <90000>; /* millicelsius */
> hysteresis = <2000>; /* millicelsius */
> type = "passive";
> };
> - gpu-crit: gpu-crit {
> + gpu_crit: gpu-crit {
> temperature = <105000>; /* millicelsius */
> hysteresis = <2000>; /* millicelsius */
> type = "critical";
> @@ -392,12 +392,12 @@ thermal-zones {
>
> trips {
> /* each zone within the SoC may have its own trips */
> - dsp-alert: gpu-alert {
> + dsp_alert: gpu-alert {
I suppose the original text has a typo, it should be:
+ dsp_alert: dsp-alert {
> temperature = <90000>; /* millicelsius */
> hysteresis = <2000>; /* millicelsius */
> type = "passive";
> };
> - dsp-crit: gpu-crit {
> + dsp_crit: gpu-crit {
> temperature = <135000>; /* millicelsius */
> hysteresis = <2000>; /* millicelsius */
> type = "critical";
> @@ -457,7 +457,7 @@ ocp {
> };
>
> thermal-zones {
> - cpu-thermal: cpu-thermal {
> + cpu_thermal: cpu-thermal {
> polling-delay-passive = <250>; /* milliseconds */
> polling-delay = <1000>; /* milliseconds */
>
While here, can you please include in your patch fixes for remaining
examples? From quick look, 'board-thermal', 'adc-dummy', and
'dsp-thermal' are occurrences of the same problem you fixing in other
parts of the file.
> --
> 1.9.1
>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] thermal: Fix examples in DT documentation
2015-01-27 15:07 ` Eduardo Valentin
@ 2015-01-27 15:49 ` Srinivas Kandagatla
0 siblings, 0 replies; 3+ messages in thread
From: Srinivas Kandagatla @ 2015-01-27 15:49 UTC (permalink / raw)
To: Eduardo Valentin
Cc: linux-pm, Zhang Rui, linux-kernel, devicetree, Rob Herring
On 27/01/15 15:07, Eduardo Valentin wrote:
> Hello Srinivas,
>
> Just a minor request in the end:
>
Sure, I will fix the other issues you spotted too in next version.
>> ---
>> .../devicetree/bindings/thermal/thermal.txt | 44 +++++++++++-----------
>> 1 file changed, 22 insertions(+), 22 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/thermal/thermal.txt b/Documentation/devicetree/bindings/thermal/thermal.txt
>> index f5db6b7..97ed14e 100644
>> --- a/Documentation/devicetree/bindings/thermal/thermal.txt
>> +++ b/Documentation/devicetree/bindings/thermal/thermal.txt
>> @@ -251,24 +251,24 @@ ocp {
>> };
>>
>> thermal-zones {
>> - cpu-thermal: cpu-thermal {
>> + cpu_thermal: cpu-thermal {
>> polling-delay-passive = <250>; /* milliseconds */
>> polling-delay = <1000>; /* milliseconds */
>>
>> thermal-sensors = <&bandgap0>;
>>
>> trips {
>> - cpu-alert0: cpu-alert {
>> + cpu_alert0: cpu-alert0 {
>> temperature = <90000>; /* millicelsius */
>> hysteresis = <2000>; /* millicelsius */
>> type = "active";
>> };
>> - cpu-alert1: cpu-alert {
>> + cpu_alert1: cpu-alert1 {
>> temperature = <100000>; /* millicelsius */
>> hysteresis = <2000>; /* millicelsius */
>> type = "passive";
>> };
>> - cpu-crit: cpu-crit {
>> + cpu_crit: cpu-crit {
>> temperature = <125000>; /* millicelsius */
>> hysteresis = <2000>; /* millicelsius */
>> type = "critical";
>> @@ -277,17 +277,17 @@ thermal-zones {
>>
>> cooling-maps {
>> map0 {
>> - trip = <&cpu-alert0>;
>> - cooling-device = <&fan0 THERMAL_NO_LIMITS 4>;
>> + trip = <&cpu_alert0>;
>> + cooling-device = <&fan0 THERMAL_NO_LIMIT 4>;
>> };
>> map1 {
>> - trip = <&cpu-alert1>;
>> - cooling-device = <&fan0 5 THERMAL_NO_LIMITS>;
>> + trip = <&cpu_alert1>;
>> + cooling-device = <&fan0 5 THERMAL_NO_LIMIT>;
>> };
>> map2 {
>> - trip = <&cpu-alert1>;
>> + trip = <&cpu_alert1>;
>> cooling-device =
>> - <&cpu0 THERMAL_NO_LIMITS THERMAL_NO_LIMITS>;
>> + <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
>> };
>> };
>> };
>> @@ -298,13 +298,13 @@ used to monitor the zone 'cpu-thermal' using its sole sensor. A fan
>> device (fan0) is controlled via I2C bus 1, at address 0x48, and has ten
>> different cooling states 0-9. It is used to remove the heat out of
>> the thermal zone 'cpu-thermal' using its cooling states
>> -from its minimum to 4, when it reaches trip point 'cpu-alert0'
>> +from its minimum to 4, when it reaches trip point 'cpu_alert0'
>> at 90C, as an example of active cooling. The same cooling device is used at
>> -'cpu-alert1', but from 5 to its maximum state. The cpu@0 device is also
>> +'cpu_alert1', but from 5 to its maximum state. The cpu@0 device is also
>> linked to the same thermal zone, 'cpu-thermal', as a passive cooling device,
>> -using all its cooling states at trip point 'cpu-alert1',
>> +using all its cooling states at trip point 'cpu_alert1',
>> which is a trip point at 100C. On the thermal zone 'cpu-thermal', at the
>> -temperature of 125C, represented by the trip point 'cpu-crit', the silicon
>> +temperature of 125C, represented by the trip point 'cpu_crit', the silicon
>> is not reliable anymore.
>>
>> (b) - IC with several internal sensors
>> @@ -329,7 +329,7 @@ ocp {
>> };
>>
>> thermal-zones {
>> - cpu-thermal: cpu-thermal {
>> + cpu_thermal: cpu-thermal {
>> polling-delay-passive = <250>; /* milliseconds */
>> polling-delay = <1000>; /* milliseconds */
>>
>> @@ -338,12 +338,12 @@ thermal-zones {
>>
>> trips {
>> /* each zone within the SoC may have its own trips */
>> - cpu-alert: cpu-alert {
>> + cpu_alert: cpu-alert {
>> temperature = <100000>; /* millicelsius */
>> hysteresis = <2000>; /* millicelsius */
>> type = "passive";
>> };
>> - cpu-crit: cpu-crit {
>> + cpu_crit: cpu-crit {
>> temperature = <125000>; /* millicelsius */
>> hysteresis = <2000>; /* millicelsius */
>> type = "critical";
>> @@ -365,12 +365,12 @@ thermal-zones {
>>
>> trips {
>> /* each zone within the SoC may have its own trips */
>> - gpu-alert: gpu-alert {
>> + gpu_alert: gpu-alert {
>> temperature = <90000>; /* millicelsius */
>> hysteresis = <2000>; /* millicelsius */
>> type = "passive";
>> };
>> - gpu-crit: gpu-crit {
>> + gpu_crit: gpu-crit {
>> temperature = <105000>; /* millicelsius */
>> hysteresis = <2000>; /* millicelsius */
>> type = "critical";
>> @@ -392,12 +392,12 @@ thermal-zones {
>>
>> trips {
>> /* each zone within the SoC may have its own trips */
>> - dsp-alert: gpu-alert {
>> + dsp_alert: gpu-alert {
>
> I suppose the original text has a typo, it should be:
>
> + dsp_alert: dsp-alert {
>
>> temperature = <90000>; /* millicelsius */
>> hysteresis = <2000>; /* millicelsius */
>> type = "passive";
>> };
>> - dsp-crit: gpu-crit {
>> + dsp_crit: gpu-crit {
>> temperature = <135000>; /* millicelsius */
>> hysteresis = <2000>; /* millicelsius */
>> type = "critical";
>> @@ -457,7 +457,7 @@ ocp {
>> };
>>
>> thermal-zones {
>> - cpu-thermal: cpu-thermal {
>> + cpu_thermal: cpu-thermal {
>> polling-delay-passive = <250>; /* milliseconds */
>> polling-delay = <1000>; /* milliseconds */
>>
>
> While here, can you please include in your patch fixes for remaining
> examples? From quick look, 'board-thermal', 'adc-dummy', and
> 'dsp-thermal' are occurrences of the same problem you fixing in other
> parts of the file.
>
>> --
>> 1.9.1
>>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-27 15:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-27 10:50 [PATCH] thermal: Fix examples in DT documentation Srinivas Kandagatla
2015-01-27 15:07 ` Eduardo Valentin
2015-01-27 15:49 ` Srinivas Kandagatla
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.