Commit a7464a0
drivers: rtc: rv3028: explicitly init control registers
The driver on init currently only updates control register bits that
differ from their reset values, implicitly assuming that all other
bits are still in their default state.
This assumption can break if the registers were previously modified,
e.g. 12-hour mode was selected, leading to invalid time readings
such as 32:57:12 from rtc_get_time().
Fix this by explicitly programming all control register fields
to the configuration expected by the driver, instead of relying
on the hardware reset state.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>1 parent f91c8a4 commit a7464a0
1 file changed
Lines changed: 3 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
954 | 954 | | |
955 | 955 | | |
956 | 956 | | |
957 | | - | |
958 | | - | |
| 957 | + | |
959 | 958 | | |
960 | 959 | | |
961 | 960 | | |
962 | 961 | | |
963 | | - | |
964 | | - | |
965 | | - | |
966 | | - | |
967 | | - | |
| 962 | + | |
| 963 | + | |
968 | 964 | | |
969 | 965 | | |
970 | 966 | | |
| |||
0 commit comments