zephyr/samples
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
..
application_development samples/code_relocation_nocopy: Increase fake flash size 2023-11-20 06:07:58 -05:00
arch samples: fix thread function signatures 2023-10-30 12:24:34 +01:00
basic samples: add Wio Terminal overlay to blinky pwm 2024-01-15 13:56:51 -05:00
bluetooth samples: Bluetooth: Few fixups for USB data for broadcast audio sink 2024-03-01 14:12:10 +01:00
boards samples: esp32: do not search for all regions 2024-02-19 11:05:09 +01:00
compression samples: lz4: reduce malloc arena size 2023-11-14 09:04:11 +01:00
cpp samples: cpp: add a Hello, world! C++ app 2024-01-17 09:56:34 +01:00
drivers drivers: can: rework support for manual bus-off recovery 2024-03-02 18:26:48 +01:00
fuel_gauge fuel_gauge: Repl property struct w/ union 2023-09-27 12:07:59 +02:00
hello_world samples: Switch integration_platforms from native_posix to native_sim 2023-11-20 12:02:48 +01:00
kernel samples/kernel/metairq_dispatch: Correct comment 2023-11-20 12:02:48 +01:00
modules doc: services: serialization: Add Nanopb entry 2024-03-01 10:21:34 +00:00
net samples: lwm2m: Set temperature sensor resource values 2024-02-26 11:53:29 +00:00
philosophers samples: philosophers: remove redundant items in prj.conf 2024-02-01 05:26:24 -05:00
posix samples: posix: gettimeofday: Fix fatal error caused by small stack 2024-02-14 10:58:42 +01:00
sensor samples: doc: Add README for Grove sensor samples 2024-02-14 00:44:29 +01:00
shields sample/shield: x-nucleo-iks01a3: add support to lis2de12 on DIL24 2024-01-31 15:39:45 +01:00
subsys samples: ipc: openamp_rsc_table: Add shell backend 2024-03-01 14:10:24 +01:00
synchronization samples: synchronization: add static thread 2023-11-16 09:25:33 +01:00
tfm_integration tfm: Provide properties for selected TF-M toolchain for NS application 2024-01-17 16:52:52 +01:00
userspace twister: s/riscv(32|64)/riscv 2024-02-26 12:49:06 +01:00
classic.rst doc: fix top samples doc index 2021-03-09 17:48:18 -05:00
index.rst doc: samples: Fix incorrect maxdepth for some toctrees 2023-09-26 12:02:54 +02:00
sample_definition_and_criteria.rst docs: Sample definition: Replace native_posix with native_sim 2023-11-20 12:02:48 +01:00