Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH] thermal: armada: replace msleep with usleep_range for short durations
@ 2026-05-11 15:37 Mayur Kumar
  0 siblings, 0 replies; only message in thread
From: Mayur Kumar @ 2026-05-11 15:37 UTC (permalink / raw)
  To: miquel.raynal, rafael, daniel.lezcano, rui.zhang, lukasz.luba
  Cc: linux-pm, linux-kernel, Mayur Kumar

The checkpatch tool warns that msleep(10) can sleep for up to 20ms.
According to Documentation/timers/timers-howto.rst, usleep_range()
should be used for delays between 1ms and 20ms to provide better
timing accuracy.

Replace the 10ms msleep with a 10ms-11ms usleep_range.

Signed-off-by: Mayur Kumar <kmayur809@gmail.com>
---
 drivers/thermal/armada_thermal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index c2fbdb534f6..96965f393b4 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -178,7 +178,7 @@ static void armada370_init(struct platform_device *pdev,
 
 	regmap_write(priv->syscon, data->syscon_control1_off, reg);
 
-	msleep(10);
+	usleep_range(10000, 11000);
 }
 
 static void armada375_init(struct platform_device *pdev,
-- 
2.34.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-11 15:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-11 15:37 [PATCH] thermal: armada: replace msleep with usleep_range for short durations Mayur Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox