#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/spi/spi.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/delay.h>
#define DRV_NAME …
#define CTRL_REG …
#define DATA_REG …
#define JCORE_SPI_CTRL_XMIT …
#define JCORE_SPI_STAT_BUSY …
#define JCORE_SPI_CTRL_LOOP …
#define JCORE_SPI_CTRL_CS_BITS …
#define JCORE_SPI_WAIT_RDY_MAX_LOOP …
struct jcore_spi { … };
static int jcore_spi_wait(void __iomem *ctrl_reg)
{ … }
static void jcore_spi_program(struct jcore_spi *hw)
{ … }
static void jcore_spi_chipsel(struct spi_device *spi, bool value)
{ … }
static void jcore_spi_baudrate(struct jcore_spi *hw, int speed)
{ … }
static int jcore_spi_txrx(struct spi_controller *host, struct spi_device *spi,
struct spi_transfer *t)
{ … }
static int jcore_spi_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id jcore_spi_of_match[] = …;
MODULE_DEVICE_TABLE(of, jcore_spi_of_match);
static struct platform_driver jcore_spi_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;