From d0a506b5d9c14a1b30430916cbbf97df036d20a2 Mon Sep 17 00:00:00 2001 From: TeYuan Wang Date: Wed, 21 Jul 2021 08:42:59 +0800 Subject: [PATCH] thermal: Enable thermalHAL in off charging mode To support USB port overheat protection, we need to launch thermalHAL in off charging mode. Bug: 183573049 Test: verified usb port overheat protection in off charging mode with emul temp Change-Id: I0b36646d9779c2c1a25f38aafea5ca178bf91be1 --- conf/init.gs101.rc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/conf/init.gs101.rc b/conf/init.gs101.rc index 9d3a24bd..436e021e 100644 --- a/conf/init.gs101.rc +++ b/conf/init.gs101.rc @@ -870,6 +870,17 @@ on property:vendor.thermal.link_ready=1 chown system system /dev/thermal/cdev-by-name/wlc_fcc/cur_state chown system system /dev/thermal/cdev-by-name/usbc-port/cur_state +# Create thermal symlink in off charging mode +on charger + mkdir /dev/thermal 0750 system system + mkdir /dev/thermal/tz-by-name 0750 system system + mkdir /dev/thermal/cdev-by-name 0750 system system + start vendor.thermal.symlinks + +# Launch thermal hal in off charging mode +on charger && property:vendor.thermal.link_ready=1 + start vendor.thermal-hal-2-0 + on property:vendor.disable.bcl.control=1 write /sys/devices/virtual/pmic/mitigation/instruction/enable_mitigation 0