thermal/drivers/ti: Use fixed update interval
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 7 Mar 2023 13:37:30 +0000 (14:37 +0100)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Sat, 1 Apr 2023 18:51:45 +0000 (20:51 +0200)
commit0c492be4002b7411a1587b429e68e0cf3f562488
tree076864ee88978d50254fb582e83217703cff970b
parent0fb6c6493fa240048e6afa2b810b45007129a4a0
thermal/drivers/ti: Use fixed update interval

Currently the TI thermal driver sets the sensor update interval based
on the polling of the thermal zone. In order to get the polling rate,
the code inspects the thermal zone device structure internals, thus
breaking the self-encapsulation of the thermal framework core
framework.

On the other side, we see the common polling rates set in the device
tree for the platforms using this driver are 500 or 1000 ms.

Setting the polling rate to 250 ms would be far enough to cover the
combination we found in the device tree.

Instead of accessing the thermal zone device structure polling rate,
let's use a common update interval of 250 ms for the driver.

Cc: Keerthy <j-keerthy@ti.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Acked-by: Keerthy <j-keerthy@ti.com>
Link: https://lore.kernel.org/r/20230307133735.90772-7-daniel.lezcano@linaro.org
drivers/thermal/ti-soc-thermal/ti-thermal-common.c