i2c: pxa: clear all master action bits in i2c_pxa_stop_message()
authorRussell King <rmk+kernel@armlinux.org.uk>
Wed, 6 May 2020 09:36:38 +0000 (10:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:50:12 +0000 (17:50 +0200)
commit8a44731af689d5571dcf43eecaf49e1b11ff6b97
tree643f8e5984be04dae6bf87a4cb098e1205d8499d
parentceb63ec0ef6e693d92a1befe0ddd07cda8043c72
i2c: pxa: clear all master action bits in i2c_pxa_stop_message()

[ Upstream commit e81c979f4e071d516aa27cf5a0c3939da00dc1ca ]

If we timeout during a message transfer, the control register may
contain bits that cause an action to be set. Read-modify-writing the
register leaving these bits set may trigger the hardware to attempt
one of these actions unintentionally.

Always clear these bits when cleaning up after a message or after
a timeout.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-pxa.c