• Benoît Thébaudeau's avatar
    rtc: rv8803: Stop the clock while setting the time · d3700b6b
    Benoît Thébaudeau authored
    According to the application manual of the RX8900, the RESET bit must be
    set to 1 to prevent a timer update while setting the time. This also
    resets the subsecond counter. The application manual of the RV-8803 does
    not mention such a requirement, and it says that the 100th Seconds
    register is cleared when writing to the Seconds register, but using the
    RESET bit for the RV-8803 too should not be an issue and is probably
    safer.
    
    This change also ensures that the RESET bit is initialized properly in
    all cases. Indeed, all the registers must be initialized if the voltage
    has been lower than VLOW2 (triggering V2F), but not low enough to
    trigger a POR.
    Signed-off-by: default avatarBenoît Thébaudeau <benoit@wsystem.com>
    Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
    d3700b6b
rtc-rv8803.c 14.2 KB