drivers: can: add statistics support

Add CAN controller device statistics support.

Initially the following per-device statistics are supported:
- Dominant bit transmission errors
- Recessive bit transmission errors
- Bit stuffing errors
- CRC errors
- Format errors
- Acknowledge errors

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
Henrik Brix Andersen 2022-02-11 15:03:32 +01:00 committed by Marti Bolivar
commit 28b5cfd46c
2 changed files with 207 additions and 0 deletions

View file

@ -31,6 +31,12 @@ config CAN_SHELL
help
Enable CAN Shell for testing.
config CAN_STATS
bool "Enable CAN controller device statistics"
depends on STATS
help
Enable CAN controller device statistics.
config CAN_HAS_CANFD
bool
help