#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/spi/spi.h>
#include "spi-loongson.h"
static inline void loongson_spi_write_reg(struct loongson_spi *spi, unsigned char reg,
unsigned char data)
{ … }
static inline char loongson_spi_read_reg(struct loongson_spi *spi, unsigned char reg)
{ … }
static void loongson_spi_set_cs(struct spi_device *spi, bool en)
{ … }
static void loongson_spi_set_clk(struct loongson_spi *loongson_spi, unsigned int hz)
{ … }
static void loongson_spi_set_mode(struct loongson_spi *loongson_spi,
struct spi_device *spi)
{ … }
static int loongson_spi_update_state(struct loongson_spi *loongson_spi,
struct spi_device *spi, struct spi_transfer *t)
{ … }
static int loongson_spi_setup(struct spi_device *spi)
{ … }
static int loongson_spi_write_read_8bit(struct spi_device *spi, const u8 **tx_buf,
u8 **rx_buf, unsigned int num)
{ … }
static int loongson_spi_write_read(struct spi_device *spi, struct spi_transfer *xfer)
{ … }
static int loongson_spi_prepare_message(struct spi_controller *ctlr, struct spi_message *m)
{ … }
static int loongson_spi_transfer_one(struct spi_controller *ctrl, struct spi_device *spi,
struct spi_transfer *xfer)
{ … }
static int loongson_spi_unprepare_message(struct spi_controller *ctrl, struct spi_message *m)
{ … }
static void loongson_spi_reginit(struct loongson_spi *loongson_spi_dev)
{ … }
int loongson_spi_init_controller(struct device *dev, void __iomem *regs)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
static int __maybe_unused loongson_spi_suspend(struct device *dev)
{ … }
static int __maybe_unused loongson_spi_resume(struct device *dev)
{ … }
const struct dev_pm_ops loongson_spi_dev_pm_ops = …;
EXPORT_SYMBOL_NS_GPL(…);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;