[PATCH 1/1] thermal/drivers/imx_sc_thermal: return -EAGAIN when SCFW turn off resource
Frank Li
Frank.Li at nxp.com
Wed Jul 12 14:05:04 PDT 2023
Avoid endless print following message when SCFW turns off resource.
[ 1818.342337] thermal thermal_zone0: failed to read out thermal zone (-1)
Signed-off-by: Frank Li <Frank.Li at nxp.com>
---
drivers/thermal/imx_sc_thermal.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/thermal/imx_sc_thermal.c b/drivers/thermal/imx_sc_thermal.c
index 8d6b4ef23746..0533d58f199f 100644
--- a/drivers/thermal/imx_sc_thermal.c
+++ b/drivers/thermal/imx_sc_thermal.c
@@ -58,7 +58,9 @@ static int imx_sc_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
hdr->size = 2;
ret = imx_scu_call_rpc(thermal_ipc_handle, &msg, true);
- if (ret)
+ if (ret == -EPERM) /* NO POWER */
+ return -EAGAIN;
+ else if (ret)
return ret;
*temp = msg.data.resp.celsius * 1000 + msg.data.resp.tenths * 100;
--
2.34.1
More information about the linux-arm-kernel
mailing list