Skip to contentSkip to conversation

Bluetooth: Introduce BT_HCIUART_RTL configuration option

PATCH In review Marcel Holtmann 2 participants 2 messages Aug 8, 2018 – Aug 9, 2018 Bluetooth drivers

lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 1/1 Bluetooth: Introduce BT_HCIUART_RTL configuration option

Like all the other UART protocols, introduce a configuration option for Realtek based serial devices.

---
 drivers/bluetooth/Kconfig | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
drivers/bluetooth/Kconfig +13 -1
index c3736103c2ac..3a050e02bcb3 100644
@@ -159,7 +159,6 @@ config BT_HCIUART_LL
 config BT_HCIUART_3WIRE
 	bool "Three-wire UART (H5) protocol support"
 	depends on BT_HCIUART
-	depends on BT_HCIUART_SERDEV
 	help
 	  The HCI Three-wire UART Transport Layer makes it possible to
 	  user the Bluetooth HCI over a serial port interface. The HCI
@@ -195,6 +194,19 @@ config BT_HCIUART_BCM
 
 	  Say Y here to compile support for Broadcom protocol.
 
+config BT_HCIUART_RTL
+	bool "Realtek protocol support"
+	depends on BT_HCIUART
+	depends on BT_HCIUART_SERDEV
+	depends on GPIOLIB
+	select BT_HCIUART_3WIRE
+	select BT_RTL
+	help
+	  The Realtek protocol support enables Bluetooth HCI over 3-Wire
+	  serial port internface for Realtek Bluetooth controllers.
+
+	  Say Y here to compile support for Realtek protocol.
+
 config BT_HCIUART_QCA
 	bool "Qualcomm Atheros protocol support"
 	depends on BT_HCIUART
Signature · 1 line
2.17.1
#1 lore raw

Hi Marcel,

drivers/bluetooth/Kconfig config BT_HCIUART_LL · line 164

Quoted 10 lines · Marcel Holtmann
drivers/bluetooth/Kconfig +0 -1
@@ -159,7 +159,6 @@ config BT_HCIUART_LL
 config BT_HCIUART_3WIRE
 	bool "Three-wire UART (H5) protocol support"
 	depends on BT_HCIUART
-	depends on BT_HCIUART_SERDEV
 	help
 	  The HCI Three-wire UART Transport Layer makes it possible to
 	  user the Bluetooth HCI over a serial port interface. The HCI

This still doesn't prevent someone from explicitly selecting BT_HCIUART_3WIRE (since it's not a virtual option like BT_RTL) but not selecting BT_HCIUART_SERDEV. Doing that will still result in this compiler warning:

drivers/bluetooth/hci_h5.c:934:36: warning: ‘h5_serdev_driver’ defined but not used [-Wunused-variable]

 static struct serdev_device_driver h5_serdev_driver = {
                                    ^~~~~~~~~~~~~~~~

So I think the dependency needs to either stay there, or then some #ifdefs need to be added to hci_h5.c.

Johan