thermal: rockchip: optimize sensor auto accessing period
authorRocky Hao <rocky.hao@rock-chips.com>
Fri, 1 Jul 2016 08:35:46 +0000 (16:35 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Wed, 6 Jul 2016 03:39:35 +0000 (11:39 +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.

Change-Id: Ie8038a1ae5837ad4aa31b04d1f3ace299f82e396
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
drivers/thermal/rockchip_thermal.c

index 26cbda55a6ab00001f38bb9f78b50d70ab52870d..66508100eb5dff1cdca1226181f566f68a2fa493 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 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 */
 
 
 #define TSADCV2_USER_INTER_PD_SOC              0x340 /* 13 clocks */