zephyr/tests/bluetooth/controller
Rubin Gerritsen 417a9e81ec Bluetooth: Controller: Add device tree dependency to selection
This commit makes the device tree configuration decide
which link layer is compiled in. We do this to avoid
hard-to-understand linker errors referencing device tree nodes.

The following configuration creates a difficult to parse
linker error:
* BT_LL_CHOICE contains multiple entries, BT_LL_SW_SPLIT
  is selected.
* Each BT_LL_CHOICE has its own unique device tree node with its
  own "compatible".
* Only one of the link layer device tree nodes has status "okay",
  but not the one corresponding to BT_LL_SW_SPLIT.

The linker error indicates that code using the HCI driver fails
to link with the controller. This because the HCI driver device
tree node references the link layer selected in devicetree which
is not compiled in.

By adding a dependendency to the device tree node, this can no longer
happen. Instead, if BT_LL_SW_SPLIT is now selected in a configuration
file, a Kconfig warning will be issued:

```
warning: The choice symbol BT_LL_SW_SPLIT
(defined at subsys/bluetooth/controller/Kconfig:129) was
selected (set =y), but BT_LL_SOFTDEVICE (defined at
/home/ruge/ncs/nrf/subsys/bluetooth/controller/Kconfig:11)
ended up as the choice selection.
```

This should be easier to understand than:

```
...(hci_core.c.obj):(.data.bt_dev+0x16c):
undefined reference to `__device_dts_ord_132'
```

After this commit we should consider getting rid of link layer
selection from Kconfig completely as the link layer is in practice
selected through device tree.

Unit tests have been updated to satisfy the dts dependency.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-09-26 11:10:22 +01:00
..
common Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ctrl_api Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ctrl_chmu Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ctrl_cis_create Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ctrl_cis_terminate Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ctrl_collision Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ctrl_conn_update Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ctrl_cte_req Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ctrl_data_length_update Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ctrl_encrypt Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ctrl_feature_exchange Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ctrl_hci Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ctrl_invalid Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ctrl_isoal Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ctrl_le_ping Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ctrl_min_used_chans Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ctrl_phy_update Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ctrl_sca_update Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ctrl_sw_privacy Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ctrl_sw_privacy_unit Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ctrl_terminate Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ctrl_tx_buffer_alloc Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ctrl_tx_queue Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ctrl_unsupported Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ctrl_user_ext Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ctrl_version Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
ll_settings Bluetooth: Controller: Add device tree dependency to selection 2024-09-26 11:10:22 +01:00
mock_ctrl Bluetooth: Controller: Remove redundant HAL_TICKER_CNTR_CLK_FREQ_HZ 2024-08-30 11:47:15 -04:00
uut bluetooth: controller: update unittests for LLCP to use proper ZTEST API 2023-02-24 11:46:39 +01:00