can: mcp251xfd: fix detection of mcp251863
authorMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 5 Jul 2022 19:30:38 +0000 (21:30 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 20 Jul 2022 08:20:19 +0000 (10:20 +0200)
commitdb87c005b9cce0b815b2268963502c178a1e27c8
tree64675b188aa79a36ca3e49a1f03e5f5dfdbd8aab
parent48ea8ea32dbf3231882e9bc0b297fe1400785219
can: mcp251xfd: fix detection of mcp251863

In commit c6f2a617a0a8 ("can: mcp251xfd: add support for mcp251863")
support for the mcp251863 was added. However it was not taken into
account that the auto detection of the chip model cannot distinguish
between mcp2518fd and mcp251863 and would lead to a warning message if
the firmware specifies a mcp251863.

Fix auto detection: If a mcp2518fd compatible chip is found, keep the
mcp251863 if specified by firmware, use mcp2518fd instead.

Link: https://lore.kernel.org/all/20220706064835.1848864-1-mkl@pengutronix.de
Fixes: c6f2a617a0a8 ("can: mcp251xfd: add support for mcp251863")
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c