Messages in this thread | | | Date | Mon, 20 Jun 2022 17:17:09 +0200 | Subject | Re: [PATCH 2/3] thermal/drivers/tegra: Remove get_trend function | From | Daniel Lezcano <> |
| |
On 18/06/2022 14:44, Dmitry Osipenko wrote: > 16.06.2022 23:25, Daniel Lezcano пишет: >> The get_trend function does already what the generic framework does. >> >> Remove it. >> >> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> >> ---
[ ... ]
>> static void thermal_irq_enable(struct tegra_thermctl_zone *zn) >> { >> u32 r; >> @@ -716,7 +685,6 @@ static int tegra_thermctl_set_trips(void *data, int lo, int hi) >> static const struct thermal_zone_of_device_ops tegra_of_thermal_ops = { >> .get_temp = tegra_thermctl_get_temp, >> .set_trip_temp = tegra_thermctl_set_trip_temp, >> - .get_trend = tegra_thermctl_get_trend, >> .set_trips = tegra_thermctl_set_trips, >> }; >> > > The framework doesn't use the trip temperature, is it really the same? > Previously, if temperature was above the trip and was dropping, then it > was THERMAL_TREND_STABLE instead of THERMAL_TREND_DROPPING.
Actually, the only difference is the temp > trip and the temperature < last_temperature. It results in the STABLE trend and the governor does nothing.
With the core trend function for the same inputs, temperature < last_temperature results in a DROPPING but as temp > trip the 'throttle' boolean is true in the governor, and get_next_state() with DROPPING + throttle=true, results in nothing because the action happens when throttle=false.
All the combinations result at end at the same action from the governor.
-- <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
| |