linux/drivers/bluetooth/hci_nokia.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  Bluetooth HCI UART H4 driver with Nokia Extensions AKA Nokia H4+
 *
 *  Copyright (C) 2015 Marcel Holtmann <[email protected]>
 *  Copyright (C) 2015-2017 Sebastian Reichel <[email protected]>
 */

#include <linux/clk.h>
#include <linux/errno.h>
#include <linux/firmware.h>
#include <linux/gpio/consumer.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/pm_runtime.h>
#include <linux/serdev.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/types.h>
#include <asm/unaligned.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>

#include "hci_uart.h"
#include "btbcm.h"

#define VERSION

#define NOKIA_ID_BCM2048
#define NOKIA_ID_TI1271

#define FIRMWARE_BCM2048
#define FIRMWARE_TI1271

#define HCI_NOKIA_NEG_PKT
#define HCI_NOKIA_ALIVE_PKT
#define HCI_NOKIA_RADIO_PKT

#define HCI_NOKIA_NEG_HDR_SIZE
#define HCI_NOKIA_MAX_NEG_SIZE
#define HCI_NOKIA_ALIVE_HDR_SIZE
#define HCI_NOKIA_MAX_ALIVE_SIZE
#define HCI_NOKIA_RADIO_HDR_SIZE
#define HCI_NOKIA_MAX_RADIO_SIZE

#define NOKIA_PROTO_PKT
#define NOKIA_PROTO_BYTE

#define NOKIA_NEG_REQ
#define NOKIA_NEG_ACK
#define NOKIA_NEG_NAK

#define H4_TYPE_SIZE

#define NOKIA_RECV_ALIVE \

#define NOKIA_RECV_NEG \

#define NOKIA_RECV_RADIO \

struct hci_nokia_neg_hdr {} __packed;

struct hci_nokia_neg_cmd {} __packed;

#define NOKIA_ALIVE_REQ
#define NOKIA_ALIVE_RESP

struct hci_nokia_alive_hdr {} __packed;

struct hci_nokia_alive_pkt {} __packed;

struct hci_nokia_neg_evt {} __packed;

#define MAX_BAUD_RATE
#define SETUP_BAUD_RATE
#define INIT_BAUD_RATE

struct nokia_bt_dev {};

static int nokia_enqueue(struct hci_uart *hu, struct sk_buff *skb);

static void nokia_flow_control(struct serdev_device *serdev, bool enable)
{}

static irqreturn_t wakeup_handler(int irq, void *data)
{}

static int nokia_reset(struct hci_uart *hu)
{}

static int nokia_send_alive_packet(struct hci_uart *hu)
{}

static int nokia_send_negotiation(struct hci_uart *hu)
{}

static int nokia_setup_fw(struct hci_uart *hu)
{}

static int nokia_setup(struct hci_uart *hu)
{}

static int nokia_open(struct hci_uart *hu)
{}

static int nokia_flush(struct hci_uart *hu)
{}

static int nokia_close(struct hci_uart *hu)
{}

/* Enqueue frame for transmittion (padding, crc, etc) */
static int nokia_enqueue(struct hci_uart *hu, struct sk_buff *skb)
{}

static int nokia_recv_negotiation_packet(struct hci_dev *hdev,
					 struct sk_buff *skb)
{}

static int nokia_recv_alive_packet(struct hci_dev *hdev, struct sk_buff *skb)
{}

static int nokia_recv_radio(struct hci_dev *hdev, struct sk_buff *skb)
{}

/* Recv data */
static const struct h4_recv_pkt nokia_recv_pkts[] =;

static int nokia_recv(struct hci_uart *hu, const void *data, int count)
{}

static struct sk_buff *nokia_dequeue(struct hci_uart *hu)
{}

static const struct hci_uart_proto nokia_proto =;

static int nokia_bluetooth_serdev_probe(struct serdev_device *serdev)
{}

static void nokia_bluetooth_serdev_remove(struct serdev_device *serdev)
{}

static int nokia_bluetooth_runtime_suspend(struct device *dev)
{}

static int nokia_bluetooth_runtime_resume(struct device *dev)
{}

static const struct dev_pm_ops nokia_bluetooth_pm_ops =;

#ifdef CONFIG_OF
static const struct of_device_id nokia_bluetooth_of_match[] =;
MODULE_DEVICE_TABLE(of, nokia_bluetooth_of_match);
#endif

static struct serdev_device_driver nokia_bluetooth_serdev_driver =;

module_serdev_device_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_VERSION();
MODULE_LICENSE();