Merge branch 'devices' Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
1 files changed, 2 insertions(+), 1 deletions(-) M devices/i2c/mcp7940n.c
M devices/i2c/mcp7940n.c +2 -1
@@ 214,8 214,9 @@ bool mcp7940n_settime(const struct tm *t tmp.month = BIN2BCD(tm->month, 4, 0) & 0x1f; tmp.year = BIN2BCD(tm->year - 2000, 4, 0); + /* update date & time but leave control & trim alone */ if (!mcp7940n_write(offsetof(struct mcp7940n, timekeeping), &tmp, - sizeof(tmp))) + offsetof(struct mcp7940n, timekeeping.control))) return false; /* start the oscillator */