Skip to content

Commit 18e5326

Browse files
M-Vaittinengregkh
authored andcommitted
mfd: bd70528: Fix hour register mask
commit 6c88347 upstream. When RTC is used in 24H mode (and it is by this driver) the maximum hour value is 24 in BCD. This occupies bits [5:0] - which means correct mask for HOUR register is 0x3f not 0x1f. Fix the mask Fixes: 32a4a4e ("rtc: bd70528: Initial support for ROHM bd70528 RTC") Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent bab4dff commit 18e5326

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎include/linux/mfd/rohm-bd70528.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ enum {
317317
#define BD70528_MASK_RTC_MINUTE 0x7f
318318
#define BD70528_MASK_RTC_HOUR_24H 0x80
319319
#define BD70528_MASK_RTC_HOUR_PM 0x20
320-
#define BD70528_MASK_RTC_HOUR 0x1f
320+
#define BD70528_MASK_RTC_HOUR 0x3f
321321
#define BD70528_MASK_RTC_DAY 0x3f
322322
#define BD70528_MASK_RTC_WEEK 0x07
323323
#define BD70528_MASK_RTC_MONTH 0x1f

0 commit comments

Comments
 (0)