#include <linux/kernel.h>
#include <linux/bitfield.h>
#include <linux/bitops.h>
#include <linux/clk.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/spi/spi.h>
#include <linux/reset.h>
#include <asm/unaligned.h>
#include <linux/regmap.h>
#include <linux/mfd/syscon.h>
struct npcm_pspi { … };
#define DRIVER_NAME …
#define NPCM_PSPI_DATA …
#define NPCM_PSPI_CTL1 …
#define NPCM_PSPI_STAT …
#define NPCM_PSPI_CTL1_SPIEN …
#define NPCM_PSPI_CTL1_MOD …
#define NPCM_PSPI_CTL1_EIR …
#define NPCM_PSPI_CTL1_EIW …
#define NPCM_PSPI_CTL1_SCM …
#define NPCM_PSPI_CTL1_SCIDL …
#define NPCM_PSPI_CTL1_SCDV6_0 …
#define NPCM_PSPI_STAT_BSY …
#define NPCM_PSPI_STAT_RBF …
#define NPCM_PSPI_TIMEOUT_MS …
#define NPCM_PSPI_MAX_CLK_DIVIDER …
#define NPCM_PSPI_MIN_CLK_DIVIDER …
#define NPCM_PSPI_DEFAULT_CLK …
static inline unsigned int bytes_per_word(unsigned int bits)
{ … }
static inline void npcm_pspi_irq_enable(struct npcm_pspi *priv, u16 mask)
{ … }
static inline void npcm_pspi_irq_disable(struct npcm_pspi *priv, u16 mask)
{ … }
static inline void npcm_pspi_enable(struct npcm_pspi *priv)
{ … }
static inline void npcm_pspi_disable(struct npcm_pspi *priv)
{ … }
static void npcm_pspi_set_mode(struct spi_device *spi)
{ … }
static void npcm_pspi_set_transfer_size(struct npcm_pspi *priv, int size)
{ … }
static void npcm_pspi_set_baudrate(struct npcm_pspi *priv, unsigned int speed)
{ … }
static void npcm_pspi_setup_transfer(struct spi_device *spi,
struct spi_transfer *t)
{ … }
static void npcm_pspi_send(struct npcm_pspi *priv)
{ … }
static void npcm_pspi_recv(struct npcm_pspi *priv)
{ … }
static int npcm_pspi_transfer_one(struct spi_controller *host,
struct spi_device *spi,
struct spi_transfer *t)
{ … }
static int npcm_pspi_prepare_transfer_hardware(struct spi_controller *host)
{ … }
static int npcm_pspi_unprepare_transfer_hardware(struct spi_controller *host)
{ … }
static void npcm_pspi_reset_hw(struct npcm_pspi *priv)
{ … }
static irqreturn_t npcm_pspi_handler(int irq, void *dev_id)
{ … }
static int npcm_pspi_probe(struct platform_device *pdev)
{ … }
static void npcm_pspi_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id npcm_pspi_match[] = …;
MODULE_DEVICE_TABLE(of, npcm_pspi_match);
static struct platform_driver npcm_pspi_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;