diff --git a/drivers/bluetooth/hci/Kconfig b/drivers/bluetooth/hci/Kconfig index d3315bd6eea..8987f75045d 100644 --- a/drivers/bluetooth/hci/Kconfig +++ b/drivers/bluetooth/hci/Kconfig @@ -131,3 +131,16 @@ config BT_DRIVER_QUIRK_NO_AUTO_DLE This has to be enabled when the BLE controller connected is Zephyr open source controller. + +config BT_HCI_SETUP + bool + help + Enable the HCI vendor-specific Setup function. + + This option has to be enabled when the BT Controller requires execution + of the vendor-specific commands sequence to initialize the BT Controller + before the BT Host executes a Reset sequence. + + The user should generally avoid changing it via menuconfig or in + configuration files. This option are enabled by the vendor-specific + HCI extension, where the Setup function is implemented. diff --git a/include/drivers/bluetooth/hci_driver.h b/include/drivers/bluetooth/hci_driver.h index 7f1fd6ec810..16aaf454bd4 100644 --- a/include/drivers/bluetooth/hci_driver.h +++ b/include/drivers/bluetooth/hci_driver.h @@ -185,6 +185,21 @@ struct bt_hci_driver { * @return 0 on success or negative error number on failure. */ int (*send)(struct net_buf *buf); + +#if defined(CONFIG_BT_HCI_SETUP) || defined(__DOXYGEN__) + /** + * @brief HCI vendor-specific setup + * + * Executes vendor-specific commands sequence to initialize + * BT Controller before BT Host executes Reset sequence. + * + * @note @kconfig{CONFIG_BT_HCI_SETUP} must be selected for this + * field to be available. + * + * @return 0 on success or negative error number on failure. + */ + int (*setup)(void); +#endif /* defined(CONFIG_BT_HCI_SETUP) || defined(__DOXYGEN__)*/ }; /**