#include <asm/unaligned.h>
#include <linux/atomic.h>
#include <linux/clk.h>
#include <linux/firmware.h>
#include <linux/gpio/consumer.h>
#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/pinctrl/consumer.h>
#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>
#include <linux/serdev.h>
#include <linux/skbuff.h>
#include <linux/usb.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#include "h4_recv.h"
#include "btmtk.h"
#define VERSION …
#define MTK_STP_TLR_SIZE …
#define BTMTKUART_TX_STATE_ACTIVE …
#define BTMTKUART_TX_STATE_WAKEUP …
#define BTMTKUART_TX_WAIT_VND_EVT …
#define BTMTKUART_REQUIRED_WAKEUP …
#define BTMTKUART_FLAG_STANDALONE_HW …
struct mtk_stp_hdr { … } __packed;
struct btmtkuart_data { … };
struct btmtkuart_dev { … };
#define btmtkuart_is_standalone(bdev) …
#define btmtkuart_is_builtin_soc(bdev) …
static int mtk_hci_wmt_sync(struct hci_dev *hdev,
struct btmtk_hci_wmt_params *wmt_params)
{ … }
static int btmtkuart_recv_event(struct hci_dev *hdev, struct sk_buff *skb)
{ … }
static const struct h4_recv_pkt mtk_recv_pkts[] = …;
static void btmtkuart_tx_work(struct work_struct *work)
{ … }
static void btmtkuart_tx_wakeup(struct btmtkuart_dev *bdev)
{ … }
static const unsigned char *
mtk_stp_split(struct btmtkuart_dev *bdev, const unsigned char *data, int count,
int *sz_h4)
{ … }
static void btmtkuart_recv(struct hci_dev *hdev, const u8 *data, size_t count)
{ … }
static size_t btmtkuart_receive_buf(struct serdev_device *serdev,
const u8 *data, size_t count)
{ … }
static void btmtkuart_write_wakeup(struct serdev_device *serdev)
{ … }
static const struct serdev_device_ops btmtkuart_client_ops = …;
static int btmtkuart_open(struct hci_dev *hdev)
{ … }
static int btmtkuart_close(struct hci_dev *hdev)
{ … }
static int btmtkuart_flush(struct hci_dev *hdev)
{ … }
static int btmtkuart_func_query(struct hci_dev *hdev)
{ … }
static int btmtkuart_change_baudrate(struct hci_dev *hdev)
{ … }
static int btmtkuart_setup(struct hci_dev *hdev)
{ … }
static int btmtkuart_shutdown(struct hci_dev *hdev)
{ … }
static int btmtkuart_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
{ … }
static int btmtkuart_parse_dt(struct serdev_device *serdev)
{ … }
static int btmtkuart_probe(struct serdev_device *serdev)
{ … }
static void btmtkuart_remove(struct serdev_device *serdev)
{ … }
static const struct btmtkuart_data mt7622_data __maybe_unused = …;
static const struct btmtkuart_data mt7663_data __maybe_unused = …;
static const struct btmtkuart_data mt7668_data __maybe_unused = …;
#ifdef CONFIG_OF
static const struct of_device_id mtk_of_match_table[] = …;
MODULE_DEVICE_TABLE(of, mtk_of_match_table);
#endif
static struct serdev_device_driver btmtkuart_driver = …;
module_serdev_device_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_VERSION(…);
MODULE_LICENSE(…) …;