linux/drivers/spi/spi-mt7621.c

// SPDX-License-Identifier: GPL-2.0
//
// spi-mt7621.c -- MediaTek MT7621 SPI controller driver
//
// Copyright (C) 2011 Sergiy <[email protected]>
// Copyright (C) 2011-2013 Gabor Juhos <[email protected]>
// Copyright (C) 2014-2015 Felix Fietkau <[email protected]>
//
// Some parts are based on spi-orion.c:
//   Author: Shadi Ammouri <[email protected]>
//   Copyright (C) 2007-2008 Marvell Ltd.

#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/reset.h>
#include <linux/spi/spi.h>

#define DRIVER_NAME

/* in usec */
#define RALINK_SPI_WAIT_MAX_LOOP

/* SPISTAT register bit field */
#define SPISTAT_BUSY

#define MT7621_SPI_TRANS
#define SPITRANS_BUSY

#define MT7621_SPI_OPCODE
#define MT7621_SPI_DATA0
#define MT7621_SPI_DATA4
#define SPI_CTL_TX_RX_CNT_MASK
#define SPI_CTL_START

#define MT7621_SPI_MASTER
#define MASTER_MORE_BUFMODE
#define MASTER_FULL_DUPLEX
#define MASTER_RS_CLK_SEL
#define MASTER_RS_CLK_SEL_SHIFT
#define MASTER_RS_SLAVE_SEL

#define MT7621_SPI_MOREBUF
#define MT7621_SPI_POLAR
#define MT7621_SPI_SPACE

#define MT7621_CPHA
#define MT7621_CPOL
#define MT7621_LSB_FIRST

#define MT7621_NATIVE_CS_COUNT

struct mt7621_spi {};

static inline struct mt7621_spi *spidev_to_mt7621_spi(struct spi_device *spi)
{}

static inline u32 mt7621_spi_read(struct mt7621_spi *rs, u32 reg)
{}

static inline void mt7621_spi_write(struct mt7621_spi *rs, u32 reg, u32 val)
{}

static void mt7621_spi_set_native_cs(struct spi_device *spi, bool enable)
{}

static int mt7621_spi_prepare(struct spi_device *spi, unsigned int speed)
{}

static inline int mt7621_spi_wait_till_ready(struct mt7621_spi *rs)
{}

static int mt7621_spi_prepare_message(struct spi_controller *host,
				      struct spi_message *m)
{}

static void mt7621_spi_read_half_duplex(struct mt7621_spi *rs,
					int rx_len, u8 *buf)
{}

static inline void mt7621_spi_flush(struct mt7621_spi *rs)
{}

static void mt7621_spi_write_half_duplex(struct mt7621_spi *rs,
					 int tx_len, const u8 *buf)
{}

static int mt7621_spi_transfer_one(struct spi_controller *host,
				   struct spi_device *spi,
				   struct spi_transfer *t)
{}

static int mt7621_spi_setup(struct spi_device *spi)
{}

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

static int mt7621_spi_probe(struct platform_device *pdev)
{}

MODULE_ALIAS();

static struct platform_driver mt7621_spi_driver =;

module_platform_driver();

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