From 2d14c680e92f09d18b984cd1a8fae437f9ebc2ab Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Draszik?= Date: Tue, 25 Mar 2025 09:46:08 +0000 Subject: [PATCH] firmware: exynos-acpm: allow use during system shutdown MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We need to access the PMIC during late system shutdown and at that time we are not allowed to sleep anymore. To make this case work, and since we can't detect this case in a non-racy way, switch to using udelay() unconditionally, instead of usleep_range(). Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250325-acpm-atomic-v3-2-c66aae7df925@linaro.org Signed-off-by: Krzysztof Kozlowski --- drivers/firmware/samsung/exynos-acpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/samsung/exynos-acpm.c b/drivers/firmware/samsung/exynos-acpm.c index 542eaff03f9e..379da420b9eb 100644 --- a/drivers/firmware/samsung/exynos-acpm.c +++ b/drivers/firmware/samsung/exynos-acpm.c @@ -300,7 +300,7 @@ static int acpm_dequeue_by_polling(struct acpm_chan *achan, return 0; /* Determined experimentally. */ - usleep_range(20, 30); + udelay(20); } while (ktime_before(ktime_get(), timeout)); dev_err(dev, "Timeout! ch:%u s:%u bitmap:%lx.\n", -- 2.50.1