#include <linux/device.h>
#include <linux/firmware.h>
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/spi/spi.h>
#include <linux/platform_device.h>
#include <linux/delay.h>
#include <asm/unaligned.h>
#define FIRMWARE_NAME …
#define ID_ECP3_17 …
#define ID_ECP3_35 …
#define FPGA_CMD_READ_ID …
#define FPGA_CMD_READ_STATUS …
#define FPGA_CMD_CLEAR …
#define FPGA_CMD_REFRESH …
#define FPGA_CMD_WRITE_EN …
#define FPGA_CMD_WRITE_DIS …
#define FPGA_CMD_WRITE_INC …
#define FPGA_STATUS_DONE …
#define FPGA_STATUS_CLEARED …
#define FPGA_CLEAR_TIMEOUT …
#define FPGA_CLEAR_MSLEEP …
#define FPGA_CLEAR_LOOP_COUNT …
struct fpga_data { … };
struct ecp3_dev { … };
static const struct ecp3_dev ecp3_dev[] = …;
static void firmware_load(const struct firmware *fw, void *context)
{ … }
static int lattice_ecp3_probe(struct spi_device *spi)
{ … }
static void lattice_ecp3_remove(struct spi_device *spi)
{ … }
static const struct spi_device_id lattice_ecp3_id[] = …;
MODULE_DEVICE_TABLE(spi, lattice_ecp3_id);
static struct spi_driver lattice_ecp3_driver = …;
module_spi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_FIRMWARE(…);