summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/thermal_core.h
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2020-12-16 23:03:35 +0100
committerDaniel Lezcano <daniel.lezcano@linaro.org>2021-01-19 22:23:38 +0100
commit17d399cd9c8936909bc8936a5837b6da9af9c29e (patch)
tree6c7da345cc161493bc761054d62fca317a76050b /drivers/thermal/thermal_core.h
parent2121496fdc5f2d93eda9743c4b487469f0042e3c (diff)
downloadlinux-17d399cd9c8936909bc8936a5837b6da9af9c29e.tar.bz2
thermal/core: Precompute the delays from msecs to jiffies
The delays are stored in ms units and when the polling function is called this delay is converted into jiffies at each call. Instead of doing the conversion again and again, compute the jiffies at init time and use the value directly when setting the polling. 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: Thara Gopinath <thara.gopinath@linaro.org> Link: https://lore.kernel.org/r/20201216220337.839878-1-daniel.lezcano@linaro.org
Diffstat (limited to 'drivers/thermal/thermal_core.h')
-rw-r--r--drivers/thermal/thermal_core.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h
index e50c6b2909fe..90f9a80c8b23 100644
--- a/drivers/thermal/thermal_core.h
+++ b/drivers/thermal/thermal_core.h
@@ -123,6 +123,7 @@ int thermal_build_list_of_policies(char *buf);
/* Helpers */
void thermal_zone_set_trips(struct thermal_zone_device *tz);
+void thermal_set_delay_jiffies(unsigned long *delay_jiffies, int delay_ms);
/* sysfs I/F */
int thermal_zone_create_device_groups(struct thermal_zone_device *, int);