diff mbox series

[RFC,1/8] dt-bindings: thermal: Introduce monitor-falling parameter to thermal trip point binding

Message ID 20200917032226.820371-2-thara.gopinath@linaro.org
State New
Headers show
Series Introduce warming in thermal framework | expand

Commit Message

Thara Gopinath Sept. 17, 2020, 3:22 a.m. UTC
Introduce a new binding parameter to thermal trip point description
to indicate whether the temperature level specified by the trip point
is monitored for a rise or fall in temperature.

Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
---
 .../devicetree/bindings/thermal/thermal-zones.yaml         | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Rob Herring (Arm) Sept. 23, 2020, 4:03 p.m. UTC | #1
On Wed, Sep 16, 2020 at 11:22:19PM -0400, Thara Gopinath wrote:
> Introduce a new binding parameter to thermal trip point description
> to indicate whether the temperature level specified by the trip point
> is monitored for a rise or fall in temperature.
> 
> Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
> ---
>  .../devicetree/bindings/thermal/thermal-zones.yaml         | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/thermal/thermal-zones.yaml b/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
> index 3ec9cc87ec50..cc1332ad6c16 100644
> --- a/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
> +++ b/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
> @@ -161,6 +161,13 @@ patternProperties:
>                    The active trip type can be used to control other HW to
>                    help in cooling e.g. fans can be sped up or slowed down
>  
> +              monitor-falling:
> +                description: |
> +                  boolean, If true, the trip point is being monitored for
> +                  falling temperature. If false/absent/default, the trip
> +                  point is being monitored for rising temperature.
> +                type: boolean

What if you wanted to monitor for both?

> +
>              required:
>                - temperature
>                - hysteresis
> -- 
> 2.25.1
>
Thara Gopinath Sept. 28, 2020, 11:21 a.m. UTC | #2
Hi Rob,
Thanks for the review.

On 9/23/20 12:03 PM, Rob Herring wrote:
> On Wed, Sep 16, 2020 at 11:22:19PM -0400, Thara Gopinath wrote:
>> Introduce a new binding parameter to thermal trip point description
>> to indicate whether the temperature level specified by the trip point
>> is monitored for a rise or fall in temperature.
>>
>> Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
>> ---
>>   .../devicetree/bindings/thermal/thermal-zones.yaml         | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/thermal/thermal-zones.yaml b/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
>> index 3ec9cc87ec50..cc1332ad6c16 100644
>> --- a/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
>> +++ b/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
>> @@ -161,6 +161,13 @@ patternProperties:
>>                     The active trip type can be used to control other HW to
>>                     help in cooling e.g. fans can be sped up or slowed down
>>   
>> +              monitor-falling:
>> +                description: |
>> +                  boolean, If true, the trip point is being monitored for
>> +                  falling temperature. If false/absent/default, the trip
>> +                  point is being monitored for rising temperature.
>> +                type: boolean
> 
> What if you wanted to monitor for both?

You usually don't want to. At really low temperature trip (5 degree C or 
0 degree C) you care about starting to monitor when the temperature 
falls below the trip. At high temp trip points, you care about starting 
to monitor when the temperature rises above the trip point. The thermal 
framework takes care of stopping the monitoring (dependent on type of 
monitoring, hysteresis etc.)
> 
>> +
>>               required:
>>                 - temperature
>>                 - hysteresis
>> -- 
>> 2.25.1
>>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/thermal/thermal-zones.yaml b/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
index 3ec9cc87ec50..cc1332ad6c16 100644
--- a/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
+++ b/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
@@ -161,6 +161,13 @@  patternProperties:
                   The active trip type can be used to control other HW to
                   help in cooling e.g. fans can be sped up or slowed down
 
+              monitor-falling:
+                description: |
+                  boolean, If true, the trip point is being monitored for
+                  falling temperature. If false/absent/default, the trip
+                  point is being monitored for rising temperature.
+                type: boolean
+
             required:
               - temperature
               - hysteresis