i2c: stm32f7: recover the bus on access timeout
authorAlain Volmat <alain.volmat@foss.st.com>
Mon, 20 Sep 2021 15:21:30 +0000 (17:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Dec 2021 08:04:46 +0000 (09:04 +0100)
commit3dd6c5899695e536161c0866a61751b7a0772987
tree7cbef2dce8fafebd0cadd8eecb8b6547748abbfa
parenta153d4253530ef2b9a258cd0ed4771f0dd5774c7
i2c: stm32f7: recover the bus on access timeout

commit b933d1faf8fa30d16171bcff404e39c41b2a7c84 upstream.

When getting an access timeout, ensure that the bus is in a proper
state prior to returning the error.

Fixes: aeb068c57214 ("i2c: i2c-stm32f7: add driver")
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Reviewed-by: Pierre-Yves MORDRET <pierre-yves.mordret@foss.st.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i2c/busses/i2c-stm32f7.c