linux/net/nfc/nci/spi.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2013  Intel Corporation. All rights reserved.
 */

#define pr_fmt(fmt)

#include <linux/module.h>

#include <linux/export.h>
#include <linux/spi/spi.h>
#include <linux/crc-ccitt.h>
#include <net/nfc/nci_core.h>

#define NCI_SPI_ACK_SHIFT
#define NCI_SPI_MSB_PAYLOAD_MASK

#define NCI_SPI_SEND_TIMEOUT

#define NCI_SPI_DIRECT_WRITE
#define NCI_SPI_DIRECT_READ

#define ACKNOWLEDGE_NONE
#define ACKNOWLEDGE_ACK
#define ACKNOWLEDGE_NACK

#define CRC_INIT

static int __nci_spi_send(struct nci_spi *nspi, const struct sk_buff *skb,
			  int cs_change)
{}

int nci_spi_send(struct nci_spi *nspi,
		 struct completion *write_handshake_completion,
		 struct sk_buff *skb)
{}
EXPORT_SYMBOL_GPL();

/* ---- Interface to NCI SPI drivers ---- */

/**
 * nci_spi_allocate_spi - allocate a new nci spi
 *
 * @spi: SPI device
 * @acknowledge_mode: Acknowledge mode used by the NFC device
 * @delay: delay between transactions in us
 * @ndev: nci dev to send incoming nci frames to
 */
struct nci_spi *nci_spi_allocate_spi(struct spi_device *spi,
				     u8 acknowledge_mode, unsigned int delay,
				     struct nci_dev *ndev)
{}
EXPORT_SYMBOL_GPL();

static int send_acknowledge(struct nci_spi *nspi, u8 acknowledge)
{}

static struct sk_buff *__nci_spi_read(struct nci_spi *nspi)
{}

static int nci_spi_check_crc(struct sk_buff *skb)
{}

static u8 nci_spi_get_ack(struct sk_buff *skb)
{}

/**
 * nci_spi_read - read frame from NCI SPI drivers
 *
 * @nspi: The nci spi
 * Context: can sleep
 *
 * This call may only be used from a context that may sleep.  The sleep
 * is non-interruptible, and has no timeout.
 *
 * It returns an allocated skb containing the frame on success, or NULL.
 */
struct sk_buff *nci_spi_read(struct nci_spi *nspi)
{}
EXPORT_SYMBOL_GPL();

MODULE_DESCRIPTION();
MODULE_LICENSE();