]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Bluetooth: Add support for external configuration with UART driver
authorMarcel Holtmann <marcel@holtmann.org>
Fri, 11 Jul 2014 05:12:58 +0000 (07:12 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Fri, 11 Jul 2014 10:59:50 +0000 (13:59 +0300)
The quirk for enabling external configuration with UART needs to be
provided via the HCI UART flags. Add a new flag for it and declare
it as valid.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
drivers/bluetooth/hci_ldisc.c
drivers/bluetooth/hci_uart.h

index a49ee1b4243940e45f44ceca542519b21c805f81..401a3be57cdadb1fa223c45909cc9e658cc2874f 100644 (file)
@@ -431,6 +431,9 @@ static int hci_uart_register_dev(struct hci_uart *hu)
        if (test_bit(HCI_UART_RAW_DEVICE, &hu->hdev_flags))
                set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks);
 
+       if (test_bit(HCI_UART_EXT_CONFIG, &hu->hdev_flags))
+               set_bit(HCI_QUIRK_EXTERNAL_CONFIG, &hdev->quirks);
+
        if (!test_bit(HCI_UART_RESET_ON_INIT, &hu->hdev_flags))
                set_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);
 
@@ -482,7 +485,8 @@ static int hci_uart_set_flags(struct hci_uart *hu, unsigned long flags)
        unsigned long valid_flags = BIT(HCI_UART_RAW_DEVICE) |
                                    BIT(HCI_UART_RESET_ON_INIT) |
                                    BIT(HCI_UART_CREATE_AMP) |
-                                   BIT(HCI_UART_INIT_PENDING);
+                                   BIT(HCI_UART_INIT_PENDING) |
+                                   BIT(HCI_UART_EXT_CONFIG);
 
        if ((flags & ~valid_flags))
                return -EINVAL;
index 12df101ca942d1889280660e43ef37cec55c9340..247488edcbf93711168c9ee072a97edf923ecd9c 100644 (file)
@@ -48,6 +48,7 @@
 #define HCI_UART_RESET_ON_INIT 1
 #define HCI_UART_CREATE_AMP    2
 #define HCI_UART_INIT_PENDING  3
+#define HCI_UART_EXT_CONFIG    4
 
 struct hci_uart;