summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>2021-05-26 14:52:01 +0800
committerLee Jones <lee.jones@linaro.org>2021-06-01 16:44:09 +0100
commitbe60652f0260c2f371670ec90f1ac55e2671f793 (patch)
treefe08b3ad7d1e3c18d21ac092e19be0956c1d5d9b /drivers
parentd8570c182f56ca52c98734732fb9a331f7c23f9a (diff)
rtc: mt6397: refine RTC_TC_MTH
This patch adds RTC_TC_MTH_MASK to support new chips. Signed-off-by: Yuchen Huang <yuchen.huang@mediatek.com> Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/rtc/rtc-mt6397.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-mt6397.c b/drivers/rtc/rtc-mt6397.c
index 6655035e5164..80dc479a6ff0 100644
--- a/drivers/rtc/rtc-mt6397.c
+++ b/drivers/rtc/rtc-mt6397.c
@@ -75,7 +75,7 @@ static int __mtk_rtc_read_time(struct mt6397_rtc *rtc,
tm->tm_min = data[RTC_OFFSET_MIN];
tm->tm_hour = data[RTC_OFFSET_HOUR];
tm->tm_mday = data[RTC_OFFSET_DOM];
- tm->tm_mon = data[RTC_OFFSET_MTH];
+ tm->tm_mon = data[RTC_OFFSET_MTH] & RTC_TC_MTH_MASK;
tm->tm_year = data[RTC_OFFSET_YEAR];
ret = regmap_read(rtc->regmap, rtc->addr_base + RTC_TC_SEC, sec);