[1/4] dt-bindings: thermal: Introduce monitor-falling parameter to thermal trip point binding
diff mbox series

Message ID 1568859503-19725-2-git-send-email-thara.gopinath@linaro.org
State New
Delegated to: Zhang Rui
Headers show
Series
  • thermal: Introduce support for monitoring falling temperatures.
Related show

Commit Message

Thara Gopinath Sept. 19, 2019, 2:18 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>
---
 Documentation/devicetree/bindings/thermal/thermal.txt | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Rob Herring Oct. 1, 2019, 10:09 p.m. UTC | #1
On Wed, Sep 18, 2019 at 10:18:20PM -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.

What if it is both?

When do you need this? Seems like you'd always want to monitor both 
directions to undo any action done on rising temp. Unless you want a 
hysteresis, but this doesn't seem like the best way to implement that.

> 
> Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
> ---
>  Documentation/devicetree/bindings/thermal/thermal.txt | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/thermal/thermal.txt b/Documentation/devicetree/bindings/thermal/thermal.txt
> index ca14ba9..849a2a9 100644
> --- a/Documentation/devicetree/bindings/thermal/thermal.txt
> +++ b/Documentation/devicetree/bindings/thermal/thermal.txt
> @@ -90,6 +90,14 @@ Required properties:
>  	"critical":	Hardware not reliable.
>    Type: string
>  
> +Optional property:
> +- monitor-falling: 	Indicate whether the system action is kick
> +  Type: boolean		started when the temperature falls below or rises
> +			above the trip temperature level indicated in
> +			"temperature".If true, the trip point is monitored
> +			for falling temperature else the trip point is
> +			monitored for rising temperature.
> +
>  * Cooling device maps
>  
>  The cooling device maps node is a node to describe how cooling devices
> -- 
> 2.1.4
>
Thara Gopinath Oct. 9, 2019, 12:54 p.m. UTC | #2
Hi Rob,
Thanks for the review.

On 10/01/2019 06:09 PM, Rob Herring wrote:
> On Wed, Sep 18, 2019 at 10:18:20PM -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.
> 
> What if it is both?
> 
> When do you need this? Seems like you'd always want to monitor both 
> directions to undo any action done on rising temp. Unless you want a 
> hysteresis, but this doesn't seem like the best way to implement that.
> 

The thermal framework is designed in such a manner that I cannot think
of a use case for both.
The framework takes care of removing the warming/cooling action when the
trip point is crossed in the opposite direction. It only needs an
indication on when to start implementing the
action.
For eg. When the temperature crosses/increases above 90 degree, the
framework will start the cooling action and will continue monitoring
till the temperature falls below 90 and the cooling action is removed.
Vice versa when the temperature decreases below say 5 degree, the
framework should  initiate the warming action and monitor till the
temperature rises above and remove the warming action.

So the trip point is really an indication of the temperature crossing a
threshold in the specified direction.

Now this parameter is needed to indicate whether the thermal framework
has to start implementing the warming/cooling action when the
temperature  rises above the trip point or falls below the trip point.

Till now the framework was always assuming that the cooling action had
to be implemented when temperature rises above the trip point.

Patch
diff mbox series

diff --git a/Documentation/devicetree/bindings/thermal/thermal.txt b/Documentation/devicetree/bindings/thermal/thermal.txt
index ca14ba9..849a2a9 100644
--- a/Documentation/devicetree/bindings/thermal/thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/thermal.txt
@@ -90,6 +90,14 @@  Required properties:
 	"critical":	Hardware not reliable.
   Type: string
 
+Optional property:
+- monitor-falling: 	Indicate whether the system action is kick
+  Type: boolean		started when the temperature falls below or rises
+			above the trip temperature level indicated in
+			"temperature".If true, the trip point is monitored
+			for falling temperature else the trip point is
+			monitored for rising temperature.
+
 * Cooling device maps
 
 The cooling device maps node is a node to describe how cooling devices