Linux Hardware Monitor development
 help / color / mirror / Atom feed
* [PATCH v3 0/4] Add driver for NXP PCF8525 RTC
@ 2026-09-10  6:09 Shiv Prakash Gupta
  2026-09-10  6:09 ` [PATCH v3 1/4] dt-bindings: rtc: Add " Shiv Prakash Gupta
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Shiv Prakash Gupta @ 2026-09-10  6:09 UTC (permalink / raw)
  To: linux-kernel, linux-rtc, linux-hwmon, linux-watchdog, devicetree,
	alexandre.belloni, krzk+dt, robh, conor+dt, linux, wim
  Cc: vikash.bansal, priyanka.jain, lakshay.piplani, Shiv Prakash Gupta

The PCF8525 is an NXP I2C real-time clock with integrated crystal
oscillator, dual timestamp capture inputs, backup battery switch-over,
a windowed watchdog, and an on-chip temperature sensor.

This series adds:
  - DT binding (YAML schema)
  - Core RTC driver: timekeeping, alarms, dual timestamps, crystal
    configuration, backup switch-over, and clock offset correction
  - Watchdog support via the Linux watchdog framework
  - Temperature sensor support via the hwmon framework

Changes in v3:
- patch 2: protect the Write-0-to-Clear (W0C) status flags in the
  CTRL2/CTRL3 read-modify-write cycles so concurrently asserted
  interrupt events are not silently cleared
- patch 2: replace the timestamp spinlock with a mutex and re-read
  CTRL4 under it, closing the TOCTOU race between the threaded IRQ
  handler and the sysfs timestamp store
- patch 3: configure the nINTB/CLKOUT pin (CLKOE=0) before requesting
  the watchdog IRQ to avoid a spurious interrupt storm
- patch 3: add suspend/resume PM ops to stop and re-ping the watchdog
  across system sleep
- patch 3: add WDIOF_PRETIMEOUT so the watchdog core attaches a
  pretimeout governor
- patch 3: re-mask INTA/INTB interrupts on driver unbind via devm
  cleanup actions
- patch 4: enable TEMP_RD_EN before registering the hwmon device and
  add a devm cleanup to disable it on unbind

Changes in v2:
- Fix include: use <linux/pm_wakeirq.h> instead of <pm_wakeup.h>
- Add spinlock_t ts_lock to protect ts[]/ts_valid[] from IRQ/sysfs race
- Fix W0C ordering: clear AF/TSF flags before acting on alarm/timestamp
  events
- Use dev_pm_set_wake_irq() for suspend wakeup wiring
- Clear stale WDTF before unmasking watchdog interrupt on INTB to prevent
  boot loop when battery-backed flag persists across resets
- Add watchdog_notify_pretimeout() call in INTB IRQ handler
- Set WDOG_HW_RUNNING if bootloader left watchdog running at probe time
- Register hwmon device first, then enable PCF8525_CTRL5_TEMP_RD_EN only
  after successful registration

Shiv Prakash Gupta (4):
  dt-bindings: rtc: Add NXP PCF8525 RTC
  rtc: pcf8525: Add NXP PCF8525 RTC driver
  rtc: pcf8525: Add watchdog support
  rtc: pcf8525: Add temperature sensor support via hwmon

 .../devicetree/bindings/rtc/nxp,pcf8525.yaml  |   86 +
 drivers/rtc/Kconfig                           |   26 +
 drivers/rtc/Makefile                          |    1 +
 drivers/rtc/rtc-pcf8525.c                     | 1600 +++++++++++++++++
 4 files changed, 1713 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/nxp,pcf8525.yaml
 create mode 100644 drivers/rtc/rtc-pcf8525.c

-- 
2.34.1


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

end of thread, other threads:[~2026-09-10  6:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-10  6:09 [PATCH v3 0/4] Add driver for NXP PCF8525 RTC Shiv Prakash Gupta
2026-09-10  6:09 ` [PATCH v3 1/4] dt-bindings: rtc: Add " Shiv Prakash Gupta
2026-09-10  6:16   ` sashiko-bot
2026-09-10  6:09 ` [PATCH v3 2/4] rtc: pcf8525: Add NXP PCF8525 RTC driver Shiv Prakash Gupta
2026-09-10  6:24   ` sashiko-bot
2026-09-10  6:09 ` [PATCH v3 3/4] rtc: pcf8525: Add watchdog support Shiv Prakash Gupta
2026-09-10  6:24   ` sashiko-bot
2026-09-10  6:09 ` [PATCH v3 4/4] rtc: pcf8525: Add temperature sensor support via hwmon Shiv Prakash Gupta
2026-09-10  6:20   ` sashiko-bot

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