Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

thermal: rockchip: optimize sensor auto accessing period

In less than 10 ms, the temperature of soc will arise 10 degree. 250 ms
is too big for soc tempeture control. Setting 2.5 ms will speed up
temperature accessing speed but introduce no more cpu's computing overhead.
We set AUTO_PERIOD_TIME and TSADCV3_AUTO_PERIOD_HT_TIME the same value,
because normal temperature update speed is also our consern in IPA.

Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: linux-pm@vger.kernel.org
Tested-by: Stephen Barber <smbarber@chromium.org>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>

authored by

Rocky Hao and committed by
Zhang Rui
5ef62de7 23f75e48

+2 -2
+2 -2
drivers/thermal/rockchip_thermal.c
··· 213 213 #define TSADCV2_HIGHT_TSHUT_DEBOUNCE_COUNT 4 214 214 #define TSADCV2_AUTO_PERIOD_TIME 250 /* 250ms */ 215 215 #define TSADCV2_AUTO_PERIOD_HT_TIME 50 /* 50ms */ 216 - #define TSADCV3_AUTO_PERIOD_TIME 187500 /* 250ms */ 217 - #define TSADCV3_AUTO_PERIOD_HT_TIME 37500 /* 50ms */ 216 + #define TSADCV3_AUTO_PERIOD_TIME 1875 /* 2.5ms */ 217 + #define TSADCV3_AUTO_PERIOD_HT_TIME 1875 /* 2.5ms */ 218 218 219 219 #define TSADCV2_USER_INTER_PD_SOC 0x340 /* 13 clocks */ 220 220