rtc: rx8025: set date in a single i2c transaction
authorMathew McBride <matt@traverse.com.au>
Fri, 17 Sep 2021 06:46:03 +0000 (06:46 +0000)
committerTom Rini <trini@konsulko.com>
Sun, 3 Oct 2021 18:40:56 +0000 (14:40 -0400)
commit771fc0c0798a3c2f9d0c51cdf8f1f2eff90dbafb
tree6dc82ef31bcdc9742539723d52fb8a8a66d82236
parent9ca4ae2d2a7300e9d2bfdd0b818aacc854c7c617
rtc: rx8025: set date in a single i2c transaction

The RX8025/RX8035 does not like having it's time registers
set byte-by-byte in separate I2C transactions.

From the note at the top of the file, it appears
target-dependent workarounds have been used in the
past for this.

Resolve this by setting the time registers in a single
I2C transaction.

As part of this, also ensure the '24/12' flag in the RTC
is reset before writing the date (instead of after), otherwise
the RX8035 will clear the seconds and minutes registers.

Tested on Traverse Ten64 (NXP LS1088A) with RX8035.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
drivers/rtc/rx8025.c