rtc: mt6397: fix alarm register overwrite
Alarm registers high byte was reserved for other functions.
This add mask in alarm registers operation functions.
This also fix error condition in interrupt handler.
Fixes: fc2979118f
("rtc: mediatek: Add MT6397 RTC driver")
Signed-off-by: Ran Bi <ran.bi@mediatek.com>
Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
Link: https://lore.kernel.org/r/1576057435-3561-6-git-send-email-hsin-hsiung.wang@mediatek.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:

committed by
Alexandre Belloni

parent
111bf02b8f
commit
653997eeec
@@ -46,6 +46,14 @@
|
||||
|
||||
#define RTC_AL_SEC 0x0018
|
||||
|
||||
#define RTC_AL_SEC_MASK 0x003f
|
||||
#define RTC_AL_MIN_MASK 0x003f
|
||||
#define RTC_AL_HOU_MASK 0x001f
|
||||
#define RTC_AL_DOM_MASK 0x001f
|
||||
#define RTC_AL_DOW_MASK 0x0007
|
||||
#define RTC_AL_MTH_MASK 0x000f
|
||||
#define RTC_AL_YEA_MASK 0x007f
|
||||
|
||||
#define RTC_PDN2 0x002e
|
||||
#define RTC_PDN2_PWRON_ALARM BIT(4)
|
||||
|
||||
|
Reference in New Issue
Block a user