[PATCH v2 0/5] rtc: Enhance RTC driver with BBPU bit definitions and shutdown handling

ot_shunxi.zhang at mediatek.com ot_shunxi.zhang at mediatek.com
Thu Nov 20 04:17:56 PST 2025


From: Shunxi Zhang <ot_shunxi.zhang at mediatek.com>

(1) Add new bits definitions for RTC_BBPU register.
(2) Add new functions to reset the BBPU alarm status in mt6397 RTC driver
(3) Add mtk_rtc_shutdown function to handle RTC shutdown events.
(4) For the V1 version comments, the following modifications are made: 
(4.1)the formatting changes are separated into a distinct patch. 
(4.2)Since the rtc-mt6397.c file is a fusion of multiple RTC drivers 
for the mt6358, mt6359, and mt6357 RTCs, the definitions of certain bits 
in the RTC_BBPU register differ among these RTCs. The mt6359 supports 
the alarm status bit, while both mt6358 and mt6357 do not. Therefore, 
the alarm-sta-supported property is added in the mt6359.dtsi file to 
differentiate between the different RTCs. 
(4.3)Additionally, the operation to disable IRQ in the shutdown function 
is removed.

Shunxi Zhang (5):
  mfd: mt6397: Fix formatting of RTC_BBPU_KEY definition
  mfd: mt6397: Add bit definitions and struct members to support alarm
    status
  rtc: mt6397: Fix formatting of platform driver structure
  rtc: mt6397: Add BBPU alarm status reset and shutdown handling
  arm64: dts: mediatek: mt6359: Add alarm-sta-supported property to RTC
    node

 arch/arm64/boot/dts/mediatek/mt6359.dtsi |  1 +
 drivers/rtc/rtc-mt6397.c                 | 32 +++++++++++++++++++++++-
 include/linux/mfd/mt6397/rtc.h           |  5 +++-
 3 files changed, 36 insertions(+), 2 deletions(-)

-- 
2.45.2




More information about the Linux-mediatek mailing list