Linux RTC
 help / color / mirror / Atom feed
* [PATCH v3 0/4] rtc: pcf85063: Update interrupt support
@ 2026-08-28 16:44 A. Sverdlin
  2026-08-28 16:44 ` [PATCH v3 1/4] rtc: pcf85063: use devm_of_clk_add_hw_provider() for clkout A. Sverdlin
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: A. Sverdlin @ 2026-08-28 16:44 UTC (permalink / raw)
  To: linux-rtc; +Cc: Alexander Sverdlin, Alexandre Belloni, linux-kernel

From: Alexander Sverdlin <alexander.sverdlin@siemens.com>

Add hardware-backed UIE (1 Hz update interrupt) support to the pcf85063
driver. The PCF85063A/RV8263 have no dedicated update-interrupt source,
so chrony and similar tools that rely on RTC_UIE_ON fall back to the
kernel's software polling emulation. This series repurposes the chip's
countdown timer (TCF = 1 Hz, T = 1) to generate a periodic interrupt on
the INT pin, serving UIE entirely in hardware.

Patches 2-3 are preparatory: they fix an AIE race in the interrupt
handler and a lost-alarm-flag race in the clkout helpers.

Patch 1 fixes a pre-existing use-after-free in the clkout clock provider
on unbind, found during review by Sashiko.

Changelog:
v3:
- split into 3 preparatory patches and the final new feature patch
- replaced racy regmap_write() with regmap_update_bits() in IRQ handler
- the timer flag (TF) is write-0-to-clear, so every read-modify-write of
  CTRL2 preserves it by writing it back as 1
v2:
- https://lore.kernel.org/all/20260820112437.3715237-1-alexander.sverdlin@siemens.com/

Alexander Sverdlin (4):
  rtc: pcf85063: use devm_of_clk_add_hw_provider() for clkout
  rtc: pcf85063: do not clear AIE in the interrupt handler
  rtc: pcf85063: preserve the alarm flag in clkout register updates
  rtc: pcf85063: add 1 Hz update interrupt (UIE) support

 drivers/rtc/rtc-pcf85063.c | 139 +++++++++++++++++++++++++++++++------
 1 file changed, 118 insertions(+), 21 deletions(-)

-- 
2.55.0


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

end of thread, other threads:[~2026-08-28 17:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-28 16:44 [PATCH v3 0/4] rtc: pcf85063: Update interrupt support A. Sverdlin
2026-08-28 16:44 ` [PATCH v3 1/4] rtc: pcf85063: use devm_of_clk_add_hw_provider() for clkout A. Sverdlin
2026-08-28 16:51   ` sashiko-bot
2026-08-28 16:44 ` [PATCH v3 2/4] rtc: pcf85063: do not clear AIE in the interrupt handler A. Sverdlin
2026-08-28 17:05   ` sashiko-bot
2026-08-28 16:44 ` [PATCH v3 3/4] rtc: pcf85063: preserve the alarm flag in clkout register updates A. Sverdlin
2026-08-28 16:58   ` sashiko-bot
2026-08-28 17:21     ` Sverdlin, Alexander
2026-08-28 16:44 ` [PATCH v3 4/4] rtc: pcf85063: add 1 Hz update interrupt (UIE) support A. Sverdlin
2026-08-28 17:00   ` sashiko-bot

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