]> git.karo-electronics.de Git - linux-beck.git/commitdiff
thermal: rockchip: optimize sensor auto accessing period
authorRocky Hao <rocky.hao@rock-chips.com>
Wed, 27 Jul 2016 14:10:43 +0000 (22:10 +0800)
committerZhang Rui <rui.zhang@intel.com>
Tue, 27 Sep 2016 06:02:16 +0000 (14:02 +0800)
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>
drivers/thermal/rockchip_thermal.c

index a90423d16f39a173306dda9a3d150d6d65961c27..1f165c990c85c332c44132dcb1d1a5ebec102d48 100644 (file)
@@ -213,8 +213,8 @@ struct rockchip_thermal_data {
 #define TSADCV2_HIGHT_TSHUT_DEBOUNCE_COUNT     4
 #define TSADCV2_AUTO_PERIOD_TIME               250 /* 250ms */
 #define TSADCV2_AUTO_PERIOD_HT_TIME            50  /* 50ms */
-#define TSADCV3_AUTO_PERIOD_TIME               187500 /* 250ms */
-#define TSADCV3_AUTO_PERIOD_HT_TIME            37500  /* 50ms */
+#define TSADCV3_AUTO_PERIOD_TIME               1875 /* 2.5ms */
+#define TSADCV3_AUTO_PERIOD_HT_TIME            1875 /* 2.5ms */
 
 #define TSADCV2_USER_INTER_PD_SOC              0x340 /* 13 clocks */