Skip to content
Commit cd5a46ce authored by Martin Hundebøll's avatar Martin Hundebøll Committed by Marc Kleine-Budde
Browse files

can: m_can: don't enable transceiver when probing



The m_can driver sets and clears the CCCR.INIT bit during probe (both
when testing the NON-ISO bit, and when configuring the chip). After
clearing the CCCR.INIT bit, the transceiver enters normal mode, where it
affects the CAN bus (i.e. it ACKs frames). This can cause troubles when
the m_can node is only used for monitoring the bus, as one cannot setup
listen-only mode before the device is probed.

Rework the probe flow, so that the CCCR.INIT bit is only cleared when
upping the device. First, the tcan4x5x driver is changed to stay in
standby mode during/after probe. This in turn requires changes when
setting bits in the CCCR register, as its CSR and CSA bits are always
high in standby mode.

Signed-off-by: default avatarMartin Hundebøll <martin@geanix.com>
Reviewed-by: default avatarMarkus Schneider-Pargmann <msp@baylibre.com>
Tested-by: default avatarMarkus Schneider-Pargmann <msp@baylibre.com>
Link: https://lore.kernel.org/all/20240607105210.155435-1-martin@geanix.com


Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 3da74c51
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment