From b66c720ed6f0f01373e97e86543e0a8fbb992dcf Mon Sep 17 00:00:00 2001 From: Aksel Skauge Mellbye Date: Wed, 16 Apr 2025 11:46:37 +0200 Subject: [PATCH] drivers: debug: Add debug driver class Add a new driver class for drivers related to debugging, such as trace hardware, performance counters etc. Signed-off-by: Aksel Skauge Mellbye --- MAINTAINERS.yml | 12 ++++++++++++ drivers/CMakeLists.txt | 1 + drivers/Kconfig | 1 + drivers/debug/CMakeLists.txt | 7 +++++++ drivers/debug/Kconfig | 24 ++++++++++++++++++++++++ 5 files changed, 45 insertions(+) create mode 100644 drivers/debug/CMakeLists.txt create mode 100644 drivers/debug/Kconfig diff --git a/MAINTAINERS.yml b/MAINTAINERS.yml index 81a2b8d21ae..0dc51e1a8cf 100644 --- a/MAINTAINERS.yml +++ b/MAINTAINERS.yml @@ -1340,6 +1340,18 @@ Release Notes: labels: - "area: DAI" +"Drivers: Debug": + status: maintained + maintainers: + - asmellby + collaborators: + - nordic-krch + files: + - drivers/debug/ + - dts/bindings/debug/ + labels: + - "area: Debugging" + "Drivers: Devmux": status: maintained maintainers: diff --git a/drivers/CMakeLists.txt b/drivers/CMakeLists.txt index 524a966711f..062e35c08a7 100644 --- a/drivers/CMakeLists.txt +++ b/drivers/CMakeLists.txt @@ -31,6 +31,7 @@ add_subdirectory_ifdef(CONFIG_COUNTER counter) add_subdirectory_ifdef(CONFIG_CRYPTO crypto) add_subdirectory_ifdef(CONFIG_DAC dac) add_subdirectory_ifdef(CONFIG_DAI dai) +add_subdirectory_ifdef(CONFIG_DEBUG_DRIVER debug) add_subdirectory_ifdef(CONFIG_DISPLAY display) add_subdirectory_ifdef(CONFIG_DMA dma) add_subdirectory_ifdef(CONFIG_DP_DRIVER dp) diff --git a/drivers/Kconfig b/drivers/Kconfig index 6a2feabdfb9..c732913913b 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -23,6 +23,7 @@ source "drivers/counter/Kconfig" source "drivers/crypto/Kconfig" source "drivers/dac/Kconfig" source "drivers/dai/Kconfig" +source "drivers/debug/Kconfig" source "drivers/disk/Kconfig" source "drivers/display/Kconfig" source "drivers/dma/Kconfig" diff --git a/drivers/debug/CMakeLists.txt b/drivers/debug/CMakeLists.txt new file mode 100644 index 00000000000..8ab94991678 --- /dev/null +++ b/drivers/debug/CMakeLists.txt @@ -0,0 +1,7 @@ +# Copyright (c) 2025 Silicon Laboratories Inc. +# SPDX-License-Identifier: Apache-2.0 + +zephyr_library() + +# zephyr-keep-sorted-start +# zephyr-keep-sorted-stop diff --git a/drivers/debug/Kconfig b/drivers/debug/Kconfig new file mode 100644 index 00000000000..1b1b09daa08 --- /dev/null +++ b/drivers/debug/Kconfig @@ -0,0 +1,24 @@ +# Copyright (c) 2025 Silicon Laboratories Inc. +# SPDX-License-Identifier: Apache-2.0 + +menuconfig DEBUG_DRIVER + bool "Debug drivers" + help + Enable support for debug drivers + +if DEBUG_DRIVER + +config DEBUG_DRIVER_INIT_PRIORITY + int "Initialization priority" + default KERNEL_INIT_PRIORITY_DEVICE + help + Debug drivers initialization priority. + +# zephyr-keep-sorted-start +# zephyr-keep-sorted-stop + +module = DEBUG_DRIVER +module-str = debug_driver +source "subsys/logging/Kconfig.template.log_config" + +endif