linux/drivers/spi/spi-slave-mt27xx.c

// SPDX-License-Identifier: GPL-2.0+
// Copyright (c) 2018 MediaTek Inc.

#include <linux/clk.h>
#include <linux/device.h>
#include <linux/dma-mapping.h>
#include <linux/err.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/spi/spi.h>
#include <linux/of.h>


#define SPIS_IRQ_EN_REG
#define SPIS_IRQ_CLR_REG
#define SPIS_IRQ_ST_REG
#define SPIS_IRQ_MASK_REG
#define SPIS_CFG_REG
#define SPIS_RX_DATA_REG
#define SPIS_TX_DATA_REG
#define SPIS_RX_DST_REG
#define SPIS_TX_SRC_REG
#define SPIS_DMA_CFG_REG
#define SPIS_SOFT_RST_REG

/* SPIS_IRQ_EN_REG */
#define DMA_DONE_EN
#define DATA_DONE_EN
#define RSTA_DONE_EN
#define CMD_INVALID_EN

/* SPIS_IRQ_ST_REG */
#define DMA_DONE_ST
#define DATA_DONE_ST
#define RSTA_DONE_ST
#define CMD_INVALID_ST

/* SPIS_IRQ_MASK_REG */
#define DMA_DONE_MASK
#define DATA_DONE_MASK
#define RSTA_DONE_MASK
#define CMD_INVALID_MASK

/* SPIS_CFG_REG */
#define SPIS_TX_ENDIAN
#define SPIS_RX_ENDIAN
#define SPIS_TXMSBF
#define SPIS_RXMSBF
#define SPIS_CPHA
#define SPIS_CPOL
#define SPIS_TX_EN
#define SPIS_RX_EN

/* SPIS_DMA_CFG_REG */
#define TX_DMA_TRIG_EN
#define TX_DMA_EN
#define RX_DMA_EN
#define TX_DMA_LEN

/* SPIS_SOFT_RST_REG */
#define SPIS_DMA_ADDR_EN
#define SPIS_SOFT_RST

struct mtk_spi_slave {};

struct mtk_spi_compatible {};

static const struct mtk_spi_compatible mt2712_compat =;
static const struct mtk_spi_compatible mt8195_compat =;

static const struct of_device_id mtk_spi_slave_of_match[] =;
MODULE_DEVICE_TABLE(of, mtk_spi_slave_of_match);

static void mtk_spi_slave_disable_dma(struct mtk_spi_slave *mdata)
{}

static void mtk_spi_slave_disable_xfer(struct mtk_spi_slave *mdata)
{}

static int mtk_spi_slave_wait_for_completion(struct mtk_spi_slave *mdata)
{}

static int mtk_spi_slave_prepare_message(struct spi_controller *ctlr,
					 struct spi_message *msg)
{}

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

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

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

static int mtk_spi_slave_setup(struct spi_device *spi)
{}

static int mtk_slave_abort(struct spi_controller *ctlr)
{}

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

static int mtk_spi_slave_probe(struct platform_device *pdev)
{}

static void mtk_spi_slave_remove(struct platform_device *pdev)
{}

#ifdef CONFIG_PM_SLEEP
static int mtk_spi_slave_suspend(struct device *dev)
{}

static int mtk_spi_slave_resume(struct device *dev)
{}
#endif /* CONFIG_PM_SLEEP */

#ifdef CONFIG_PM
static int mtk_spi_slave_runtime_suspend(struct device *dev)
{}

static int mtk_spi_slave_runtime_resume(struct device *dev)
{}
#endif /* CONFIG_PM */

static const struct dev_pm_ops mtk_spi_slave_pm =;

static struct platform_driver mtk_spi_slave_driver =;

module_platform_driver();

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