linux/drivers/spi/spi-at91-usart.c

// SPDX-License-Identifier: GPL-2.0
//
// Driver for AT91 USART Controllers as SPI
//
// Copyright (C) 2018 Microchip Technology Inc.
//
// Author: Radu Pirea <[email protected]>

#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/dmaengine.h>
#include <linux/dma-direction.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/gpio/consumer.h>
#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>

#include <linux/spi/spi.h>

#define US_CR
#define US_MR
#define US_IER
#define US_IDR
#define US_CSR
#define US_RHR
#define US_THR
#define US_BRGR
#define US_VERSION

#define US_CR_RSTRX
#define US_CR_RSTTX
#define US_CR_RXEN
#define US_CR_RXDIS
#define US_CR_TXEN
#define US_CR_TXDIS

#define US_MR_SPI_HOST
#define US_MR_CHRL
#define US_MR_CPHA
#define US_MR_CPOL
#define US_MR_CLKO
#define US_MR_WRDBT
#define US_MR_LOOP

#define US_IR_RXRDY
#define US_IR_TXRDY
#define US_IR_OVRE

#define US_BRGR_SIZE

#define US_MIN_CLK_DIV
#define US_MAX_CLK_DIV

#define US_RESET
#define US_DISABLE
#define US_ENABLE
#define US_OVRE_RXRDY_IRQS

#define US_INIT
#define US_DMA_MIN_BYTES
#define US_DMA_TIMEOUT

/* Register access macros */
#define at91_usart_spi_readl(port, reg)
#define at91_usart_spi_writel(port, reg, value)

#define at91_usart_spi_readb(port, reg)
#define at91_usart_spi_writeb(port, reg, value)

struct at91_usart_spi {};

static void dma_callback(void *data)
{}

static bool at91_usart_spi_can_dma(struct spi_controller *ctrl,
				   struct spi_device *spi,
				   struct spi_transfer *xfer)
{}

static int at91_usart_spi_configure_dma(struct spi_controller *ctlr,
					struct at91_usart_spi *aus)
{}

static void at91_usart_spi_release_dma(struct spi_controller *ctlr)
{}

static void at91_usart_spi_stop_dma(struct spi_controller *ctlr)
{}

static int at91_usart_spi_dma_transfer(struct spi_controller *ctlr,
				       struct spi_transfer *xfer)
{}

static unsigned long at91_usart_spi_dma_timeout(struct at91_usart_spi *aus)
{}

static inline u32 at91_usart_spi_tx_ready(struct at91_usart_spi *aus)
{}

static inline u32 at91_usart_spi_rx_ready(struct at91_usart_spi *aus)
{}

static inline u32 at91_usart_spi_check_overrun(struct at91_usart_spi *aus)
{}

static inline u32 at91_usart_spi_read_status(struct at91_usart_spi *aus)
{}

static inline void at91_usart_spi_tx(struct at91_usart_spi *aus)
{}

static inline void at91_usart_spi_rx(struct at91_usart_spi *aus)
{}

static inline void
at91_usart_spi_set_xfer_speed(struct at91_usart_spi *aus,
			      struct spi_transfer *xfer)
{}

static irqreturn_t at91_usart_spi_interrupt(int irq, void *dev_id)
{}

static int at91_usart_spi_setup(struct spi_device *spi)
{}

static int at91_usart_spi_transfer_one(struct spi_controller *ctlr,
				       struct spi_device *spi,
				       struct spi_transfer *xfer)
{}

static int at91_usart_spi_prepare_message(struct spi_controller *ctlr,
					  struct spi_message *message)
{}

static int at91_usart_spi_unprepare_message(struct spi_controller *ctlr,
					    struct spi_message *message)
{}

static void at91_usart_spi_cleanup(struct spi_device *spi)
{}

static void at91_usart_spi_init(struct at91_usart_spi *aus)
{}

static int at91_usart_gpio_setup(struct platform_device *pdev)
{}

static int at91_usart_spi_probe(struct platform_device *pdev)
{}

__maybe_unused static int at91_usart_spi_runtime_suspend(struct device *dev)
{}

__maybe_unused static int at91_usart_spi_runtime_resume(struct device *dev)
{}

__maybe_unused static int at91_usart_spi_suspend(struct device *dev)
{}

__maybe_unused static int at91_usart_spi_resume(struct device *dev)
{}

static void at91_usart_spi_remove(struct platform_device *pdev)
{}

static const struct dev_pm_ops at91_usart_spi_pm_ops =;

static struct platform_driver at91_usart_spi_driver =;

module_platform_driver();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();
MODULE_ALIAS();