From c4a6e6d225c1d4782ca40aa87e75202e23d4e7c3 Mon Sep 17 00:00:00 2001 From: Torsten Rasmussen Date: Fri, 10 Sep 2021 13:54:08 +0200 Subject: [PATCH] drivers: create BT_DRIVERS Kconfig entry Fixes: #38403 Changing Bluetooth drivers from being a menu into a menuconfig. This aligns the Bluetooth driver configuration with other driver configurations as well as provides a setting which identifies if Bluetooth drivers has been enable. This further helps to avoid empty Zephyr libraries for bluetooth samples. Signed-off-by: Torsten Rasmussen --- drivers/CMakeLists.txt | 2 +- drivers/bluetooth/Kconfig | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/CMakeLists.txt b/drivers/CMakeLists.txt index f5423ac32f0422..f6ee4d621f8b16 100644 --- a/drivers/CMakeLists.txt +++ b/drivers/CMakeLists.txt @@ -49,7 +49,7 @@ add_subdirectory_ifdef(CONFIG_PM_CPU_OPS pm_cpu_ops) add_subdirectory_ifdef(CONFIG_FLASH_HAS_DRIVER_ENABLED flash) add_subdirectory_ifdef(CONFIG_SERIAL_HAS_DRIVER serial) -add_subdirectory_ifdef(CONFIG_BT bluetooth) +add_subdirectory_ifdef(CONFIG_BT_DRIVERS bluetooth) add_subdirectory_ifdef(CONFIG_NETWORKING net) add_subdirectory_ifdef(CONFIG_NET_L2_ETHERNET ethernet) add_subdirectory_ifdef(CONFIG_ENTROPY_HAS_DRIVER entropy) diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig index edb50e29572a04..b68f20ec25888d 100644 --- a/drivers/bluetooth/Kconfig +++ b/drivers/bluetooth/Kconfig @@ -9,9 +9,13 @@ # Controller support is an HCI driver in itself, so these HCI driver # options are only applicable if controller support hasn't been enabled. -menu "Bluetooth Drivers" +menuconfig BT_DRIVERS + bool "Bluetooth Drivers" + default y depends on BT && !BT_CTLR +if BT_DRIVERS + if BT_HCI source "drivers/bluetooth/hci/Kconfig" endif @@ -20,4 +24,4 @@ if BT_CUSTOM # Insert here any custom (non-HCI) offload drives endif -endmenu +endif # BT_DRIVERS