aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/hci_uart.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/bluetooth/hci_uart.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'drivers/bluetooth/hci_uart.h')
-rw-r--r--drivers/bluetooth/hci_uart.h82
1 files changed, 82 insertions, 0 deletions
diff --git a/drivers/bluetooth/hci_uart.h b/drivers/bluetooth/hci_uart.h
new file mode 100644
index 000000000000..0a57d72790ec
--- /dev/null
+++ b/drivers/bluetooth/hci_uart.h
@@ -0,0 +1,82 @@
1/*
2 BlueZ - Bluetooth protocol stack for Linux
3 Copyright (C) 2000-2001 Qualcomm Incorporated
4
5 Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License version 2 as
9 published by the Free Software Foundation;
10
11 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
12 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
14 IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
15 CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
16 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19
20 ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
21 COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
22 SOFTWARE IS DISCLAIMED.
23*/
24
25/*
26 * $Id: hci_uart.h,v 1.2 2002/09/09 01:17:32 maxk Exp $
27 */
28
29#ifndef N_HCI
30#define N_HCI 15
31#endif
32
33/* Ioctls */
34#define HCIUARTSETPROTO _IOW('U', 200, int)
35#define HCIUARTGETPROTO _IOR('U', 201, int)
36
37/* UART protocols */
38#define HCI_UART_MAX_PROTO 4
39
40#define HCI_UART_H4 0
41#define HCI_UART_BCSP 1
42#define HCI_UART_3WIRE 2
43#define HCI_UART_H4DS 3
44
45#ifdef __KERNEL__
46struct hci_uart;
47
48struct hci_uart_proto {
49 unsigned int id;
50 int (*open)(struct hci_uart *hu);
51 int (*close)(struct hci_uart *hu);
52 int (*flush)(struct hci_uart *hu);
53 int (*recv)(struct hci_uart *hu, void *data, int len);
54 int (*enqueue)(struct hci_uart *hu, struct sk_buff *skb);
55 struct sk_buff *(*dequeue)(struct hci_uart *hu);
56};
57
58struct hci_uart {
59 struct tty_struct *tty;
60 struct hci_dev *hdev;
61 unsigned long flags;
62
63 struct hci_uart_proto *proto;
64 void *priv;
65
66 struct sk_buff *tx_skb;
67 unsigned long tx_state;
68 spinlock_t rx_lock;
69};
70
71/* HCI_UART flag bits */
72#define HCI_UART_PROTO_SET 0
73
74/* TX states */
75#define HCI_UART_SENDING 1
76#define HCI_UART_TX_WAKEUP 2
77
78int hci_uart_register_proto(struct hci_uart_proto *p);
79int hci_uart_unregister_proto(struct hci_uart_proto *p);
80int hci_uart_tx_wakeup(struct hci_uart *hu);
81
82#endif /* __KERNEL__ */