i2c: rcar: slave: only send STOP event when we have been addressed
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Mon, 29 Jun 2020 15:38:07 +0000 (17:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Aug 2020 07:48:21 +0000 (09:48 +0200)
commitb52fc176607f1f4607bf5a23ae64334474938baa
treeb2bda75653f3613300d761abdbc9f2cbfec2f48e
parent40f782ead6b1d0bcebff304a6a55d10d7ebcb275
i2c: rcar: slave: only send STOP event when we have been addressed

[ Upstream commit 314139f9f0abdba61ed9a8463bbcb0bf900ac5a2 ]

When the SSR interrupt is activated, it will detect every STOP condition
on the bus, not only the ones after we have been addressed. So, enable
this interrupt only after we have been addressed, and disable it
otherwise.

Fixes: de20d1857dd6 ("i2c: rcar: add slave support")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-rcar.c