Bluetooth: btusb: Move Intel firmware download into common module
Marcel Holtmann
maintainerPATCH 1/1 Bluetooth: btusb: Move Intel firmware download into common module
The Intel firmware download code for the new generation of devices can be shared between USB and UART devices. And so move it into the generic module for Intel Bluetooth support.
This also adds turns the support for the new Intel controllers into an optional feature. It can be enabled/disabled if needed. For backwards compatibility with older kernel configurations, the new option defaults to yes.
Signed-off-by Marcel Holtmann <[email protected]>
--- drivers/bluetooth/Kconfig | 12 ++ drivers/bluetooth/btintel.c | 382 +++++++++++++++++++++++++++++++++++++++++++ drivers/bluetooth/btintel.h | 7 + drivers/bluetooth/btusb.c | 388 +++----------------------------------------- 4 files changed, 421 insertions(+), 368 deletions(-)
drivers/bluetooth/Kconfig +12 -0
@@ -4,6 +4,7 @@ menu "Bluetooth device drivers" config BT_INTEL tristate + select FW_LOADER config BT_BCM tristate
@@ -21,6 +22,17 @@ config BT_HCIBTUSB Say Y here to compile support for Bluetooth USB devices into the kernel or say M to compile it as module (btusb). +config BT_HCIBTUSB_INTEL + bool "Intel protocol support" + depends on BT_HCIBTUSB + select BT_INTEL + default y + help + The Intel protocol support enables firmware download and + configuration for Intel Bluetooth controllers. + + Say Y here to compile support for Intel protocol. + config BT_HCIBTUSB_BCM bool "Broadcom protocol support" depends on BT_HCIBTUSB
drivers/bluetooth/btintel.c +382 -0
395 lines not on this page · raw message
drivers/bluetooth/btintel.h +7 -0
@@ -66,6 +66,8 @@ int btintel_check_bdaddr(struct hci_dev *hdev);int btintel_set_bdaddr (struct hci_dev *hdev,const bdaddr_t *bdaddr);void btintel_hw_error (struct hci_dev *hdev,u8 code); +int btintel_setup (struct hci_dev *hdev,unsigned long *flags); +#else static inline int btintel_check_bdaddr (struct hci_dev *hdev)
@@ -82,4 +84,9 @@ static inline void btintel_hw_error(struct hci_dev *hdev, u8 code) { } +static inline int btintel_setup (struct hci_dev *hdev,unsigned long *flags) +{ +return 0 ; +} +#endif
drivers/bluetooth/btusb.c +20 -368
449 lines not on this page · raw message
Signature · 1 line
2.1.0