All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] rtc: ds1685: power-off fixes
@ 2026-10-13 12:02 Imre Kaloz
  2026-10-13 12:02 ` [PATCH v2 1/3] rtc: ds1685: arm the wake-up alarm at power-off only if an alarm is set Imre Kaloz
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Imre Kaloz @ 2026-10-13 12:02 UTC (permalink / raw)
  To: Alexandre Belloni; +Cc: Joshua Kinard, linux-rtc, linux-kernel

Three fixes for ds1685_rtc_poweroff(), on SGI O2 and Octane machines.

Patch 1 arms the wake-up alarm only if an alarm is set, so that stale
alarm registers no longer power the machine back on.

Patch 2 replaces the sleep before the PAB write with a busy wait, as
power-off handlers must not sleep.

Patch 3 repeats the PAB write, clearing the kickstart and wake-up
flags with it, until power is removed.

Patch 1 was tested on an O2, and the whole series on an Octane.

Changes in v2:
- New patch 2: use mdelay() instead of msleep() before the PAB write.
- Patch 3 (v1 patch 2): use mdelay() instead of msleep() in the
  repeat loop.

v1: https://lore.kernel.org/all/20261013094930.574-1-kaloz@kernel.org/

Imre Kaloz (3):
  rtc: ds1685: arm the wake-up alarm at power-off only if an alarm is
    set
  rtc: ds1685: do not sleep in the power-off handler
  rtc: ds1685: keep setting PAB until power is removed

 drivers/rtc/rtc-ds1685.c | 40 ++++++++++++++++++++++++++--------------
 1 file changed, 26 insertions(+), 14 deletions(-)


base-commit: 24a19b953e2a3d0ea5a8c4951a0ab8f32720c907
-- 
2.47.3


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

end of thread, other threads:[~2026-10-13 12:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-13 12:02 [PATCH v2 0/3] rtc: ds1685: power-off fixes Imre Kaloz
2026-10-13 12:02 ` [PATCH v2 1/3] rtc: ds1685: arm the wake-up alarm at power-off only if an alarm is set Imre Kaloz
2026-10-13 12:15   ` sashiko-bot
2026-10-13 12:02 ` [PATCH v2 2/3] rtc: ds1685: do not sleep in the power-off handler Imre Kaloz
2026-10-13 12:24   ` sashiko-bot
2026-10-13 12:02 ` [PATCH v2 3/3] rtc: ds1685: keep setting PAB until power is removed Imre Kaloz
2026-10-13 12:30   ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.