i2c: rcar: check bus state before reinitializing
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 13 Nov 2018 11:15:42 +0000 (12:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Dec 2018 13:15:12 +0000 (14:15 +0100)
commitb288daf8e1da57ecc94d25dcf43bf32405be6a2e
tree16a62d676652a987711d7e4db80219aa98fe3778
parent53e0d8ecc83f00612f18d9071e9e15d6ac252205
i2c: rcar: check bus state before reinitializing

[ Upstream commit 0b57436f15bf40e432487086c4f2d01fd3529393 ]

We should check the bus state before reinitializing the IP core.
Otherwise, the internal bus busy state which also tracks multi-master
activity is lost.

Credits go to the Renesas BSP team for suggesting this change.

Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Fixes: ae481cc13965 ("i2c: rcar: fix resume by always initializing registers before transfer")
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-rcar.c