]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: rcar: fix MNR interrupt handling
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Mon, 1 Sep 2014 21:15:26 +0000 (01:15 +0400)
committerWolfram Sang <wsa@the-dreams.de>
Tue, 2 Sep 2014 10:28:15 +0000 (12:28 +0200)
commit21df56bec06853cf5ed3cddde87203e43d607f94
treee113a2153307feb3b3c02859d742f0a036eded7f
parent2e5c8ca83cd8c7326618ad75fd27258ed226d7b9
i2c: rcar: fix MNR interrupt handling

Sometimes the MNR and MST interrupts happen simultaneously  (stop  automatically
follows NACK, according to the manuals) and in such case the ID_NACK flag  isn't
set since the MST interrupt handling precedes MNR and all interrupts are cleared
and disabled then, so that MNR interrupt is never noticed -- this causes NACK'ed
transfers to be falsely reported as successful. Exchanging MNR and  MST handlers
fixes this issue, however the MNR bit  somehow  gets set again even after  being
explicitly cleared, so I decided to completely suppress handling of all disabled
interrupts (which is a good thing anyway)...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: stable@vger.kernel.org
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-rcar.c