linux/drivers/bluetooth/hci_uart.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 *
 *  Bluetooth HCI UART driver
 *
 *  Copyright (C) 2000-2001  Qualcomm Incorporated
 *  Copyright (C) 2002-2003  Maxim Krasnyansky <[email protected]>
 *  Copyright (C) 2004-2005  Marcel Holtmann <[email protected]>
 */

#ifndef N_HCI
#define N_HCI
#endif

/* Ioctls */
#define HCIUARTSETPROTO
#define HCIUARTGETPROTO
#define HCIUARTGETDEVICE
#define HCIUARTSETFLAGS
#define HCIUARTGETFLAGS

/* UART protocols */
#define HCI_UART_MAX_PROTO

#define HCI_UART_H4
#define HCI_UART_BCSP
#define HCI_UART_3WIRE
#define HCI_UART_H4DS
#define HCI_UART_LL
#define HCI_UART_ATH3K
#define HCI_UART_INTEL
#define HCI_UART_BCM
#define HCI_UART_QCA
#define HCI_UART_AG6XX
#define HCI_UART_NOKIA
#define HCI_UART_MRVL
#define HCI_UART_AML

#define HCI_UART_RAW_DEVICE
#define HCI_UART_RESET_ON_INIT
#define HCI_UART_INIT_PENDING
#define HCI_UART_EXT_CONFIG
#define HCI_UART_VND_DETECT

struct hci_uart;
struct serdev_device;

struct hci_uart_proto {};

struct hci_uart {};

/* HCI_UART proto flag bits */
#define HCI_UART_PROTO_SET
#define HCI_UART_REGISTERED
#define HCI_UART_PROTO_READY
#define HCI_UART_NO_SUSPEND_NOTIFIER

/* TX states  */
#define HCI_UART_SENDING
#define HCI_UART_TX_WAKEUP

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_priv(struct hci_uart *hu,
				  const struct hci_uart_proto *p,
				  int sizeof_priv);

static inline int hci_uart_register_device(struct hci_uart *hu,
					   const struct hci_uart_proto *p)
{}

void hci_uart_unregister_device(struct hci_uart *hu);

int hci_uart_tx_wakeup(struct hci_uart *hu);
int hci_uart_wait_until_sent(struct hci_uart *hu);
int hci_uart_init_ready(struct hci_uart *hu);
void hci_uart_init_work(struct work_struct *work);
void hci_uart_set_baudrate(struct hci_uart *hu, unsigned int speed);
bool hci_uart_has_flow_control(struct hci_uart *hu);
void hci_uart_set_flow_control(struct hci_uart *hu, bool enable);
void hci_uart_set_speeds(struct hci_uart *hu, unsigned int init_speed,
			 unsigned int oper_speed);

#ifdef CONFIG_BT_HCIUART_H4
int h4_init(void);
int h4_deinit(void);

struct h4_recv_pkt {};

#define H4_RECV_ACL \

#define H4_RECV_SCO

#define H4_RECV_EVENT

#define H4_RECV_ISO \

struct sk_buff *h4_recv_buf(struct hci_dev *hdev, struct sk_buff *skb,
			    const unsigned char *buffer, int count,
			    const struct h4_recv_pkt *pkts, int pkts_count);
#endif

#ifdef CONFIG_BT_HCIUART_BCSP
int bcsp_init(void);
int bcsp_deinit(void);
#endif

#ifdef CONFIG_BT_HCIUART_LL
int ll_init(void);
int ll_deinit(void);
#endif

#ifdef CONFIG_BT_HCIUART_ATH3K
int ath_init(void);
int ath_deinit(void);
#endif

#ifdef CONFIG_BT_HCIUART_3WIRE
int h5_init(void);
int h5_deinit(void);
#endif

#ifdef CONFIG_BT_HCIUART_INTEL
int intel_init(void);
int intel_deinit(void);
#endif

#ifdef CONFIG_BT_HCIUART_BCM
int bcm_init(void);
int bcm_deinit(void);
#endif

#ifdef CONFIG_BT_HCIUART_QCA
int qca_init(void);
int qca_deinit(void);
#endif

#ifdef CONFIG_BT_HCIUART_AG6XX
int ag6xx_init(void);
int ag6xx_deinit(void);
#endif

#ifdef CONFIG_BT_HCIUART_MRVL
int mrvl_init(void);
int mrvl_deinit(void);
#endif

#ifdef CONFIG_BT_HCIUART_AML
int aml_init(void);
int aml_deinit(void);
#endif