summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e5b9bb5)
raw | patch | inline | side by side (parent: e5b9bb5)
author | J Keerthy <j-keerthy@ti.com> | |
Mon, 27 May 2013 13:12:44 +0000 (18:42 +0530) | ||
committer | J Keerthy <j-keerthy@ti.com> | |
Tue, 28 May 2013 05:44:39 +0000 (11:14 +0530) |
In case emulated temperature is in use, using the trend
provided by driver layer can lead to bogus situation.
In this case, debugger user would set a temperature value,
but the trend would be from driver computation.
To avoid this situation, this patch changes the get_tz_trend()
to consider the emulated temperature whenever that is in use.
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
[Backported to 3.8]
Signed-off-by: J Keerthy <j-keerthy@ti.com>
provided by driver layer can lead to bogus situation.
In this case, debugger user would set a temperature value,
but the trend would be from driver computation.
To avoid this situation, this patch changes the get_tz_trend()
to consider the emulated temperature whenever that is in use.
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
[Backported to 3.8]
Signed-off-by: J Keerthy <j-keerthy@ti.com>
drivers/thermal/thermal_sys.c | patch | blob | history |
index bf0487eb60eefd117c29ecebd6afaa34ae08cc5d..9edf0e321637daf3c532bb7f95e1553dde0a08cc 100644 (file)
{
enum thermal_trend trend;
- if (!tz->ops->get_trend || tz->ops->get_trend(tz, trip, &trend)) {
+ if (tz->emul_temperature || !tz->ops->get_trend ||
+ tz->ops->get_trend(tz, trip, &trend)) {
if (tz->temperature > tz->last_temperature)
trend = THERMAL_TREND_RAISING;
else if (tz->temperature < tz->last_temperature)