From 16a7cffdc85f047fee3f5e89d786c8a6cd416666 Mon Sep 17 00:00:00 2001 From: Sayanna Chandula Date: Tue, 7 Mar 2023 13:14:14 -0800 Subject: [PATCH] thermal: add support for multiple trigger sensors Bug: 271378726 Test: Build and boot on device. Test with emul temp Change-Id: I4699064dd3d64f905740b234ee0041c1e063b405 Signed-off-by: Sayanna Chandula --- thermal_info_config_husky.json | 52 +++++++++++++++++++++++++--------- thermal_info_config_shiba.json | 45 ++++++++++++++++++++--------- 2 files changed, 70 insertions(+), 27 deletions(-) diff --git a/thermal_info_config_husky.json b/thermal_info_config_husky.json index 007263b..94b8537 100644 --- a/thermal_info_config_husky.json +++ b/thermal_info_config_husky.json @@ -9,20 +9,32 @@ { "Name":"neutral_therm", "Type":"UNKNOWN", + "HotThreshold":["NAN", 43.4, "NAN", "NAN", "NAN", "NAN", "NAN"], + "HotHysteresis":[0.0, 0.9, 0.0, 0.0, 0.0, 0.0, 0.0], "TempPath":"/dev/thermal/tz-by-name/neutral_therm/tz_temp", - "Multiplier":0.001 + "Multiplier":0.001, + "PollingDelay":60000, + "PassiveDelay":7000 }, { "Name":"north_therm", "Type":"UNKNOWN", + "HotThreshold":["NAN", 33.5, "NAN", "NAN", "NAN", "NAN", "NAN"], + "HotHysteresis":[0.0, 0.9, 0.0, 0.0, 0.0, 0.0, 0.0], "TempPath":"/dev/thermal/tz-by-name/north_therm/tz_temp", - "Multiplier":0.001 + "Multiplier":0.001, + "PollingDelay":60000, + "PassiveDelay":7000 }, { "Name":"charge_therm", "Type":"UNKNOWN", + "HotThreshold":["NAN", 40.2, "NAN", "NAN", "NAN", "NAN", "NAN"], + "HotHysteresis":[0.0, 0.9, 0.0, 0.0, 0.0, 0.0, 0.0], "TempPath":"/dev/thermal/tz-by-name/charge_therm/tz_temp", - "Multiplier":0.001 + "Multiplier":0.001, + "PollingDelay":60000, + "PassiveDelay":7000 }, { "Name":"usb_pwr_therm", @@ -129,30 +141,42 @@ { "Name":"cam_therm", "Type":"UNKNOWN", + "HotThreshold":["NAN", 33.4, "NAN", "NAN", "NAN", "NAN", "NAN"], + "HotHysteresis":[0.0, 0.9, 0.0, 0.0, 0.0, 0.0, 0.0], "TempPath":"/dev/thermal/tz-by-name/cam_therm/tz_temp", - "Multiplier":0.001 + "Multiplier":0.001, + "PollingDelay":60000, + "PassiveDelay":7000 }, { "Name":"disp_therm", "Type":"UNKNOWN", - "HotThreshold":["NAN", 30.0, "NAN", "NAN", "NAN", "NAN", "NAN"], + "HotThreshold":["NAN", 32.4, "NAN", "NAN", "NAN", "NAN", "NAN"], "HotHysteresis":[0.0, 0.9, 0.0, 0.0, 0.0, 0.0, 0.0], "TempPath":"/dev/thermal/tz-by-name/disp_therm/tz_temp", "Multiplier":0.001, - "Multiplier":0.001, "PollingDelay":60000, "PassiveDelay":7000 }, { "Name":"soc_therm", "Type":"UNKNOWN", + "HotThreshold":["NAN", 52.7, "NAN", "NAN", "NAN", "NAN", "NAN"], + "HotHysteresis":[0.0, 0.9, 0.0, 0.0, 0.0, 0.0, 0.0], "TempPath":"/dev/thermal/tz-by-name/soc_therm/tz_temp", - "Multiplier":0.001 + "Multiplier":0.001, + "PollingDelay":60000, + "PassiveDelay":7000 }, { "Name":"quiet_therm", "Type":"UNKNOWN", - "TempPath":"/dev/thermal/tz-by-name/quiet_therm/tz_temp" + "HotThreshold":["NAN", 37.7, "NAN", "NAN", "NAN", "NAN", "NAN"], + "HotHysteresis":[0.0, 0.9, 0.0, 0.0, 0.0, 0.0, 0.0], + "TempPath":"/dev/thermal/tz-by-name/quiet_therm/tz_temp", + "Multiplier":0.001, + "PollingDelay":60000, + "PassiveDelay":7000 }, { "Name":"VIRTUAL-SKIN-SUB-0", @@ -257,7 +281,7 @@ "Type":"SKIN", "Version":"2.0", "VirtualSensor":true, - "TriggerSensor":"disp_therm", + "TriggerSensor":["north_therm", "cam_therm", "soc_therm", "charge_therm", "disp_therm", "neutral_therm", "quiet_therm"], "Formula":"MAXIMUM", "Combination":["VIRTUAL-SKIN-SUB-0", "VIRTUAL-SKIN-SUB-1", "VIRTUAL-SKIN-SUB-2", "VIRTUAL-SKIN-SUB-3", "VIRTUAL-SKIN-SUB-4", "VIRTUAL-SKIN-SUB-5"], "Coefficient":[1.0, 1.0, 1.0, 1.0, 1.0, 1.0], @@ -283,7 +307,7 @@ "Type":"UNKNOWN", "Hidden":true, "VirtualSensor":true, - "TriggerSensor":"disp_therm", + "TriggerSensor":["north_therm", "cam_therm", "soc_therm", "charge_therm", "disp_therm", "neutral_therm", "quiet_therm"], "Formula":"MAXIMUM", "Combination":["VIRTUAL-SKIN"], "Coefficient":[1.0], @@ -299,7 +323,7 @@ "Type":"UNKNOWN", "Hidden":true, "VirtualSensor":true, - "TriggerSensor":"disp_therm", + "TriggerSensor":["north_therm", "cam_therm", "soc_therm", "charge_therm", "disp_therm", "neutral_therm", "quiet_therm"], "Formula":"MAXIMUM", "Combination":["VIRTUAL-SKIN"], "Coefficient":[1.0], @@ -355,7 +379,7 @@ "Type":"UNKNOWN", "Hidden":true, "VirtualSensor":true, - "TriggerSensor":"disp_therm", + "TriggerSensor":["north_therm", "cam_therm", "soc_therm", "charge_therm", "disp_therm", "neutral_therm", "quiet_therm"], "Formula":"MAXIMUM", "Combination":["VIRTUAL-SKIN"], "Coefficient":[1.0], @@ -392,7 +416,7 @@ "Name":"VIRTUAL-SKIN-CHARGE", "Type":"UNKNOWN", "VirtualSensor":true, - "TriggerSensor":"disp_therm", + "TriggerSensor":["north_therm", "cam_therm", "soc_therm", "charge_therm", "disp_therm", "neutral_therm", "quiet_therm"], "Formula":"MAXIMUM", "Combination":["VIRTUAL-SKIN-CHARGE-SUB-0", "VIRTUAL-SKIN-CHARGE-SUB-1"], "Coefficient":[1.0, 1.0], @@ -433,7 +457,7 @@ "Name":"cellular-emergency", "Type":"POWER_AMPLIFIER", "VirtualSensor":true, - "TriggerSensor":"disp_therm", + "TriggerSensor":["north_therm", "cam_therm", "soc_therm", "charge_therm", "disp_therm", "neutral_therm", "quiet_therm"], "Formula":"MAXIMUM", "Combination":["VIRTUAL-SKIN"], "Coefficient":[1.0], diff --git a/thermal_info_config_shiba.json b/thermal_info_config_shiba.json index a1ab47c..4a0e8fb 100644 --- a/thermal_info_config_shiba.json +++ b/thermal_info_config_shiba.json @@ -9,20 +9,32 @@ { "Name":"neutral_therm", "Type":"UNKNOWN", + "HotThreshold":["NAN", 44.5, "NAN", "NAN", "NAN", "NAN", "NAN"], + "HotHysteresis":[0.0, 0.9, 0.0, 0.0, 0.0, 0.0, 0.0], "TempPath":"/dev/thermal/tz-by-name/neutral_therm/tz_temp", - "Multiplier":0.001 + "Multiplier":0.001, + "PollingDelay":60000, + "PassiveDelay":7000 }, { "Name":"north_therm", "Type":"UNKNOWN", + "HotThreshold":["NAN", 35.5, "NAN", "NAN", "NAN", "NAN", "NAN"], + "HotHysteresis":[0.0, 0.9, 0.0, 0.0, 0.0, 0.0, 0.0], "TempPath":"/dev/thermal/tz-by-name/north_therm/tz_temp", - "Multiplier":0.001 + "Multiplier":0.001, + "PollingDelay":60000, + "PassiveDelay":7000 }, { "Name":"charge_therm", "Type":"UNKNOWN", + "HotThreshold":["NAN", 41.0, "NAN", "NAN", "NAN", "NAN", "NAN"], + "HotHysteresis":[0.0, 0.9, 0.0, 0.0, 0.0, 0.0, 0.0], "TempPath":"/dev/thermal/tz-by-name/charge_therm/tz_temp", - "Multiplier":0.001 + "Multiplier":0.001, + "PollingDelay":60000, + "PassiveDelay":7000 }, { "Name":"usb_pwr_therm", @@ -129,25 +141,32 @@ { "Name":"cam_therm", "Type":"UNKNOWN", + "HotThreshold":["NAN", 33.6, "NAN", "NAN", "NAN", "NAN", "NAN"], + "HotHysteresis":[0.0, 0.9, 0.0, 0.0, 0.0, 0.0, 0.0], "TempPath":"/dev/thermal/tz-by-name/cam_therm/tz_temp", - "Multiplier":0.001 + "Multiplier":0.001, + "PollingDelay":60000, + "PassiveDelay":7000 }, { "Name":"disp_therm", "Type":"UNKNOWN", - "HotThreshold":["NAN", 30.0, "NAN", "NAN", "NAN", "NAN", "NAN"], + "HotThreshold":["NAN", 32.6, "NAN", "NAN", "NAN", "NAN", "NAN"], "HotHysteresis":[0.0, 0.9, 0.0, 0.0, 0.0, 0.0, 0.0], "TempPath":"/dev/thermal/tz-by-name/disp_therm/tz_temp", "Multiplier":0.001, - "Multiplier":0.001, "PollingDelay":60000, "PassiveDelay":7000 }, { "Name":"soc_therm", "Type":"UNKNOWN", + "HotThreshold":["NAN", 49.7, "NAN", "NAN", "NAN", "NAN", "NAN"], + "HotHysteresis":[0.0, 0.9, 0.0, 0.0, 0.0, 0.0, 0.0], "TempPath":"/dev/thermal/tz-by-name/soc_therm/tz_temp", - "Multiplier":0.001 + "Multiplier":0.001, + "PollingDelay":60000, + "PassiveDelay":7000 }, { "Name":"quiet_therm", @@ -269,7 +288,7 @@ "Type":"SKIN", "Version":"1.0", "VirtualSensor":true, - "TriggerSensor":"disp_therm", + "TriggerSensor":["north_therm", "cam_therm", "soc_therm", "charge_therm", "disp_therm", "neutral_therm", "usb_pwr_therm"], "Formula":"MAXIMUM", "Combination":["VIRTUAL-SKIN-SUB-0", "VIRTUAL-SKIN-SUB-1", "VIRTUAL-SKIN-SUB-2", "VIRTUAL-SKIN-SUB-3", "VIRTUAL-SKIN-SUB-4", "VIRTUAL-SKIN-SUB-5", "VIRTUAL-SKIN-SUB-6", "VIRTUAL-SKIN-SUB-7"], "Coefficient":[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], @@ -295,7 +314,7 @@ "Type":"UNKNOWN", "Hidden":true, "VirtualSensor":true, - "TriggerSensor":"disp_therm", + "TriggerSensor":["north_therm", "cam_therm", "soc_therm", "charge_therm", "disp_therm", "neutral_therm", "usb_pwr_therm"], "Formula":"MAXIMUM", "Combination":["VIRTUAL-SKIN"], "Coefficient":[1.0], @@ -311,7 +330,7 @@ "Type":"UNKNOWN", "Hidden":true, "VirtualSensor":true, - "TriggerSensor":"disp_therm", + "TriggerSensor":["north_therm", "cam_therm", "soc_therm", "charge_therm", "disp_therm", "neutral_therm", "usb_pwr_therm"], "Formula":"MAXIMUM", "Combination":["VIRTUAL-SKIN"], "Coefficient":[1.0], @@ -367,7 +386,7 @@ "Type":"UNKNOWN", "Hidden":true, "VirtualSensor":true, - "TriggerSensor":"disp_therm", + "TriggerSensor":["north_therm", "cam_therm", "soc_therm", "charge_therm", "disp_therm", "neutral_therm", "usb_pwr_therm"], "Formula":"MAXIMUM", "Combination":["VIRTUAL-SKIN"], "Coefficient":[1.0], @@ -404,7 +423,7 @@ "Name":"VIRTUAL-SKIN-CHARGE", "Type":"UNKNOWN", "VirtualSensor":true, - "TriggerSensor":"disp_therm", + "TriggerSensor":["north_therm", "cam_therm", "soc_therm", "charge_therm", "disp_therm", "neutral_therm", "usb_pwr_therm"], "Formula":"MAXIMUM", "Combination":["VIRTUAL-SKIN-CHARGE-SUB-0", "VIRTUAL-SKIN-CHARGE-SUB-1"], "Coefficient":[1.0, 1.0], @@ -445,7 +464,7 @@ "Name":"cellular-emergency", "Type":"POWER_AMPLIFIER", "VirtualSensor":true, - "TriggerSensor":"disp_therm", + "TriggerSensor":["north_therm", "cam_therm", "soc_therm", "charge_therm", "disp_therm", "neutral_therm", "usb_pwr_therm"], "Formula":"MAXIMUM", "Combination":["VIRTUAL-SKIN"], "Coefficient":[1.0],