imx.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] thermal/drivers/imx_sc_thermal: return -EAGAIN when SCFW turn off resource
@ 2023-07-12 21:05 Frank Li
  2023-07-13 12:49 ` Daniel Lezcano
  0 siblings, 1 reply; 12+ messages in thread
From: Frank Li @ 2023-07-12 21:05 UTC (permalink / raw)
  To: Rafael J. Wysocki, Daniel Lezcano, Amit Kucheria, Zhang Rui,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, open list:THERMAL,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	open list
  Cc: imx

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@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


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-08-17 21:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-12 21:05 [PATCH 1/1] thermal/drivers/imx_sc_thermal: return -EAGAIN when SCFW turn off resource Frank Li
2023-07-13 12:49 ` Daniel Lezcano
2023-07-14 17:19   ` Frank Li
2023-08-16  8:44     ` Daniel Lezcano
2023-08-16 16:28       ` Frank Li
2023-08-16 16:47         ` Daniel Lezcano
2023-08-16 17:07           ` Frank Li
2023-08-16 20:45             ` Daniel Lezcano
2023-08-16 21:23               ` Ulf Hansson
2023-08-17 15:22                 ` Daniel Lezcano
2023-08-17 15:30                 ` Frank Li
2023-08-17 21:40                   ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).