Re: [PATCH V5 07/11] of: Add bindings of hw-trip-points for soctherm

From
Matt Longnecker <hidden>
Date
2016-02-17 20:52:36
Also in
linux-pm, linux-tegra, lkml
Reply to
Wei Ni, 2016-02-17
(cc += linux-pm)

Rob,

The Linux thermal framework makes a sharp distinction between "thermal zones" and "cooling devices". thermal_zones are aware of temperatures and have trip points. cooling_devices are unaware of temperatures -- they just have a state variable. The thermal framework binds thermal zones at particular temperatures to particular cooling devices. It does so *in software*

The SOC_THERM IP block doesn't fit neatly in that paradigm. Yes, it provides the ability to read temperatures and raise interrupts at temperatures. However, it also has the ability to take cooling action _in hardware_ at particular temperatures. It can throttle the CPU & GPU clock and it can shut down the SOC. Neither of those are graceful actions, but they are valuable in practice.

In previous incarnations of this driver we have implemented an unholy mash-up of a cooling device and a thermal zone for configuring the hardware thermal actions. It was a mess. This patchset from Wei takes a simpler approach -- allow the thermal hardware cooling actions to be configured directly via DT. It's simple but it's good enough in practice. I like it.

-Matt

On 02/17/2016 01:46 AM, Wei Ni wrote:
On 2016年02月15日 15:15, Wei Ni wrote:
quoted
quoted
Hi, Rob

On 2016年02月12日 22:42, Rob Herring wrote:
quoted
quoted
On Fri, Jan 29, 2016 at 2:47 AM, Wei Ni[off-list ref]  wrote:
quoted
quoted
Add hw-trips sub-node for soctherm, which is
used to describe the hardware trip points for
each soctherm sensors.
I still don't understand why you are doing something custom here.
What's wrong with what is defined in:

Documentation/devicetree/bindings/thermal/thermal.txt
I think it's better to add a .set_trip_temp for of-thermal's
thermal_zone_of_device_ops{}, so that we can set trip points on hardware. I'm
preparing patches, and will send out next version.
Thanks for your comments.
Thread (6 messages) 6 messages, 3 authors, last reply 2016-02-17
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help