mbox series

[v4,0/2] rtc-pm8xxx: fix rtc alarm which fired before driver probe not be cleard

Message ID 20240401-fix-rtc-alarm-which-fired-before-driver-probe-not-be-cleard-v1-0-aab2cd6ddab8@quicinc.com (mailing list archive)
Headers show
Series rtc-pm8xxx: fix rtc alarm which fired before driver probe not be cleard | expand

Message

jianbin zhang April 1, 2024, 1:56 a.m. UTC
Hi maintainers,

In this v4 patch series include following:
- Fix the issue that rtc alarm interrupt triggered befor driver probe is not cleared
- Correct the value written into PM8xxx_RTC_ALARM_CLEAR register in trigger function

Regarding the issue "Fix the issue that rtc alarm interrupt triggered befor driver probe is not cleared":
- Issue describtion as following
  If the alarm is triggered before the driver gets probed, the alarm interrupt
  will be missed and it won't be detected, and the stale alarm settings will
  be still retained because of not being cleared.
- Issue reproduce step:
  (1) set the alarm and poweroff the device
  (2) alarm happens and the device boots
  (3) poweroff the device again
  (4) alarm irq not be cleard, device boots again

Regarding "Correct the value written into PM8xxx_RTC_ALARM_CLEAR"
- Writing 1 to the register is expected to clear the fired alarm
 register. In patch v2, the value written to the register in the
 trigger function is incorrectly written as 0. So correct the value
 to 1.

Signed-off-by: jianbin zhang <quic_jianbinz@quicinc.com>
---
jianbin zhang (2):
      rtc-pm8xxx: clear the triggered alarm interrupt during driver probe
      rtc-pm8xxx: Correct the value written into the PM8xxx_RTC_ALARM_CLEAR

 drivers/rtc/rtc-pm8xxx.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
base-commit: 317c7bc0ef035d8ebfc3e55c5dde0566fd5fb171
change-id: 20240329-fix-rtc-alarm-which-fired-before-driver-probe-not-be-cleard-07c2180e5507

Best regards,