-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bluetooth: Convert HCI drivers to use a proper Zephyr driver API #72323
Conversation
7bebbc5
to
a841b2a
Compare
4f65c0e
to
94a0e38
Compare
cb2bbdb
to
a963844
Compare
0ae93c5
to
54bde20
Compare
Convert the ipm_stm32wb.c HCI driver to the new HCI driver API. Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
Convert the Renesas DA1469X HCI driver to the new HCI driver API. Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
Convert the hci_nxp.c HCI driver to use the new HCI driver API. Also move the driver binding under dts/bindings/bluetooth, like all other HCI driver bindings. Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
Convert the slz_hci.c HCI driver to use the new HCI driver API. This also fixes the HCI bus type to correctly indicate VIRTUAL instead of UART. Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
Deprecate the bt_recv() and bt_hci_driver_register() APIs. There are no more users in the tree itself, but we should let any out of tree users migrate before removing these APIs completely. Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Update references to devicetree chosen properties and how devicetree nodes should be defined in order to enable the new HCI drivers. Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Document the changes coming with the new HCI driver API, and provide information for how to migrate existing drivers. Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
@jerome-pouiller @Thalley could you take another look? Due to the size of this PR it'd be better to get it in sooner rather than later, especially since the feature freeze is coming this week. Since there doesn't seem to be any fundamental objections to the architectural/API change introduced here, any follow-up fixes & cleanups could happen after the feature freeze as well. There are a couple of other open HCI driver PRs which conflict with this one, which also target the next release, so it'd be good to start merging these sooner rather than later so we get the conflicts resolved and everything merged on time. |
Indeed, and the number of commits easily hide comments on Github (...). I'd be OK with merging as is, but I would have to have at least #72323 (comment) resolved ASAP so that we can do things properly (which I believe was the main point of this change in the first place ;) ) |
@rugeGerritsen @aescolar @yeaissa @erwango @npal-cy @alwa-nordic please take a look ASAP, we would like to include this in Zephyr 3.7.0, which means merging it before this Friday |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beside my comment about efr32xg13
. This PR is fine for me.
The new driver API was introduced in zephyrproject-rtos/zephyr#72323. The driver was updated similar to how to the zephyr link layer was updated. Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Current status:
h4.c
samples/bluetooth/hci_uart_async/
to work with the new driver modelbt_read_static_addr()
. Taken care of by Bluetooth: Simplify Kconfig options and interface between the host and controller #72580BT_HAS_HCI_VS
,BT_HCI_VS
andBT_HCI_VS_EXT
(perhaps DTS properties?). Some preparation in Bluetooth: Simplify Kconfig options and interface between the host and controller #72580.unit_testing
"board" right now: Bluetooth: controller: Add BT_CTLR_HCI Kconfig option #72871ipc.c
userchan.c
h5.c
hci_ambiq.c
(and associated DT binding)hci_b91.c
: Bluetooth: drivers: Remove unmaintained B91 HCI driver #73289hci_esp32.c
hci_psoc6_bless.c
(and associated DT binding)hci_spi_st.c
(and associated DT binding)hci_stm32wba.c
ipm_stm32wb.c
(and associated DT binding)spi.c
hci_da1469x.c
hci_nxp.c
slz_hci.c
/chosen
propertiesnrf52_bsim
to use also UART for HCIsamples/
andtests/
that use the legacy HCI driver APIchoice
section for HCI driversBT_NO_DRIVER
Right now the host
hci_core.c
uses#if DT_HAS_CHOSEN(zephyr_bt_hci)
to separate the new-style HCI drivers from the legacy HCI driver support. The old API has been deprecated, but will only be removed after a deprecation period.The following drivers depend on "west blobs", so they're not covered by CI, but were manually compile tested:
hci_psoc6_bless.c
(west blobs fetch hal_infineon
)hci_esp32.c
(west blobs fetch hal_espressif
)hci_stm32wba.c
(west blobs fetch hal_stm32
doesn't work for me, see Bluetooth: Convert HCI drivers to use a proper Zephyr driver API #72323 (comment) )slz_hci.c
(west blobs fetch hal_silabs
, same problem for me as with stm32, i.e. had to manually download)What this PR doesn't try to tackle:
zephyr/drivers/bluetooth/hci/apollox_blue.c
Lines 289 to 333 in d3c0dfb
BT_HCI_ACL_FLOW_CONTROL
currently referencing specific HCI driversrecv
callback to the host, rather there needs to be another mechanism for the host to fetch data from the driver.Fixes #51503