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/thermalUtilsNetlink.h b/thermalUtilsNetlink.h
index 8900c9f..bee0fbc 100644
--- a/thermalUtilsNetlink.h
+++ b/thermalUtilsNetlink.h
@@ -31,7 +31,7 @@
/* Changes from Qualcomm Innovation Center are provided under the following license:
-Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+Copyright (c) 2023, 2025 Qualcomm Innovation Center, Inc. All rights reserved.
SPDX-License-Identifier: BSD-3-Clause-Clear */
#ifndef THERMAL_THERMAL_UTILS_H__
@@ -56,10 +56,8 @@
public:
ThermalUtils(const ueventCB &inp_cb);
~ThermalUtils() = default;
- bool isSensorInitialized()
- {
- return is_sensor_init;
- };
+ bool isSensorInitialized();
+ bool isSensorInitialized(TemperatureType type);
bool isCdevInitialized()
{
return is_cdev_init;
@@ -74,7 +72,6 @@
int readCdevStates(cdevType type,
std::vector<CoolingDevice>& cdev);
private:
- bool is_sensor_init;
bool is_cdev_init;
ThermalConfig cfg;
ThermalCommon cmnInst;