linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rtc: sc27xx: Remove clearing SPRD_RTC_POWEROFF_ALM_FLAG flag
@ 2019-09-05  7:03 Baolin Wang
  2019-09-10 14:15 ` Alexandre Belloni
  0 siblings, 1 reply; 2+ messages in thread
From: Baolin Wang @ 2019-09-05  7:03 UTC (permalink / raw)
  To: a.zummo, alexandre.belloni; +Cc: linux-rtc, linux-kernel, baolin.wang

The SPRD_RTC_POWEROFF_ALM_FLAG flag is used to indicate if a poweroff alarm
is set, which can power on the system when system in power-off status.

And the bootloader will validate this flag to check if the booting mode is
alarm booting mode, thus we should not clear this flag in kernel, instead
bootloader will clear this flag after checking the booting mode.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
---
 drivers/rtc/rtc-sc27xx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-sc27xx.c b/drivers/rtc/rtc-sc27xx.c
index b4eb3b3..46646aa 100644
--- a/drivers/rtc/rtc-sc27xx.c
+++ b/drivers/rtc/rtc-sc27xx.c
@@ -138,7 +138,7 @@ static int sprd_rtc_lock_alarm(struct sprd_rtc *rtc, bool lock)
 	if (ret)
 		return ret;
 
-	val &= ~(SPRD_RTC_ALMLOCK_MASK | SPRD_RTC_POWEROFF_ALM_FLAG);
+	val &= ~SPRD_RTC_ALMLOCK_MASK;
 	if (lock)
 		val |= SPRD_RTC_ALM_LOCK;
 	else
-- 
1.7.9.5


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

* Re: [PATCH] rtc: sc27xx: Remove clearing SPRD_RTC_POWEROFF_ALM_FLAG flag
  2019-09-05  7:03 [PATCH] rtc: sc27xx: Remove clearing SPRD_RTC_POWEROFF_ALM_FLAG flag Baolin Wang
@ 2019-09-10 14:15 ` Alexandre Belloni
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2019-09-10 14:15 UTC (permalink / raw)
  To: Baolin Wang; +Cc: a.zummo, linux-rtc, linux-kernel

On 05/09/2019 15:03:30+0800, Baolin Wang wrote:
> The SPRD_RTC_POWEROFF_ALM_FLAG flag is used to indicate if a poweroff alarm
> is set, which can power on the system when system in power-off status.
> 
> And the bootloader will validate this flag to check if the booting mode is
> alarm booting mode, thus we should not clear this flag in kernel, instead
> bootloader will clear this flag after checking the booting mode.
> 
> Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
> ---
>  drivers/rtc/rtc-sc27xx.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
Applied, thanks.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

end of thread, other threads:[~2019-09-10 14:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-05  7:03 [PATCH] rtc: sc27xx: Remove clearing SPRD_RTC_POWEROFF_ALM_FLAG flag Baolin Wang
2019-09-10 14:15 ` Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).