public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] firmware: exynos-acpm: allow use during system shutdown
@ 2025-03-24 15:34 André Draszik
  2025-03-24 15:34 ` [PATCH v2 1/2] firmware: exynos-acpm: use ktime APIs for timeout detection André Draszik
  2025-03-24 15:34 ` [PATCH v2 2/2] firmware: exynos-acpm: allow use during system shutdown André Draszik
  0 siblings, 2 replies; 9+ messages in thread
From: André Draszik @ 2025-03-24 15:34 UTC (permalink / raw)
  To: Tudor Ambarus, Krzysztof Kozlowski, Alim Akhtar
  Cc: Peter Griffin, Will McVicker, kernel-team, linux-kernel,
	linux-samsung-soc, linux-arm-kernel, André Draszik

One user of this ACPM driver is a PMIC driver that needs to communicate
with the PMIC during late system shutdown [1] and at that time we are
not allowed to sleep anymore.

This series address this by switching the code to using udelay() in the
specific case of system shutdown. This approach was inspired by I2C's
i2c_in_atomic_xfer_mode(), which has to deal with a similar corner
case.

Link: https://lore.kernel.org/all/20250323-s2mpg10-v1-29-d08943702707@linaro.org/ [1]

Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
Changes in v2:
- add missing ktime.h include
- switch to ktime_before() instead of !ktime_after()
- add link to user requiring this change to cover letter
- collect Tudor's Rb
- Link to v1: https://lore.kernel.org/r/20250321-acpm-atomic-v1-0-fb887bde7e61@linaro.org

---
André Draszik (2):
      firmware: exynos-acpm: use ktime APIs for timeout detection
      firmware: exynos-acpm: allow use during system shutdown

 drivers/firmware/samsung/exynos-acpm.c | 35 +++++++++++++++++++++++++---------
 1 file changed, 26 insertions(+), 9 deletions(-)
---
base-commit: 9388ec571cb1adba59d1cded2300eeb11827679c
change-id: 20250321-acpm-atomic-033775b051ef

Best regards,
-- 
André Draszik <andre.draszik@linaro.org>


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

end of thread, other threads:[~2025-03-26  9:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-24 15:34 [PATCH v2 0/2] firmware: exynos-acpm: allow use during system shutdown André Draszik
2025-03-24 15:34 ` [PATCH v2 1/2] firmware: exynos-acpm: use ktime APIs for timeout detection André Draszik
2025-03-24 15:34 ` [PATCH v2 2/2] firmware: exynos-acpm: allow use during system shutdown André Draszik
2025-03-25  7:57   ` Krzysztof Kozlowski
2025-03-25  8:01     ` André Draszik
2025-03-25  8:07       ` Krzysztof Kozlowski
2025-03-26  7:24         ` Tudor Ambarus
2025-03-26  7:36           ` Krzysztof Kozlowski
2025-03-26  9:15             ` André Draszik

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