i2c: ocores: do not handle IRQ if IF is not set
authorFederico Vaga <federico.vaga@cern.ch>
Thu, 14 Feb 2019 08:51:31 +0000 (09:51 +0100)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 14 Feb 2019 16:55:30 +0000 (17:55 +0100)
commit2dc9834688ae3ba057d46e60525a11ec146ae3df
tree71578e34cb22aa59ce1da25fb91d01fd9b9814af
parente7663ef5ae0f02e3b902eb0305dec981333eb3e1
i2c: ocores: do not handle IRQ if IF is not set

If the Interrupt Flag (IF) is not set, we should not handle the IRQ:
- the line can be shared with other devices
- it can be a spurious interrupt

To avoid reading twice the status register, the ocores_process() function
expects it to be read by the caller.

Signed-off-by: Federico Vaga <federico.vaga@cern.ch>
Acked-by: Peter Korsgaard <peter@korsgaard.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-ocores.c