From 0d14937aefc6f1474190ac650d77e90de1183cf3 Mon Sep 17 00:00:00 2001 From: David Chao Date: Thu, 18 Aug 2022 16:42:48 +0800 Subject: [PATCH] thermal: move charger thermal HAL setup into project Move charger pixel-thermal-symlink from common to project folder to prevent the GKI version dependencies from blocking init. Bug: 240897207 Test: thermal_symlinks worked properly in charging mode Change-Id: I46a4fe59fe62845f8197d3a59b18af0945a163f4 --- conf/init.gs201.rc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/conf/init.gs201.rc b/conf/init.gs201.rc index 207689a1..cedb7f45 100644 --- a/conf/init.gs201.rc +++ b/conf/init.gs201.rc @@ -970,6 +970,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