mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-15 17:34:43 +00:00
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/20250120015941.1849667-1-mark.tomlinson@alliedtelesis.co.nz
This commit is contained in:
commit
6121676720
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||
|
@ -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