diff options
| author | Tom Rini <[email protected]> | 2025-01-26 11:33:17 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-01-26 11:33:17 -0600 |
| commit | 61216767209262f5d005a63fb846a808516ff3bf (patch) | |
| tree | 557e2670f5eeec2abd195410d8bc34bb16cb8ea0 | |
| parent | 8a2a71a4eec7afdca6377ee46b1ed7e78ec692c9 (diff) | |
| parent | 0e4c345ecf653aab7684ef6ab0a9e794e8659f5f (diff) | |
Merge a patch series for mx313xx RTC drivers
This series of patches from Mark Tomlinson fixes two problems with the
mx313xx series of RTC devices.
Link: https://lore.kernel.org/r/[email protected]
| -rw-r--r-- | drivers/rtc/max313xx.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/rtc/max313xx.c b/drivers/rtc/max313xx.c index 60400235dd0..2cb3f245041 100644 --- a/drivers/rtc/max313xx.c +++ b/drivers/rtc/max313xx.c @@ -285,7 +285,7 @@ static int max313xx_set_time(struct udevice *dev, const struct rtc_time *t) regs[5] = bin2bcd(t->tm_mon); regs[6] = bin2bcd((t->tm_year - 2000) % 100); - if ((t->tm_year - 2000) >= 200) + if (t->tm_year >= 2100) regs[5] |= FIELD_PREP(MAX313XX_MONTH_CENTURY, 1); ret = dm_i2c_write(dev, rtc->chip->sec_reg, regs, 7); @@ -308,6 +308,11 @@ static int max313xx_set_time(struct udevice *dev, const struct rtc_time *t) 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; } |
