drivers: can: Timestamps depend on driver select

Instead of explicity ORing together the compatible drivers,
CAN_RX_TIMESTAMP now depends on CAN_HAS_RX_TIMESTAMP
which is selected by the drivers primary Kconfig option. In addition,
stm32fd does not need to select this option since it selected by
the underlying M_CAN driver.

Signed-off-by: Abram Early <abram.early@gmail.com>
This commit is contained in:
Abram Early 2021-06-24 16:11:29 -06:00 committed by Anas Nashif
commit bd09d4ff3f
4 changed files with 9 additions and 1 deletions

View file

@ -29,6 +29,11 @@ config CAN_HAS_CANFD
help help
driver supports CAN-FD driver supports CAN-FD
config CAN_HAS_RX_TIMESTAMP
bool
help
driver supports RX timestamps
config CAN_FD_MODE config CAN_FD_MODE
bool "CAN-FD" bool "CAN-FD"
default y default y
@ -66,7 +71,7 @@ config CAN_WORKQ_FRAMES_BUF_CNT
config CAN_RX_TIMESTAMP config CAN_RX_TIMESTAMP
bool "Enable receiving timestamps" bool "Enable receiving timestamps"
depends on CAN_STM32 || CAN_MCUX_FLEXCAN || CAN_STM32FD depends on CAN_HAS_RX_TIMESTAMP
help help
This option enables a timestamp value of the CAN free running timer. This option enables a timestamp value of the CAN free running timer.
The value is incremented every bit time and starts when the controller The value is incremented every bit time and starts when the controller

View file

@ -6,6 +6,7 @@
config CAN_MCAN config CAN_MCAN
bool bool
select CAN_HAS_CANFD select CAN_HAS_CANFD
select CAN_HAS_RX_TIMESTAMP
help help
Enable Bosch m_can driver. Enable Bosch m_can driver.
This driver supports the Bosch m_can IP. This IP is built into the This driver supports the Bosch m_can IP. This IP is built into the

View file

@ -6,6 +6,7 @@
config CAN_MCUX_FLEXCAN config CAN_MCUX_FLEXCAN
bool "MCUX FlexCAN driver" bool "MCUX FlexCAN driver"
depends on HAS_MCUX_FLEXCAN && CLOCK_CONTROL depends on HAS_MCUX_FLEXCAN && CLOCK_CONTROL
select CAN_HAS_RX_TIMESTAMP
help help
Enable support for mcux flexcan driver. Enable support for mcux flexcan driver.

View file

@ -8,6 +8,7 @@ DT_COMPAT_ST_STM32_CAN := st,stm32-can
config CAN_STM32 config CAN_STM32
bool "STM32 CAN Driver" bool "STM32 CAN Driver"
default $(dt_compat_enabled,$(DT_COMPAT_ST_STM32_CAN)) default $(dt_compat_enabled,$(DT_COMPAT_ST_STM32_CAN))
select CAN_HAS_RX_TIMESTAMP
help help
Enable STM32 CAN Driver. Enable STM32 CAN Driver.
Tested on stm32F0, stm32L4 and stm32F7 series. Tested on stm32F0, stm32L4 and stm32F7 series.