From d4b4bbcd35522d3bab70a271f9d6c0a7c5e7f35d Mon Sep 17 00:00:00 2001 From: TeYuan Wang Date: Tue, 12 Jul 2022 16:34:19 +0800 Subject: [PATCH 1/2] thermal: bringup USBC throttling policy Bug: 233003074 Test: build Change-Id: Iba7360f188f59e046e084089119ac0cc6911365a --- thermal_info_config_felix.json | 64 +++++++++++++++++++++++++++++++--- 1 file changed, 59 insertions(+), 5 deletions(-) diff --git a/thermal_info_config_felix.json b/thermal_info_config_felix.json index 9161a07..2fab466 100644 --- a/thermal_info_config_felix.json +++ b/thermal_info_config_felix.json @@ -27,17 +27,17 @@ { "Name":"usb_pwr_therm", "Type":"UNKNOWN", - "HotThreshold":["NAN", 35.0, "NAN", "NAN", "NAN", "NAN", "NAN"], "TempPath":"/dev/thermal/tz-by-name/usb_pwr_therm/tz_temp", - "Multiplier":0.001, - "PollingDelay":60000, - "PassiveDelay":7000 + "Multiplier":0.001 }, { "Name":"usb_pwr_therm2", "Type":"UNKNOWN", + "HotThreshold":["NAN", 40.0, "NAN", "NAN", "NAN", "NAN", "NAN"], "TempPath":"/dev/thermal/tz-by-name/usb_pwr_therm2/tz_temp", - "Multiplier":0.001 + "Multiplier":0.001, + "PollingDelay":60000, + "PassiveDelay":7000 }, { "Name":"inner_disp_therm", @@ -57,6 +57,60 @@ "TempPath":"/dev/thermal/tz-by-name/gnss_tcxo_therm/tz_temp", "Multiplier":0.001 }, + { + "Name":"USB2-MINUS-USB", + "Type":"UNKNOWN", + "Hidden":true, + "VirtualSensor":true, + "TriggerSensor": "usb_pwr_therm2", + "Formula":"WEIGHTED_AVG", + "Combination":["usb_pwr_therm2", "usb_pwr_therm"], + "Coefficient":[1.0, -1.0], + "HotThreshold":["NAN", "7.0", "NAN", "NAN", "NAN", "NAN", "NAN"], + "BindedCdevInfo": [ + { + "CdevRequest": "usbc-port", + "LimitInfo": [0, 0, 0, 0, 0, 0, 0] + } + ], + "Multiplier":0.001, + "PollingDelay":0, + "PassiveDelay":7000 + }, + { + "Name":"VIRTUAL-USB-THROTTLING", + "Type":"USB_PORT", + "Hidden":true, + "VirtualSensor":true, + "Formula":"COUNT_THRESHOLD", + "TriggerSensor": "usb_pwr_therm2", + "Combination":["usb_pwr_therm2", "USB2-MINUS-USB"], + "Coefficient":[40000, 10000], + "HotThreshold":["NAN", "NAN", "NAN", "NAN", "2.0", "NAN", "NAN"], + "BindedCdevInfo": [ + { + "CdevRequest": "usbc-port", + "LimitInfo": [0, 0, 0, 0, 1, 1, 1] + } + ], + "Multiplier":1, + "PollingDelay":60000, + "PassiveDelay":7000 + }, + { + "Name":"VIRTUAL-USB-UI", + "Type":"USB_PORT", + "VirtualSensor":true, + "Formula":"COUNT_THRESHOLD", + "TriggerSensor": "usb_pwr_therm2", + "Combination":["usb_pwr_therm2", "USB2-MINUS-USB"], + "Coefficient":[40000, 13000], + "HotThreshold":["NAN", "NAN", "NAN", "NAN", "NAN", "2.0", "NAN"], + "Multiplier":1, + "Monitor":true, + "PollingDelay":60000, + "PassiveDelay":7000 + }, { "Name":"LITTLE", "Type":"CPU", From 88855340f7bf8a6b2d3cfc18ad6bd66317d1275d Mon Sep 17 00:00:00 2001 From: Robin Peng Date: Thu, 14 Jul 2022 21:22:49 +0800 Subject: [PATCH 2/2] init: set vendor.all.modules.ready and vendor.all.devices.ready migrated from init.gs201.rc Bug: 238853979 Signed-off-by: Robin Peng Change-Id: I49656b3e156af61fb119dbe64f1211ca82881d06 --- init.insmod.felix.cfg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init.insmod.felix.cfg b/init.insmod.felix.cfg index dba37ec..4cc5ce3 100644 --- a/init.insmod.felix.cfg +++ b/init.insmod.felix.cfg @@ -16,3 +16,5 @@ modprobe|snd-soc-cs40l26.ko # All device specific modules loaded setprop|vendor.device.modules.ready +setprop|vendor.all.modules.ready +setprop|vendor.all.devices.ready