mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-19 03:15:00 +00:00
drivers: rtc: max313xx: Ensure correct date is read after setting
When setting the time on the MAX31343, the time is not updated for one second, and reading the time in this interval will give the old time. Wait one second after writing so that the date command will show the correct time when setting the clock. Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz> Cc: Chris Packham <judge.packham@gmail.com> Reviewed-by: Chris Packham <judge.packham@gmail.com>
This commit is contained in:
parent
d86da7e2bd
commit
0e4c345ecf
1 changed files with 5 additions and 0 deletions
|
@ -307,6 +307,11 @@ static int max313xx_set_time(struct udevice *dev, const struct rtc_time *t)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
break;
|
||||
case ID_MAX31343:
|
||||
/* Time is not updated for 1 second after writing */
|
||||
/* Sleep here so the date command shows the new time */
|
||||
mdelay(1000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue