Re: [PATCH v2] regmap: irq: clear status when disable irq

2013-10-17 Thread Mark Brown
On Tue, Oct 15, 2013 at 08:23:30PM +0800, Yi Zhang wrote: I'm still not sure this is doing the right thing. > + for (j = 0; j < bits_length; j++) { > + if (!(d->mask_buf[i] & (0x1 << j))) { This is checking to see if the bit is masked... > +

[PATCH v2] regmap: irq: clear status when disable irq

2013-10-15 Thread Yi Zhang
clear the status bit if the mask register doesn't prevent the chip level irq from being asserted OR in the following sequence, there will be irq storm happens: 1) interrupt is triggered; 2) another thread disables it(the mask bit is set); 3) _Then_ the interrupt thread is not ACKed(the status bit