thermal-hal: Return failure only for uninitialized sensor request
The thermal hal checks for all configured sensors are initialized
or not. If any of the sensors in config is not initialized or failed
to initialize, it returns failure immediately for all sensors
temperature related HAL API request.
Change-Id: I3f06fa74262dcf22268d265725baee69520696aa
(cherry picked from commit 947b8a06cddc33c1fbc5e8408ef0ffb08a8f18b3)
Signed-off-by: Priyansh Jain <quic_priyjain@quicinc.com>
diff --git a/thermalCommon.h b/thermalCommon.h
index ef96179..9488afe 100644
--- a/thermalCommon.h
+++ b/thermalCommon.h
@@ -47,6 +47,7 @@
int readFromFile(std::string_view path, std::string& out);
int initThermalZones(std::vector<struct target_therm_cfg>& cfg);
+ int initNewThermalZone(struct target_therm_cfg& cfg);
void initThreshold(struct therm_sensor& sens);
int initCdev();