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)
committerSasha Levin <sashal@kernel.org>
Tue, 30 Jun 2020 19:38:21 +0000 (15:38 -0400)
commit18f7ec3aaaf70a6f41961c8d193fbc21f9df18f6
treedab95261f021ffaf15730e5c3b70989d9a29efea
parent6dd652f672b7dad02d5807c41b5106f96d7a2e9f
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