On Wed, Feb 16, 2022 at 03:30:26PM +0530, Prasad Kumpatla wrote:Okay, will elaborate the commit message and resend.
With the existing logic where clear_ack is true, interrupt clear registerThis commit log still has the problem that it's not clearly describing
reset is not handled properly. Due to this only the first interrupts get
processed properly and further interrupts are blocked due to interrupt
clear register is not reset. So writing 0x00 and 0xff(when ack_invert is
true) should have no effect, other than clearing the ACKs just set.
the problem and I've forgotten again - in what way is the interrupt
clear reset not handled properly? What should happen and what does
happen?
Okay.if (d->chip->ack_invert && !ret)Why only 0xff and not UINT_MAX?
- ret = regmap_write(map, reg,
- d->mask_buf[i]);
+ ret = regmap_write(map, reg, 0xff);
Okay.
else if (!ret)Please write 0 normally, no need for 00.
- ret = regmap_write(map, reg,
- ~d->mask_buf[i]);
+ ret = regmap_write(map, reg, 0x00);