Bluetooth: hci_uart: Add protocol support for Nokia UART devices
Marcel Holtmann
maintainerRFC v2 1/1 Bluetooth: hci_uart: Add protocol support for Nokia UART devices
WARNING: This driver is not complete. It only contains the H4+ protocol part and not the serial line or GPIO setup.
Signed-off-by Marcel Holtmann <[email protected]>
--- drivers/bluetooth/Kconfig | 12 ++ drivers/bluetooth/Makefile | 1 + drivers/bluetooth/hci_ldisc.c | 6 + drivers/bluetooth/hci_nok.c | 346 ++++++++++++++++++++++++++++++++++++++++++ drivers/bluetooth/hci_uart.h | 8 +- 5 files changed, 372 insertions(+), 1 deletion(-) create mode 100644 drivers/bluetooth/hci_nok.c
drivers/bluetooth/Kconfig +12 -0
@@ -135,6 +135,18 @@ config BT_HCIUART_BCM Say Y here to compile support for Broadcom protocol. +config BT_HCIUART_NOK + bool "Nokia protocol support" + depends on BT_HCIUART + select BT_HCIUART_H4 + select BT_BCM + help + The Nokia protocol support enables Bluetooth HCI over serial + port interface for Bluetooth devices in Nokia products. This + is sometimes also referenced H4+ UART protocol. + + Say Y here to compile support for Nokia protocol. + config BT_HCIBCM203X tristate "HCI BCM203x USB driver" depends on USB
drivers/bluetooth/Makefile +1 -0
@@ -33,6 +33,7 @@ hci_uart-$(CONFIG_BT_HCIUART_ATH3K) += hci_ath.o hci_uart-$(CONFIG_BT_HCIUART_3WIRE) += hci_h5.o hci_uart-$(CONFIG_BT_HCIUART_INTEL) += hci_intel.o hci_uart-$(CONFIG_BT_HCIUART_BCM) += hci_bcm.o +hci_uart-$(CONFIG_BT_HCIUART_NOK) += hci_nok.o hci_uart-objs := $(hci_uart-y) ccflags-y += -D__CHECK_ENDIAN__
drivers/bluetooth/hci_ldisc.c +6 -0
@@ -684,6 +684,9 @@ static int __init hci_uart_init(void)#ifdef CONFIG_BT_HCIUART_BCM bcm_init ();#endif +#ifdef CONFIG_BT_HCIUART_NOK +nok_init (); +#endif return 0 ; }
@@ -710,6 +713,9 @@ static void __exit hci_uart_exit(void)#ifdef CONFIG_BT_HCIUART_BCM bcm_deinit ();#endif +#ifdef CONFIG_BT_HCIUART_NOK +nok_deinit (); +#endif /* Release tty registration of line discipline */ err =tty_unregister_ldisc (N_HCI );
drivers/bluetooth/hci_nok.c new file +346 -0
346 lines not on this page · raw message
drivers/bluetooth/hci_uart.h +7 -1
@@ -35,7 +35,7 @@#define HCIUARTGETFLAGS _IOR('U', 204, int)/* UART protocols */ -#define HCI_UART_MAX_PROTO 8 +#define HCI_UART_MAX_PROTO 9#define HCI_UART_H4 0#define HCI_UART_BCSP 1
@@ -45,6 +45,7 @@#define HCI_UART_ATH3K 5#define HCI_UART_INTEL 6#define HCI_UART_BCM 7 +#define HCI_UART_NOK 8#define HCI_UART_RAW_DEVICE 0#define HCI_UART_RESET_ON_INIT 1
@@ -160,3 +161,8 @@ int h5_deinit(void);int bcm_init (void );int bcm_deinit (void );#endif + +#ifdef CONFIG_BT_HCIUART_NOK +int nok_init (void ); +int nok_deinit (void ); +#endif
Signature · 1 line
2.1.0