i2c: iproc: handle only slave interrupts which are enabled
authorRayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Mon, 2 Nov 2020 03:54:29 +0000 (09:24 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:37:53 +0000 (11:37 +0100)
commit686ed8d7bf90d25ea51ef9174b2116ba5185fa5c
tree4d9853ab7b511e2e5fb4b3dc0b6b583e0e0b0db4
parent8584d4f31a3a75fe405a9cc05e679d2bfdd4be05
i2c: iproc: handle only slave interrupts which are enabled

[ Upstream commit 545f4011e156554d704d6278245d54543f6680d1 ]

Handle only slave interrupts which are enabled.

The IS_OFFSET register contains the interrupt status bits which will be
set regardless of the enabling of the corresponding interrupt condition.
One must therefore look at both IS_OFFSET and IE_OFFSET to determine
whether an interrupt condition is set and enabled.

Fixes: c245d94ed106 ("i2c: iproc: Add multi byte read-write support for slave mode")
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Acked-by: Ray Jui <ray.jui@broadcom.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-bcm-iproc.c