linux/drivers/thermal/qcom
Ansuel Smith d012f9189f thermal/drivers/tsens: Add timeout to get_temp_tsens_valid
The function can loop and lock the system if for whatever reason the bit
for the target sensor is NEVER valid. This is the case if a sensor is
disabled by the factory and the valid bit is never reported as actually
valid. Add a timeout check and exit if a timeout occurs. As this is
a very rare condition, handle the timeout only if the first read fails.
While at it also rework the function to improve readability and convert
to poll_timeout generic macro.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211007172859.583-1-ansuelsmth@gmail.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2021-10-16 20:24:43 +02:00
..
Kconfig thermal/drivers/qcom/lmh: make QCOM_LMH depends on QCOM_SCM 2021-10-16 20:20:42 +02:00
lmh.c thermal/drivers/qcom: Add support for LMh driver 2021-08-18 09:32:25 +02:00
Makefile thermal/drivers/qcom: Add support for LMh driver 2021-08-18 09:32:25 +02:00
qcom-spmi-adc-tm5.c thermal/drivers/qcom/spmi-adc-tm5: Add support for HC variant 2021-10-15 09:13:55 +02:00
qcom-spmi-temp-alarm.c thermal/drivers/qcom-spmi-temp-alarm: Add support for GEN2 rev 1 PMIC peripherals 2021-04-15 13:21:42 +02:00
tsens-8960.c thermal/drivers/tsens: Drop unused define for msm8960 2021-04-22 14:10:08 +02:00
tsens-v0_1.c thermal/drivers/qcom/tsens-v0_1: Add support for MDM9607 2021-04-20 08:58:42 +02:00
tsens-v1.c thermal/drivers/qcom/tsens_v1: Enable sensor 3 on MSM8976 2021-03-17 20:08:30 +01:00
tsens-v2.c drivers: thermal: tsens: Add watchdog support 2020-03-20 12:17:48 +01:00
tsens.c thermal/drivers/tsens: Add timeout to get_temp_tsens_valid 2021-10-16 20:24:43 +02:00
tsens.h thermal/drivers/tsens: Add VER_0 tsens version 2021-04-22 14:09:14 +02:00