can: m_can: add support for optional reset
This patch has been split from the original series [1].
In some SoCs (observed on the STM32MP15) the M_CAN IP core keeps the CAN
state and CAN error counters over an internal reset cycle. The STM32MP15
SoC provides an external reset, which is shared between both M_CAN cores.
Add support for an optional external reset. Take care of shared resets,
de-assert reset during the probe phase in m_can_class_register() and while
the interface is up, assert the reset otherwise.
[1] https://lore.kernel.org/all/
20250923-m_can-fix-state-handling-v3-0-
06d8baccadbf@pengutronix.de
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Markus Schneider-Pargmann <msp@baylibre.com>
Link: https://patch.msgid.link/20251008-m_can-add-reset-v1-1-49f0bbf820c4@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>