summaryrefslogtreecommitdiff
path: root/thermalCommon.cpp
AgeCommit message (Collapse)Author
2023-05-07thermal_hal: Add support to handle CPUs with non-sequential core_idsGopala Krishna Nuthaki
Some targets support to have only selected cpu cores enabled and in such cases, cpu ids will be in non-sequencial order. Update logic to maintain cpu list with cpu counter instead of cpu_id as list index. Change-Id: If249f1ee0d0e8f5f0a2240c22b4fcfb136be4026 Signed-off-by: Gopala Krishna Nuthaki <quic_gnuthaki@quicinc.com> Signed-off-by: chrisl7 <wandersonrodriguesf1@gmail.com>
2023-03-09thermal-hal: Add fan cdev type thermal hal support for Anorakcongying
Add fan cooling device type thermal hal support for Anorak.
2023-03-09thermal-hal: add support for severity in HAL config for throttling thresholdPriyansh Jain
Add support to selectively configure thermal HAL severity for throttling threshold for any HAL config. Signed-off-by: Priyansh Jain <quic_priyjain@quicinc.com>
2022-04-05thermal-hal: update hal gpu cooling device listManaf Meethalavalappu Pallikunhi
Update gpu cooling device in hal supported cooling devices based on latest kernel cooling devices. Change-Id: Ifdd9b5917cbb1b8f86011673c8973963ed5e663f
2022-02-25thermal-hal: update hal cooling device listManaf Meethalavalappu Pallikunhi
Update different hal supported cooling devices based on latest kernel cooling devices. Change-Id: I1b2560959c019683b1abe4d28d08ff1c0a23cdb1
2021-07-29thermal-hal: Add exception handling for stoiRam Chandrasekar
stoi can throw exception when an invalid value is passed in buffer. Enable exception handling and add retry mechanism when a exception is thrown. Change-Id: I2c1e0ddbbb408cb6b9739b516296125ec1efd64a
2021-04-26thermal-hal: Add support for new thermal HAl v2 binaryRam Chandrasekar
Add support for new thermal HAL v2 binary, which can listen to the thermal framework netlink messages instead of the uevents sent by the userspace governor. This new binary should be selected only for the kernel version supporting the new netlink messages in thermal framework. Change-Id: I31cdb93fb73d59ff3eb94eb76d6e42b3448c3ee9
2020-12-28thermal-hal: Notify clients when they read temperatureRam Chandrasekar
Certain sensors like thermistor's, can read temperature higher than the threshold even before a threshold violation uevent. This is because certain thermistor's use comparator's to trigger threshold violation independent of the ADC used to read the temperature. In those corner case, thermal HAL can update the severity when a client is reading a temperature and not notify them. So when an actual uevent occurs, client notification will be skipped, because the severity wouldn't have changed. Update HAL to notify clients when the read temperature API see's the threshold violation first before the uevent. Change-Id: I30248b1364909a74b362fa732041c3f96917952c
2020-11-18thermal-hal: Update the common data object with the statusRam Chandrasekar
thermal-hal has a hash map storing all the sensor instances. Use the same instance to read and update the temperature, update the severity and determine the next threshold based on severity. Not using the same instance can lead to a situation where the information is updated in the local copy rather than in the global copy in the hash map. Also change the return signature of the estimateseverity function to return the new severity value if it is changed. Otherwise it will return -1. This provided a mechanism for the caller's to know if there is any change in severity for that sensor. Change-Id: I34c2a271b505fea969db6f4a04321e63c0181ea7
2020-09-17thermal-hal: update stoi argumentRam Chandrasekar
Thermal sensor reading and cooling device state information are always decimal and the default stoi assumes them as decimal base. Remove the input argument of base zero to stoi, since the value of the input is always fixed. Change-Id: I29c2ab1de94a1413a43d5355ee08164da0abbca8
2020-08-31thermal-hal: Use correct threshold severity indexRam Chandrasekar
Use the correct threshold severity Index when populating and retrieving the threshold. Change-Id: Ifec69778e69d9d480018782ee446a12ab5089a10
2020-08-27thermal-hal: Return empty vector when a sensor is not supportedRam Chandrasekar
Right now the thermal HAL will return a temperature, temperature threshold and cooling device entry with a NAN value for a sensor that is not supported. This will break the VTS test case, which expects an empty vector in that case. Change the thermal HAL to return empty vector in case the sensor is not supported. Also populate the thresholds value for CPU, GPU, Battery and skin sensors for the V1.0 getTemperature API. Make sure that the threshold values are also read in degree celsius. Change-Id: I82ab1e9dd9672f1b93760e93b55e8943fc5acce0
2020-08-06thermal-hal: Re-size cpu usage vector based on cpu countRam Chandrasekar
Re-size cpu usage vector to cpu count size before filling in the data. This will ensure that sufficient memory is allocated before populating the data. Change-Id: I7a1d109cf3ec8403ca61beed9a9eab4287a3d33c
2020-07-09thermal-hal: Add support for HAL2.0Ram Chandrasekar
Add support for thermal HAL 2.0 interfaces. Also add support for HAL 1.0 interfaces to be backward compatible. Change-Id: Ib0be008605db2751bda21f537ea694b3f9849800