rtc: pcf2127: adapt time/date registers write sequence for PCF2131
authorHugo Villeneuve <hvilleneuve@dimonoff.com>
Thu, 22 Jun 2023 14:57:56 +0000 (10:57 -0400)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 27 Jul 2023 20:54:52 +0000 (22:54 +0200)
commit3d715ebaf006bd5a495e9a717cf0fc5c260ee738
tree42cb3bd90b69b602012e84eb49c408a12ad6f03f
parente1849b8fcdfaa71f2e8f9376c9568877ff2bf52b
rtc: pcf2127: adapt time/date registers write sequence for PCF2131

The sequence for updating the time/date registers is slightly
different between PCF2127/29 and PCF2131.

For PCF2127/29, during write operations, the time counting
circuits (memory locations 03h through 09h) are automatically blocked.

For PCF2131, time/date registers write access requires setting the
STOP bit and sending the clear prescaler instruction (CPR). STOP then
needs to be released once write operation is completed.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://lore.kernel.org/r/20230622145800.2442116-14-hugo@hugovil.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-pcf2127.c