diff options
| author | Ran Bi <[email protected]> | 2019-12-11 17:43:54 +0800 |
|---|---|---|
| committer | Alexandre Belloni <[email protected]> | 2019-12-11 13:22:54 +0100 |
| commit | 653997eeecef95c3ead4fba1b2d27e6a5854d6cd (patch) | |
| tree | 3212dfd04090fdf3c89ebabfdb097843f28b48ee /include/linux | |
| parent | 111bf02b8f544f98de53ea1f912ae01f598b161b (diff) | |
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: fc2979118f3f ("rtc: mediatek: Add MT6397 RTC driver")
Signed-off-by: Ran Bi <[email protected]>
Signed-off-by: Hsin-Hsiung Wang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexandre Belloni <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mfd/mt6397/rtc.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/mfd/mt6397/rtc.h b/include/linux/mfd/mt6397/rtc.h index f84b9163c0ee..7dfb63b81373 100644 --- a/include/linux/mfd/mt6397/rtc.h +++ b/include/linux/mfd/mt6397/rtc.h @@ -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) |