summaryrefslogtreecommitdiff
path: root/drivers/bluetooth/hci_uart.h
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2017-03-28 18:59:35 +0300
committerMarcel Holtmann <marcel@holtmann.org>2017-04-12 23:12:17 +0300
commit82f5169bf3d3b5d8f7f7c437d2d83435173cb638 (patch)
treec1ee9058542bbb3fdea4ca20e9791ff2878cc45f /drivers/bluetooth/hci_uart.h
parentaeac30140694824f26d14655271e1dcf3e32fd49 (diff)
downloadlinux-82f5169bf3d3b5d8f7f7c437d2d83435173cb638.tar.xz
Bluetooth: hci_uart: add serdev driver support library
This adds library functions for serdev based BT drivers. This is largely copied from hci_ldisc.c and modified to use serdev calls. There's a little bit of duplication, but I avoided intermixing this as the ldisc code should eventually go away. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Marcel Holtmann <marcel@holtmann.org> Cc: Gustavo Padovan <gustavo@padovan.org> Cc: Johan Hedberg <johan.hedberg@gmail.com> Cc: linux-bluetooth@vger.kernel.org Acked-by: Pavel Machek <pavel@ucw.cz> [Fix style issues reported by Pavel] Signed-off-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/hci_uart.h')
-rw-r--r--drivers/bluetooth/hci_uart.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/bluetooth/hci_uart.h b/drivers/bluetooth/hci_uart.h
index 4aff50960cac..1b41c661bbb8 100644
--- a/drivers/bluetooth/hci_uart.h
+++ b/drivers/bluetooth/hci_uart.h
@@ -58,6 +58,7 @@
#define HCI_UART_VND_DETECT 5
struct hci_uart;
+struct serdev_device;
struct hci_uart_proto {
unsigned int id;
@@ -77,6 +78,7 @@ struct hci_uart_proto {
struct hci_uart {
struct tty_struct *tty;
+ struct serdev_device *serdev;
struct hci_dev *hdev;
unsigned long flags;
unsigned long hdev_flags;
@@ -108,6 +110,8 @@ struct hci_uart {
int hci_uart_register_proto(const struct hci_uart_proto *p);
int hci_uart_unregister_proto(const struct hci_uart_proto *p);
+int hci_uart_register_device(struct hci_uart *hu, const struct hci_uart_proto *p);
+
int hci_uart_tx_wakeup(struct hci_uart *hu);
int hci_uart_init_ready(struct hci_uart *hu);
void hci_uart_init_tty(struct hci_uart *hu);