summaryrefslogtreecommitdiff
path: root/drivers/thermal/ti-soc-thermal
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2020-12-16 23:03:37 +0100
committerDaniel Lezcano <daniel.lezcano@linaro.org>2021-01-19 22:23:49 +0100
commitb39d2dd5b5ed08d15711aefd5afd72bd87387c64 (patch)
treeb852ce487fa56a9facd7584b57a853cfbd46f480 /drivers/thermal/ti-soc-thermal
parent39a38808d082fc0fbf45cfefda17252ed8c6b31f (diff)
thermal/core: Remove ms based delay fields
The code does no longer use the ms unit based fields to set the delays as they are replaced by the jiffies. Remove them and replace their user to use the jiffies version instead. Cc: Thara Gopinath <thara.gopinath@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> Reviewed-by: Peter Kästle <peter@piie.net> Acked-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20201216220337.839878-3-daniel.lezcano@linaro.org
Diffstat (limited to 'drivers/thermal/ti-soc-thermal')
-rw-r--r--drivers/thermal/ti-soc-thermal/ti-thermal-common.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
index 2ce4b19f312a..f84375865c97 100644
--- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
+++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
@@ -166,6 +166,7 @@ int ti_thermal_expose_sensor(struct ti_bandgap *bgp, int id,
char *domain)
{
struct ti_thermal_data *data;
+ int interval;
data = ti_bandgap_get_sensor_data(bgp, id);
@@ -183,9 +184,10 @@ int ti_thermal_expose_sensor(struct ti_bandgap *bgp, int id,
return PTR_ERR(data->ti_thermal);
}
+ interval = jiffies_to_msecs(data->ti_thermal->polling_delay_jiffies);
+
ti_bandgap_set_sensor_data(bgp, id, data);
- ti_bandgap_write_update_interval(bgp, data->sensor_id,
- data->ti_thermal->polling_delay);
+ ti_bandgap_write_update_interval(bgp, data->sensor_id, interval);
return 0;
}