mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] MIPS: SGI-IP30: power off through the RTC
@ 2026-11-02  9:41 Imre Kaloz
  2026-11-02  9:41 ` [PATCH v2 1/2] MIPS: SGI-IP30: power off through the DS1687 RTC Imre Kaloz
  2026-11-02  9:41 ` [PATCH v2 2/2] MIPS: SGI-IP30: shut down cleanly on a power button press Imre Kaloz
  0 siblings, 2 replies; 4+ messages in thread
From: Imre Kaloz @ 2026-11-02  9:41 UTC (permalink / raw)
  To: Thomas Bogendoerfer; +Cc: linux-mips, linux-kernel, Lee Jones, mfd

The Octane's power supply is switched by its DS1687 RTC. Patch 1 uses
it for power-off and halt. Patch 2 turns a power button press into an
orderly power-off, and adds the hook to the IOC3 RTC platform data in
drivers/mfd/ioc3.c.

Both take effect only with CONFIG_RTC_DRV_DS1685_FAMILY=y, which
ip30_defconfig sets with "MIPS: SGI-IP30: fix the defconfig defaults
for the Bridge PROM and RTC" from the "MIPS: SGI fixes" series. They
build without it. Patch 2 drives the RTC with interrupts disabled, so
at run time it needs "rtc: ds1685: do not sleep in the power-off
handler" from the rtc-ds1685 v2 series sent to the RTC tree.

v1 was tested on an Octane with poweroff, one and two power button
presses, and a stalled shutdown.

Changes in v2:
- Patch 1: drop the device reference when the RTC has no driver data.
- Patch 2: only the first power-off drives the RTC and later callers
  wait for the power to drop; the 120 second timeout holds the device
  lock against an unbind of rtc-ds1685. The RTC's power-off message
  is printed from the power-off context, as the console thread cannot
  run once interrupts are off.

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

Imre Kaloz (2):
  MIPS: SGI-IP30: power off through the DS1687 RTC
  MIPS: SGI-IP30: shut down cleanly on a power button press

 arch/mips/include/asm/sgi/heart.h |  2 +
 arch/mips/sgi-ip30/ip30-power.c   | 94 +++++++++++++++++++++++++++++++
 drivers/mfd/ioc3.c                |  6 ++
 3 files changed, 102 insertions(+)


base-commit: 24a19b953e2a3d0ea5a8c4951a0ab8f32720c907
-- 
2.47.3


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

end of thread, other threads:[~2026-11-02 11:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-02  9:41 [PATCH v2 0/2] MIPS: SGI-IP30: power off through the RTC Imre Kaloz
2026-11-02  9:41 ` [PATCH v2 1/2] MIPS: SGI-IP30: power off through the DS1687 RTC Imre Kaloz
2026-11-02  9:41 ` [PATCH v2 2/2] MIPS: SGI-IP30: shut down cleanly on a power button press Imre Kaloz
     [not found]   ` <sashiko-outbox-193229@kernel.org>
2026-11-02 11:29     ` Imre Kaloz

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

all inboxes | Powered by JetHome®