Skip to contentSkip to conversation

Bluetooth: hci_uart: Add protocol support for Broadcom UART devices

PATCH In review Marcel Holtmann 1 participant 1 message Apr 6, 2015 Bluetooth drivers

lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH v2 9/10 Bluetooth: hci_uart: Add protocol support for Broadcom UART devices

This adds the protocol support for Broadcom based UART devices to enable firmware and patchram download procedure. It is a pretty straight forward H:4 driver with the exception of actually having its own setup and address configuration callbacks.

---
 drivers/bluetooth/Kconfig     |   1 +
 drivers/bluetooth/hci_bcm.c   | 115 ++++++++++++++++++++++++++++++++++++++++++
 drivers/bluetooth/hci_ldisc.c |   6 +++
 drivers/bluetooth/hci_uart.h  |   5 ++
 4 files changed, 127 insertions(+)
drivers/bluetooth/Kconfig +1 -0
index ea76031eb93f..93351b91bbb4 100644
@@ -122,6 +122,7 @@ config BT_HCIUART_INTEL
 config BT_HCIUART_BCM
 	bool "Broadcom protocol support"
 	depends on BT_HCIUART
+	select BT_HCIUART_H4
 	select BT_BCM
 	help
 	  The Broadcom protocol support enables Bluetooth HCI over serial
drivers/bluetooth/hci_bcm.c +115 -0

119 lines not on this page · raw message

drivers/bluetooth/hci_ldisc.c +6 -0
index b182ddc43dfe..a106c3e201e3 100644
@@ -679,6 +679,9 @@ static int __init hci_uart_init(void)
 #ifdef CONFIG_BT_HCIUART_3WIRE
 	h5_init();
 #endif
+#ifdef CONFIG_BT_HCIUART_BCM
+	bcm_init();
+#endif
 
 	return 0;
 }
@@ -702,6 +705,9 @@ static void __exit hci_uart_exit(void)
 #ifdef CONFIG_BT_HCIUART_3WIRE
 	h5_deinit();
 #endif
+#ifdef CONFIG_BT_HCIUART_BCM
+	bcm_deinit();
+#endif
 
 	/* Release tty registration of line discipline */
 	err = tty_unregister_ldisc(N_HCI);
drivers/bluetooth/hci_uart.h +5 -0
index 466798acf049..a3108abce5d3 100644
@@ -128,3 +128,8 @@ int h5_deinit(void);
 #ifdef CONFIG_BT_HCIUART_INTEL
 int intel_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr);
 #endif
+
+#ifdef CONFIG_BT_HCIUART_BCM
+int bcm_init(void);
+int bcm_deinit(void);
+#endif
Signature · 1 line
2.1.0