From 8f11996ffbdb138a2e92026237a120def1fac21e Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Thu, 3 Dec 2020 19:36:54 -0300 Subject: [PATCH] Fix ICS9250-38 register 0 masking --- src/device/clock_ics9xxx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/device/clock_ics9xxx.c b/src/device/clock_ics9xxx.c index 4843ef252..05a1a31e5 100644 --- a/src/device/clock_ics9xxx.c +++ b/src/device/clock_ics9xxx.c @@ -586,7 +586,7 @@ ics9xxx_write(void *bus, uint8_t addr, uint8_t data, void *priv) switch (dev->addr_register) { case 0: if (dev->model == ICS9250_38) - data = (dev->regs[dev->addr_register] & ~0xef) | (data & 0xef); + data = (dev->regs[dev->addr_register] & ~0xe8) | (data & 0xe8); else { dev->regs[dev->addr_register] = data; if (dev->model == ICS9250_10) @@ -616,7 +616,7 @@ ics9xxx_write(void *bus, uint8_t addr, uint8_t data, void *priv) break; case 6: - if (dev->model == ICS9250_38) + if (dev->model == ICS9250_38) /* read-only */ data = dev->regs[dev->addr_register]; break; }