#include <linux/bitfield.h>
#include <linux/bitops.h>
#include <linux/dma-mapping.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/preempt.h>
#include <linux/highmem.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/spi/spi.h>
#include <linux/spi/spi-mem.h>
#include <linux/string.h>
#include <linux/of.h>
#include "internals.h"
#include "spi-dw.h"
#ifdef CONFIG_DEBUG_FS
#include <linux/debugfs.h>
#endif
struct dw_spi_chip_data { … };
#ifdef CONFIG_DEBUG_FS
#define DW_SPI_DBGFS_REG(_name, _off) …
static const struct debugfs_reg32 dw_spi_dbgfs_regs[] = …;
static void dw_spi_debugfs_init(struct dw_spi *dws)
{ … }
static void dw_spi_debugfs_remove(struct dw_spi *dws)
{ … }
#else
static inline void dw_spi_debugfs_init(struct dw_spi *dws)
{
}
static inline void dw_spi_debugfs_remove(struct dw_spi *dws)
{
}
#endif
void dw_spi_set_cs(struct spi_device *spi, bool enable)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
static inline u32 dw_spi_tx_max(struct dw_spi *dws)
{ … }
static inline u32 dw_spi_rx_max(struct dw_spi *dws)
{ … }
static void dw_writer(struct dw_spi *dws)
{ … }
static void dw_reader(struct dw_spi *dws)
{ … }
int dw_spi_check_status(struct dw_spi *dws, bool raw)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
static irqreturn_t dw_spi_transfer_handler(struct dw_spi *dws)
{ … }
static irqreturn_t dw_spi_irq(int irq, void *dev_id)
{ … }
static u32 dw_spi_prepare_cr0(struct dw_spi *dws, struct spi_device *spi)
{ … }
void dw_spi_update_config(struct dw_spi *dws, struct spi_device *spi,
struct dw_spi_cfg *cfg)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
static void dw_spi_irq_setup(struct dw_spi *dws)
{ … }
static int dw_spi_poll_transfer(struct dw_spi *dws,
struct spi_transfer *transfer)
{ … }
static int dw_spi_transfer_one(struct spi_controller *host,
struct spi_device *spi,
struct spi_transfer *transfer)
{ … }
static void dw_spi_handle_err(struct spi_controller *host,
struct spi_message *msg)
{ … }
static int dw_spi_adjust_mem_op_size(struct spi_mem *mem, struct spi_mem_op *op)
{ … }
static bool dw_spi_supports_mem_op(struct spi_mem *mem,
const struct spi_mem_op *op)
{ … }
static int dw_spi_init_mem_buf(struct dw_spi *dws, const struct spi_mem_op *op)
{ … }
static void dw_spi_free_mem_buf(struct dw_spi *dws)
{ … }
static int dw_spi_write_then_read(struct dw_spi *dws, struct spi_device *spi)
{ … }
static inline bool dw_spi_ctlr_busy(struct dw_spi *dws)
{ … }
static int dw_spi_wait_mem_op_done(struct dw_spi *dws)
{ … }
static void dw_spi_stop_mem_op(struct dw_spi *dws, struct spi_device *spi)
{ … }
static int dw_spi_exec_mem_op(struct spi_mem *mem, const struct spi_mem_op *op)
{ … }
static void dw_spi_init_mem_ops(struct dw_spi *dws)
{ … }
static int dw_spi_setup(struct spi_device *spi)
{ … }
static void dw_spi_cleanup(struct spi_device *spi)
{ … }
static void dw_spi_hw_init(struct device *dev, struct dw_spi *dws)
{ … }
int dw_spi_add_host(struct device *dev, struct dw_spi *dws)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
void dw_spi_remove_host(struct dw_spi *dws)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
int dw_spi_suspend_host(struct dw_spi *dws)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
int dw_spi_resume_host(struct dw_spi *dws)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;