Bluetooth: Conditionally include logging Kconfigs

Having all the configs be visible by default clutters the menuconfig
view. Make them visible only when the corresponding subsys or module is
enabled.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
This commit is contained in:
Jonathan Rico 2024-08-19 10:11:36 +02:00 committed by Anas Nashif
commit f7631d4b4a

View file

@ -38,181 +38,251 @@ source "subsys/logging/Kconfig.template.log_config_inherit"
menu "Audio" menu "Audio"
# AICS if BT_AICS
module = BT_AICS module = BT_AICS
module-str = "Audio Input Control Service" module-str = "Audio Input Control Service"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_AICS
if BT_AICS_CLIENT
module = BT_AICS_CLIENT module = BT_AICS_CLIENT
module-str = "Audio Input Control Service client" module-str = "Audio Input Control Service client"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_AICS_CLIENT
# BAP if BT_BAP_STREAM
module = BT_BAP_STREAM module = BT_BAP_STREAM
module-str = "Bluetooth Audio Stream" module-str = "Bluetooth Audio Stream"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_BAP_STREAM
if BT_BAP_BASE
module = BT_BAP_BASE module = BT_BAP_BASE
module-str = "Bluetooth Basic Audio Profile Broadcast Audio Source Endpoint" module-str = "Bluetooth Basic Audio Profile Broadcast Audio Source Endpoint"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_BAP_BASE
if BT_BAP_STREAM
module = BT_AUDIO_CODEC module = BT_AUDIO_CODEC
module-str = "Bluetooth Audio Codec" module-str = "Bluetooth Audio Codec"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_BAP_STREAM
if BT_ASCS
module = BT_ASCS module = BT_ASCS
module-str = "Audio Stream Control Service" module-str = "Audio Stream Control Service"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_ASCS
if BT_BAP_UNICAST_SERVER
module = BT_BAP_UNICAST_SERVER module = BT_BAP_UNICAST_SERVER
module-str = "Bluetooth Audio Unicast Server" module-str = "Bluetooth Audio Unicast Server"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_BAP_UNICAST_SERVER
if BT_BAP_UNICAST_CLIENT
module = BT_BAP_UNICAST_CLIENT module = BT_BAP_UNICAST_CLIENT
module-str = "Basic Audio Profile" module-str = "Basic Audio Profile"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_BAP_UNICAST_CLIENT
if BT_BAP_BROADCAST_SOURCE
module = BT_BAP_BROADCAST_SOURCE module = BT_BAP_BROADCAST_SOURCE
module-str = "Bluetooth Audio Broadcast Source" module-str = "Bluetooth Audio Broadcast Source"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_BAP_BROADCAST_SOURCE
if BT_BAP_BROADCAST_SINK
module = BT_BAP_BROADCAST_SINK module = BT_BAP_BROADCAST_SINK
module-str = "Bluetooth Audio Broadcast Sink" module-str = "Bluetooth Audio Broadcast Sink"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_BAP_BROADCAST_SINK
if BT_BAP_SCAN_DELEGATOR
module = BT_BAP_SCAN_DELEGATOR module = BT_BAP_SCAN_DELEGATOR
module-str = "Broadcast Audio Scan Service" module-str = "Broadcast Audio Scan Service"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_BAP_SCAN_DELEGATOR
if BT_BAP_BROADCAST_ASSISTANT
module = BT_BAP_BROADCAST_ASSISTANT module = BT_BAP_BROADCAST_ASSISTANT
module-str = "Broadcast Audio Scan Service client debug" module-str = "Broadcast Audio Scan Service client debug"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_BAP_BROADCAST_ASSISTANT
if BT_BAP_STREAM
module = BT_BAP_ISO module = BT_BAP_ISO
module-str = "Bluetooth Audio ISO" module-str = "Bluetooth Audio ISO"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_BAP_STREAM
# CAP # CAP
if BT_CAP_ACCEPTOR
module = BT_CAP_ACCEPTOR module = BT_CAP_ACCEPTOR
module-str = "Common Audio Profile Acceptor" module-str = "Common Audio Profile Acceptor"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_CAP_ACCEPTOR
if BT_CAP_INITIATOR
module = BT_CAP_INITIATOR module = BT_CAP_INITIATOR
module-str = "Common Audio Profile Initiator" module-str = "Common Audio Profile Initiator"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_CAP_INITIATOR
if BT_CAP_COMMANDER
module = BT_CAP_COMMANDER module = BT_CAP_COMMANDER
module-str = "Common Audio Profile Commander" module-str = "Common Audio Profile Commander"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_CAP_COMMANDER
if BT_AUDIO
module = BT_CAP_COMMON module = BT_CAP_COMMON
module-str = "Common Audio Profile Common" module-str = "Common Audio Profile Common"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_AUDIO
if BT_CAP
module = BT_CAP_STREAM module = BT_CAP_STREAM
module-str = "Common Audio Profile Stream" module-str = "Common Audio Profile Stream"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_CAP
# CSIP # CSIP
if BT_CSIP_SET_MEMBER
module = BT_CSIP_SET_MEMBER module = BT_CSIP_SET_MEMBER
module-str = "Coordinated Set Identification Service" module-str = "Coordinated Set Identification Service"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_CSIP_SET_MEMBER
if BT_CSIP_SET_COORDINATOR
module = BT_CSIP_SET_COORDINATOR module = BT_CSIP_SET_COORDINATOR
module-str = "Coordinated Set Identification Profile Set Coordinator" module-str = "Coordinated Set Identification Profile Set Coordinator"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_CSIP_SET_COORDINATOR
if BT_AUDIO
module = BT_CSIP_SET_MEMBER_CRYPTO module = BT_CSIP_SET_MEMBER_CRYPTO
module-str = "Coordinated Set Identification Profile crypto functions" module-str = "Coordinated Set Identification Profile crypto functions"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_AUDIO
# HAS # HAS
if BT_HAS
module = BT_HAS module = BT_HAS
module-str = "Hearing Access Service" module-str = "Hearing Access Service"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_HAS
if BT_HAS_CLIENT
module = BT_HAS_CLIENT module = BT_HAS_CLIENT
module-str = "Hearing Access Service Client" module-str = "Hearing Access Service Client"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_HAS_CLIENT
# MCS # MCS
if BT_MCS
module = BT_MCS module = BT_MCS
module-str = "Media Control Service" module-str = "Media Control Service"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_MCS
if BT_MCC
module = BT_MCC module = BT_MCC
module-str = "Media Control Client" module-str = "Media Control Client"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_MCC
# MCTL # MCTL
if MCTL
module = MCTL module = MCTL
module-str = "Media control" module-str = "Media control"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # MCTL
# MICP # MICP
if BT_MICP_MIC_DEV
module = BT_MICP_MIC_DEV module = BT_MICP_MIC_DEV
module-str = "Microphone Control Profile Microphone Device" module-str = "Microphone Control Profile Microphone Device"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_MICP_MIC_DEV
if BT_MICP_MIC_CTLR
module = BT_MICP_MIC_CTLR module = BT_MICP_MIC_CTLR
module-str = "Microphone Control Profile Microphone Controller" module-str = "Microphone Control Profile Microphone Controller"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_MICP_MIC_CTLR
# MPL # MPL
if BT_MPL
module = BT_MPL module = BT_MPL
module-str = "Media player" module-str = "Media player"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_MPL
# PACS # PACS
if BT_PACS
module = BT_PACS module = BT_PACS
module-str = "Published Audio Capabilities Service" module-str = "Published Audio Capabilities Service"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_PACS
# TBS # TBS
if BT_TBS
module = BT_TBS module = BT_TBS
module-str = "Telephone Bearer Service" module-str = "Telephone Bearer Service"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_TBS
if BT_TBS_CLIENT
module = BT_TBS_CLIENT module = BT_TBS_CLIENT
module-str = "Telephone Bearer Service client" module-str = "Telephone Bearer Service client"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_TBS_CLIENT
# VCP # VCP
if BT_VCP_VOL_REND
module = BT_VCP_VOL_REND module = BT_VCP_VOL_REND
module-str = "Volume Control Profile Volume Renderer" module-str = "Volume Control Profile Volume Renderer"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_VCP_VOL_REND
if BT_VCP_VOL_CTLR
module = BT_VCP_VOL_CTLR module = BT_VCP_VOL_CTLR
module-str = "Volume Control Profile Volume Controller" module-str = "Volume Control Profile Volume Controller"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_VCP_VOL_CTLR
# VOCS # VOCS
if BT_VOCS
module = BT_VOCS module = BT_VOCS
module-str = "Volume Offset Control Service" module-str = "Volume Offset Control Service"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_VOCS
if BT_VOCS_CLIENT
module = BT_VOCS_CLIENT module = BT_VOCS_CLIENT
module-str = "Volume Offset Control Service client" module-str = "Volume Offset Control Service client"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_VOCS_CLIENT
# PBP # PBP
if BT_PBP
module = BT_PBP module = BT_PBP
module-str = "Public Broadcast Profile" module-str = "Public Broadcast Profile"
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config" source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config"
endif # BT_PBP
endmenu # Audio endmenu # Audio
@ -220,9 +290,11 @@ menu "Others"
# CRYPTO (subsys/bluetooth/crypto/Kconfig) # CRYPTO (subsys/bluetooth/crypto/Kconfig)
if BT_CRYPTO
module = BT_CRYPTO module = BT_CRYPTO
module-str = "Bluetooth Cryptographic Toolbox" module-str = "Bluetooth Cryptographic Toolbox"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_CRYPTO
# GATT # GATT
@ -242,39 +314,51 @@ source "subsys/logging/Kconfig.template.log_config_inherit"
# LIB (subsys/bluetooth/lib/Kconfig) # LIB (subsys/bluetooth/lib/Kconfig)
if BT_EAD
module = BT_EAD module = BT_EAD
module-str = "Bluetooth Encrypted Advertising Data" module-str = "Bluetooth Encrypted Advertising Data"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_EAD
# HOST (subsys/bluetooth/host/Kconfig) # HOST (subsys/bluetooth/host/Kconfig)
if BT_DF
module = BT_DF module = BT_DF
module-str = "Bluetooth Direction Finding" module-str = "Bluetooth Direction Finding"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_DF
if BT_SETTINGS
module = BT_SETTINGS module = BT_SETTINGS
module-str = "Bluetooth storage" module-str = "Bluetooth storage"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_SETTINGS
module = BT_HCI_CORE module = BT_HCI_CORE
module-str = "Bluetooth HCI core" module-str = "Bluetooth HCI core"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
if BT_CONN
module = BT_CONN module = BT_CONN
module-str = "Bluetooth connection" module-str = "Bluetooth connection"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_CONN
if BT_ISO
module = BT_ISO module = BT_ISO
module-str = "ISO channel" module-str = "ISO channel"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_ISO
module = BT_KEYS module = BT_KEYS
module-str = "Bluetooth security keys" module-str = "Bluetooth security keys"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
if BT_SMP
module = BT_SMP module = BT_SMP
module-str = "Bluetooth Security Manager Protocol" module-str = "Bluetooth Security Manager Protocol"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_SMP
module = BT_SERVICE module = BT_SERVICE
module-str = "Bluetooth Services" module-str = "Bluetooth Services"
@ -282,13 +366,16 @@ source "subsys/logging/Kconfig.template.log_config_inherit"
# CONTROLLER (subsys/bluetooth/controller/Kconfig) # CONTROLLER (subsys/bluetooth/controller/Kconfig)
if BT_ISO
module = BT_CTLR_ISOAL module = BT_CTLR_ISOAL
module-str = "Bluetooth Controller ISO-AL" module-str = "Bluetooth Controller ISO-AL"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_ISO
endmenu # Others endmenu # Others
menu "BR/EDR" if BT_CLASSIC
menu "Bluetooth Classic"
module = BT_RFCOMM module = BT_RFCOMM
module-str = "Bluetooth RFCOMM" module-str = "Bluetooth RFCOMM"
@ -314,10 +401,12 @@ module = BT_SDP
module-str = "Bluetooth Service Discovery Protocol (SDP)" module-str = "Bluetooth Service Discovery Protocol (SDP)"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endmenu # BR/EDR endmenu # Bluetooth Classic
endif # BT_CLASSIC
# MESH (subsys/bluetooth/mesh/Kconfig) # MESH (subsys/bluetooth/mesh/Kconfig)
if BT_MESH
menu "Mesh" menu "Mesh"
module = BT_MESH module = BT_MESH
@ -401,46 +490,61 @@ module-str = "Configuration"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endmenu # Mesh endmenu # Mesh
endif # BT_MESH
menu "Services" menu "Services"
# BAS # BAS
if BT_BAS
module = BT_BAS module = BT_BAS
module-str = BAS module-str = BAS
source "subsys/logging/Kconfig.template.log_config" source "subsys/logging/Kconfig.template.log_config"
endif # BT_BAS
# HRS # HRS
if BT_HRS
module = BT_HRS module = BT_HRS
module-str = HRS module-str = HRS
source "subsys/logging/Kconfig.template.log_config" source "subsys/logging/Kconfig.template.log_config"
endif # BT_HRS
# TPS # TPS
if BT_TPS
module = BT_TPS module = BT_TPS
module-str = TPS module-str = TPS
source "subsys/logging/Kconfig.template.log_config" source "subsys/logging/Kconfig.template.log_config"
endif # BT_TPS
# IAS # IAS
if BT_IAS_CLIENT
module = BT_IAS_CLIENT module = BT_IAS_CLIENT
module-str = "Immediate Alert Service Client" module-str = "Immediate Alert Service Client"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_IAS_CLIENT
if BT_IAS
module = BT_IAS module = BT_IAS
module-str = IAS module-str = IAS
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config" source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config"
endif # BT_IAS
# OTS (subsys/bluetooth/services/ots/Kconfig) # OTS (subsys/bluetooth/services/ots/Kconfig)
if BT_OTS_CLIENT
module = BT_OTS_CLIENT module = BT_OTS_CLIENT
module-str = "Object Transfer Service Client" module-str = "Object Transfer Service Client"
source "subsys/logging/Kconfig.template.log_config_inherit" source "subsys/logging/Kconfig.template.log_config_inherit"
endif # BT_OTS_CLIENT
if BT_OTS
module = BT_OTS module = BT_OTS
module-str = BT_OTS module-str = BT_OTS
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config" source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config"
endif # BT_OTS
endmenu # Services endmenu # Services