From 5f28454244dd0f15c445af5303daa43747d04d53 Mon Sep 17 00:00:00 2001 From: David Chao Date: Mon, 13 Mar 2023 14:50:18 +0800 Subject: [PATCH] thermal: add charger thermalHAL setup into project Bug: 272701980 Test: thermal_symlinks worked properly in charging mode Change-Id: I3a5163ba3ccbdd134898dc682407a7a9136751e3 --- conf/init.zuma.rc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/conf/init.zuma.rc b/conf/init.zuma.rc index 7dea80be..094a1283 100644 --- a/conf/init.zuma.rc +++ b/conf/init.zuma.rc @@ -961,6 +961,19 @@ on property:vendor.thermal.link_ready=1 chown system system /dev/thermal/cdev-by-name/chg_mdis/cur_state chown system system /dev/thermal/cdev-by-name/usbc-port/cur_state +on charger + # Use charger thermal config + setprop vendor.thermal.config "thermal_info_config_charge.json" + + # Wait for insmod_sh to finish all common modules + wait_for_prop vendor.common.modules.ready 1 + + # Create thermal symlink in off charging mode + 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 + on property:vendor.disable.bcl.control=1 write /sys/devices/virtual/pmic/mitigation/instruction/enable_mitigation 0