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
This commit is contained in:
TeYuan Wang 2021-07-21 08:42:59 +08:00 committed by Jia-yi Chen
parent 4ee5627c11
commit d0a506b5d9

View file

@ -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