Skip to contentSkip to conversation

Bluetooth: btusb: Move Intel firmware download into common module

PATCH New Marcel Holtmann 1 participant 1 message Apr 5, 2015 Bluetooth drivers

lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 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.

---
 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
index 6141e40ee1cd..f4d5714668e4 100644
@@ -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
index 698e4270f88e..8068846c9d07 100644
@@ -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