Merge 88df48b2e186d1cba5eda74d9c8c9c9c5d9bee2f on remote branch

Change-Id: I16e963f12d7934e0a8d3e79f956870c3e9a578ec
diff --git a/android.hardware.thermal@2.0-service.qti-v2.rc b/android.hardware.thermal@2.0-service.qti-v2.rc
index bfe8d3a..a1100b6 100644
--- a/android.hardware.thermal@2.0-service.qti-v2.rc
+++ b/android.hardware.thermal@2.0-service.qti-v2.rc
@@ -32,3 +32,7 @@
 	class hal
 	user root
 	group root
+
+on boot
+    wait /sys/kernel/boot_adsp/boot
+    restart android.thermal-hal
diff --git a/thermalConfig.cpp b/thermalConfig.cpp
index 0523656..c8c5a75 100644
--- a/thermalConfig.cpp
+++ b/thermalConfig.cpp
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2020,2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -764,6 +765,159 @@
 		},
 	};
 
+	std::vector<std::string> cpu_sensors_kalama =
+	{
+		"cpu-0-0",
+		"cpu-0-1",
+		"cpu-0-2",
+		"cpu-1-0",
+		"cpu-1-2",
+		"cpu-1-4",
+		"cpu-1-6",
+		"cpu-1-8",
+	};
+
+	std::vector<struct target_therm_cfg>  kalama_common = {
+		{
+			TemperatureType::CPU,
+			cpu_sensors_kalama,
+			"",
+			95000,
+			115000,
+			95000,
+			true,
+		},
+		{
+			TemperatureType::GPU,
+			{ "gpuss-0" },
+			"GPU0",
+			95000,
+			115000,
+			95000,
+			true,
+		},
+		{
+			TemperatureType::GPU,
+			{ "gpuss-1" },
+			"GPU1",
+			95000,
+			115000,
+			95000,
+			true,
+		},
+		{
+			TemperatureType::GPU,
+			{ "gpuss-2" },
+			"GPU2",
+			95000,
+			115000,
+			95000,
+			true,
+		},
+		{
+			TemperatureType::GPU,
+			{ "gpuss-3" },
+			"GPU3",
+			95000,
+			115000,
+			95000,
+			true,
+		},
+		{
+			TemperatureType::GPU,
+			{ "gpuss-4" },
+			"GPU4",
+			95000,
+			115000,
+			95000,
+			true,
+		},
+		{
+			TemperatureType::GPU,
+			{ "gpuss-5" },
+			"GPU5",
+			95000,
+			115000,
+			95000,
+			true,
+		},
+		{
+			TemperatureType::GPU,
+			{ "gpuss-6" },
+			"GPU6",
+			95000,
+			115000,
+			95000,
+			true,
+		},
+		{
+			TemperatureType::GPU,
+			{ "gpuss-7" },
+			"GPU7",
+			95000,
+			115000,
+			95000,
+			true,
+		},
+		{
+			TemperatureType::NPU,
+			{ "nspss-0" },
+			"nsp0",
+			95000,
+			115000,
+			95000,
+			true,
+		},
+		{
+			TemperatureType::NPU,
+			{ "nspss-1" },
+			"nsp1",
+			95000,
+			115000,
+			95000,
+			true,
+		},
+		{
+			TemperatureType::NPU,
+			{ "nspss-2" },
+			"nsp2",
+			95000,
+			115000,
+			95000,
+			true,
+		},
+		{
+			TemperatureType::NPU,
+			{ "nspss-3" },
+			"nsp3",
+			95000,
+			115000,
+			95000,
+			true,
+		},
+	};
+
+	std::vector<struct target_therm_cfg>  kalama_specific = {
+		{
+			TemperatureType::BCL_CURRENT,
+			{ "pm8550b-ibat-lvl0" },
+			"ibat",
+			9000,
+			10000,
+			9000,
+			true,
+		},
+		{
+			TemperatureType::SKIN,
+			{ "xo-therm" },
+			"skin",
+			55000,
+			95000,
+			55000,
+			true,
+		},
+	};
+
 	std::vector<struct target_therm_cfg>  diwali_specific = {
 		{
 			TemperatureType::BCL_CURRENT,
@@ -852,10 +1006,13 @@
 		{515, sensor_cfg_yupik}, // YUPIK-LTE
 		{457, waipio_common}, //Waipio
 		{482, waipio_common}, //Waipio
+		{552, waipio_common}, //Waipio-LTE
 		{506, waipio_common}, //diwali
 		{530, waipio_common}, // cape
 		{531, waipio_common}, // cape
 		{540, waipio_common}, // cape
+		{519, kalama_common}, //Kalama
+		{536, kalama_common}, //Kalamap
 	};
 
 	const std::unordered_map<int, std::vector<struct target_therm_cfg>>
@@ -869,10 +1026,13 @@
 		{450, shima_specific}, // shima
 		{457, waipio_specific}, //Waipio
 		{482, waipio_specific}, //Waipio
+		{552, waipio_specific}, //Waipio-LTE
 		{506, diwali_specific}, //diwali
 		{530, waipio_specific}, // cape
 		{531, waipio_specific}, // cape
 		{540, waipio_specific}, // cape
+		{519, kalama_specific}, //Kalama
+		{536, kalama_specific}, //Kalamap
 	};
 
 	std::vector<struct target_therm_cfg> add_target_config(