diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2023-04-18 11:26:47 -0700 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2023-04-18 11:26:47 -0700 |
commit | 95d1dfd83f74daa82c28f8c49152a5ce6070c10c (patch) | |
tree | ce498eadd44fb33ee5f3d35569eea2b23042f50e | |
parent | ea340780ad532370bbe422915351f9b4d3aa7239 (diff) | |
parent | 39ff74035adc9fe28715e7000e7fe48e8e2b5fe4 (diff) |
Merge 39ff74035adc9fe28715e7000e7fe48e8e2b5fe4 on remote branch
Change-Id: Ie6132b14675be591fe288d74664440611d1024ac
-rw-r--r-- | thermalCommon.cpp | 9 | ||||
-rw-r--r-- | thermalConfig.cpp | 109 |
2 files changed, 87 insertions, 31 deletions
diff --git a/thermalCommon.cpp b/thermalCommon.cpp index 02c14e1..9c9d632 100644 --- a/thermalCommon.cpp +++ b/thermalCommon.cpp @@ -107,6 +107,7 @@ static std::unordered_map<std::string, cdevType> cdev_map = { {"cdsp", cdevType::NPU}, {"cdsp_hw", cdevType::NPU}, {"battery", cdevType::BATTERY}, + {"fan-max31760", cdevType::FAN}, }; ThermalCommon::ThermalCommon() @@ -644,10 +645,10 @@ int ThermalCommon::get_cpu_usages(hidl_vec<CpuUsage>& list) { } fclose(cpu_file); - list[cpu_num].name = std::string("CPU") + std::to_string(cpu_num); - list[cpu_num].active = active; - list[cpu_num].total = total; - list[cpu_num].isOnline = online; + list[cpu].name = std::string("CPU") + std::to_string(cpu_num); + list[cpu].active = active; + list[cpu].total = total; + list[cpu].isOnline = online; cpu++; } fclose(file); diff --git a/thermalConfig.cpp b/thermalConfig.cpp index a2244ca..a1aeee3 100644 --- a/thermalConfig.cpp +++ b/thermalConfig.cpp @@ -118,8 +118,9 @@ namespace implementation { std::vector<std::string> cpu_sensors_khaje = { - "cpuss-0", - "cpuss-1", + "cpuss-2", + "cpuss-2", + "cpuss-2", "cpuss-2", "cpu-1-0", "cpu-1-1", @@ -158,7 +159,7 @@ namespace implementation { }, { TemperatureType::BCL_VOLTAGE, - { "pm7250b-vbat-lvl0" }, + { "vbat" }, "vbat", 3000, 2800, @@ -176,12 +177,12 @@ namespace implementation { }, { TemperatureType::BCL_PERCENTAGE, - { "soc" }, - "soc", - 10, - 2, - 10, - false, + { "socd" }, + "socd", + 90, + 99, + 90, + true, }, }; @@ -255,6 +256,54 @@ namespace implementation { }, }; + std::vector<std::string> cpu_sensors_monaco = + { + "cpuss-0", + "cpuss-1", + "cpuss-0", + "cpuss-1", + }; + + std::vector<struct target_therm_cfg> sensor_cfg_monaco = + { + { + TemperatureType::CPU, + cpu_sensors_monaco, + "", + 95000, + 115000, + 95000, + true, + }, + { + TemperatureType::GPU, + { "gpu" }, + "gpu", + 95000, + 115000, + 95000, + true, + }, + { + TemperatureType::SKIN, + { "pa-therm0" }, + "skin", + 40000, + 95000, + 40000, + true, + }, + { + TemperatureType::BCL_CURRENT, + { "pm5100-ibat-lvl0" }, + "ibat", + 1100, + 1500, + 1100, + true, + }, + }; + std::vector<std::string> cpu_sensors_lito = { "cpu-0-0-usr", @@ -434,14 +483,14 @@ namespace implementation { std::vector<std::string> cpu_sensors_kona = { - "cpu-0-0-usr", - "cpu-0-1-usr", - "cpu-0-2-usr", - "cpu-0-3-usr", - "cpu-1-0-usr", - "cpu-1-1-usr", - "cpu-1-2-usr", - "cpu-1-3-usr", + "cpu-0-0", + "cpu-0-1", + "cpu-0-2", + "cpu-0-3", + "cpu-1-0", + "cpu-1-1", + "cpu-1-2", + "cpu-1-3", }; std::vector<struct target_therm_cfg> sensor_cfg_msmnile = { @@ -522,7 +571,7 @@ namespace implementation { }, { TemperatureType::GPU, - { "gpuss-0-usr" }, + { "gpuss-0" }, "GPU0", 95000, 115000, @@ -531,7 +580,7 @@ namespace implementation { }, { TemperatureType::GPU, - { "gpuss-1-usr" }, + { "gpuss-1" }, "GPU1", 95000, 115000, @@ -540,7 +589,7 @@ namespace implementation { }, { TemperatureType::SKIN, - { "skin-msm-therm-usr" }, + { "skin-msm-therm" }, "skin", 40000, 95000, @@ -561,7 +610,7 @@ namespace implementation { }, { TemperatureType::BCL_VOLTAGE, - { "pm8150b-vbat-lvl0" }, + { "vbat" }, "vbat", 3200, 3000, @@ -570,16 +619,16 @@ namespace implementation { }, { TemperatureType::BCL_PERCENTAGE, - { "soc" }, - "soc", - 10, - 2, - 10, + { "socd" }, + "socd", + 90, + 99, + 90, false, }, { TemperatureType::NPU, - { "npu-usr" }, + { "npu" }, "npu", 95000, 115000, @@ -1093,6 +1142,10 @@ namespace implementation { {536, kalama_common}, //Kalamap {600, kalama_common}, //Kalama_sg {601, kalama_common}, //Kalamap_sg + {603, kalama_common}, //Kalama_qcs + {604, kalama_common}, //Kalama_qcm + {486, sensor_cfg_monaco}, // monaco + {517, sensor_cfg_monaco}, // monaco }; const std::unordered_map<int, std::vector<struct target_therm_cfg>> @@ -1115,6 +1168,8 @@ namespace implementation { {536, kalama_specific}, //Kalamap {600, kalama_specific}, //Kalama_sg {601, kalama_specific}, //Kalamap_sg + {603, kalama_specific}, //Kalama_qcs + {604, kalama_specific}, //Kalama_qcm }; std::vector<struct target_therm_cfg> add_target_config( |