can: tcan4x5x: Fix use of register error status mask
authorMarkus Schneider-Pargmann <msp@baylibre.com>
Tue, 6 Dec 2022 11:57:26 +0000 (12:57 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:27 +0000 (13:32 +0100)
commit512dc6796946acd6e49981febf394c87648cb3f9
tree147a8c6a46291eb696c262a379bc997daf48336e
parent73a1f06a4b6fdccf98adab0339bfbdbd2cfc1559
can: tcan4x5x: Fix use of register error status mask

[ Upstream commit 67727a17a6b375d68fe569b77e6516b034b834c0 ]

TCAN4X5X_ERROR_STATUS is not a status register that needs clearing
during interrupt handling. Instead this is a masking register that masks
error interrupts. Writing TCAN4X5X_CLEAR_ALL_INT to this register
effectively masks everything.

Rename the register and mask all error interrupts only once by writing
to the register in tcan4x5x_init.

Fixes: 5443c226ba91 ("can: tcan4x5x: Add tcan4x5x driver to the kernel")
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
Link: https://lore.kernel.org/all/20221206115728.1056014-10-msp@baylibre.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/can/m_can/tcan4x5x-core.c