#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/firmware.h>
#include <linux/interrupt.h>
#include <linux/ptrace.h>
#include <linux/poll.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/signal.h>
#include <linux/ioctl.h>
#include <linux/of.h>
#include <linux/serdev.h>
#include <linux/skbuff.h>
#include <linux/ti_wilink_st.h>
#include <linux/clk.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#include <linux/gpio/consumer.h>
#include <linux/nvmem-consumer.h>
#include "hci_uart.h"
#define HCI_VS_WRITE_BD_ADDR …
#define HCI_VS_UPDATE_UART_HCI_BAUDRATE …
#define HCILL_GO_TO_SLEEP_IND …
#define HCILL_GO_TO_SLEEP_ACK …
#define HCILL_WAKE_UP_IND …
#define HCILL_WAKE_UP_ACK …
enum hcill_states_e { … };
struct ll_device { … };
struct ll_struct { … };
static int send_hcill_cmd(u8 cmd, struct hci_uart *hu)
{ … }
static int ll_open(struct hci_uart *hu)
{ … }
static int ll_flush(struct hci_uart *hu)
{ … }
static int ll_close(struct hci_uart *hu)
{ … }
static void __ll_do_awake(struct ll_struct *ll)
{ … }
static void ll_device_want_to_wakeup(struct hci_uart *hu)
{ … }
static void ll_device_want_to_sleep(struct hci_uart *hu)
{ … }
static void ll_device_woke_up(struct hci_uart *hu)
{ … }
static int ll_enqueue(struct hci_uart *hu, struct sk_buff *skb)
{ … }
static int ll_recv_frame(struct hci_dev *hdev, struct sk_buff *skb)
{ … }
#define LL_RECV_SLEEP_IND …
#define LL_RECV_SLEEP_ACK …
#define LL_RECV_WAKE_IND …
#define LL_RECV_WAKE_ACK …
static const struct h4_recv_pkt ll_recv_pkts[] = …;
static int ll_recv(struct hci_uart *hu, const void *data, int count)
{ … }
static struct sk_buff *ll_dequeue(struct hci_uart *hu)
{ … }
#if IS_ENABLED(CONFIG_SERIAL_DEV_BUS)
static int read_local_version(struct hci_dev *hdev)
{ … }
static int send_command_from_firmware(struct ll_device *lldev,
struct hci_command *cmd)
{ … }
static int download_firmware(struct ll_device *lldev)
{ … }
static int ll_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr)
{ … }
static int ll_setup(struct hci_uart *hu)
{ … }
static const struct hci_uart_proto llp;
static int hci_ti_probe(struct serdev_device *serdev)
{ … }
static void hci_ti_remove(struct serdev_device *serdev)
{ … }
static const struct of_device_id hci_ti_of_match[] = …;
MODULE_DEVICE_TABLE(of, hci_ti_of_match);
static struct serdev_device_driver hci_ti_drv = …;
#else
#define ll_setup …
#endif
static const struct hci_uart_proto llp = …;
int __init ll_init(void)
{ … }
int __exit ll_deinit(void)
{ … }