From f1a7ec96db9fb8d9a71d0f49d1734d3f3ab6d5a4 Mon Sep 17 00:00:00 2001 From: Henrik Brix Andersen Date: Tue, 24 Jan 2023 12:02:34 +0100 Subject: [PATCH] drivers: can: remove CAN_HAS_RX_TIMESTAMP Kconfig helper Remove the CAN_HAS_RX_TIMESTAMP Kconfig helper symbol in order to allow enabling CAN RX timestamps in the API regardless of driver support. This simplifies application prj.conf settings across board supporting/not supporting RX timestamps considerably. CAN drivers not supporting RX timestamps already initialize the timestamp to 0 for received frames. Signed-off-by: Henrik Brix Andersen --- drivers/can/Kconfig | 8 +------- drivers/can/Kconfig.fake | 1 - drivers/can/Kconfig.mcan | 1 - drivers/can/Kconfig.mcux | 1 - drivers/can/Kconfig.stm32 | 1 - 5 files changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/can/Kconfig b/drivers/can/Kconfig index c8164ec550b..3c137fa0181 100644 --- a/drivers/can/Kconfig +++ b/drivers/can/Kconfig @@ -60,11 +60,6 @@ config CAN_HAS_CANFD help driver supports CAN-FD -config CAN_HAS_RX_TIMESTAMP - bool - help - driver supports RX timestamps - config CAN_FD_MODE bool "CAN-FD" default y @@ -74,11 +69,10 @@ config CAN_FD_MODE config CAN_RX_TIMESTAMP bool "Receiving timestamps" - depends on CAN_HAS_RX_TIMESTAMP help This option enables a timestamp value of the CAN free running timer. The value is incremented every bit time and starts when the controller - is initialized. + is initialized. Not all CAN controllers support timestamps. config CAN_AUTO_BUS_OFF_RECOVERY bool "Automatic recovery from bus-off" diff --git a/drivers/can/Kconfig.fake b/drivers/can/Kconfig.fake index 7a76ac2bb81..21453bd98e1 100644 --- a/drivers/can/Kconfig.fake +++ b/drivers/can/Kconfig.fake @@ -8,6 +8,5 @@ config CAN_FAKE default y depends on DT_HAS_ZEPHYR_FAKE_CAN_ENABLED select CAN_HAS_CANFD - select CAN_HAS_RX_TIMESTAMP help Enable support for the FFF-based fake CAN driver. diff --git a/drivers/can/Kconfig.mcan b/drivers/can/Kconfig.mcan index e5c00f9758b..e5d9518978c 100644 --- a/drivers/can/Kconfig.mcan +++ b/drivers/can/Kconfig.mcan @@ -6,7 +6,6 @@ config CAN_MCAN bool select CAN_HAS_CANFD - select CAN_HAS_RX_TIMESTAMP help Enable Bosch m_can driver. This driver supports the Bosch m_can IP. This IP is built into the diff --git a/drivers/can/Kconfig.mcux b/drivers/can/Kconfig.mcux index 2df43a61a6b..26b46e9433d 100644 --- a/drivers/can/Kconfig.mcux +++ b/drivers/can/Kconfig.mcux @@ -8,7 +8,6 @@ config CAN_MCUX_FLEXCAN default y depends on DT_HAS_NXP_KINETIS_FLEXCAN_ENABLED depends on CLOCK_CONTROL - select CAN_HAS_RX_TIMESTAMP help Enable support for mcux flexcan driver. diff --git a/drivers/can/Kconfig.stm32 b/drivers/can/Kconfig.stm32 index afcafa17226..58869639938 100644 --- a/drivers/can/Kconfig.stm32 +++ b/drivers/can/Kconfig.stm32 @@ -7,7 +7,6 @@ config CAN_STM32 bool "STM32 CAN Driver" default y depends on DT_HAS_ST_STM32_CAN_ENABLED - select CAN_HAS_RX_TIMESTAMP help Enable STM32 CAN Driver. Tested on STM32F0, STM32F4, STM32L4 and STM32F7 series.