From 74ec6378c5cca450b899d3cfd30fcec19a08d6fc Mon Sep 17 00:00:00 2001 From: Xu Xuehui Date: Wed, 3 Jul 2024 10:40:54 +0800 Subject: [PATCH] rtc: s35390a: Correct RTC alarm behavior to maintain 32KHz output When setting an RTC alarm, the S35390A_CMD_STATUS2 register will be set again, which unintentionally disables the 32KHz output, this commit adds the necessary configuration to set the S35390A_INT2_MODE_32K, ensuring that the 32KHz output remains enabled at all times. as a result of this change, the previous commit 7f151d91707581164ebdb053d520d67307ff2437 is no longer necessary. Signed-off-by: Xu Xuehui Change-Id: I8607899676bd624e00032eeca1a21a0658f3b71a --- drivers/rtc/rtc-s35390a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-s35390a.c b/drivers/rtc/rtc-s35390a.c index a3bc2003852d..fb0e0c36131c 100644 --- a/drivers/rtc/rtc-s35390a.c +++ b/drivers/rtc/rtc-s35390a.c @@ -344,7 +344,7 @@ static int s35390a_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) return err; if (alm->enabled) - sts = S35390A_INT2_MODE_ALARM; + sts = S35390A_INT2_MODE_ALARM | S35390A_INT2_MODE_32K; else sts = S35390A_INT2_MODE_NOINTR;