2018-08-08 14:27:12

by Marcel Holtmann

[permalink] [raw]
Subject: [PATCH] Bluetooth: Introduce BT_HCIUART_RTL configuration option

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

Signed-off-by: Marcel Holtmann <[email protected]>
---
drivers/bluetooth/Kconfig | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig
index c3736103c2ac..3a050e02bcb3 100644
--- a/drivers/bluetooth/Kconfig
+++ b/drivers/bluetooth/Kconfig
@@ -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
--
2.17.1



2018-08-09 07:11:32

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: Introduce BT_HCIUART_RTL configuration option

Hi Marcel,

On Wed, Aug 08, 2018, Marcel Holtmann wrote:
> --- a/drivers/bluetooth/Kconfig
> +++ b/drivers/bluetooth/Kconfig
> @@ -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