From 125fb04184a08ed5cf06821c3beab86d654a9e14 Mon Sep 17 00:00:00 2001 From: "Peter (YM)" Date: Fri, 5 Jul 2024 03:41:52 +0000 Subject: [PATCH] thermal: monitor more sensor for backup shutdown Enable the monitor for QUIET_THERM,SOC_THERM,RFPA_THERM,NORTH_THERM to get more information for deciding backup shutdown thermistor Bug: 350877108 Test: Build and boot to home, verify with emul_temp (b/350877108#comment5) Flag: EXEMPT (bug 337358613) Change-Id: I1631311d2847a872b8afc12e2e702b801bf76a77 Signed-off-by: Peter (YM) --- thermal/thermal_info_config_tegu.json | 181 +++++++++++++++++++++++++- 1 file changed, 176 insertions(+), 5 deletions(-) diff --git a/thermal/thermal_info_config_tegu.json b/thermal/thermal_info_config_tegu.json index da8ed91..24f5a25 100644 --- a/thermal/thermal_info_config_tegu.json +++ b/thermal/thermal_info_config_tegu.json @@ -824,6 +824,7 @@ { "Name":"VSKIN-SKIN-UNDER-52", "Type":"UNKNOWN", + "Hidden":true, "VirtualSensor":true, "Formula":"COUNT_THRESHOLD", "Combination":["VIRTUAL-SKIN"], @@ -831,8 +832,9 @@ "Multiplier":1 }, { - "Name":"QUIET_THERM-MODEL-DIFF-DURING-MODEL-OVER-52", + "Name":"QUIET_THERM-VSKIN-DIFF-DURING-VSKIN-OVER-52", "Type":"UNKNOWN", + "Hidden":true, "VirtualSensor":true, "Formula":"WEIGHTED_AVG", "Combination":["quiet_therm", "VIRTUAL-SKIN", -1000000], @@ -841,6 +843,131 @@ "CoefficientType":["CONSTANT", "CONSTANT", "SENSOR"], "Multiplier":0.001 }, + { + "Name":"SOC_THERM-VSKIN-DIFF-DURING-VSKIN-OVER-52", + "Type":"UNKNOWN", + "Hidden":true, + "VirtualSensor":true, + "Formula":"WEIGHTED_AVG", + "Combination":["soc_therm", "VIRTUAL-SKIN", -1000000], + "CombinationType":["SENSOR", "SENSOR", "CONSTANT"], + "Coefficient":[1, -1, "VSKIN-SKIN-UNDER-52"], + "CoefficientType":["CONSTANT", "CONSTANT", "SENSOR"], + "Multiplier":0.001 + }, + { + "Name":"NORTH_THERM-VSKIN-DIFF-DURING-VSKIN-OVER-52", + "Type":"UNKNOWN", + "Hidden":true, + "VirtualSensor":true, + "Formula":"WEIGHTED_AVG", + "Combination":["north_therm", "VIRTUAL-SKIN", -1000000], + "CombinationType":["SENSOR", "SENSOR", "CONSTANT"], + "Coefficient":[1, -1, "VSKIN-SKIN-UNDER-52"], + "CoefficientType":["CONSTANT", "CONSTANT", "SENSOR"], + "Multiplier":0.001 + }, + { + "Name":"RFPA_THERM-VSKIN-DIFF-DURING-VSKIN-OVER-52", + "Type":"UNKNOWN", + "Hidden":true, + "VirtualSensor":true, + "Formula":"WEIGHTED_AVG", + "Combination":["rfpa_therm", "VIRTUAL-SKIN", -1000000], + "CombinationType":["SENSOR", "SENSOR", "CONSTANT"], + "Coefficient":[1, -1, "VSKIN-SKIN-UNDER-52"], + "CoefficientType":["CONSTANT", "CONSTANT", "SENSOR"], + "Multiplier":0.001 + }, + { + "Name":"QUIET_THERM-UNDER-THRESHOLD", + "Type":"UNKNOWN", + "Hidden":true, + "VirtualSensor":true, + "Formula":"COUNT_THRESHOLD", + "Combination":["quiet_therm"], + "Coefficient":[-59000], + "Multiplier":1 + }, + { + "Name":"SOC_THERM-UNDER-THRESHOLD", + "Type":"UNKNOWN", + "Hidden":true, + "VirtualSensor":true, + "Formula":"COUNT_THRESHOLD", + "Combination":["soc_therm"], + "Coefficient":[-64000], + "Multiplier":1 + }, + + { + "Name":"NORTH_THERM-UNDER-THRESHOLD", + "Type":"UNKNOWN", + "Hidden":true, + "VirtualSensor":true, + "Formula":"COUNT_THRESHOLD", + "Combination":["north_therm"], + "Coefficient":[-60000], + "Multiplier":1 + }, + { + "Name":"RFPA_THERM-UNDER-THRESHOLD", + "Type":"UNKNOWN", + "Hidden":true, + "VirtualSensor":true, + "Formula":"COUNT_THRESHOLD", + "Combination":["rfpa_therm"], + "Coefficient":[-55000], + "Multiplier":1 + }, + { + "Name":"QUIET_THERM-VSKIN-DIFF-DURING-QUIET_THERM-OVER-THRESHOLD", + "Type":"UNKNOWN", + "Hidden":true, + "VirtualSensor":true, + "Formula":"WEIGHTED_AVG", + "Combination":["quiet_therm", "VIRTUAL-SKIN", -1000000], + "CombinationType":["SENSOR", "SENSOR", "CONSTANT"], + "Coefficient":[1, -1, "QUIET_THERM-UNDER-THRESHOLD"], + "CoefficientType":["CONSTANT", "CONSTANT", "SENSOR"], + "Multiplier":0.001 + }, + { + "Name":"SOC_THERM-VSKIN-DIFF-DURING-SOC_THERM-OVER-THRESHOLD", + "Type":"UNKNOWN", + "Hidden":true, + "VirtualSensor":true, + "Formula":"WEIGHTED_AVG", + "Combination":["soc_therm", "VIRTUAL-SKIN", -1000000], + "CombinationType":["SENSOR", "SENSOR", "CONSTANT"], + "Coefficient":[1, -1, "SOC_THERM-UNDER-THRESHOLD"], + "CoefficientType":["CONSTANT", "CONSTANT", "SENSOR"], + "Multiplier":0.001 + }, + { + "Name":"NORTH_THERM-VSKIN-DIFF-DURING-NORTH_THERM-OVER-THRESHOLD", + "Type":"UNKNOWN", + "Hidden":true, + "VirtualSensor":true, + "Formula":"WEIGHTED_AVG", + "Combination":["north_therm", "VIRTUAL-SKIN", -1000000], + "CombinationType":["SENSOR", "SENSOR", "CONSTANT"], + "Coefficient":[1, -1, "NORTH_THERM-UNDER-THRESHOLD"], + "CoefficientType":["CONSTANT", "CONSTANT", "SENSOR"], + "Multiplier":0.001 + }, + { + "Name":"RFPA_THERM-VSKIN-DIFF-DURING-RFPA_THERM-OVER-THRESHOLD", + "Type":"UNKNOWN", + "Hidden":true, + "VirtualSensor":true, + "Formula":"WEIGHTED_AVG", + "Combination":["rfpa_therm", "VIRTUAL-SKIN", -1000000], + "CombinationType":["SENSOR", "SENSOR", "CONSTANT"], + "Coefficient":[1, -1, "RFPA_THERM-UNDER-THRESHOLD"], + "CoefficientType":["CONSTANT", "CONSTANT", "SENSOR"], + "Multiplier":0.001 + }, { "Name": "STATS-UPDATOR", "Type": "UNKNOWN", @@ -848,8 +975,12 @@ "Hidden": true, "TriggerSensor": ["north_therm", "soc_therm", "charging_therm", "disp_therm", "quiet_therm", "usb_pwr_therm", "rfpa_therm", "btmspkr_therm"], "Formula": "WEIGHTED_AVG", - "Combination": ["VIRTUAL-SKIN-MODEL", "VIRTUAL-SKIN-LEGACY", "VIRTUAL-SKIN-MODEL-LEGACY-DIFF", "QUIET_THERM-MODEL-DIFF-DURING-MODEL-OVER-52", "VSKIN-SKIN-UNDER-52"], - "Coefficient": [0.0, 0.0, 0.0, 0.0, 0.0], + "Combination": ["VIRTUAL-SKIN-MODEL", "VIRTUAL-SKIN-LEGACY", "VIRTUAL-SKIN-MODEL-LEGACY-DIFF", + "QUIET_THERM-VSKIN-DIFF-DURING-VSKIN-OVER-52", "QUIET_THERM-VSKIN-DIFF-DURING-QUIET_THERM-OVER-THRESHOLD", + "SOC_THERM-VSKIN-DIFF-DURING-VSKIN-OVER-52", "SOC_THERM-VSKIN-DIFF-DURING-SOC_THERM-OVER-THRESHOLD", + "NORTH_THERM-VSKIN-DIFF-DURING-VSKIN-OVER-52", "NORTH_THERM-VSKIN-DIFF-DURING-NORTH_THERM-OVER-THRESHOLD", + "RFPA_THERM-VSKIN-DIFF-DURING-VSKIN-OVER-52", "RFPA_THERM-VSKIN-DIFF-DURING-RFPA_THERM-OVER-THRESHOLD"], + "Coefficient": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "Multiplier": 1, "SendPowerHint": true, "PollingDelay": 300000, @@ -1002,8 +1133,36 @@ "Thresholds": [41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 75] }, { - "Name": "QUIET_THERM-MODEL-DIFF-DURING-MODEL-OVER-52", - "Thresholds": [-200, -30, -25, -20, -15, -10, -5, 0, 5, 10, 15, 20, 25, 30, 35, 40] + "Name": "QUIET_THERM-VSKIN-DIFF-DURING-VSKIN-OVER-52", + "Thresholds": [-18, -16, -14, -12, -10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18] + }, + { + "Name": "QUIET_THERM-VSKIN-DIFF-DURING-QUIET_THERM-OVER-THRESHOLD", + "Thresholds": [-18, -16, -14, -12, -10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18] + }, + { + "Name": "SOC_THERM-VSKIN-DIFF-DURING-VSKIN-OVER-52", + "Thresholds": [-18, -16, -14, -12, -10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18] + }, + { + "Name": "SOC_THERM-VSKIN-DIFF-DURING-SOC_THERM-OVER-THRESHOLD", + "Thresholds": [-18, -16, -14, -12, -10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18] + }, + { + "Name": "RFPA_THERM-VSKIN-DIFF-DURING-VSKIN-OVER-52", + "Thresholds": [-18, -16, -14, -12, -10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18] + }, + { + "Name": "RFPA_THERM-VSKIN-DIFF-DURING-RFPA_THERM-OVER-THRESHOLD", + "Thresholds": [-18, -16, -14, -12, -10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18] + }, + { + "Name": "NORTH_THERM-VSKIN-DIFF-DURING-VSKIN-OVER-52", + "Thresholds": [-18, -16, -14, -12, -10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18] + }, + { + "Name": "NORTH_THERM-VSKIN-DIFF-DURING-NORTH_THERM-OVER-THRESHOLD", + "Thresholds": [-18, -16, -14, -12, -10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18] }, { "Name": "VIRTUAL-SKIN-MODEL-LEGACY-DIFF", @@ -1023,7 +1182,19 @@ }, { "Monitor": ["quiet_therm"], + "TempRange": [-20.0, 59.0] + }, + { + "Monitor": ["soc_therm"], + "TempRange": [-20.0, 64.0] + }, + { + "Monitor": ["north_therm"], "TempRange": [-20.0, 55.0] + }, + { + "Monitor": ["rfpa_therm"], + "TempRange": [-20.0, 60.0] } ] }