zephyr/drivers/can
Henrik Brix Andersen a57db0ddcb drivers: can: rework support for manual bus-off recovery
Since all CAN controllers drivers seem to support automatic recovery (for
any future drivers for hardware without this hardware capability this can
easily be implemented in the driver), change the Zephyr CAN controller API
policy to:

- Always enable automatic bus recovery upon driver initialization,
  regardless of Kconfig options. Since CAN controllers are initialized in
  "stopped" state, no unwanted bus-off recovery will be started at this
  point.

- Invert and rename the Kconfig CONFIG_CAN_AUTO_BUS_OFF_RECOVERY, which is
  enabled by default, to CONFIG_CAN_MANUAL_RECOVERY_MODE, which is disabled
  by default. Enabling CONFIG_CAN_MANUAL_RECOVERY_MODE=y enables support
  for the can_recover() API function and a new manual recovery mode (see
  next bullet). Keeping this guarded by Kconfig allows keeping the flash
  footprint down for applications not using manual bus-off recovery.

- Introduce a new CAN controller operational mode
  CAN_MODE_MANUAL_RECOVERY. Support for this is only enabled if
  CONFIG_CAN_MANUAL_RECOVERY_MODE=y. Having this as a mode allows
  applications to inquire whether the CAN controller supports manual
  recovery mode via the can_get_capabilities() API function and either fail
  or rely on automatic recovery - and it allows CAN controller drivers not
  supporting manual recovery mode to fail early in can_set_mode() during
  application startup instead of failing when can_recover() is called at a
  later point in time.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-02 18:26:48 +01:00
..
transceiver drivers: can: propagate CAN controller operation mode to CAN transceiver 2024-01-26 15:55:18 +00:00
can_common.c drivers: can: calculate a default SJW value 2023-09-28 16:28:56 +02:00
can_esp32_twai.c drivers: can: rework support for manual bus-off recovery 2024-03-02 18:26:48 +01:00
can_fake.c drivers: can: rework support for manual bus-off recovery 2024-03-02 18:26:48 +01:00
can_handlers.c drivers: can: rework support for manual bus-off recovery 2024-03-02 18:26:48 +01:00
can_kvaser_pci.c drivers: can: rework support for manual bus-off recovery 2024-03-02 18:26:48 +01:00
can_loopback.c drivers: can: rework support for manual bus-off recovery 2024-03-02 18:26:48 +01:00
can_mcan.c drivers: can: rework support for manual bus-off recovery 2024-03-02 18:26:48 +01:00
can_mcp251xfd.c drivers: can: rework support for manual bus-off recovery 2024-03-02 18:26:48 +01:00
can_mcp251xfd.h dts: bindings: can: remove deprecated properties for initial timing 2024-03-01 09:00:49 +01:00
can_mcp2515.c drivers: can: rework support for manual bus-off recovery 2024-03-02 18:26:48 +01:00
can_mcp2515.h dts: bindings: can: remove deprecated properties for initial timing 2024-03-01 09:00:49 +01:00
can_mcux_flexcan.c drivers: can: rework support for manual bus-off recovery 2024-03-02 18:26:48 +01:00
can_mcux_mcan.c drivers: can: rework support for manual bus-off recovery 2024-03-02 18:26:48 +01:00
can_native_linux.c drivers: can: rework support for manual bus-off recovery 2024-03-02 18:26:48 +01:00
can_native_linux_adapt.c drivers can_native_linux: Avoid using ssize 2024-01-15 21:59:56 +01:00
can_native_linux_adapt.h drivers can_native_linux: Avoid using ssize 2024-01-15 21:59:56 +01:00
can_numaker.c drivers: can: rework support for manual bus-off recovery 2024-03-02 18:26:48 +01:00
can_nxp_s32_canxl.c drivers: can: rework support for manual bus-off recovery 2024-03-02 18:26:48 +01:00
can_rcar.c drivers: can: rework support for manual bus-off recovery 2024-03-02 18:26:48 +01:00
can_sam.c drivers: can: rework support for manual bus-off recovery 2024-03-02 18:26:48 +01:00
can_sam0.c drivers: can: rework support for manual bus-off recovery 2024-03-02 18:26:48 +01:00
can_shell.c drivers: can: rework support for manual bus-off recovery 2024-03-02 18:26:48 +01:00
can_sja1000.c drivers: can: rework support for manual bus-off recovery 2024-03-02 18:26:48 +01:00
can_sja1000_priv.h drivers: can: sja1000: add CAN statistics support 2023-10-23 18:20:23 +02:00
can_stm32_bxcan.c drivers: can: rework support for manual bus-off recovery 2024-03-02 18:26:48 +01:00
can_stm32_fdcan.c drivers: can: rework support for manual bus-off recovery 2024-03-02 18:26:48 +01:00
can_stm32h7_fdcan.c drivers: can: rework support for manual bus-off recovery 2024-03-02 18:26:48 +01:00
can_tcan4x5x.c drivers: can: rework support for manual bus-off recovery 2024-03-02 18:26:48 +01:00
can_xmc4xxx.c drivers: can: rework support for manual bus-off recovery 2024-03-02 18:26:48 +01:00
CMakeLists.txt drivers: can: Add xmc4xxx CAN support 2024-01-30 19:06:06 +01:00
Kconfig drivers: can: rework support for manual bus-off recovery 2024-03-02 18:26:48 +01:00
Kconfig.esp32 drivers: can: add ESP32 TWAI CAN controller driver 2022-07-30 17:32:04 +01:00
Kconfig.fake drivers: can: remove CAN_HAS_CANFD Kconfig helper 2023-01-25 15:00:39 +00:00
Kconfig.kvaser drivers: can: add driver for the Kvaser PCIcan CAN controller PCI card 2022-11-01 15:22:31 -04:00
Kconfig.loopback drivers: can: remove CAN_HAS_CANFD Kconfig helper 2023-01-25 15:00:39 +00:00
Kconfig.mcan drivers: can: unify spelling of CAN Flexible Data-rate abbreviation 2023-11-01 11:17:17 +00:00
Kconfig.mcp251xfd drivers: can: mcp251xfd: Increase max filters and change filter usage type 2023-11-20 09:25:08 +01:00
Kconfig.mcp2515 drivers: can: mcp2515: increase default stack size 2023-06-02 09:43:16 +02:00
Kconfig.mcux drivers: can: flexcan: add support for S32K1xx 2024-01-08 08:30:49 -06:00
Kconfig.native_linux drivers: can: drop POSIX from the native Linux SocketCAN driver name 2023-12-12 14:28:26 +00:00
Kconfig.numaker drivers: can: unify spelling of CAN Flexible Data-rate abbreviation 2023-11-01 11:17:17 +00:00
Kconfig.nxp_s32 drivers: nxp_s32_canxl: add support RX FIFO 2024-01-16 20:50:49 -05:00
Kconfig.rcar drivers: can: Update drivers to use devicetree Kconfig symbol 2022-07-21 06:02:28 -05:00
Kconfig.sam drivers: can: sam: do not select cache management 2023-07-31 19:38:22 +00:00
Kconfig.sam0 sam: can: CAN driver for SAM0 socs 2023-05-22 08:03:58 +00:00
Kconfig.sja1000 drivers: can: add NXP SJA1000 common driver backend 2022-07-30 17:32:04 +01:00
Kconfig.stm32 drivers: can: stm32h7: fdcan: rename driver to match reference manuals 2023-08-16 13:03:00 +02:00
Kconfig.tcan4x5x drivers: can: add tcan4x5x CAN controller driver 2023-09-11 19:55:44 +02:00
Kconfig.xmc4xxx drivers: can: Add xmc4xxx CAN support 2024-01-30 19:06:06 +01:00