]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
drivers: rtc: max313xx: Add delay after setting date
authorBen Hoelker <ben.hoelker@alliedtelesis.co.nz>
Sun, 17 Aug 2025 22:30:00 +0000 (10:30 +1200)
committerTom Rini <trini@konsulko.com>
Tue, 9 Sep 2025 16:30:41 +0000 (10:30 -0600)
The MAX31331 was not correctly updating the seconds when
setting the time and would return the seconds previously set.

Like the MAX31343, a delay needs to be added after setting the
time. Wait one second after writing so that the date command shows the
correct time.

Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Bruce Adams <bruce.adams@alliedtelesis.co.nz>
Signed-off-by: Ben Hoelker <ben.hoelker@alliedtelesis.co.nz>
drivers/rtc/max313xx.c

index 2cb3f2450412a97251eb9252f29139176895fb57..f0d38b10c97520021474369f2e52c39f59125ea4 100644 (file)
@@ -308,6 +308,7 @@ static int max313xx_set_time(struct udevice *dev, const struct rtc_time *t)
                        return ret;
 
                break;
+       case ID_MAX31331:
        case ID_MAX31343:
                /* Time is not updated for 1 second after writing */
                /* Sleep here so the date command shows the new time */